From f0724ddb17f7a47ce85c0913ca73736a60b077a4 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Thu, 30 May 2024 16:13:40 +0400 Subject: [PATCH 01/85] fix: deployed new IR --- deploy/002-interest-rate-model.ts | 9 + .../bscmainnet/InterestRateModelVBNB.json | 48 +- .../6fc684307aeb3185be94f869ed923bc8.json | 348 +++ .../bsctestnet/VBep20DelegateTemp.json | 2504 +++++++++++++++++ deployments/bsctestnet/VBep20Temp.json | 2462 ++++++++++++++++ .../42f81d8e85977bc834873ceceb7c8672.json | 348 +++ .../442b6826bad342d5527fff650c37c186.json | 348 +++ 7 files changed, 6043 insertions(+), 24 deletions(-) create mode 100644 deployments/bscmainnet/solcInputs/6fc684307aeb3185be94f869ed923bc8.json create mode 100644 deployments/bsctestnet/VBep20DelegateTemp.json create mode 100644 deployments/bsctestnet/VBep20Temp.json create mode 100644 deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json create mode 100644 deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index 3ce7e3865..9c7b4bc09 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -1,3 +1,4 @@ +import { parseUnits } from "ethers/lib/utils"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; @@ -22,6 +23,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { autoMine: true, args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], }); + + await deploy("InterestRateModelVBNB", { + contract: "JumpRateModel", + from: deployer, + log: true, + autoMine: true, + args: [0, parseUnits("0.625", 18), parseUnits("6.8", 18), parseUnits("0.8", 18)], + }); }; func.tags = ["InterestRateModel"]; diff --git a/deployments/bscmainnet/InterestRateModelVBNB.json b/deployments/bscmainnet/InterestRateModelVBNB.json index e16b95958..8054a37af 100644 --- a/deployments/bscmainnet/InterestRateModelVBNB.json +++ b/deployments/bscmainnet/InterestRateModelVBNB.json @@ -1,5 +1,5 @@ { - "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "address": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", "abi": [ { "inputs": [ @@ -248,36 +248,36 @@ "type": "function" } ], - "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", + "transactionHash": "0x4410c4aca8941562f7e41af02822969d0a8abd4498e93d6d1527f7597523cc75", "receipt": { "to": null, - "from": "0xA6575f1D5Bd6545fBd34BE05259D9d6ae60641f2", - "contractAddress": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", - "transactionIndex": 220, + "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", + "contractAddress": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", + "transactionIndex": 52, "gasUsed": "468712", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000001080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2e26f3fd3a2baf7076b8190ded4cd88d84c9430ccf9e7cae9aa257197e481dd3", - "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", + "logsBloom": "0x00000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa0a78282401028bf071f2ea8694ac8483f70a17741182be9342c6d128f340d14", + "transactionHash": "0x4410c4aca8941562f7e41af02822969d0a8abd4498e93d6d1527f7597523cc75", "logs": [ { - "transactionIndex": 220, - "blockNumber": 36583930, - "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", - "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "transactionIndex": 52, + "blockNumber": 39174233, + "transactionHash": "0x4410c4aca8941562f7e41af02822969d0a8abd4498e93d6d1527f7597523cc75", + "address": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fbc8cb15000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", - "logIndex": 440, - "blockHash": "0x2e26f3fd3a2baf7076b8190ded4cd88d84c9430ccf9e7cae9aa257197e481dd3" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd7d86d01000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", + "logIndex": 145, + "blockHash": "0xa0a78282401028bf071f2ea8694ac8483f70a17741182be9342c6d128f340d14" } ], - "blockNumber": 36583930, - "cumulativeGasUsed": "20317034", + "blockNumber": 39174233, + "cumulativeGasUsed": "5495849", "status": 1, "byzantium": true }, - "args": [0, "225000000000000000", "6800000000000000000", "800000000000000000"], - "numDeployments": 1, - "solcInputHash": "c3599fe405114938035c0ee8ddf55b7c", + "args": [0, "625000000000000000", "6800000000000000000", "800000000000000000"], + "numDeployments": 2, + "solcInputHash": "6fc684307aeb3185be94f869ed923bc8", "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", @@ -337,7 +337,7 @@ "storageLayout": { "storage": [ { - "astId": 8756, + "astId": 9002, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "multiplierPerBlock", "offset": 0, @@ -345,7 +345,7 @@ "type": "t_uint256" }, { - "astId": 8758, + "astId": 9004, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "baseRatePerBlock", "offset": 0, @@ -353,7 +353,7 @@ "type": "t_uint256" }, { - "astId": 8760, + "astId": 9006, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "jumpMultiplierPerBlock", "offset": 0, @@ -361,7 +361,7 @@ "type": "t_uint256" }, { - "astId": 8762, + "astId": 9008, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "kink", "offset": 0, diff --git a/deployments/bscmainnet/solcInputs/6fc684307aeb3185be94f869ed923bc8.json b/deployments/bscmainnet/solcInputs/6fc684307aeb3185be94f869ed923bc8.json new file mode 100644 index 000000000..e211e0035 --- /dev/null +++ b/deployments/bscmainnet/solcInputs/6fc684307aeb3185be94f869ed923bc8.json @@ -0,0 +1,348 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" + }, + "contracts/Comptroller/ComptrollerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerLensInterface.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address. Defaults to zero which corresponds to unlimited borrowing.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" + }, + "contracts/Comptroller/Diamond/Diamond.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" + }, + "contracts/Comptroller/Diamond/facets/FacetBase.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n\n ensureListed(markets[vToken]);\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 borrowCap = borrowCaps[vToken];\n // Borrow cap of 0 corresponds to unlimited borrowing\n if (borrowCap != 0) {\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows < borrowCap, \"market borrow cap reached\");\n }\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to unlimited borrowing\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to unlimited borrowing\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" + }, + "contracts/Comptroller/Unitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Governance/VTreasury.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" + }, + "contracts/InterestRateModels/InterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" + }, + "contracts/InterestRateModels/JumpRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/Lens/ComptrollerLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" + }, + "contracts/Lens/SnapshotLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Lens/VenusLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Oracle/PriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" + }, + "contracts/test/BEP20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/ComptrollerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" + }, + "contracts/test/ComptrollerMock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerScenario.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" + }, + "contracts/test/DiamondHarness.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" + }, + "contracts/test/EvilToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/EvilXDelegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/test/EvilXToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" + }, + "contracts/test/Fauceteer.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" + }, + "contracts/test/FaucetToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" + }, + "contracts/test/FeeToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/FixedPriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" + }, + "contracts/test/InterestRateModelHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" + }, + "contracts/test/MockDeflationaryToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" + }, + "contracts/test/MockVBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/SimplePriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/test/VAIControllerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" + }, + "contracts/test/VAIHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" + }, + "contracts/test/VBep20Harness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" + }, + "contracts/test/VBep20MockDelegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" + }, + "contracts/test/VRTConverterHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" + }, + "contracts/test/VRTVaultHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" + }, + "contracts/test/XVSHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" + }, + "contracts/test/XVSVaultScenario.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" + }, + "contracts/test/XVSVestingHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" + }, + "contracts/Tokens/EIP20Interface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/EIP20NonStandardInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/Prime/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" + }, + "contracts/Tokens/VAI/lib.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" + }, + "contracts/Tokens/VAI/VAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n\n // --- Math ---\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint wad = allowed ? uint(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint oldTreasuryPercent, uint newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint oldFloatRateMantissa, uint newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint oldMintCap, uint newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n /*** Main Actions ***/\n struct MintLocalVars {\n uint oErr;\n MathError mathErr;\n uint mintAmount;\n uint accountMintVAINew;\n uint accountMintableVAI;\n }\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint mintVAIAmount) external nonReentrant returns (uint) {\n if (address(comptroller) != address(0)) {\n require(mintVAIAmount > 0, \"mintVAIAmount cannot be zero\");\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n accrueVAIInterest();\n\n MintLocalVars memory vars;\n\n address minter = msg.sender;\n address _vai = vai;\n uint vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n uint vaiNewTotalSupply;\n\n (vars.mathErr, vaiNewTotalSupply) = addUInt(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.oErr, vars.accountMintableVAI) = getMintableVAI(minter);\n if (vars.oErr != uint(Error.NO_ERROR)) {\n return uint(Error.REJECTION);\n }\n\n // check that user have sufficient mintableVAI balance\n if (mintVAIAmount > vars.accountMintableVAI) {\n return fail(Error.REJECTION, FailureInfo.VAI_MINT_REJECTION);\n }\n\n // Calculate the minted balance based on interest index\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint remainedAmount;\n\n (vars.mathErr, remainedAmount) = subUInt(repayAmount, totalMintedVAI);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, pastVAIInterest[minter]) = addUInt(pastVAIInterest[minter], remainedAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n totalMintedVAI = repayAmount;\n }\n\n (vars.mathErr, vars.accountMintVAINew) = addUInt(totalMintedVAI, mintVAIAmount);\n require(vars.mathErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n uint error = comptroller.setMintedVAIOf(minter, vars.accountMintVAINew);\n if (error != 0) {\n return error;\n }\n\n uint feeAmount;\n uint remainedAmount;\n vars.mintAmount = mintVAIAmount;\n if (treasuryPercent != 0) {\n (vars.mathErr, feeAmount) = mulUInt(vars.mintAmount, treasuryPercent);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, remainedAmount) = subUInt(vars.mintAmount, feeAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = vars.mintAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint(Error.NO_ERROR);\n }\n }\n\n /**\n * @notice The repay function transfers VAI into the protocol and burn, reducing the user's borrow balance.\n * Before repaying an asset, users must first approve the VAI to access their VAI balance.\n * @param repayVAIAmount The amount of the VAI to be repaid.\n * @return 0 on success, otherwise an error code\n */\n function repayVAI(uint repayVAIAmount) external nonReentrant returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n require(repayVAIAmount > 0, \"repayVAIAmount cannt be zero\");\n\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n return repayVAIFresh(msg.sender, msg.sender, repayVAIAmount);\n }\n }\n\n /**\n * @notice Repay VAI Internal\n * @notice Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayVAIFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n MathError mErr;\n\n (uint burn, uint partOfCurrentInterest, uint partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n uint accountVAINew;\n\n (mErr, accountVAINew) = subUInt(vaiBalanceBorrower, burn);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, accountVAINew) = subUInt(accountVAINew, partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, pastVAIInterest[borrower]) = subUInt(pastVAIInterest[borrower], partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n if (error != 0) {\n return (error, 0);\n }\n emit RepayVAI(payer, borrower, burn);\n\n return (uint(Error.NO_ERROR), burn);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint, uint) {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n uint error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment VAI.\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint oErr;\n MathError mErr;\n uint sumSupply;\n uint marketSupply;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n @return (uint, uint) Tuple of error code and mintable VAI. Error 0 means no error. Mintable amount has 18 decimals\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint, uint) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint accountMintableVAI;\n uint i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n for (i = 0; i < enteredMarkets.length; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (, uint collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n }\n\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.REJECTION), 0);\n }\n\n return (uint(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint newTreasuryPercent\n ) external returns (uint) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint delta;\n uint rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint) {\n uint yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint) {\n uint storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint) {\n MathError mErr;\n uint delta;\n\n uint amount = comptroller.mintedVAIs(account);\n uint interest = pastVAIInterest[account];\n uint totalMintedVAI;\n uint newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return (uint, uint, uint) Amount of VAI to be burned, amount of VAI the user needs to pay in current interest and amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(address borrower, uint256 repayAmount) public view returns (uint, uint, uint) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint burn;\n uint partOfCurrentInterest = currentInterest;\n uint partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n require(newReceiver != address(0), \"invalid receiver address\");\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @notice Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function getVAIAddress() public view returns (address);\n\n function getMintableVAI(address minter) public view returns (uint, uint);\n\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\n\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\n\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint, uint);\n\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\n\n function updateVenusVAIMintIndex() external returns (uint);\n\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\n\n function getVAIRepayAmount(address account) public view returns (uint);\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" + }, + "contracts/Tokens/VAI/VAIUnitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRT.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverter.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" + }, + "contracts/Tokens/VTokens/VBep20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Immutable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VTokenInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" + }, + "contracts/Tokens/XVS/IXVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" + }, + "contracts/Tokens/XVS/XVS.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" + }, + "contracts/Utils/Address.sol": { + "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/Utils/CarefulMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" + }, + "contracts/Utils/Context.sol": { + "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "contracts/Utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" + }, + "contracts/Utils/ErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/Utils/Exponential.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" + }, + "contracts/Utils/ExponentialNoError.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" + }, + "contracts/Utils/IBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" + }, + "contracts/Utils/Ownable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/Utils/Owned.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" + }, + "contracts/Utils/SafeBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Utils/SafeCast.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/Utils/SafeMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "contracts/Utils/Tokenlock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" + }, + "contracts/VAIVault/VAIVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" + }, + "contracts/VRTVault/VRTVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" + }, + "contracts/XVSVault/TimeManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /**\n * @dev Retrieves the current slot\n * @return Current slot\n */\n function() view returns (uint256) private _getCurrentSlot;\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[48] private __gap;\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n isInitialized = true;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "contracts/XVSVault/XVSStore.sol": { + "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" + }, + "contracts/XVSVault/XVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\nimport { TimeManagerV5 } from \"./TimeManagerV5.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) internal totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/bsctestnet/VBep20DelegateTemp.json b/deployments/bsctestnet/VBep20DelegateTemp.json new file mode 100644 index 000000000..5e70b902e --- /dev/null +++ b/deployments/bsctestnet/VBep20DelegateTemp.json @@ -0,0 +1,2504 @@ +{ + "address": "0x437Af2bbE2f88C14ac7067C99F7825375A10a244", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "cashPrior", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "AccrueInterest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "Borrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "LiquidateBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "RepayBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "benefactor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "protocolShareReserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesReduced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + } + ], + "name": "_addReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount_", + "type": "uint256" + } + ], + "name": "_reduceReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "_setComptroller", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel_", + "type": "address" + } + ], + "name": "_setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReserveFactorMantissa_", + "type": "uint256" + } + ], + "name": "_setReserveFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOfUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "interestRateModel", + "outputs": [ + { + "internalType": "contract InterestRateModel", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isVToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", + "type": "address" + } + ], + "name": "liquidateBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeemBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlyingBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "seize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalBorrows", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newUnderlying", + "type": "address" + } + ], + "name": "updateUnderlying", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5f05edf23a24b2a0399870f49c744412541896a4045fe2e74d3fdc2bf3091aad", + "receipt": { + "to": null, + "from": "0x464779C41C5f1Be598853C1F87bCC7087Ea75f28", + "contractAddress": "0x437Af2bbE2f88C14ac7067C99F7825375A10a244", + "transactionIndex": 0, + "gasUsed": "5149796", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x11710a560963433e41737306ebedf95837479fd88c3aea1abf2ae6738446aebb", + "transactionHash": "0x5f05edf23a24b2a0399870f49c744412541896a4045fe2e74d3fdc2bf3091aad", + "logs": [], + "blockNumber": 39571055, + "cumulativeGasUsed": "5149796", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "442b6826bad342d5527fff650c37c186", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cashPrior\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"interestAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"AccrueInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"error\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"info\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"detail\",\"type\":\"uint256\"}],\"name\":\"Failure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vTokenCollateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"LiquidateBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"MintBehalf\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"oldComptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"NewComptroller\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"oldInterestRateModel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"NewMarketInterestRateModel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"NewProtocolShareReserve\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReduceReservesBlockDelta\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta\",\"type\":\"uint256\"}],\"name\":\"NewReduceReservesBlockDelta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReserveFactorMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"NewReserveFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"RedeemFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"RepayBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"benefactor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolShareReserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"}],\"name\":\"_addReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_becomeImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount_\",\"type\":\"uint256\"}],\"name\":\"_reduceReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_resignImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"_setComptroller\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel_\",\"type\":\"address\"}],\"name\":\"_setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa_\",\"type\":\"uint256\"}],\"name\":\"_setReserveFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"accrueInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"internalType\":\"contract VTokenInterface\",\"name\":\"vTokenCollateral\",\"type\":\"address\"}],\"name\":\"liquidateBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mintBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeemBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlyingBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockDelta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveFactorMantissa\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlManagerAddress\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"protcolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta_\",\"type\":\"uint256\"}],\"name\":\"setReduceReservesBlockDelta\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supplyRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"totalBorrowsCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newUnderlying\",\"type\":\"address\"}],\"name\":\"updateUnderlying\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_addReserves(uint256)\":{\"params\":{\"addAmount\":\"The amount of underlying tokens to add as reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_becomeImplementation(bytes)\":{\"params\":{\"data\":\"The encoded bytes data for any initialization\"}},\"_reduceReserves(uint256)\":{\"params\":{\"reduceAmount_\":\"Amount of reduction to reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setComptroller(address)\":{\"details\":\"Admin function to set a new comptroller\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setInterestRateModel(address)\":{\"details\":\"Governance function to accrue interest and update the interest rate model\",\"params\":{\"newInterestRateModel_\":\"The new interest rate model to use\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setReserveFactor(uint256)\":{\"details\":\"Governor function to accrue interest and set a new reserve factor\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"accrueInterest()\":{\"details\":\"This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta\"},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"The number of tokens allowed to be spent (-1 means infinite)\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"Whether or not the approval succeeded\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of tokens owned by `owner`\"},\"balanceOfUnderlying(address)\":{\"details\":\"This also accrues interest in a transaction\",\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The amount of underlying owned by `owner`\"},\"borrow(uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowBalanceCurrent(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated after updating borrowIndex\"},\"return\":\"The calculated balance\"},\"borrowBalanceStored(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated\"},\"return\":\"The calculated balance\"},\"borrowBehalf(address,uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\",\"borrower\":\"The borrower, on behalf of whom to borrow.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowRatePerBlock()\":{\"return\":\"The borrow interest rate per block, scaled by 1e18\"},\"exchangeRateCurrent()\":{\"return\":\"Calculated exchange rate scaled by 1e18\"},\"exchangeRateStored()\":{\"details\":\"This function does not accrue interest before calculating the exchange rate\",\"return\":\"Calculated exchange rate scaled by 1e18\"},\"getAccountSnapshot(address)\":{\"details\":\"This is used by comptroller to more efficiently perform liquidity checks.\",\"params\":{\"account\":\"Address of the account to snapshot\"},\"return\":\"(possible error, token balance, borrow balance, exchange rate mantissa)\"},\"getCash()\":{\"return\":\"The quantity of underlying asset owned by this contract\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"BEP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"BEP-20 name of this token\",\"symbol_\":\"BEP-20 symbol of this token\",\"underlying_\":\"The address of the underlying asset\"}},\"initialize(address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"EIP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"EIP-20 name of this token\",\"symbol_\":\"EIP-20 symbol of this token\"}},\"liquidateBorrow(address,uint256,address)\":{\"params\":{\"borrower\":\"The borrower of this vToken to be liquidated\",\"repayAmount\":\"The amount of the underlying borrowed asset to repay\",\"vTokenCollateral\":\"The market in which to seize collateral from the borrower\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mint(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mintBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\",\"receiver\":\"The account which is receiving the vTokens\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeem(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\",\"redeemer\":\"The user on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlying(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to receive from redeeming vTokens\",\"redeemer\":\", on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrow(uint256)\":{\"params\":{\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrowBehalf(address,uint256)\":{\"params\":{\"borrower\":\"The account with the debt being payed off\",\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"seize(address,address,uint256)\":{\"details\":\"Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\",\"params\":{\"borrower\":\"The account having collateral seized\",\"liquidator\":\"The account receiving seized collateral\",\"seizeTokens\":\"The number of vTokens to seize\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"setAccessControlManager(address)\":{\"details\":\"Admin function to set the access control address\",\"params\":{\"newAccessControlManagerAddress\":\"New address for the access control\"},\"return\":\"uint 0=success, otherwise will revert\"},\"setProtocolShareReserve(address)\":{\"params\":{\"protcolShareReserve_\":\"The address of protocol share reserve contract\"}},\"setReduceReservesBlockDelta(uint256)\":{\"params\":{\"newReduceReservesBlockDelta_\":\"block difference value\"}},\"supplyRatePerBlock()\":{\"return\":\"The supply interest rate per block, scaled by 1e18\"},\"totalBorrowsCurrent()\":{\"return\":\"The total borrows with interest\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"return\":\"Whether or not the transfer succeeded\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"return\":\"Whether or not the transfer succeeded\"}},\"title\":\"Venus's VBep20Delegate Contract\"},\"userdoc\":{\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. msg.sender must be pendingAdmin\"},\"_addReserves(uint256)\":{\"notice\":\"The sender adds to reserves.\"},\"_becomeImplementation(bytes)\":{\"notice\":\"Called by the delegator on a delegate to initialize it for duty\"},\"_reduceReserves(uint256)\":{\"notice\":\"Accrues interest and reduces reserves by transferring to protocol share reserve\"},\"_resignImplementation()\":{\"notice\":\"Called by the delegator on a delegate to forfeit its responsibility\"},\"_setComptroller(address)\":{\"notice\":\"Sets a new comptroller for the market\"},\"_setInterestRateModel(address)\":{\"notice\":\"Accrues interest and updates the interest rate model using _setInterestRateModelFresh\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setReserveFactor(uint256)\":{\"notice\":\"accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\"},\"accrueInterest()\":{\"notice\":\"Applies accrued interest to total borrows and reserves\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Get the underlying balance of the `owner`\"},\"borrow(uint256)\":{\"notice\":\"Sender borrows assets from the protocol to their own address\"},\"borrowBalanceCurrent(address)\":{\"notice\":\"Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\"},\"borrowBalanceStored(address)\":{\"notice\":\"Return the borrow balance of account based on stored data\"},\"borrowBehalf(address,uint256)\":{\"notice\":\"Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\"},\"borrowRatePerBlock()\":{\"notice\":\"Returns the current per-block borrow interest rate for this vToken\"},\"constructor\":\"Construct an empty delegate\",\"exchangeRateCurrent()\":{\"notice\":\"Accrue interest then return the up-to-date exchange rate\"},\"exchangeRateStored()\":{\"notice\":\"Calculates the exchange rate from the underlying to the VToken\"},\"getAccountSnapshot(address)\":{\"notice\":\"Get a snapshot of the account's balances, and the cached exchange rate\"},\"getCash()\":{\"notice\":\"Get cash balance of this vToken in the underlying asset\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the new money market\"},\"initialize(address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the money market\"},\"liquidateBorrow(address,uint256,address)\":{\"notice\":\"The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator.\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives vTokens in exchange\"},\"mintBehalf(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receiver receives vTokens in exchange\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for the underlying asset\"},\"redeemBehalf(address,uint256)\":{\"notice\":\"Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"redeemUnderlying(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for a specified amount of underlying asset\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"notice\":\"Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"repayBorrow(uint256)\":{\"notice\":\"Sender repays their own borrow\"},\"repayBorrowBehalf(address,uint256)\":{\"notice\":\"Sender repays a borrow belonging to another borrowing account\"},\"seize(address,address,uint256)\":{\"notice\":\"Transfers collateral tokens (this market) to the liquidator.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"Sets protocol share reserve contract address\"},\"setReduceReservesBlockDelta(uint256)\":{\"notice\":\"Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\"},\"supplyRatePerBlock()\":{\"notice\":\"Returns the current per-block supply interest rate for this vToken\"},\"totalBorrowsCurrent()\":{\"notice\":\"Returns the current total borrows plus accrued interest\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"}},\"notice\":\"VTokens which wrap an EIP-20 underlying and are delegated to\"}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/VTokens/VBep20Delegate.sol\":\"VBep20Delegate\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.5.16;\\n\\n/**\\n * @title IAccessControlManagerV5\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\\n */\\ninterface IAccessControlManagerV5 {\\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 */\\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 /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleGranted} event.\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n /**\\n * @notice Verifies if the given account can call a praticular contract's function\\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\\n * @param account address (eoa or contract) for which call permissions will be checked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\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\":\"0x3563db4c75f7aa0b8a982bab591907dda192438a2368511b62a9c587a3e54226\"},\"contracts/Comptroller/ComptrollerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport \\\"../Oracle/PriceOracle.sol\\\";\\nimport \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerTypes } from \\\"./ComptrollerStorage.sol\\\";\\n\\ncontract ComptrollerInterface {\\n /// @notice Indicator that this is a Comptroller contract (for inspection)\\n bool public constant isComptroller = true;\\n\\n /*** Assets You Are In ***/\\n\\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\\n\\n function exitMarket(address vToken) external returns (uint);\\n\\n /*** Policy Hooks ***/\\n\\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\\n\\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\\n\\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\\n\\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\\n\\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\\n\\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\\n\\n function repayBorrowAllowed(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function repayBorrowVerify(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount,\\n uint borrowerIndex\\n ) external;\\n\\n function liquidateBorrowAllowed(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function liquidateBorrowVerify(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n uint seizeTokens\\n ) external;\\n\\n function seizeAllowed(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external returns (uint);\\n\\n function seizeVerify(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external;\\n\\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\\n\\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\\n\\n /*** Liquidity/Liquidation Calculations ***/\\n\\n function liquidateCalculateSeizeTokens(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function getXVSAddress() public view returns (address);\\n\\n function markets(address) external view returns (bool, uint);\\n\\n function oracle() external view returns (PriceOracle);\\n\\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\\n\\n function getAssetsIn(address) external view returns (VToken[] memory);\\n\\n function claimVenus(address) external;\\n\\n function venusAccrued(address) external view returns (uint);\\n\\n function venusSupplySpeeds(address) external view returns (uint);\\n\\n function venusBorrowSpeeds(address) external view returns (uint);\\n\\n function getAllMarkets() external view returns (VToken[] memory);\\n\\n function venusSupplierIndex(address, address) external view returns (uint);\\n\\n function venusInitialIndex() external view returns (uint224);\\n\\n function venusBorrowerIndex(address, address) external view returns (uint);\\n\\n function venusBorrowState(address) external view returns (uint224, uint32);\\n\\n function venusSupplyState(address) external view returns (uint224, uint32);\\n\\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n function vaiController() external view returns (VAIControllerInterface);\\n\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n function protocolPaused() external view returns (bool);\\n\\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\\n\\n function mintedVAIs(address user) external view returns (uint);\\n\\n function vaiMintRate() external view returns (uint);\\n}\\n\\ninterface IVAIVault {\\n function updatePendingRewards() external;\\n}\\n\\ninterface IComptroller {\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n /*** Treasury Data ***/\\n function treasuryAddress() external view returns (address);\\n\\n function treasuryPercent() external view returns (uint);\\n}\\n\",\"keccak256\":\"0x4f4965dd8614b455952a2ef186fd8a509affbc56078a4aa8702f46d4c8209793\"},\"contracts/Comptroller/ComptrollerLensInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ninterface ComptrollerLensInterface {\\n function liquidateCalculateSeizeTokens(\\n address comptroller,\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address comptroller,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function getHypotheticalAccountLiquidity(\\n address comptroller,\\n address account,\\n VToken vTokenModify,\\n uint redeemTokens,\\n uint borrowAmount\\n ) external view returns (uint, uint, uint);\\n}\\n\",\"keccak256\":\"0xc824e034221740c1957891547c78a123b595017cf102629454a04d36637e9c4a\"},\"contracts/Comptroller/ComptrollerStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken } from \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport { PriceOracle } from \\\"../Oracle/PriceOracle.sol\\\";\\nimport { VAIControllerInterface } from \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerLensInterface } from \\\"./ComptrollerLensInterface.sol\\\";\\nimport { IPrime } from \\\"../Tokens/Prime/IPrime.sol\\\";\\n\\ninterface ComptrollerTypes {\\n enum Action {\\n MINT,\\n REDEEM,\\n BORROW,\\n REPAY,\\n SEIZE,\\n LIQUIDATE,\\n TRANSFER,\\n ENTER_MARKET,\\n EXIT_MARKET\\n }\\n}\\n\\ncontract UnitrollerAdminStorage {\\n /**\\n * @notice Administrator for this contract\\n */\\n address public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address public pendingAdmin;\\n\\n /**\\n * @notice Active brains of Unitroller\\n */\\n address public comptrollerImplementation;\\n\\n /**\\n * @notice Pending brains of Unitroller\\n */\\n address public pendingComptrollerImplementation;\\n}\\n\\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\\n /**\\n * @notice Oracle which gives the price of any given asset\\n */\\n PriceOracle public oracle;\\n\\n /**\\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\\n */\\n uint256 public closeFactorMantissa;\\n\\n /**\\n * @notice Multiplier representing the discount on collateral that a liquidator receives\\n */\\n uint256 public liquidationIncentiveMantissa;\\n\\n /**\\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\\n */\\n uint256 public maxAssets;\\n\\n /**\\n * @notice Per-account mapping of \\\"assets you are in\\\", capped by maxAssets\\n */\\n mapping(address => VToken[]) public accountAssets;\\n\\n struct Market {\\n /// @notice Whether or not this market is listed\\n bool isListed;\\n /**\\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\\n * For instance, 0.9 to allow borrowing 90% of collateral value.\\n * Must be between 0 and 1, and stored as a mantissa.\\n */\\n uint256 collateralFactorMantissa;\\n /// @notice Per-market mapping of \\\"accounts in this asset\\\"\\n mapping(address => bool) accountMembership;\\n /// @notice Whether or not this market receives XVS\\n bool isVenus;\\n }\\n\\n /**\\n * @notice Official mapping of vTokens -> Market metadata\\n * @dev Used e.g. to determine if a market is supported\\n */\\n mapping(address => Market) public markets;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n address public pauseGuardian;\\n\\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\\n bool private _mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool private _borrowGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal transferGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal seizeGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal borrowGuardianPaused;\\n\\n struct VenusMarketState {\\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\\n uint224 index;\\n /// @notice The block number the index was last updated at\\n uint32 block;\\n }\\n\\n /// @notice A list of all markets\\n VToken[] public allMarkets;\\n\\n /// @notice The rate at which the flywheel distributes XVS, per block\\n uint256 internal venusRate;\\n\\n /// @notice The portion of venusRate that each market currently receives\\n mapping(address => uint256) internal venusSpeeds;\\n\\n /// @notice The Venus market supply state for each market\\n mapping(address => VenusMarketState) public venusSupplyState;\\n\\n /// @notice The Venus market borrow state for each market\\n mapping(address => VenusMarketState) public venusBorrowState;\\n\\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\\n\\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\\n\\n /// @notice The XVS accrued but not yet transferred to each user\\n mapping(address => uint256) public venusAccrued;\\n\\n /// @notice The Address of VAIController\\n VAIControllerInterface public vaiController;\\n\\n /// @notice The minted VAI amount to each user\\n mapping(address => uint256) public mintedVAIs;\\n\\n /// @notice VAI Mint Rate as a percentage\\n uint256 public vaiMintRate;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n bool public mintVAIGuardianPaused;\\n bool public repayVAIGuardianPaused;\\n\\n /**\\n * @notice Pause/Unpause whole protocol actions\\n */\\n bool public protocolPaused;\\n\\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\\n uint256 private venusVAIRate;\\n}\\n\\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\\n uint256 public venusVAIVaultRate;\\n\\n // address of VAI Vault\\n address public vaiVaultAddress;\\n\\n // start block of release to VAI Vault\\n uint256 public releaseStartBlock;\\n\\n // minimum release amount to VAI Vault\\n uint256 public minReleaseAmount;\\n}\\n\\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\\n address public borrowCapGuardian;\\n\\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\\n mapping(address => uint256) public borrowCaps;\\n}\\n\\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\\n /// @notice Treasury Guardian address\\n address public treasuryGuardian;\\n\\n /// @notice Treasury address\\n address public treasuryAddress;\\n\\n /// @notice Fee percent of accrued interest with decimal 18\\n uint256 public treasuryPercent;\\n}\\n\\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\\n mapping(address => uint256) private venusContributorSpeeds;\\n\\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\\n mapping(address => uint256) private lastContributorBlock;\\n}\\n\\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\\n address public liquidatorContract;\\n}\\n\\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\\n ComptrollerLensInterface public comptrollerLens;\\n}\\n\\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\\n mapping(address => uint256) public supplyCaps;\\n}\\n\\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\\n /// @notice AccessControlManager address\\n address internal accessControl;\\n\\n /// @notice True if a certain action is paused on a certain market\\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\\n}\\n\\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\\n mapping(address => uint256) public venusBorrowSpeeds;\\n\\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\\n mapping(address => uint256) public venusSupplySpeeds;\\n}\\n\\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\\n mapping(address => mapping(address => bool)) public approvedDelegates;\\n}\\n\\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\\n mapping(address => bool) public isForcedLiquidationEnabled;\\n}\\n\\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\\n }\\n\\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\\n // facet addresses\\n address[] internal _facetAddresses;\\n}\\n\\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\\n /// @notice Prime token address\\n IPrime public prime;\\n}\\n\\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\\n}\\n\\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\\n /// @notice The XVS token contract address\\n address internal xvs;\\n\\n /// @notice The XVS vToken contract address\\n address internal xvsVToken;\\n}\\n\",\"keccak256\":\"0x06608bb502e91c33fda8c0dd88cc79a49a078fab521bc27d10fc3a69c1da55f4\"},\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/Oracle/PriceOracle.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ncontract PriceOracle {\\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\\n bool public constant isPriceOracle = true;\\n\\n /**\\n * @notice Get the underlying price of a vToken asset\\n * @param vToken The vToken to get the underlying price of\\n * @return The underlying asset price mantissa (scaled by 1e18).\\n * Zero means the price is unavailable.\\n */\\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x0f68d0e07decba8fb9a77df1659170f310b487cc0b650f53ca6aa55ed62b28de\"},\"contracts/Tokens/EIP20Interface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title BEP 20 Token Standard Interface\\n * https://eips.ethereum.org/EIPS/eip-20\\n */\\ninterface EIP20Interface {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return success whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x7e89ffa9c0d432c4db8bd5388ff68e33934dcdb1d038d74bbed3b2fdae3eb532\"},\"contracts/Tokens/EIP20NonStandardInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title EIP20NonStandardInterface\\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\ninterface EIP20NonStandardInterface {\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance of the owner\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transfer(address dst, uint256 amount) external;\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transferFrom(address src, address dst, uint256 amount) external;\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved\\n * @return success Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x05a3a7d5ab47de3964c95d706dcc18fe7583b1d064dbb74808c0f2774f347afa\"},\"contracts/Tokens/Prime/IPrime.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title IPrime\\n * @author Venus\\n * @notice Interface for Prime Token\\n */\\ninterface IPrime {\\n /**\\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\\n * @param user the account address whose balance was updated\\n */\\n function xvsUpdated(address user) external;\\n\\n /**\\n * @notice accrues interest and updates score for an user for a specific market\\n * @param user the account address for which to accrue interest and update score\\n * @param market the market for which to accrue interest and update score\\n */\\n function accrueInterestAndUpdateScore(address user, address market) external;\\n\\n /**\\n * @notice Distributes income from market since last distribution\\n * @param vToken the market for which to distribute the income\\n */\\n function accrueInterest(address vToken) external;\\n\\n /**\\n * @notice Returns if user is a prime holder\\n * @param isPrimeHolder returns if the user is a prime holder\\n */\\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\\n}\\n\",\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\"},\"contracts/Tokens/VAI/VAIControllerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../VTokens/VTokenInterfaces.sol\\\";\\n\\ncontract VAIControllerInterface {\\n function getVAIAddress() public view returns (address);\\n\\n function getMintableVAI(address minter) public view returns (uint, uint);\\n\\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\\n\\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\\n\\n function liquidateVAI(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint, uint);\\n\\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\\n\\n function updateVenusVAIMintIndex() external returns (uint);\\n\\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\\n\\n function getVAIRepayAmount(address account) public view returns (uint);\\n}\\n\",\"keccak256\":\"0x17eb6edb1262c4effcad86f614ff20d00256278485054b11aa5cf011ff6f8a86\"},\"contracts/Tokens/VTokens/VBep20.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \\\"./VToken.sol\\\";\\nimport { EIP20Interface } from \\\"../EIP20Interface.sol\\\";\\nimport { EIP20NonStandardInterface } from \\\"../EIP20NonStandardInterface.sol\\\";\\n\\n/**\\n * @title Venus's VBep20 Contract\\n * @notice vTokens which wrap an EIP-20 underlying\\n * @author Venus\\n */\\ncontract VBep20 is VToken, VBep20Interface {\\n /*** User Interface ***/\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits Mint event\\n function mint(uint mintAmount) external returns (uint) {\\n (uint err, ) = mintInternal(mintAmount);\\n return err;\\n }\\n\\n function updateUnderlying(address newUnderlying) external {\\n underlying = newUnderlying;\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits MintBehalf event\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for the underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeem(uint redeemTokens) external returns (uint) {\\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The user on behalf of whom to redeem\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemInternal(redeemer, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemAmount The amount of underlying to redeem\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer, on behalf of whom to redeem\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets from the protocol to their own address\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrow(uint borrowAmount) external returns (uint) {\\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\\n * @param borrower The borrower, on behalf of whom to borrow.\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(borrower, msg.sender), \\\"not an approved delegate\\\");\\n return borrowInternal(borrower, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrow(uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowInternal(repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emit LiquidateBorrow event on success\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint) {\\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\\n return err;\\n }\\n\\n /**\\n * @notice The sender adds to reserves.\\n * @param addAmount The amount of underlying tokens to add as reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesAdded event\\n function _addReserves(uint addAmount) external returns (uint) {\\n return _addReservesInternal(addAmount);\\n }\\n\\n /**\\n * @notice Initialize the new money market\\n * @param underlying_ The address of the underlying asset\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ BEP-20 name of this token\\n * @param symbol_ BEP-20 symbol of this token\\n * @param decimals_ BEP-20 decimal precision of this token\\n */\\n function initialize(\\n address underlying_,\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n // VToken initialize does the bulk of the work\\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\\n\\n // Set underlying and sanity check it\\n underlying = underlying_;\\n EIP20Interface(underlying).totalSupply();\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\\n * This will revert due to insufficient balance or insufficient allowance.\\n * This function returns the actual amount received,\\n * which may be less than `amount` if there is a fee attached to the transfer.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint) {\\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_IN_FAILED\\\");\\n\\n // Calculate the amount that was *actually* transferred\\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\\n require(balanceAfter >= balanceBefore, \\\"TOKEN_TRANSFER_IN_OVERFLOW\\\");\\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\\n }\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\\n * it is >= amount, this should not revert in normal conditions.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferOut(address payable to, uint amount) internal {\\n EIP20NonStandardInterface(underlying).transfer(to, amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_OUT_FAILED\\\");\\n }\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying tokens owned by this contract\\n */\\n function getCashPrior() internal view returns (uint) {\\n return EIP20Interface(underlying).balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x89637da83701227fc706f3edfff4aec486f5ef5f2ef567cc2c7878597b487c4f\"},\"contracts/Tokens/VTokens/VBep20Delegate.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport { VBep20 } from \\\"./VBep20.sol\\\";\\nimport { VDelegateInterface } from \\\"./VTokenInterfaces.sol\\\";\\n\\n/**\\n * @title Venus's VBep20Delegate Contract\\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\\n * @author Venus\\n */\\ncontract VBep20Delegate is VBep20, VDelegateInterface {\\n /**\\n * @notice Construct an empty delegate\\n */\\n constructor() public {}\\n\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public {\\n // Shh -- currently unused\\n data;\\n\\n // Shh -- we don't ever want this hook to be marked pure\\n if (false) {\\n implementation = address(0);\\n }\\n\\n require(msg.sender == admin, \\\"only the admin may call _becomeImplementation\\\");\\n }\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public {\\n // Shh -- we don't ever want this hook to be marked pure\\n if (false) {\\n implementation = address(0);\\n }\\n\\n require(msg.sender == admin, \\\"only the admin may call _resignImplementation\\\");\\n }\\n\\n function updateUnderlying(address newUnderlying) public {\\n underlying = newUnderlying;\\n }\\n}\\n\",\"keccak256\":\"0xdab754eeef2e64671af424eeb0373f1e19e7a5b4469e71e9afce4886e02b8147\"},\"contracts/Tokens/VTokens/VToken.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../Utils/ErrorReporter.sol\\\";\\nimport \\\"../../Utils/Exponential.sol\\\";\\nimport \\\"../../Tokens/EIP20Interface.sol\\\";\\nimport \\\"../../Tokens/EIP20NonStandardInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\nimport \\\"./VTokenInterfaces.sol\\\";\\nimport { IAccessControlManagerV5 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\\\";\\n\\n/**\\n * @title Venus's vToken Contract\\n * @notice Abstract base for vTokens\\n * @author Venus\\n */\\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\\n struct MintLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint mintTokens;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n uint actualMintAmount;\\n }\\n\\n struct RedeemLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint redeemTokens;\\n uint redeemAmount;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n }\\n\\n struct BorrowLocalVars {\\n MathError mathErr;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n }\\n\\n struct RepayBorrowLocalVars {\\n Error err;\\n MathError mathErr;\\n uint repayAmount;\\n uint borrowerIndex;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n uint actualRepayAmount;\\n }\\n\\n /*** Reentrancy Guard ***/\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n */\\n modifier nonReentrant() {\\n require(_notEntered, \\\"re-entered\\\");\\n _notEntered = false;\\n _;\\n _notEntered = true; // get a gas-refund post-Istanbul\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n // @custom:event Emits Approval event on successful approve\\n function approve(address spender, uint256 amount) external returns (bool) {\\n transferAllowances[msg.sender][spender] = amount;\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external returns (uint) {\\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\\n ensureNoMathError(mErr);\\n return balance;\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return totalBorrows;\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return borrowBalanceStored(account);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\\n }\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\\n // Check caller = admin\\n ensureAdmin(msg.sender);\\n\\n // Save current value, if any, for inclusion in log\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store pendingAdmin with value newPendingAdmin\\n pendingAdmin = newPendingAdmin;\\n\\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewAdmin event on successful acceptance\\n // @custom:event Emits NewPendingAdmin event with null new pending admin\\n function _acceptAdmin() external returns (uint) {\\n // Check caller is pendingAdmin\\n if (msg.sender != pendingAdmin) {\\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\\n }\\n\\n // Save current values for inclusion in log\\n address oldAdmin = admin;\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store admin with value pendingAdmin\\n admin = pendingAdmin;\\n\\n // Clear the pending value\\n pendingAdmin = address(0);\\n\\n emit NewAdmin(oldAdmin, admin);\\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\\n * @dev Governor function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewReserveFactor event\\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_setReserveFactor(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\\n }\\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\\n return _setReserveFactorFresh(newReserveFactorMantissa_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract\\n * @dev Admin function to set the access control address\\n * @param newAccessControlManagerAddress New address for the access control\\n * @return uint 0=success, otherwise will revert\\n */\\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ensureNonZeroAddress(newAccessControlManagerAddress);\\n\\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\\n accessControlManager = newAccessControlManagerAddress;\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\\n * @param reduceAmount_ Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesReduced event\\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_reduceReserves(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // If reserves were reduced in accrueInterest\\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\\n return _reduceReservesFresh(reduceAmount_);\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (-1 means infinite)\\n */\\n function allowance(address owner, address spender) external view returns (uint256) {\\n return transferAllowances[owner][spender];\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view returns (uint256) {\\n return accountTokens[owner];\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\\n uint vTokenBalance = accountTokens[account];\\n uint borrowBalance;\\n uint exchangeRateMantissa;\\n\\n MathError mErr;\\n\\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view returns (uint) {\\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view returns (uint) {\\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view returns (uint) {\\n return getCashPrior();\\n }\\n\\n /**\\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\\n * @param newReduceReservesBlockDelta_ block difference value\\n */\\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\\n require(newReduceReservesBlockDelta_ > 0, \\\"Invalid Input\\\");\\n ensureAllowed(\\\"setReduceReservesBlockDelta(uint256)\\\");\\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\\n }\\n\\n /**\\n * @notice Sets protocol share reserve contract address\\n * @param protcolShareReserve_ The address of protocol share reserve contract\\n */\\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n ensureNonZeroAddress(protcolShareReserve_);\\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\\n protocolShareReserve = protcolShareReserve_;\\n }\\n\\n /**\\n * @notice Initialize the money market\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ EIP-20 name of this token\\n * @param symbol_ EIP-20 symbol of this token\\n * @param decimals_ EIP-20 decimal precision of this token\\n */\\n function initialize(\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n ensureAdmin(msg.sender);\\n require(accrualBlockNumber == 0 && borrowIndex == 0, \\\"market may only be initialized once\\\");\\n\\n // Set initial exchange rate\\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\\n require(initialExchangeRateMantissa > 0, \\\"initial exchange rate must be greater than zero.\\\");\\n\\n // Set the comptroller\\n uint err = _setComptroller(comptroller_);\\n require(err == uint(Error.NO_ERROR), \\\"setting comptroller failed\\\");\\n\\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\\n accrualBlockNumber = block.number;\\n borrowIndex = mantissaOne;\\n\\n // Set the interest rate model (depends on block number / borrow index)\\n err = _setInterestRateModelFresh(interestRateModel_);\\n require(err == uint(Error.NO_ERROR), \\\"setting interest rate model failed\\\");\\n\\n name = name_;\\n symbol = symbol_;\\n decimals = decimals_;\\n\\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\\n _notEntered = true;\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return exchangeRateStored();\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage and\\n * reduce spread reserves to protocol share reserve\\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\\n */\\n // @custom:event Emits AccrueInterest event\\n function accrueInterest() public returns (uint) {\\n /* Remember the initial block number */\\n uint currentBlockNumber = block.number;\\n uint accrualBlockNumberPrior = accrualBlockNumber;\\n\\n /* Short-circuit accumulating 0 interest */\\n if (accrualBlockNumberPrior == currentBlockNumber) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n /* Read the previous values out of storage */\\n uint cashPrior = getCashPrior();\\n uint borrowsPrior = totalBorrows;\\n uint reservesPrior = totalReserves;\\n uint borrowIndexPrior = borrowIndex;\\n\\n /* Calculate the current borrow interest rate */\\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\\n require(borrowRateMantissa <= borrowRateMaxMantissa, \\\"borrow rate is absurdly high\\\");\\n\\n /* Calculate the number of blocks elapsed since the last accrual */\\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\\n ensureNoMathError(mathErr);\\n\\n /*\\n * Calculate the interest accumulated into borrows and reserves and the new index:\\n * simpleInterestFactor = borrowRate * blockDelta\\n * interestAccumulated = simpleInterestFactor * totalBorrows\\n * totalBorrowsNew = interestAccumulated + totalBorrows\\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\\n */\\n\\n Exp memory simpleInterestFactor;\\n uint interestAccumulated;\\n uint totalBorrowsNew;\\n uint totalReservesNew;\\n uint borrowIndexNew;\\n\\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\\n Exp({ mantissa: reserveFactorMantissa }),\\n interestAccumulated,\\n reservesPrior\\n );\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accrualBlockNumber = currentBlockNumber;\\n borrowIndex = borrowIndexNew;\\n totalBorrows = totalBorrowsNew;\\n totalReserves = totalReservesNew;\\n\\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\\n ensureNoMathError(mathErr);\\n if (blockDelta >= reduceReservesBlockDelta) {\\n reduceReservesBlockNumber = currentBlockNumber;\\n if (cashPrior < totalReservesNew) {\\n _reduceReservesFresh(cashPrior);\\n } else {\\n _reduceReservesFresh(totalReservesNew);\\n }\\n }\\n\\n /* We emit an AccrueInterest event */\\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewComptroller event\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ComptrollerInterface oldComptroller = comptroller;\\n // Ensure invoke comptroller.isComptroller() returns true\\n require(newComptroller.isComptroller(), \\\"marker method returned false\\\");\\n\\n // Set market's comptroller to newComptroller\\n comptroller = newComptroller;\\n\\n // Emit NewComptroller(oldComptroller, newComptroller)\\n emit NewComptroller(oldComptroller, newComptroller);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\\n * @dev Governance function to accrue interest and update the interest rate model\\n * @param newInterestRateModel_ The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\\n ensureAllowed(\\\"_setInterestRateModel(address)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\\n }\\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\\n return _setInterestRateModelFresh(newInterestRateModel_);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view returns (uint) {\\n (MathError err, uint result) = exchangeRateStoredInternal();\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view returns (uint) {\\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\\n * @dev Called by both `transfer` and `transferFrom` internally\\n * @param spender The address of the account performing the transfer\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param tokens The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\\n /* Fail if transfer not allowed */\\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Do not allow self-transfers */\\n if (src == dst) {\\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n /* Get the allowance, infinite for the account owner */\\n uint startingAllowance = 0;\\n if (spender == src) {\\n startingAllowance = uint(-1);\\n } else {\\n startingAllowance = transferAllowances[src][spender];\\n }\\n\\n /* Do the calculations, checking for {under,over}flow */\\n MathError mathErr;\\n uint allowanceNew;\\n uint srvTokensNew;\\n uint dstTokensNew;\\n\\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\\n }\\n\\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n accountTokens[src] = srvTokensNew;\\n accountTokens[dst] = dstTokensNew;\\n\\n /* Eat some of the allowance (if necessary) */\\n if (startingAllowance != uint(-1)) {\\n transferAllowances[src][spender] = allowanceNew;\\n }\\n\\n /* We emit a Transfer event */\\n emit Transfer(src, dst, tokens);\\n\\n comptroller.transferVerify(address(this), src, dst, tokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintFresh(msg.sender, mintAmount);\\n }\\n\\n /**\\n * @notice User supplies assets into the market and receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param minter The address of the account which is supplying the assets\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the minter and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[minter] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[minter] = vars.accountTokensNew;\\n\\n /* We emit a Mint event, and a Transfer event */\\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), minter, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The address of the account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\\n }\\n\\n /**\\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param payer The address of the account which is paying the underlying token\\n * @param receiver The address of the account which is receiving vToken\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\\n ensureNonZeroAddress(receiver);\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the payer and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[receiver] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[receiver] = vars.accountTokensNew;\\n\\n /* We emit a MintBehalf event, and a Transfer event */\\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), receiver, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokens\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens, if called by a delegate\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlyingInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // solhint-disable-next-line code-complexity\\n function redeemFresh(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokensIn,\\n uint redeemAmountIn\\n ) internal returns (uint) {\\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \\\"one of redeemTokensIn or redeemAmountIn must be zero\\\");\\n\\n RedeemLocalVars memory vars;\\n\\n /* exchangeRate = invoke Exchange Rate Stored() */\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n ensureNoMathError(vars.mathErr);\\n\\n /* If redeemTokensIn > 0: */\\n if (redeemTokensIn > 0) {\\n /*\\n * We calculate the exchange rate and the amount of underlying to be redeemed:\\n * redeemTokens = redeemTokensIn\\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\\n */\\n vars.redeemTokens = redeemTokensIn;\\n\\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\\n Exp({ mantissa: vars.exchangeRateMantissa }),\\n redeemTokensIn\\n );\\n ensureNoMathError(vars.mathErr);\\n } else {\\n /*\\n * We get the current exchange rate and calculate the amount to be redeemed:\\n * redeemTokens = redeemAmountIn / exchangeRate\\n * redeemAmount = redeemAmountIn\\n */\\n\\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\\n redeemAmountIn,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n vars.redeemAmount = redeemAmountIn;\\n }\\n\\n /* Fail if redeem not allowed */\\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /*\\n * We calculate the new total supply and redeemer balance, checking for underflow:\\n * totalSupplyNew = totalSupply - redeemTokens\\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* Fail gracefully if protocol has insufficient cash */\\n if (getCashPrior() < vars.redeemAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[redeemer] = vars.accountTokensNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the redeemAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken has redeemAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n\\n uint feeAmount;\\n uint remainedAmount;\\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\\n (vars.mathErr, feeAmount) = mulUInt(\\n vars.redeemAmount,\\n IComptroller(address(comptroller)).treasuryPercent()\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\\n\\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\\n } else {\\n remainedAmount = vars.redeemAmount;\\n }\\n\\n doTransferOut(receiver, remainedAmount);\\n\\n /* We emit a Transfer event, and a Redeem event */\\n emit Transfer(redeemer, address(this), vars.redeemTokens);\\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrowInternal(\\n address borrower,\\n address payable receiver,\\n uint borrowAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\\n }\\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\\n return borrowFresh(borrower, receiver, borrowAmount);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @dev Before calling this function, ensure that the interest has been accrued\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\\n */\\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\\n /* Revert if borrow not allowed */\\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Revert if protocol has insufficient underlying cash */\\n if (getCashPrior() < borrowAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n BorrowLocalVars memory vars;\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on overflow:\\n * accountBorrowsNew = accountBorrows + borrowAmount\\n * totalBorrowsNew = totalBorrows + borrowAmount\\n */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the borrowAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken borrowAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n doTransferOut(receiver, borrowAmount);\\n\\n /* We emit a Borrow event */\\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\\n }\\n\\n /**\\n * @notice Borrows are repaid by another user (possibly the borrower).\\n * @param payer The account paying off the borrow\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount of undelrying tokens being returned\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\\n /* Fail if repayBorrow not allowed */\\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\\n if (allowed != 0) {\\n return (\\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\\n 0\\n );\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\\n }\\n\\n RepayBorrowLocalVars memory vars;\\n\\n /* We remember the original borrowerIndex for verification purposes */\\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\\n\\n /* We fetch the amount the borrower owes, with accumulated interest */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n uint(vars.mathErr)\\n ),\\n 0\\n );\\n }\\n\\n /* If repayAmount == -1, repayAmount = accountBorrows */\\n if (repayAmount == uint(-1)) {\\n vars.repayAmount = vars.accountBorrows;\\n } else {\\n vars.repayAmount = repayAmount;\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the payer and the repayAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional repayAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on underflow:\\n * accountBorrowsNew = accountBorrows - actualRepayAmount\\n * totalBorrowsNew = totalBorrows - actualRepayAmount\\n */\\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /* We emit a RepayBorrow event */\\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\\n\\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function liquidateBorrowInternal(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\\n }\\n\\n error = vTokenCollateral.accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\\n }\\n\\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\\n }\\n\\n /**\\n * @notice The liquidator liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param liquidator The address repaying the borrow and seizing collateral\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n // solhint-disable-next-line code-complexity\\n function liquidateBorrowFresh(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal returns (uint, uint) {\\n /* Fail if liquidate not allowed */\\n uint allowed = comptroller.liquidateBorrowAllowed(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n repayAmount\\n );\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Verify vTokenCollateral market's block number equals current block number */\\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\\n }\\n\\n /* Fail if repayAmount = 0 */\\n if (repayAmount == 0) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\\n }\\n\\n /* Fail if repayAmount = -1 */\\n if (repayAmount == uint(-1)) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\\n }\\n\\n /* Fail if repayBorrow fails */\\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\\n if (repayBorrowError != uint(Error.NO_ERROR)) {\\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We calculate the number of collateral tokens that will be seized */\\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\\n address(this),\\n address(vTokenCollateral),\\n actualRepayAmount\\n );\\n require(amountSeizeError == uint(Error.NO_ERROR), \\\"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\\\");\\n\\n /* Revert if borrower collateral token balance < seizeTokens */\\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \\\"LIQUIDATE_SEIZE_TOO_MUCH\\\");\\n\\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\\n uint seizeError;\\n if (address(vTokenCollateral) == address(this)) {\\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\\n } else {\\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\\n }\\n\\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\\n require(seizeError == uint(Error.NO_ERROR), \\\"token seizure failed\\\");\\n\\n /* We emit a LiquidateBorrow event */\\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.liquidateBorrowVerify(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n actualRepayAmount,\\n seizeTokens\\n );\\n\\n return (uint(Error.NO_ERROR), actualRepayAmount);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seizeInternal(\\n address seizerToken,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) internal returns (uint) {\\n /* Fail if seize not allowed */\\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\\n }\\n\\n MathError mathErr;\\n uint borrowerTokensNew;\\n uint liquidatorTokensNew;\\n\\n /*\\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\\n */\\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\\n }\\n\\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountTokens[borrower] = borrowerTokensNew;\\n accountTokens[liquidator] = liquidatorTokensNew;\\n\\n /* Emit a Transfer event */\\n emit Transfer(borrower, liquidator, seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\\n * @dev Governance function to set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\\n // Verify market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\\n }\\n\\n // Check newReserveFactor \\u2264 maxReserveFactor\\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\\n }\\n\\n uint oldReserveFactorMantissa = reserveFactorMantissa;\\n reserveFactorMantissa = newReserveFactorMantissa;\\n\\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\\n * @param addAmount Amount of addition to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\\n (error, ) = _addReservesFresh(addAmount);\\n return error;\\n }\\n\\n /**\\n * @notice Add reserves by transferring from caller\\n * @dev Requires fresh interest accrual\\n * @param addAmount Amount of addition to reserves\\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\\n */\\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\\n // totalReserves + actualAddAmount\\n uint totalReservesNew;\\n uint actualAddAmount;\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the caller and the addAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional addAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n\\n actualAddAmount = doTransferIn(msg.sender, addAmount);\\n\\n totalReservesNew = totalReserves + actualAddAmount;\\n\\n /* Revert on overflow */\\n require(totalReservesNew >= totalReserves, \\\"add reserves unexpected overflow\\\");\\n\\n // Store reserves[n+1] = reserves[n] + actualAddAmount\\n totalReserves = totalReservesNew;\\n\\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\\n\\n /* Return (NO_ERROR, actualAddAmount) */\\n return (uint(Error.NO_ERROR), actualAddAmount);\\n }\\n\\n /**\\n * @notice Reduces reserves by transferring to protocol share reserve contract\\n * @dev Requires fresh interest accrual\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\\n if (reduceAmount == 0) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\\n }\\n\\n // Fail gracefully if protocol has insufficient underlying cash\\n if (getCashPrior() < reduceAmount) {\\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\\n }\\n\\n // Check reduceAmount \\u2264 reserves[n] (totalReserves)\\n if (reduceAmount > totalReserves) {\\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n // totalReserves - reduceAmount\\n uint totalReservesNew = totalReserves - reduceAmount;\\n\\n // Store reserves[n+1] = reserves[n] - reduceAmount\\n totalReserves = totalReservesNew;\\n\\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n doTransferOut(protocolShareReserve, reduceAmount);\\n\\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\\n address(comptroller),\\n underlying,\\n IProtocolShareReserveV5.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice updates the interest rate model (requires fresh interest accrual)\\n * @dev Governance function to update the interest rate model\\n * @param newInterestRateModel the new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\\n // Used to store old model for use in the event that is emitted on success\\n InterestRateModel oldInterestRateModel;\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\\n }\\n\\n // Track the market's current interest rate model\\n oldInterestRateModel = interestRateModel;\\n\\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\\n require(newInterestRateModel.isInterestRateModel(), \\\"marker method returned false\\\");\\n\\n // Set the interest rate model to newInterestRateModel\\n interestRateModel = newInterestRateModel;\\n\\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\\n * This may revert due to insufficient balance or insufficient allowance.\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint);\\n\\n /**\\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\\n */\\n function doTransferOut(address payable to, uint amount) internal;\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\\n */\\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\\n /* Note: we do not assert that the market is up to date */\\n MathError mathErr;\\n uint principalTimesIndex;\\n uint result;\\n\\n /* Get borrowBalance and borrowIndex */\\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\\n\\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\\n */\\n if (borrowSnapshot.principal == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n /* Calculate new borrow balance using the interest index:\\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\\n */\\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, result);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the vToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\\n uint _totalSupply = totalSupply;\\n if (_totalSupply == 0) {\\n /*\\n * If there are no tokens minted:\\n * exchangeRate = initialExchangeRate\\n */\\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\\n } else {\\n /*\\n * Otherwise:\\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\\n */\\n uint totalCash = getCashPrior();\\n uint cashPlusBorrowsMinusReserves;\\n Exp memory exchangeRate;\\n MathError mathErr;\\n\\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, exchangeRate.mantissa);\\n }\\n }\\n\\n function ensureAllowed(string memory functionSig) private view {\\n require(\\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\\n \\\"access denied\\\"\\n );\\n }\\n\\n function ensureAdmin(address caller_) private view {\\n require(caller_ == admin, \\\"Unauthorized\\\");\\n }\\n\\n function ensureNoMathError(MathError mErr) private pure {\\n require(mErr == MathError.NO_ERROR, \\\"math error\\\");\\n }\\n\\n function ensureNonZeroAddress(address address_) private pure {\\n require(address_ != address(0), \\\"zero address\\\");\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying owned by this contract\\n */\\n function getCashPrior() internal view returns (uint);\\n}\\n\",\"keccak256\":\"0xfdbcdbd6cab4aeba2c06f39adbfbd8e42a3e50d02aed628c2d76b97659d84b68\"},\"contracts/Tokens/VTokens/VTokenInterfaces.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\n\\ninterface IProtocolShareReserveV5 {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\\n}\\n\\ncontract VTokenStorageBase {\\n /**\\n * @notice Container for borrow balance information\\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\\n */\\n struct BorrowSnapshot {\\n uint principal;\\n uint interestIndex;\\n }\\n\\n /**\\n * @dev Guard variable for re-entrancy checks\\n */\\n bool internal _notEntered;\\n\\n /**\\n * @notice EIP-20 token name for this token\\n */\\n string public name;\\n\\n /**\\n * @notice EIP-20 token symbol for this token\\n */\\n string public symbol;\\n\\n /**\\n * @notice EIP-20 token decimals for this token\\n */\\n uint8 public decimals;\\n\\n /**\\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\\n */\\n\\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\\n\\n /**\\n * @notice Maximum fraction of interest that can be set aside for reserves\\n */\\n uint internal constant reserveFactorMaxMantissa = 1e18;\\n\\n /**\\n * @notice Administrator for this contract\\n */\\n address payable public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address payable public pendingAdmin;\\n\\n /**\\n * @notice Contract which oversees inter-vToken operations\\n */\\n ComptrollerInterface public comptroller;\\n\\n /**\\n * @notice Model which tells what the current interest rate should be\\n */\\n InterestRateModel public interestRateModel;\\n\\n /**\\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\\n */\\n uint internal initialExchangeRateMantissa;\\n\\n /**\\n * @notice Fraction of interest currently set aside for reserves\\n */\\n uint public reserveFactorMantissa;\\n\\n /**\\n * @notice Block number that interest was last accrued at\\n */\\n uint public accrualBlockNumber;\\n\\n /**\\n * @notice Accumulator of the total earned interest rate since the opening of the market\\n */\\n uint public borrowIndex;\\n\\n /**\\n * @notice Total amount of outstanding borrows of the underlying in this market\\n */\\n uint public totalBorrows;\\n\\n /**\\n * @notice Total amount of reserves of the underlying held in this market\\n */\\n uint public totalReserves;\\n\\n /**\\n * @notice Total number of tokens in circulation\\n */\\n uint public totalSupply;\\n\\n /**\\n * @notice Official record of token balances for each account\\n */\\n mapping(address => uint) internal accountTokens;\\n\\n /**\\n * @notice Approved token transfer amounts on behalf of others\\n */\\n mapping(address => mapping(address => uint)) internal transferAllowances;\\n\\n /**\\n * @notice Mapping of account addresses to outstanding borrow balances\\n */\\n mapping(address => BorrowSnapshot) internal accountBorrows;\\n\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n address public underlying;\\n\\n /**\\n * @notice Implementation address for this contract\\n */\\n address public implementation;\\n\\n /**\\n * @notice delta block after which reserves will be reduced\\n */\\n uint public reduceReservesBlockDelta;\\n\\n /**\\n * @notice last block number at which reserves were reduced\\n */\\n uint public reduceReservesBlockNumber;\\n\\n /**\\n * @notice address of protocol share reserve contract\\n */\\n address payable public protocolShareReserve;\\n\\n /**\\n * @notice address of accessControlManager\\n */\\n\\n address public accessControlManager;\\n}\\n\\ncontract VTokenStorage is VTokenStorageBase {\\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\\ncontract VTokenInterface is VTokenStorage {\\n /**\\n * @notice Indicator that this is a vToken contract (for inspection)\\n */\\n bool public constant isVToken = true;\\n\\n /*** Market Events ***/\\n\\n /**\\n * @notice Event emitted when interest is accrued\\n */\\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when tokens are minted\\n */\\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are minted behalf by payer to receiver\\n */\\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed\\n */\\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed and fee is transferred\\n */\\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\\n\\n /**\\n * @notice Event emitted when underlying is borrowed\\n */\\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is repaid\\n */\\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is liquidated\\n */\\n event LiquidateBorrow(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n address vTokenCollateral,\\n uint seizeTokens\\n );\\n\\n /*** Admin Events ***/\\n\\n /**\\n * @notice Event emitted when pendingAdmin is changed\\n */\\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\\n\\n /**\\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\\n */\\n event NewAdmin(address oldAdmin, address newAdmin);\\n\\n /**\\n * @notice Event emitted when comptroller is changed\\n */\\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\\n\\n /**\\n * @notice Event emitted when interestRateModel is changed\\n */\\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\\n\\n /**\\n * @notice Event emitted when the reserve factor is changed\\n */\\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\\n\\n /**\\n * @notice Event emitted when the reserves are added\\n */\\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\\n\\n /**\\n * @notice Event emitted when the reserves are reduced\\n */\\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\\n\\n /**\\n * @notice EIP20 Transfer event\\n */\\n event Transfer(address indexed from, address indexed to, uint amount);\\n\\n /**\\n * @notice EIP20 Approval event\\n */\\n event Approval(address indexed owner, address indexed spender, uint amount);\\n\\n /**\\n * @notice Event emitted when block delta for reduce reserves get updated\\n */\\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\\n\\n /**\\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\\n */\\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\\n\\n /**\\n * @notice Failure event\\n */\\n event Failure(uint error, uint info, uint detail);\\n\\n /// @notice Emitted when access control address is changed by admin\\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\\n\\n /*** User Interface ***/\\n\\n function transfer(address dst, uint amount) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint amount) external returns (bool);\\n\\n function approve(address spender, uint amount) external returns (bool);\\n\\n function balanceOfUnderlying(address owner) external returns (uint);\\n\\n function totalBorrowsCurrent() external returns (uint);\\n\\n function borrowBalanceCurrent(address account) external returns (uint);\\n\\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _acceptAdmin() external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function balanceOf(address owner) external view returns (uint);\\n\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\\n\\n function borrowRatePerBlock() external view returns (uint);\\n\\n function supplyRatePerBlock() external view returns (uint);\\n\\n function getCash() external view returns (uint);\\n\\n function exchangeRateCurrent() public returns (uint);\\n\\n function accrueInterest() public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\\n\\n function borrowBalanceStored(address account) public view returns (uint);\\n\\n function exchangeRateStored() public view returns (uint);\\n}\\n\\ncontract VBep20Interface {\\n /*** User Interface ***/\\n\\n function mint(uint mintAmount) external returns (uint);\\n\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n function redeem(uint redeemTokens) external returns (uint);\\n\\n function redeemUnderlying(uint redeemAmount) external returns (uint);\\n\\n function borrow(uint borrowAmount) external returns (uint);\\n\\n function repayBorrow(uint repayAmount) external returns (uint);\\n\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\\n\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint);\\n\\n /*** Admin Functions ***/\\n\\n function _addReserves(uint addAmount) external returns (uint);\\n}\\n\\ncontract VDelegatorInterface {\\n /**\\n * @notice Emitted when implementation is changed\\n */\\n event NewImplementation(address oldImplementation, address newImplementation);\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public;\\n}\\n\\ncontract VDelegateInterface {\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @dev Should revert if any issues arise which make it unfit for delegation\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public;\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public;\\n}\\n\",\"keccak256\":\"0x2f12533847458414b423cc85677489709d772bec4e48933ae983d6861202a41b\"},\"contracts/Utils/CarefulMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Careful Math\\n * @author Venus\\n * @notice Derived from OpenZeppelin's SafeMath library\\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\\n */\\ncontract CarefulMath {\\n /**\\n * @dev Possible error codes that we can return\\n */\\n enum MathError {\\n NO_ERROR,\\n DIVISION_BY_ZERO,\\n INTEGER_OVERFLOW,\\n INTEGER_UNDERFLOW\\n }\\n\\n /**\\n * @dev Multiplies two numbers, returns an error on overflow.\\n */\\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (a == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n uint c = a * b;\\n\\n if (c / a != b) {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n } else {\\n return (MathError.NO_ERROR, c);\\n }\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b == 0) {\\n return (MathError.DIVISION_BY_ZERO, 0);\\n }\\n\\n return (MathError.NO_ERROR, a / b);\\n }\\n\\n /**\\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b <= a) {\\n return (MathError.NO_ERROR, a - b);\\n } else {\\n return (MathError.INTEGER_UNDERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev Adds two numbers, returns an error on overflow.\\n */\\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n uint c = a + b;\\n\\n if (c >= a) {\\n return (MathError.NO_ERROR, c);\\n } else {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev add a and b and then subtract c\\n */\\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\\n (MathError err0, uint sum) = addUInt(a, b);\\n\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, 0);\\n }\\n\\n return subUInt(sum, c);\\n }\\n}\\n\",\"keccak256\":\"0x5bd84fb723641b98d0559272323b90ce42595f025af89cfb214d8c064c9ee3c3\"},\"contracts/Utils/ErrorReporter.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\ncontract ComptrollerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n COMPTROLLER_MISMATCH,\\n INSUFFICIENT_SHORTFALL,\\n INSUFFICIENT_LIQUIDITY,\\n INVALID_CLOSE_FACTOR,\\n INVALID_COLLATERAL_FACTOR,\\n INVALID_LIQUIDATION_INCENTIVE,\\n MARKET_NOT_ENTERED, // no longer possible\\n MARKET_NOT_LISTED,\\n MARKET_ALREADY_LISTED,\\n MATH_ERROR,\\n NONZERO_BORROW_BALANCE,\\n PRICE_ERROR,\\n REJECTION,\\n SNAPSHOT_ERROR,\\n TOO_MANY_ASSETS,\\n TOO_MUCH_REPAY,\\n INSUFFICIENT_BALANCE_FOR_VAI,\\n MARKET_NOT_COLLATERAL\\n }\\n\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n EXIT_MARKET_BALANCE_OWED,\\n EXIT_MARKET_REJECTION,\\n SET_CLOSE_FACTOR_OWNER_CHECK,\\n SET_CLOSE_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_NO_EXISTS,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\\n SET_IMPLEMENTATION_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_PRICE_ORACLE_OWNER_CHECK,\\n SUPPORT_MARKET_EXISTS,\\n SUPPORT_MARKET_OWNER_CHECK,\\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\\n SET_VAI_MINT_RATE_CHECK,\\n SET_VAICONTROLLER_OWNER_CHECK,\\n SET_MINTED_VAI_REJECTION,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract TokenErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n BAD_INPUT,\\n COMPTROLLER_REJECTION,\\n COMPTROLLER_CALCULATION_ERROR,\\n INTEREST_RATE_MODEL_ERROR,\\n INVALID_ACCOUNT_PAIR,\\n INVALID_CLOSE_AMOUNT_REQUESTED,\\n INVALID_COLLATERAL_FACTOR,\\n MATH_ERROR,\\n MARKET_NOT_FRESH,\\n MARKET_NOT_LISTED,\\n TOKEN_INSUFFICIENT_ALLOWANCE,\\n TOKEN_INSUFFICIENT_BALANCE,\\n TOKEN_INSUFFICIENT_CASH,\\n TOKEN_TRANSFER_IN_FAILED,\\n TOKEN_TRANSFER_OUT_FAILED,\\n TOKEN_PRICE_ERROR\\n }\\n\\n /*\\n * Note: FailureInfo (but not Error) is kept in alphabetical order\\n * This is because FailureInfo grows significantly faster, and\\n * the order of Error has some meaning, while the order of FailureInfo\\n * is entirely arbitrary.\\n */\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n BORROW_ACCRUE_INTEREST_FAILED,\\n BORROW_CASH_NOT_AVAILABLE,\\n BORROW_FRESHNESS_CHECK,\\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n BORROW_MARKET_NOT_LISTED,\\n BORROW_COMPTROLLER_REJECTION,\\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n LIQUIDATE_COMPTROLLER_REJECTION,\\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n LIQUIDATE_FRESHNESS_CHECK,\\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_ACCRUE_INTEREST_FAILED,\\n MINT_COMPTROLLER_REJECTION,\\n MINT_EXCHANGE_CALCULATION_FAILED,\\n MINT_EXCHANGE_RATE_READ_FAILED,\\n MINT_FRESHNESS_CHECK,\\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n MINT_TRANSFER_IN_FAILED,\\n MINT_TRANSFER_IN_NOT_POSSIBLE,\\n REDEEM_ACCRUE_INTEREST_FAILED,\\n REDEEM_COMPTROLLER_REJECTION,\\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_RATE_READ_FAILED,\\n REDEEM_FRESHNESS_CHECK,\\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\\n REDUCE_RESERVES_ADMIN_CHECK,\\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\\n REDUCE_RESERVES_FRESH_CHECK,\\n REDUCE_RESERVES_VALIDATION,\\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_COMPTROLLER_REJECTION,\\n REPAY_BORROW_FRESHNESS_CHECK,\\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COMPTROLLER_OWNER_CHECK,\\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_ORACLE_MARKET_NOT_LISTED,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\\n SET_RESERVE_FACTOR_ADMIN_CHECK,\\n SET_RESERVE_FACTOR_FRESH_CHECK,\\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\\n TRANSFER_COMPTROLLER_REJECTION,\\n TRANSFER_NOT_ALLOWED,\\n TRANSFER_NOT_ENOUGH,\\n TRANSFER_TOO_MUCH,\\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\\n ADD_RESERVES_FRESH_CHECK,\\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\\n REPAY_VAI_COMPTROLLER_REJECTION,\\n REPAY_VAI_FRESHNESS_CHECK,\\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract VAIControllerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED, // The sender is not authorized to perform this action.\\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\\n MATH_ERROR, // A math calculation error occurred.\\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\\n }\\n\\n enum FailureInfo {\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_COMPTROLLER_OWNER_CHECK,\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n VAI_MINT_REJECTION,\\n VAI_BURN_REJECTION,\\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n VAI_LIQUIDATE_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_FEE_CALCULATION_FAILED,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\",\"keccak256\":\"0xc77c4dd91f93f778c5048fa0e68cc0cad2fd4a308add54f0172c507858ce06c8\"},\"contracts/Utils/Exponential.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"./CarefulMath.sol\\\";\\nimport \\\"./ExponentialNoError.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Venus\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract Exponential is CarefulMath, ExponentialNoError {\\n /**\\n * @dev Creates an exponential from numerator and denominator values.\\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\\n * or if `denom` is zero.\\n */\\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\\n }\\n\\n /**\\n * @dev Adds two exponentials, returning a new exponential.\\n */\\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Subtracts two exponentials, returning a new exponential.\\n */\\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, returning a new Exp.\\n */\\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(product));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return addUInt(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Divide an Exp by a scalar, returning a new Exp.\\n */\\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, returning a new Exp.\\n */\\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\\n /*\\n We are doing this as:\\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\\n\\n How it works:\\n Exp = a / b;\\n Scalar = s;\\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\\n */\\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n return getExp(numerator, divisor.mantissa);\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\\n */\\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(fraction));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials, returning a new exponential.\\n */\\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n // We add half the scale before dividing so that we get rounding instead of truncation.\\n // See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717\\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\\n assert(err2 == MathError.NO_ERROR);\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\\n */\\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\\n }\\n\\n /**\\n * @dev Multiplies three exponentials, returning a new exponential.\\n */\\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\\n (MathError err, Exp memory ab) = mulExp(a, b);\\n if (err != MathError.NO_ERROR) {\\n return (err, ab);\\n }\\n return mulExp(ab, c);\\n }\\n\\n /**\\n * @dev Divides two exponentials, returning a new exponential.\\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\\n */\\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n return getExp(a.mantissa, b.mantissa);\\n }\\n}\\n\",\"keccak256\":\"0x92a68e9f6de3a70b103aa0ddb68faa8e60c443b1268e03853d5054171fe8e290\"},\"contracts/Utils/ExponentialNoError.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n uint internal constant expScale = 1e18;\\n uint internal constant doubleScale = 1e36;\\n uint internal constant halfExpScale = expScale / 2;\\n uint internal constant mantissaOne = expScale;\\n\\n struct Exp {\\n uint mantissa;\\n }\\n\\n struct Double {\\n uint mantissa;\\n }\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / expScale;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp <= right Exp.\\n */\\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa <= right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp > right Exp.\\n */\\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa > right.mantissa;\\n }\\n\\n /**\\n * @dev returns true if Exp is exactly zero\\n */\\n function isZeroExp(Exp memory value) internal pure returns (bool) {\\n return value.mantissa == 0;\\n }\\n\\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\\n require(n < 2 ** 224, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2 ** 32, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint a, uint b) internal pure returns (uint) {\\n return add_(a, b, \\\"addition overflow\\\");\\n }\\n\\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint a, uint b) internal pure returns (uint) {\\n return sub_(a, b, \\\"subtraction underflow\\\");\\n }\\n\\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\\n }\\n\\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / expScale;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\\n }\\n\\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Double memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / doubleScale;\\n }\\n\\n function mul_(uint a, uint b) internal pure returns (uint) {\\n return mul_(a, b, \\\"multiplication overflow\\\");\\n }\\n\\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n uint c = a * b;\\n require(c / a == b, errorMessage);\\n return c;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Exp memory b) internal pure returns (uint) {\\n return div_(mul_(a, expScale), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Double memory b) internal pure returns (uint) {\\n return div_(mul_(a, doubleScale), b.mantissa);\\n }\\n\\n function div_(uint a, uint b) internal pure returns (uint) {\\n return div_(a, b, \\\"divide by zero\\\");\\n }\\n\\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n function fraction(uint a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\\n }\\n}\\n\",\"keccak256\":\"0x237e63d9ad2bf232d70f854b8867a465913cab4d2033d295ec7736bf618ca302\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50615c2c80620000216000396000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c806370a08231116101ff578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610d37578063f851a44014610d6d578063f8f9da2814610d75578063fca7820b14610d7d576103c5565b8063e9a44fd914610cf9578063e9c714f214610d01578063f2b3abbd14610d09578063f3fdb15a14610d2f576103c5565b8063d1109c2f116100e9578063d1109c2f14610c7a578063db006a7514610c82578063dd62ed3e14610c9f578063df3a516e14610ccd576103c5565b8063b71d1a0c14610be3578063bd6d894d14610c09578063c37f68e214610c11578063c5ebeaec14610c5d576103c5565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610b95578063ae9d70b014610b9d578063b2a02ff114610ba5578063b4a0bdf314610bdb576103c5565b8063a0712d6814610b3c578063a6afed9514610b59578063a9059cbb14610b61578063aa5af0fd14610b8d576103c5565b80638f840ddd116101ce5780638f840ddd146109b857806395d89b41146109c057806395dd9193146109c857806399d8c1b4146109ee576103c5565b806370a082311461094157806373acee9814610967578063852a12e31461096f578063856e5bb31461098c576103c5565b80632608f818116102ef5780634576b5db116102825780635fe3b567116102515780635fe3b5671461090c578063601a0bf1146109145780636c540baf146109315780636f307dc314610939576103c5565b80634576b5db1461083257806347bd37181461085857806356e67728146108605780635c60da1b14610904576103c5565b80633b1d21a2116102be5780633b1d21a2146107df5780633d9ea3a1146107e75780633e941010146107ef57806342f822601461080c576103c5565b80632608f8181461074b5780632678224714610777578063313ce5671461079b5780633af9e669146107b9576103c5565b806317bfdfbc11610367578063210bc05211610336578063210bc052146106a057806323323e03146106cc57806323b872dd146106f85780632464176b1461072e576103c5565b806317bfdfbc1461051457806318160ddd1461053a578063182df0f5146105425780631a31d4651461054a576103c5565b80630e752702116103a35780630e752702146104bf578063107568df146104dc578063153ab50514610504578063173b99041461050c576103c5565b806306fdde03146103ca578063095ea7b3146104475780630e32cb8614610487575b600080fd5b6103d2610d9a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561040c5781810151838201526020016103f4565b50505050905090810190601f1680156104395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104736004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610e27565b604080519115158252519081900360200190f35b6104ad6004803603602081101561049d57600080fd5b50356001600160a01b0316610e8d565b60408051918252519081900360200190f35b6104ad600480360360208110156104d557600080fd5b5035610f0f565b610502600480360360208110156104f257600080fd5b50356001600160a01b0316610f23565b005b610502610f91565b6104ad610fe1565b6104ad6004803603602081101561052a57600080fd5b50356001600160a01b0316610fe7565b6104ad6110a7565b6104ad6110ad565b610502600480360360e081101561056057600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156105a257600080fd5b8201836020820111156105b457600080fd5b803590602001918460018302840111600160201b831117156105d557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561062757600080fd5b82018360208201111561063957600080fd5b803590602001918460018302840111600160201b8311171561065a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506110ce9050565b6104ad600480360360408110156106b657600080fd5b506001600160a01b03813516906020013561116d565b6104ad600480360360408110156106e257600080fd5b506001600160a01b03813516906020013561124e565b6104736004803603606081101561070e57600080fd5b506001600160a01b03813581169160208101359091169060400135611264565b6105026004803603602081101561074457600080fd5b50356112d7565b6104ad6004803603604081101561076157600080fd5b506001600160a01b03813516906020013561137f565b61077f61138c565b604080516001600160a01b039092168252519081900360200190f35b6107a361139b565b6040805160ff9092168252519081900360200190f35b6104ad600480360360208110156107cf57600080fd5b50356001600160a01b03166113a4565b6104ad611402565b610473611411565b6104ad6004803603602081101561080557600080fd5b5035611416565b6105026004803603602081101561082257600080fd5b50356001600160a01b0316611421565b6104ad6004803603602081101561084857600080fd5b50356001600160a01b0316611443565b6104ad611575565b6105026004803603602081101561087657600080fd5b810190602081018135600160201b81111561089057600080fd5b8201836020820111156108a257600080fd5b803590602001918460018302840111600160201b831117156108c357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061157b945050505050565b61077f6115cc565b61077f6115db565b6104ad6004803603602081101561092a57600080fd5b50356115ea565b6104ad6116d5565b61077f6116db565b6104ad6004803603602081101561095757600080fd5b50356001600160a01b03166116ea565b6104ad611705565b6104ad6004803603602081101561098557600080fd5b50356117bb565b6104ad600480360360408110156109a257600080fd5b506001600160a01b0381351690602001356117c8565b6104ad6118a2565b6103d26118a8565b6104ad600480360360208110156109de57600080fd5b50356001600160a01b0316611900565b610502600480360360c0811015610a0457600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610a3e57600080fd5b820183602082011115610a5057600080fd5b803590602001918460018302840111600160201b83111715610a7157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610ac357600080fd5b820183602082011115610ad557600080fd5b803590602001918460018302840111600160201b83111715610af657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff16915061191b9050565b6104ad60048036036020811015610b5257600080fd5b5035611ab6565b6104ad611ac2565b61047360048036036040811015610b7757600080fd5b506001600160a01b038135169060200135611e05565b6104ad611e76565b6104ad611e7c565b6104ad611e82565b6104ad60048036036060811015610bbb57600080fd5b506001600160a01b03813581169160208101359091169060400135611f21565b61077f611f92565b6104ad60048036036020811015610bf957600080fd5b50356001600160a01b0316611fa1565b6104ad612012565b610c3760048036036020811015610c2757600080fd5b50356001600160a01b03166120ce565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6104ad60048036036020811015610c7357600080fd5b5035612163565b6104ad612170565b6104ad60048036036020811015610c9857600080fd5b5035612176565b6104ad60048036036040811015610cb557600080fd5b506001600160a01b0381358116916020013516612183565b6104ad60048036036040811015610ce357600080fd5b506001600160a01b0381351690602001356121ae565b61077f612288565b6104ad612297565b6104ad60048036036020811015610d1f57600080fd5b50356001600160a01b031661238f565b61077f612408565b6104ad60048036036060811015610d4d57600080fd5b506001600160a01b03813581169160208101359160409091013516612417565b61077f61242f565b6104ad612443565b6104ad60048036036020811015610d9357600080fd5b50356124a7565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b820191906000526020600020905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610e9833612564565b610ea1826125ba565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610f1b83612604565b509392505050565b610f2c33612564565b610f35816125ba565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60035461010090046001600160a01b03163314610fdf5760405162461bcd60e51b815260040180806020018281038252602d815260200180615b17602d913960400191505060405180910390fd5b565b60085481565b6000805460ff1661102c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561103e611ac2565b14611089576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b61109282611900565b90505b6000805460ff19166001179055919050565b600d5481565b60008060006110ba6126ad565b915091506110c78261275c565b9150505b90565b6110dc86868686868661191b565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561113857600080fd5b505afa15801561114c573d6000803e3d6000fd5b505050506040513d602081101561116257600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156111c457600080fd5b505afa1580156111d8573d6000803e3d6000fd5b505050506040513d60208110156111ee57600080fd5b505161123c576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846127a9565b9392505050565b60008061125b848461284a565b50949350505050565b6000805460ff166112a9576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556112bf338686866128f5565b1490505b6000805460ff191660011790559392505050565b6000811161131c576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61133d604051806060016040528060248152602001615aa160249139612c03565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b60008061125b8484612d24565b6004546001600160a01b031681565b60035460ff1681565b60006113ae61592c565b60405180602001604052806113c1612012565b90526001600160a01b0384166000908152600e60205260408120549192509081906113ed908490612da6565b915091506113fa8261275c565b949350505050565b600061140c612dfa565b905090565b600181565b6000610f0782612e45565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061144e33612564565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561149357600080fd5b505afa1580156114a7573d6000803e3d6000fd5b505050506040513d60208110156114bd57600080fd5b5051611510576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b60035461010090046001600160a01b031633146115c95760405162461bcd60e51b815260040180806020018281038252602d815260200180615bcb602d913960400191505060405180910390fd5b50565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff1661162f576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261167690612c03565b6000611680611ac2565b905080156116a65761169e81601181111561169757fe5b6030612ed9565b915050611095565b4360145414156116b757600061169e565b6116c083612f3f565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff1661174a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561175c611ac2565b146117a7576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610f07333384613083565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561181f57600080fd5b505afa158015611833573d6000803e3d6000fd5b505050506040513d602081101561184957600080fd5b5051611897576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846130fe565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b600080600061190e8461317e565b915091506112478261275c565b61192433612564565b6009541580156119345750600a54155b61196f5760405162461bcd60e51b8152600401808060200182810382526023815260200180615a7e6023913960400191505060405180910390fd5b6007849055836119b05760405162461bcd60e51b8152600401808060200182810382526030815260200180615ac56030913960400191505060405180910390fd5b60006119bb87611443565b90508015611a10576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a55611a2986613232565b90508015611a685760405162461bcd60e51b8152600401808060200182810382526022815260200180615af56022913960400191505060405180910390fd5b8351611a7b90600190602087019061593f565b508251611a8f90600290602086019061593f565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610f1b8361337b565b600954600090439080821415611add576000925050506110cb565b6000611ae7612dfa565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b158015611b5557600080fd5b505afa158015611b69573d6000803e3d6000fd5b505050506040513d6020811015611b7f57600080fd5b5051905065048c27395000811115611bde576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611beb89896133f5565b91509150611bf88261275c565b611c0061592c565b600080600080611c1e60405180602001604052808a81525087613418565b90975094506000876003811115611c3157fe5b14611c6357611c4e60096006896003811115611c4957fe5b613480565b9e5050505050505050505050505050506110cb565b611c6d858c612da6565b90975093506000876003811115611c8057fe5b14611c9857611c4e60096001896003811115611c4957fe5b611ca2848c6134e6565b90975092506000876003811115611cb557fe5b14611ccd57611c4e60096004896003811115611c4957fe5b611ce86040518060200160405280600854815250858c61350c565b90975091506000876003811115611cfb57fe5b14611d1357611c4e60096005896003811115611c4957fe5b611d1e858a8b61350c565b90975090506000876003811115611d3157fe5b14611d4957611c4e60096003896003811115611c4957fe5b60098e9055600a819055600b839055600c829055601454611d6b908f906133f5565b9097509550611d798761275c565b6013548610611da95760148e9055818c1015611d9e57611d988c612f3f565b50611da9565b611da782612f3f565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611e4a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611e60333386866128f5565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611e9e612dfa565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611ef057600080fd5b505afa158015611f04573d6000803e3d6000fd5b505050506040513d6020811015611f1a57600080fd5b5051905090565b6000805460ff16611f66576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611f7c33858585613568565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611fac33612564565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611247565b6000805460ff16612057576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612069611ac2565b146120b4576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b6120bc6110ad565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e60205260408120548190819081908180806120f98961317e565b93509050600081600381111561210b57fe5b146121295760095b97506000965086955085945061215c9350505050565b6121316126ad565b92509050600081600381111561214357fe5b1461214f576009612113565b5060009650919450925090505b9193509193565b6000610f073333846130fe565b60135481565b6000610f073333846127a9565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561220557600080fd5b505afa158015612219573d6000803e3d6000fd5b505050506040513d602081101561222f57600080fd5b505161227d576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611247833384613083565b6015546001600160a01b031681565b6004546000906001600160a01b031633146122bf576122b860016000612ed9565b90506110cb565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b60006123cf6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612c03565b60006123d9611ac2565b905080156123ff576123f78160118111156123f057fe5b6040612ed9565b915050610f0a565b61124783613232565b6006546001600160a01b031681565b6000806124258585856137ce565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f2405361245f612dfa565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611ef057600080fd5b6000805460ff166124ec576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e7432353629000000000000602082015261253390612c03565b600061253d611ac2565b9050801561255b5761169e81601181111561255457fe5b6046612ed9565b6116c083613900565b6003546001600160a01b0382811661010090920416146115c9576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166115c9576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff1661264b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561265d611ac2565b905080156126885761267b81601181111561267457fe5b6036612ed9565b9250600091506126999050565b61269333338661397d565b92509250505b6000805460ff191660011790559092909150565b600d546000908190806126c857505060075460009150612758565b60006126d2612dfa565b905060006126de61592c565b60006126ef84600b54600c54613cd9565b93509050600081600381111561270157fe5b14612716579550600094506127589350505050565b6127208386613d17565b92509050600081600381111561273257fe5b14612747579550600094506127589350505050565b505160009550935061275892505050565b9091565b600081600381111561276a57fe5b146115c9576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff166127ee576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612800611ac2565b905080156128265761281e81601181111561281757fe5b6027612ed9565b9150506112c3565b6128338585856000613dc7565b9150506000805460ff191660011790559392505050565b60008054819060ff16612891576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556128a3611ac2565b905080156128ce576128c18160118111156128ba57fe5b601e612ed9565b9250600091506128df9050565b6128d9338686614477565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b15801561295a57600080fd5b505af115801561296e573d6000803e3d6000fd5b505050506040513d602081101561298457600080fd5b5051905080156129a35761299b6003604a83613480565b9150506113fa565b836001600160a01b0316856001600160a01b031614156129c95761299b6002604b612ed9565b60006001600160a01b0387811690871614156129e85750600019612a10565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b600080600080612a2085896133f5565b90945092506000846003811115612a3357fe5b14612a5157612a446009604b612ed9565b96505050505050506113fa565b6001600160a01b038a166000908152600e6020526040902054612a7490896133f5565b90945091506000846003811115612a8757fe5b14612a9857612a446009604c612ed9565b6001600160a01b0389166000908152600e6020526040902054612abb90896134e6565b90945090506000846003811115612ace57fe5b14612adf57612a446009604d612ed9565b6001600160a01b03808b166000908152600e6020526040808220859055918b168152208190556000198514612b37576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b0316600080516020615b448339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612bd357600080fd5b505af1158015612be7573d6000803e3d6000fd5b5060009250612bf4915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612c6c578181015183820152602001612c54565b50505050905090810190601f168015612c995780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612cb757600080fd5b505afa158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b50516115c9576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612d6b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d7d611ac2565b90508015612d9b576128c1816011811115612d9457fe5b6035612ed9565b6128d933868661397d565b6000806000612db361592c565b612dbd8686613418565b90925090506000826003811115612dd057fe5b14612de15750915060009050612df3565b6000612dec8261481a565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ef057600080fd5b6000805460ff16612e8a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612e9c611ac2565b90508015612eba5761169e816011811115612eb357fe5b604e612ed9565b612ec383614829565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612f0857fe5b836055811115612f1457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561124757fe5b600081612f505760005b9050610f0a565b4360095414612f6557612f49600a6033612ed9565b81612f6e612dfa565b1015612f8057612f49600e6032612ed9565b600c54821115612f9657612f4960026034612ed9565b600c805483900390819055601554612fb7906001600160a01b03168461490a565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b15801561301757600080fd5b505af115801561302b573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611247565b6000805460ff166130c8576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556130da611ac2565b905080156130f15761281e81601181111561281757fe5b6128338585600086613dc7565b6000805460ff16613143576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613155611ac2565b905080156131735761281e81601181111561316c57fe5b6008612ed9565b6128338585856149fd565b6001600160a01b0381166000908152601060205260408120805482918291829182916131b557506000945084935061322d92505050565b6131c58160000154600a54614d23565b909450925060008460038111156131d857fe5b146131ed57509193506000925061322d915050565b6131fb838260010154614d62565b9094509150600084600381111561320e57fe5b1461322357509193506000925061322d915050565b5060009450925050505b915091565b600080436009541461324a576123f7600a6041612ed9565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561329b57600080fd5b505afa1580156132af573d6000803e3d6000fd5b505050506040513d60208110156132c557600080fd5b5051613318576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611247565b60008054819060ff166133c2576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556133d4611ac2565b905080156133eb5761267b8160118111156128ba57fe5b6126933385614d8d565b60008083831161340c575060009050818303612df3565b50600390506000612df3565b600061342261592c565b600080613433866000015186614d23565b9092509050600082600381111561344657fe5b1461346557506040805160208101909152600081529092509050612df3565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa08460118111156134af57fe5b8460558111156134bb57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156113fa57fe5b6000808383018481106134fe57600092509050612df3565b506002915060009050612df3565b600080600061351961592c565b6135238787613418565b9092509050600082600381111561353657fe5b146135475750915060009050613560565b6135596135538261481a565b866134e6565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b1580156135d557600080fd5b505af11580156135e9573d6000803e3d6000fd5b505050506040513d60208110156135ff57600080fd5b5051905080156136165761299b6003601b83613480565b846001600160a01b0316846001600160a01b0316141561363c5761299b6006601c612ed9565b6001600160a01b0384166000908152600e60205260408120548190819061366390876133f5565b9093509150600083600381111561367657fe5b146136995761368e6009601a856003811115611c4957fe5b9450505050506113fa565b6001600160a01b0388166000908152600e60205260409020546136bc90876134e6565b909350905060008360038111156136cf57fe5b146136e75761368e60096019856003811115611c4957fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a815293519193600080516020615b44833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50600092506137c1915050565b9998505050505050505050565b60008054819060ff16613815576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613827611ac2565b905080156138525761384581601181111561383e57fe5b600f612ed9565b9250600091506138e99050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561388d57600080fd5b505af11580156138a1573d6000803e3d6000fd5b505050506040513d60208110156138b757600080fd5b5051905080156138d7576138458160118111156138d057fe5b6010612ed9565b6138e3338787876150fa565b92509250505b6000805460ff191660011790559094909350915050565b6000436009541461391757612f49600a6048612ed9565b670de0b6b3a764000082111561393357612f4960026049612ed9565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611247565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b1580156139e657600080fd5b505af11580156139fa573d6000803e3d6000fd5b505050506040513d6020811015613a1057600080fd5b505190508015613a3457613a276003603883613480565b9250600091506135609050565b4360095414613a4957613a27600a6039612ed9565b613a516159bd565b6001600160a01b0386166000908152601060205260409020600101546060820152613a7b8661317e565b6080830181905260208301826003811115613a9257fe5b6003811115613a9d57fe5b9052506000905081602001516003811115613ab457fe5b14613ade57613ad06009603783602001516003811115611c4957fe5b935060009250613560915050565b600019851415613af75760808101516040820152613aff565b604081018590525b613b0d87826040015161566f565b60e082018190526080820151613b22916133f5565b60a0830181905260208301826003811115613b3957fe5b6003811115613b4457fe5b8152505050613b56816020015161275c565b613b66600b548260e001516133f5565b60c0830181905260208301826003811115613b7d57fe5b6003811115613b8857fe5b8152505050613b9a816020015161275c565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613ca557600080fd5b505af1158015613cb9573d6000803e3d6000fd5b5060009250613cc6915050565b8160e00151935093505050935093915050565b600080600080613ce987876134e6565b90925090506000826003811115613cfc57fe5b14613d0d5750915060009050613560565b61355981866133f5565b6000613d2161592c565b600080613d3686670de0b6b3a7640000614d23565b90925090506000826003811115613d4957fe5b14613d6857506040805160208101909152600081529092509050612df3565b600080613d758388614d62565b90925090506000826003811115613d8857fe5b14613daa57506040805160208101909152600081529094509250612df3915050565b604080516020810190915290815260009890975095505050505050565b6000821580613dd4575081155b613e0f5760405162461bcd60e51b8152600401808060200182810382526034815260200180615b976034913960400191505060405180910390fd5b613e17615a03565b613e1f6126ad565b6020830181905282826003811115613e3357fe5b6003811115613e3e57fe5b905250508051613e4d9061275c565b8315613ea857604080820185905280516020808201909252908201518152613e759085612da6565b6060830181905282826003811115613e8957fe5b6003811115613e9457fe5b905250508051613ea39061275c565b613efa565b613ec483604051806020016040528084602001518152506158bb565b6040830181905282826003811115613ed857fe5b6003811115613ee357fe5b905250508051613ef29061275c565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613f5d57600080fd5b505af1158015613f71573d6000803e3d6000fd5b505050506040513d6020811015613f8757600080fd5b505190508015613fcb576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b436009541461400e576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b61401e600d5483604001516133f5565b608084018190528382600381111561403257fe5b600381111561403d57fe5b90525050815161404c9061275c565b6001600160a01b0387166000908152600e602052604090819020549083015161407591906133f5565b60a084018190528382600381111561408957fe5b600381111561409457fe5b9052505081516140a39061275c565b81606001516140b0612dfa565b10156140f0576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b15801561415957600080fd5b505afa15801561416d573d6000803e3d6000fd5b505050506040513d602081101561418357600080fd5b50511561436f57606084015160055460408051629df3ab60e31b8152905161420693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b1580156141d557600080fd5b505afa1580156141e9573d6000803e3d6000fd5b505050506040513d60208110156141ff57600080fd5b5051614d23565b9250828582600381111561421657fe5b600381111561422157fe5b9052505083516142309061275c565b61424282670de0b6b3a7640000614d62565b9250828582600381111561425257fe5b600381111561425d57fe5b90525050835161426c9061275c565b61427a8460600151836133f5565b9150818582600381111561428a57fe5b600381111561429557fe5b9052505083516142a49061275c565b6005546040805163c5f956af60e01b8152905161431c926001600160a01b03169163c5f956af916004808301926020929190829003018186803b1580156142ea57600080fd5b505afa1580156142fe573d6000803e3d6000fd5b505050506040513d602081101561431457600080fd5b50518361490a565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614376565b5060608301515b614380888261490a565b6040808501518151908152905130916001600160a01b038c1691600080516020615b448339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b1580156137a057600080fd5b600080614483846125ba565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b1580156144e257600080fd5b505af11580156144f6573d6000803e3d6000fd5b505050506040513d602081101561450c57600080fd5b50519050801561452357613a276003601f83613480565b436009541461453857613a27600a6022612ed9565b614540615a03565b6145486126ad565b602083018190528282600381111561455c57fe5b600381111561456757fe5b905250600090508151600381111561457b57fe5b1461459757613ad06009602183600001516003811115611c4957fe5b6145a1878661566f565b60a082018190526040805160208082019092529083015181526145c491906158bb565b60408301819052828260038111156145d857fe5b60038111156145e357fe5b9052505080516145f29061275c565b614602600d5482604001516134e6565b606083018190528282600381111561461657fe5b600381111561462157fe5b9052505080516146309061275c565b6001600160a01b0386166000908152600e602052604090819020549082015161465991906134e6565b608083018190528282600381111561466d57fe5b600381111561467857fe5b9052505080516146879061275c565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156147e657600080fd5b505af11580156147fa573d6000803e3d6000fd5b5060009250614807915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b600080600080436009541461484f57614844600a604f612ed9565b9350915061322d9050565b614859338661566f565b905080600c54019150600c548210156148b9576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b15801561495f57600080fd5b505af1158015614973573d6000803e3d6000fd5b5050505060003d6000811461498f576020811461499957600080fd5b60001991506149a5565b60206000803e60005191505b50806149f8576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b158015614a5a57600080fd5b505af1158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b505190508015614ac8576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414614b0b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b82614b14612dfa565b1015614b54576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b614b5c615a3a565b614b658661317e565b6020830181905282826003811115614b7957fe5b6003811115614b8457fe5b905250508051614b939061275c565b614ba18160200151856134e6565b6040830181905282826003811115614bb557fe5b6003811115614bc057fe5b905250508051614bcf9061275c565b614bdb600b54856134e6565b6060830181905282826003811115614bef57fe5b6003811115614bfa57fe5b905250508051614c099061275c565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614c45858561490a565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614cf857600080fd5b505af1158015614d0c573d6000803e3d6000fd5b5060009250614d19915050565b9695505050505050565b60008083614d3657506000905080612df3565b83830283858281614d4357fe5b0414614d5757506002915060009050612df3565b600092509050612df3565b60008082614d765750600190506000612df3565b6000838581614d8157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614dee57600080fd5b505af1158015614e02573d6000803e3d6000fd5b505050506040513d6020811015614e1857600080fd5b505190508015614e3c57614e2f6003601f83613480565b925060009150612df39050565b4360095414614e5157614e2f600a6022612ed9565b614e59615a03565b614e616126ad565b6020830181905282826003811115614e7557fe5b6003811115614e8057fe5b9052506000905081516003811115614e9457fe5b14614ebe57614eb06009602183600001516003811115611c4957fe5b935060009250612df3915050565b614ec8868661566f565b60a08201819052604080516020808201909252908301518152614eeb91906158bb565b6040830181905282826003811115614eff57fe5b6003811115614f0a57fe5b905250508051614f199061275c565b614f29600d5482604001516134e6565b6060830181905282826003811115614f3d57fe5b6003811115614f4857fe5b905250508051614f579061275c565b6001600160a01b0386166000908152600e6020526040908190205490820151614f8091906134e6565b6080830181905282826003811115614f9457fe5b6003811115614f9f57fe5b905250508051614fae9061275c565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156150c757600080fd5b505af11580156150db573d6000803e3d6000fd5b50600092506150e8915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561516b57600080fd5b505af115801561517f573d6000803e3d6000fd5b505050506040513d602081101561519557600080fd5b5051905080156151b9576151ac6003601283613480565b9250600091506156669050565b43600954146151ce576151ac600a6016612ed9565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561520857600080fd5b505afa15801561521c573d6000803e3d6000fd5b505050506040513d602081101561523257600080fd5b505114615245576151ac600a6011612ed9565b866001600160a01b0316866001600160a01b0316141561526b576151ac60066017612ed9565b8461527c576151ac60076015612ed9565b600019851415615292576151ac60076014612ed9565b6000806152a089898961397d565b909250905081156152d0576152c18260118111156152ba57fe5b6018612ed9565b94506000935061566692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b15801561532a57600080fd5b505afa15801561533e573d6000803e3d6000fd5b505050506040513d604081101561535457600080fd5b5080516020909101519092509050811561539f5760405162461bcd60e51b8152600401808060200182810382526033815260200180615b646033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156153f657600080fd5b505afa15801561540a573d6000803e3d6000fd5b505050506040513d602081101561542057600080fd5b50511015615475576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561549b57615494308d8d85613568565b9050615525565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b1580156154f657600080fd5b505af115801561550a573d6000803e3d6000fd5b505050506040513d602081101561552057600080fd5b505190505b801561556f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b15801561563a57600080fd5b505af115801561564e573d6000803e3d6000fd5b506000925061565b915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156156bf57600080fd5b505afa1580156156d3573d6000803e3d6000fd5b505050506040513d60208110156156e957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b15801561574857600080fd5b505af115801561575c573d6000803e3d6000fd5b5050505060003d60008114615778576020811461578257600080fd5b600019915061578e565b60206000803e60005191505b50806157e1576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b50519050828110156158af576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006158c861592c565b612dbd868660006158d761592c565b6000806158ec670de0b6b3a764000087614d23565b909250905060008260038111156158ff57fe5b1461591e57506040805160208101909152600081529092509050612df3565b612dec818660000151613d17565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061598057805160ff19168380011785556159ad565b828001600101855582156159ad579182015b828111156159ad578251825591602001919060010190615992565b506159b9929150615a63565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b6110cb91905b808211156159b95760008155600101615a6956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65646f6e6c79207468652061646d696e206d61792063616c6c205f72657369676e496d706c656d656e746174696f6eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f6f6e6c79207468652061646d696e206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6ea265627a7a72315820fa968cc120708f689ee6bd2e25d49520eb6ca4ab02d799bbec6d472e145c408864736f6c63430005100032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103c55760003560e01c806370a08231116101ff578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610d37578063f851a44014610d6d578063f8f9da2814610d75578063fca7820b14610d7d576103c5565b8063e9a44fd914610cf9578063e9c714f214610d01578063f2b3abbd14610d09578063f3fdb15a14610d2f576103c5565b8063d1109c2f116100e9578063d1109c2f14610c7a578063db006a7514610c82578063dd62ed3e14610c9f578063df3a516e14610ccd576103c5565b8063b71d1a0c14610be3578063bd6d894d14610c09578063c37f68e214610c11578063c5ebeaec14610c5d576103c5565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610b95578063ae9d70b014610b9d578063b2a02ff114610ba5578063b4a0bdf314610bdb576103c5565b8063a0712d6814610b3c578063a6afed9514610b59578063a9059cbb14610b61578063aa5af0fd14610b8d576103c5565b80638f840ddd116101ce5780638f840ddd146109b857806395d89b41146109c057806395dd9193146109c857806399d8c1b4146109ee576103c5565b806370a082311461094157806373acee9814610967578063852a12e31461096f578063856e5bb31461098c576103c5565b80632608f818116102ef5780634576b5db116102825780635fe3b567116102515780635fe3b5671461090c578063601a0bf1146109145780636c540baf146109315780636f307dc314610939576103c5565b80634576b5db1461083257806347bd37181461085857806356e67728146108605780635c60da1b14610904576103c5565b80633b1d21a2116102be5780633b1d21a2146107df5780633d9ea3a1146107e75780633e941010146107ef57806342f822601461080c576103c5565b80632608f8181461074b5780632678224714610777578063313ce5671461079b5780633af9e669146107b9576103c5565b806317bfdfbc11610367578063210bc05211610336578063210bc052146106a057806323323e03146106cc57806323b872dd146106f85780632464176b1461072e576103c5565b806317bfdfbc1461051457806318160ddd1461053a578063182df0f5146105425780631a31d4651461054a576103c5565b80630e752702116103a35780630e752702146104bf578063107568df146104dc578063153ab50514610504578063173b99041461050c576103c5565b806306fdde03146103ca578063095ea7b3146104475780630e32cb8614610487575b600080fd5b6103d2610d9a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561040c5781810151838201526020016103f4565b50505050905090810190601f1680156104395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104736004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610e27565b604080519115158252519081900360200190f35b6104ad6004803603602081101561049d57600080fd5b50356001600160a01b0316610e8d565b60408051918252519081900360200190f35b6104ad600480360360208110156104d557600080fd5b5035610f0f565b610502600480360360208110156104f257600080fd5b50356001600160a01b0316610f23565b005b610502610f91565b6104ad610fe1565b6104ad6004803603602081101561052a57600080fd5b50356001600160a01b0316610fe7565b6104ad6110a7565b6104ad6110ad565b610502600480360360e081101561056057600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156105a257600080fd5b8201836020820111156105b457600080fd5b803590602001918460018302840111600160201b831117156105d557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561062757600080fd5b82018360208201111561063957600080fd5b803590602001918460018302840111600160201b8311171561065a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506110ce9050565b6104ad600480360360408110156106b657600080fd5b506001600160a01b03813516906020013561116d565b6104ad600480360360408110156106e257600080fd5b506001600160a01b03813516906020013561124e565b6104736004803603606081101561070e57600080fd5b506001600160a01b03813581169160208101359091169060400135611264565b6105026004803603602081101561074457600080fd5b50356112d7565b6104ad6004803603604081101561076157600080fd5b506001600160a01b03813516906020013561137f565b61077f61138c565b604080516001600160a01b039092168252519081900360200190f35b6107a361139b565b6040805160ff9092168252519081900360200190f35b6104ad600480360360208110156107cf57600080fd5b50356001600160a01b03166113a4565b6104ad611402565b610473611411565b6104ad6004803603602081101561080557600080fd5b5035611416565b6105026004803603602081101561082257600080fd5b50356001600160a01b0316611421565b6104ad6004803603602081101561084857600080fd5b50356001600160a01b0316611443565b6104ad611575565b6105026004803603602081101561087657600080fd5b810190602081018135600160201b81111561089057600080fd5b8201836020820111156108a257600080fd5b803590602001918460018302840111600160201b831117156108c357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061157b945050505050565b61077f6115cc565b61077f6115db565b6104ad6004803603602081101561092a57600080fd5b50356115ea565b6104ad6116d5565b61077f6116db565b6104ad6004803603602081101561095757600080fd5b50356001600160a01b03166116ea565b6104ad611705565b6104ad6004803603602081101561098557600080fd5b50356117bb565b6104ad600480360360408110156109a257600080fd5b506001600160a01b0381351690602001356117c8565b6104ad6118a2565b6103d26118a8565b6104ad600480360360208110156109de57600080fd5b50356001600160a01b0316611900565b610502600480360360c0811015610a0457600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610a3e57600080fd5b820183602082011115610a5057600080fd5b803590602001918460018302840111600160201b83111715610a7157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610ac357600080fd5b820183602082011115610ad557600080fd5b803590602001918460018302840111600160201b83111715610af657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff16915061191b9050565b6104ad60048036036020811015610b5257600080fd5b5035611ab6565b6104ad611ac2565b61047360048036036040811015610b7757600080fd5b506001600160a01b038135169060200135611e05565b6104ad611e76565b6104ad611e7c565b6104ad611e82565b6104ad60048036036060811015610bbb57600080fd5b506001600160a01b03813581169160208101359091169060400135611f21565b61077f611f92565b6104ad60048036036020811015610bf957600080fd5b50356001600160a01b0316611fa1565b6104ad612012565b610c3760048036036020811015610c2757600080fd5b50356001600160a01b03166120ce565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6104ad60048036036020811015610c7357600080fd5b5035612163565b6104ad612170565b6104ad60048036036020811015610c9857600080fd5b5035612176565b6104ad60048036036040811015610cb557600080fd5b506001600160a01b0381358116916020013516612183565b6104ad60048036036040811015610ce357600080fd5b506001600160a01b0381351690602001356121ae565b61077f612288565b6104ad612297565b6104ad60048036036020811015610d1f57600080fd5b50356001600160a01b031661238f565b61077f612408565b6104ad60048036036060811015610d4d57600080fd5b506001600160a01b03813581169160208101359160409091013516612417565b61077f61242f565b6104ad612443565b6104ad60048036036020811015610d9357600080fd5b50356124a7565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b820191906000526020600020905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610e9833612564565b610ea1826125ba565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610f1b83612604565b509392505050565b610f2c33612564565b610f35816125ba565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60035461010090046001600160a01b03163314610fdf5760405162461bcd60e51b815260040180806020018281038252602d815260200180615b17602d913960400191505060405180910390fd5b565b60085481565b6000805460ff1661102c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561103e611ac2565b14611089576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b61109282611900565b90505b6000805460ff19166001179055919050565b600d5481565b60008060006110ba6126ad565b915091506110c78261275c565b9150505b90565b6110dc86868686868661191b565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561113857600080fd5b505afa15801561114c573d6000803e3d6000fd5b505050506040513d602081101561116257600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156111c457600080fd5b505afa1580156111d8573d6000803e3d6000fd5b505050506040513d60208110156111ee57600080fd5b505161123c576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846127a9565b9392505050565b60008061125b848461284a565b50949350505050565b6000805460ff166112a9576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556112bf338686866128f5565b1490505b6000805460ff191660011790559392505050565b6000811161131c576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61133d604051806060016040528060248152602001615aa160249139612c03565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b60008061125b8484612d24565b6004546001600160a01b031681565b60035460ff1681565b60006113ae61592c565b60405180602001604052806113c1612012565b90526001600160a01b0384166000908152600e60205260408120549192509081906113ed908490612da6565b915091506113fa8261275c565b949350505050565b600061140c612dfa565b905090565b600181565b6000610f0782612e45565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061144e33612564565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561149357600080fd5b505afa1580156114a7573d6000803e3d6000fd5b505050506040513d60208110156114bd57600080fd5b5051611510576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b60035461010090046001600160a01b031633146115c95760405162461bcd60e51b815260040180806020018281038252602d815260200180615bcb602d913960400191505060405180910390fd5b50565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff1661162f576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261167690612c03565b6000611680611ac2565b905080156116a65761169e81601181111561169757fe5b6030612ed9565b915050611095565b4360145414156116b757600061169e565b6116c083612f3f565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff1661174a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561175c611ac2565b146117a7576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610f07333384613083565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561181f57600080fd5b505afa158015611833573d6000803e3d6000fd5b505050506040513d602081101561184957600080fd5b5051611897576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846130fe565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b600080600061190e8461317e565b915091506112478261275c565b61192433612564565b6009541580156119345750600a54155b61196f5760405162461bcd60e51b8152600401808060200182810382526023815260200180615a7e6023913960400191505060405180910390fd5b6007849055836119b05760405162461bcd60e51b8152600401808060200182810382526030815260200180615ac56030913960400191505060405180910390fd5b60006119bb87611443565b90508015611a10576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a55611a2986613232565b90508015611a685760405162461bcd60e51b8152600401808060200182810382526022815260200180615af56022913960400191505060405180910390fd5b8351611a7b90600190602087019061593f565b508251611a8f90600290602086019061593f565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610f1b8361337b565b600954600090439080821415611add576000925050506110cb565b6000611ae7612dfa565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b158015611b5557600080fd5b505afa158015611b69573d6000803e3d6000fd5b505050506040513d6020811015611b7f57600080fd5b5051905065048c27395000811115611bde576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611beb89896133f5565b91509150611bf88261275c565b611c0061592c565b600080600080611c1e60405180602001604052808a81525087613418565b90975094506000876003811115611c3157fe5b14611c6357611c4e60096006896003811115611c4957fe5b613480565b9e5050505050505050505050505050506110cb565b611c6d858c612da6565b90975093506000876003811115611c8057fe5b14611c9857611c4e60096001896003811115611c4957fe5b611ca2848c6134e6565b90975092506000876003811115611cb557fe5b14611ccd57611c4e60096004896003811115611c4957fe5b611ce86040518060200160405280600854815250858c61350c565b90975091506000876003811115611cfb57fe5b14611d1357611c4e60096005896003811115611c4957fe5b611d1e858a8b61350c565b90975090506000876003811115611d3157fe5b14611d4957611c4e60096003896003811115611c4957fe5b60098e9055600a819055600b839055600c829055601454611d6b908f906133f5565b9097509550611d798761275c565b6013548610611da95760148e9055818c1015611d9e57611d988c612f3f565b50611da9565b611da782612f3f565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611e4a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611e60333386866128f5565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611e9e612dfa565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611ef057600080fd5b505afa158015611f04573d6000803e3d6000fd5b505050506040513d6020811015611f1a57600080fd5b5051905090565b6000805460ff16611f66576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611f7c33858585613568565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611fac33612564565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611247565b6000805460ff16612057576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612069611ac2565b146120b4576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b6120bc6110ad565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e60205260408120548190819081908180806120f98961317e565b93509050600081600381111561210b57fe5b146121295760095b97506000965086955085945061215c9350505050565b6121316126ad565b92509050600081600381111561214357fe5b1461214f576009612113565b5060009650919450925090505b9193509193565b6000610f073333846130fe565b60135481565b6000610f073333846127a9565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561220557600080fd5b505afa158015612219573d6000803e3d6000fd5b505050506040513d602081101561222f57600080fd5b505161227d576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611247833384613083565b6015546001600160a01b031681565b6004546000906001600160a01b031633146122bf576122b860016000612ed9565b90506110cb565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b60006123cf6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612c03565b60006123d9611ac2565b905080156123ff576123f78160118111156123f057fe5b6040612ed9565b915050610f0a565b61124783613232565b6006546001600160a01b031681565b6000806124258585856137ce565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f2405361245f612dfa565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611ef057600080fd5b6000805460ff166124ec576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e7432353629000000000000602082015261253390612c03565b600061253d611ac2565b9050801561255b5761169e81601181111561255457fe5b6046612ed9565b6116c083613900565b6003546001600160a01b0382811661010090920416146115c9576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166115c9576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff1661264b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561265d611ac2565b905080156126885761267b81601181111561267457fe5b6036612ed9565b9250600091506126999050565b61269333338661397d565b92509250505b6000805460ff191660011790559092909150565b600d546000908190806126c857505060075460009150612758565b60006126d2612dfa565b905060006126de61592c565b60006126ef84600b54600c54613cd9565b93509050600081600381111561270157fe5b14612716579550600094506127589350505050565b6127208386613d17565b92509050600081600381111561273257fe5b14612747579550600094506127589350505050565b505160009550935061275892505050565b9091565b600081600381111561276a57fe5b146115c9576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff166127ee576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612800611ac2565b905080156128265761281e81601181111561281757fe5b6027612ed9565b9150506112c3565b6128338585856000613dc7565b9150506000805460ff191660011790559392505050565b60008054819060ff16612891576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556128a3611ac2565b905080156128ce576128c18160118111156128ba57fe5b601e612ed9565b9250600091506128df9050565b6128d9338686614477565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b15801561295a57600080fd5b505af115801561296e573d6000803e3d6000fd5b505050506040513d602081101561298457600080fd5b5051905080156129a35761299b6003604a83613480565b9150506113fa565b836001600160a01b0316856001600160a01b031614156129c95761299b6002604b612ed9565b60006001600160a01b0387811690871614156129e85750600019612a10565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b600080600080612a2085896133f5565b90945092506000846003811115612a3357fe5b14612a5157612a446009604b612ed9565b96505050505050506113fa565b6001600160a01b038a166000908152600e6020526040902054612a7490896133f5565b90945091506000846003811115612a8757fe5b14612a9857612a446009604c612ed9565b6001600160a01b0389166000908152600e6020526040902054612abb90896134e6565b90945090506000846003811115612ace57fe5b14612adf57612a446009604d612ed9565b6001600160a01b03808b166000908152600e6020526040808220859055918b168152208190556000198514612b37576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b0316600080516020615b448339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612bd357600080fd5b505af1158015612be7573d6000803e3d6000fd5b5060009250612bf4915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612c6c578181015183820152602001612c54565b50505050905090810190601f168015612c995780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612cb757600080fd5b505afa158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b50516115c9576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612d6b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d7d611ac2565b90508015612d9b576128c1816011811115612d9457fe5b6035612ed9565b6128d933868661397d565b6000806000612db361592c565b612dbd8686613418565b90925090506000826003811115612dd057fe5b14612de15750915060009050612df3565b6000612dec8261481a565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ef057600080fd5b6000805460ff16612e8a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612e9c611ac2565b90508015612eba5761169e816011811115612eb357fe5b604e612ed9565b612ec383614829565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612f0857fe5b836055811115612f1457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561124757fe5b600081612f505760005b9050610f0a565b4360095414612f6557612f49600a6033612ed9565b81612f6e612dfa565b1015612f8057612f49600e6032612ed9565b600c54821115612f9657612f4960026034612ed9565b600c805483900390819055601554612fb7906001600160a01b03168461490a565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b15801561301757600080fd5b505af115801561302b573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611247565b6000805460ff166130c8576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556130da611ac2565b905080156130f15761281e81601181111561281757fe5b6128338585600086613dc7565b6000805460ff16613143576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613155611ac2565b905080156131735761281e81601181111561316c57fe5b6008612ed9565b6128338585856149fd565b6001600160a01b0381166000908152601060205260408120805482918291829182916131b557506000945084935061322d92505050565b6131c58160000154600a54614d23565b909450925060008460038111156131d857fe5b146131ed57509193506000925061322d915050565b6131fb838260010154614d62565b9094509150600084600381111561320e57fe5b1461322357509193506000925061322d915050565b5060009450925050505b915091565b600080436009541461324a576123f7600a6041612ed9565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561329b57600080fd5b505afa1580156132af573d6000803e3d6000fd5b505050506040513d60208110156132c557600080fd5b5051613318576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611247565b60008054819060ff166133c2576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556133d4611ac2565b905080156133eb5761267b8160118111156128ba57fe5b6126933385614d8d565b60008083831161340c575060009050818303612df3565b50600390506000612df3565b600061342261592c565b600080613433866000015186614d23565b9092509050600082600381111561344657fe5b1461346557506040805160208101909152600081529092509050612df3565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa08460118111156134af57fe5b8460558111156134bb57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156113fa57fe5b6000808383018481106134fe57600092509050612df3565b506002915060009050612df3565b600080600061351961592c565b6135238787613418565b9092509050600082600381111561353657fe5b146135475750915060009050613560565b6135596135538261481a565b866134e6565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b1580156135d557600080fd5b505af11580156135e9573d6000803e3d6000fd5b505050506040513d60208110156135ff57600080fd5b5051905080156136165761299b6003601b83613480565b846001600160a01b0316846001600160a01b0316141561363c5761299b6006601c612ed9565b6001600160a01b0384166000908152600e60205260408120548190819061366390876133f5565b9093509150600083600381111561367657fe5b146136995761368e6009601a856003811115611c4957fe5b9450505050506113fa565b6001600160a01b0388166000908152600e60205260409020546136bc90876134e6565b909350905060008360038111156136cf57fe5b146136e75761368e60096019856003811115611c4957fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a815293519193600080516020615b44833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50600092506137c1915050565b9998505050505050505050565b60008054819060ff16613815576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613827611ac2565b905080156138525761384581601181111561383e57fe5b600f612ed9565b9250600091506138e99050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561388d57600080fd5b505af11580156138a1573d6000803e3d6000fd5b505050506040513d60208110156138b757600080fd5b5051905080156138d7576138458160118111156138d057fe5b6010612ed9565b6138e3338787876150fa565b92509250505b6000805460ff191660011790559094909350915050565b6000436009541461391757612f49600a6048612ed9565b670de0b6b3a764000082111561393357612f4960026049612ed9565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611247565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b1580156139e657600080fd5b505af11580156139fa573d6000803e3d6000fd5b505050506040513d6020811015613a1057600080fd5b505190508015613a3457613a276003603883613480565b9250600091506135609050565b4360095414613a4957613a27600a6039612ed9565b613a516159bd565b6001600160a01b0386166000908152601060205260409020600101546060820152613a7b8661317e565b6080830181905260208301826003811115613a9257fe5b6003811115613a9d57fe5b9052506000905081602001516003811115613ab457fe5b14613ade57613ad06009603783602001516003811115611c4957fe5b935060009250613560915050565b600019851415613af75760808101516040820152613aff565b604081018590525b613b0d87826040015161566f565b60e082018190526080820151613b22916133f5565b60a0830181905260208301826003811115613b3957fe5b6003811115613b4457fe5b8152505050613b56816020015161275c565b613b66600b548260e001516133f5565b60c0830181905260208301826003811115613b7d57fe5b6003811115613b8857fe5b8152505050613b9a816020015161275c565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613ca557600080fd5b505af1158015613cb9573d6000803e3d6000fd5b5060009250613cc6915050565b8160e00151935093505050935093915050565b600080600080613ce987876134e6565b90925090506000826003811115613cfc57fe5b14613d0d5750915060009050613560565b61355981866133f5565b6000613d2161592c565b600080613d3686670de0b6b3a7640000614d23565b90925090506000826003811115613d4957fe5b14613d6857506040805160208101909152600081529092509050612df3565b600080613d758388614d62565b90925090506000826003811115613d8857fe5b14613daa57506040805160208101909152600081529094509250612df3915050565b604080516020810190915290815260009890975095505050505050565b6000821580613dd4575081155b613e0f5760405162461bcd60e51b8152600401808060200182810382526034815260200180615b976034913960400191505060405180910390fd5b613e17615a03565b613e1f6126ad565b6020830181905282826003811115613e3357fe5b6003811115613e3e57fe5b905250508051613e4d9061275c565b8315613ea857604080820185905280516020808201909252908201518152613e759085612da6565b6060830181905282826003811115613e8957fe5b6003811115613e9457fe5b905250508051613ea39061275c565b613efa565b613ec483604051806020016040528084602001518152506158bb565b6040830181905282826003811115613ed857fe5b6003811115613ee357fe5b905250508051613ef29061275c565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613f5d57600080fd5b505af1158015613f71573d6000803e3d6000fd5b505050506040513d6020811015613f8757600080fd5b505190508015613fcb576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b436009541461400e576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b61401e600d5483604001516133f5565b608084018190528382600381111561403257fe5b600381111561403d57fe5b90525050815161404c9061275c565b6001600160a01b0387166000908152600e602052604090819020549083015161407591906133f5565b60a084018190528382600381111561408957fe5b600381111561409457fe5b9052505081516140a39061275c565b81606001516140b0612dfa565b10156140f0576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b15801561415957600080fd5b505afa15801561416d573d6000803e3d6000fd5b505050506040513d602081101561418357600080fd5b50511561436f57606084015160055460408051629df3ab60e31b8152905161420693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b1580156141d557600080fd5b505afa1580156141e9573d6000803e3d6000fd5b505050506040513d60208110156141ff57600080fd5b5051614d23565b9250828582600381111561421657fe5b600381111561422157fe5b9052505083516142309061275c565b61424282670de0b6b3a7640000614d62565b9250828582600381111561425257fe5b600381111561425d57fe5b90525050835161426c9061275c565b61427a8460600151836133f5565b9150818582600381111561428a57fe5b600381111561429557fe5b9052505083516142a49061275c565b6005546040805163c5f956af60e01b8152905161431c926001600160a01b03169163c5f956af916004808301926020929190829003018186803b1580156142ea57600080fd5b505afa1580156142fe573d6000803e3d6000fd5b505050506040513d602081101561431457600080fd5b50518361490a565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614376565b5060608301515b614380888261490a565b6040808501518151908152905130916001600160a01b038c1691600080516020615b448339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b1580156137a057600080fd5b600080614483846125ba565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b1580156144e257600080fd5b505af11580156144f6573d6000803e3d6000fd5b505050506040513d602081101561450c57600080fd5b50519050801561452357613a276003601f83613480565b436009541461453857613a27600a6022612ed9565b614540615a03565b6145486126ad565b602083018190528282600381111561455c57fe5b600381111561456757fe5b905250600090508151600381111561457b57fe5b1461459757613ad06009602183600001516003811115611c4957fe5b6145a1878661566f565b60a082018190526040805160208082019092529083015181526145c491906158bb565b60408301819052828260038111156145d857fe5b60038111156145e357fe5b9052505080516145f29061275c565b614602600d5482604001516134e6565b606083018190528282600381111561461657fe5b600381111561462157fe5b9052505080516146309061275c565b6001600160a01b0386166000908152600e602052604090819020549082015161465991906134e6565b608083018190528282600381111561466d57fe5b600381111561467857fe5b9052505080516146879061275c565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156147e657600080fd5b505af11580156147fa573d6000803e3d6000fd5b5060009250614807915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b600080600080436009541461484f57614844600a604f612ed9565b9350915061322d9050565b614859338661566f565b905080600c54019150600c548210156148b9576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b15801561495f57600080fd5b505af1158015614973573d6000803e3d6000fd5b5050505060003d6000811461498f576020811461499957600080fd5b60001991506149a5565b60206000803e60005191505b50806149f8576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b158015614a5a57600080fd5b505af1158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b505190508015614ac8576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414614b0b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b82614b14612dfa565b1015614b54576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b614b5c615a3a565b614b658661317e565b6020830181905282826003811115614b7957fe5b6003811115614b8457fe5b905250508051614b939061275c565b614ba18160200151856134e6565b6040830181905282826003811115614bb557fe5b6003811115614bc057fe5b905250508051614bcf9061275c565b614bdb600b54856134e6565b6060830181905282826003811115614bef57fe5b6003811115614bfa57fe5b905250508051614c099061275c565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614c45858561490a565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614cf857600080fd5b505af1158015614d0c573d6000803e3d6000fd5b5060009250614d19915050565b9695505050505050565b60008083614d3657506000905080612df3565b83830283858281614d4357fe5b0414614d5757506002915060009050612df3565b600092509050612df3565b60008082614d765750600190506000612df3565b6000838581614d8157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614dee57600080fd5b505af1158015614e02573d6000803e3d6000fd5b505050506040513d6020811015614e1857600080fd5b505190508015614e3c57614e2f6003601f83613480565b925060009150612df39050565b4360095414614e5157614e2f600a6022612ed9565b614e59615a03565b614e616126ad565b6020830181905282826003811115614e7557fe5b6003811115614e8057fe5b9052506000905081516003811115614e9457fe5b14614ebe57614eb06009602183600001516003811115611c4957fe5b935060009250612df3915050565b614ec8868661566f565b60a08201819052604080516020808201909252908301518152614eeb91906158bb565b6040830181905282826003811115614eff57fe5b6003811115614f0a57fe5b905250508051614f199061275c565b614f29600d5482604001516134e6565b6060830181905282826003811115614f3d57fe5b6003811115614f4857fe5b905250508051614f579061275c565b6001600160a01b0386166000908152600e6020526040908190205490820151614f8091906134e6565b6080830181905282826003811115614f9457fe5b6003811115614f9f57fe5b905250508051614fae9061275c565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156150c757600080fd5b505af11580156150db573d6000803e3d6000fd5b50600092506150e8915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561516b57600080fd5b505af115801561517f573d6000803e3d6000fd5b505050506040513d602081101561519557600080fd5b5051905080156151b9576151ac6003601283613480565b9250600091506156669050565b43600954146151ce576151ac600a6016612ed9565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561520857600080fd5b505afa15801561521c573d6000803e3d6000fd5b505050506040513d602081101561523257600080fd5b505114615245576151ac600a6011612ed9565b866001600160a01b0316866001600160a01b0316141561526b576151ac60066017612ed9565b8461527c576151ac60076015612ed9565b600019851415615292576151ac60076014612ed9565b6000806152a089898961397d565b909250905081156152d0576152c18260118111156152ba57fe5b6018612ed9565b94506000935061566692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b15801561532a57600080fd5b505afa15801561533e573d6000803e3d6000fd5b505050506040513d604081101561535457600080fd5b5080516020909101519092509050811561539f5760405162461bcd60e51b8152600401808060200182810382526033815260200180615b646033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156153f657600080fd5b505afa15801561540a573d6000803e3d6000fd5b505050506040513d602081101561542057600080fd5b50511015615475576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561549b57615494308d8d85613568565b9050615525565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b1580156154f657600080fd5b505af115801561550a573d6000803e3d6000fd5b505050506040513d602081101561552057600080fd5b505190505b801561556f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b15801561563a57600080fd5b505af115801561564e573d6000803e3d6000fd5b506000925061565b915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156156bf57600080fd5b505afa1580156156d3573d6000803e3d6000fd5b505050506040513d60208110156156e957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b15801561574857600080fd5b505af115801561575c573d6000803e3d6000fd5b5050505060003d60008114615778576020811461578257600080fd5b600019915061578e565b60206000803e60005191505b50806157e1576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b50519050828110156158af576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006158c861592c565b612dbd868660006158d761592c565b6000806158ec670de0b6b3a764000087614d23565b909250905060008260038111156158ff57fe5b1461591e57506040805160208101909152600081529092509050612df3565b612dec818660000151613d17565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061598057805160ff19168380011785556159ad565b828001600101855582156159ad579182015b828111156159ad578251825591602001919060010190615992565b506159b9929150615a63565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b6110cb91905b808211156159b95760008155600101615a6956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65646f6e6c79207468652061646d696e206d61792063616c6c205f72657369676e496d706c656d656e746174696f6eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f6f6e6c79207468652061646d696e206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6ea265627a7a72315820fa968cc120708f689ee6bd2e25d49520eb6ca4ab02d799bbec6d472e145c408864736f6c63430005100032", + "devdoc": { + "author": "Venus", + "methods": { + "_acceptAdmin()": { + "details": "Admin function for pending admin to accept role and update admin", + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_addReserves(uint256)": { + "params": { + "addAmount": "The amount of underlying tokens to add as reserves" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_becomeImplementation(bytes)": { + "params": { + "data": "The encoded bytes data for any initialization" + } + }, + "_reduceReserves(uint256)": { + "params": { + "reduceAmount_": "Amount of reduction to reserves" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setComptroller(address)": { + "details": "Admin function to set a new comptroller", + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setInterestRateModel(address)": { + "details": "Governance function to accrue interest and update the interest rate model", + "params": { + "newInterestRateModel_": "The new interest rate model to use" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setPendingAdmin(address)": { + "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.", + "params": { + "newPendingAdmin": "New pending admin." + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setReserveFactor(uint256)": { + "details": "Governor function to accrue interest and set a new reserve factor", + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "accrueInterest()": { + "details": "This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta" + }, + "allowance(address,address)": { + "params": { + "owner": "The address of the account which owns the tokens to be spent", + "spender": "The address of the account which may transfer tokens" + }, + "return": "The number of tokens allowed to be spent (-1 means infinite)" + }, + "approve(address,uint256)": { + "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)", + "params": { + "amount": "The number of tokens that are approved (-1 means infinite)", + "spender": "The address of the account which may transfer tokens" + }, + "return": "Whether or not the approval succeeded" + }, + "balanceOf(address)": { + "params": { + "owner": "The address of the account to query" + }, + "return": "The number of tokens owned by `owner`" + }, + "balanceOfUnderlying(address)": { + "details": "This also accrues interest in a transaction", + "params": { + "owner": "The address of the account to query" + }, + "return": "The amount of underlying owned by `owner`" + }, + "borrow(uint256)": { + "params": { + "borrowAmount": "The amount of the underlying asset to borrow" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "borrowBalanceCurrent(address)": { + "params": { + "account": "The address whose balance should be calculated after updating borrowIndex" + }, + "return": "The calculated balance" + }, + "borrowBalanceStored(address)": { + "params": { + "account": "The address whose balance should be calculated" + }, + "return": "The calculated balance" + }, + "borrowBehalf(address,uint256)": { + "params": { + "borrowAmount": "The amount of the underlying asset to borrow", + "borrower": "The borrower, on behalf of whom to borrow." + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "borrowRatePerBlock()": { + "return": "The borrow interest rate per block, scaled by 1e18" + }, + "exchangeRateCurrent()": { + "return": "Calculated exchange rate scaled by 1e18" + }, + "exchangeRateStored()": { + "details": "This function does not accrue interest before calculating the exchange rate", + "return": "Calculated exchange rate scaled by 1e18" + }, + "getAccountSnapshot(address)": { + "details": "This is used by comptroller to more efficiently perform liquidity checks.", + "params": { + "account": "Address of the account to snapshot" + }, + "return": "(possible error, token balance, borrow balance, exchange rate mantissa)" + }, + "getCash()": { + "return": "The quantity of underlying asset owned by this contract" + }, + "initialize(address,address,address,uint256,string,string,uint8)": { + "params": { + "comptroller_": "The address of the Comptroller", + "decimals_": "BEP-20 decimal precision of this token", + "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", + "interestRateModel_": "The address of the interest rate model", + "name_": "BEP-20 name of this token", + "symbol_": "BEP-20 symbol of this token", + "underlying_": "The address of the underlying asset" + } + }, + "initialize(address,address,uint256,string,string,uint8)": { + "params": { + "comptroller_": "The address of the Comptroller", + "decimals_": "EIP-20 decimal precision of this token", + "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", + "interestRateModel_": "The address of the interest rate model", + "name_": "EIP-20 name of this token", + "symbol_": "EIP-20 symbol of this token" + } + }, + "liquidateBorrow(address,uint256,address)": { + "params": { + "borrower": "The borrower of this vToken to be liquidated", + "repayAmount": "The amount of the underlying borrowed asset to repay", + "vTokenCollateral": "The market in which to seize collateral from the borrower" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "mint(uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "mintAmount": "The amount of the underlying asset to supply" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "mintBehalf(address,uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "mintAmount": "The amount of the underlying asset to supply", + "receiver": "The account which is receiving the vTokens" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeem(uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemTokens": "The number of vTokens to redeem into underlying" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeemBehalf(address,uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemTokens": "The number of vTokens to redeem into underlying", + "redeemer": "The user on behalf of whom to redeem" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeemUnderlying(uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemAmount": "The amount of underlying to redeem" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeemUnderlyingBehalf(address,uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemAmount": "The amount of underlying to receive from redeeming vTokens", + "redeemer": ", on behalf of whom to redeem" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "repayBorrow(uint256)": { + "params": { + "repayAmount": "The amount to repay" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "repayBorrowBehalf(address,uint256)": { + "params": { + "borrower": "The account with the debt being payed off", + "repayAmount": "The amount to repay" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "seize(address,address,uint256)": { + "details": "Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.", + "params": { + "borrower": "The account having collateral seized", + "liquidator": "The account receiving seized collateral", + "seizeTokens": "The number of vTokens to seize" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "setAccessControlManager(address)": { + "details": "Admin function to set the access control address", + "params": { + "newAccessControlManagerAddress": "New address for the access control" + }, + "return": "uint 0=success, otherwise will revert" + }, + "setProtocolShareReserve(address)": { + "params": { + "protcolShareReserve_": "The address of protocol share reserve contract" + } + }, + "setReduceReservesBlockDelta(uint256)": { + "params": { + "newReduceReservesBlockDelta_": "block difference value" + } + }, + "supplyRatePerBlock()": { + "return": "The supply interest rate per block, scaled by 1e18" + }, + "totalBorrowsCurrent()": { + "return": "The total borrows with interest" + }, + "transfer(address,uint256)": { + "params": { + "amount": "The number of tokens to transfer", + "dst": "The address of the destination account" + }, + "return": "Whether or not the transfer succeeded" + }, + "transferFrom(address,address,uint256)": { + "params": { + "amount": "The number of tokens to transfer", + "dst": "The address of the destination account", + "src": "The address of the source account" + }, + "return": "Whether or not the transfer succeeded" + } + }, + "title": "Venus's VBep20Delegate Contract" + }, + "userdoc": { + "methods": { + "_acceptAdmin()": { + "notice": "Accepts transfer of admin rights. msg.sender must be pendingAdmin" + }, + "_addReserves(uint256)": { + "notice": "The sender adds to reserves." + }, + "_becomeImplementation(bytes)": { + "notice": "Called by the delegator on a delegate to initialize it for duty" + }, + "_reduceReserves(uint256)": { + "notice": "Accrues interest and reduces reserves by transferring to protocol share reserve" + }, + "_resignImplementation()": { + "notice": "Called by the delegator on a delegate to forfeit its responsibility" + }, + "_setComptroller(address)": { + "notice": "Sets a new comptroller for the market" + }, + "_setInterestRateModel(address)": { + "notice": "Accrues interest and updates the interest rate model using _setInterestRateModelFresh" + }, + "_setPendingAdmin(address)": { + "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer." + }, + "_setReserveFactor(uint256)": { + "notice": "accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`" + }, + "accrueInterest()": { + "notice": "Applies accrued interest to total borrows and reserves" + }, + "allowance(address,address)": { + "notice": "Get the current allowance from `owner` for `spender`" + }, + "approve(address,uint256)": { + "notice": "Approve `spender` to transfer up to `amount` from `src`" + }, + "balanceOf(address)": { + "notice": "Get the token balance of the `owner`" + }, + "balanceOfUnderlying(address)": { + "notice": "Get the underlying balance of the `owner`" + }, + "borrow(uint256)": { + "notice": "Sender borrows assets from the protocol to their own address" + }, + "borrowBalanceCurrent(address)": { + "notice": "Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex" + }, + "borrowBalanceStored(address)": { + "notice": "Return the borrow balance of account based on stored data" + }, + "borrowBehalf(address,uint256)": { + "notice": "Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`" + }, + "borrowRatePerBlock()": { + "notice": "Returns the current per-block borrow interest rate for this vToken" + }, + "constructor": "Construct an empty delegate", + "exchangeRateCurrent()": { + "notice": "Accrue interest then return the up-to-date exchange rate" + }, + "exchangeRateStored()": { + "notice": "Calculates the exchange rate from the underlying to the VToken" + }, + "getAccountSnapshot(address)": { + "notice": "Get a snapshot of the account's balances, and the cached exchange rate" + }, + "getCash()": { + "notice": "Get cash balance of this vToken in the underlying asset" + }, + "initialize(address,address,address,uint256,string,string,uint8)": { + "notice": "Initialize the new money market" + }, + "initialize(address,address,uint256,string,string,uint8)": { + "notice": "Initialize the money market" + }, + "liquidateBorrow(address,uint256,address)": { + "notice": "The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator." + }, + "mint(uint256)": { + "notice": "Sender supplies assets into the market and receives vTokens in exchange" + }, + "mintBehalf(address,uint256)": { + "notice": "Sender supplies assets into the market and receiver receives vTokens in exchange" + }, + "redeem(uint256)": { + "notice": "Sender redeems vTokens in exchange for the underlying asset" + }, + "redeemBehalf(address,uint256)": { + "notice": "Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" + }, + "redeemUnderlying(uint256)": { + "notice": "Sender redeems vTokens in exchange for a specified amount of underlying asset" + }, + "redeemUnderlyingBehalf(address,uint256)": { + "notice": "Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" + }, + "repayBorrow(uint256)": { + "notice": "Sender repays their own borrow" + }, + "repayBorrowBehalf(address,uint256)": { + "notice": "Sender repays a borrow belonging to another borrowing account" + }, + "seize(address,address,uint256)": { + "notice": "Transfers collateral tokens (this market) to the liquidator." + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of the access control manager of this contract" + }, + "setProtocolShareReserve(address)": { + "notice": "Sets protocol share reserve contract address" + }, + "setReduceReservesBlockDelta(uint256)": { + "notice": "Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve" + }, + "supplyRatePerBlock()": { + "notice": "Returns the current per-block supply interest rate for this vToken" + }, + "totalBorrowsCurrent()": { + "notice": "Returns the current total borrows plus accrued interest" + }, + "transfer(address,uint256)": { + "notice": "Transfer `amount` tokens from `msg.sender` to `dst`" + }, + "transferFrom(address,address,uint256)": { + "notice": "Transfer `amount` tokens from `src` to `dst`" + } + }, + "notice": "VTokens which wrap an EIP-20 underlying and are delegated to" + }, + "storageLayout": { + "storage": [ + { + "astId": 23381, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "_notEntered", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 23383, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "name", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 23385, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "symbol", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 23387, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "decimals", + "offset": 0, + "slot": "3", + "type": "t_uint8" + }, + { + "astId": 23395, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "admin", + "offset": 1, + "slot": "3", + "type": "t_address_payable" + }, + { + "astId": 23397, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "pendingAdmin", + "offset": 0, + "slot": "4", + "type": "t_address_payable" + }, + { + "astId": 23399, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "comptroller", + "offset": 0, + "slot": "5", + "type": "t_contract(ComptrollerInterface)2305" + }, + { + "astId": 23401, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "interestRateModel", + "offset": 0, + "slot": "6", + "type": "t_contract(InterestRateModel)8971" + }, + { + "astId": 23403, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "initialExchangeRateMantissa", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 23405, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "reserveFactorMantissa", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 23407, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "accrualBlockNumber", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 23409, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "borrowIndex", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 23411, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "totalBorrows", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 23413, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "totalReserves", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 23415, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "totalSupply", + "offset": 0, + "slot": "13", + "type": "t_uint256" + }, + { + "astId": 23419, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "accountTokens", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 23425, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "transferAllowances", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 23429, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "accountBorrows", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_struct(BorrowSnapshot)23379_storage)" + }, + { + "astId": 23431, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "underlying", + "offset": 0, + "slot": "17", + "type": "t_address" + }, + { + "astId": 23433, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "implementation", + "offset": 0, + "slot": "18", + "type": "t_address" + }, + { + "astId": 23435, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "reduceReservesBlockDelta", + "offset": 0, + "slot": "19", + "type": "t_uint256" + }, + { + "astId": 23437, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "reduceReservesBlockNumber", + "offset": 0, + "slot": "20", + "type": "t_uint256" + }, + { + "astId": 23439, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "protocolShareReserve", + "offset": 0, + "slot": "21", + "type": "t_address_payable" + }, + { + "astId": 23441, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "accessControlManager", + "offset": 0, + "slot": "22", + "type": "t_address" + }, + { + "astId": 23448, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "__gap", + "offset": 0, + "slot": "23", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ComptrollerInterface)2305": { + "encoding": "inplace", + "label": "contract ComptrollerInterface", + "numberOfBytes": "20" + }, + "t_contract(InterestRateModel)8971": { + "encoding": "inplace", + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(BorrowSnapshot)23379_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct VTokenStorageBase.BorrowSnapshot)", + "numberOfBytes": "32", + "value": "t_struct(BorrowSnapshot)23379_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(BorrowSnapshot)23379_storage": { + "encoding": "inplace", + "label": "struct VTokenStorageBase.BorrowSnapshot", + "members": [ + { + "astId": 23376, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "principal", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 23378, + "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", + "label": "interestIndex", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} diff --git a/deployments/bsctestnet/VBep20Temp.json b/deployments/bsctestnet/VBep20Temp.json new file mode 100644 index 000000000..2c78fdb76 --- /dev/null +++ b/deployments/bsctestnet/VBep20Temp.json @@ -0,0 +1,2462 @@ +{ + "address": "0x9ac3C79de233952bEBdf88A932c52fC24dD6ebcf", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "cashPrior", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "AccrueInterest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "Borrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "LiquidateBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "RepayBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "benefactor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "protocolShareReserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesReduced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + } + ], + "name": "_addReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount_", + "type": "uint256" + } + ], + "name": "_reduceReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "_setComptroller", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel_", + "type": "address" + } + ], + "name": "_setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReserveFactorMantissa_", + "type": "uint256" + } + ], + "name": "_setReserveFactor", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOfUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getCash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "interestRateModel", + "outputs": [ + { + "internalType": "contract InterestRateModel", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isVToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", + "type": "address" + } + ], + "name": "liquidateBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeemBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlyingBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "seize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalBorrows", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newUnderlying", + "type": "address" + } + ], + "name": "updateUnderlying", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xba9de4d582282b9914e8939aeca529b7a00e864187965b2c67fa1a7c26287fcb", + "receipt": { + "to": null, + "from": "0x464779C41C5f1Be598853C1F87bCC7087Ea75f28", + "contractAddress": "0x9ac3C79de233952bEBdf88A932c52fC24dD6ebcf", + "transactionIndex": 1, + "gasUsed": "5054244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xde86a6d114ebd52c3939618f17a53ad34234c0a4a280465342614bb22bdf6dcf", + "transactionHash": "0xba9de4d582282b9914e8939aeca529b7a00e864187965b2c67fa1a7c26287fcb", + "logs": [], + "blockNumber": 39552966, + "cumulativeGasUsed": "5113260", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "42f81d8e85977bc834873ceceb7c8672", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cashPrior\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"interestAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"AccrueInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"error\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"info\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"detail\",\"type\":\"uint256\"}],\"name\":\"Failure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vTokenCollateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"LiquidateBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"MintBehalf\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"oldComptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"NewComptroller\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"oldInterestRateModel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"NewMarketInterestRateModel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"NewProtocolShareReserve\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReduceReservesBlockDelta\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta\",\"type\":\"uint256\"}],\"name\":\"NewReduceReservesBlockDelta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReserveFactorMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"NewReserveFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"RedeemFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"RepayBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"benefactor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolShareReserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"}],\"name\":\"_addReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount_\",\"type\":\"uint256\"}],\"name\":\"_reduceReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"_setComptroller\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel_\",\"type\":\"address\"}],\"name\":\"_setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa_\",\"type\":\"uint256\"}],\"name\":\"_setReserveFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"accrueInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"internalType\":\"contract VTokenInterface\",\"name\":\"vTokenCollateral\",\"type\":\"address\"}],\"name\":\"liquidateBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mintBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeemBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlyingBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockDelta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveFactorMantissa\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlManagerAddress\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"protcolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta_\",\"type\":\"uint256\"}],\"name\":\"setReduceReservesBlockDelta\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supplyRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"totalBorrowsCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newUnderlying\",\"type\":\"address\"}],\"name\":\"updateUnderlying\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_addReserves(uint256)\":{\"params\":{\"addAmount\":\"The amount of underlying tokens to add as reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_reduceReserves(uint256)\":{\"params\":{\"reduceAmount_\":\"Amount of reduction to reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setComptroller(address)\":{\"details\":\"Admin function to set a new comptroller\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setInterestRateModel(address)\":{\"details\":\"Governance function to accrue interest and update the interest rate model\",\"params\":{\"newInterestRateModel_\":\"The new interest rate model to use\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setReserveFactor(uint256)\":{\"details\":\"Governor function to accrue interest and set a new reserve factor\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"accrueInterest()\":{\"details\":\"This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta\"},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"The number of tokens allowed to be spent (-1 means infinite)\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"Whether or not the approval succeeded\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of tokens owned by `owner`\"},\"balanceOfUnderlying(address)\":{\"details\":\"This also accrues interest in a transaction\",\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The amount of underlying owned by `owner`\"},\"borrow(uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowBalanceCurrent(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated after updating borrowIndex\"},\"return\":\"The calculated balance\"},\"borrowBalanceStored(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated\"},\"return\":\"The calculated balance\"},\"borrowBehalf(address,uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\",\"borrower\":\"The borrower, on behalf of whom to borrow.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowRatePerBlock()\":{\"return\":\"The borrow interest rate per block, scaled by 1e18\"},\"exchangeRateCurrent()\":{\"return\":\"Calculated exchange rate scaled by 1e18\"},\"exchangeRateStored()\":{\"details\":\"This function does not accrue interest before calculating the exchange rate\",\"return\":\"Calculated exchange rate scaled by 1e18\"},\"getAccountSnapshot(address)\":{\"details\":\"This is used by comptroller to more efficiently perform liquidity checks.\",\"params\":{\"account\":\"Address of the account to snapshot\"},\"return\":\"(possible error, token balance, borrow balance, exchange rate mantissa)\"},\"getCash()\":{\"return\":\"The quantity of underlying asset owned by this contract\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"BEP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"BEP-20 name of this token\",\"symbol_\":\"BEP-20 symbol of this token\",\"underlying_\":\"The address of the underlying asset\"}},\"initialize(address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"EIP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"EIP-20 name of this token\",\"symbol_\":\"EIP-20 symbol of this token\"}},\"liquidateBorrow(address,uint256,address)\":{\"params\":{\"borrower\":\"The borrower of this vToken to be liquidated\",\"repayAmount\":\"The amount of the underlying borrowed asset to repay\",\"vTokenCollateral\":\"The market in which to seize collateral from the borrower\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mint(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mintBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\",\"receiver\":\"The account which is receiving the vTokens\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeem(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\",\"redeemer\":\"The user on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlying(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to receive from redeeming vTokens\",\"redeemer\":\", on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrow(uint256)\":{\"params\":{\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrowBehalf(address,uint256)\":{\"params\":{\"borrower\":\"The account with the debt being payed off\",\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"seize(address,address,uint256)\":{\"details\":\"Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\",\"params\":{\"borrower\":\"The account having collateral seized\",\"liquidator\":\"The account receiving seized collateral\",\"seizeTokens\":\"The number of vTokens to seize\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"setAccessControlManager(address)\":{\"details\":\"Admin function to set the access control address\",\"params\":{\"newAccessControlManagerAddress\":\"New address for the access control\"},\"return\":\"uint 0=success, otherwise will revert\"},\"setProtocolShareReserve(address)\":{\"params\":{\"protcolShareReserve_\":\"The address of protocol share reserve contract\"}},\"setReduceReservesBlockDelta(uint256)\":{\"params\":{\"newReduceReservesBlockDelta_\":\"block difference value\"}},\"supplyRatePerBlock()\":{\"return\":\"The supply interest rate per block, scaled by 1e18\"},\"totalBorrowsCurrent()\":{\"return\":\"The total borrows with interest\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"return\":\"Whether or not the transfer succeeded\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"return\":\"Whether or not the transfer succeeded\"}},\"title\":\"Venus's VBep20 Contract\"},\"userdoc\":{\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. msg.sender must be pendingAdmin\"},\"_addReserves(uint256)\":{\"notice\":\"The sender adds to reserves.\"},\"_reduceReserves(uint256)\":{\"notice\":\"Accrues interest and reduces reserves by transferring to protocol share reserve\"},\"_setComptroller(address)\":{\"notice\":\"Sets a new comptroller for the market\"},\"_setInterestRateModel(address)\":{\"notice\":\"Accrues interest and updates the interest rate model using _setInterestRateModelFresh\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setReserveFactor(uint256)\":{\"notice\":\"accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\"},\"accrueInterest()\":{\"notice\":\"Applies accrued interest to total borrows and reserves\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Get the underlying balance of the `owner`\"},\"borrow(uint256)\":{\"notice\":\"Sender borrows assets from the protocol to their own address\"},\"borrowBalanceCurrent(address)\":{\"notice\":\"Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\"},\"borrowBalanceStored(address)\":{\"notice\":\"Return the borrow balance of account based on stored data\"},\"borrowBehalf(address,uint256)\":{\"notice\":\"Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\"},\"borrowRatePerBlock()\":{\"notice\":\"Returns the current per-block borrow interest rate for this vToken\"},\"exchangeRateCurrent()\":{\"notice\":\"Accrue interest then return the up-to-date exchange rate\"},\"exchangeRateStored()\":{\"notice\":\"Calculates the exchange rate from the underlying to the VToken\"},\"getAccountSnapshot(address)\":{\"notice\":\"Get a snapshot of the account's balances, and the cached exchange rate\"},\"getCash()\":{\"notice\":\"Get cash balance of this vToken in the underlying asset\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the new money market\"},\"initialize(address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the money market\"},\"liquidateBorrow(address,uint256,address)\":{\"notice\":\"The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator.\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives vTokens in exchange\"},\"mintBehalf(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receiver receives vTokens in exchange\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for the underlying asset\"},\"redeemBehalf(address,uint256)\":{\"notice\":\"Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"redeemUnderlying(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for a specified amount of underlying asset\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"notice\":\"Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"repayBorrow(uint256)\":{\"notice\":\"Sender repays their own borrow\"},\"repayBorrowBehalf(address,uint256)\":{\"notice\":\"Sender repays a borrow belonging to another borrowing account\"},\"seize(address,address,uint256)\":{\"notice\":\"Transfers collateral tokens (this market) to the liquidator.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"Sets protocol share reserve contract address\"},\"setReduceReservesBlockDelta(uint256)\":{\"notice\":\"Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\"},\"supplyRatePerBlock()\":{\"notice\":\"Returns the current per-block supply interest rate for this vToken\"},\"totalBorrowsCurrent()\":{\"notice\":\"Returns the current total borrows plus accrued interest\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"}},\"notice\":\"vTokens which wrap an EIP-20 underlying\"}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/VTokens/VBep20.sol\":\"VBep20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.5.16;\\n\\n/**\\n * @title IAccessControlManagerV5\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\\n */\\ninterface IAccessControlManagerV5 {\\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 */\\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 /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleGranted} event.\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n /**\\n * @notice Verifies if the given account can call a praticular contract's function\\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\\n * @param account address (eoa or contract) for which call permissions will be checked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\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\":\"0x3563db4c75f7aa0b8a982bab591907dda192438a2368511b62a9c587a3e54226\"},\"contracts/Comptroller/ComptrollerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport \\\"../Oracle/PriceOracle.sol\\\";\\nimport \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerTypes } from \\\"./ComptrollerStorage.sol\\\";\\n\\ncontract ComptrollerInterface {\\n /// @notice Indicator that this is a Comptroller contract (for inspection)\\n bool public constant isComptroller = true;\\n\\n /*** Assets You Are In ***/\\n\\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\\n\\n function exitMarket(address vToken) external returns (uint);\\n\\n /*** Policy Hooks ***/\\n\\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\\n\\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\\n\\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\\n\\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\\n\\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\\n\\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\\n\\n function repayBorrowAllowed(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function repayBorrowVerify(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount,\\n uint borrowerIndex\\n ) external;\\n\\n function liquidateBorrowAllowed(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function liquidateBorrowVerify(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n uint seizeTokens\\n ) external;\\n\\n function seizeAllowed(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external returns (uint);\\n\\n function seizeVerify(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external;\\n\\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\\n\\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\\n\\n /*** Liquidity/Liquidation Calculations ***/\\n\\n function liquidateCalculateSeizeTokens(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function getXVSAddress() public view returns (address);\\n\\n function markets(address) external view returns (bool, uint);\\n\\n function oracle() external view returns (PriceOracle);\\n\\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\\n\\n function getAssetsIn(address) external view returns (VToken[] memory);\\n\\n function claimVenus(address) external;\\n\\n function venusAccrued(address) external view returns (uint);\\n\\n function venusSupplySpeeds(address) external view returns (uint);\\n\\n function venusBorrowSpeeds(address) external view returns (uint);\\n\\n function getAllMarkets() external view returns (VToken[] memory);\\n\\n function venusSupplierIndex(address, address) external view returns (uint);\\n\\n function venusInitialIndex() external view returns (uint224);\\n\\n function venusBorrowerIndex(address, address) external view returns (uint);\\n\\n function venusBorrowState(address) external view returns (uint224, uint32);\\n\\n function venusSupplyState(address) external view returns (uint224, uint32);\\n\\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n function vaiController() external view returns (VAIControllerInterface);\\n\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n function protocolPaused() external view returns (bool);\\n\\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\\n\\n function mintedVAIs(address user) external view returns (uint);\\n\\n function vaiMintRate() external view returns (uint);\\n}\\n\\ninterface IVAIVault {\\n function updatePendingRewards() external;\\n}\\n\\ninterface IComptroller {\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n /*** Treasury Data ***/\\n function treasuryAddress() external view returns (address);\\n\\n function treasuryPercent() external view returns (uint);\\n}\\n\",\"keccak256\":\"0x4f4965dd8614b455952a2ef186fd8a509affbc56078a4aa8702f46d4c8209793\"},\"contracts/Comptroller/ComptrollerLensInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ninterface ComptrollerLensInterface {\\n function liquidateCalculateSeizeTokens(\\n address comptroller,\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address comptroller,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function getHypotheticalAccountLiquidity(\\n address comptroller,\\n address account,\\n VToken vTokenModify,\\n uint redeemTokens,\\n uint borrowAmount\\n ) external view returns (uint, uint, uint);\\n}\\n\",\"keccak256\":\"0xc824e034221740c1957891547c78a123b595017cf102629454a04d36637e9c4a\"},\"contracts/Comptroller/ComptrollerStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken } from \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport { PriceOracle } from \\\"../Oracle/PriceOracle.sol\\\";\\nimport { VAIControllerInterface } from \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerLensInterface } from \\\"./ComptrollerLensInterface.sol\\\";\\nimport { IPrime } from \\\"../Tokens/Prime/IPrime.sol\\\";\\n\\ninterface ComptrollerTypes {\\n enum Action {\\n MINT,\\n REDEEM,\\n BORROW,\\n REPAY,\\n SEIZE,\\n LIQUIDATE,\\n TRANSFER,\\n ENTER_MARKET,\\n EXIT_MARKET\\n }\\n}\\n\\ncontract UnitrollerAdminStorage {\\n /**\\n * @notice Administrator for this contract\\n */\\n address public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address public pendingAdmin;\\n\\n /**\\n * @notice Active brains of Unitroller\\n */\\n address public comptrollerImplementation;\\n\\n /**\\n * @notice Pending brains of Unitroller\\n */\\n address public pendingComptrollerImplementation;\\n}\\n\\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\\n /**\\n * @notice Oracle which gives the price of any given asset\\n */\\n PriceOracle public oracle;\\n\\n /**\\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\\n */\\n uint256 public closeFactorMantissa;\\n\\n /**\\n * @notice Multiplier representing the discount on collateral that a liquidator receives\\n */\\n uint256 public liquidationIncentiveMantissa;\\n\\n /**\\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\\n */\\n uint256 public maxAssets;\\n\\n /**\\n * @notice Per-account mapping of \\\"assets you are in\\\", capped by maxAssets\\n */\\n mapping(address => VToken[]) public accountAssets;\\n\\n struct Market {\\n /// @notice Whether or not this market is listed\\n bool isListed;\\n /**\\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\\n * For instance, 0.9 to allow borrowing 90% of collateral value.\\n * Must be between 0 and 1, and stored as a mantissa.\\n */\\n uint256 collateralFactorMantissa;\\n /// @notice Per-market mapping of \\\"accounts in this asset\\\"\\n mapping(address => bool) accountMembership;\\n /// @notice Whether or not this market receives XVS\\n bool isVenus;\\n }\\n\\n /**\\n * @notice Official mapping of vTokens -> Market metadata\\n * @dev Used e.g. to determine if a market is supported\\n */\\n mapping(address => Market) public markets;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n address public pauseGuardian;\\n\\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\\n bool private _mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool private _borrowGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal transferGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal seizeGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal borrowGuardianPaused;\\n\\n struct VenusMarketState {\\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\\n uint224 index;\\n /// @notice The block number the index was last updated at\\n uint32 block;\\n }\\n\\n /// @notice A list of all markets\\n VToken[] public allMarkets;\\n\\n /// @notice The rate at which the flywheel distributes XVS, per block\\n uint256 internal venusRate;\\n\\n /// @notice The portion of venusRate that each market currently receives\\n mapping(address => uint256) internal venusSpeeds;\\n\\n /// @notice The Venus market supply state for each market\\n mapping(address => VenusMarketState) public venusSupplyState;\\n\\n /// @notice The Venus market borrow state for each market\\n mapping(address => VenusMarketState) public venusBorrowState;\\n\\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\\n\\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\\n\\n /// @notice The XVS accrued but not yet transferred to each user\\n mapping(address => uint256) public venusAccrued;\\n\\n /// @notice The Address of VAIController\\n VAIControllerInterface public vaiController;\\n\\n /// @notice The minted VAI amount to each user\\n mapping(address => uint256) public mintedVAIs;\\n\\n /// @notice VAI Mint Rate as a percentage\\n uint256 public vaiMintRate;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n bool public mintVAIGuardianPaused;\\n bool public repayVAIGuardianPaused;\\n\\n /**\\n * @notice Pause/Unpause whole protocol actions\\n */\\n bool public protocolPaused;\\n\\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\\n uint256 private venusVAIRate;\\n}\\n\\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\\n uint256 public venusVAIVaultRate;\\n\\n // address of VAI Vault\\n address public vaiVaultAddress;\\n\\n // start block of release to VAI Vault\\n uint256 public releaseStartBlock;\\n\\n // minimum release amount to VAI Vault\\n uint256 public minReleaseAmount;\\n}\\n\\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\\n address public borrowCapGuardian;\\n\\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\\n mapping(address => uint256) public borrowCaps;\\n}\\n\\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\\n /// @notice Treasury Guardian address\\n address public treasuryGuardian;\\n\\n /// @notice Treasury address\\n address public treasuryAddress;\\n\\n /// @notice Fee percent of accrued interest with decimal 18\\n uint256 public treasuryPercent;\\n}\\n\\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\\n mapping(address => uint256) private venusContributorSpeeds;\\n\\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\\n mapping(address => uint256) private lastContributorBlock;\\n}\\n\\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\\n address public liquidatorContract;\\n}\\n\\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\\n ComptrollerLensInterface public comptrollerLens;\\n}\\n\\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\\n mapping(address => uint256) public supplyCaps;\\n}\\n\\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\\n /// @notice AccessControlManager address\\n address internal accessControl;\\n\\n /// @notice True if a certain action is paused on a certain market\\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\\n}\\n\\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\\n mapping(address => uint256) public venusBorrowSpeeds;\\n\\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\\n mapping(address => uint256) public venusSupplySpeeds;\\n}\\n\\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\\n mapping(address => mapping(address => bool)) public approvedDelegates;\\n}\\n\\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\\n mapping(address => bool) public isForcedLiquidationEnabled;\\n}\\n\\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\\n }\\n\\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\\n // facet addresses\\n address[] internal _facetAddresses;\\n}\\n\\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\\n /// @notice Prime token address\\n IPrime public prime;\\n}\\n\\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\\n}\\n\\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\\n /// @notice The XVS token contract address\\n address internal xvs;\\n\\n /// @notice The XVS vToken contract address\\n address internal xvsVToken;\\n}\\n\",\"keccak256\":\"0x06608bb502e91c33fda8c0dd88cc79a49a078fab521bc27d10fc3a69c1da55f4\"},\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/Oracle/PriceOracle.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ncontract PriceOracle {\\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\\n bool public constant isPriceOracle = true;\\n\\n /**\\n * @notice Get the underlying price of a vToken asset\\n * @param vToken The vToken to get the underlying price of\\n * @return The underlying asset price mantissa (scaled by 1e18).\\n * Zero means the price is unavailable.\\n */\\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x0f68d0e07decba8fb9a77df1659170f310b487cc0b650f53ca6aa55ed62b28de\"},\"contracts/Tokens/EIP20Interface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title BEP 20 Token Standard Interface\\n * https://eips.ethereum.org/EIPS/eip-20\\n */\\ninterface EIP20Interface {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return success whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x7e89ffa9c0d432c4db8bd5388ff68e33934dcdb1d038d74bbed3b2fdae3eb532\"},\"contracts/Tokens/EIP20NonStandardInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title EIP20NonStandardInterface\\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\ninterface EIP20NonStandardInterface {\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance of the owner\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transfer(address dst, uint256 amount) external;\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transferFrom(address src, address dst, uint256 amount) external;\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved\\n * @return success Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x05a3a7d5ab47de3964c95d706dcc18fe7583b1d064dbb74808c0f2774f347afa\"},\"contracts/Tokens/Prime/IPrime.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title IPrime\\n * @author Venus\\n * @notice Interface for Prime Token\\n */\\ninterface IPrime {\\n /**\\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\\n * @param user the account address whose balance was updated\\n */\\n function xvsUpdated(address user) external;\\n\\n /**\\n * @notice accrues interest and updates score for an user for a specific market\\n * @param user the account address for which to accrue interest and update score\\n * @param market the market for which to accrue interest and update score\\n */\\n function accrueInterestAndUpdateScore(address user, address market) external;\\n\\n /**\\n * @notice Distributes income from market since last distribution\\n * @param vToken the market for which to distribute the income\\n */\\n function accrueInterest(address vToken) external;\\n\\n /**\\n * @notice Returns if user is a prime holder\\n * @param isPrimeHolder returns if the user is a prime holder\\n */\\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\\n}\\n\",\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\"},\"contracts/Tokens/VAI/VAIControllerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../VTokens/VTokenInterfaces.sol\\\";\\n\\ncontract VAIControllerInterface {\\n function getVAIAddress() public view returns (address);\\n\\n function getMintableVAI(address minter) public view returns (uint, uint);\\n\\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\\n\\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\\n\\n function liquidateVAI(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint, uint);\\n\\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\\n\\n function updateVenusVAIMintIndex() external returns (uint);\\n\\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\\n\\n function getVAIRepayAmount(address account) public view returns (uint);\\n}\\n\",\"keccak256\":\"0x17eb6edb1262c4effcad86f614ff20d00256278485054b11aa5cf011ff6f8a86\"},\"contracts/Tokens/VTokens/VBep20.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \\\"./VToken.sol\\\";\\nimport { EIP20Interface } from \\\"../EIP20Interface.sol\\\";\\nimport { EIP20NonStandardInterface } from \\\"../EIP20NonStandardInterface.sol\\\";\\n\\n/**\\n * @title Venus's VBep20 Contract\\n * @notice vTokens which wrap an EIP-20 underlying\\n * @author Venus\\n */\\ncontract VBep20 is VToken, VBep20Interface {\\n /*** User Interface ***/\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits Mint event\\n function mint(uint mintAmount) external returns (uint) {\\n (uint err, ) = mintInternal(mintAmount);\\n return err;\\n }\\n\\n function updateUnderlying(address newUnderlying) external {\\n underlying = newUnderlying;\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits MintBehalf event\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for the underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeem(uint redeemTokens) external returns (uint) {\\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The user on behalf of whom to redeem\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemInternal(redeemer, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemAmount The amount of underlying to redeem\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer, on behalf of whom to redeem\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets from the protocol to their own address\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrow(uint borrowAmount) external returns (uint) {\\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\\n * @param borrower The borrower, on behalf of whom to borrow.\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(borrower, msg.sender), \\\"not an approved delegate\\\");\\n return borrowInternal(borrower, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrow(uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowInternal(repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emit LiquidateBorrow event on success\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint) {\\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\\n return err;\\n }\\n\\n /**\\n * @notice The sender adds to reserves.\\n * @param addAmount The amount of underlying tokens to add as reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesAdded event\\n function _addReserves(uint addAmount) external returns (uint) {\\n return _addReservesInternal(addAmount);\\n }\\n\\n /**\\n * @notice Initialize the new money market\\n * @param underlying_ The address of the underlying asset\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ BEP-20 name of this token\\n * @param symbol_ BEP-20 symbol of this token\\n * @param decimals_ BEP-20 decimal precision of this token\\n */\\n function initialize(\\n address underlying_,\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n // VToken initialize does the bulk of the work\\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\\n\\n // Set underlying and sanity check it\\n underlying = underlying_;\\n EIP20Interface(underlying).totalSupply();\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\\n * This will revert due to insufficient balance or insufficient allowance.\\n * This function returns the actual amount received,\\n * which may be less than `amount` if there is a fee attached to the transfer.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint) {\\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_IN_FAILED\\\");\\n\\n // Calculate the amount that was *actually* transferred\\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\\n require(balanceAfter >= balanceBefore, \\\"TOKEN_TRANSFER_IN_OVERFLOW\\\");\\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\\n }\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\\n * it is >= amount, this should not revert in normal conditions.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferOut(address payable to, uint amount) internal {\\n EIP20NonStandardInterface(underlying).transfer(to, amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_OUT_FAILED\\\");\\n }\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying tokens owned by this contract\\n */\\n function getCashPrior() internal view returns (uint) {\\n return EIP20Interface(underlying).balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xee76f8967821a4c33d825d20943f0a3421d09a029bc271a8b5495a81c83353a0\"},\"contracts/Tokens/VTokens/VToken.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../Utils/ErrorReporter.sol\\\";\\nimport \\\"../../Utils/Exponential.sol\\\";\\nimport \\\"../../Tokens/EIP20Interface.sol\\\";\\nimport \\\"../../Tokens/EIP20NonStandardInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\nimport \\\"./VTokenInterfaces.sol\\\";\\nimport { IAccessControlManagerV5 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\\\";\\n\\n/**\\n * @title Venus's vToken Contract\\n * @notice Abstract base for vTokens\\n * @author Venus\\n */\\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\\n struct MintLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint mintTokens;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n uint actualMintAmount;\\n }\\n\\n struct RedeemLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint redeemTokens;\\n uint redeemAmount;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n }\\n\\n struct BorrowLocalVars {\\n MathError mathErr;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n }\\n\\n struct RepayBorrowLocalVars {\\n Error err;\\n MathError mathErr;\\n uint repayAmount;\\n uint borrowerIndex;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n uint actualRepayAmount;\\n }\\n\\n /*** Reentrancy Guard ***/\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n */\\n modifier nonReentrant() {\\n require(_notEntered, \\\"re-entered\\\");\\n _notEntered = false;\\n _;\\n _notEntered = true; // get a gas-refund post-Istanbul\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n // @custom:event Emits Approval event on successful approve\\n function approve(address spender, uint256 amount) external returns (bool) {\\n transferAllowances[msg.sender][spender] = amount;\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external returns (uint) {\\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\\n ensureNoMathError(mErr);\\n return balance;\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return totalBorrows;\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return borrowBalanceStored(account);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\\n }\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\\n // Check caller = admin\\n ensureAdmin(msg.sender);\\n\\n // Save current value, if any, for inclusion in log\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store pendingAdmin with value newPendingAdmin\\n pendingAdmin = newPendingAdmin;\\n\\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewAdmin event on successful acceptance\\n // @custom:event Emits NewPendingAdmin event with null new pending admin\\n function _acceptAdmin() external returns (uint) {\\n // Check caller is pendingAdmin\\n if (msg.sender != pendingAdmin) {\\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\\n }\\n\\n // Save current values for inclusion in log\\n address oldAdmin = admin;\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store admin with value pendingAdmin\\n admin = pendingAdmin;\\n\\n // Clear the pending value\\n pendingAdmin = address(0);\\n\\n emit NewAdmin(oldAdmin, admin);\\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\\n * @dev Governor function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewReserveFactor event\\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_setReserveFactor(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\\n }\\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\\n return _setReserveFactorFresh(newReserveFactorMantissa_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract\\n * @dev Admin function to set the access control address\\n * @param newAccessControlManagerAddress New address for the access control\\n * @return uint 0=success, otherwise will revert\\n */\\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ensureNonZeroAddress(newAccessControlManagerAddress);\\n\\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\\n accessControlManager = newAccessControlManagerAddress;\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\\n * @param reduceAmount_ Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesReduced event\\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_reduceReserves(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // If reserves were reduced in accrueInterest\\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\\n return _reduceReservesFresh(reduceAmount_);\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (-1 means infinite)\\n */\\n function allowance(address owner, address spender) external view returns (uint256) {\\n return transferAllowances[owner][spender];\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view returns (uint256) {\\n return accountTokens[owner];\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\\n uint vTokenBalance = accountTokens[account];\\n uint borrowBalance;\\n uint exchangeRateMantissa;\\n\\n MathError mErr;\\n\\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view returns (uint) {\\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view returns (uint) {\\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view returns (uint) {\\n return getCashPrior();\\n }\\n\\n /**\\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\\n * @param newReduceReservesBlockDelta_ block difference value\\n */\\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\\n require(newReduceReservesBlockDelta_ > 0, \\\"Invalid Input\\\");\\n ensureAllowed(\\\"setReduceReservesBlockDelta(uint256)\\\");\\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\\n }\\n\\n /**\\n * @notice Sets protocol share reserve contract address\\n * @param protcolShareReserve_ The address of protocol share reserve contract\\n */\\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n ensureNonZeroAddress(protcolShareReserve_);\\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\\n protocolShareReserve = protcolShareReserve_;\\n }\\n\\n /**\\n * @notice Initialize the money market\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ EIP-20 name of this token\\n * @param symbol_ EIP-20 symbol of this token\\n * @param decimals_ EIP-20 decimal precision of this token\\n */\\n function initialize(\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n ensureAdmin(msg.sender);\\n require(accrualBlockNumber == 0 && borrowIndex == 0, \\\"market may only be initialized once\\\");\\n\\n // Set initial exchange rate\\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\\n require(initialExchangeRateMantissa > 0, \\\"initial exchange rate must be greater than zero.\\\");\\n\\n // Set the comptroller\\n uint err = _setComptroller(comptroller_);\\n require(err == uint(Error.NO_ERROR), \\\"setting comptroller failed\\\");\\n\\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\\n accrualBlockNumber = block.number;\\n borrowIndex = mantissaOne;\\n\\n // Set the interest rate model (depends on block number / borrow index)\\n err = _setInterestRateModelFresh(interestRateModel_);\\n require(err == uint(Error.NO_ERROR), \\\"setting interest rate model failed\\\");\\n\\n name = name_;\\n symbol = symbol_;\\n decimals = decimals_;\\n\\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\\n _notEntered = true;\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return exchangeRateStored();\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage and\\n * reduce spread reserves to protocol share reserve\\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\\n */\\n // @custom:event Emits AccrueInterest event\\n function accrueInterest() public returns (uint) {\\n /* Remember the initial block number */\\n uint currentBlockNumber = block.number;\\n uint accrualBlockNumberPrior = accrualBlockNumber;\\n\\n /* Short-circuit accumulating 0 interest */\\n if (accrualBlockNumberPrior == currentBlockNumber) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n /* Read the previous values out of storage */\\n uint cashPrior = getCashPrior();\\n uint borrowsPrior = totalBorrows;\\n uint reservesPrior = totalReserves;\\n uint borrowIndexPrior = borrowIndex;\\n\\n /* Calculate the current borrow interest rate */\\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\\n require(borrowRateMantissa <= borrowRateMaxMantissa, \\\"borrow rate is absurdly high\\\");\\n\\n /* Calculate the number of blocks elapsed since the last accrual */\\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\\n ensureNoMathError(mathErr);\\n\\n /*\\n * Calculate the interest accumulated into borrows and reserves and the new index:\\n * simpleInterestFactor = borrowRate * blockDelta\\n * interestAccumulated = simpleInterestFactor * totalBorrows\\n * totalBorrowsNew = interestAccumulated + totalBorrows\\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\\n */\\n\\n Exp memory simpleInterestFactor;\\n uint interestAccumulated;\\n uint totalBorrowsNew;\\n uint totalReservesNew;\\n uint borrowIndexNew;\\n\\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\\n Exp({ mantissa: reserveFactorMantissa }),\\n interestAccumulated,\\n reservesPrior\\n );\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accrualBlockNumber = currentBlockNumber;\\n borrowIndex = borrowIndexNew;\\n totalBorrows = totalBorrowsNew;\\n totalReserves = totalReservesNew;\\n\\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\\n ensureNoMathError(mathErr);\\n if (blockDelta >= reduceReservesBlockDelta) {\\n reduceReservesBlockNumber = currentBlockNumber;\\n if (cashPrior < totalReservesNew) {\\n _reduceReservesFresh(cashPrior);\\n } else {\\n _reduceReservesFresh(totalReservesNew);\\n }\\n }\\n\\n /* We emit an AccrueInterest event */\\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewComptroller event\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ComptrollerInterface oldComptroller = comptroller;\\n // Ensure invoke comptroller.isComptroller() returns true\\n require(newComptroller.isComptroller(), \\\"marker method returned false\\\");\\n\\n // Set market's comptroller to newComptroller\\n comptroller = newComptroller;\\n\\n // Emit NewComptroller(oldComptroller, newComptroller)\\n emit NewComptroller(oldComptroller, newComptroller);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\\n * @dev Governance function to accrue interest and update the interest rate model\\n * @param newInterestRateModel_ The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\\n ensureAllowed(\\\"_setInterestRateModel(address)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\\n }\\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\\n return _setInterestRateModelFresh(newInterestRateModel_);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view returns (uint) {\\n (MathError err, uint result) = exchangeRateStoredInternal();\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view returns (uint) {\\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\\n * @dev Called by both `transfer` and `transferFrom` internally\\n * @param spender The address of the account performing the transfer\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param tokens The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\\n /* Fail if transfer not allowed */\\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Do not allow self-transfers */\\n if (src == dst) {\\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n /* Get the allowance, infinite for the account owner */\\n uint startingAllowance = 0;\\n if (spender == src) {\\n startingAllowance = uint(-1);\\n } else {\\n startingAllowance = transferAllowances[src][spender];\\n }\\n\\n /* Do the calculations, checking for {under,over}flow */\\n MathError mathErr;\\n uint allowanceNew;\\n uint srvTokensNew;\\n uint dstTokensNew;\\n\\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\\n }\\n\\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n accountTokens[src] = srvTokensNew;\\n accountTokens[dst] = dstTokensNew;\\n\\n /* Eat some of the allowance (if necessary) */\\n if (startingAllowance != uint(-1)) {\\n transferAllowances[src][spender] = allowanceNew;\\n }\\n\\n /* We emit a Transfer event */\\n emit Transfer(src, dst, tokens);\\n\\n comptroller.transferVerify(address(this), src, dst, tokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintFresh(msg.sender, mintAmount);\\n }\\n\\n /**\\n * @notice User supplies assets into the market and receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param minter The address of the account which is supplying the assets\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the minter and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[minter] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[minter] = vars.accountTokensNew;\\n\\n /* We emit a Mint event, and a Transfer event */\\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), minter, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The address of the account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\\n }\\n\\n /**\\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param payer The address of the account which is paying the underlying token\\n * @param receiver The address of the account which is receiving vToken\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\\n ensureNonZeroAddress(receiver);\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the payer and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[receiver] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[receiver] = vars.accountTokensNew;\\n\\n /* We emit a MintBehalf event, and a Transfer event */\\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), receiver, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokens\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens, if called by a delegate\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlyingInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // solhint-disable-next-line code-complexity\\n function redeemFresh(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokensIn,\\n uint redeemAmountIn\\n ) internal returns (uint) {\\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \\\"one of redeemTokensIn or redeemAmountIn must be zero\\\");\\n\\n RedeemLocalVars memory vars;\\n\\n /* exchangeRate = invoke Exchange Rate Stored() */\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n ensureNoMathError(vars.mathErr);\\n\\n /* If redeemTokensIn > 0: */\\n if (redeemTokensIn > 0) {\\n /*\\n * We calculate the exchange rate and the amount of underlying to be redeemed:\\n * redeemTokens = redeemTokensIn\\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\\n */\\n vars.redeemTokens = redeemTokensIn;\\n\\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\\n Exp({ mantissa: vars.exchangeRateMantissa }),\\n redeemTokensIn\\n );\\n ensureNoMathError(vars.mathErr);\\n } else {\\n /*\\n * We get the current exchange rate and calculate the amount to be redeemed:\\n * redeemTokens = redeemAmountIn / exchangeRate\\n * redeemAmount = redeemAmountIn\\n */\\n\\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\\n redeemAmountIn,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n vars.redeemAmount = redeemAmountIn;\\n }\\n\\n /* Fail if redeem not allowed */\\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /*\\n * We calculate the new total supply and redeemer balance, checking for underflow:\\n * totalSupplyNew = totalSupply - redeemTokens\\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* Fail gracefully if protocol has insufficient cash */\\n if (getCashPrior() < vars.redeemAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[redeemer] = vars.accountTokensNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the redeemAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken has redeemAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n\\n uint feeAmount;\\n uint remainedAmount;\\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\\n (vars.mathErr, feeAmount) = mulUInt(\\n vars.redeemAmount,\\n IComptroller(address(comptroller)).treasuryPercent()\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\\n\\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\\n } else {\\n remainedAmount = vars.redeemAmount;\\n }\\n\\n doTransferOut(receiver, remainedAmount);\\n\\n /* We emit a Transfer event, and a Redeem event */\\n emit Transfer(redeemer, address(this), vars.redeemTokens);\\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrowInternal(\\n address borrower,\\n address payable receiver,\\n uint borrowAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\\n }\\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\\n return borrowFresh(borrower, receiver, borrowAmount);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @dev Before calling this function, ensure that the interest has been accrued\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\\n */\\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\\n /* Revert if borrow not allowed */\\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Revert if protocol has insufficient underlying cash */\\n if (getCashPrior() < borrowAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n BorrowLocalVars memory vars;\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on overflow:\\n * accountBorrowsNew = accountBorrows + borrowAmount\\n * totalBorrowsNew = totalBorrows + borrowAmount\\n */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the borrowAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken borrowAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n doTransferOut(receiver, borrowAmount);\\n\\n /* We emit a Borrow event */\\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\\n }\\n\\n /**\\n * @notice Borrows are repaid by another user (possibly the borrower).\\n * @param payer The account paying off the borrow\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount of undelrying tokens being returned\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\\n /* Fail if repayBorrow not allowed */\\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\\n if (allowed != 0) {\\n return (\\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\\n 0\\n );\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\\n }\\n\\n RepayBorrowLocalVars memory vars;\\n\\n /* We remember the original borrowerIndex for verification purposes */\\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\\n\\n /* We fetch the amount the borrower owes, with accumulated interest */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n uint(vars.mathErr)\\n ),\\n 0\\n );\\n }\\n\\n /* If repayAmount == -1, repayAmount = accountBorrows */\\n if (repayAmount == uint(-1)) {\\n vars.repayAmount = vars.accountBorrows;\\n } else {\\n vars.repayAmount = repayAmount;\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the payer and the repayAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional repayAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on underflow:\\n * accountBorrowsNew = accountBorrows - actualRepayAmount\\n * totalBorrowsNew = totalBorrows - actualRepayAmount\\n */\\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /* We emit a RepayBorrow event */\\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\\n\\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function liquidateBorrowInternal(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\\n }\\n\\n error = vTokenCollateral.accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\\n }\\n\\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\\n }\\n\\n /**\\n * @notice The liquidator liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param liquidator The address repaying the borrow and seizing collateral\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n // solhint-disable-next-line code-complexity\\n function liquidateBorrowFresh(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal returns (uint, uint) {\\n /* Fail if liquidate not allowed */\\n uint allowed = comptroller.liquidateBorrowAllowed(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n repayAmount\\n );\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Verify vTokenCollateral market's block number equals current block number */\\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\\n }\\n\\n /* Fail if repayAmount = 0 */\\n if (repayAmount == 0) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\\n }\\n\\n /* Fail if repayAmount = -1 */\\n if (repayAmount == uint(-1)) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\\n }\\n\\n /* Fail if repayBorrow fails */\\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\\n if (repayBorrowError != uint(Error.NO_ERROR)) {\\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We calculate the number of collateral tokens that will be seized */\\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\\n address(this),\\n address(vTokenCollateral),\\n actualRepayAmount\\n );\\n require(amountSeizeError == uint(Error.NO_ERROR), \\\"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\\\");\\n\\n /* Revert if borrower collateral token balance < seizeTokens */\\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \\\"LIQUIDATE_SEIZE_TOO_MUCH\\\");\\n\\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\\n uint seizeError;\\n if (address(vTokenCollateral) == address(this)) {\\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\\n } else {\\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\\n }\\n\\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\\n require(seizeError == uint(Error.NO_ERROR), \\\"token seizure failed\\\");\\n\\n /* We emit a LiquidateBorrow event */\\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.liquidateBorrowVerify(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n actualRepayAmount,\\n seizeTokens\\n );\\n\\n return (uint(Error.NO_ERROR), actualRepayAmount);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seizeInternal(\\n address seizerToken,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) internal returns (uint) {\\n /* Fail if seize not allowed */\\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\\n }\\n\\n MathError mathErr;\\n uint borrowerTokensNew;\\n uint liquidatorTokensNew;\\n\\n /*\\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\\n */\\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\\n }\\n\\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountTokens[borrower] = borrowerTokensNew;\\n accountTokens[liquidator] = liquidatorTokensNew;\\n\\n /* Emit a Transfer event */\\n emit Transfer(borrower, liquidator, seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\\n * @dev Governance function to set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\\n // Verify market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\\n }\\n\\n // Check newReserveFactor \\u2264 maxReserveFactor\\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\\n }\\n\\n uint oldReserveFactorMantissa = reserveFactorMantissa;\\n reserveFactorMantissa = newReserveFactorMantissa;\\n\\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\\n * @param addAmount Amount of addition to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\\n (error, ) = _addReservesFresh(addAmount);\\n return error;\\n }\\n\\n /**\\n * @notice Add reserves by transferring from caller\\n * @dev Requires fresh interest accrual\\n * @param addAmount Amount of addition to reserves\\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\\n */\\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\\n // totalReserves + actualAddAmount\\n uint totalReservesNew;\\n uint actualAddAmount;\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the caller and the addAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional addAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n\\n actualAddAmount = doTransferIn(msg.sender, addAmount);\\n\\n totalReservesNew = totalReserves + actualAddAmount;\\n\\n /* Revert on overflow */\\n require(totalReservesNew >= totalReserves, \\\"add reserves unexpected overflow\\\");\\n\\n // Store reserves[n+1] = reserves[n] + actualAddAmount\\n totalReserves = totalReservesNew;\\n\\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\\n\\n /* Return (NO_ERROR, actualAddAmount) */\\n return (uint(Error.NO_ERROR), actualAddAmount);\\n }\\n\\n /**\\n * @notice Reduces reserves by transferring to protocol share reserve contract\\n * @dev Requires fresh interest accrual\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\\n if (reduceAmount == 0) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\\n }\\n\\n // Fail gracefully if protocol has insufficient underlying cash\\n if (getCashPrior() < reduceAmount) {\\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\\n }\\n\\n // Check reduceAmount \\u2264 reserves[n] (totalReserves)\\n if (reduceAmount > totalReserves) {\\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n // totalReserves - reduceAmount\\n uint totalReservesNew = totalReserves - reduceAmount;\\n\\n // Store reserves[n+1] = reserves[n] - reduceAmount\\n totalReserves = totalReservesNew;\\n\\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n doTransferOut(protocolShareReserve, reduceAmount);\\n\\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\\n address(comptroller),\\n underlying,\\n IProtocolShareReserveV5.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice updates the interest rate model (requires fresh interest accrual)\\n * @dev Governance function to update the interest rate model\\n * @param newInterestRateModel the new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\\n // Used to store old model for use in the event that is emitted on success\\n InterestRateModel oldInterestRateModel;\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\\n }\\n\\n // Track the market's current interest rate model\\n oldInterestRateModel = interestRateModel;\\n\\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\\n require(newInterestRateModel.isInterestRateModel(), \\\"marker method returned false\\\");\\n\\n // Set the interest rate model to newInterestRateModel\\n interestRateModel = newInterestRateModel;\\n\\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\\n * This may revert due to insufficient balance or insufficient allowance.\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint);\\n\\n /**\\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\\n */\\n function doTransferOut(address payable to, uint amount) internal;\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\\n */\\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\\n /* Note: we do not assert that the market is up to date */\\n MathError mathErr;\\n uint principalTimesIndex;\\n uint result;\\n\\n /* Get borrowBalance and borrowIndex */\\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\\n\\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\\n */\\n if (borrowSnapshot.principal == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n /* Calculate new borrow balance using the interest index:\\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\\n */\\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, result);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the vToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\\n uint _totalSupply = totalSupply;\\n if (_totalSupply == 0) {\\n /*\\n * If there are no tokens minted:\\n * exchangeRate = initialExchangeRate\\n */\\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\\n } else {\\n /*\\n * Otherwise:\\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\\n */\\n uint totalCash = getCashPrior();\\n uint cashPlusBorrowsMinusReserves;\\n Exp memory exchangeRate;\\n MathError mathErr;\\n\\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, exchangeRate.mantissa);\\n }\\n }\\n\\n function ensureAllowed(string memory functionSig) private view {\\n require(\\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\\n \\\"access denied\\\"\\n );\\n }\\n\\n function ensureAdmin(address caller_) private view {\\n require(caller_ == admin, \\\"Unauthorized\\\");\\n }\\n\\n function ensureNoMathError(MathError mErr) private pure {\\n require(mErr == MathError.NO_ERROR, \\\"math error\\\");\\n }\\n\\n function ensureNonZeroAddress(address address_) private pure {\\n require(address_ != address(0), \\\"zero address\\\");\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying owned by this contract\\n */\\n function getCashPrior() internal view returns (uint);\\n}\\n\",\"keccak256\":\"0xfdbcdbd6cab4aeba2c06f39adbfbd8e42a3e50d02aed628c2d76b97659d84b68\"},\"contracts/Tokens/VTokens/VTokenInterfaces.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\n\\ninterface IProtocolShareReserveV5 {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\\n}\\n\\ncontract VTokenStorageBase {\\n /**\\n * @notice Container for borrow balance information\\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\\n */\\n struct BorrowSnapshot {\\n uint principal;\\n uint interestIndex;\\n }\\n\\n /**\\n * @dev Guard variable for re-entrancy checks\\n */\\n bool internal _notEntered;\\n\\n /**\\n * @notice EIP-20 token name for this token\\n */\\n string public name;\\n\\n /**\\n * @notice EIP-20 token symbol for this token\\n */\\n string public symbol;\\n\\n /**\\n * @notice EIP-20 token decimals for this token\\n */\\n uint8 public decimals;\\n\\n /**\\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\\n */\\n\\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\\n\\n /**\\n * @notice Maximum fraction of interest that can be set aside for reserves\\n */\\n uint internal constant reserveFactorMaxMantissa = 1e18;\\n\\n /**\\n * @notice Administrator for this contract\\n */\\n address payable public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address payable public pendingAdmin;\\n\\n /**\\n * @notice Contract which oversees inter-vToken operations\\n */\\n ComptrollerInterface public comptroller;\\n\\n /**\\n * @notice Model which tells what the current interest rate should be\\n */\\n InterestRateModel public interestRateModel;\\n\\n /**\\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\\n */\\n uint internal initialExchangeRateMantissa;\\n\\n /**\\n * @notice Fraction of interest currently set aside for reserves\\n */\\n uint public reserveFactorMantissa;\\n\\n /**\\n * @notice Block number that interest was last accrued at\\n */\\n uint public accrualBlockNumber;\\n\\n /**\\n * @notice Accumulator of the total earned interest rate since the opening of the market\\n */\\n uint public borrowIndex;\\n\\n /**\\n * @notice Total amount of outstanding borrows of the underlying in this market\\n */\\n uint public totalBorrows;\\n\\n /**\\n * @notice Total amount of reserves of the underlying held in this market\\n */\\n uint public totalReserves;\\n\\n /**\\n * @notice Total number of tokens in circulation\\n */\\n uint public totalSupply;\\n\\n /**\\n * @notice Official record of token balances for each account\\n */\\n mapping(address => uint) internal accountTokens;\\n\\n /**\\n * @notice Approved token transfer amounts on behalf of others\\n */\\n mapping(address => mapping(address => uint)) internal transferAllowances;\\n\\n /**\\n * @notice Mapping of account addresses to outstanding borrow balances\\n */\\n mapping(address => BorrowSnapshot) internal accountBorrows;\\n\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n address public underlying;\\n\\n /**\\n * @notice Implementation address for this contract\\n */\\n address public implementation;\\n\\n /**\\n * @notice delta block after which reserves will be reduced\\n */\\n uint public reduceReservesBlockDelta;\\n\\n /**\\n * @notice last block number at which reserves were reduced\\n */\\n uint public reduceReservesBlockNumber;\\n\\n /**\\n * @notice address of protocol share reserve contract\\n */\\n address payable public protocolShareReserve;\\n\\n /**\\n * @notice address of accessControlManager\\n */\\n\\n address public accessControlManager;\\n}\\n\\ncontract VTokenStorage is VTokenStorageBase {\\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\\ncontract VTokenInterface is VTokenStorage {\\n /**\\n * @notice Indicator that this is a vToken contract (for inspection)\\n */\\n bool public constant isVToken = true;\\n\\n /*** Market Events ***/\\n\\n /**\\n * @notice Event emitted when interest is accrued\\n */\\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when tokens are minted\\n */\\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are minted behalf by payer to receiver\\n */\\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed\\n */\\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed and fee is transferred\\n */\\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\\n\\n /**\\n * @notice Event emitted when underlying is borrowed\\n */\\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is repaid\\n */\\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is liquidated\\n */\\n event LiquidateBorrow(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n address vTokenCollateral,\\n uint seizeTokens\\n );\\n\\n /*** Admin Events ***/\\n\\n /**\\n * @notice Event emitted when pendingAdmin is changed\\n */\\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\\n\\n /**\\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\\n */\\n event NewAdmin(address oldAdmin, address newAdmin);\\n\\n /**\\n * @notice Event emitted when comptroller is changed\\n */\\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\\n\\n /**\\n * @notice Event emitted when interestRateModel is changed\\n */\\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\\n\\n /**\\n * @notice Event emitted when the reserve factor is changed\\n */\\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\\n\\n /**\\n * @notice Event emitted when the reserves are added\\n */\\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\\n\\n /**\\n * @notice Event emitted when the reserves are reduced\\n */\\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\\n\\n /**\\n * @notice EIP20 Transfer event\\n */\\n event Transfer(address indexed from, address indexed to, uint amount);\\n\\n /**\\n * @notice EIP20 Approval event\\n */\\n event Approval(address indexed owner, address indexed spender, uint amount);\\n\\n /**\\n * @notice Event emitted when block delta for reduce reserves get updated\\n */\\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\\n\\n /**\\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\\n */\\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\\n\\n /**\\n * @notice Failure event\\n */\\n event Failure(uint error, uint info, uint detail);\\n\\n /// @notice Emitted when access control address is changed by admin\\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\\n\\n /*** User Interface ***/\\n\\n function transfer(address dst, uint amount) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint amount) external returns (bool);\\n\\n function approve(address spender, uint amount) external returns (bool);\\n\\n function balanceOfUnderlying(address owner) external returns (uint);\\n\\n function totalBorrowsCurrent() external returns (uint);\\n\\n function borrowBalanceCurrent(address account) external returns (uint);\\n\\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _acceptAdmin() external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function balanceOf(address owner) external view returns (uint);\\n\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\\n\\n function borrowRatePerBlock() external view returns (uint);\\n\\n function supplyRatePerBlock() external view returns (uint);\\n\\n function getCash() external view returns (uint);\\n\\n function exchangeRateCurrent() public returns (uint);\\n\\n function accrueInterest() public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\\n\\n function borrowBalanceStored(address account) public view returns (uint);\\n\\n function exchangeRateStored() public view returns (uint);\\n}\\n\\ncontract VBep20Interface {\\n /*** User Interface ***/\\n\\n function mint(uint mintAmount) external returns (uint);\\n\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n function redeem(uint redeemTokens) external returns (uint);\\n\\n function redeemUnderlying(uint redeemAmount) external returns (uint);\\n\\n function borrow(uint borrowAmount) external returns (uint);\\n\\n function repayBorrow(uint repayAmount) external returns (uint);\\n\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\\n\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint);\\n\\n /*** Admin Functions ***/\\n\\n function _addReserves(uint addAmount) external returns (uint);\\n}\\n\\ncontract VDelegatorInterface {\\n /**\\n * @notice Emitted when implementation is changed\\n */\\n event NewImplementation(address oldImplementation, address newImplementation);\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public;\\n}\\n\\ncontract VDelegateInterface {\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @dev Should revert if any issues arise which make it unfit for delegation\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public;\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public;\\n}\\n\",\"keccak256\":\"0x2f12533847458414b423cc85677489709d772bec4e48933ae983d6861202a41b\"},\"contracts/Utils/CarefulMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Careful Math\\n * @author Venus\\n * @notice Derived from OpenZeppelin's SafeMath library\\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\\n */\\ncontract CarefulMath {\\n /**\\n * @dev Possible error codes that we can return\\n */\\n enum MathError {\\n NO_ERROR,\\n DIVISION_BY_ZERO,\\n INTEGER_OVERFLOW,\\n INTEGER_UNDERFLOW\\n }\\n\\n /**\\n * @dev Multiplies two numbers, returns an error on overflow.\\n */\\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (a == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n uint c = a * b;\\n\\n if (c / a != b) {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n } else {\\n return (MathError.NO_ERROR, c);\\n }\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b == 0) {\\n return (MathError.DIVISION_BY_ZERO, 0);\\n }\\n\\n return (MathError.NO_ERROR, a / b);\\n }\\n\\n /**\\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b <= a) {\\n return (MathError.NO_ERROR, a - b);\\n } else {\\n return (MathError.INTEGER_UNDERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev Adds two numbers, returns an error on overflow.\\n */\\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n uint c = a + b;\\n\\n if (c >= a) {\\n return (MathError.NO_ERROR, c);\\n } else {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev add a and b and then subtract c\\n */\\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\\n (MathError err0, uint sum) = addUInt(a, b);\\n\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, 0);\\n }\\n\\n return subUInt(sum, c);\\n }\\n}\\n\",\"keccak256\":\"0x5bd84fb723641b98d0559272323b90ce42595f025af89cfb214d8c064c9ee3c3\"},\"contracts/Utils/ErrorReporter.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\ncontract ComptrollerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n COMPTROLLER_MISMATCH,\\n INSUFFICIENT_SHORTFALL,\\n INSUFFICIENT_LIQUIDITY,\\n INVALID_CLOSE_FACTOR,\\n INVALID_COLLATERAL_FACTOR,\\n INVALID_LIQUIDATION_INCENTIVE,\\n MARKET_NOT_ENTERED, // no longer possible\\n MARKET_NOT_LISTED,\\n MARKET_ALREADY_LISTED,\\n MATH_ERROR,\\n NONZERO_BORROW_BALANCE,\\n PRICE_ERROR,\\n REJECTION,\\n SNAPSHOT_ERROR,\\n TOO_MANY_ASSETS,\\n TOO_MUCH_REPAY,\\n INSUFFICIENT_BALANCE_FOR_VAI,\\n MARKET_NOT_COLLATERAL\\n }\\n\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n EXIT_MARKET_BALANCE_OWED,\\n EXIT_MARKET_REJECTION,\\n SET_CLOSE_FACTOR_OWNER_CHECK,\\n SET_CLOSE_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_NO_EXISTS,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\\n SET_IMPLEMENTATION_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_PRICE_ORACLE_OWNER_CHECK,\\n SUPPORT_MARKET_EXISTS,\\n SUPPORT_MARKET_OWNER_CHECK,\\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\\n SET_VAI_MINT_RATE_CHECK,\\n SET_VAICONTROLLER_OWNER_CHECK,\\n SET_MINTED_VAI_REJECTION,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract TokenErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n BAD_INPUT,\\n COMPTROLLER_REJECTION,\\n COMPTROLLER_CALCULATION_ERROR,\\n INTEREST_RATE_MODEL_ERROR,\\n INVALID_ACCOUNT_PAIR,\\n INVALID_CLOSE_AMOUNT_REQUESTED,\\n INVALID_COLLATERAL_FACTOR,\\n MATH_ERROR,\\n MARKET_NOT_FRESH,\\n MARKET_NOT_LISTED,\\n TOKEN_INSUFFICIENT_ALLOWANCE,\\n TOKEN_INSUFFICIENT_BALANCE,\\n TOKEN_INSUFFICIENT_CASH,\\n TOKEN_TRANSFER_IN_FAILED,\\n TOKEN_TRANSFER_OUT_FAILED,\\n TOKEN_PRICE_ERROR\\n }\\n\\n /*\\n * Note: FailureInfo (but not Error) is kept in alphabetical order\\n * This is because FailureInfo grows significantly faster, and\\n * the order of Error has some meaning, while the order of FailureInfo\\n * is entirely arbitrary.\\n */\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n BORROW_ACCRUE_INTEREST_FAILED,\\n BORROW_CASH_NOT_AVAILABLE,\\n BORROW_FRESHNESS_CHECK,\\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n BORROW_MARKET_NOT_LISTED,\\n BORROW_COMPTROLLER_REJECTION,\\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n LIQUIDATE_COMPTROLLER_REJECTION,\\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n LIQUIDATE_FRESHNESS_CHECK,\\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_ACCRUE_INTEREST_FAILED,\\n MINT_COMPTROLLER_REJECTION,\\n MINT_EXCHANGE_CALCULATION_FAILED,\\n MINT_EXCHANGE_RATE_READ_FAILED,\\n MINT_FRESHNESS_CHECK,\\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n MINT_TRANSFER_IN_FAILED,\\n MINT_TRANSFER_IN_NOT_POSSIBLE,\\n REDEEM_ACCRUE_INTEREST_FAILED,\\n REDEEM_COMPTROLLER_REJECTION,\\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_RATE_READ_FAILED,\\n REDEEM_FRESHNESS_CHECK,\\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\\n REDUCE_RESERVES_ADMIN_CHECK,\\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\\n REDUCE_RESERVES_FRESH_CHECK,\\n REDUCE_RESERVES_VALIDATION,\\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_COMPTROLLER_REJECTION,\\n REPAY_BORROW_FRESHNESS_CHECK,\\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COMPTROLLER_OWNER_CHECK,\\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_ORACLE_MARKET_NOT_LISTED,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\\n SET_RESERVE_FACTOR_ADMIN_CHECK,\\n SET_RESERVE_FACTOR_FRESH_CHECK,\\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\\n TRANSFER_COMPTROLLER_REJECTION,\\n TRANSFER_NOT_ALLOWED,\\n TRANSFER_NOT_ENOUGH,\\n TRANSFER_TOO_MUCH,\\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\\n ADD_RESERVES_FRESH_CHECK,\\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\\n REPAY_VAI_COMPTROLLER_REJECTION,\\n REPAY_VAI_FRESHNESS_CHECK,\\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract VAIControllerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED, // The sender is not authorized to perform this action.\\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\\n MATH_ERROR, // A math calculation error occurred.\\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\\n }\\n\\n enum FailureInfo {\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_COMPTROLLER_OWNER_CHECK,\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n VAI_MINT_REJECTION,\\n VAI_BURN_REJECTION,\\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n VAI_LIQUIDATE_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_FEE_CALCULATION_FAILED,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\",\"keccak256\":\"0xc77c4dd91f93f778c5048fa0e68cc0cad2fd4a308add54f0172c507858ce06c8\"},\"contracts/Utils/Exponential.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"./CarefulMath.sol\\\";\\nimport \\\"./ExponentialNoError.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Venus\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract Exponential is CarefulMath, ExponentialNoError {\\n /**\\n * @dev Creates an exponential from numerator and denominator values.\\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\\n * or if `denom` is zero.\\n */\\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\\n }\\n\\n /**\\n * @dev Adds two exponentials, returning a new exponential.\\n */\\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Subtracts two exponentials, returning a new exponential.\\n */\\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, returning a new Exp.\\n */\\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(product));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return addUInt(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Divide an Exp by a scalar, returning a new Exp.\\n */\\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, returning a new Exp.\\n */\\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\\n /*\\n We are doing this as:\\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\\n\\n How it works:\\n Exp = a / b;\\n Scalar = s;\\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\\n */\\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n return getExp(numerator, divisor.mantissa);\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\\n */\\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(fraction));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials, returning a new exponential.\\n */\\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n // We add half the scale before dividing so that we get rounding instead of truncation.\\n // See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717\\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\\n assert(err2 == MathError.NO_ERROR);\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\\n */\\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\\n }\\n\\n /**\\n * @dev Multiplies three exponentials, returning a new exponential.\\n */\\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\\n (MathError err, Exp memory ab) = mulExp(a, b);\\n if (err != MathError.NO_ERROR) {\\n return (err, ab);\\n }\\n return mulExp(ab, c);\\n }\\n\\n /**\\n * @dev Divides two exponentials, returning a new exponential.\\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\\n */\\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n return getExp(a.mantissa, b.mantissa);\\n }\\n}\\n\",\"keccak256\":\"0x92a68e9f6de3a70b103aa0ddb68faa8e60c443b1268e03853d5054171fe8e290\"},\"contracts/Utils/ExponentialNoError.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n uint internal constant expScale = 1e18;\\n uint internal constant doubleScale = 1e36;\\n uint internal constant halfExpScale = expScale / 2;\\n uint internal constant mantissaOne = expScale;\\n\\n struct Exp {\\n uint mantissa;\\n }\\n\\n struct Double {\\n uint mantissa;\\n }\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / expScale;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp <= right Exp.\\n */\\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa <= right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp > right Exp.\\n */\\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa > right.mantissa;\\n }\\n\\n /**\\n * @dev returns true if Exp is exactly zero\\n */\\n function isZeroExp(Exp memory value) internal pure returns (bool) {\\n return value.mantissa == 0;\\n }\\n\\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\\n require(n < 2 ** 224, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2 ** 32, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint a, uint b) internal pure returns (uint) {\\n return add_(a, b, \\\"addition overflow\\\");\\n }\\n\\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint a, uint b) internal pure returns (uint) {\\n return sub_(a, b, \\\"subtraction underflow\\\");\\n }\\n\\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\\n }\\n\\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / expScale;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\\n }\\n\\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Double memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / doubleScale;\\n }\\n\\n function mul_(uint a, uint b) internal pure returns (uint) {\\n return mul_(a, b, \\\"multiplication overflow\\\");\\n }\\n\\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n uint c = a * b;\\n require(c / a == b, errorMessage);\\n return c;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Exp memory b) internal pure returns (uint) {\\n return div_(mul_(a, expScale), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Double memory b) internal pure returns (uint) {\\n return div_(mul_(a, doubleScale), b.mantissa);\\n }\\n\\n function div_(uint a, uint b) internal pure returns (uint) {\\n return div_(a, b, \\\"divide by zero\\\");\\n }\\n\\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n function fraction(uint a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\\n }\\n}\\n\",\"keccak256\":\"0x237e63d9ad2bf232d70f854b8867a465913cab4d2033d295ec7736bf618ca302\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50615a7280620000216000396000f3fe608060405234801561001057600080fd5b50600436106103af5760003560e01c806373acee98116101f4578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610c75578063f851a44014610cab578063f8f9da2814610cb3578063fca7820b14610cbb576103af565b8063e9a44fd914610c37578063e9c714f214610c3f578063f2b3abbd14610c47578063f3fdb15a14610c6d576103af565b8063d1109c2f116100e9578063d1109c2f14610bb8578063db006a7514610bc0578063dd62ed3e14610bdd578063df3a516e14610c0b576103af565b8063b71d1a0c14610b21578063bd6d894d14610b47578063c37f68e214610b4f578063c5ebeaec14610b9b576103af565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610ad3578063ae9d70b014610adb578063b2a02ff114610ae3578063b4a0bdf314610b19576103af565b8063a0712d6814610a7a578063a6afed9514610a97578063a9059cbb14610a9f578063aa5af0fd14610acb576103af565b80638f840ddd116101ce5780638f840ddd146108f657806395d89b41146108fe57806395dd91931461090657806399d8c1b41461092c576103af565b806373acee98146108a5578063852a12e3146108ad578063856e5bb3146108ca576103af565b806326782247116102d95780634576b5db11610277578063601a0bf111610246578063601a0bf1146108525780636c540baf1461086f5780636f307dc31461087757806370a082311461087f576103af565b80634576b5db1461081457806347bd37181461083a5780635c60da1b146108425780635fe3b5671461084a576103af565b80633b1d21a2116102b35780633b1d21a2146107c15780633d9ea3a1146107c95780633e941010146107d157806342f82260146107ee576103af565b80632678224714610759578063313ce5671461077d5780633af9e6691461079b576103af565b806318160ddd1161035157806323323e031161032057806323323e03146106ae57806323b872dd146106da5780632464176b146107105780632608f8181461072d576103af565b806318160ddd1461051c578063182df0f5146105245780631a31d4651461052c578063210bc05214610682576103af565b80630e7527021161038d5780630e752702146104a9578063107568df146104c6578063173b9904146104ee57806317bfdfbc146104f6576103af565b806306fdde03146103b4578063095ea7b3146104315780630e32cb8614610471575b600080fd5b6103bc610cd8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103f65781810151838201526020016103de565b50505050905090810190601f1680156104235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561044757600080fd5b506001600160a01b038135169060200135610d65565b604080519115158252519081900360200190f35b6104976004803603602081101561048757600080fd5b50356001600160a01b0316610dcb565b60408051918252519081900360200190f35b610497600480360360208110156104bf57600080fd5b5035610e4d565b6104ec600480360360208110156104dc57600080fd5b50356001600160a01b0316610e61565b005b610497610ecf565b6104976004803603602081101561050c57600080fd5b50356001600160a01b0316610ed5565b610497610f95565b610497610f9b565b6104ec600480360360e081101561054257600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561058457600080fd5b82018360208201111561059657600080fd5b803590602001918460018302840111600160201b831117156105b757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561060957600080fd5b82018360208201111561061b57600080fd5b803590602001918460018302840111600160201b8311171561063c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610fbc9050565b6104976004803603604081101561069857600080fd5b506001600160a01b03813516906020013561105b565b610497600480360360408110156106c457600080fd5b506001600160a01b03813516906020013561113c565b61045d600480360360608110156106f057600080fd5b506001600160a01b03813581169160208101359091169060400135611152565b6104ec6004803603602081101561072657600080fd5b50356111c5565b6104976004803603604081101561074357600080fd5b506001600160a01b03813516906020013561126d565b61076161127a565b604080516001600160a01b039092168252519081900360200190f35b610785611289565b6040805160ff9092168252519081900360200190f35b610497600480360360208110156107b157600080fd5b50356001600160a01b0316611292565b6104976112f0565b61045d6112ff565b610497600480360360208110156107e757600080fd5b5035611304565b6104ec6004803603602081101561080457600080fd5b50356001600160a01b031661130f565b6104976004803603602081101561082a57600080fd5b50356001600160a01b0316611331565b610497611463565b610761611469565b610761611478565b6104976004803603602081101561086857600080fd5b5035611487565b610497611572565b610761611578565b6104976004803603602081101561089557600080fd5b50356001600160a01b0316611587565b6104976115a2565b610497600480360360208110156108c357600080fd5b5035611658565b610497600480360360408110156108e057600080fd5b506001600160a01b038135169060200135611665565b61049761173f565b6103bc611745565b6104976004803603602081101561091c57600080fd5b50356001600160a01b031661179d565b6104ec600480360360c081101561094257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561097c57600080fd5b82018360208201111561098e57600080fd5b803590602001918460018302840111600160201b831117156109af57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610a0157600080fd5b820183602082011115610a1357600080fd5b803590602001918460018302840111600160201b83111715610a3457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506117b89050565b61049760048036036020811015610a9057600080fd5b5035611953565b61049761195f565b61045d60048036036040811015610ab557600080fd5b506001600160a01b038135169060200135611ca2565b610497611d13565b610497611d19565b610497611d1f565b61049760048036036060811015610af957600080fd5b506001600160a01b03813581169160208101359091169060400135611dbe565b610761611e2f565b61049760048036036020811015610b3757600080fd5b50356001600160a01b0316611e3e565b610497611eaf565b610b7560048036036020811015610b6557600080fd5b50356001600160a01b0316611f6b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61049760048036036020811015610bb157600080fd5b5035612000565b61049761200d565b61049760048036036020811015610bd657600080fd5b5035612013565b61049760048036036040811015610bf357600080fd5b506001600160a01b0381358116916020013516612020565b61049760048036036040811015610c2157600080fd5b506001600160a01b03813516906020013561204b565b610761612125565b610497612134565b61049760048036036020811015610c5d57600080fd5b50356001600160a01b031661222c565b6107616122a5565b61049760048036036060811015610c8b57600080fd5b506001600160a01b038135811691602081013591604090910135166122b4565b6107616122cc565b6104976122e0565b61049760048036036020811015610cd157600080fd5b5035612344565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b820191906000526020600020905b815481529060010190602001808311610d4057829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610dd633612401565b610ddf8261245a565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610e59836124a4565b509392505050565b610e6a33612401565b610e738161245a565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6000805460ff16610f1a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610f2c61195f565b14610f77576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610f808261179d565b90505b6000805460ff19166001179055919050565b600d5481565b6000806000610fa861254d565b91509150610fb5826125fc565b9150505b90565b610fca8686868686866117b8565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b505161112a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612649565b9392505050565b60008061114984846126ea565b50949350505050565b6000805460ff16611197576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556111ad33868686612795565b1490505b6000805460ff191660011790559392505050565b6000811161120a576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61122b60405180606001604052806024815260200161594160249139612aa3565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b6000806111498484612bc4565b6004546001600160a01b031681565b60035460ff1681565b600061129c6157cc565b60405180602001604052806112af611eaf565b90526001600160a01b0384166000908152600e60205260408120549192509081906112db908490612c46565b915091506112e8826125fc565b949350505050565b60006112fa612c9a565b905090565b600181565b6000610e4582612ce5565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061133c33612401565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d60208110156113ab57600080fd5b50516113fe576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff166114cc576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261151390612aa3565b600061151d61195f565b905080156115435761153b81601181111561153457fe5b6030612d79565b915050610f83565b43601454141561155457600061153b565b61155d83612ddf565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff166115e7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556115f961195f565b14611644576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610e45333384612f23565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156116bc57600080fd5b505afa1580156116d0573d6000803e3d6000fd5b505050506040513d60208110156116e657600080fd5b5051611734576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f9e565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b60008060006117ab8461301e565b91509150611135826125fc565b6117c133612401565b6009541580156117d15750600a54155b61180c5760405162461bcd60e51b815260040180806020018281038252602381526020018061591e6023913960400191505060405180910390fd5b60078490558361184d5760405162461bcd60e51b81526004018080602001828103825260308152602001806159656030913960400191505060405180910390fd5b600061185887611331565b905080156118ad576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a556118c6866130d2565b905080156119055760405162461bcd60e51b81526004018080602001828103825260228152602001806159956022913960400191505060405180910390fd5b83516119189060019060208701906157df565b50825161192c9060029060208601906157df565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610e598361321b565b60095460009043908082141561197a57600092505050610fb9565b6000611984612c9a565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051905065048c27395000811115611a7b576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611a888989613295565b91509150611a95826125fc565b611a9d6157cc565b600080600080611abb60405180602001604052808a815250876132b8565b90975094506000876003811115611ace57fe5b14611b0057611aeb60096006896003811115611ae657fe5b613320565b9e505050505050505050505050505050610fb9565b611b0a858c612c46565b90975093506000876003811115611b1d57fe5b14611b3557611aeb60096001896003811115611ae657fe5b611b3f848c613386565b90975092506000876003811115611b5257fe5b14611b6a57611aeb60096004896003811115611ae657fe5b611b856040518060200160405280600854815250858c6133ac565b90975091506000876003811115611b9857fe5b14611bb057611aeb60096005896003811115611ae657fe5b611bbb858a8b6133ac565b90975090506000876003811115611bce57fe5b14611be657611aeb60096003896003811115611ae657fe5b60098e9055600a819055600b839055600c829055601454611c08908f90613295565b9097509550611c16876125fc565b6013548610611c465760148e9055818c1015611c3b57611c358c612ddf565b50611c46565b611c4482612ddf565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611ce7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611cfd33338686612795565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611d3b612c9a565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611d8d57600080fd5b505afa158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b5051905090565b6000805460ff16611e03576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611e1933858585613408565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611e4933612401565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611135565b6000805460ff16611ef4576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611f0661195f565b14611f51576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611f59610f9b565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e6020526040812054819081908190818080611f968961301e565b935090506000816003811115611fa857fe5b14611fc65760095b975060009650869550859450611ff99350505050565b611fce61254d565b925090506000816003811115611fe057fe5b14611fec576009611fb0565b5060009650919450925090505b9193509193565b6000610e45333384612f9e565b60135481565b6000610e45333384612649565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156120a257600080fd5b505afa1580156120b6573d6000803e3d6000fd5b505050506040513d60208110156120cc57600080fd5b505161211a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f23565b6015546001600160a01b031681565b6004546000906001600160a01b0316331461215c5761215560016000612d79565b9050610fb9565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b600061226c6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612aa3565b600061227661195f565b9050801561229c5761229481601181111561228d57fe5b6040612d79565b915050610e48565b611135836130d2565b6006546001600160a01b031681565b6000806122c285858561366e565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f240536122fc612c9a565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611d8d57600080fd5b6000805460ff16612389576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e743235362900000000000060208201526123d090612aa3565b60006123da61195f565b905080156123f85761153b8160118111156123f157fe5b6046612d79565b61155d836137a0565b6003546001600160a01b038281166101009092041614612457576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b50565b6001600160a01b038116612457576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff166124eb576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556124fd61195f565b905080156125285761251b81601181111561251457fe5b6036612d79565b9250600091506125399050565b61253333338661381d565b92509250505b6000805460ff191660011790559092909150565b600d54600090819080612568575050600754600091506125f8565b6000612572612c9a565b9050600061257e6157cc565b600061258f84600b54600c54613b79565b9350905060008160038111156125a157fe5b146125b6579550600094506125f89350505050565b6125c08386613bb7565b9250905060008160038111156125d257fe5b146125e7579550600094506125f89350505050565b50516000955093506125f892505050565b9091565b600081600381111561260a57fe5b14612457576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff1661268e576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556126a061195f565b905080156126c6576126be8160118111156126b757fe5b6027612d79565b9150506111b1565b6126d38585856000613c67565b9150506000805460ff191660011790559392505050565b60008054819060ff16612731576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561274361195f565b9050801561276e5761276181601181111561275a57fe5b601e612d79565b92506000915061277f9050565b612779338686614317565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b1580156127fa57600080fd5b505af115801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b5051905080156128435761283b6003604a83613320565b9150506112e8565b836001600160a01b0316856001600160a01b031614156128695761283b6002604b612d79565b60006001600160a01b03878116908716141561288857506000196128b0565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b6000806000806128c08589613295565b909450925060008460038111156128d357fe5b146128f1576128e46009604b612d79565b96505050505050506112e8565b6001600160a01b038a166000908152600e60205260409020546129149089613295565b9094509150600084600381111561292757fe5b14612938576128e46009604c612d79565b6001600160a01b0389166000908152600e602052604090205461295b9089613386565b9094509050600084600381111561296e57fe5b1461297f576128e46009604d612d79565b6001600160a01b03808b166000908152600e6020526040808220859055918b1681522081905560001985146129d7576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b03166000805160206159b78339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612a7357600080fd5b505af1158015612a87573d6000803e3d6000fd5b5060009250612a94915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612b0c578181015183820152602001612af4565b50505050905090810190601f168015612b395780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612b5757600080fd5b505afa158015612b6b573d6000803e3d6000fd5b505050506040513d6020811015612b8157600080fd5b5051612457576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612c0b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612c1d61195f565b90508015612c3b57612761816011811115612c3457fe5b6035612d79565b61277933868661381d565b6000806000612c536157cc565b612c5d86866132b8565b90925090506000826003811115612c7057fe5b14612c815750915060009050612c93565b6000612c8c826146ba565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611d8d57600080fd5b6000805460ff16612d2a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d3c61195f565b90508015612d5a5761153b816011811115612d5357fe5b604e612d79565b612d63836146c9565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612da857fe5b836055811115612db457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561113557fe5b600081612df05760005b9050610e48565b4360095414612e0557612de9600a6033612d79565b81612e0e612c9a565b1015612e2057612de9600e6032612d79565b600c54821115612e3657612de960026034612d79565b600c805483900390819055601554612e57906001600160a01b0316846147aa565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b158015612eb757600080fd5b505af1158015612ecb573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611135565b6000805460ff16612f68576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612f7a61195f565b90508015612f91576126be8160118111156126b757fe5b6126d38585600086613c67565b6000805460ff16612fe3576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612ff561195f565b90508015613013576126be81601181111561300c57fe5b6008612d79565b6126d385858561489d565b6001600160a01b0381166000908152601060205260408120805482918291829182916130555750600094508493506130cd92505050565b6130658160000154600a54614bc3565b9094509250600084600381111561307857fe5b1461308d5750919350600092506130cd915050565b61309b838260010154614c02565b909450915060008460038111156130ae57fe5b146130c35750919350600092506130cd915050565b5060009450925050505b915091565b60008043600954146130ea57612294600a6041612d79565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561313b57600080fd5b505afa15801561314f573d6000803e3d6000fd5b505050506040513d602081101561316557600080fd5b50516131b8576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611135565b60008054819060ff16613262576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561327461195f565b9050801561328b5761251b81601181111561275a57fe5b6125333385614c2d565b6000808383116132ac575060009050818303612c93565b50600390506000612c93565b60006132c26157cc565b6000806132d3866000015186614bc3565b909250905060008260038111156132e657fe5b1461330557506040805160208101909152600081529092509050612c93565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa084601181111561334f57fe5b84605581111561335b57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156112e857fe5b60008083830184811061339e57600092509050612c93565b506002915060009050612c93565b60008060006133b96157cc565b6133c387876132b8565b909250905060008260038111156133d657fe5b146133e75750915060009050613400565b6133f96133f3826146ba565b86613386565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b15801561347557600080fd5b505af1158015613489573d6000803e3d6000fd5b505050506040513d602081101561349f57600080fd5b5051905080156134b65761283b6003601b83613320565b846001600160a01b0316846001600160a01b031614156134dc5761283b6006601c612d79565b6001600160a01b0384166000908152600e6020526040812054819081906135039087613295565b9093509150600083600381111561351657fe5b146135395761352e6009601a856003811115611ae657fe5b9450505050506112e8565b6001600160a01b0388166000908152600e602052604090205461355c9087613386565b9093509050600083600381111561356f57fe5b146135875761352e60096019856003811115611ae657fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a8152935191936000805160206159b7833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b15801561364057600080fd5b505af1158015613654573d6000803e3d6000fd5b5060009250613661915050565b9998505050505050505050565b60008054819060ff166136b5576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556136c761195f565b905080156136f2576136e58160118111156136de57fe5b600f612d79565b9250600091506137899050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561372d57600080fd5b505af1158015613741573d6000803e3d6000fd5b505050506040513d602081101561375757600080fd5b505190508015613777576136e581601181111561377057fe5b6010612d79565b61378333878787614f9a565b92509250505b6000805460ff191660011790559094909350915050565b600043600954146137b757612de9600a6048612d79565b670de0b6b3a76400008211156137d357612de960026049612d79565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611135565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b15801561388657600080fd5b505af115801561389a573d6000803e3d6000fd5b505050506040513d60208110156138b057600080fd5b5051905080156138d4576138c76003603883613320565b9250600091506134009050565b43600954146138e9576138c7600a6039612d79565b6138f161585d565b6001600160a01b038616600090815260106020526040902060010154606082015261391b8661301e565b608083018190526020830182600381111561393257fe5b600381111561393d57fe5b905250600090508160200151600381111561395457fe5b1461397e576139706009603783602001516003811115611ae657fe5b935060009250613400915050565b600019851415613997576080810151604082015261399f565b604081018590525b6139ad87826040015161550f565b60e0820181905260808201516139c291613295565b60a08301819052602083018260038111156139d957fe5b60038111156139e457fe5b81525050506139f681602001516125fc565b613a06600b548260e00151613295565b60c0830181905260208301826003811115613a1d57fe5b6003811115613a2857fe5b8152505050613a3a81602001516125fc565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613b4557600080fd5b505af1158015613b59573d6000803e3d6000fd5b5060009250613b66915050565b8160e00151935093505050935093915050565b600080600080613b898787613386565b90925090506000826003811115613b9c57fe5b14613bad5750915060009050613400565b6133f98186613295565b6000613bc16157cc565b600080613bd686670de0b6b3a7640000614bc3565b90925090506000826003811115613be957fe5b14613c0857506040805160208101909152600081529092509050612c93565b600080613c158388614c02565b90925090506000826003811115613c2857fe5b14613c4a57506040805160208101909152600081529094509250612c93915050565b604080516020810190915290815260009890975095505050505050565b6000821580613c74575081155b613caf5760405162461bcd60e51b8152600401808060200182810382526034815260200180615a0a6034913960400191505060405180910390fd5b613cb76158a3565b613cbf61254d565b6020830181905282826003811115613cd357fe5b6003811115613cde57fe5b905250508051613ced906125fc565b8315613d4857604080820185905280516020808201909252908201518152613d159085612c46565b6060830181905282826003811115613d2957fe5b6003811115613d3457fe5b905250508051613d43906125fc565b613d9a565b613d64836040518060200160405280846020015181525061575b565b6040830181905282826003811115613d7857fe5b6003811115613d8357fe5b905250508051613d92906125fc565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613dfd57600080fd5b505af1158015613e11573d6000803e3d6000fd5b505050506040513d6020811015613e2757600080fd5b505190508015613e6b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414613eae576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b613ebe600d548360400151613295565b6080840181905283826003811115613ed257fe5b6003811115613edd57fe5b905250508151613eec906125fc565b6001600160a01b0387166000908152600e6020526040908190205490830151613f159190613295565b60a0840181905283826003811115613f2957fe5b6003811115613f3457fe5b905250508151613f43906125fc565b8160600151613f50612c9a565b1015613f90576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b158015613ff957600080fd5b505afa15801561400d573d6000803e3d6000fd5b505050506040513d602081101561402357600080fd5b50511561420f57606084015160055460408051629df3ab60e31b815290516140a693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b15801561407557600080fd5b505afa158015614089573d6000803e3d6000fd5b505050506040513d602081101561409f57600080fd5b5051614bc3565b925082858260038111156140b657fe5b60038111156140c157fe5b9052505083516140d0906125fc565b6140e282670de0b6b3a7640000614c02565b925082858260038111156140f257fe5b60038111156140fd57fe5b90525050835161410c906125fc565b61411a846060015183613295565b9150818582600381111561412a57fe5b600381111561413557fe5b905250508351614144906125fc565b6005546040805163c5f956af60e01b815290516141bc926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d60208110156141b457600080fd5b5051836147aa565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614216565b5060608301515b61422088826147aa565b6040808501518151908152905130916001600160a01b038c16916000805160206159b78339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b15801561364057600080fd5b6000806143238461245a565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b15801561438257600080fd5b505af1158015614396573d6000803e3d6000fd5b505050506040513d60208110156143ac57600080fd5b5051905080156143c3576138c76003601f83613320565b43600954146143d8576138c7600a6022612d79565b6143e06158a3565b6143e861254d565b60208301819052828260038111156143fc57fe5b600381111561440757fe5b905250600090508151600381111561441b57fe5b14614437576139706009602183600001516003811115611ae657fe5b614441878661550f565b60a08201819052604080516020808201909252908301518152614464919061575b565b604083018190528282600381111561447857fe5b600381111561448357fe5b905250508051614492906125fc565b6144a2600d548260400151613386565b60608301819052828260038111156144b657fe5b60038111156144c157fe5b9052505080516144d0906125fc565b6001600160a01b0386166000908152600e60205260409081902054908201516144f99190613386565b608083018190528282600381111561450d57fe5b600381111561451857fe5b905250508051614527906125fc565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b15801561468657600080fd5b505af115801561469a573d6000803e3d6000fd5b50600092506146a7915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b60008060008043600954146146ef576146e4600a604f612d79565b935091506130cd9050565b6146f9338661550f565b905080600c54019150600c54821015614759576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156147ff57600080fd5b505af1158015614813573d6000803e3d6000fd5b5050505060003d6000811461482f576020811461483957600080fd5b6000199150614845565b60206000803e60005191505b5080614898576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b1580156148fa57600080fd5b505af115801561490e573d6000803e3d6000fd5b505050506040513d602081101561492457600080fd5b505190508015614968576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b43600954146149ab576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b826149b4612c9a565b10156149f4576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6149fc6158da565b614a058661301e565b6020830181905282826003811115614a1957fe5b6003811115614a2457fe5b905250508051614a33906125fc565b614a41816020015185613386565b6040830181905282826003811115614a5557fe5b6003811115614a6057fe5b905250508051614a6f906125fc565b614a7b600b5485613386565b6060830181905282826003811115614a8f57fe5b6003811115614a9a57fe5b905250508051614aa9906125fc565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614ae585856147aa565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614b9857600080fd5b505af1158015614bac573d6000803e3d6000fd5b5060009250614bb9915050565b9695505050505050565b60008083614bd657506000905080612c93565b83830283858281614be357fe5b0414614bf757506002915060009050612c93565b600092509050612c93565b60008082614c165750600190506000612c93565b6000838581614c2157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614c8e57600080fd5b505af1158015614ca2573d6000803e3d6000fd5b505050506040513d6020811015614cb857600080fd5b505190508015614cdc57614ccf6003601f83613320565b925060009150612c939050565b4360095414614cf157614ccf600a6022612d79565b614cf96158a3565b614d0161254d565b6020830181905282826003811115614d1557fe5b6003811115614d2057fe5b9052506000905081516003811115614d3457fe5b14614d5e57614d506009602183600001516003811115611ae657fe5b935060009250612c93915050565b614d68868661550f565b60a08201819052604080516020808201909252908301518152614d8b919061575b565b6040830181905282826003811115614d9f57fe5b6003811115614daa57fe5b905250508051614db9906125fc565b614dc9600d548260400151613386565b6060830181905282826003811115614ddd57fe5b6003811115614de857fe5b905250508051614df7906125fc565b6001600160a01b0386166000908152600e6020526040908190205490820151614e209190613386565b6080830181905282826003811115614e3457fe5b6003811115614e3f57fe5b905250508051614e4e906125fc565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b158015614f6757600080fd5b505af1158015614f7b573d6000803e3d6000fd5b5060009250614f88915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561500b57600080fd5b505af115801561501f573d6000803e3d6000fd5b505050506040513d602081101561503557600080fd5b5051905080156150595761504c6003601283613320565b9250600091506155069050565b436009541461506e5761504c600a6016612d79565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150a857600080fd5b505afa1580156150bc573d6000803e3d6000fd5b505050506040513d60208110156150d257600080fd5b5051146150e55761504c600a6011612d79565b866001600160a01b0316866001600160a01b0316141561510b5761504c60066017612d79565b8461511c5761504c60076015612d79565b6000198514156151325761504c60076014612d79565b60008061514089898961381d565b909250905081156151705761516182601181111561515a57fe5b6018612d79565b94506000935061550692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b1580156151ca57600080fd5b505afa1580156151de573d6000803e3d6000fd5b505050506040513d60408110156151f457600080fd5b5080516020909101519092509050811561523f5760405162461bcd60e51b81526004018080602001828103825260338152602001806159d76033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561529657600080fd5b505afa1580156152aa573d6000803e3d6000fd5b505050506040513d60208110156152c057600080fd5b50511015615315576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561533b57615334308d8d85613408565b90506153c5565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b15801561539657600080fd5b505af11580156153aa573d6000803e3d6000fd5b505050506040513d60208110156153c057600080fd5b505190505b801561540f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b1580156154da57600080fd5b505af11580156154ee573d6000803e3d6000fd5b50600092506154fb915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561555f57600080fd5b505afa158015615573573d6000803e3d6000fd5b505050506040513d602081101561558957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b1580156155e857600080fd5b505af11580156155fc573d6000803e3d6000fd5b5050505060003d60008114615618576020811461562257600080fd5b600019915061562e565b60206000803e60005191505b5080615681576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156156cc57600080fd5b505afa1580156156e0573d6000803e3d6000fd5b505050506040513d60208110156156f657600080fd5b505190508281101561574f576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006157686157cc565b612c5d868660006157776157cc565b60008061578c670de0b6b3a764000087614bc3565b9092509050600082600381111561579f57fe5b146157be57506040805160208101909152600081529092509050612c93565b612c8c818660000151613bb7565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061582057805160ff191683800117855561584d565b8280016001018555821561584d579182015b8281111561584d578251825591602001919060010190615832565b50615859929150615903565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b610fb991905b80821115615859576000815560010161590956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726fa265627a7a723158200f60f1a84ef2353709d9bed488df4f6b8443ccb970ba1cf365e35acbbe6530ef64736f6c63430005100032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103af5760003560e01c806373acee98116101f4578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610c75578063f851a44014610cab578063f8f9da2814610cb3578063fca7820b14610cbb576103af565b8063e9a44fd914610c37578063e9c714f214610c3f578063f2b3abbd14610c47578063f3fdb15a14610c6d576103af565b8063d1109c2f116100e9578063d1109c2f14610bb8578063db006a7514610bc0578063dd62ed3e14610bdd578063df3a516e14610c0b576103af565b8063b71d1a0c14610b21578063bd6d894d14610b47578063c37f68e214610b4f578063c5ebeaec14610b9b576103af565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610ad3578063ae9d70b014610adb578063b2a02ff114610ae3578063b4a0bdf314610b19576103af565b8063a0712d6814610a7a578063a6afed9514610a97578063a9059cbb14610a9f578063aa5af0fd14610acb576103af565b80638f840ddd116101ce5780638f840ddd146108f657806395d89b41146108fe57806395dd91931461090657806399d8c1b41461092c576103af565b806373acee98146108a5578063852a12e3146108ad578063856e5bb3146108ca576103af565b806326782247116102d95780634576b5db11610277578063601a0bf111610246578063601a0bf1146108525780636c540baf1461086f5780636f307dc31461087757806370a082311461087f576103af565b80634576b5db1461081457806347bd37181461083a5780635c60da1b146108425780635fe3b5671461084a576103af565b80633b1d21a2116102b35780633b1d21a2146107c15780633d9ea3a1146107c95780633e941010146107d157806342f82260146107ee576103af565b80632678224714610759578063313ce5671461077d5780633af9e6691461079b576103af565b806318160ddd1161035157806323323e031161032057806323323e03146106ae57806323b872dd146106da5780632464176b146107105780632608f8181461072d576103af565b806318160ddd1461051c578063182df0f5146105245780631a31d4651461052c578063210bc05214610682576103af565b80630e7527021161038d5780630e752702146104a9578063107568df146104c6578063173b9904146104ee57806317bfdfbc146104f6576103af565b806306fdde03146103b4578063095ea7b3146104315780630e32cb8614610471575b600080fd5b6103bc610cd8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103f65781810151838201526020016103de565b50505050905090810190601f1680156104235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561044757600080fd5b506001600160a01b038135169060200135610d65565b604080519115158252519081900360200190f35b6104976004803603602081101561048757600080fd5b50356001600160a01b0316610dcb565b60408051918252519081900360200190f35b610497600480360360208110156104bf57600080fd5b5035610e4d565b6104ec600480360360208110156104dc57600080fd5b50356001600160a01b0316610e61565b005b610497610ecf565b6104976004803603602081101561050c57600080fd5b50356001600160a01b0316610ed5565b610497610f95565b610497610f9b565b6104ec600480360360e081101561054257600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561058457600080fd5b82018360208201111561059657600080fd5b803590602001918460018302840111600160201b831117156105b757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561060957600080fd5b82018360208201111561061b57600080fd5b803590602001918460018302840111600160201b8311171561063c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610fbc9050565b6104976004803603604081101561069857600080fd5b506001600160a01b03813516906020013561105b565b610497600480360360408110156106c457600080fd5b506001600160a01b03813516906020013561113c565b61045d600480360360608110156106f057600080fd5b506001600160a01b03813581169160208101359091169060400135611152565b6104ec6004803603602081101561072657600080fd5b50356111c5565b6104976004803603604081101561074357600080fd5b506001600160a01b03813516906020013561126d565b61076161127a565b604080516001600160a01b039092168252519081900360200190f35b610785611289565b6040805160ff9092168252519081900360200190f35b610497600480360360208110156107b157600080fd5b50356001600160a01b0316611292565b6104976112f0565b61045d6112ff565b610497600480360360208110156107e757600080fd5b5035611304565b6104ec6004803603602081101561080457600080fd5b50356001600160a01b031661130f565b6104976004803603602081101561082a57600080fd5b50356001600160a01b0316611331565b610497611463565b610761611469565b610761611478565b6104976004803603602081101561086857600080fd5b5035611487565b610497611572565b610761611578565b6104976004803603602081101561089557600080fd5b50356001600160a01b0316611587565b6104976115a2565b610497600480360360208110156108c357600080fd5b5035611658565b610497600480360360408110156108e057600080fd5b506001600160a01b038135169060200135611665565b61049761173f565b6103bc611745565b6104976004803603602081101561091c57600080fd5b50356001600160a01b031661179d565b6104ec600480360360c081101561094257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561097c57600080fd5b82018360208201111561098e57600080fd5b803590602001918460018302840111600160201b831117156109af57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610a0157600080fd5b820183602082011115610a1357600080fd5b803590602001918460018302840111600160201b83111715610a3457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506117b89050565b61049760048036036020811015610a9057600080fd5b5035611953565b61049761195f565b61045d60048036036040811015610ab557600080fd5b506001600160a01b038135169060200135611ca2565b610497611d13565b610497611d19565b610497611d1f565b61049760048036036060811015610af957600080fd5b506001600160a01b03813581169160208101359091169060400135611dbe565b610761611e2f565b61049760048036036020811015610b3757600080fd5b50356001600160a01b0316611e3e565b610497611eaf565b610b7560048036036020811015610b6557600080fd5b50356001600160a01b0316611f6b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61049760048036036020811015610bb157600080fd5b5035612000565b61049761200d565b61049760048036036020811015610bd657600080fd5b5035612013565b61049760048036036040811015610bf357600080fd5b506001600160a01b0381358116916020013516612020565b61049760048036036040811015610c2157600080fd5b506001600160a01b03813516906020013561204b565b610761612125565b610497612134565b61049760048036036020811015610c5d57600080fd5b50356001600160a01b031661222c565b6107616122a5565b61049760048036036060811015610c8b57600080fd5b506001600160a01b038135811691602081013591604090910135166122b4565b6107616122cc565b6104976122e0565b61049760048036036020811015610cd157600080fd5b5035612344565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b820191906000526020600020905b815481529060010190602001808311610d4057829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610dd633612401565b610ddf8261245a565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610e59836124a4565b509392505050565b610e6a33612401565b610e738161245a565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6000805460ff16610f1a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610f2c61195f565b14610f77576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610f808261179d565b90505b6000805460ff19166001179055919050565b600d5481565b6000806000610fa861254d565b91509150610fb5826125fc565b9150505b90565b610fca8686868686866117b8565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b505161112a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612649565b9392505050565b60008061114984846126ea565b50949350505050565b6000805460ff16611197576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556111ad33868686612795565b1490505b6000805460ff191660011790559392505050565b6000811161120a576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61122b60405180606001604052806024815260200161594160249139612aa3565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b6000806111498484612bc4565b6004546001600160a01b031681565b60035460ff1681565b600061129c6157cc565b60405180602001604052806112af611eaf565b90526001600160a01b0384166000908152600e60205260408120549192509081906112db908490612c46565b915091506112e8826125fc565b949350505050565b60006112fa612c9a565b905090565b600181565b6000610e4582612ce5565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061133c33612401565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d60208110156113ab57600080fd5b50516113fe576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff166114cc576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261151390612aa3565b600061151d61195f565b905080156115435761153b81601181111561153457fe5b6030612d79565b915050610f83565b43601454141561155457600061153b565b61155d83612ddf565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff166115e7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556115f961195f565b14611644576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610e45333384612f23565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156116bc57600080fd5b505afa1580156116d0573d6000803e3d6000fd5b505050506040513d60208110156116e657600080fd5b5051611734576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f9e565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b60008060006117ab8461301e565b91509150611135826125fc565b6117c133612401565b6009541580156117d15750600a54155b61180c5760405162461bcd60e51b815260040180806020018281038252602381526020018061591e6023913960400191505060405180910390fd5b60078490558361184d5760405162461bcd60e51b81526004018080602001828103825260308152602001806159656030913960400191505060405180910390fd5b600061185887611331565b905080156118ad576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a556118c6866130d2565b905080156119055760405162461bcd60e51b81526004018080602001828103825260228152602001806159956022913960400191505060405180910390fd5b83516119189060019060208701906157df565b50825161192c9060029060208601906157df565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610e598361321b565b60095460009043908082141561197a57600092505050610fb9565b6000611984612c9a565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051905065048c27395000811115611a7b576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611a888989613295565b91509150611a95826125fc565b611a9d6157cc565b600080600080611abb60405180602001604052808a815250876132b8565b90975094506000876003811115611ace57fe5b14611b0057611aeb60096006896003811115611ae657fe5b613320565b9e505050505050505050505050505050610fb9565b611b0a858c612c46565b90975093506000876003811115611b1d57fe5b14611b3557611aeb60096001896003811115611ae657fe5b611b3f848c613386565b90975092506000876003811115611b5257fe5b14611b6a57611aeb60096004896003811115611ae657fe5b611b856040518060200160405280600854815250858c6133ac565b90975091506000876003811115611b9857fe5b14611bb057611aeb60096005896003811115611ae657fe5b611bbb858a8b6133ac565b90975090506000876003811115611bce57fe5b14611be657611aeb60096003896003811115611ae657fe5b60098e9055600a819055600b839055600c829055601454611c08908f90613295565b9097509550611c16876125fc565b6013548610611c465760148e9055818c1015611c3b57611c358c612ddf565b50611c46565b611c4482612ddf565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611ce7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611cfd33338686612795565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611d3b612c9a565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611d8d57600080fd5b505afa158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b5051905090565b6000805460ff16611e03576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611e1933858585613408565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611e4933612401565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611135565b6000805460ff16611ef4576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611f0661195f565b14611f51576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611f59610f9b565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e6020526040812054819081908190818080611f968961301e565b935090506000816003811115611fa857fe5b14611fc65760095b975060009650869550859450611ff99350505050565b611fce61254d565b925090506000816003811115611fe057fe5b14611fec576009611fb0565b5060009650919450925090505b9193509193565b6000610e45333384612f9e565b60135481565b6000610e45333384612649565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156120a257600080fd5b505afa1580156120b6573d6000803e3d6000fd5b505050506040513d60208110156120cc57600080fd5b505161211a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f23565b6015546001600160a01b031681565b6004546000906001600160a01b0316331461215c5761215560016000612d79565b9050610fb9565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b600061226c6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612aa3565b600061227661195f565b9050801561229c5761229481601181111561228d57fe5b6040612d79565b915050610e48565b611135836130d2565b6006546001600160a01b031681565b6000806122c285858561366e565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f240536122fc612c9a565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611d8d57600080fd5b6000805460ff16612389576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e743235362900000000000060208201526123d090612aa3565b60006123da61195f565b905080156123f85761153b8160118111156123f157fe5b6046612d79565b61155d836137a0565b6003546001600160a01b038281166101009092041614612457576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b50565b6001600160a01b038116612457576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff166124eb576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556124fd61195f565b905080156125285761251b81601181111561251457fe5b6036612d79565b9250600091506125399050565b61253333338661381d565b92509250505b6000805460ff191660011790559092909150565b600d54600090819080612568575050600754600091506125f8565b6000612572612c9a565b9050600061257e6157cc565b600061258f84600b54600c54613b79565b9350905060008160038111156125a157fe5b146125b6579550600094506125f89350505050565b6125c08386613bb7565b9250905060008160038111156125d257fe5b146125e7579550600094506125f89350505050565b50516000955093506125f892505050565b9091565b600081600381111561260a57fe5b14612457576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff1661268e576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556126a061195f565b905080156126c6576126be8160118111156126b757fe5b6027612d79565b9150506111b1565b6126d38585856000613c67565b9150506000805460ff191660011790559392505050565b60008054819060ff16612731576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561274361195f565b9050801561276e5761276181601181111561275a57fe5b601e612d79565b92506000915061277f9050565b612779338686614317565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b1580156127fa57600080fd5b505af115801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b5051905080156128435761283b6003604a83613320565b9150506112e8565b836001600160a01b0316856001600160a01b031614156128695761283b6002604b612d79565b60006001600160a01b03878116908716141561288857506000196128b0565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b6000806000806128c08589613295565b909450925060008460038111156128d357fe5b146128f1576128e46009604b612d79565b96505050505050506112e8565b6001600160a01b038a166000908152600e60205260409020546129149089613295565b9094509150600084600381111561292757fe5b14612938576128e46009604c612d79565b6001600160a01b0389166000908152600e602052604090205461295b9089613386565b9094509050600084600381111561296e57fe5b1461297f576128e46009604d612d79565b6001600160a01b03808b166000908152600e6020526040808220859055918b1681522081905560001985146129d7576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b03166000805160206159b78339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612a7357600080fd5b505af1158015612a87573d6000803e3d6000fd5b5060009250612a94915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612b0c578181015183820152602001612af4565b50505050905090810190601f168015612b395780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612b5757600080fd5b505afa158015612b6b573d6000803e3d6000fd5b505050506040513d6020811015612b8157600080fd5b5051612457576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612c0b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612c1d61195f565b90508015612c3b57612761816011811115612c3457fe5b6035612d79565b61277933868661381d565b6000806000612c536157cc565b612c5d86866132b8565b90925090506000826003811115612c7057fe5b14612c815750915060009050612c93565b6000612c8c826146ba565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611d8d57600080fd5b6000805460ff16612d2a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d3c61195f565b90508015612d5a5761153b816011811115612d5357fe5b604e612d79565b612d63836146c9565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612da857fe5b836055811115612db457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561113557fe5b600081612df05760005b9050610e48565b4360095414612e0557612de9600a6033612d79565b81612e0e612c9a565b1015612e2057612de9600e6032612d79565b600c54821115612e3657612de960026034612d79565b600c805483900390819055601554612e57906001600160a01b0316846147aa565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b158015612eb757600080fd5b505af1158015612ecb573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611135565b6000805460ff16612f68576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612f7a61195f565b90508015612f91576126be8160118111156126b757fe5b6126d38585600086613c67565b6000805460ff16612fe3576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612ff561195f565b90508015613013576126be81601181111561300c57fe5b6008612d79565b6126d385858561489d565b6001600160a01b0381166000908152601060205260408120805482918291829182916130555750600094508493506130cd92505050565b6130658160000154600a54614bc3565b9094509250600084600381111561307857fe5b1461308d5750919350600092506130cd915050565b61309b838260010154614c02565b909450915060008460038111156130ae57fe5b146130c35750919350600092506130cd915050565b5060009450925050505b915091565b60008043600954146130ea57612294600a6041612d79565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561313b57600080fd5b505afa15801561314f573d6000803e3d6000fd5b505050506040513d602081101561316557600080fd5b50516131b8576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611135565b60008054819060ff16613262576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561327461195f565b9050801561328b5761251b81601181111561275a57fe5b6125333385614c2d565b6000808383116132ac575060009050818303612c93565b50600390506000612c93565b60006132c26157cc565b6000806132d3866000015186614bc3565b909250905060008260038111156132e657fe5b1461330557506040805160208101909152600081529092509050612c93565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa084601181111561334f57fe5b84605581111561335b57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156112e857fe5b60008083830184811061339e57600092509050612c93565b506002915060009050612c93565b60008060006133b96157cc565b6133c387876132b8565b909250905060008260038111156133d657fe5b146133e75750915060009050613400565b6133f96133f3826146ba565b86613386565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b15801561347557600080fd5b505af1158015613489573d6000803e3d6000fd5b505050506040513d602081101561349f57600080fd5b5051905080156134b65761283b6003601b83613320565b846001600160a01b0316846001600160a01b031614156134dc5761283b6006601c612d79565b6001600160a01b0384166000908152600e6020526040812054819081906135039087613295565b9093509150600083600381111561351657fe5b146135395761352e6009601a856003811115611ae657fe5b9450505050506112e8565b6001600160a01b0388166000908152600e602052604090205461355c9087613386565b9093509050600083600381111561356f57fe5b146135875761352e60096019856003811115611ae657fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a8152935191936000805160206159b7833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b15801561364057600080fd5b505af1158015613654573d6000803e3d6000fd5b5060009250613661915050565b9998505050505050505050565b60008054819060ff166136b5576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556136c761195f565b905080156136f2576136e58160118111156136de57fe5b600f612d79565b9250600091506137899050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561372d57600080fd5b505af1158015613741573d6000803e3d6000fd5b505050506040513d602081101561375757600080fd5b505190508015613777576136e581601181111561377057fe5b6010612d79565b61378333878787614f9a565b92509250505b6000805460ff191660011790559094909350915050565b600043600954146137b757612de9600a6048612d79565b670de0b6b3a76400008211156137d357612de960026049612d79565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611135565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b15801561388657600080fd5b505af115801561389a573d6000803e3d6000fd5b505050506040513d60208110156138b057600080fd5b5051905080156138d4576138c76003603883613320565b9250600091506134009050565b43600954146138e9576138c7600a6039612d79565b6138f161585d565b6001600160a01b038616600090815260106020526040902060010154606082015261391b8661301e565b608083018190526020830182600381111561393257fe5b600381111561393d57fe5b905250600090508160200151600381111561395457fe5b1461397e576139706009603783602001516003811115611ae657fe5b935060009250613400915050565b600019851415613997576080810151604082015261399f565b604081018590525b6139ad87826040015161550f565b60e0820181905260808201516139c291613295565b60a08301819052602083018260038111156139d957fe5b60038111156139e457fe5b81525050506139f681602001516125fc565b613a06600b548260e00151613295565b60c0830181905260208301826003811115613a1d57fe5b6003811115613a2857fe5b8152505050613a3a81602001516125fc565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613b4557600080fd5b505af1158015613b59573d6000803e3d6000fd5b5060009250613b66915050565b8160e00151935093505050935093915050565b600080600080613b898787613386565b90925090506000826003811115613b9c57fe5b14613bad5750915060009050613400565b6133f98186613295565b6000613bc16157cc565b600080613bd686670de0b6b3a7640000614bc3565b90925090506000826003811115613be957fe5b14613c0857506040805160208101909152600081529092509050612c93565b600080613c158388614c02565b90925090506000826003811115613c2857fe5b14613c4a57506040805160208101909152600081529094509250612c93915050565b604080516020810190915290815260009890975095505050505050565b6000821580613c74575081155b613caf5760405162461bcd60e51b8152600401808060200182810382526034815260200180615a0a6034913960400191505060405180910390fd5b613cb76158a3565b613cbf61254d565b6020830181905282826003811115613cd357fe5b6003811115613cde57fe5b905250508051613ced906125fc565b8315613d4857604080820185905280516020808201909252908201518152613d159085612c46565b6060830181905282826003811115613d2957fe5b6003811115613d3457fe5b905250508051613d43906125fc565b613d9a565b613d64836040518060200160405280846020015181525061575b565b6040830181905282826003811115613d7857fe5b6003811115613d8357fe5b905250508051613d92906125fc565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613dfd57600080fd5b505af1158015613e11573d6000803e3d6000fd5b505050506040513d6020811015613e2757600080fd5b505190508015613e6b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414613eae576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b613ebe600d548360400151613295565b6080840181905283826003811115613ed257fe5b6003811115613edd57fe5b905250508151613eec906125fc565b6001600160a01b0387166000908152600e6020526040908190205490830151613f159190613295565b60a0840181905283826003811115613f2957fe5b6003811115613f3457fe5b905250508151613f43906125fc565b8160600151613f50612c9a565b1015613f90576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b158015613ff957600080fd5b505afa15801561400d573d6000803e3d6000fd5b505050506040513d602081101561402357600080fd5b50511561420f57606084015160055460408051629df3ab60e31b815290516140a693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b15801561407557600080fd5b505afa158015614089573d6000803e3d6000fd5b505050506040513d602081101561409f57600080fd5b5051614bc3565b925082858260038111156140b657fe5b60038111156140c157fe5b9052505083516140d0906125fc565b6140e282670de0b6b3a7640000614c02565b925082858260038111156140f257fe5b60038111156140fd57fe5b90525050835161410c906125fc565b61411a846060015183613295565b9150818582600381111561412a57fe5b600381111561413557fe5b905250508351614144906125fc565b6005546040805163c5f956af60e01b815290516141bc926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d60208110156141b457600080fd5b5051836147aa565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614216565b5060608301515b61422088826147aa565b6040808501518151908152905130916001600160a01b038c16916000805160206159b78339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b15801561364057600080fd5b6000806143238461245a565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b15801561438257600080fd5b505af1158015614396573d6000803e3d6000fd5b505050506040513d60208110156143ac57600080fd5b5051905080156143c3576138c76003601f83613320565b43600954146143d8576138c7600a6022612d79565b6143e06158a3565b6143e861254d565b60208301819052828260038111156143fc57fe5b600381111561440757fe5b905250600090508151600381111561441b57fe5b14614437576139706009602183600001516003811115611ae657fe5b614441878661550f565b60a08201819052604080516020808201909252908301518152614464919061575b565b604083018190528282600381111561447857fe5b600381111561448357fe5b905250508051614492906125fc565b6144a2600d548260400151613386565b60608301819052828260038111156144b657fe5b60038111156144c157fe5b9052505080516144d0906125fc565b6001600160a01b0386166000908152600e60205260409081902054908201516144f99190613386565b608083018190528282600381111561450d57fe5b600381111561451857fe5b905250508051614527906125fc565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b15801561468657600080fd5b505af115801561469a573d6000803e3d6000fd5b50600092506146a7915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b60008060008043600954146146ef576146e4600a604f612d79565b935091506130cd9050565b6146f9338661550f565b905080600c54019150600c54821015614759576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156147ff57600080fd5b505af1158015614813573d6000803e3d6000fd5b5050505060003d6000811461482f576020811461483957600080fd5b6000199150614845565b60206000803e60005191505b5080614898576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b1580156148fa57600080fd5b505af115801561490e573d6000803e3d6000fd5b505050506040513d602081101561492457600080fd5b505190508015614968576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b43600954146149ab576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b826149b4612c9a565b10156149f4576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6149fc6158da565b614a058661301e565b6020830181905282826003811115614a1957fe5b6003811115614a2457fe5b905250508051614a33906125fc565b614a41816020015185613386565b6040830181905282826003811115614a5557fe5b6003811115614a6057fe5b905250508051614a6f906125fc565b614a7b600b5485613386565b6060830181905282826003811115614a8f57fe5b6003811115614a9a57fe5b905250508051614aa9906125fc565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614ae585856147aa565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614b9857600080fd5b505af1158015614bac573d6000803e3d6000fd5b5060009250614bb9915050565b9695505050505050565b60008083614bd657506000905080612c93565b83830283858281614be357fe5b0414614bf757506002915060009050612c93565b600092509050612c93565b60008082614c165750600190506000612c93565b6000838581614c2157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614c8e57600080fd5b505af1158015614ca2573d6000803e3d6000fd5b505050506040513d6020811015614cb857600080fd5b505190508015614cdc57614ccf6003601f83613320565b925060009150612c939050565b4360095414614cf157614ccf600a6022612d79565b614cf96158a3565b614d0161254d565b6020830181905282826003811115614d1557fe5b6003811115614d2057fe5b9052506000905081516003811115614d3457fe5b14614d5e57614d506009602183600001516003811115611ae657fe5b935060009250612c93915050565b614d68868661550f565b60a08201819052604080516020808201909252908301518152614d8b919061575b565b6040830181905282826003811115614d9f57fe5b6003811115614daa57fe5b905250508051614db9906125fc565b614dc9600d548260400151613386565b6060830181905282826003811115614ddd57fe5b6003811115614de857fe5b905250508051614df7906125fc565b6001600160a01b0386166000908152600e6020526040908190205490820151614e209190613386565b6080830181905282826003811115614e3457fe5b6003811115614e3f57fe5b905250508051614e4e906125fc565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b158015614f6757600080fd5b505af1158015614f7b573d6000803e3d6000fd5b5060009250614f88915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561500b57600080fd5b505af115801561501f573d6000803e3d6000fd5b505050506040513d602081101561503557600080fd5b5051905080156150595761504c6003601283613320565b9250600091506155069050565b436009541461506e5761504c600a6016612d79565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150a857600080fd5b505afa1580156150bc573d6000803e3d6000fd5b505050506040513d60208110156150d257600080fd5b5051146150e55761504c600a6011612d79565b866001600160a01b0316866001600160a01b0316141561510b5761504c60066017612d79565b8461511c5761504c60076015612d79565b6000198514156151325761504c60076014612d79565b60008061514089898961381d565b909250905081156151705761516182601181111561515a57fe5b6018612d79565b94506000935061550692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b1580156151ca57600080fd5b505afa1580156151de573d6000803e3d6000fd5b505050506040513d60408110156151f457600080fd5b5080516020909101519092509050811561523f5760405162461bcd60e51b81526004018080602001828103825260338152602001806159d76033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561529657600080fd5b505afa1580156152aa573d6000803e3d6000fd5b505050506040513d60208110156152c057600080fd5b50511015615315576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561533b57615334308d8d85613408565b90506153c5565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b15801561539657600080fd5b505af11580156153aa573d6000803e3d6000fd5b505050506040513d60208110156153c057600080fd5b505190505b801561540f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b1580156154da57600080fd5b505af11580156154ee573d6000803e3d6000fd5b50600092506154fb915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561555f57600080fd5b505afa158015615573573d6000803e3d6000fd5b505050506040513d602081101561558957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b1580156155e857600080fd5b505af11580156155fc573d6000803e3d6000fd5b5050505060003d60008114615618576020811461562257600080fd5b600019915061562e565b60206000803e60005191505b5080615681576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156156cc57600080fd5b505afa1580156156e0573d6000803e3d6000fd5b505050506040513d60208110156156f657600080fd5b505190508281101561574f576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006157686157cc565b612c5d868660006157776157cc565b60008061578c670de0b6b3a764000087614bc3565b9092509050600082600381111561579f57fe5b146157be57506040805160208101909152600081529092509050612c93565b612c8c818660000151613bb7565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061582057805160ff191683800117855561584d565b8280016001018555821561584d579182015b8281111561584d578251825591602001919060010190615832565b50615859929150615903565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b610fb991905b80821115615859576000815560010161590956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726fa265627a7a723158200f60f1a84ef2353709d9bed488df4f6b8443ccb970ba1cf365e35acbbe6530ef64736f6c63430005100032", + "devdoc": { + "author": "Venus", + "methods": { + "_acceptAdmin()": { + "details": "Admin function for pending admin to accept role and update admin", + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_addReserves(uint256)": { + "params": { + "addAmount": "The amount of underlying tokens to add as reserves" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_reduceReserves(uint256)": { + "params": { + "reduceAmount_": "Amount of reduction to reserves" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setComptroller(address)": { + "details": "Admin function to set a new comptroller", + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setInterestRateModel(address)": { + "details": "Governance function to accrue interest and update the interest rate model", + "params": { + "newInterestRateModel_": "The new interest rate model to use" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setPendingAdmin(address)": { + "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.", + "params": { + "newPendingAdmin": "New pending admin." + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "_setReserveFactor(uint256)": { + "details": "Governor function to accrue interest and set a new reserve factor", + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "accrueInterest()": { + "details": "This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta" + }, + "allowance(address,address)": { + "params": { + "owner": "The address of the account which owns the tokens to be spent", + "spender": "The address of the account which may transfer tokens" + }, + "return": "The number of tokens allowed to be spent (-1 means infinite)" + }, + "approve(address,uint256)": { + "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)", + "params": { + "amount": "The number of tokens that are approved (-1 means infinite)", + "spender": "The address of the account which may transfer tokens" + }, + "return": "Whether or not the approval succeeded" + }, + "balanceOf(address)": { + "params": { + "owner": "The address of the account to query" + }, + "return": "The number of tokens owned by `owner`" + }, + "balanceOfUnderlying(address)": { + "details": "This also accrues interest in a transaction", + "params": { + "owner": "The address of the account to query" + }, + "return": "The amount of underlying owned by `owner`" + }, + "borrow(uint256)": { + "params": { + "borrowAmount": "The amount of the underlying asset to borrow" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "borrowBalanceCurrent(address)": { + "params": { + "account": "The address whose balance should be calculated after updating borrowIndex" + }, + "return": "The calculated balance" + }, + "borrowBalanceStored(address)": { + "params": { + "account": "The address whose balance should be calculated" + }, + "return": "The calculated balance" + }, + "borrowBehalf(address,uint256)": { + "params": { + "borrowAmount": "The amount of the underlying asset to borrow", + "borrower": "The borrower, on behalf of whom to borrow." + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "borrowRatePerBlock()": { + "return": "The borrow interest rate per block, scaled by 1e18" + }, + "exchangeRateCurrent()": { + "return": "Calculated exchange rate scaled by 1e18" + }, + "exchangeRateStored()": { + "details": "This function does not accrue interest before calculating the exchange rate", + "return": "Calculated exchange rate scaled by 1e18" + }, + "getAccountSnapshot(address)": { + "details": "This is used by comptroller to more efficiently perform liquidity checks.", + "params": { + "account": "Address of the account to snapshot" + }, + "return": "(possible error, token balance, borrow balance, exchange rate mantissa)" + }, + "getCash()": { + "return": "The quantity of underlying asset owned by this contract" + }, + "initialize(address,address,address,uint256,string,string,uint8)": { + "params": { + "comptroller_": "The address of the Comptroller", + "decimals_": "BEP-20 decimal precision of this token", + "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", + "interestRateModel_": "The address of the interest rate model", + "name_": "BEP-20 name of this token", + "symbol_": "BEP-20 symbol of this token", + "underlying_": "The address of the underlying asset" + } + }, + "initialize(address,address,uint256,string,string,uint8)": { + "params": { + "comptroller_": "The address of the Comptroller", + "decimals_": "EIP-20 decimal precision of this token", + "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", + "interestRateModel_": "The address of the interest rate model", + "name_": "EIP-20 name of this token", + "symbol_": "EIP-20 symbol of this token" + } + }, + "liquidateBorrow(address,uint256,address)": { + "params": { + "borrower": "The borrower of this vToken to be liquidated", + "repayAmount": "The amount of the underlying borrowed asset to repay", + "vTokenCollateral": "The market in which to seize collateral from the borrower" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "mint(uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "mintAmount": "The amount of the underlying asset to supply" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "mintBehalf(address,uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "mintAmount": "The amount of the underlying asset to supply", + "receiver": "The account which is receiving the vTokens" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeem(uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemTokens": "The number of vTokens to redeem into underlying" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeemBehalf(address,uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemTokens": "The number of vTokens to redeem into underlying", + "redeemer": "The user on behalf of whom to redeem" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeemUnderlying(uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemAmount": "The amount of underlying to redeem" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "redeemUnderlyingBehalf(address,uint256)": { + "details": "Accrues interest whether or not the operation succeeds, unless reverted", + "params": { + "redeemAmount": "The amount of underlying to receive from redeeming vTokens", + "redeemer": ", on behalf of whom to redeem" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "repayBorrow(uint256)": { + "params": { + "repayAmount": "The amount to repay" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "repayBorrowBehalf(address,uint256)": { + "params": { + "borrower": "The account with the debt being payed off", + "repayAmount": "The amount to repay" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "seize(address,address,uint256)": { + "details": "Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.", + "params": { + "borrower": "The account having collateral seized", + "liquidator": "The account receiving seized collateral", + "seizeTokens": "The number of vTokens to seize" + }, + "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." + }, + "setAccessControlManager(address)": { + "details": "Admin function to set the access control address", + "params": { + "newAccessControlManagerAddress": "New address for the access control" + }, + "return": "uint 0=success, otherwise will revert" + }, + "setProtocolShareReserve(address)": { + "params": { + "protcolShareReserve_": "The address of protocol share reserve contract" + } + }, + "setReduceReservesBlockDelta(uint256)": { + "params": { + "newReduceReservesBlockDelta_": "block difference value" + } + }, + "supplyRatePerBlock()": { + "return": "The supply interest rate per block, scaled by 1e18" + }, + "totalBorrowsCurrent()": { + "return": "The total borrows with interest" + }, + "transfer(address,uint256)": { + "params": { + "amount": "The number of tokens to transfer", + "dst": "The address of the destination account" + }, + "return": "Whether or not the transfer succeeded" + }, + "transferFrom(address,address,uint256)": { + "params": { + "amount": "The number of tokens to transfer", + "dst": "The address of the destination account", + "src": "The address of the source account" + }, + "return": "Whether or not the transfer succeeded" + } + }, + "title": "Venus's VBep20 Contract" + }, + "userdoc": { + "methods": { + "_acceptAdmin()": { + "notice": "Accepts transfer of admin rights. msg.sender must be pendingAdmin" + }, + "_addReserves(uint256)": { + "notice": "The sender adds to reserves." + }, + "_reduceReserves(uint256)": { + "notice": "Accrues interest and reduces reserves by transferring to protocol share reserve" + }, + "_setComptroller(address)": { + "notice": "Sets a new comptroller for the market" + }, + "_setInterestRateModel(address)": { + "notice": "Accrues interest and updates the interest rate model using _setInterestRateModelFresh" + }, + "_setPendingAdmin(address)": { + "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer." + }, + "_setReserveFactor(uint256)": { + "notice": "accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`" + }, + "accrueInterest()": { + "notice": "Applies accrued interest to total borrows and reserves" + }, + "allowance(address,address)": { + "notice": "Get the current allowance from `owner` for `spender`" + }, + "approve(address,uint256)": { + "notice": "Approve `spender` to transfer up to `amount` from `src`" + }, + "balanceOf(address)": { + "notice": "Get the token balance of the `owner`" + }, + "balanceOfUnderlying(address)": { + "notice": "Get the underlying balance of the `owner`" + }, + "borrow(uint256)": { + "notice": "Sender borrows assets from the protocol to their own address" + }, + "borrowBalanceCurrent(address)": { + "notice": "Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex" + }, + "borrowBalanceStored(address)": { + "notice": "Return the borrow balance of account based on stored data" + }, + "borrowBehalf(address,uint256)": { + "notice": "Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`" + }, + "borrowRatePerBlock()": { + "notice": "Returns the current per-block borrow interest rate for this vToken" + }, + "exchangeRateCurrent()": { + "notice": "Accrue interest then return the up-to-date exchange rate" + }, + "exchangeRateStored()": { + "notice": "Calculates the exchange rate from the underlying to the VToken" + }, + "getAccountSnapshot(address)": { + "notice": "Get a snapshot of the account's balances, and the cached exchange rate" + }, + "getCash()": { + "notice": "Get cash balance of this vToken in the underlying asset" + }, + "initialize(address,address,address,uint256,string,string,uint8)": { + "notice": "Initialize the new money market" + }, + "initialize(address,address,uint256,string,string,uint8)": { + "notice": "Initialize the money market" + }, + "liquidateBorrow(address,uint256,address)": { + "notice": "The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator." + }, + "mint(uint256)": { + "notice": "Sender supplies assets into the market and receives vTokens in exchange" + }, + "mintBehalf(address,uint256)": { + "notice": "Sender supplies assets into the market and receiver receives vTokens in exchange" + }, + "redeem(uint256)": { + "notice": "Sender redeems vTokens in exchange for the underlying asset" + }, + "redeemBehalf(address,uint256)": { + "notice": "Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" + }, + "redeemUnderlying(uint256)": { + "notice": "Sender redeems vTokens in exchange for a specified amount of underlying asset" + }, + "redeemUnderlyingBehalf(address,uint256)": { + "notice": "Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" + }, + "repayBorrow(uint256)": { + "notice": "Sender repays their own borrow" + }, + "repayBorrowBehalf(address,uint256)": { + "notice": "Sender repays a borrow belonging to another borrowing account" + }, + "seize(address,address,uint256)": { + "notice": "Transfers collateral tokens (this market) to the liquidator." + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of the access control manager of this contract" + }, + "setProtocolShareReserve(address)": { + "notice": "Sets protocol share reserve contract address" + }, + "setReduceReservesBlockDelta(uint256)": { + "notice": "Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve" + }, + "supplyRatePerBlock()": { + "notice": "Returns the current per-block supply interest rate for this vToken" + }, + "totalBorrowsCurrent()": { + "notice": "Returns the current total borrows plus accrued interest" + }, + "transfer(address,uint256)": { + "notice": "Transfer `amount` tokens from `msg.sender` to `dst`" + }, + "transferFrom(address,address,uint256)": { + "notice": "Transfer `amount` tokens from `src` to `dst`" + } + }, + "notice": "vTokens which wrap an EIP-20 underlying" + }, + "storageLayout": { + "storage": [ + { + "astId": 23371, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "_notEntered", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 23373, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "name", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 23375, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "symbol", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 23377, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "decimals", + "offset": 0, + "slot": "3", + "type": "t_uint8" + }, + { + "astId": 23385, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "admin", + "offset": 1, + "slot": "3", + "type": "t_address_payable" + }, + { + "astId": 23387, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "pendingAdmin", + "offset": 0, + "slot": "4", + "type": "t_address_payable" + }, + { + "astId": 23389, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "comptroller", + "offset": 0, + "slot": "5", + "type": "t_contract(ComptrollerInterface)2305" + }, + { + "astId": 23391, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "interestRateModel", + "offset": 0, + "slot": "6", + "type": "t_contract(InterestRateModel)8971" + }, + { + "astId": 23393, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "initialExchangeRateMantissa", + "offset": 0, + "slot": "7", + "type": "t_uint256" + }, + { + "astId": 23395, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "reserveFactorMantissa", + "offset": 0, + "slot": "8", + "type": "t_uint256" + }, + { + "astId": 23397, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "accrualBlockNumber", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 23399, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "borrowIndex", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 23401, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "totalBorrows", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 23403, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "totalReserves", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 23405, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "totalSupply", + "offset": 0, + "slot": "13", + "type": "t_uint256" + }, + { + "astId": 23409, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "accountTokens", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 23415, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "transferAllowances", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 23419, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "accountBorrows", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_struct(BorrowSnapshot)23369_storage)" + }, + { + "astId": 23421, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "underlying", + "offset": 0, + "slot": "17", + "type": "t_address" + }, + { + "astId": 23423, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "implementation", + "offset": 0, + "slot": "18", + "type": "t_address" + }, + { + "astId": 23425, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "reduceReservesBlockDelta", + "offset": 0, + "slot": "19", + "type": "t_uint256" + }, + { + "astId": 23427, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "reduceReservesBlockNumber", + "offset": 0, + "slot": "20", + "type": "t_uint256" + }, + { + "astId": 23429, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "protocolShareReserve", + "offset": 0, + "slot": "21", + "type": "t_address_payable" + }, + { + "astId": 23431, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "accessControlManager", + "offset": 0, + "slot": "22", + "type": "t_address" + }, + { + "astId": 23438, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "__gap", + "offset": 0, + "slot": "23", + "type": "t_array(t_uint256)50_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(ComptrollerInterface)2305": { + "encoding": "inplace", + "label": "contract ComptrollerInterface", + "numberOfBytes": "20" + }, + "t_contract(InterestRateModel)8971": { + "encoding": "inplace", + "label": "contract InterestRateModel", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_struct(BorrowSnapshot)23369_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct VTokenStorageBase.BorrowSnapshot)", + "numberOfBytes": "32", + "value": "t_struct(BorrowSnapshot)23369_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(BorrowSnapshot)23369_storage": { + "encoding": "inplace", + "label": "struct VTokenStorageBase.BorrowSnapshot", + "members": [ + { + "astId": 23366, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "principal", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 23368, + "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", + "label": "interestIndex", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} diff --git a/deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json b/deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json new file mode 100644 index 000000000..fccd3db7b --- /dev/null +++ b/deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json @@ -0,0 +1,348 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" + }, + "contracts/Comptroller/ComptrollerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerLensInterface.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" + }, + "contracts/Comptroller/Diamond/Diamond.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" + }, + "contracts/Comptroller/Diamond/facets/FacetBase.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n ensureListed(markets[vToken]);\n\n uint256 borrowCap = borrowCaps[vToken];\n require(borrowCap != 0, \"market borrow cap is 0\");\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows <= borrowCap, \"market borrow cap reached\");\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to Borrow not allowed\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to Borrow not allowed\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" + }, + "contracts/Comptroller/Unitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Governance/VTreasury.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" + }, + "contracts/InterestRateModels/InterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" + }, + "contracts/InterestRateModels/JumpRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/Lens/ComptrollerLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" + }, + "contracts/Lens/SnapshotLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Lens/VenusLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Oracle/PriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" + }, + "contracts/test/BEP20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/ComptrollerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" + }, + "contracts/test/ComptrollerMock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerScenario.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" + }, + "contracts/test/DiamondHarness.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" + }, + "contracts/test/EvilToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/EvilXDelegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/test/EvilXToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" + }, + "contracts/test/Fauceteer.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" + }, + "contracts/test/FaucetToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" + }, + "contracts/test/FeeToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/FixedPriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" + }, + "contracts/test/InterestRateModelHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" + }, + "contracts/test/MockDeflationaryToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" + }, + "contracts/test/MockVBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/SimplePriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/test/VAIControllerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" + }, + "contracts/test/VAIHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" + }, + "contracts/test/VBep20Harness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" + }, + "contracts/test/VBep20MockDelegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" + }, + "contracts/test/VRTConverterHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" + }, + "contracts/test/VRTVaultHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" + }, + "contracts/test/XVSHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" + }, + "contracts/test/XVSVaultScenario.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" + }, + "contracts/test/XVSVestingHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" + }, + "contracts/Tokens/EIP20Interface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/EIP20NonStandardInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/Prime/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" + }, + "contracts/Tokens/VAI/lib.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" + }, + "contracts/Tokens/VAI/VAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n\n // --- Math ---\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint wad = allowed ? uint(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint oldTreasuryPercent, uint newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint oldFloatRateMantissa, uint newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint oldMintCap, uint newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n /*** Main Actions ***/\n struct MintLocalVars {\n uint oErr;\n MathError mathErr;\n uint mintAmount;\n uint accountMintVAINew;\n uint accountMintableVAI;\n }\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint mintVAIAmount) external nonReentrant returns (uint) {\n if (address(comptroller) != address(0)) {\n require(mintVAIAmount > 0, \"mintVAIAmount cannot be zero\");\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n accrueVAIInterest();\n\n MintLocalVars memory vars;\n\n address minter = msg.sender;\n address _vai = vai;\n uint vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n uint vaiNewTotalSupply;\n\n (vars.mathErr, vaiNewTotalSupply) = addUInt(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.oErr, vars.accountMintableVAI) = getMintableVAI(minter);\n if (vars.oErr != uint(Error.NO_ERROR)) {\n return uint(Error.REJECTION);\n }\n\n // check that user have sufficient mintableVAI balance\n if (mintVAIAmount > vars.accountMintableVAI) {\n return fail(Error.REJECTION, FailureInfo.VAI_MINT_REJECTION);\n }\n\n // Calculate the minted balance based on interest index\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint remainedAmount;\n\n (vars.mathErr, remainedAmount) = subUInt(repayAmount, totalMintedVAI);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, pastVAIInterest[minter]) = addUInt(pastVAIInterest[minter], remainedAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n totalMintedVAI = repayAmount;\n }\n\n (vars.mathErr, vars.accountMintVAINew) = addUInt(totalMintedVAI, mintVAIAmount);\n require(vars.mathErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n uint error = comptroller.setMintedVAIOf(minter, vars.accountMintVAINew);\n if (error != 0) {\n return error;\n }\n\n uint feeAmount;\n uint remainedAmount;\n vars.mintAmount = mintVAIAmount;\n if (treasuryPercent != 0) {\n (vars.mathErr, feeAmount) = mulUInt(vars.mintAmount, treasuryPercent);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, remainedAmount) = subUInt(vars.mintAmount, feeAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = vars.mintAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint(Error.NO_ERROR);\n }\n }\n\n /**\n * @notice The repay function transfers VAI into the protocol and burn, reducing the user's borrow balance.\n * Before repaying an asset, users must first approve the VAI to access their VAI balance.\n * @param repayVAIAmount The amount of the VAI to be repaid.\n * @return 0 on success, otherwise an error code\n */\n function repayVAI(uint repayVAIAmount) external nonReentrant returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n require(repayVAIAmount > 0, \"repayVAIAmount cannt be zero\");\n\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n return repayVAIFresh(msg.sender, msg.sender, repayVAIAmount);\n }\n }\n\n /**\n * @notice Repay VAI Internal\n * @notice Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayVAIFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n MathError mErr;\n\n (uint burn, uint partOfCurrentInterest, uint partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n uint accountVAINew;\n\n (mErr, accountVAINew) = subUInt(vaiBalanceBorrower, burn);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, accountVAINew) = subUInt(accountVAINew, partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, pastVAIInterest[borrower]) = subUInt(pastVAIInterest[borrower], partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n if (error != 0) {\n return (error, 0);\n }\n emit RepayVAI(payer, borrower, burn);\n\n return (uint(Error.NO_ERROR), burn);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint, uint) {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n uint error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment VAI.\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint oErr;\n MathError mErr;\n uint sumSupply;\n uint marketSupply;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n @return (uint, uint) Tuple of error code and mintable VAI. Error 0 means no error. Mintable amount has 18 decimals\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint, uint) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint accountMintableVAI;\n uint i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n for (i = 0; i < enteredMarkets.length; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (, uint collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n }\n\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.REJECTION), 0);\n }\n\n return (uint(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint newTreasuryPercent\n ) external returns (uint) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint delta;\n uint rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint) {\n uint yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint) {\n uint storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint) {\n MathError mErr;\n uint delta;\n\n uint amount = comptroller.mintedVAIs(account);\n uint interest = pastVAIInterest[account];\n uint totalMintedVAI;\n uint newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return (uint, uint, uint) Amount of VAI to be burned, amount of VAI the user needs to pay in current interest and amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(address borrower, uint256 repayAmount) public view returns (uint, uint, uint) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint burn;\n uint partOfCurrentInterest = currentInterest;\n uint partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n require(newReceiver != address(0), \"invalid receiver address\");\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @notice Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function getVAIAddress() public view returns (address);\n\n function getMintableVAI(address minter) public view returns (uint, uint);\n\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\n\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\n\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint, uint);\n\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\n\n function updateVenusVAIMintIndex() external returns (uint);\n\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\n\n function getVAIRepayAmount(address account) public view returns (uint);\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" + }, + "contracts/Tokens/VAI/VAIUnitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRT.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverter.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" + }, + "contracts/Tokens/VTokens/VBep20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n function updateUnderlying(address newUnderlying) external {\n underlying = newUnderlying;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Immutable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VTokenInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" + }, + "contracts/Tokens/XVS/IXVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" + }, + "contracts/Tokens/XVS/XVS.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" + }, + "contracts/Utils/Address.sol": { + "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/Utils/CarefulMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" + }, + "contracts/Utils/Context.sol": { + "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "contracts/Utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" + }, + "contracts/Utils/ErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/Utils/Exponential.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" + }, + "contracts/Utils/ExponentialNoError.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" + }, + "contracts/Utils/IBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" + }, + "contracts/Utils/Ownable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/Utils/Owned.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" + }, + "contracts/Utils/SafeBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Utils/SafeCast.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/Utils/SafeMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "contracts/Utils/Tokenlock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" + }, + "contracts/VAIVault/VAIVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" + }, + "contracts/VRTVault/VRTVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" + }, + "contracts/XVSVault/TimeManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /**\n * @dev Retrieves the current slot\n * @return Current slot\n */\n function() view returns (uint256) private _getCurrentSlot;\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[48] private __gap;\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n isInitialized = true;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "contracts/XVSVault/XVSStore.sol": { + "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" + }, + "contracts/XVSVault/XVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\nimport { TimeManagerV5 } from \"./TimeManagerV5.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) internal totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json b/deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json new file mode 100644 index 000000000..23324968f --- /dev/null +++ b/deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json @@ -0,0 +1,348 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" + }, + "contracts/Comptroller/ComptrollerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerLensInterface.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" + }, + "contracts/Comptroller/Diamond/Diamond.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" + }, + "contracts/Comptroller/Diamond/facets/FacetBase.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n ensureListed(markets[vToken]);\n\n uint256 borrowCap = borrowCaps[vToken];\n require(borrowCap != 0, \"market borrow cap is 0\");\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows <= borrowCap, \"market borrow cap reached\");\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to Borrow not allowed\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to Borrow not allowed\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" + }, + "contracts/Comptroller/Unitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Governance/VTreasury.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" + }, + "contracts/InterestRateModels/InterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" + }, + "contracts/InterestRateModels/JumpRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/Lens/ComptrollerLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" + }, + "contracts/Lens/SnapshotLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Lens/VenusLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Oracle/PriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" + }, + "contracts/test/BEP20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/ComptrollerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" + }, + "contracts/test/ComptrollerMock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerScenario.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" + }, + "contracts/test/DiamondHarness.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" + }, + "contracts/test/EvilToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/EvilXDelegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/test/EvilXToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" + }, + "contracts/test/Fauceteer.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" + }, + "contracts/test/FaucetToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" + }, + "contracts/test/FeeToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/FixedPriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" + }, + "contracts/test/InterestRateModelHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" + }, + "contracts/test/MockDeflationaryToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" + }, + "contracts/test/MockVBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/SimplePriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/test/VAIControllerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" + }, + "contracts/test/VAIHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" + }, + "contracts/test/VBep20Harness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" + }, + "contracts/test/VBep20MockDelegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" + }, + "contracts/test/VRTConverterHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" + }, + "contracts/test/VRTVaultHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" + }, + "contracts/test/XVSHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" + }, + "contracts/test/XVSVaultScenario.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" + }, + "contracts/test/XVSVestingHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" + }, + "contracts/Tokens/EIP20Interface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/EIP20NonStandardInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/Prime/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" + }, + "contracts/Tokens/VAI/lib.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" + }, + "contracts/Tokens/VAI/VAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n\n // --- Math ---\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint wad = allowed ? uint(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint oldTreasuryPercent, uint newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint oldFloatRateMantissa, uint newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint oldMintCap, uint newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n /*** Main Actions ***/\n struct MintLocalVars {\n uint oErr;\n MathError mathErr;\n uint mintAmount;\n uint accountMintVAINew;\n uint accountMintableVAI;\n }\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint mintVAIAmount) external nonReentrant returns (uint) {\n if (address(comptroller) != address(0)) {\n require(mintVAIAmount > 0, \"mintVAIAmount cannot be zero\");\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n accrueVAIInterest();\n\n MintLocalVars memory vars;\n\n address minter = msg.sender;\n address _vai = vai;\n uint vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n uint vaiNewTotalSupply;\n\n (vars.mathErr, vaiNewTotalSupply) = addUInt(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.oErr, vars.accountMintableVAI) = getMintableVAI(minter);\n if (vars.oErr != uint(Error.NO_ERROR)) {\n return uint(Error.REJECTION);\n }\n\n // check that user have sufficient mintableVAI balance\n if (mintVAIAmount > vars.accountMintableVAI) {\n return fail(Error.REJECTION, FailureInfo.VAI_MINT_REJECTION);\n }\n\n // Calculate the minted balance based on interest index\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint remainedAmount;\n\n (vars.mathErr, remainedAmount) = subUInt(repayAmount, totalMintedVAI);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, pastVAIInterest[minter]) = addUInt(pastVAIInterest[minter], remainedAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n totalMintedVAI = repayAmount;\n }\n\n (vars.mathErr, vars.accountMintVAINew) = addUInt(totalMintedVAI, mintVAIAmount);\n require(vars.mathErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n uint error = comptroller.setMintedVAIOf(minter, vars.accountMintVAINew);\n if (error != 0) {\n return error;\n }\n\n uint feeAmount;\n uint remainedAmount;\n vars.mintAmount = mintVAIAmount;\n if (treasuryPercent != 0) {\n (vars.mathErr, feeAmount) = mulUInt(vars.mintAmount, treasuryPercent);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, remainedAmount) = subUInt(vars.mintAmount, feeAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = vars.mintAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint(Error.NO_ERROR);\n }\n }\n\n /**\n * @notice The repay function transfers VAI into the protocol and burn, reducing the user's borrow balance.\n * Before repaying an asset, users must first approve the VAI to access their VAI balance.\n * @param repayVAIAmount The amount of the VAI to be repaid.\n * @return 0 on success, otherwise an error code\n */\n function repayVAI(uint repayVAIAmount) external nonReentrant returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n require(repayVAIAmount > 0, \"repayVAIAmount cannt be zero\");\n\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n return repayVAIFresh(msg.sender, msg.sender, repayVAIAmount);\n }\n }\n\n /**\n * @notice Repay VAI Internal\n * @notice Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayVAIFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n MathError mErr;\n\n (uint burn, uint partOfCurrentInterest, uint partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n uint accountVAINew;\n\n (mErr, accountVAINew) = subUInt(vaiBalanceBorrower, burn);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, accountVAINew) = subUInt(accountVAINew, partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, pastVAIInterest[borrower]) = subUInt(pastVAIInterest[borrower], partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n if (error != 0) {\n return (error, 0);\n }\n emit RepayVAI(payer, borrower, burn);\n\n return (uint(Error.NO_ERROR), burn);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint, uint) {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n uint error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment VAI.\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint oErr;\n MathError mErr;\n uint sumSupply;\n uint marketSupply;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n @return (uint, uint) Tuple of error code and mintable VAI. Error 0 means no error. Mintable amount has 18 decimals\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint, uint) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint accountMintableVAI;\n uint i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n for (i = 0; i < enteredMarkets.length; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (, uint collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n }\n\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.REJECTION), 0);\n }\n\n return (uint(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint newTreasuryPercent\n ) external returns (uint) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint delta;\n uint rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint) {\n uint yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint) {\n uint storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint) {\n MathError mErr;\n uint delta;\n\n uint amount = comptroller.mintedVAIs(account);\n uint interest = pastVAIInterest[account];\n uint totalMintedVAI;\n uint newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return (uint, uint, uint) Amount of VAI to be burned, amount of VAI the user needs to pay in current interest and amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(address borrower, uint256 repayAmount) public view returns (uint, uint, uint) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint burn;\n uint partOfCurrentInterest = currentInterest;\n uint partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n require(newReceiver != address(0), \"invalid receiver address\");\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @notice Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function getVAIAddress() public view returns (address);\n\n function getMintableVAI(address minter) public view returns (uint, uint);\n\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\n\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\n\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint, uint);\n\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\n\n function updateVenusVAIMintIndex() external returns (uint);\n\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\n\n function getVAIRepayAmount(address account) public view returns (uint);\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" + }, + "contracts/Tokens/VAI/VAIUnitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRT.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverter.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" + }, + "contracts/Tokens/VTokens/VBep20.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n function updateUnderlying(address newUnderlying) external {\n underlying = newUnderlying;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function updateUnderlying(address newUnderlying) public {\n underlying = newUnderlying;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Immutable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VTokenInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" + }, + "contracts/Tokens/XVS/IXVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" + }, + "contracts/Tokens/XVS/XVS.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" + }, + "contracts/Utils/Address.sol": { + "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/Utils/CarefulMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" + }, + "contracts/Utils/Context.sol": { + "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "contracts/Utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" + }, + "contracts/Utils/ErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/Utils/Exponential.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" + }, + "contracts/Utils/ExponentialNoError.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" + }, + "contracts/Utils/IBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" + }, + "contracts/Utils/Ownable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/Utils/Owned.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" + }, + "contracts/Utils/SafeBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Utils/SafeCast.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/Utils/SafeMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "contracts/Utils/Tokenlock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" + }, + "contracts/VAIVault/VAIVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" + }, + "contracts/VRTVault/VRTVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" + }, + "contracts/XVSVault/TimeManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /**\n * @dev Retrieves the current slot\n * @return Current slot\n */\n function() view returns (uint256) private _getCurrentSlot;\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[48] private __gap;\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n isInitialized = true;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "contracts/XVSVault/XVSStore.sol": { + "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" + }, + "contracts/XVSVault/XVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\nimport { TimeManagerV5 } from \"./TimeManagerV5.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) internal totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} From 373a93d5b9a777252bc24844e259f2e9830cd88b Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Thu, 30 May 2024 16:16:41 +0400 Subject: [PATCH 02/85] fix: removed files --- .../bsctestnet/VBep20DelegateTemp.json | 2504 ----------------- deployments/bsctestnet/VBep20Temp.json | 2462 ---------------- .../42f81d8e85977bc834873ceceb7c8672.json | 348 --- .../442b6826bad342d5527fff650c37c186.json | 348 --- 4 files changed, 5662 deletions(-) delete mode 100644 deployments/bsctestnet/VBep20DelegateTemp.json delete mode 100644 deployments/bsctestnet/VBep20Temp.json delete mode 100644 deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json delete mode 100644 deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json diff --git a/deployments/bsctestnet/VBep20DelegateTemp.json b/deployments/bsctestnet/VBep20DelegateTemp.json deleted file mode 100644 index 5e70b902e..000000000 --- a/deployments/bsctestnet/VBep20DelegateTemp.json +++ /dev/null @@ -1,2504 +0,0 @@ -{ - "address": "0x437Af2bbE2f88C14ac7067C99F7825375A10a244", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeemBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlyingBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newUnderlying", - "type": "address" - } - ], - "name": "updateUnderlying", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x5f05edf23a24b2a0399870f49c744412541896a4045fe2e74d3fdc2bf3091aad", - "receipt": { - "to": null, - "from": "0x464779C41C5f1Be598853C1F87bCC7087Ea75f28", - "contractAddress": "0x437Af2bbE2f88C14ac7067C99F7825375A10a244", - "transactionIndex": 0, - "gasUsed": "5149796", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x11710a560963433e41737306ebedf95837479fd88c3aea1abf2ae6738446aebb", - "transactionHash": "0x5f05edf23a24b2a0399870f49c744412541896a4045fe2e74d3fdc2bf3091aad", - "logs": [], - "blockNumber": 39571055, - "cumulativeGasUsed": "5149796", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "442b6826bad342d5527fff650c37c186", - "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cashPrior\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"interestAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"AccrueInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"error\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"info\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"detail\",\"type\":\"uint256\"}],\"name\":\"Failure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vTokenCollateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"LiquidateBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"MintBehalf\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"oldComptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"NewComptroller\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"oldInterestRateModel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"NewMarketInterestRateModel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"NewProtocolShareReserve\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReduceReservesBlockDelta\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta\",\"type\":\"uint256\"}],\"name\":\"NewReduceReservesBlockDelta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReserveFactorMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"NewReserveFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"RedeemFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"RepayBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"benefactor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolShareReserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"}],\"name\":\"_addReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"_becomeImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount_\",\"type\":\"uint256\"}],\"name\":\"_reduceReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_resignImplementation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"_setComptroller\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel_\",\"type\":\"address\"}],\"name\":\"_setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa_\",\"type\":\"uint256\"}],\"name\":\"_setReserveFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"accrueInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"internalType\":\"contract VTokenInterface\",\"name\":\"vTokenCollateral\",\"type\":\"address\"}],\"name\":\"liquidateBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mintBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeemBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlyingBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockDelta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveFactorMantissa\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlManagerAddress\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"protcolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta_\",\"type\":\"uint256\"}],\"name\":\"setReduceReservesBlockDelta\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supplyRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"totalBorrowsCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newUnderlying\",\"type\":\"address\"}],\"name\":\"updateUnderlying\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_addReserves(uint256)\":{\"params\":{\"addAmount\":\"The amount of underlying tokens to add as reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_becomeImplementation(bytes)\":{\"params\":{\"data\":\"The encoded bytes data for any initialization\"}},\"_reduceReserves(uint256)\":{\"params\":{\"reduceAmount_\":\"Amount of reduction to reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setComptroller(address)\":{\"details\":\"Admin function to set a new comptroller\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setInterestRateModel(address)\":{\"details\":\"Governance function to accrue interest and update the interest rate model\",\"params\":{\"newInterestRateModel_\":\"The new interest rate model to use\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setReserveFactor(uint256)\":{\"details\":\"Governor function to accrue interest and set a new reserve factor\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"accrueInterest()\":{\"details\":\"This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta\"},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"The number of tokens allowed to be spent (-1 means infinite)\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"Whether or not the approval succeeded\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of tokens owned by `owner`\"},\"balanceOfUnderlying(address)\":{\"details\":\"This also accrues interest in a transaction\",\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The amount of underlying owned by `owner`\"},\"borrow(uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowBalanceCurrent(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated after updating borrowIndex\"},\"return\":\"The calculated balance\"},\"borrowBalanceStored(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated\"},\"return\":\"The calculated balance\"},\"borrowBehalf(address,uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\",\"borrower\":\"The borrower, on behalf of whom to borrow.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowRatePerBlock()\":{\"return\":\"The borrow interest rate per block, scaled by 1e18\"},\"exchangeRateCurrent()\":{\"return\":\"Calculated exchange rate scaled by 1e18\"},\"exchangeRateStored()\":{\"details\":\"This function does not accrue interest before calculating the exchange rate\",\"return\":\"Calculated exchange rate scaled by 1e18\"},\"getAccountSnapshot(address)\":{\"details\":\"This is used by comptroller to more efficiently perform liquidity checks.\",\"params\":{\"account\":\"Address of the account to snapshot\"},\"return\":\"(possible error, token balance, borrow balance, exchange rate mantissa)\"},\"getCash()\":{\"return\":\"The quantity of underlying asset owned by this contract\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"BEP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"BEP-20 name of this token\",\"symbol_\":\"BEP-20 symbol of this token\",\"underlying_\":\"The address of the underlying asset\"}},\"initialize(address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"EIP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"EIP-20 name of this token\",\"symbol_\":\"EIP-20 symbol of this token\"}},\"liquidateBorrow(address,uint256,address)\":{\"params\":{\"borrower\":\"The borrower of this vToken to be liquidated\",\"repayAmount\":\"The amount of the underlying borrowed asset to repay\",\"vTokenCollateral\":\"The market in which to seize collateral from the borrower\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mint(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mintBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\",\"receiver\":\"The account which is receiving the vTokens\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeem(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\",\"redeemer\":\"The user on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlying(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to receive from redeeming vTokens\",\"redeemer\":\", on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrow(uint256)\":{\"params\":{\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrowBehalf(address,uint256)\":{\"params\":{\"borrower\":\"The account with the debt being payed off\",\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"seize(address,address,uint256)\":{\"details\":\"Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\",\"params\":{\"borrower\":\"The account having collateral seized\",\"liquidator\":\"The account receiving seized collateral\",\"seizeTokens\":\"The number of vTokens to seize\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"setAccessControlManager(address)\":{\"details\":\"Admin function to set the access control address\",\"params\":{\"newAccessControlManagerAddress\":\"New address for the access control\"},\"return\":\"uint 0=success, otherwise will revert\"},\"setProtocolShareReserve(address)\":{\"params\":{\"protcolShareReserve_\":\"The address of protocol share reserve contract\"}},\"setReduceReservesBlockDelta(uint256)\":{\"params\":{\"newReduceReservesBlockDelta_\":\"block difference value\"}},\"supplyRatePerBlock()\":{\"return\":\"The supply interest rate per block, scaled by 1e18\"},\"totalBorrowsCurrent()\":{\"return\":\"The total borrows with interest\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"return\":\"Whether or not the transfer succeeded\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"return\":\"Whether or not the transfer succeeded\"}},\"title\":\"Venus's VBep20Delegate Contract\"},\"userdoc\":{\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. msg.sender must be pendingAdmin\"},\"_addReserves(uint256)\":{\"notice\":\"The sender adds to reserves.\"},\"_becomeImplementation(bytes)\":{\"notice\":\"Called by the delegator on a delegate to initialize it for duty\"},\"_reduceReserves(uint256)\":{\"notice\":\"Accrues interest and reduces reserves by transferring to protocol share reserve\"},\"_resignImplementation()\":{\"notice\":\"Called by the delegator on a delegate to forfeit its responsibility\"},\"_setComptroller(address)\":{\"notice\":\"Sets a new comptroller for the market\"},\"_setInterestRateModel(address)\":{\"notice\":\"Accrues interest and updates the interest rate model using _setInterestRateModelFresh\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setReserveFactor(uint256)\":{\"notice\":\"accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\"},\"accrueInterest()\":{\"notice\":\"Applies accrued interest to total borrows and reserves\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Get the underlying balance of the `owner`\"},\"borrow(uint256)\":{\"notice\":\"Sender borrows assets from the protocol to their own address\"},\"borrowBalanceCurrent(address)\":{\"notice\":\"Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\"},\"borrowBalanceStored(address)\":{\"notice\":\"Return the borrow balance of account based on stored data\"},\"borrowBehalf(address,uint256)\":{\"notice\":\"Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\"},\"borrowRatePerBlock()\":{\"notice\":\"Returns the current per-block borrow interest rate for this vToken\"},\"constructor\":\"Construct an empty delegate\",\"exchangeRateCurrent()\":{\"notice\":\"Accrue interest then return the up-to-date exchange rate\"},\"exchangeRateStored()\":{\"notice\":\"Calculates the exchange rate from the underlying to the VToken\"},\"getAccountSnapshot(address)\":{\"notice\":\"Get a snapshot of the account's balances, and the cached exchange rate\"},\"getCash()\":{\"notice\":\"Get cash balance of this vToken in the underlying asset\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the new money market\"},\"initialize(address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the money market\"},\"liquidateBorrow(address,uint256,address)\":{\"notice\":\"The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator.\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives vTokens in exchange\"},\"mintBehalf(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receiver receives vTokens in exchange\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for the underlying asset\"},\"redeemBehalf(address,uint256)\":{\"notice\":\"Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"redeemUnderlying(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for a specified amount of underlying asset\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"notice\":\"Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"repayBorrow(uint256)\":{\"notice\":\"Sender repays their own borrow\"},\"repayBorrowBehalf(address,uint256)\":{\"notice\":\"Sender repays a borrow belonging to another borrowing account\"},\"seize(address,address,uint256)\":{\"notice\":\"Transfers collateral tokens (this market) to the liquidator.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"Sets protocol share reserve contract address\"},\"setReduceReservesBlockDelta(uint256)\":{\"notice\":\"Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\"},\"supplyRatePerBlock()\":{\"notice\":\"Returns the current per-block supply interest rate for this vToken\"},\"totalBorrowsCurrent()\":{\"notice\":\"Returns the current total borrows plus accrued interest\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"}},\"notice\":\"VTokens which wrap an EIP-20 underlying and are delegated to\"}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/VTokens/VBep20Delegate.sol\":\"VBep20Delegate\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.5.16;\\n\\n/**\\n * @title IAccessControlManagerV5\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\\n */\\ninterface IAccessControlManagerV5 {\\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 */\\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 /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleGranted} event.\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n /**\\n * @notice Verifies if the given account can call a praticular contract's function\\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\\n * @param account address (eoa or contract) for which call permissions will be checked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\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\":\"0x3563db4c75f7aa0b8a982bab591907dda192438a2368511b62a9c587a3e54226\"},\"contracts/Comptroller/ComptrollerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport \\\"../Oracle/PriceOracle.sol\\\";\\nimport \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerTypes } from \\\"./ComptrollerStorage.sol\\\";\\n\\ncontract ComptrollerInterface {\\n /// @notice Indicator that this is a Comptroller contract (for inspection)\\n bool public constant isComptroller = true;\\n\\n /*** Assets You Are In ***/\\n\\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\\n\\n function exitMarket(address vToken) external returns (uint);\\n\\n /*** Policy Hooks ***/\\n\\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\\n\\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\\n\\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\\n\\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\\n\\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\\n\\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\\n\\n function repayBorrowAllowed(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function repayBorrowVerify(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount,\\n uint borrowerIndex\\n ) external;\\n\\n function liquidateBorrowAllowed(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function liquidateBorrowVerify(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n uint seizeTokens\\n ) external;\\n\\n function seizeAllowed(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external returns (uint);\\n\\n function seizeVerify(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external;\\n\\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\\n\\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\\n\\n /*** Liquidity/Liquidation Calculations ***/\\n\\n function liquidateCalculateSeizeTokens(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function getXVSAddress() public view returns (address);\\n\\n function markets(address) external view returns (bool, uint);\\n\\n function oracle() external view returns (PriceOracle);\\n\\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\\n\\n function getAssetsIn(address) external view returns (VToken[] memory);\\n\\n function claimVenus(address) external;\\n\\n function venusAccrued(address) external view returns (uint);\\n\\n function venusSupplySpeeds(address) external view returns (uint);\\n\\n function venusBorrowSpeeds(address) external view returns (uint);\\n\\n function getAllMarkets() external view returns (VToken[] memory);\\n\\n function venusSupplierIndex(address, address) external view returns (uint);\\n\\n function venusInitialIndex() external view returns (uint224);\\n\\n function venusBorrowerIndex(address, address) external view returns (uint);\\n\\n function venusBorrowState(address) external view returns (uint224, uint32);\\n\\n function venusSupplyState(address) external view returns (uint224, uint32);\\n\\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n function vaiController() external view returns (VAIControllerInterface);\\n\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n function protocolPaused() external view returns (bool);\\n\\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\\n\\n function mintedVAIs(address user) external view returns (uint);\\n\\n function vaiMintRate() external view returns (uint);\\n}\\n\\ninterface IVAIVault {\\n function updatePendingRewards() external;\\n}\\n\\ninterface IComptroller {\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n /*** Treasury Data ***/\\n function treasuryAddress() external view returns (address);\\n\\n function treasuryPercent() external view returns (uint);\\n}\\n\",\"keccak256\":\"0x4f4965dd8614b455952a2ef186fd8a509affbc56078a4aa8702f46d4c8209793\"},\"contracts/Comptroller/ComptrollerLensInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ninterface ComptrollerLensInterface {\\n function liquidateCalculateSeizeTokens(\\n address comptroller,\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address comptroller,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function getHypotheticalAccountLiquidity(\\n address comptroller,\\n address account,\\n VToken vTokenModify,\\n uint redeemTokens,\\n uint borrowAmount\\n ) external view returns (uint, uint, uint);\\n}\\n\",\"keccak256\":\"0xc824e034221740c1957891547c78a123b595017cf102629454a04d36637e9c4a\"},\"contracts/Comptroller/ComptrollerStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken } from \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport { PriceOracle } from \\\"../Oracle/PriceOracle.sol\\\";\\nimport { VAIControllerInterface } from \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerLensInterface } from \\\"./ComptrollerLensInterface.sol\\\";\\nimport { IPrime } from \\\"../Tokens/Prime/IPrime.sol\\\";\\n\\ninterface ComptrollerTypes {\\n enum Action {\\n MINT,\\n REDEEM,\\n BORROW,\\n REPAY,\\n SEIZE,\\n LIQUIDATE,\\n TRANSFER,\\n ENTER_MARKET,\\n EXIT_MARKET\\n }\\n}\\n\\ncontract UnitrollerAdminStorage {\\n /**\\n * @notice Administrator for this contract\\n */\\n address public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address public pendingAdmin;\\n\\n /**\\n * @notice Active brains of Unitroller\\n */\\n address public comptrollerImplementation;\\n\\n /**\\n * @notice Pending brains of Unitroller\\n */\\n address public pendingComptrollerImplementation;\\n}\\n\\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\\n /**\\n * @notice Oracle which gives the price of any given asset\\n */\\n PriceOracle public oracle;\\n\\n /**\\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\\n */\\n uint256 public closeFactorMantissa;\\n\\n /**\\n * @notice Multiplier representing the discount on collateral that a liquidator receives\\n */\\n uint256 public liquidationIncentiveMantissa;\\n\\n /**\\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\\n */\\n uint256 public maxAssets;\\n\\n /**\\n * @notice Per-account mapping of \\\"assets you are in\\\", capped by maxAssets\\n */\\n mapping(address => VToken[]) public accountAssets;\\n\\n struct Market {\\n /// @notice Whether or not this market is listed\\n bool isListed;\\n /**\\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\\n * For instance, 0.9 to allow borrowing 90% of collateral value.\\n * Must be between 0 and 1, and stored as a mantissa.\\n */\\n uint256 collateralFactorMantissa;\\n /// @notice Per-market mapping of \\\"accounts in this asset\\\"\\n mapping(address => bool) accountMembership;\\n /// @notice Whether or not this market receives XVS\\n bool isVenus;\\n }\\n\\n /**\\n * @notice Official mapping of vTokens -> Market metadata\\n * @dev Used e.g. to determine if a market is supported\\n */\\n mapping(address => Market) public markets;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n address public pauseGuardian;\\n\\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\\n bool private _mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool private _borrowGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal transferGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal seizeGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal borrowGuardianPaused;\\n\\n struct VenusMarketState {\\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\\n uint224 index;\\n /// @notice The block number the index was last updated at\\n uint32 block;\\n }\\n\\n /// @notice A list of all markets\\n VToken[] public allMarkets;\\n\\n /// @notice The rate at which the flywheel distributes XVS, per block\\n uint256 internal venusRate;\\n\\n /// @notice The portion of venusRate that each market currently receives\\n mapping(address => uint256) internal venusSpeeds;\\n\\n /// @notice The Venus market supply state for each market\\n mapping(address => VenusMarketState) public venusSupplyState;\\n\\n /// @notice The Venus market borrow state for each market\\n mapping(address => VenusMarketState) public venusBorrowState;\\n\\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\\n\\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\\n\\n /// @notice The XVS accrued but not yet transferred to each user\\n mapping(address => uint256) public venusAccrued;\\n\\n /// @notice The Address of VAIController\\n VAIControllerInterface public vaiController;\\n\\n /// @notice The minted VAI amount to each user\\n mapping(address => uint256) public mintedVAIs;\\n\\n /// @notice VAI Mint Rate as a percentage\\n uint256 public vaiMintRate;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n bool public mintVAIGuardianPaused;\\n bool public repayVAIGuardianPaused;\\n\\n /**\\n * @notice Pause/Unpause whole protocol actions\\n */\\n bool public protocolPaused;\\n\\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\\n uint256 private venusVAIRate;\\n}\\n\\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\\n uint256 public venusVAIVaultRate;\\n\\n // address of VAI Vault\\n address public vaiVaultAddress;\\n\\n // start block of release to VAI Vault\\n uint256 public releaseStartBlock;\\n\\n // minimum release amount to VAI Vault\\n uint256 public minReleaseAmount;\\n}\\n\\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\\n address public borrowCapGuardian;\\n\\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\\n mapping(address => uint256) public borrowCaps;\\n}\\n\\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\\n /// @notice Treasury Guardian address\\n address public treasuryGuardian;\\n\\n /// @notice Treasury address\\n address public treasuryAddress;\\n\\n /// @notice Fee percent of accrued interest with decimal 18\\n uint256 public treasuryPercent;\\n}\\n\\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\\n mapping(address => uint256) private venusContributorSpeeds;\\n\\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\\n mapping(address => uint256) private lastContributorBlock;\\n}\\n\\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\\n address public liquidatorContract;\\n}\\n\\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\\n ComptrollerLensInterface public comptrollerLens;\\n}\\n\\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\\n mapping(address => uint256) public supplyCaps;\\n}\\n\\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\\n /// @notice AccessControlManager address\\n address internal accessControl;\\n\\n /// @notice True if a certain action is paused on a certain market\\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\\n}\\n\\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\\n mapping(address => uint256) public venusBorrowSpeeds;\\n\\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\\n mapping(address => uint256) public venusSupplySpeeds;\\n}\\n\\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\\n mapping(address => mapping(address => bool)) public approvedDelegates;\\n}\\n\\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\\n mapping(address => bool) public isForcedLiquidationEnabled;\\n}\\n\\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\\n }\\n\\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\\n // facet addresses\\n address[] internal _facetAddresses;\\n}\\n\\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\\n /// @notice Prime token address\\n IPrime public prime;\\n}\\n\\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\\n}\\n\\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\\n /// @notice The XVS token contract address\\n address internal xvs;\\n\\n /// @notice The XVS vToken contract address\\n address internal xvsVToken;\\n}\\n\",\"keccak256\":\"0x06608bb502e91c33fda8c0dd88cc79a49a078fab521bc27d10fc3a69c1da55f4\"},\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/Oracle/PriceOracle.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ncontract PriceOracle {\\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\\n bool public constant isPriceOracle = true;\\n\\n /**\\n * @notice Get the underlying price of a vToken asset\\n * @param vToken The vToken to get the underlying price of\\n * @return The underlying asset price mantissa (scaled by 1e18).\\n * Zero means the price is unavailable.\\n */\\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x0f68d0e07decba8fb9a77df1659170f310b487cc0b650f53ca6aa55ed62b28de\"},\"contracts/Tokens/EIP20Interface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title BEP 20 Token Standard Interface\\n * https://eips.ethereum.org/EIPS/eip-20\\n */\\ninterface EIP20Interface {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return success whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x7e89ffa9c0d432c4db8bd5388ff68e33934dcdb1d038d74bbed3b2fdae3eb532\"},\"contracts/Tokens/EIP20NonStandardInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title EIP20NonStandardInterface\\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\ninterface EIP20NonStandardInterface {\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance of the owner\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transfer(address dst, uint256 amount) external;\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transferFrom(address src, address dst, uint256 amount) external;\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved\\n * @return success Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x05a3a7d5ab47de3964c95d706dcc18fe7583b1d064dbb74808c0f2774f347afa\"},\"contracts/Tokens/Prime/IPrime.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title IPrime\\n * @author Venus\\n * @notice Interface for Prime Token\\n */\\ninterface IPrime {\\n /**\\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\\n * @param user the account address whose balance was updated\\n */\\n function xvsUpdated(address user) external;\\n\\n /**\\n * @notice accrues interest and updates score for an user for a specific market\\n * @param user the account address for which to accrue interest and update score\\n * @param market the market for which to accrue interest and update score\\n */\\n function accrueInterestAndUpdateScore(address user, address market) external;\\n\\n /**\\n * @notice Distributes income from market since last distribution\\n * @param vToken the market for which to distribute the income\\n */\\n function accrueInterest(address vToken) external;\\n\\n /**\\n * @notice Returns if user is a prime holder\\n * @param isPrimeHolder returns if the user is a prime holder\\n */\\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\\n}\\n\",\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\"},\"contracts/Tokens/VAI/VAIControllerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../VTokens/VTokenInterfaces.sol\\\";\\n\\ncontract VAIControllerInterface {\\n function getVAIAddress() public view returns (address);\\n\\n function getMintableVAI(address minter) public view returns (uint, uint);\\n\\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\\n\\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\\n\\n function liquidateVAI(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint, uint);\\n\\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\\n\\n function updateVenusVAIMintIndex() external returns (uint);\\n\\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\\n\\n function getVAIRepayAmount(address account) public view returns (uint);\\n}\\n\",\"keccak256\":\"0x17eb6edb1262c4effcad86f614ff20d00256278485054b11aa5cf011ff6f8a86\"},\"contracts/Tokens/VTokens/VBep20.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \\\"./VToken.sol\\\";\\nimport { EIP20Interface } from \\\"../EIP20Interface.sol\\\";\\nimport { EIP20NonStandardInterface } from \\\"../EIP20NonStandardInterface.sol\\\";\\n\\n/**\\n * @title Venus's VBep20 Contract\\n * @notice vTokens which wrap an EIP-20 underlying\\n * @author Venus\\n */\\ncontract VBep20 is VToken, VBep20Interface {\\n /*** User Interface ***/\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits Mint event\\n function mint(uint mintAmount) external returns (uint) {\\n (uint err, ) = mintInternal(mintAmount);\\n return err;\\n }\\n\\n function updateUnderlying(address newUnderlying) external {\\n underlying = newUnderlying;\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits MintBehalf event\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for the underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeem(uint redeemTokens) external returns (uint) {\\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The user on behalf of whom to redeem\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemInternal(redeemer, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemAmount The amount of underlying to redeem\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer, on behalf of whom to redeem\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets from the protocol to their own address\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrow(uint borrowAmount) external returns (uint) {\\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\\n * @param borrower The borrower, on behalf of whom to borrow.\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(borrower, msg.sender), \\\"not an approved delegate\\\");\\n return borrowInternal(borrower, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrow(uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowInternal(repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emit LiquidateBorrow event on success\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint) {\\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\\n return err;\\n }\\n\\n /**\\n * @notice The sender adds to reserves.\\n * @param addAmount The amount of underlying tokens to add as reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesAdded event\\n function _addReserves(uint addAmount) external returns (uint) {\\n return _addReservesInternal(addAmount);\\n }\\n\\n /**\\n * @notice Initialize the new money market\\n * @param underlying_ The address of the underlying asset\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ BEP-20 name of this token\\n * @param symbol_ BEP-20 symbol of this token\\n * @param decimals_ BEP-20 decimal precision of this token\\n */\\n function initialize(\\n address underlying_,\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n // VToken initialize does the bulk of the work\\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\\n\\n // Set underlying and sanity check it\\n underlying = underlying_;\\n EIP20Interface(underlying).totalSupply();\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\\n * This will revert due to insufficient balance or insufficient allowance.\\n * This function returns the actual amount received,\\n * which may be less than `amount` if there is a fee attached to the transfer.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint) {\\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_IN_FAILED\\\");\\n\\n // Calculate the amount that was *actually* transferred\\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\\n require(balanceAfter >= balanceBefore, \\\"TOKEN_TRANSFER_IN_OVERFLOW\\\");\\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\\n }\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\\n * it is >= amount, this should not revert in normal conditions.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferOut(address payable to, uint amount) internal {\\n EIP20NonStandardInterface(underlying).transfer(to, amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_OUT_FAILED\\\");\\n }\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying tokens owned by this contract\\n */\\n function getCashPrior() internal view returns (uint) {\\n return EIP20Interface(underlying).balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x89637da83701227fc706f3edfff4aec486f5ef5f2ef567cc2c7878597b487c4f\"},\"contracts/Tokens/VTokens/VBep20Delegate.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport { VBep20 } from \\\"./VBep20.sol\\\";\\nimport { VDelegateInterface } from \\\"./VTokenInterfaces.sol\\\";\\n\\n/**\\n * @title Venus's VBep20Delegate Contract\\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\\n * @author Venus\\n */\\ncontract VBep20Delegate is VBep20, VDelegateInterface {\\n /**\\n * @notice Construct an empty delegate\\n */\\n constructor() public {}\\n\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public {\\n // Shh -- currently unused\\n data;\\n\\n // Shh -- we don't ever want this hook to be marked pure\\n if (false) {\\n implementation = address(0);\\n }\\n\\n require(msg.sender == admin, \\\"only the admin may call _becomeImplementation\\\");\\n }\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public {\\n // Shh -- we don't ever want this hook to be marked pure\\n if (false) {\\n implementation = address(0);\\n }\\n\\n require(msg.sender == admin, \\\"only the admin may call _resignImplementation\\\");\\n }\\n\\n function updateUnderlying(address newUnderlying) public {\\n underlying = newUnderlying;\\n }\\n}\\n\",\"keccak256\":\"0xdab754eeef2e64671af424eeb0373f1e19e7a5b4469e71e9afce4886e02b8147\"},\"contracts/Tokens/VTokens/VToken.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../Utils/ErrorReporter.sol\\\";\\nimport \\\"../../Utils/Exponential.sol\\\";\\nimport \\\"../../Tokens/EIP20Interface.sol\\\";\\nimport \\\"../../Tokens/EIP20NonStandardInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\nimport \\\"./VTokenInterfaces.sol\\\";\\nimport { IAccessControlManagerV5 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\\\";\\n\\n/**\\n * @title Venus's vToken Contract\\n * @notice Abstract base for vTokens\\n * @author Venus\\n */\\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\\n struct MintLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint mintTokens;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n uint actualMintAmount;\\n }\\n\\n struct RedeemLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint redeemTokens;\\n uint redeemAmount;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n }\\n\\n struct BorrowLocalVars {\\n MathError mathErr;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n }\\n\\n struct RepayBorrowLocalVars {\\n Error err;\\n MathError mathErr;\\n uint repayAmount;\\n uint borrowerIndex;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n uint actualRepayAmount;\\n }\\n\\n /*** Reentrancy Guard ***/\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n */\\n modifier nonReentrant() {\\n require(_notEntered, \\\"re-entered\\\");\\n _notEntered = false;\\n _;\\n _notEntered = true; // get a gas-refund post-Istanbul\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n // @custom:event Emits Approval event on successful approve\\n function approve(address spender, uint256 amount) external returns (bool) {\\n transferAllowances[msg.sender][spender] = amount;\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external returns (uint) {\\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\\n ensureNoMathError(mErr);\\n return balance;\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return totalBorrows;\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return borrowBalanceStored(account);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\\n }\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\\n // Check caller = admin\\n ensureAdmin(msg.sender);\\n\\n // Save current value, if any, for inclusion in log\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store pendingAdmin with value newPendingAdmin\\n pendingAdmin = newPendingAdmin;\\n\\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewAdmin event on successful acceptance\\n // @custom:event Emits NewPendingAdmin event with null new pending admin\\n function _acceptAdmin() external returns (uint) {\\n // Check caller is pendingAdmin\\n if (msg.sender != pendingAdmin) {\\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\\n }\\n\\n // Save current values for inclusion in log\\n address oldAdmin = admin;\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store admin with value pendingAdmin\\n admin = pendingAdmin;\\n\\n // Clear the pending value\\n pendingAdmin = address(0);\\n\\n emit NewAdmin(oldAdmin, admin);\\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\\n * @dev Governor function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewReserveFactor event\\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_setReserveFactor(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\\n }\\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\\n return _setReserveFactorFresh(newReserveFactorMantissa_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract\\n * @dev Admin function to set the access control address\\n * @param newAccessControlManagerAddress New address for the access control\\n * @return uint 0=success, otherwise will revert\\n */\\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ensureNonZeroAddress(newAccessControlManagerAddress);\\n\\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\\n accessControlManager = newAccessControlManagerAddress;\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\\n * @param reduceAmount_ Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesReduced event\\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_reduceReserves(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // If reserves were reduced in accrueInterest\\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\\n return _reduceReservesFresh(reduceAmount_);\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (-1 means infinite)\\n */\\n function allowance(address owner, address spender) external view returns (uint256) {\\n return transferAllowances[owner][spender];\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view returns (uint256) {\\n return accountTokens[owner];\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\\n uint vTokenBalance = accountTokens[account];\\n uint borrowBalance;\\n uint exchangeRateMantissa;\\n\\n MathError mErr;\\n\\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view returns (uint) {\\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view returns (uint) {\\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view returns (uint) {\\n return getCashPrior();\\n }\\n\\n /**\\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\\n * @param newReduceReservesBlockDelta_ block difference value\\n */\\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\\n require(newReduceReservesBlockDelta_ > 0, \\\"Invalid Input\\\");\\n ensureAllowed(\\\"setReduceReservesBlockDelta(uint256)\\\");\\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\\n }\\n\\n /**\\n * @notice Sets protocol share reserve contract address\\n * @param protcolShareReserve_ The address of protocol share reserve contract\\n */\\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n ensureNonZeroAddress(protcolShareReserve_);\\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\\n protocolShareReserve = protcolShareReserve_;\\n }\\n\\n /**\\n * @notice Initialize the money market\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ EIP-20 name of this token\\n * @param symbol_ EIP-20 symbol of this token\\n * @param decimals_ EIP-20 decimal precision of this token\\n */\\n function initialize(\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n ensureAdmin(msg.sender);\\n require(accrualBlockNumber == 0 && borrowIndex == 0, \\\"market may only be initialized once\\\");\\n\\n // Set initial exchange rate\\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\\n require(initialExchangeRateMantissa > 0, \\\"initial exchange rate must be greater than zero.\\\");\\n\\n // Set the comptroller\\n uint err = _setComptroller(comptroller_);\\n require(err == uint(Error.NO_ERROR), \\\"setting comptroller failed\\\");\\n\\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\\n accrualBlockNumber = block.number;\\n borrowIndex = mantissaOne;\\n\\n // Set the interest rate model (depends on block number / borrow index)\\n err = _setInterestRateModelFresh(interestRateModel_);\\n require(err == uint(Error.NO_ERROR), \\\"setting interest rate model failed\\\");\\n\\n name = name_;\\n symbol = symbol_;\\n decimals = decimals_;\\n\\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\\n _notEntered = true;\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return exchangeRateStored();\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage and\\n * reduce spread reserves to protocol share reserve\\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\\n */\\n // @custom:event Emits AccrueInterest event\\n function accrueInterest() public returns (uint) {\\n /* Remember the initial block number */\\n uint currentBlockNumber = block.number;\\n uint accrualBlockNumberPrior = accrualBlockNumber;\\n\\n /* Short-circuit accumulating 0 interest */\\n if (accrualBlockNumberPrior == currentBlockNumber) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n /* Read the previous values out of storage */\\n uint cashPrior = getCashPrior();\\n uint borrowsPrior = totalBorrows;\\n uint reservesPrior = totalReserves;\\n uint borrowIndexPrior = borrowIndex;\\n\\n /* Calculate the current borrow interest rate */\\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\\n require(borrowRateMantissa <= borrowRateMaxMantissa, \\\"borrow rate is absurdly high\\\");\\n\\n /* Calculate the number of blocks elapsed since the last accrual */\\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\\n ensureNoMathError(mathErr);\\n\\n /*\\n * Calculate the interest accumulated into borrows and reserves and the new index:\\n * simpleInterestFactor = borrowRate * blockDelta\\n * interestAccumulated = simpleInterestFactor * totalBorrows\\n * totalBorrowsNew = interestAccumulated + totalBorrows\\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\\n */\\n\\n Exp memory simpleInterestFactor;\\n uint interestAccumulated;\\n uint totalBorrowsNew;\\n uint totalReservesNew;\\n uint borrowIndexNew;\\n\\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\\n Exp({ mantissa: reserveFactorMantissa }),\\n interestAccumulated,\\n reservesPrior\\n );\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accrualBlockNumber = currentBlockNumber;\\n borrowIndex = borrowIndexNew;\\n totalBorrows = totalBorrowsNew;\\n totalReserves = totalReservesNew;\\n\\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\\n ensureNoMathError(mathErr);\\n if (blockDelta >= reduceReservesBlockDelta) {\\n reduceReservesBlockNumber = currentBlockNumber;\\n if (cashPrior < totalReservesNew) {\\n _reduceReservesFresh(cashPrior);\\n } else {\\n _reduceReservesFresh(totalReservesNew);\\n }\\n }\\n\\n /* We emit an AccrueInterest event */\\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewComptroller event\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ComptrollerInterface oldComptroller = comptroller;\\n // Ensure invoke comptroller.isComptroller() returns true\\n require(newComptroller.isComptroller(), \\\"marker method returned false\\\");\\n\\n // Set market's comptroller to newComptroller\\n comptroller = newComptroller;\\n\\n // Emit NewComptroller(oldComptroller, newComptroller)\\n emit NewComptroller(oldComptroller, newComptroller);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\\n * @dev Governance function to accrue interest and update the interest rate model\\n * @param newInterestRateModel_ The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\\n ensureAllowed(\\\"_setInterestRateModel(address)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\\n }\\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\\n return _setInterestRateModelFresh(newInterestRateModel_);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view returns (uint) {\\n (MathError err, uint result) = exchangeRateStoredInternal();\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view returns (uint) {\\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\\n * @dev Called by both `transfer` and `transferFrom` internally\\n * @param spender The address of the account performing the transfer\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param tokens The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\\n /* Fail if transfer not allowed */\\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Do not allow self-transfers */\\n if (src == dst) {\\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n /* Get the allowance, infinite for the account owner */\\n uint startingAllowance = 0;\\n if (spender == src) {\\n startingAllowance = uint(-1);\\n } else {\\n startingAllowance = transferAllowances[src][spender];\\n }\\n\\n /* Do the calculations, checking for {under,over}flow */\\n MathError mathErr;\\n uint allowanceNew;\\n uint srvTokensNew;\\n uint dstTokensNew;\\n\\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\\n }\\n\\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n accountTokens[src] = srvTokensNew;\\n accountTokens[dst] = dstTokensNew;\\n\\n /* Eat some of the allowance (if necessary) */\\n if (startingAllowance != uint(-1)) {\\n transferAllowances[src][spender] = allowanceNew;\\n }\\n\\n /* We emit a Transfer event */\\n emit Transfer(src, dst, tokens);\\n\\n comptroller.transferVerify(address(this), src, dst, tokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintFresh(msg.sender, mintAmount);\\n }\\n\\n /**\\n * @notice User supplies assets into the market and receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param minter The address of the account which is supplying the assets\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the minter and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[minter] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[minter] = vars.accountTokensNew;\\n\\n /* We emit a Mint event, and a Transfer event */\\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), minter, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The address of the account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\\n }\\n\\n /**\\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param payer The address of the account which is paying the underlying token\\n * @param receiver The address of the account which is receiving vToken\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\\n ensureNonZeroAddress(receiver);\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the payer and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[receiver] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[receiver] = vars.accountTokensNew;\\n\\n /* We emit a MintBehalf event, and a Transfer event */\\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), receiver, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokens\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens, if called by a delegate\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlyingInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // solhint-disable-next-line code-complexity\\n function redeemFresh(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokensIn,\\n uint redeemAmountIn\\n ) internal returns (uint) {\\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \\\"one of redeemTokensIn or redeemAmountIn must be zero\\\");\\n\\n RedeemLocalVars memory vars;\\n\\n /* exchangeRate = invoke Exchange Rate Stored() */\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n ensureNoMathError(vars.mathErr);\\n\\n /* If redeemTokensIn > 0: */\\n if (redeemTokensIn > 0) {\\n /*\\n * We calculate the exchange rate and the amount of underlying to be redeemed:\\n * redeemTokens = redeemTokensIn\\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\\n */\\n vars.redeemTokens = redeemTokensIn;\\n\\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\\n Exp({ mantissa: vars.exchangeRateMantissa }),\\n redeemTokensIn\\n );\\n ensureNoMathError(vars.mathErr);\\n } else {\\n /*\\n * We get the current exchange rate and calculate the amount to be redeemed:\\n * redeemTokens = redeemAmountIn / exchangeRate\\n * redeemAmount = redeemAmountIn\\n */\\n\\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\\n redeemAmountIn,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n vars.redeemAmount = redeemAmountIn;\\n }\\n\\n /* Fail if redeem not allowed */\\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /*\\n * We calculate the new total supply and redeemer balance, checking for underflow:\\n * totalSupplyNew = totalSupply - redeemTokens\\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* Fail gracefully if protocol has insufficient cash */\\n if (getCashPrior() < vars.redeemAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[redeemer] = vars.accountTokensNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the redeemAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken has redeemAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n\\n uint feeAmount;\\n uint remainedAmount;\\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\\n (vars.mathErr, feeAmount) = mulUInt(\\n vars.redeemAmount,\\n IComptroller(address(comptroller)).treasuryPercent()\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\\n\\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\\n } else {\\n remainedAmount = vars.redeemAmount;\\n }\\n\\n doTransferOut(receiver, remainedAmount);\\n\\n /* We emit a Transfer event, and a Redeem event */\\n emit Transfer(redeemer, address(this), vars.redeemTokens);\\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrowInternal(\\n address borrower,\\n address payable receiver,\\n uint borrowAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\\n }\\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\\n return borrowFresh(borrower, receiver, borrowAmount);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @dev Before calling this function, ensure that the interest has been accrued\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\\n */\\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\\n /* Revert if borrow not allowed */\\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Revert if protocol has insufficient underlying cash */\\n if (getCashPrior() < borrowAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n BorrowLocalVars memory vars;\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on overflow:\\n * accountBorrowsNew = accountBorrows + borrowAmount\\n * totalBorrowsNew = totalBorrows + borrowAmount\\n */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the borrowAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken borrowAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n doTransferOut(receiver, borrowAmount);\\n\\n /* We emit a Borrow event */\\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\\n }\\n\\n /**\\n * @notice Borrows are repaid by another user (possibly the borrower).\\n * @param payer The account paying off the borrow\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount of undelrying tokens being returned\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\\n /* Fail if repayBorrow not allowed */\\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\\n if (allowed != 0) {\\n return (\\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\\n 0\\n );\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\\n }\\n\\n RepayBorrowLocalVars memory vars;\\n\\n /* We remember the original borrowerIndex for verification purposes */\\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\\n\\n /* We fetch the amount the borrower owes, with accumulated interest */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n uint(vars.mathErr)\\n ),\\n 0\\n );\\n }\\n\\n /* If repayAmount == -1, repayAmount = accountBorrows */\\n if (repayAmount == uint(-1)) {\\n vars.repayAmount = vars.accountBorrows;\\n } else {\\n vars.repayAmount = repayAmount;\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the payer and the repayAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional repayAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on underflow:\\n * accountBorrowsNew = accountBorrows - actualRepayAmount\\n * totalBorrowsNew = totalBorrows - actualRepayAmount\\n */\\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /* We emit a RepayBorrow event */\\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\\n\\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function liquidateBorrowInternal(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\\n }\\n\\n error = vTokenCollateral.accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\\n }\\n\\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\\n }\\n\\n /**\\n * @notice The liquidator liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param liquidator The address repaying the borrow and seizing collateral\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n // solhint-disable-next-line code-complexity\\n function liquidateBorrowFresh(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal returns (uint, uint) {\\n /* Fail if liquidate not allowed */\\n uint allowed = comptroller.liquidateBorrowAllowed(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n repayAmount\\n );\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Verify vTokenCollateral market's block number equals current block number */\\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\\n }\\n\\n /* Fail if repayAmount = 0 */\\n if (repayAmount == 0) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\\n }\\n\\n /* Fail if repayAmount = -1 */\\n if (repayAmount == uint(-1)) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\\n }\\n\\n /* Fail if repayBorrow fails */\\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\\n if (repayBorrowError != uint(Error.NO_ERROR)) {\\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We calculate the number of collateral tokens that will be seized */\\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\\n address(this),\\n address(vTokenCollateral),\\n actualRepayAmount\\n );\\n require(amountSeizeError == uint(Error.NO_ERROR), \\\"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\\\");\\n\\n /* Revert if borrower collateral token balance < seizeTokens */\\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \\\"LIQUIDATE_SEIZE_TOO_MUCH\\\");\\n\\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\\n uint seizeError;\\n if (address(vTokenCollateral) == address(this)) {\\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\\n } else {\\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\\n }\\n\\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\\n require(seizeError == uint(Error.NO_ERROR), \\\"token seizure failed\\\");\\n\\n /* We emit a LiquidateBorrow event */\\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.liquidateBorrowVerify(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n actualRepayAmount,\\n seizeTokens\\n );\\n\\n return (uint(Error.NO_ERROR), actualRepayAmount);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seizeInternal(\\n address seizerToken,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) internal returns (uint) {\\n /* Fail if seize not allowed */\\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\\n }\\n\\n MathError mathErr;\\n uint borrowerTokensNew;\\n uint liquidatorTokensNew;\\n\\n /*\\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\\n */\\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\\n }\\n\\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountTokens[borrower] = borrowerTokensNew;\\n accountTokens[liquidator] = liquidatorTokensNew;\\n\\n /* Emit a Transfer event */\\n emit Transfer(borrower, liquidator, seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\\n * @dev Governance function to set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\\n // Verify market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\\n }\\n\\n // Check newReserveFactor \\u2264 maxReserveFactor\\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\\n }\\n\\n uint oldReserveFactorMantissa = reserveFactorMantissa;\\n reserveFactorMantissa = newReserveFactorMantissa;\\n\\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\\n * @param addAmount Amount of addition to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\\n (error, ) = _addReservesFresh(addAmount);\\n return error;\\n }\\n\\n /**\\n * @notice Add reserves by transferring from caller\\n * @dev Requires fresh interest accrual\\n * @param addAmount Amount of addition to reserves\\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\\n */\\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\\n // totalReserves + actualAddAmount\\n uint totalReservesNew;\\n uint actualAddAmount;\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the caller and the addAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional addAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n\\n actualAddAmount = doTransferIn(msg.sender, addAmount);\\n\\n totalReservesNew = totalReserves + actualAddAmount;\\n\\n /* Revert on overflow */\\n require(totalReservesNew >= totalReserves, \\\"add reserves unexpected overflow\\\");\\n\\n // Store reserves[n+1] = reserves[n] + actualAddAmount\\n totalReserves = totalReservesNew;\\n\\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\\n\\n /* Return (NO_ERROR, actualAddAmount) */\\n return (uint(Error.NO_ERROR), actualAddAmount);\\n }\\n\\n /**\\n * @notice Reduces reserves by transferring to protocol share reserve contract\\n * @dev Requires fresh interest accrual\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\\n if (reduceAmount == 0) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\\n }\\n\\n // Fail gracefully if protocol has insufficient underlying cash\\n if (getCashPrior() < reduceAmount) {\\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\\n }\\n\\n // Check reduceAmount \\u2264 reserves[n] (totalReserves)\\n if (reduceAmount > totalReserves) {\\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n // totalReserves - reduceAmount\\n uint totalReservesNew = totalReserves - reduceAmount;\\n\\n // Store reserves[n+1] = reserves[n] - reduceAmount\\n totalReserves = totalReservesNew;\\n\\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n doTransferOut(protocolShareReserve, reduceAmount);\\n\\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\\n address(comptroller),\\n underlying,\\n IProtocolShareReserveV5.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice updates the interest rate model (requires fresh interest accrual)\\n * @dev Governance function to update the interest rate model\\n * @param newInterestRateModel the new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\\n // Used to store old model for use in the event that is emitted on success\\n InterestRateModel oldInterestRateModel;\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\\n }\\n\\n // Track the market's current interest rate model\\n oldInterestRateModel = interestRateModel;\\n\\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\\n require(newInterestRateModel.isInterestRateModel(), \\\"marker method returned false\\\");\\n\\n // Set the interest rate model to newInterestRateModel\\n interestRateModel = newInterestRateModel;\\n\\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\\n * This may revert due to insufficient balance or insufficient allowance.\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint);\\n\\n /**\\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\\n */\\n function doTransferOut(address payable to, uint amount) internal;\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\\n */\\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\\n /* Note: we do not assert that the market is up to date */\\n MathError mathErr;\\n uint principalTimesIndex;\\n uint result;\\n\\n /* Get borrowBalance and borrowIndex */\\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\\n\\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\\n */\\n if (borrowSnapshot.principal == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n /* Calculate new borrow balance using the interest index:\\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\\n */\\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, result);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the vToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\\n uint _totalSupply = totalSupply;\\n if (_totalSupply == 0) {\\n /*\\n * If there are no tokens minted:\\n * exchangeRate = initialExchangeRate\\n */\\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\\n } else {\\n /*\\n * Otherwise:\\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\\n */\\n uint totalCash = getCashPrior();\\n uint cashPlusBorrowsMinusReserves;\\n Exp memory exchangeRate;\\n MathError mathErr;\\n\\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, exchangeRate.mantissa);\\n }\\n }\\n\\n function ensureAllowed(string memory functionSig) private view {\\n require(\\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\\n \\\"access denied\\\"\\n );\\n }\\n\\n function ensureAdmin(address caller_) private view {\\n require(caller_ == admin, \\\"Unauthorized\\\");\\n }\\n\\n function ensureNoMathError(MathError mErr) private pure {\\n require(mErr == MathError.NO_ERROR, \\\"math error\\\");\\n }\\n\\n function ensureNonZeroAddress(address address_) private pure {\\n require(address_ != address(0), \\\"zero address\\\");\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying owned by this contract\\n */\\n function getCashPrior() internal view returns (uint);\\n}\\n\",\"keccak256\":\"0xfdbcdbd6cab4aeba2c06f39adbfbd8e42a3e50d02aed628c2d76b97659d84b68\"},\"contracts/Tokens/VTokens/VTokenInterfaces.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\n\\ninterface IProtocolShareReserveV5 {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\\n}\\n\\ncontract VTokenStorageBase {\\n /**\\n * @notice Container for borrow balance information\\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\\n */\\n struct BorrowSnapshot {\\n uint principal;\\n uint interestIndex;\\n }\\n\\n /**\\n * @dev Guard variable for re-entrancy checks\\n */\\n bool internal _notEntered;\\n\\n /**\\n * @notice EIP-20 token name for this token\\n */\\n string public name;\\n\\n /**\\n * @notice EIP-20 token symbol for this token\\n */\\n string public symbol;\\n\\n /**\\n * @notice EIP-20 token decimals for this token\\n */\\n uint8 public decimals;\\n\\n /**\\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\\n */\\n\\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\\n\\n /**\\n * @notice Maximum fraction of interest that can be set aside for reserves\\n */\\n uint internal constant reserveFactorMaxMantissa = 1e18;\\n\\n /**\\n * @notice Administrator for this contract\\n */\\n address payable public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address payable public pendingAdmin;\\n\\n /**\\n * @notice Contract which oversees inter-vToken operations\\n */\\n ComptrollerInterface public comptroller;\\n\\n /**\\n * @notice Model which tells what the current interest rate should be\\n */\\n InterestRateModel public interestRateModel;\\n\\n /**\\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\\n */\\n uint internal initialExchangeRateMantissa;\\n\\n /**\\n * @notice Fraction of interest currently set aside for reserves\\n */\\n uint public reserveFactorMantissa;\\n\\n /**\\n * @notice Block number that interest was last accrued at\\n */\\n uint public accrualBlockNumber;\\n\\n /**\\n * @notice Accumulator of the total earned interest rate since the opening of the market\\n */\\n uint public borrowIndex;\\n\\n /**\\n * @notice Total amount of outstanding borrows of the underlying in this market\\n */\\n uint public totalBorrows;\\n\\n /**\\n * @notice Total amount of reserves of the underlying held in this market\\n */\\n uint public totalReserves;\\n\\n /**\\n * @notice Total number of tokens in circulation\\n */\\n uint public totalSupply;\\n\\n /**\\n * @notice Official record of token balances for each account\\n */\\n mapping(address => uint) internal accountTokens;\\n\\n /**\\n * @notice Approved token transfer amounts on behalf of others\\n */\\n mapping(address => mapping(address => uint)) internal transferAllowances;\\n\\n /**\\n * @notice Mapping of account addresses to outstanding borrow balances\\n */\\n mapping(address => BorrowSnapshot) internal accountBorrows;\\n\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n address public underlying;\\n\\n /**\\n * @notice Implementation address for this contract\\n */\\n address public implementation;\\n\\n /**\\n * @notice delta block after which reserves will be reduced\\n */\\n uint public reduceReservesBlockDelta;\\n\\n /**\\n * @notice last block number at which reserves were reduced\\n */\\n uint public reduceReservesBlockNumber;\\n\\n /**\\n * @notice address of protocol share reserve contract\\n */\\n address payable public protocolShareReserve;\\n\\n /**\\n * @notice address of accessControlManager\\n */\\n\\n address public accessControlManager;\\n}\\n\\ncontract VTokenStorage is VTokenStorageBase {\\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\\ncontract VTokenInterface is VTokenStorage {\\n /**\\n * @notice Indicator that this is a vToken contract (for inspection)\\n */\\n bool public constant isVToken = true;\\n\\n /*** Market Events ***/\\n\\n /**\\n * @notice Event emitted when interest is accrued\\n */\\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when tokens are minted\\n */\\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are minted behalf by payer to receiver\\n */\\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed\\n */\\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed and fee is transferred\\n */\\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\\n\\n /**\\n * @notice Event emitted when underlying is borrowed\\n */\\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is repaid\\n */\\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is liquidated\\n */\\n event LiquidateBorrow(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n address vTokenCollateral,\\n uint seizeTokens\\n );\\n\\n /*** Admin Events ***/\\n\\n /**\\n * @notice Event emitted when pendingAdmin is changed\\n */\\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\\n\\n /**\\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\\n */\\n event NewAdmin(address oldAdmin, address newAdmin);\\n\\n /**\\n * @notice Event emitted when comptroller is changed\\n */\\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\\n\\n /**\\n * @notice Event emitted when interestRateModel is changed\\n */\\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\\n\\n /**\\n * @notice Event emitted when the reserve factor is changed\\n */\\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\\n\\n /**\\n * @notice Event emitted when the reserves are added\\n */\\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\\n\\n /**\\n * @notice Event emitted when the reserves are reduced\\n */\\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\\n\\n /**\\n * @notice EIP20 Transfer event\\n */\\n event Transfer(address indexed from, address indexed to, uint amount);\\n\\n /**\\n * @notice EIP20 Approval event\\n */\\n event Approval(address indexed owner, address indexed spender, uint amount);\\n\\n /**\\n * @notice Event emitted when block delta for reduce reserves get updated\\n */\\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\\n\\n /**\\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\\n */\\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\\n\\n /**\\n * @notice Failure event\\n */\\n event Failure(uint error, uint info, uint detail);\\n\\n /// @notice Emitted when access control address is changed by admin\\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\\n\\n /*** User Interface ***/\\n\\n function transfer(address dst, uint amount) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint amount) external returns (bool);\\n\\n function approve(address spender, uint amount) external returns (bool);\\n\\n function balanceOfUnderlying(address owner) external returns (uint);\\n\\n function totalBorrowsCurrent() external returns (uint);\\n\\n function borrowBalanceCurrent(address account) external returns (uint);\\n\\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _acceptAdmin() external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function balanceOf(address owner) external view returns (uint);\\n\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\\n\\n function borrowRatePerBlock() external view returns (uint);\\n\\n function supplyRatePerBlock() external view returns (uint);\\n\\n function getCash() external view returns (uint);\\n\\n function exchangeRateCurrent() public returns (uint);\\n\\n function accrueInterest() public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\\n\\n function borrowBalanceStored(address account) public view returns (uint);\\n\\n function exchangeRateStored() public view returns (uint);\\n}\\n\\ncontract VBep20Interface {\\n /*** User Interface ***/\\n\\n function mint(uint mintAmount) external returns (uint);\\n\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n function redeem(uint redeemTokens) external returns (uint);\\n\\n function redeemUnderlying(uint redeemAmount) external returns (uint);\\n\\n function borrow(uint borrowAmount) external returns (uint);\\n\\n function repayBorrow(uint repayAmount) external returns (uint);\\n\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\\n\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint);\\n\\n /*** Admin Functions ***/\\n\\n function _addReserves(uint addAmount) external returns (uint);\\n}\\n\\ncontract VDelegatorInterface {\\n /**\\n * @notice Emitted when implementation is changed\\n */\\n event NewImplementation(address oldImplementation, address newImplementation);\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public;\\n}\\n\\ncontract VDelegateInterface {\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @dev Should revert if any issues arise which make it unfit for delegation\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public;\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public;\\n}\\n\",\"keccak256\":\"0x2f12533847458414b423cc85677489709d772bec4e48933ae983d6861202a41b\"},\"contracts/Utils/CarefulMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Careful Math\\n * @author Venus\\n * @notice Derived from OpenZeppelin's SafeMath library\\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\\n */\\ncontract CarefulMath {\\n /**\\n * @dev Possible error codes that we can return\\n */\\n enum MathError {\\n NO_ERROR,\\n DIVISION_BY_ZERO,\\n INTEGER_OVERFLOW,\\n INTEGER_UNDERFLOW\\n }\\n\\n /**\\n * @dev Multiplies two numbers, returns an error on overflow.\\n */\\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (a == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n uint c = a * b;\\n\\n if (c / a != b) {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n } else {\\n return (MathError.NO_ERROR, c);\\n }\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b == 0) {\\n return (MathError.DIVISION_BY_ZERO, 0);\\n }\\n\\n return (MathError.NO_ERROR, a / b);\\n }\\n\\n /**\\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b <= a) {\\n return (MathError.NO_ERROR, a - b);\\n } else {\\n return (MathError.INTEGER_UNDERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev Adds two numbers, returns an error on overflow.\\n */\\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n uint c = a + b;\\n\\n if (c >= a) {\\n return (MathError.NO_ERROR, c);\\n } else {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev add a and b and then subtract c\\n */\\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\\n (MathError err0, uint sum) = addUInt(a, b);\\n\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, 0);\\n }\\n\\n return subUInt(sum, c);\\n }\\n}\\n\",\"keccak256\":\"0x5bd84fb723641b98d0559272323b90ce42595f025af89cfb214d8c064c9ee3c3\"},\"contracts/Utils/ErrorReporter.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\ncontract ComptrollerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n COMPTROLLER_MISMATCH,\\n INSUFFICIENT_SHORTFALL,\\n INSUFFICIENT_LIQUIDITY,\\n INVALID_CLOSE_FACTOR,\\n INVALID_COLLATERAL_FACTOR,\\n INVALID_LIQUIDATION_INCENTIVE,\\n MARKET_NOT_ENTERED, // no longer possible\\n MARKET_NOT_LISTED,\\n MARKET_ALREADY_LISTED,\\n MATH_ERROR,\\n NONZERO_BORROW_BALANCE,\\n PRICE_ERROR,\\n REJECTION,\\n SNAPSHOT_ERROR,\\n TOO_MANY_ASSETS,\\n TOO_MUCH_REPAY,\\n INSUFFICIENT_BALANCE_FOR_VAI,\\n MARKET_NOT_COLLATERAL\\n }\\n\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n EXIT_MARKET_BALANCE_OWED,\\n EXIT_MARKET_REJECTION,\\n SET_CLOSE_FACTOR_OWNER_CHECK,\\n SET_CLOSE_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_NO_EXISTS,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\\n SET_IMPLEMENTATION_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_PRICE_ORACLE_OWNER_CHECK,\\n SUPPORT_MARKET_EXISTS,\\n SUPPORT_MARKET_OWNER_CHECK,\\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\\n SET_VAI_MINT_RATE_CHECK,\\n SET_VAICONTROLLER_OWNER_CHECK,\\n SET_MINTED_VAI_REJECTION,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract TokenErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n BAD_INPUT,\\n COMPTROLLER_REJECTION,\\n COMPTROLLER_CALCULATION_ERROR,\\n INTEREST_RATE_MODEL_ERROR,\\n INVALID_ACCOUNT_PAIR,\\n INVALID_CLOSE_AMOUNT_REQUESTED,\\n INVALID_COLLATERAL_FACTOR,\\n MATH_ERROR,\\n MARKET_NOT_FRESH,\\n MARKET_NOT_LISTED,\\n TOKEN_INSUFFICIENT_ALLOWANCE,\\n TOKEN_INSUFFICIENT_BALANCE,\\n TOKEN_INSUFFICIENT_CASH,\\n TOKEN_TRANSFER_IN_FAILED,\\n TOKEN_TRANSFER_OUT_FAILED,\\n TOKEN_PRICE_ERROR\\n }\\n\\n /*\\n * Note: FailureInfo (but not Error) is kept in alphabetical order\\n * This is because FailureInfo grows significantly faster, and\\n * the order of Error has some meaning, while the order of FailureInfo\\n * is entirely arbitrary.\\n */\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n BORROW_ACCRUE_INTEREST_FAILED,\\n BORROW_CASH_NOT_AVAILABLE,\\n BORROW_FRESHNESS_CHECK,\\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n BORROW_MARKET_NOT_LISTED,\\n BORROW_COMPTROLLER_REJECTION,\\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n LIQUIDATE_COMPTROLLER_REJECTION,\\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n LIQUIDATE_FRESHNESS_CHECK,\\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_ACCRUE_INTEREST_FAILED,\\n MINT_COMPTROLLER_REJECTION,\\n MINT_EXCHANGE_CALCULATION_FAILED,\\n MINT_EXCHANGE_RATE_READ_FAILED,\\n MINT_FRESHNESS_CHECK,\\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n MINT_TRANSFER_IN_FAILED,\\n MINT_TRANSFER_IN_NOT_POSSIBLE,\\n REDEEM_ACCRUE_INTEREST_FAILED,\\n REDEEM_COMPTROLLER_REJECTION,\\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_RATE_READ_FAILED,\\n REDEEM_FRESHNESS_CHECK,\\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\\n REDUCE_RESERVES_ADMIN_CHECK,\\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\\n REDUCE_RESERVES_FRESH_CHECK,\\n REDUCE_RESERVES_VALIDATION,\\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_COMPTROLLER_REJECTION,\\n REPAY_BORROW_FRESHNESS_CHECK,\\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COMPTROLLER_OWNER_CHECK,\\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_ORACLE_MARKET_NOT_LISTED,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\\n SET_RESERVE_FACTOR_ADMIN_CHECK,\\n SET_RESERVE_FACTOR_FRESH_CHECK,\\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\\n TRANSFER_COMPTROLLER_REJECTION,\\n TRANSFER_NOT_ALLOWED,\\n TRANSFER_NOT_ENOUGH,\\n TRANSFER_TOO_MUCH,\\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\\n ADD_RESERVES_FRESH_CHECK,\\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\\n REPAY_VAI_COMPTROLLER_REJECTION,\\n REPAY_VAI_FRESHNESS_CHECK,\\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract VAIControllerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED, // The sender is not authorized to perform this action.\\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\\n MATH_ERROR, // A math calculation error occurred.\\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\\n }\\n\\n enum FailureInfo {\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_COMPTROLLER_OWNER_CHECK,\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n VAI_MINT_REJECTION,\\n VAI_BURN_REJECTION,\\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n VAI_LIQUIDATE_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_FEE_CALCULATION_FAILED,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\",\"keccak256\":\"0xc77c4dd91f93f778c5048fa0e68cc0cad2fd4a308add54f0172c507858ce06c8\"},\"contracts/Utils/Exponential.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"./CarefulMath.sol\\\";\\nimport \\\"./ExponentialNoError.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Venus\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract Exponential is CarefulMath, ExponentialNoError {\\n /**\\n * @dev Creates an exponential from numerator and denominator values.\\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\\n * or if `denom` is zero.\\n */\\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\\n }\\n\\n /**\\n * @dev Adds two exponentials, returning a new exponential.\\n */\\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Subtracts two exponentials, returning a new exponential.\\n */\\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, returning a new Exp.\\n */\\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(product));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return addUInt(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Divide an Exp by a scalar, returning a new Exp.\\n */\\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, returning a new Exp.\\n */\\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\\n /*\\n We are doing this as:\\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\\n\\n How it works:\\n Exp = a / b;\\n Scalar = s;\\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\\n */\\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n return getExp(numerator, divisor.mantissa);\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\\n */\\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(fraction));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials, returning a new exponential.\\n */\\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n // We add half the scale before dividing so that we get rounding instead of truncation.\\n // See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717\\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\\n assert(err2 == MathError.NO_ERROR);\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\\n */\\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\\n }\\n\\n /**\\n * @dev Multiplies three exponentials, returning a new exponential.\\n */\\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\\n (MathError err, Exp memory ab) = mulExp(a, b);\\n if (err != MathError.NO_ERROR) {\\n return (err, ab);\\n }\\n return mulExp(ab, c);\\n }\\n\\n /**\\n * @dev Divides two exponentials, returning a new exponential.\\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\\n */\\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n return getExp(a.mantissa, b.mantissa);\\n }\\n}\\n\",\"keccak256\":\"0x92a68e9f6de3a70b103aa0ddb68faa8e60c443b1268e03853d5054171fe8e290\"},\"contracts/Utils/ExponentialNoError.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n uint internal constant expScale = 1e18;\\n uint internal constant doubleScale = 1e36;\\n uint internal constant halfExpScale = expScale / 2;\\n uint internal constant mantissaOne = expScale;\\n\\n struct Exp {\\n uint mantissa;\\n }\\n\\n struct Double {\\n uint mantissa;\\n }\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / expScale;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp <= right Exp.\\n */\\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa <= right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp > right Exp.\\n */\\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa > right.mantissa;\\n }\\n\\n /**\\n * @dev returns true if Exp is exactly zero\\n */\\n function isZeroExp(Exp memory value) internal pure returns (bool) {\\n return value.mantissa == 0;\\n }\\n\\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\\n require(n < 2 ** 224, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2 ** 32, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint a, uint b) internal pure returns (uint) {\\n return add_(a, b, \\\"addition overflow\\\");\\n }\\n\\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint a, uint b) internal pure returns (uint) {\\n return sub_(a, b, \\\"subtraction underflow\\\");\\n }\\n\\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\\n }\\n\\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / expScale;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\\n }\\n\\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Double memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / doubleScale;\\n }\\n\\n function mul_(uint a, uint b) internal pure returns (uint) {\\n return mul_(a, b, \\\"multiplication overflow\\\");\\n }\\n\\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n uint c = a * b;\\n require(c / a == b, errorMessage);\\n return c;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Exp memory b) internal pure returns (uint) {\\n return div_(mul_(a, expScale), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Double memory b) internal pure returns (uint) {\\n return div_(mul_(a, doubleScale), b.mantissa);\\n }\\n\\n function div_(uint a, uint b) internal pure returns (uint) {\\n return div_(a, b, \\\"divide by zero\\\");\\n }\\n\\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n function fraction(uint a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\\n }\\n}\\n\",\"keccak256\":\"0x237e63d9ad2bf232d70f854b8867a465913cab4d2033d295ec7736bf618ca302\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50615c2c80620000216000396000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c806370a08231116101ff578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610d37578063f851a44014610d6d578063f8f9da2814610d75578063fca7820b14610d7d576103c5565b8063e9a44fd914610cf9578063e9c714f214610d01578063f2b3abbd14610d09578063f3fdb15a14610d2f576103c5565b8063d1109c2f116100e9578063d1109c2f14610c7a578063db006a7514610c82578063dd62ed3e14610c9f578063df3a516e14610ccd576103c5565b8063b71d1a0c14610be3578063bd6d894d14610c09578063c37f68e214610c11578063c5ebeaec14610c5d576103c5565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610b95578063ae9d70b014610b9d578063b2a02ff114610ba5578063b4a0bdf314610bdb576103c5565b8063a0712d6814610b3c578063a6afed9514610b59578063a9059cbb14610b61578063aa5af0fd14610b8d576103c5565b80638f840ddd116101ce5780638f840ddd146109b857806395d89b41146109c057806395dd9193146109c857806399d8c1b4146109ee576103c5565b806370a082311461094157806373acee9814610967578063852a12e31461096f578063856e5bb31461098c576103c5565b80632608f818116102ef5780634576b5db116102825780635fe3b567116102515780635fe3b5671461090c578063601a0bf1146109145780636c540baf146109315780636f307dc314610939576103c5565b80634576b5db1461083257806347bd37181461085857806356e67728146108605780635c60da1b14610904576103c5565b80633b1d21a2116102be5780633b1d21a2146107df5780633d9ea3a1146107e75780633e941010146107ef57806342f822601461080c576103c5565b80632608f8181461074b5780632678224714610777578063313ce5671461079b5780633af9e669146107b9576103c5565b806317bfdfbc11610367578063210bc05211610336578063210bc052146106a057806323323e03146106cc57806323b872dd146106f85780632464176b1461072e576103c5565b806317bfdfbc1461051457806318160ddd1461053a578063182df0f5146105425780631a31d4651461054a576103c5565b80630e752702116103a35780630e752702146104bf578063107568df146104dc578063153ab50514610504578063173b99041461050c576103c5565b806306fdde03146103ca578063095ea7b3146104475780630e32cb8614610487575b600080fd5b6103d2610d9a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561040c5781810151838201526020016103f4565b50505050905090810190601f1680156104395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104736004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610e27565b604080519115158252519081900360200190f35b6104ad6004803603602081101561049d57600080fd5b50356001600160a01b0316610e8d565b60408051918252519081900360200190f35b6104ad600480360360208110156104d557600080fd5b5035610f0f565b610502600480360360208110156104f257600080fd5b50356001600160a01b0316610f23565b005b610502610f91565b6104ad610fe1565b6104ad6004803603602081101561052a57600080fd5b50356001600160a01b0316610fe7565b6104ad6110a7565b6104ad6110ad565b610502600480360360e081101561056057600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156105a257600080fd5b8201836020820111156105b457600080fd5b803590602001918460018302840111600160201b831117156105d557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561062757600080fd5b82018360208201111561063957600080fd5b803590602001918460018302840111600160201b8311171561065a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506110ce9050565b6104ad600480360360408110156106b657600080fd5b506001600160a01b03813516906020013561116d565b6104ad600480360360408110156106e257600080fd5b506001600160a01b03813516906020013561124e565b6104736004803603606081101561070e57600080fd5b506001600160a01b03813581169160208101359091169060400135611264565b6105026004803603602081101561074457600080fd5b50356112d7565b6104ad6004803603604081101561076157600080fd5b506001600160a01b03813516906020013561137f565b61077f61138c565b604080516001600160a01b039092168252519081900360200190f35b6107a361139b565b6040805160ff9092168252519081900360200190f35b6104ad600480360360208110156107cf57600080fd5b50356001600160a01b03166113a4565b6104ad611402565b610473611411565b6104ad6004803603602081101561080557600080fd5b5035611416565b6105026004803603602081101561082257600080fd5b50356001600160a01b0316611421565b6104ad6004803603602081101561084857600080fd5b50356001600160a01b0316611443565b6104ad611575565b6105026004803603602081101561087657600080fd5b810190602081018135600160201b81111561089057600080fd5b8201836020820111156108a257600080fd5b803590602001918460018302840111600160201b831117156108c357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061157b945050505050565b61077f6115cc565b61077f6115db565b6104ad6004803603602081101561092a57600080fd5b50356115ea565b6104ad6116d5565b61077f6116db565b6104ad6004803603602081101561095757600080fd5b50356001600160a01b03166116ea565b6104ad611705565b6104ad6004803603602081101561098557600080fd5b50356117bb565b6104ad600480360360408110156109a257600080fd5b506001600160a01b0381351690602001356117c8565b6104ad6118a2565b6103d26118a8565b6104ad600480360360208110156109de57600080fd5b50356001600160a01b0316611900565b610502600480360360c0811015610a0457600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610a3e57600080fd5b820183602082011115610a5057600080fd5b803590602001918460018302840111600160201b83111715610a7157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610ac357600080fd5b820183602082011115610ad557600080fd5b803590602001918460018302840111600160201b83111715610af657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff16915061191b9050565b6104ad60048036036020811015610b5257600080fd5b5035611ab6565b6104ad611ac2565b61047360048036036040811015610b7757600080fd5b506001600160a01b038135169060200135611e05565b6104ad611e76565b6104ad611e7c565b6104ad611e82565b6104ad60048036036060811015610bbb57600080fd5b506001600160a01b03813581169160208101359091169060400135611f21565b61077f611f92565b6104ad60048036036020811015610bf957600080fd5b50356001600160a01b0316611fa1565b6104ad612012565b610c3760048036036020811015610c2757600080fd5b50356001600160a01b03166120ce565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6104ad60048036036020811015610c7357600080fd5b5035612163565b6104ad612170565b6104ad60048036036020811015610c9857600080fd5b5035612176565b6104ad60048036036040811015610cb557600080fd5b506001600160a01b0381358116916020013516612183565b6104ad60048036036040811015610ce357600080fd5b506001600160a01b0381351690602001356121ae565b61077f612288565b6104ad612297565b6104ad60048036036020811015610d1f57600080fd5b50356001600160a01b031661238f565b61077f612408565b6104ad60048036036060811015610d4d57600080fd5b506001600160a01b03813581169160208101359160409091013516612417565b61077f61242f565b6104ad612443565b6104ad60048036036020811015610d9357600080fd5b50356124a7565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b820191906000526020600020905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610e9833612564565b610ea1826125ba565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610f1b83612604565b509392505050565b610f2c33612564565b610f35816125ba565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60035461010090046001600160a01b03163314610fdf5760405162461bcd60e51b815260040180806020018281038252602d815260200180615b17602d913960400191505060405180910390fd5b565b60085481565b6000805460ff1661102c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561103e611ac2565b14611089576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b61109282611900565b90505b6000805460ff19166001179055919050565b600d5481565b60008060006110ba6126ad565b915091506110c78261275c565b9150505b90565b6110dc86868686868661191b565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561113857600080fd5b505afa15801561114c573d6000803e3d6000fd5b505050506040513d602081101561116257600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156111c457600080fd5b505afa1580156111d8573d6000803e3d6000fd5b505050506040513d60208110156111ee57600080fd5b505161123c576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846127a9565b9392505050565b60008061125b848461284a565b50949350505050565b6000805460ff166112a9576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556112bf338686866128f5565b1490505b6000805460ff191660011790559392505050565b6000811161131c576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61133d604051806060016040528060248152602001615aa160249139612c03565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b60008061125b8484612d24565b6004546001600160a01b031681565b60035460ff1681565b60006113ae61592c565b60405180602001604052806113c1612012565b90526001600160a01b0384166000908152600e60205260408120549192509081906113ed908490612da6565b915091506113fa8261275c565b949350505050565b600061140c612dfa565b905090565b600181565b6000610f0782612e45565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061144e33612564565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561149357600080fd5b505afa1580156114a7573d6000803e3d6000fd5b505050506040513d60208110156114bd57600080fd5b5051611510576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b60035461010090046001600160a01b031633146115c95760405162461bcd60e51b815260040180806020018281038252602d815260200180615bcb602d913960400191505060405180910390fd5b50565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff1661162f576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261167690612c03565b6000611680611ac2565b905080156116a65761169e81601181111561169757fe5b6030612ed9565b915050611095565b4360145414156116b757600061169e565b6116c083612f3f565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff1661174a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561175c611ac2565b146117a7576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610f07333384613083565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561181f57600080fd5b505afa158015611833573d6000803e3d6000fd5b505050506040513d602081101561184957600080fd5b5051611897576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846130fe565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b600080600061190e8461317e565b915091506112478261275c565b61192433612564565b6009541580156119345750600a54155b61196f5760405162461bcd60e51b8152600401808060200182810382526023815260200180615a7e6023913960400191505060405180910390fd5b6007849055836119b05760405162461bcd60e51b8152600401808060200182810382526030815260200180615ac56030913960400191505060405180910390fd5b60006119bb87611443565b90508015611a10576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a55611a2986613232565b90508015611a685760405162461bcd60e51b8152600401808060200182810382526022815260200180615af56022913960400191505060405180910390fd5b8351611a7b90600190602087019061593f565b508251611a8f90600290602086019061593f565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610f1b8361337b565b600954600090439080821415611add576000925050506110cb565b6000611ae7612dfa565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b158015611b5557600080fd5b505afa158015611b69573d6000803e3d6000fd5b505050506040513d6020811015611b7f57600080fd5b5051905065048c27395000811115611bde576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611beb89896133f5565b91509150611bf88261275c565b611c0061592c565b600080600080611c1e60405180602001604052808a81525087613418565b90975094506000876003811115611c3157fe5b14611c6357611c4e60096006896003811115611c4957fe5b613480565b9e5050505050505050505050505050506110cb565b611c6d858c612da6565b90975093506000876003811115611c8057fe5b14611c9857611c4e60096001896003811115611c4957fe5b611ca2848c6134e6565b90975092506000876003811115611cb557fe5b14611ccd57611c4e60096004896003811115611c4957fe5b611ce86040518060200160405280600854815250858c61350c565b90975091506000876003811115611cfb57fe5b14611d1357611c4e60096005896003811115611c4957fe5b611d1e858a8b61350c565b90975090506000876003811115611d3157fe5b14611d4957611c4e60096003896003811115611c4957fe5b60098e9055600a819055600b839055600c829055601454611d6b908f906133f5565b9097509550611d798761275c565b6013548610611da95760148e9055818c1015611d9e57611d988c612f3f565b50611da9565b611da782612f3f565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611e4a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611e60333386866128f5565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611e9e612dfa565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611ef057600080fd5b505afa158015611f04573d6000803e3d6000fd5b505050506040513d6020811015611f1a57600080fd5b5051905090565b6000805460ff16611f66576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611f7c33858585613568565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611fac33612564565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611247565b6000805460ff16612057576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612069611ac2565b146120b4576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b6120bc6110ad565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e60205260408120548190819081908180806120f98961317e565b93509050600081600381111561210b57fe5b146121295760095b97506000965086955085945061215c9350505050565b6121316126ad565b92509050600081600381111561214357fe5b1461214f576009612113565b5060009650919450925090505b9193509193565b6000610f073333846130fe565b60135481565b6000610f073333846127a9565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561220557600080fd5b505afa158015612219573d6000803e3d6000fd5b505050506040513d602081101561222f57600080fd5b505161227d576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611247833384613083565b6015546001600160a01b031681565b6004546000906001600160a01b031633146122bf576122b860016000612ed9565b90506110cb565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b60006123cf6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612c03565b60006123d9611ac2565b905080156123ff576123f78160118111156123f057fe5b6040612ed9565b915050610f0a565b61124783613232565b6006546001600160a01b031681565b6000806124258585856137ce565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f2405361245f612dfa565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611ef057600080fd5b6000805460ff166124ec576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e7432353629000000000000602082015261253390612c03565b600061253d611ac2565b9050801561255b5761169e81601181111561255457fe5b6046612ed9565b6116c083613900565b6003546001600160a01b0382811661010090920416146115c9576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166115c9576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff1661264b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561265d611ac2565b905080156126885761267b81601181111561267457fe5b6036612ed9565b9250600091506126999050565b61269333338661397d565b92509250505b6000805460ff191660011790559092909150565b600d546000908190806126c857505060075460009150612758565b60006126d2612dfa565b905060006126de61592c565b60006126ef84600b54600c54613cd9565b93509050600081600381111561270157fe5b14612716579550600094506127589350505050565b6127208386613d17565b92509050600081600381111561273257fe5b14612747579550600094506127589350505050565b505160009550935061275892505050565b9091565b600081600381111561276a57fe5b146115c9576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff166127ee576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612800611ac2565b905080156128265761281e81601181111561281757fe5b6027612ed9565b9150506112c3565b6128338585856000613dc7565b9150506000805460ff191660011790559392505050565b60008054819060ff16612891576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556128a3611ac2565b905080156128ce576128c18160118111156128ba57fe5b601e612ed9565b9250600091506128df9050565b6128d9338686614477565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b15801561295a57600080fd5b505af115801561296e573d6000803e3d6000fd5b505050506040513d602081101561298457600080fd5b5051905080156129a35761299b6003604a83613480565b9150506113fa565b836001600160a01b0316856001600160a01b031614156129c95761299b6002604b612ed9565b60006001600160a01b0387811690871614156129e85750600019612a10565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b600080600080612a2085896133f5565b90945092506000846003811115612a3357fe5b14612a5157612a446009604b612ed9565b96505050505050506113fa565b6001600160a01b038a166000908152600e6020526040902054612a7490896133f5565b90945091506000846003811115612a8757fe5b14612a9857612a446009604c612ed9565b6001600160a01b0389166000908152600e6020526040902054612abb90896134e6565b90945090506000846003811115612ace57fe5b14612adf57612a446009604d612ed9565b6001600160a01b03808b166000908152600e6020526040808220859055918b168152208190556000198514612b37576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b0316600080516020615b448339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612bd357600080fd5b505af1158015612be7573d6000803e3d6000fd5b5060009250612bf4915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612c6c578181015183820152602001612c54565b50505050905090810190601f168015612c995780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612cb757600080fd5b505afa158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b50516115c9576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612d6b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d7d611ac2565b90508015612d9b576128c1816011811115612d9457fe5b6035612ed9565b6128d933868661397d565b6000806000612db361592c565b612dbd8686613418565b90925090506000826003811115612dd057fe5b14612de15750915060009050612df3565b6000612dec8261481a565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ef057600080fd5b6000805460ff16612e8a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612e9c611ac2565b90508015612eba5761169e816011811115612eb357fe5b604e612ed9565b612ec383614829565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612f0857fe5b836055811115612f1457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561124757fe5b600081612f505760005b9050610f0a565b4360095414612f6557612f49600a6033612ed9565b81612f6e612dfa565b1015612f8057612f49600e6032612ed9565b600c54821115612f9657612f4960026034612ed9565b600c805483900390819055601554612fb7906001600160a01b03168461490a565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b15801561301757600080fd5b505af115801561302b573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611247565b6000805460ff166130c8576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556130da611ac2565b905080156130f15761281e81601181111561281757fe5b6128338585600086613dc7565b6000805460ff16613143576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613155611ac2565b905080156131735761281e81601181111561316c57fe5b6008612ed9565b6128338585856149fd565b6001600160a01b0381166000908152601060205260408120805482918291829182916131b557506000945084935061322d92505050565b6131c58160000154600a54614d23565b909450925060008460038111156131d857fe5b146131ed57509193506000925061322d915050565b6131fb838260010154614d62565b9094509150600084600381111561320e57fe5b1461322357509193506000925061322d915050565b5060009450925050505b915091565b600080436009541461324a576123f7600a6041612ed9565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561329b57600080fd5b505afa1580156132af573d6000803e3d6000fd5b505050506040513d60208110156132c557600080fd5b5051613318576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611247565b60008054819060ff166133c2576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556133d4611ac2565b905080156133eb5761267b8160118111156128ba57fe5b6126933385614d8d565b60008083831161340c575060009050818303612df3565b50600390506000612df3565b600061342261592c565b600080613433866000015186614d23565b9092509050600082600381111561344657fe5b1461346557506040805160208101909152600081529092509050612df3565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa08460118111156134af57fe5b8460558111156134bb57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156113fa57fe5b6000808383018481106134fe57600092509050612df3565b506002915060009050612df3565b600080600061351961592c565b6135238787613418565b9092509050600082600381111561353657fe5b146135475750915060009050613560565b6135596135538261481a565b866134e6565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b1580156135d557600080fd5b505af11580156135e9573d6000803e3d6000fd5b505050506040513d60208110156135ff57600080fd5b5051905080156136165761299b6003601b83613480565b846001600160a01b0316846001600160a01b0316141561363c5761299b6006601c612ed9565b6001600160a01b0384166000908152600e60205260408120548190819061366390876133f5565b9093509150600083600381111561367657fe5b146136995761368e6009601a856003811115611c4957fe5b9450505050506113fa565b6001600160a01b0388166000908152600e60205260409020546136bc90876134e6565b909350905060008360038111156136cf57fe5b146136e75761368e60096019856003811115611c4957fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a815293519193600080516020615b44833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50600092506137c1915050565b9998505050505050505050565b60008054819060ff16613815576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613827611ac2565b905080156138525761384581601181111561383e57fe5b600f612ed9565b9250600091506138e99050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561388d57600080fd5b505af11580156138a1573d6000803e3d6000fd5b505050506040513d60208110156138b757600080fd5b5051905080156138d7576138458160118111156138d057fe5b6010612ed9565b6138e3338787876150fa565b92509250505b6000805460ff191660011790559094909350915050565b6000436009541461391757612f49600a6048612ed9565b670de0b6b3a764000082111561393357612f4960026049612ed9565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611247565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b1580156139e657600080fd5b505af11580156139fa573d6000803e3d6000fd5b505050506040513d6020811015613a1057600080fd5b505190508015613a3457613a276003603883613480565b9250600091506135609050565b4360095414613a4957613a27600a6039612ed9565b613a516159bd565b6001600160a01b0386166000908152601060205260409020600101546060820152613a7b8661317e565b6080830181905260208301826003811115613a9257fe5b6003811115613a9d57fe5b9052506000905081602001516003811115613ab457fe5b14613ade57613ad06009603783602001516003811115611c4957fe5b935060009250613560915050565b600019851415613af75760808101516040820152613aff565b604081018590525b613b0d87826040015161566f565b60e082018190526080820151613b22916133f5565b60a0830181905260208301826003811115613b3957fe5b6003811115613b4457fe5b8152505050613b56816020015161275c565b613b66600b548260e001516133f5565b60c0830181905260208301826003811115613b7d57fe5b6003811115613b8857fe5b8152505050613b9a816020015161275c565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613ca557600080fd5b505af1158015613cb9573d6000803e3d6000fd5b5060009250613cc6915050565b8160e00151935093505050935093915050565b600080600080613ce987876134e6565b90925090506000826003811115613cfc57fe5b14613d0d5750915060009050613560565b61355981866133f5565b6000613d2161592c565b600080613d3686670de0b6b3a7640000614d23565b90925090506000826003811115613d4957fe5b14613d6857506040805160208101909152600081529092509050612df3565b600080613d758388614d62565b90925090506000826003811115613d8857fe5b14613daa57506040805160208101909152600081529094509250612df3915050565b604080516020810190915290815260009890975095505050505050565b6000821580613dd4575081155b613e0f5760405162461bcd60e51b8152600401808060200182810382526034815260200180615b976034913960400191505060405180910390fd5b613e17615a03565b613e1f6126ad565b6020830181905282826003811115613e3357fe5b6003811115613e3e57fe5b905250508051613e4d9061275c565b8315613ea857604080820185905280516020808201909252908201518152613e759085612da6565b6060830181905282826003811115613e8957fe5b6003811115613e9457fe5b905250508051613ea39061275c565b613efa565b613ec483604051806020016040528084602001518152506158bb565b6040830181905282826003811115613ed857fe5b6003811115613ee357fe5b905250508051613ef29061275c565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613f5d57600080fd5b505af1158015613f71573d6000803e3d6000fd5b505050506040513d6020811015613f8757600080fd5b505190508015613fcb576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b436009541461400e576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b61401e600d5483604001516133f5565b608084018190528382600381111561403257fe5b600381111561403d57fe5b90525050815161404c9061275c565b6001600160a01b0387166000908152600e602052604090819020549083015161407591906133f5565b60a084018190528382600381111561408957fe5b600381111561409457fe5b9052505081516140a39061275c565b81606001516140b0612dfa565b10156140f0576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b15801561415957600080fd5b505afa15801561416d573d6000803e3d6000fd5b505050506040513d602081101561418357600080fd5b50511561436f57606084015160055460408051629df3ab60e31b8152905161420693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b1580156141d557600080fd5b505afa1580156141e9573d6000803e3d6000fd5b505050506040513d60208110156141ff57600080fd5b5051614d23565b9250828582600381111561421657fe5b600381111561422157fe5b9052505083516142309061275c565b61424282670de0b6b3a7640000614d62565b9250828582600381111561425257fe5b600381111561425d57fe5b90525050835161426c9061275c565b61427a8460600151836133f5565b9150818582600381111561428a57fe5b600381111561429557fe5b9052505083516142a49061275c565b6005546040805163c5f956af60e01b8152905161431c926001600160a01b03169163c5f956af916004808301926020929190829003018186803b1580156142ea57600080fd5b505afa1580156142fe573d6000803e3d6000fd5b505050506040513d602081101561431457600080fd5b50518361490a565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614376565b5060608301515b614380888261490a565b6040808501518151908152905130916001600160a01b038c1691600080516020615b448339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b1580156137a057600080fd5b600080614483846125ba565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b1580156144e257600080fd5b505af11580156144f6573d6000803e3d6000fd5b505050506040513d602081101561450c57600080fd5b50519050801561452357613a276003601f83613480565b436009541461453857613a27600a6022612ed9565b614540615a03565b6145486126ad565b602083018190528282600381111561455c57fe5b600381111561456757fe5b905250600090508151600381111561457b57fe5b1461459757613ad06009602183600001516003811115611c4957fe5b6145a1878661566f565b60a082018190526040805160208082019092529083015181526145c491906158bb565b60408301819052828260038111156145d857fe5b60038111156145e357fe5b9052505080516145f29061275c565b614602600d5482604001516134e6565b606083018190528282600381111561461657fe5b600381111561462157fe5b9052505080516146309061275c565b6001600160a01b0386166000908152600e602052604090819020549082015161465991906134e6565b608083018190528282600381111561466d57fe5b600381111561467857fe5b9052505080516146879061275c565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156147e657600080fd5b505af11580156147fa573d6000803e3d6000fd5b5060009250614807915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b600080600080436009541461484f57614844600a604f612ed9565b9350915061322d9050565b614859338661566f565b905080600c54019150600c548210156148b9576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b15801561495f57600080fd5b505af1158015614973573d6000803e3d6000fd5b5050505060003d6000811461498f576020811461499957600080fd5b60001991506149a5565b60206000803e60005191505b50806149f8576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b158015614a5a57600080fd5b505af1158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b505190508015614ac8576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414614b0b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b82614b14612dfa565b1015614b54576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b614b5c615a3a565b614b658661317e565b6020830181905282826003811115614b7957fe5b6003811115614b8457fe5b905250508051614b939061275c565b614ba18160200151856134e6565b6040830181905282826003811115614bb557fe5b6003811115614bc057fe5b905250508051614bcf9061275c565b614bdb600b54856134e6565b6060830181905282826003811115614bef57fe5b6003811115614bfa57fe5b905250508051614c099061275c565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614c45858561490a565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614cf857600080fd5b505af1158015614d0c573d6000803e3d6000fd5b5060009250614d19915050565b9695505050505050565b60008083614d3657506000905080612df3565b83830283858281614d4357fe5b0414614d5757506002915060009050612df3565b600092509050612df3565b60008082614d765750600190506000612df3565b6000838581614d8157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614dee57600080fd5b505af1158015614e02573d6000803e3d6000fd5b505050506040513d6020811015614e1857600080fd5b505190508015614e3c57614e2f6003601f83613480565b925060009150612df39050565b4360095414614e5157614e2f600a6022612ed9565b614e59615a03565b614e616126ad565b6020830181905282826003811115614e7557fe5b6003811115614e8057fe5b9052506000905081516003811115614e9457fe5b14614ebe57614eb06009602183600001516003811115611c4957fe5b935060009250612df3915050565b614ec8868661566f565b60a08201819052604080516020808201909252908301518152614eeb91906158bb565b6040830181905282826003811115614eff57fe5b6003811115614f0a57fe5b905250508051614f199061275c565b614f29600d5482604001516134e6565b6060830181905282826003811115614f3d57fe5b6003811115614f4857fe5b905250508051614f579061275c565b6001600160a01b0386166000908152600e6020526040908190205490820151614f8091906134e6565b6080830181905282826003811115614f9457fe5b6003811115614f9f57fe5b905250508051614fae9061275c565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156150c757600080fd5b505af11580156150db573d6000803e3d6000fd5b50600092506150e8915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561516b57600080fd5b505af115801561517f573d6000803e3d6000fd5b505050506040513d602081101561519557600080fd5b5051905080156151b9576151ac6003601283613480565b9250600091506156669050565b43600954146151ce576151ac600a6016612ed9565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561520857600080fd5b505afa15801561521c573d6000803e3d6000fd5b505050506040513d602081101561523257600080fd5b505114615245576151ac600a6011612ed9565b866001600160a01b0316866001600160a01b0316141561526b576151ac60066017612ed9565b8461527c576151ac60076015612ed9565b600019851415615292576151ac60076014612ed9565b6000806152a089898961397d565b909250905081156152d0576152c18260118111156152ba57fe5b6018612ed9565b94506000935061566692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b15801561532a57600080fd5b505afa15801561533e573d6000803e3d6000fd5b505050506040513d604081101561535457600080fd5b5080516020909101519092509050811561539f5760405162461bcd60e51b8152600401808060200182810382526033815260200180615b646033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156153f657600080fd5b505afa15801561540a573d6000803e3d6000fd5b505050506040513d602081101561542057600080fd5b50511015615475576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561549b57615494308d8d85613568565b9050615525565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b1580156154f657600080fd5b505af115801561550a573d6000803e3d6000fd5b505050506040513d602081101561552057600080fd5b505190505b801561556f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b15801561563a57600080fd5b505af115801561564e573d6000803e3d6000fd5b506000925061565b915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156156bf57600080fd5b505afa1580156156d3573d6000803e3d6000fd5b505050506040513d60208110156156e957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b15801561574857600080fd5b505af115801561575c573d6000803e3d6000fd5b5050505060003d60008114615778576020811461578257600080fd5b600019915061578e565b60206000803e60005191505b50806157e1576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b50519050828110156158af576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006158c861592c565b612dbd868660006158d761592c565b6000806158ec670de0b6b3a764000087614d23565b909250905060008260038111156158ff57fe5b1461591e57506040805160208101909152600081529092509050612df3565b612dec818660000151613d17565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061598057805160ff19168380011785556159ad565b828001600101855582156159ad579182015b828111156159ad578251825591602001919060010190615992565b506159b9929150615a63565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b6110cb91905b808211156159b95760008155600101615a6956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65646f6e6c79207468652061646d696e206d61792063616c6c205f72657369676e496d706c656d656e746174696f6eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f6f6e6c79207468652061646d696e206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6ea265627a7a72315820fa968cc120708f689ee6bd2e25d49520eb6ca4ab02d799bbec6d472e145c408864736f6c63430005100032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103c55760003560e01c806370a08231116101ff578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610d37578063f851a44014610d6d578063f8f9da2814610d75578063fca7820b14610d7d576103c5565b8063e9a44fd914610cf9578063e9c714f214610d01578063f2b3abbd14610d09578063f3fdb15a14610d2f576103c5565b8063d1109c2f116100e9578063d1109c2f14610c7a578063db006a7514610c82578063dd62ed3e14610c9f578063df3a516e14610ccd576103c5565b8063b71d1a0c14610be3578063bd6d894d14610c09578063c37f68e214610c11578063c5ebeaec14610c5d576103c5565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610b95578063ae9d70b014610b9d578063b2a02ff114610ba5578063b4a0bdf314610bdb576103c5565b8063a0712d6814610b3c578063a6afed9514610b59578063a9059cbb14610b61578063aa5af0fd14610b8d576103c5565b80638f840ddd116101ce5780638f840ddd146109b857806395d89b41146109c057806395dd9193146109c857806399d8c1b4146109ee576103c5565b806370a082311461094157806373acee9814610967578063852a12e31461096f578063856e5bb31461098c576103c5565b80632608f818116102ef5780634576b5db116102825780635fe3b567116102515780635fe3b5671461090c578063601a0bf1146109145780636c540baf146109315780636f307dc314610939576103c5565b80634576b5db1461083257806347bd37181461085857806356e67728146108605780635c60da1b14610904576103c5565b80633b1d21a2116102be5780633b1d21a2146107df5780633d9ea3a1146107e75780633e941010146107ef57806342f822601461080c576103c5565b80632608f8181461074b5780632678224714610777578063313ce5671461079b5780633af9e669146107b9576103c5565b806317bfdfbc11610367578063210bc05211610336578063210bc052146106a057806323323e03146106cc57806323b872dd146106f85780632464176b1461072e576103c5565b806317bfdfbc1461051457806318160ddd1461053a578063182df0f5146105425780631a31d4651461054a576103c5565b80630e752702116103a35780630e752702146104bf578063107568df146104dc578063153ab50514610504578063173b99041461050c576103c5565b806306fdde03146103ca578063095ea7b3146104475780630e32cb8614610487575b600080fd5b6103d2610d9a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561040c5781810151838201526020016103f4565b50505050905090810190601f1680156104395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104736004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610e27565b604080519115158252519081900360200190f35b6104ad6004803603602081101561049d57600080fd5b50356001600160a01b0316610e8d565b60408051918252519081900360200190f35b6104ad600480360360208110156104d557600080fd5b5035610f0f565b610502600480360360208110156104f257600080fd5b50356001600160a01b0316610f23565b005b610502610f91565b6104ad610fe1565b6104ad6004803603602081101561052a57600080fd5b50356001600160a01b0316610fe7565b6104ad6110a7565b6104ad6110ad565b610502600480360360e081101561056057600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156105a257600080fd5b8201836020820111156105b457600080fd5b803590602001918460018302840111600160201b831117156105d557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561062757600080fd5b82018360208201111561063957600080fd5b803590602001918460018302840111600160201b8311171561065a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506110ce9050565b6104ad600480360360408110156106b657600080fd5b506001600160a01b03813516906020013561116d565b6104ad600480360360408110156106e257600080fd5b506001600160a01b03813516906020013561124e565b6104736004803603606081101561070e57600080fd5b506001600160a01b03813581169160208101359091169060400135611264565b6105026004803603602081101561074457600080fd5b50356112d7565b6104ad6004803603604081101561076157600080fd5b506001600160a01b03813516906020013561137f565b61077f61138c565b604080516001600160a01b039092168252519081900360200190f35b6107a361139b565b6040805160ff9092168252519081900360200190f35b6104ad600480360360208110156107cf57600080fd5b50356001600160a01b03166113a4565b6104ad611402565b610473611411565b6104ad6004803603602081101561080557600080fd5b5035611416565b6105026004803603602081101561082257600080fd5b50356001600160a01b0316611421565b6104ad6004803603602081101561084857600080fd5b50356001600160a01b0316611443565b6104ad611575565b6105026004803603602081101561087657600080fd5b810190602081018135600160201b81111561089057600080fd5b8201836020820111156108a257600080fd5b803590602001918460018302840111600160201b831117156108c357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061157b945050505050565b61077f6115cc565b61077f6115db565b6104ad6004803603602081101561092a57600080fd5b50356115ea565b6104ad6116d5565b61077f6116db565b6104ad6004803603602081101561095757600080fd5b50356001600160a01b03166116ea565b6104ad611705565b6104ad6004803603602081101561098557600080fd5b50356117bb565b6104ad600480360360408110156109a257600080fd5b506001600160a01b0381351690602001356117c8565b6104ad6118a2565b6103d26118a8565b6104ad600480360360208110156109de57600080fd5b50356001600160a01b0316611900565b610502600480360360c0811015610a0457600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610a3e57600080fd5b820183602082011115610a5057600080fd5b803590602001918460018302840111600160201b83111715610a7157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610ac357600080fd5b820183602082011115610ad557600080fd5b803590602001918460018302840111600160201b83111715610af657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff16915061191b9050565b6104ad60048036036020811015610b5257600080fd5b5035611ab6565b6104ad611ac2565b61047360048036036040811015610b7757600080fd5b506001600160a01b038135169060200135611e05565b6104ad611e76565b6104ad611e7c565b6104ad611e82565b6104ad60048036036060811015610bbb57600080fd5b506001600160a01b03813581169160208101359091169060400135611f21565b61077f611f92565b6104ad60048036036020811015610bf957600080fd5b50356001600160a01b0316611fa1565b6104ad612012565b610c3760048036036020811015610c2757600080fd5b50356001600160a01b03166120ce565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6104ad60048036036020811015610c7357600080fd5b5035612163565b6104ad612170565b6104ad60048036036020811015610c9857600080fd5b5035612176565b6104ad60048036036040811015610cb557600080fd5b506001600160a01b0381358116916020013516612183565b6104ad60048036036040811015610ce357600080fd5b506001600160a01b0381351690602001356121ae565b61077f612288565b6104ad612297565b6104ad60048036036020811015610d1f57600080fd5b50356001600160a01b031661238f565b61077f612408565b6104ad60048036036060811015610d4d57600080fd5b506001600160a01b03813581169160208101359160409091013516612417565b61077f61242f565b6104ad612443565b6104ad60048036036020811015610d9357600080fd5b50356124a7565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b820191906000526020600020905b815481529060010190602001808311610e0257829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610e9833612564565b610ea1826125ba565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610f1b83612604565b509392505050565b610f2c33612564565b610f35816125ba565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60035461010090046001600160a01b03163314610fdf5760405162461bcd60e51b815260040180806020018281038252602d815260200180615b17602d913960400191505060405180910390fd5b565b60085481565b6000805460ff1661102c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561103e611ac2565b14611089576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b61109282611900565b90505b6000805460ff19166001179055919050565b600d5481565b60008060006110ba6126ad565b915091506110c78261275c565b9150505b90565b6110dc86868686868661191b565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561113857600080fd5b505afa15801561114c573d6000803e3d6000fd5b505050506040513d602081101561116257600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156111c457600080fd5b505afa1580156111d8573d6000803e3d6000fd5b505050506040513d60208110156111ee57600080fd5b505161123c576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846127a9565b9392505050565b60008061125b848461284a565b50949350505050565b6000805460ff166112a9576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556112bf338686866128f5565b1490505b6000805460ff191660011790559392505050565b6000811161131c576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61133d604051806060016040528060248152602001615aa160249139612c03565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b60008061125b8484612d24565b6004546001600160a01b031681565b60035460ff1681565b60006113ae61592c565b60405180602001604052806113c1612012565b90526001600160a01b0384166000908152600e60205260408120549192509081906113ed908490612da6565b915091506113fa8261275c565b949350505050565b600061140c612dfa565b905090565b600181565b6000610f0782612e45565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061144e33612564565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561149357600080fd5b505afa1580156114a7573d6000803e3d6000fd5b505050506040513d60208110156114bd57600080fd5b5051611510576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b60035461010090046001600160a01b031633146115c95760405162461bcd60e51b815260040180806020018281038252602d815260200180615bcb602d913960400191505060405180910390fd5b50565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff1661162f576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261167690612c03565b6000611680611ac2565b905080156116a65761169e81601181111561169757fe5b6030612ed9565b915050611095565b4360145414156116b757600061169e565b6116c083612f3f565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff1661174a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561175c611ac2565b146117a7576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610f07333384613083565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561181f57600080fd5b505afa158015611833573d6000803e3d6000fd5b505050506040513d602081101561184957600080fd5b5051611897576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b6112478333846130fe565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610e1f5780601f10610df457610100808354040283529160200191610e1f565b600080600061190e8461317e565b915091506112478261275c565b61192433612564565b6009541580156119345750600a54155b61196f5760405162461bcd60e51b8152600401808060200182810382526023815260200180615a7e6023913960400191505060405180910390fd5b6007849055836119b05760405162461bcd60e51b8152600401808060200182810382526030815260200180615ac56030913960400191505060405180910390fd5b60006119bb87611443565b90508015611a10576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a55611a2986613232565b90508015611a685760405162461bcd60e51b8152600401808060200182810382526022815260200180615af56022913960400191505060405180910390fd5b8351611a7b90600190602087019061593f565b508251611a8f90600290602086019061593f565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610f1b8361337b565b600954600090439080821415611add576000925050506110cb565b6000611ae7612dfa565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b158015611b5557600080fd5b505afa158015611b69573d6000803e3d6000fd5b505050506040513d6020811015611b7f57600080fd5b5051905065048c27395000811115611bde576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611beb89896133f5565b91509150611bf88261275c565b611c0061592c565b600080600080611c1e60405180602001604052808a81525087613418565b90975094506000876003811115611c3157fe5b14611c6357611c4e60096006896003811115611c4957fe5b613480565b9e5050505050505050505050505050506110cb565b611c6d858c612da6565b90975093506000876003811115611c8057fe5b14611c9857611c4e60096001896003811115611c4957fe5b611ca2848c6134e6565b90975092506000876003811115611cb557fe5b14611ccd57611c4e60096004896003811115611c4957fe5b611ce86040518060200160405280600854815250858c61350c565b90975091506000876003811115611cfb57fe5b14611d1357611c4e60096005896003811115611c4957fe5b611d1e858a8b61350c565b90975090506000876003811115611d3157fe5b14611d4957611c4e60096003896003811115611c4957fe5b60098e9055600a819055600b839055600c829055601454611d6b908f906133f5565b9097509550611d798761275c565b6013548610611da95760148e9055818c1015611d9e57611d988c612f3f565b50611da9565b611da782612f3f565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611e4a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611e60333386866128f5565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611e9e612dfa565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611ef057600080fd5b505afa158015611f04573d6000803e3d6000fd5b505050506040513d6020811015611f1a57600080fd5b5051905090565b6000805460ff16611f66576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611f7c33858585613568565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611fac33612564565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611247565b6000805460ff16612057576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612069611ac2565b146120b4576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b6120bc6110ad565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e60205260408120548190819081908180806120f98961317e565b93509050600081600381111561210b57fe5b146121295760095b97506000965086955085945061215c9350505050565b6121316126ad565b92509050600081600381111561214357fe5b1461214f576009612113565b5060009650919450925090505b9193509193565b6000610f073333846130fe565b60135481565b6000610f073333846127a9565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b15801561220557600080fd5b505afa158015612219573d6000803e3d6000fd5b505050506040513d602081101561222f57600080fd5b505161227d576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611247833384613083565b6015546001600160a01b031681565b6004546000906001600160a01b031633146122bf576122b860016000612ed9565b90506110cb565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b60006123cf6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612c03565b60006123d9611ac2565b905080156123ff576123f78160118111156123f057fe5b6040612ed9565b915050610f0a565b61124783613232565b6006546001600160a01b031681565b6000806124258585856137ce565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f2405361245f612dfa565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611ef057600080fd5b6000805460ff166124ec576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e7432353629000000000000602082015261253390612c03565b600061253d611ac2565b9050801561255b5761169e81601181111561255457fe5b6046612ed9565b6116c083613900565b6003546001600160a01b0382811661010090920416146115c9576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b6001600160a01b0381166115c9576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff1661264b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561265d611ac2565b905080156126885761267b81601181111561267457fe5b6036612ed9565b9250600091506126999050565b61269333338661397d565b92509250505b6000805460ff191660011790559092909150565b600d546000908190806126c857505060075460009150612758565b60006126d2612dfa565b905060006126de61592c565b60006126ef84600b54600c54613cd9565b93509050600081600381111561270157fe5b14612716579550600094506127589350505050565b6127208386613d17565b92509050600081600381111561273257fe5b14612747579550600094506127589350505050565b505160009550935061275892505050565b9091565b600081600381111561276a57fe5b146115c9576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff166127ee576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612800611ac2565b905080156128265761281e81601181111561281757fe5b6027612ed9565b9150506112c3565b6128338585856000613dc7565b9150506000805460ff191660011790559392505050565b60008054819060ff16612891576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556128a3611ac2565b905080156128ce576128c18160118111156128ba57fe5b601e612ed9565b9250600091506128df9050565b6128d9338686614477565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b15801561295a57600080fd5b505af115801561296e573d6000803e3d6000fd5b505050506040513d602081101561298457600080fd5b5051905080156129a35761299b6003604a83613480565b9150506113fa565b836001600160a01b0316856001600160a01b031614156129c95761299b6002604b612ed9565b60006001600160a01b0387811690871614156129e85750600019612a10565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b600080600080612a2085896133f5565b90945092506000846003811115612a3357fe5b14612a5157612a446009604b612ed9565b96505050505050506113fa565b6001600160a01b038a166000908152600e6020526040902054612a7490896133f5565b90945091506000846003811115612a8757fe5b14612a9857612a446009604c612ed9565b6001600160a01b0389166000908152600e6020526040902054612abb90896134e6565b90945090506000846003811115612ace57fe5b14612adf57612a446009604d612ed9565b6001600160a01b03808b166000908152600e6020526040808220859055918b168152208190556000198514612b37576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b0316600080516020615b448339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612bd357600080fd5b505af1158015612be7573d6000803e3d6000fd5b5060009250612bf4915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612c6c578181015183820152602001612c54565b50505050905090810190601f168015612c995780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612cb757600080fd5b505afa158015612ccb573d6000803e3d6000fd5b505050506040513d6020811015612ce157600080fd5b50516115c9576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612d6b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d7d611ac2565b90508015612d9b576128c1816011811115612d9457fe5b6035612ed9565b6128d933868661397d565b6000806000612db361592c565b612dbd8686613418565b90925090506000826003811115612dd057fe5b14612de15750915060009050612df3565b6000612dec8261481a565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611ef057600080fd5b6000805460ff16612e8a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612e9c611ac2565b90508015612eba5761169e816011811115612eb357fe5b604e612ed9565b612ec383614829565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612f0857fe5b836055811115612f1457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561124757fe5b600081612f505760005b9050610f0a565b4360095414612f6557612f49600a6033612ed9565b81612f6e612dfa565b1015612f8057612f49600e6032612ed9565b600c54821115612f9657612f4960026034612ed9565b600c805483900390819055601554612fb7906001600160a01b03168461490a565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b15801561301757600080fd5b505af115801561302b573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611247565b6000805460ff166130c8576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556130da611ac2565b905080156130f15761281e81601181111561281757fe5b6128338585600086613dc7565b6000805460ff16613143576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613155611ac2565b905080156131735761281e81601181111561316c57fe5b6008612ed9565b6128338585856149fd565b6001600160a01b0381166000908152601060205260408120805482918291829182916131b557506000945084935061322d92505050565b6131c58160000154600a54614d23565b909450925060008460038111156131d857fe5b146131ed57509193506000925061322d915050565b6131fb838260010154614d62565b9094509150600084600381111561320e57fe5b1461322357509193506000925061322d915050565b5060009450925050505b915091565b600080436009541461324a576123f7600a6041612ed9565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561329b57600080fd5b505afa1580156132af573d6000803e3d6000fd5b505050506040513d60208110156132c557600080fd5b5051613318576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611247565b60008054819060ff166133c2576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556133d4611ac2565b905080156133eb5761267b8160118111156128ba57fe5b6126933385614d8d565b60008083831161340c575060009050818303612df3565b50600390506000612df3565b600061342261592c565b600080613433866000015186614d23565b9092509050600082600381111561344657fe5b1461346557506040805160208101909152600081529092509050612df3565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa08460118111156134af57fe5b8460558111156134bb57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156113fa57fe5b6000808383018481106134fe57600092509050612df3565b506002915060009050612df3565b600080600061351961592c565b6135238787613418565b9092509050600082600381111561353657fe5b146135475750915060009050613560565b6135596135538261481a565b866134e6565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b1580156135d557600080fd5b505af11580156135e9573d6000803e3d6000fd5b505050506040513d60208110156135ff57600080fd5b5051905080156136165761299b6003601b83613480565b846001600160a01b0316846001600160a01b0316141561363c5761299b6006601c612ed9565b6001600160a01b0384166000908152600e60205260408120548190819061366390876133f5565b9093509150600083600381111561367657fe5b146136995761368e6009601a856003811115611c4957fe5b9450505050506113fa565b6001600160a01b0388166000908152600e60205260409020546136bc90876134e6565b909350905060008360038111156136cf57fe5b146136e75761368e60096019856003811115611c4957fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a815293519193600080516020615b44833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b1580156137a057600080fd5b505af11580156137b4573d6000803e3d6000fd5b50600092506137c1915050565b9998505050505050505050565b60008054819060ff16613815576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613827611ac2565b905080156138525761384581601181111561383e57fe5b600f612ed9565b9250600091506138e99050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561388d57600080fd5b505af11580156138a1573d6000803e3d6000fd5b505050506040513d60208110156138b757600080fd5b5051905080156138d7576138458160118111156138d057fe5b6010612ed9565b6138e3338787876150fa565b92509250505b6000805460ff191660011790559094909350915050565b6000436009541461391757612f49600a6048612ed9565b670de0b6b3a764000082111561393357612f4960026049612ed9565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611247565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b1580156139e657600080fd5b505af11580156139fa573d6000803e3d6000fd5b505050506040513d6020811015613a1057600080fd5b505190508015613a3457613a276003603883613480565b9250600091506135609050565b4360095414613a4957613a27600a6039612ed9565b613a516159bd565b6001600160a01b0386166000908152601060205260409020600101546060820152613a7b8661317e565b6080830181905260208301826003811115613a9257fe5b6003811115613a9d57fe5b9052506000905081602001516003811115613ab457fe5b14613ade57613ad06009603783602001516003811115611c4957fe5b935060009250613560915050565b600019851415613af75760808101516040820152613aff565b604081018590525b613b0d87826040015161566f565b60e082018190526080820151613b22916133f5565b60a0830181905260208301826003811115613b3957fe5b6003811115613b4457fe5b8152505050613b56816020015161275c565b613b66600b548260e001516133f5565b60c0830181905260208301826003811115613b7d57fe5b6003811115613b8857fe5b8152505050613b9a816020015161275c565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613ca557600080fd5b505af1158015613cb9573d6000803e3d6000fd5b5060009250613cc6915050565b8160e00151935093505050935093915050565b600080600080613ce987876134e6565b90925090506000826003811115613cfc57fe5b14613d0d5750915060009050613560565b61355981866133f5565b6000613d2161592c565b600080613d3686670de0b6b3a7640000614d23565b90925090506000826003811115613d4957fe5b14613d6857506040805160208101909152600081529092509050612df3565b600080613d758388614d62565b90925090506000826003811115613d8857fe5b14613daa57506040805160208101909152600081529094509250612df3915050565b604080516020810190915290815260009890975095505050505050565b6000821580613dd4575081155b613e0f5760405162461bcd60e51b8152600401808060200182810382526034815260200180615b976034913960400191505060405180910390fd5b613e17615a03565b613e1f6126ad565b6020830181905282826003811115613e3357fe5b6003811115613e3e57fe5b905250508051613e4d9061275c565b8315613ea857604080820185905280516020808201909252908201518152613e759085612da6565b6060830181905282826003811115613e8957fe5b6003811115613e9457fe5b905250508051613ea39061275c565b613efa565b613ec483604051806020016040528084602001518152506158bb565b6040830181905282826003811115613ed857fe5b6003811115613ee357fe5b905250508051613ef29061275c565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613f5d57600080fd5b505af1158015613f71573d6000803e3d6000fd5b505050506040513d6020811015613f8757600080fd5b505190508015613fcb576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b436009541461400e576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b61401e600d5483604001516133f5565b608084018190528382600381111561403257fe5b600381111561403d57fe5b90525050815161404c9061275c565b6001600160a01b0387166000908152600e602052604090819020549083015161407591906133f5565b60a084018190528382600381111561408957fe5b600381111561409457fe5b9052505081516140a39061275c565b81606001516140b0612dfa565b10156140f0576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b15801561415957600080fd5b505afa15801561416d573d6000803e3d6000fd5b505050506040513d602081101561418357600080fd5b50511561436f57606084015160055460408051629df3ab60e31b8152905161420693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b1580156141d557600080fd5b505afa1580156141e9573d6000803e3d6000fd5b505050506040513d60208110156141ff57600080fd5b5051614d23565b9250828582600381111561421657fe5b600381111561422157fe5b9052505083516142309061275c565b61424282670de0b6b3a7640000614d62565b9250828582600381111561425257fe5b600381111561425d57fe5b90525050835161426c9061275c565b61427a8460600151836133f5565b9150818582600381111561428a57fe5b600381111561429557fe5b9052505083516142a49061275c565b6005546040805163c5f956af60e01b8152905161431c926001600160a01b03169163c5f956af916004808301926020929190829003018186803b1580156142ea57600080fd5b505afa1580156142fe573d6000803e3d6000fd5b505050506040513d602081101561431457600080fd5b50518361490a565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614376565b5060608301515b614380888261490a565b6040808501518151908152905130916001600160a01b038c1691600080516020615b448339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b1580156137a057600080fd5b600080614483846125ba565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b1580156144e257600080fd5b505af11580156144f6573d6000803e3d6000fd5b505050506040513d602081101561450c57600080fd5b50519050801561452357613a276003601f83613480565b436009541461453857613a27600a6022612ed9565b614540615a03565b6145486126ad565b602083018190528282600381111561455c57fe5b600381111561456757fe5b905250600090508151600381111561457b57fe5b1461459757613ad06009602183600001516003811115611c4957fe5b6145a1878661566f565b60a082018190526040805160208082019092529083015181526145c491906158bb565b60408301819052828260038111156145d857fe5b60038111156145e357fe5b9052505080516145f29061275c565b614602600d5482604001516134e6565b606083018190528282600381111561461657fe5b600381111561462157fe5b9052505080516146309061275c565b6001600160a01b0386166000908152600e602052604090819020549082015161465991906134e6565b608083018190528282600381111561466d57fe5b600381111561467857fe5b9052505080516146879061275c565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156147e657600080fd5b505af11580156147fa573d6000803e3d6000fd5b5060009250614807915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b600080600080436009541461484f57614844600a604f612ed9565b9350915061322d9050565b614859338661566f565b905080600c54019150600c548210156148b9576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b15801561495f57600080fd5b505af1158015614973573d6000803e3d6000fd5b5050505060003d6000811461498f576020811461499957600080fd5b60001991506149a5565b60206000803e60005191505b50806149f8576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b158015614a5a57600080fd5b505af1158015614a6e573d6000803e3d6000fd5b505050506040513d6020811015614a8457600080fd5b505190508015614ac8576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414614b0b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b82614b14612dfa565b1015614b54576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b614b5c615a3a565b614b658661317e565b6020830181905282826003811115614b7957fe5b6003811115614b8457fe5b905250508051614b939061275c565b614ba18160200151856134e6565b6040830181905282826003811115614bb557fe5b6003811115614bc057fe5b905250508051614bcf9061275c565b614bdb600b54856134e6565b6060830181905282826003811115614bef57fe5b6003811115614bfa57fe5b905250508051614c099061275c565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614c45858561490a565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614cf857600080fd5b505af1158015614d0c573d6000803e3d6000fd5b5060009250614d19915050565b9695505050505050565b60008083614d3657506000905080612df3565b83830283858281614d4357fe5b0414614d5757506002915060009050612df3565b600092509050612df3565b60008082614d765750600190506000612df3565b6000838581614d8157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614dee57600080fd5b505af1158015614e02573d6000803e3d6000fd5b505050506040513d6020811015614e1857600080fd5b505190508015614e3c57614e2f6003601f83613480565b925060009150612df39050565b4360095414614e5157614e2f600a6022612ed9565b614e59615a03565b614e616126ad565b6020830181905282826003811115614e7557fe5b6003811115614e8057fe5b9052506000905081516003811115614e9457fe5b14614ebe57614eb06009602183600001516003811115611c4957fe5b935060009250612df3915050565b614ec8868661566f565b60a08201819052604080516020808201909252908301518152614eeb91906158bb565b6040830181905282826003811115614eff57fe5b6003811115614f0a57fe5b905250508051614f199061275c565b614f29600d5482604001516134e6565b6060830181905282826003811115614f3d57fe5b6003811115614f4857fe5b905250508051614f579061275c565b6001600160a01b0386166000908152600e6020526040908190205490820151614f8091906134e6565b6080830181905282826003811115614f9457fe5b6003811115614f9f57fe5b905250508051614fae9061275c565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b038816913091600080516020615b448339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b1580156150c757600080fd5b505af11580156150db573d6000803e3d6000fd5b50600092506150e8915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561516b57600080fd5b505af115801561517f573d6000803e3d6000fd5b505050506040513d602081101561519557600080fd5b5051905080156151b9576151ac6003601283613480565b9250600091506156669050565b43600954146151ce576151ac600a6016612ed9565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561520857600080fd5b505afa15801561521c573d6000803e3d6000fd5b505050506040513d602081101561523257600080fd5b505114615245576151ac600a6011612ed9565b866001600160a01b0316866001600160a01b0316141561526b576151ac60066017612ed9565b8461527c576151ac60076015612ed9565b600019851415615292576151ac60076014612ed9565b6000806152a089898961397d565b909250905081156152d0576152c18260118111156152ba57fe5b6018612ed9565b94506000935061566692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b15801561532a57600080fd5b505afa15801561533e573d6000803e3d6000fd5b505050506040513d604081101561535457600080fd5b5080516020909101519092509050811561539f5760405162461bcd60e51b8152600401808060200182810382526033815260200180615b646033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156153f657600080fd5b505afa15801561540a573d6000803e3d6000fd5b505050506040513d602081101561542057600080fd5b50511015615475576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561549b57615494308d8d85613568565b9050615525565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b1580156154f657600080fd5b505af115801561550a573d6000803e3d6000fd5b505050506040513d602081101561552057600080fd5b505190505b801561556f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b15801561563a57600080fd5b505af115801561564e573d6000803e3d6000fd5b506000925061565b915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b1580156156bf57600080fd5b505afa1580156156d3573d6000803e3d6000fd5b505050506040513d60208110156156e957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b15801561574857600080fd5b505af115801561575c573d6000803e3d6000fd5b5050505060003d60008114615778576020811461578257600080fd5b600019915061578e565b60206000803e60005191505b50806157e1576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561582c57600080fd5b505afa158015615840573d6000803e3d6000fd5b505050506040513d602081101561585657600080fd5b50519050828110156158af576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006158c861592c565b612dbd868660006158d761592c565b6000806158ec670de0b6b3a764000087614d23565b909250905060008260038111156158ff57fe5b1461591e57506040805160208101909152600081529092509050612df3565b612dec818660000151613d17565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061598057805160ff19168380011785556159ad565b828001600101855582156159ad579182015b828111156159ad578251825591602001919060010190615992565b506159b9929150615a63565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b6110cb91905b808211156159b95760008155600101615a6956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65646f6e6c79207468652061646d696e206d61792063616c6c205f72657369676e496d706c656d656e746174696f6eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f6f6e6c79207468652061646d696e206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6ea265627a7a72315820fa968cc120708f689ee6bd2e25d49520eb6ca4ab02d799bbec6d472e145c408864736f6c63430005100032", - "devdoc": { - "author": "Venus", - "methods": { - "_acceptAdmin()": { - "details": "Admin function for pending admin to accept role and update admin", - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_addReserves(uint256)": { - "params": { - "addAmount": "The amount of underlying tokens to add as reserves" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_becomeImplementation(bytes)": { - "params": { - "data": "The encoded bytes data for any initialization" - } - }, - "_reduceReserves(uint256)": { - "params": { - "reduceAmount_": "Amount of reduction to reserves" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setComptroller(address)": { - "details": "Admin function to set a new comptroller", - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setInterestRateModel(address)": { - "details": "Governance function to accrue interest and update the interest rate model", - "params": { - "newInterestRateModel_": "The new interest rate model to use" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setPendingAdmin(address)": { - "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.", - "params": { - "newPendingAdmin": "New pending admin." - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setReserveFactor(uint256)": { - "details": "Governor function to accrue interest and set a new reserve factor", - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "accrueInterest()": { - "details": "This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta" - }, - "allowance(address,address)": { - "params": { - "owner": "The address of the account which owns the tokens to be spent", - "spender": "The address of the account which may transfer tokens" - }, - "return": "The number of tokens allowed to be spent (-1 means infinite)" - }, - "approve(address,uint256)": { - "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)", - "params": { - "amount": "The number of tokens that are approved (-1 means infinite)", - "spender": "The address of the account which may transfer tokens" - }, - "return": "Whether or not the approval succeeded" - }, - "balanceOf(address)": { - "params": { - "owner": "The address of the account to query" - }, - "return": "The number of tokens owned by `owner`" - }, - "balanceOfUnderlying(address)": { - "details": "This also accrues interest in a transaction", - "params": { - "owner": "The address of the account to query" - }, - "return": "The amount of underlying owned by `owner`" - }, - "borrow(uint256)": { - "params": { - "borrowAmount": "The amount of the underlying asset to borrow" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "borrowBalanceCurrent(address)": { - "params": { - "account": "The address whose balance should be calculated after updating borrowIndex" - }, - "return": "The calculated balance" - }, - "borrowBalanceStored(address)": { - "params": { - "account": "The address whose balance should be calculated" - }, - "return": "The calculated balance" - }, - "borrowBehalf(address,uint256)": { - "params": { - "borrowAmount": "The amount of the underlying asset to borrow", - "borrower": "The borrower, on behalf of whom to borrow." - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "borrowRatePerBlock()": { - "return": "The borrow interest rate per block, scaled by 1e18" - }, - "exchangeRateCurrent()": { - "return": "Calculated exchange rate scaled by 1e18" - }, - "exchangeRateStored()": { - "details": "This function does not accrue interest before calculating the exchange rate", - "return": "Calculated exchange rate scaled by 1e18" - }, - "getAccountSnapshot(address)": { - "details": "This is used by comptroller to more efficiently perform liquidity checks.", - "params": { - "account": "Address of the account to snapshot" - }, - "return": "(possible error, token balance, borrow balance, exchange rate mantissa)" - }, - "getCash()": { - "return": "The quantity of underlying asset owned by this contract" - }, - "initialize(address,address,address,uint256,string,string,uint8)": { - "params": { - "comptroller_": "The address of the Comptroller", - "decimals_": "BEP-20 decimal precision of this token", - "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", - "interestRateModel_": "The address of the interest rate model", - "name_": "BEP-20 name of this token", - "symbol_": "BEP-20 symbol of this token", - "underlying_": "The address of the underlying asset" - } - }, - "initialize(address,address,uint256,string,string,uint8)": { - "params": { - "comptroller_": "The address of the Comptroller", - "decimals_": "EIP-20 decimal precision of this token", - "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", - "interestRateModel_": "The address of the interest rate model", - "name_": "EIP-20 name of this token", - "symbol_": "EIP-20 symbol of this token" - } - }, - "liquidateBorrow(address,uint256,address)": { - "params": { - "borrower": "The borrower of this vToken to be liquidated", - "repayAmount": "The amount of the underlying borrowed asset to repay", - "vTokenCollateral": "The market in which to seize collateral from the borrower" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "mint(uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "mintAmount": "The amount of the underlying asset to supply" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "mintBehalf(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "mintAmount": "The amount of the underlying asset to supply", - "receiver": "The account which is receiving the vTokens" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeem(uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemTokens": "The number of vTokens to redeem into underlying" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeemBehalf(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemTokens": "The number of vTokens to redeem into underlying", - "redeemer": "The user on behalf of whom to redeem" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeemUnderlying(uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemAmount": "The amount of underlying to redeem" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeemUnderlyingBehalf(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemAmount": "The amount of underlying to receive from redeeming vTokens", - "redeemer": ", on behalf of whom to redeem" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "repayBorrow(uint256)": { - "params": { - "repayAmount": "The amount to repay" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "repayBorrowBehalf(address,uint256)": { - "params": { - "borrower": "The account with the debt being payed off", - "repayAmount": "The amount to repay" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "seize(address,address,uint256)": { - "details": "Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.", - "params": { - "borrower": "The account having collateral seized", - "liquidator": "The account receiving seized collateral", - "seizeTokens": "The number of vTokens to seize" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "setAccessControlManager(address)": { - "details": "Admin function to set the access control address", - "params": { - "newAccessControlManagerAddress": "New address for the access control" - }, - "return": "uint 0=success, otherwise will revert" - }, - "setProtocolShareReserve(address)": { - "params": { - "protcolShareReserve_": "The address of protocol share reserve contract" - } - }, - "setReduceReservesBlockDelta(uint256)": { - "params": { - "newReduceReservesBlockDelta_": "block difference value" - } - }, - "supplyRatePerBlock()": { - "return": "The supply interest rate per block, scaled by 1e18" - }, - "totalBorrowsCurrent()": { - "return": "The total borrows with interest" - }, - "transfer(address,uint256)": { - "params": { - "amount": "The number of tokens to transfer", - "dst": "The address of the destination account" - }, - "return": "Whether or not the transfer succeeded" - }, - "transferFrom(address,address,uint256)": { - "params": { - "amount": "The number of tokens to transfer", - "dst": "The address of the destination account", - "src": "The address of the source account" - }, - "return": "Whether or not the transfer succeeded" - } - }, - "title": "Venus's VBep20Delegate Contract" - }, - "userdoc": { - "methods": { - "_acceptAdmin()": { - "notice": "Accepts transfer of admin rights. msg.sender must be pendingAdmin" - }, - "_addReserves(uint256)": { - "notice": "The sender adds to reserves." - }, - "_becomeImplementation(bytes)": { - "notice": "Called by the delegator on a delegate to initialize it for duty" - }, - "_reduceReserves(uint256)": { - "notice": "Accrues interest and reduces reserves by transferring to protocol share reserve" - }, - "_resignImplementation()": { - "notice": "Called by the delegator on a delegate to forfeit its responsibility" - }, - "_setComptroller(address)": { - "notice": "Sets a new comptroller for the market" - }, - "_setInterestRateModel(address)": { - "notice": "Accrues interest and updates the interest rate model using _setInterestRateModelFresh" - }, - "_setPendingAdmin(address)": { - "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer." - }, - "_setReserveFactor(uint256)": { - "notice": "accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`" - }, - "accrueInterest()": { - "notice": "Applies accrued interest to total borrows and reserves" - }, - "allowance(address,address)": { - "notice": "Get the current allowance from `owner` for `spender`" - }, - "approve(address,uint256)": { - "notice": "Approve `spender` to transfer up to `amount` from `src`" - }, - "balanceOf(address)": { - "notice": "Get the token balance of the `owner`" - }, - "balanceOfUnderlying(address)": { - "notice": "Get the underlying balance of the `owner`" - }, - "borrow(uint256)": { - "notice": "Sender borrows assets from the protocol to their own address" - }, - "borrowBalanceCurrent(address)": { - "notice": "Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex" - }, - "borrowBalanceStored(address)": { - "notice": "Return the borrow balance of account based on stored data" - }, - "borrowBehalf(address,uint256)": { - "notice": "Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`" - }, - "borrowRatePerBlock()": { - "notice": "Returns the current per-block borrow interest rate for this vToken" - }, - "constructor": "Construct an empty delegate", - "exchangeRateCurrent()": { - "notice": "Accrue interest then return the up-to-date exchange rate" - }, - "exchangeRateStored()": { - "notice": "Calculates the exchange rate from the underlying to the VToken" - }, - "getAccountSnapshot(address)": { - "notice": "Get a snapshot of the account's balances, and the cached exchange rate" - }, - "getCash()": { - "notice": "Get cash balance of this vToken in the underlying asset" - }, - "initialize(address,address,address,uint256,string,string,uint8)": { - "notice": "Initialize the new money market" - }, - "initialize(address,address,uint256,string,string,uint8)": { - "notice": "Initialize the money market" - }, - "liquidateBorrow(address,uint256,address)": { - "notice": "The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator." - }, - "mint(uint256)": { - "notice": "Sender supplies assets into the market and receives vTokens in exchange" - }, - "mintBehalf(address,uint256)": { - "notice": "Sender supplies assets into the market and receiver receives vTokens in exchange" - }, - "redeem(uint256)": { - "notice": "Sender redeems vTokens in exchange for the underlying asset" - }, - "redeemBehalf(address,uint256)": { - "notice": "Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" - }, - "redeemUnderlying(uint256)": { - "notice": "Sender redeems vTokens in exchange for a specified amount of underlying asset" - }, - "redeemUnderlyingBehalf(address,uint256)": { - "notice": "Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" - }, - "repayBorrow(uint256)": { - "notice": "Sender repays their own borrow" - }, - "repayBorrowBehalf(address,uint256)": { - "notice": "Sender repays a borrow belonging to another borrowing account" - }, - "seize(address,address,uint256)": { - "notice": "Transfers collateral tokens (this market) to the liquidator." - }, - "setAccessControlManager(address)": { - "notice": "Sets the address of the access control manager of this contract" - }, - "setProtocolShareReserve(address)": { - "notice": "Sets protocol share reserve contract address" - }, - "setReduceReservesBlockDelta(uint256)": { - "notice": "Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve" - }, - "supplyRatePerBlock()": { - "notice": "Returns the current per-block supply interest rate for this vToken" - }, - "totalBorrowsCurrent()": { - "notice": "Returns the current total borrows plus accrued interest" - }, - "transfer(address,uint256)": { - "notice": "Transfer `amount` tokens from `msg.sender` to `dst`" - }, - "transferFrom(address,address,uint256)": { - "notice": "Transfer `amount` tokens from `src` to `dst`" - } - }, - "notice": "VTokens which wrap an EIP-20 underlying and are delegated to" - }, - "storageLayout": { - "storage": [ - { - "astId": 23381, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "_notEntered", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 23383, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "name", - "offset": 0, - "slot": "1", - "type": "t_string_storage" - }, - { - "astId": 23385, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "symbol", - "offset": 0, - "slot": "2", - "type": "t_string_storage" - }, - { - "astId": 23387, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "decimals", - "offset": 0, - "slot": "3", - "type": "t_uint8" - }, - { - "astId": 23395, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "admin", - "offset": 1, - "slot": "3", - "type": "t_address_payable" - }, - { - "astId": 23397, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "pendingAdmin", - "offset": 0, - "slot": "4", - "type": "t_address_payable" - }, - { - "astId": 23399, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "comptroller", - "offset": 0, - "slot": "5", - "type": "t_contract(ComptrollerInterface)2305" - }, - { - "astId": 23401, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "interestRateModel", - "offset": 0, - "slot": "6", - "type": "t_contract(InterestRateModel)8971" - }, - { - "astId": 23403, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "initialExchangeRateMantissa", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 23405, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "reserveFactorMantissa", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 23407, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "accrualBlockNumber", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 23409, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "borrowIndex", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 23411, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "totalBorrows", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 23413, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "totalReserves", - "offset": 0, - "slot": "12", - "type": "t_uint256" - }, - { - "astId": 23415, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "totalSupply", - "offset": 0, - "slot": "13", - "type": "t_uint256" - }, - { - "astId": 23419, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "accountTokens", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 23425, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "transferAllowances", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 23429, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "accountBorrows", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_address,t_struct(BorrowSnapshot)23379_storage)" - }, - { - "astId": 23431, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "underlying", - "offset": 0, - "slot": "17", - "type": "t_address" - }, - { - "astId": 23433, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "implementation", - "offset": 0, - "slot": "18", - "type": "t_address" - }, - { - "astId": 23435, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "reduceReservesBlockDelta", - "offset": 0, - "slot": "19", - "type": "t_uint256" - }, - { - "astId": 23437, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "reduceReservesBlockNumber", - "offset": 0, - "slot": "20", - "type": "t_uint256" - }, - { - "astId": 23439, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "protocolShareReserve", - "offset": 0, - "slot": "21", - "type": "t_address_payable" - }, - { - "astId": 23441, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "accessControlManager", - "offset": 0, - "slot": "22", - "type": "t_address" - }, - { - "astId": 23448, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "__gap", - "offset": 0, - "slot": "23", - "type": "t_array(t_uint256)50_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(ComptrollerInterface)2305": { - "encoding": "inplace", - "label": "contract ComptrollerInterface", - "numberOfBytes": "20" - }, - "t_contract(InterestRateModel)8971": { - "encoding": "inplace", - "label": "contract InterestRateModel", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_struct(BorrowSnapshot)23379_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct VTokenStorageBase.BorrowSnapshot)", - "numberOfBytes": "32", - "value": "t_struct(BorrowSnapshot)23379_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(BorrowSnapshot)23379_storage": { - "encoding": "inplace", - "label": "struct VTokenStorageBase.BorrowSnapshot", - "members": [ - { - "astId": 23376, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "principal", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 23378, - "contract": "contracts/Tokens/VTokens/VBep20Delegate.sol:VBep20Delegate", - "label": "interestIndex", - "offset": 0, - "slot": "1", - "type": "t_uint256" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} diff --git a/deployments/bsctestnet/VBep20Temp.json b/deployments/bsctestnet/VBep20Temp.json deleted file mode 100644 index 2c78fdb76..000000000 --- a/deployments/bsctestnet/VBep20Temp.json +++ /dev/null @@ -1,2462 +0,0 @@ -{ - "address": "0x9ac3C79de233952bEBdf88A932c52fC24dD6ebcf", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeemBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlyingBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newUnderlying", - "type": "address" - } - ], - "name": "updateUnderlying", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xba9de4d582282b9914e8939aeca529b7a00e864187965b2c67fa1a7c26287fcb", - "receipt": { - "to": null, - "from": "0x464779C41C5f1Be598853C1F87bCC7087Ea75f28", - "contractAddress": "0x9ac3C79de233952bEBdf88A932c52fC24dD6ebcf", - "transactionIndex": 1, - "gasUsed": "5054244", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xde86a6d114ebd52c3939618f17a53ad34234c0a4a280465342614bb22bdf6dcf", - "transactionHash": "0xba9de4d582282b9914e8939aeca529b7a00e864187965b2c67fa1a7c26287fcb", - "logs": [], - "blockNumber": 39552966, - "cumulativeGasUsed": "5113260", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "42f81d8e85977bc834873ceceb7c8672", - "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cashPrior\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"interestAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"AccrueInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"error\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"info\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"detail\",\"type\":\"uint256\"}],\"name\":\"Failure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vTokenCollateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"LiquidateBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"MintBehalf\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"oldComptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"NewComptroller\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"oldInterestRateModel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"NewMarketInterestRateModel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"NewProtocolShareReserve\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReduceReservesBlockDelta\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta\",\"type\":\"uint256\"}],\"name\":\"NewReduceReservesBlockDelta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReserveFactorMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"NewReserveFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"RedeemFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"RepayBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"benefactor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolShareReserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"}],\"name\":\"_addReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount_\",\"type\":\"uint256\"}],\"name\":\"_reduceReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"_setComptroller\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"newInterestRateModel_\",\"type\":\"address\"}],\"name\":\"_setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa_\",\"type\":\"uint256\"}],\"name\":\"_setReserveFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"accrueInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"borrowRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModel\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModel\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isVToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"internalType\":\"contract VTokenInterface\",\"name\":\"vTokenCollateral\",\"type\":\"address\"}],\"name\":\"liquidateBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mintBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeemBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlyingBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockDelta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reduceReservesBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reserveFactorMantissa\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlManagerAddress\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"protcolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta_\",\"type\":\"uint256\"}],\"name\":\"setReduceReservesBlockDelta\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supplyRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"totalBorrowsCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newUnderlying\",\"type\":\"address\"}],\"name\":\"updateUnderlying\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_addReserves(uint256)\":{\"params\":{\"addAmount\":\"The amount of underlying tokens to add as reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_reduceReserves(uint256)\":{\"params\":{\"reduceAmount_\":\"Amount of reduction to reserves\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setComptroller(address)\":{\"details\":\"Admin function to set a new comptroller\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setInterestRateModel(address)\":{\"details\":\"Governance function to accrue interest and update the interest rate model\",\"params\":{\"newInterestRateModel_\":\"The new interest rate model to use\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"_setReserveFactor(uint256)\":{\"details\":\"Governor function to accrue interest and set a new reserve factor\",\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"accrueInterest()\":{\"details\":\"This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta\"},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"The number of tokens allowed to be spent (-1 means infinite)\"},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (-1 means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"return\":\"Whether or not the approval succeeded\"},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The number of tokens owned by `owner`\"},\"balanceOfUnderlying(address)\":{\"details\":\"This also accrues interest in a transaction\",\"params\":{\"owner\":\"The address of the account to query\"},\"return\":\"The amount of underlying owned by `owner`\"},\"borrow(uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowBalanceCurrent(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated after updating borrowIndex\"},\"return\":\"The calculated balance\"},\"borrowBalanceStored(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated\"},\"return\":\"The calculated balance\"},\"borrowBehalf(address,uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\",\"borrower\":\"The borrower, on behalf of whom to borrow.\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"borrowRatePerBlock()\":{\"return\":\"The borrow interest rate per block, scaled by 1e18\"},\"exchangeRateCurrent()\":{\"return\":\"Calculated exchange rate scaled by 1e18\"},\"exchangeRateStored()\":{\"details\":\"This function does not accrue interest before calculating the exchange rate\",\"return\":\"Calculated exchange rate scaled by 1e18\"},\"getAccountSnapshot(address)\":{\"details\":\"This is used by comptroller to more efficiently perform liquidity checks.\",\"params\":{\"account\":\"Address of the account to snapshot\"},\"return\":\"(possible error, token balance, borrow balance, exchange rate mantissa)\"},\"getCash()\":{\"return\":\"The quantity of underlying asset owned by this contract\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"BEP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"BEP-20 name of this token\",\"symbol_\":\"BEP-20 symbol of this token\",\"underlying_\":\"The address of the underlying asset\"}},\"initialize(address,address,uint256,string,string,uint8)\":{\"params\":{\"comptroller_\":\"The address of the Comptroller\",\"decimals_\":\"EIP-20 decimal precision of this token\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"EIP-20 name of this token\",\"symbol_\":\"EIP-20 symbol of this token\"}},\"liquidateBorrow(address,uint256,address)\":{\"params\":{\"borrower\":\"The borrower of this vToken to be liquidated\",\"repayAmount\":\"The amount of the underlying borrowed asset to repay\",\"vTokenCollateral\":\"The market in which to seize collateral from the borrower\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mint(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"mintBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\",\"receiver\":\"The account which is receiving the vTokens\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeem(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying\",\"redeemer\":\"The user on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlying(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to receive from redeeming vTokens\",\"redeemer\":\", on behalf of whom to redeem\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrow(uint256)\":{\"params\":{\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"repayBorrowBehalf(address,uint256)\":{\"params\":{\"borrower\":\"The account with the debt being payed off\",\"repayAmount\":\"The amount to repay\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"seize(address,address,uint256)\":{\"details\":\"Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\",\"params\":{\"borrower\":\"The account having collateral seized\",\"liquidator\":\"The account receiving seized collateral\",\"seizeTokens\":\"The number of vTokens to seize\"},\"return\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"},\"setAccessControlManager(address)\":{\"details\":\"Admin function to set the access control address\",\"params\":{\"newAccessControlManagerAddress\":\"New address for the access control\"},\"return\":\"uint 0=success, otherwise will revert\"},\"setProtocolShareReserve(address)\":{\"params\":{\"protcolShareReserve_\":\"The address of protocol share reserve contract\"}},\"setReduceReservesBlockDelta(uint256)\":{\"params\":{\"newReduceReservesBlockDelta_\":\"block difference value\"}},\"supplyRatePerBlock()\":{\"return\":\"The supply interest rate per block, scaled by 1e18\"},\"totalBorrowsCurrent()\":{\"return\":\"The total borrows with interest\"},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"return\":\"Whether or not the transfer succeeded\"},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"return\":\"Whether or not the transfer succeeded\"}},\"title\":\"Venus's VBep20 Contract\"},\"userdoc\":{\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. msg.sender must be pendingAdmin\"},\"_addReserves(uint256)\":{\"notice\":\"The sender adds to reserves.\"},\"_reduceReserves(uint256)\":{\"notice\":\"Accrues interest and reduces reserves by transferring to protocol share reserve\"},\"_setComptroller(address)\":{\"notice\":\"Sets a new comptroller for the market\"},\"_setInterestRateModel(address)\":{\"notice\":\"Accrues interest and updates the interest rate model using _setInterestRateModelFresh\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setReserveFactor(uint256)\":{\"notice\":\"accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\"},\"accrueInterest()\":{\"notice\":\"Applies accrued interest to total borrows and reserves\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Get the underlying balance of the `owner`\"},\"borrow(uint256)\":{\"notice\":\"Sender borrows assets from the protocol to their own address\"},\"borrowBalanceCurrent(address)\":{\"notice\":\"Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\"},\"borrowBalanceStored(address)\":{\"notice\":\"Return the borrow balance of account based on stored data\"},\"borrowBehalf(address,uint256)\":{\"notice\":\"Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\"},\"borrowRatePerBlock()\":{\"notice\":\"Returns the current per-block borrow interest rate for this vToken\"},\"exchangeRateCurrent()\":{\"notice\":\"Accrue interest then return the up-to-date exchange rate\"},\"exchangeRateStored()\":{\"notice\":\"Calculates the exchange rate from the underlying to the VToken\"},\"getAccountSnapshot(address)\":{\"notice\":\"Get a snapshot of the account's balances, and the cached exchange rate\"},\"getCash()\":{\"notice\":\"Get cash balance of this vToken in the underlying asset\"},\"initialize(address,address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the new money market\"},\"initialize(address,address,uint256,string,string,uint8)\":{\"notice\":\"Initialize the money market\"},\"liquidateBorrow(address,uint256,address)\":{\"notice\":\"The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator.\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives vTokens in exchange\"},\"mintBehalf(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receiver receives vTokens in exchange\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for the underlying asset\"},\"redeemBehalf(address,uint256)\":{\"notice\":\"Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"redeemUnderlying(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for a specified amount of underlying asset\"},\"redeemUnderlyingBehalf(address,uint256)\":{\"notice\":\"Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\"},\"repayBorrow(uint256)\":{\"notice\":\"Sender repays their own borrow\"},\"repayBorrowBehalf(address,uint256)\":{\"notice\":\"Sender repays a borrow belonging to another borrowing account\"},\"seize(address,address,uint256)\":{\"notice\":\"Transfers collateral tokens (this market) to the liquidator.\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of the access control manager of this contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"Sets protocol share reserve contract address\"},\"setReduceReservesBlockDelta(uint256)\":{\"notice\":\"Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\"},\"supplyRatePerBlock()\":{\"notice\":\"Returns the current per-block supply interest rate for this vToken\"},\"totalBorrowsCurrent()\":{\"notice\":\"Returns the current total borrows plus accrued interest\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"}},\"notice\":\"vTokens which wrap an EIP-20 underlying\"}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/VTokens/VBep20.sol\":\"VBep20\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.5.16;\\n\\n/**\\n * @title IAccessControlManagerV5\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\\n */\\ninterface IAccessControlManagerV5 {\\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 */\\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 /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleGranted} event.\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n /**\\n * @notice Verifies if the given account can call a praticular contract's function\\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\\n * @param account address (eoa or contract) for which call permissions will be checked\\n * @param functionSig signature e.g. \\\"functionName(uint,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\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\":\"0x3563db4c75f7aa0b8a982bab591907dda192438a2368511b62a9c587a3e54226\"},\"contracts/Comptroller/ComptrollerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport \\\"../Oracle/PriceOracle.sol\\\";\\nimport \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerTypes } from \\\"./ComptrollerStorage.sol\\\";\\n\\ncontract ComptrollerInterface {\\n /// @notice Indicator that this is a Comptroller contract (for inspection)\\n bool public constant isComptroller = true;\\n\\n /*** Assets You Are In ***/\\n\\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\\n\\n function exitMarket(address vToken) external returns (uint);\\n\\n /*** Policy Hooks ***/\\n\\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\\n\\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\\n\\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\\n\\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\\n\\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\\n\\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\\n\\n function repayBorrowAllowed(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function repayBorrowVerify(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount,\\n uint borrowerIndex\\n ) external;\\n\\n function liquidateBorrowAllowed(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function liquidateBorrowVerify(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n uint seizeTokens\\n ) external;\\n\\n function seizeAllowed(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external returns (uint);\\n\\n function seizeVerify(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external;\\n\\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\\n\\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\\n\\n /*** Liquidity/Liquidation Calculations ***/\\n\\n function liquidateCalculateSeizeTokens(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function getXVSAddress() public view returns (address);\\n\\n function markets(address) external view returns (bool, uint);\\n\\n function oracle() external view returns (PriceOracle);\\n\\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\\n\\n function getAssetsIn(address) external view returns (VToken[] memory);\\n\\n function claimVenus(address) external;\\n\\n function venusAccrued(address) external view returns (uint);\\n\\n function venusSupplySpeeds(address) external view returns (uint);\\n\\n function venusBorrowSpeeds(address) external view returns (uint);\\n\\n function getAllMarkets() external view returns (VToken[] memory);\\n\\n function venusSupplierIndex(address, address) external view returns (uint);\\n\\n function venusInitialIndex() external view returns (uint224);\\n\\n function venusBorrowerIndex(address, address) external view returns (uint);\\n\\n function venusBorrowState(address) external view returns (uint224, uint32);\\n\\n function venusSupplyState(address) external view returns (uint224, uint32);\\n\\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n function vaiController() external view returns (VAIControllerInterface);\\n\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n function protocolPaused() external view returns (bool);\\n\\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\\n\\n function mintedVAIs(address user) external view returns (uint);\\n\\n function vaiMintRate() external view returns (uint);\\n}\\n\\ninterface IVAIVault {\\n function updatePendingRewards() external;\\n}\\n\\ninterface IComptroller {\\n function liquidationIncentiveMantissa() external view returns (uint);\\n\\n /*** Treasury Data ***/\\n function treasuryAddress() external view returns (address);\\n\\n function treasuryPercent() external view returns (uint);\\n}\\n\",\"keccak256\":\"0x4f4965dd8614b455952a2ef186fd8a509affbc56078a4aa8702f46d4c8209793\"},\"contracts/Comptroller/ComptrollerLensInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ninterface ComptrollerLensInterface {\\n function liquidateCalculateSeizeTokens(\\n address comptroller,\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address comptroller,\\n address vTokenCollateral,\\n uint actualRepayAmount\\n ) external view returns (uint, uint);\\n\\n function getHypotheticalAccountLiquidity(\\n address comptroller,\\n address account,\\n VToken vTokenModify,\\n uint redeemTokens,\\n uint borrowAmount\\n ) external view returns (uint, uint, uint);\\n}\\n\",\"keccak256\":\"0xc824e034221740c1957891547c78a123b595017cf102629454a04d36637e9c4a\"},\"contracts/Comptroller/ComptrollerStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity ^0.5.16;\\n\\nimport { VToken } from \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport { PriceOracle } from \\\"../Oracle/PriceOracle.sol\\\";\\nimport { VAIControllerInterface } from \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { ComptrollerLensInterface } from \\\"./ComptrollerLensInterface.sol\\\";\\nimport { IPrime } from \\\"../Tokens/Prime/IPrime.sol\\\";\\n\\ninterface ComptrollerTypes {\\n enum Action {\\n MINT,\\n REDEEM,\\n BORROW,\\n REPAY,\\n SEIZE,\\n LIQUIDATE,\\n TRANSFER,\\n ENTER_MARKET,\\n EXIT_MARKET\\n }\\n}\\n\\ncontract UnitrollerAdminStorage {\\n /**\\n * @notice Administrator for this contract\\n */\\n address public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address public pendingAdmin;\\n\\n /**\\n * @notice Active brains of Unitroller\\n */\\n address public comptrollerImplementation;\\n\\n /**\\n * @notice Pending brains of Unitroller\\n */\\n address public pendingComptrollerImplementation;\\n}\\n\\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\\n /**\\n * @notice Oracle which gives the price of any given asset\\n */\\n PriceOracle public oracle;\\n\\n /**\\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\\n */\\n uint256 public closeFactorMantissa;\\n\\n /**\\n * @notice Multiplier representing the discount on collateral that a liquidator receives\\n */\\n uint256 public liquidationIncentiveMantissa;\\n\\n /**\\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\\n */\\n uint256 public maxAssets;\\n\\n /**\\n * @notice Per-account mapping of \\\"assets you are in\\\", capped by maxAssets\\n */\\n mapping(address => VToken[]) public accountAssets;\\n\\n struct Market {\\n /// @notice Whether or not this market is listed\\n bool isListed;\\n /**\\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\\n * For instance, 0.9 to allow borrowing 90% of collateral value.\\n * Must be between 0 and 1, and stored as a mantissa.\\n */\\n uint256 collateralFactorMantissa;\\n /// @notice Per-market mapping of \\\"accounts in this asset\\\"\\n mapping(address => bool) accountMembership;\\n /// @notice Whether or not this market receives XVS\\n bool isVenus;\\n }\\n\\n /**\\n * @notice Official mapping of vTokens -> Market metadata\\n * @dev Used e.g. to determine if a market is supported\\n */\\n mapping(address => Market) public markets;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n address public pauseGuardian;\\n\\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\\n bool private _mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool private _borrowGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal transferGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n bool internal seizeGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal mintGuardianPaused;\\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\\n mapping(address => bool) internal borrowGuardianPaused;\\n\\n struct VenusMarketState {\\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\\n uint224 index;\\n /// @notice The block number the index was last updated at\\n uint32 block;\\n }\\n\\n /// @notice A list of all markets\\n VToken[] public allMarkets;\\n\\n /// @notice The rate at which the flywheel distributes XVS, per block\\n uint256 internal venusRate;\\n\\n /// @notice The portion of venusRate that each market currently receives\\n mapping(address => uint256) internal venusSpeeds;\\n\\n /// @notice The Venus market supply state for each market\\n mapping(address => VenusMarketState) public venusSupplyState;\\n\\n /// @notice The Venus market borrow state for each market\\n mapping(address => VenusMarketState) public venusBorrowState;\\n\\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\\n\\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\\n\\n /// @notice The XVS accrued but not yet transferred to each user\\n mapping(address => uint256) public venusAccrued;\\n\\n /// @notice The Address of VAIController\\n VAIControllerInterface public vaiController;\\n\\n /// @notice The minted VAI amount to each user\\n mapping(address => uint256) public mintedVAIs;\\n\\n /// @notice VAI Mint Rate as a percentage\\n uint256 public vaiMintRate;\\n\\n /**\\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\\n */\\n bool public mintVAIGuardianPaused;\\n bool public repayVAIGuardianPaused;\\n\\n /**\\n * @notice Pause/Unpause whole protocol actions\\n */\\n bool public protocolPaused;\\n\\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\\n uint256 private venusVAIRate;\\n}\\n\\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\\n uint256 public venusVAIVaultRate;\\n\\n // address of VAI Vault\\n address public vaiVaultAddress;\\n\\n // start block of release to VAI Vault\\n uint256 public releaseStartBlock;\\n\\n // minimum release amount to VAI Vault\\n uint256 public minReleaseAmount;\\n}\\n\\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\\n address public borrowCapGuardian;\\n\\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\\n mapping(address => uint256) public borrowCaps;\\n}\\n\\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\\n /// @notice Treasury Guardian address\\n address public treasuryGuardian;\\n\\n /// @notice Treasury address\\n address public treasuryAddress;\\n\\n /// @notice Fee percent of accrued interest with decimal 18\\n uint256 public treasuryPercent;\\n}\\n\\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\\n mapping(address => uint256) private venusContributorSpeeds;\\n\\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\\n mapping(address => uint256) private lastContributorBlock;\\n}\\n\\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\\n address public liquidatorContract;\\n}\\n\\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\\n ComptrollerLensInterface public comptrollerLens;\\n}\\n\\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\\n mapping(address => uint256) public supplyCaps;\\n}\\n\\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\\n /// @notice AccessControlManager address\\n address internal accessControl;\\n\\n /// @notice True if a certain action is paused on a certain market\\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\\n}\\n\\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\\n mapping(address => uint256) public venusBorrowSpeeds;\\n\\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\\n mapping(address => uint256) public venusSupplySpeeds;\\n}\\n\\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\\n mapping(address => mapping(address => bool)) public approvedDelegates;\\n}\\n\\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\\n mapping(address => bool) public isForcedLiquidationEnabled;\\n}\\n\\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\\n }\\n\\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\\n // facet addresses\\n address[] internal _facetAddresses;\\n}\\n\\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\\n /// @notice Prime token address\\n IPrime public prime;\\n}\\n\\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\\n}\\n\\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\\n /// @notice The XVS token contract address\\n address internal xvs;\\n\\n /// @notice The XVS vToken contract address\\n address internal xvsVToken;\\n}\\n\",\"keccak256\":\"0x06608bb502e91c33fda8c0dd88cc79a49a078fab521bc27d10fc3a69c1da55f4\"},\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/Oracle/PriceOracle.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Tokens/VTokens/VToken.sol\\\";\\n\\ncontract PriceOracle {\\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\\n bool public constant isPriceOracle = true;\\n\\n /**\\n * @notice Get the underlying price of a vToken asset\\n * @param vToken The vToken to get the underlying price of\\n * @return The underlying asset price mantissa (scaled by 1e18).\\n * Zero means the price is unavailable.\\n */\\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x0f68d0e07decba8fb9a77df1659170f310b487cc0b650f53ca6aa55ed62b28de\"},\"contracts/Tokens/EIP20Interface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title BEP 20 Token Standard Interface\\n * https://eips.ethereum.org/EIPS/eip-20\\n */\\ninterface EIP20Interface {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return success whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return success whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x7e89ffa9c0d432c4db8bd5388ff68e33934dcdb1d038d74bbed3b2fdae3eb532\"},\"contracts/Tokens/EIP20NonStandardInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title EIP20NonStandardInterface\\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\ninterface EIP20NonStandardInterface {\\n /**\\n * @notice Get the total number of tokens in circulation\\n * @return The supply of tokens\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @notice Gets the balance of the specified address\\n * @param owner The address from which the balance will be retrieved\\n * @return balance of the owner\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transfer(address dst, uint256 amount) external;\\n\\n ///\\n /// !!!!!!!!!!!!!!\\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\\n /// !!!!!!!!!!!!!!\\n ///\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n */\\n function transferFrom(address src, address dst, uint256 amount) external;\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved\\n * @return success Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external returns (bool success);\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return remaining The number of tokens allowed to be spent\\n */\\n function allowance(address owner, address spender) external view returns (uint256 remaining);\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n}\\n\",\"keccak256\":\"0x05a3a7d5ab47de3964c95d706dcc18fe7583b1d064dbb74808c0f2774f347afa\"},\"contracts/Tokens/Prime/IPrime.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.5.16;\\npragma experimental ABIEncoderV2;\\n\\n/**\\n * @title IPrime\\n * @author Venus\\n * @notice Interface for Prime Token\\n */\\ninterface IPrime {\\n /**\\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\\n * @param user the account address whose balance was updated\\n */\\n function xvsUpdated(address user) external;\\n\\n /**\\n * @notice accrues interest and updates score for an user for a specific market\\n * @param user the account address for which to accrue interest and update score\\n * @param market the market for which to accrue interest and update score\\n */\\n function accrueInterestAndUpdateScore(address user, address market) external;\\n\\n /**\\n * @notice Distributes income from market since last distribution\\n * @param vToken the market for which to distribute the income\\n */\\n function accrueInterest(address vToken) external;\\n\\n /**\\n * @notice Returns if user is a prime holder\\n * @param isPrimeHolder returns if the user is a prime holder\\n */\\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\\n}\\n\",\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\"},\"contracts/Tokens/VAI/VAIControllerInterface.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../VTokens/VTokenInterfaces.sol\\\";\\n\\ncontract VAIControllerInterface {\\n function getVAIAddress() public view returns (address);\\n\\n function getMintableVAI(address minter) public view returns (uint, uint);\\n\\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\\n\\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\\n\\n function liquidateVAI(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint, uint);\\n\\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\\n\\n function updateVenusVAIMintIndex() external returns (uint);\\n\\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\\n\\n function getVAIRepayAmount(address account) public view returns (uint);\\n}\\n\",\"keccak256\":\"0x17eb6edb1262c4effcad86f614ff20d00256278485054b11aa5cf011ff6f8a86\"},\"contracts/Tokens/VTokens/VBep20.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \\\"./VToken.sol\\\";\\nimport { EIP20Interface } from \\\"../EIP20Interface.sol\\\";\\nimport { EIP20NonStandardInterface } from \\\"../EIP20NonStandardInterface.sol\\\";\\n\\n/**\\n * @title Venus's VBep20 Contract\\n * @notice vTokens which wrap an EIP-20 underlying\\n * @author Venus\\n */\\ncontract VBep20 is VToken, VBep20Interface {\\n /*** User Interface ***/\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits Mint event\\n function mint(uint mintAmount) external returns (uint) {\\n (uint err, ) = mintInternal(mintAmount);\\n return err;\\n }\\n\\n function updateUnderlying(address newUnderlying) external {\\n underlying = newUnderlying;\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n // @custom:event Emits MintBehalf event\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for the underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeem(uint redeemTokens) external returns (uint) {\\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The user on behalf of whom to redeem\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemInternal(redeemer, msg.sender, redeemTokens);\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemAmount The amount of underlying to redeem\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer, on behalf of whom to redeem\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Redeem event on success\\n // @custom:event Emits Transfer event on success\\n // @custom:event Emits RedeemFee when fee is charged by the treasury\\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(redeemer, msg.sender), \\\"not an approved delegate\\\");\\n\\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets from the protocol to their own address\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrow(uint borrowAmount) external returns (uint) {\\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender borrows assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\\n * @param borrower The borrower, on behalf of whom to borrow.\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Borrow event on success\\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\\n require(comptroller.approvedDelegates(borrower, msg.sender), \\\"not an approved delegate\\\");\\n return borrowInternal(borrower, msg.sender, borrowAmount);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrow(uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowInternal(repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits RepayBorrow event on success\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\\n return err;\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emit LiquidateBorrow event on success\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint) {\\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\\n return err;\\n }\\n\\n /**\\n * @notice The sender adds to reserves.\\n * @param addAmount The amount of underlying tokens to add as reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesAdded event\\n function _addReserves(uint addAmount) external returns (uint) {\\n return _addReservesInternal(addAmount);\\n }\\n\\n /**\\n * @notice Initialize the new money market\\n * @param underlying_ The address of the underlying asset\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ BEP-20 name of this token\\n * @param symbol_ BEP-20 symbol of this token\\n * @param decimals_ BEP-20 decimal precision of this token\\n */\\n function initialize(\\n address underlying_,\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n // VToken initialize does the bulk of the work\\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\\n\\n // Set underlying and sanity check it\\n underlying = underlying_;\\n EIP20Interface(underlying).totalSupply();\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\\n * This will revert due to insufficient balance or insufficient allowance.\\n * This function returns the actual amount received,\\n * which may be less than `amount` if there is a fee attached to the transfer.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint) {\\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_IN_FAILED\\\");\\n\\n // Calculate the amount that was *actually* transferred\\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\\n require(balanceAfter >= balanceBefore, \\\"TOKEN_TRANSFER_IN_OVERFLOW\\\");\\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\\n }\\n\\n /**\\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\\n * it is >= amount, this should not revert in normal conditions.\\n *\\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\\n */\\n function doTransferOut(address payable to, uint amount) internal {\\n EIP20NonStandardInterface(underlying).transfer(to, amount);\\n\\n bool success;\\n assembly {\\n switch returndatasize()\\n case 0 {\\n // This is a non-standard BEP-20\\n success := not(0) // set success to true\\n }\\n case 32 {\\n // This is a compliant BEP-20\\n returndatacopy(0, 0, 32)\\n success := mload(0) // Set `success = returndata` of external call\\n }\\n default {\\n // This is an excessively non-compliant BEP-20, revert.\\n revert(0, 0)\\n }\\n }\\n require(success, \\\"TOKEN_TRANSFER_OUT_FAILED\\\");\\n }\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying tokens owned by this contract\\n */\\n function getCashPrior() internal view returns (uint) {\\n return EIP20Interface(underlying).balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0xee76f8967821a4c33d825d20943f0a3421d09a029bc271a8b5495a81c83353a0\"},\"contracts/Tokens/VTokens/VToken.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../Utils/ErrorReporter.sol\\\";\\nimport \\\"../../Utils/Exponential.sol\\\";\\nimport \\\"../../Tokens/EIP20Interface.sol\\\";\\nimport \\\"../../Tokens/EIP20NonStandardInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\nimport \\\"./VTokenInterfaces.sol\\\";\\nimport { IAccessControlManagerV5 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\\\";\\n\\n/**\\n * @title Venus's vToken Contract\\n * @notice Abstract base for vTokens\\n * @author Venus\\n */\\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\\n struct MintLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint mintTokens;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n uint actualMintAmount;\\n }\\n\\n struct RedeemLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint redeemTokens;\\n uint redeemAmount;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n }\\n\\n struct BorrowLocalVars {\\n MathError mathErr;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n }\\n\\n struct RepayBorrowLocalVars {\\n Error err;\\n MathError mathErr;\\n uint repayAmount;\\n uint borrowerIndex;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n uint actualRepayAmount;\\n }\\n\\n /*** Reentrancy Guard ***/\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n */\\n modifier nonReentrant() {\\n require(_notEntered, \\\"re-entered\\\");\\n _notEntered = false;\\n _;\\n _notEntered = true; // get a gas-refund post-Istanbul\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (-1 means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n // @custom:event Emits Approval event on successful approve\\n function approve(address spender, uint256 amount) external returns (bool) {\\n transferAllowances[msg.sender][spender] = amount;\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external returns (uint) {\\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\\n ensureNoMathError(mErr);\\n return balance;\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return totalBorrows;\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return borrowBalanceStored(account);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\\n }\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\\n // Check caller = admin\\n ensureAdmin(msg.sender);\\n\\n // Save current value, if any, for inclusion in log\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store pendingAdmin with value newPendingAdmin\\n pendingAdmin = newPendingAdmin;\\n\\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewAdmin event on successful acceptance\\n // @custom:event Emits NewPendingAdmin event with null new pending admin\\n function _acceptAdmin() external returns (uint) {\\n // Check caller is pendingAdmin\\n if (msg.sender != pendingAdmin) {\\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\\n }\\n\\n // Save current values for inclusion in log\\n address oldAdmin = admin;\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store admin with value pendingAdmin\\n admin = pendingAdmin;\\n\\n // Clear the pending value\\n pendingAdmin = address(0);\\n\\n emit NewAdmin(oldAdmin, admin);\\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\\n * @dev Governor function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewReserveFactor event\\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_setReserveFactor(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\\n }\\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\\n return _setReserveFactorFresh(newReserveFactorMantissa_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract\\n * @dev Admin function to set the access control address\\n * @param newAccessControlManagerAddress New address for the access control\\n * @return uint 0=success, otherwise will revert\\n */\\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ensureNonZeroAddress(newAccessControlManagerAddress);\\n\\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\\n accessControlManager = newAccessControlManagerAddress;\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\\n * @param reduceAmount_ Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesReduced event\\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\\n ensureAllowed(\\\"_reduceReserves(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // If reserves were reduced in accrueInterest\\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\\n return _reduceReservesFresh(reduceAmount_);\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (-1 means infinite)\\n */\\n function allowance(address owner, address spender) external view returns (uint256) {\\n return transferAllowances[owner][spender];\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view returns (uint256) {\\n return accountTokens[owner];\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\\n uint vTokenBalance = accountTokens[account];\\n uint borrowBalance;\\n uint exchangeRateMantissa;\\n\\n MathError mErr;\\n\\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view returns (uint) {\\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view returns (uint) {\\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view returns (uint) {\\n return getCashPrior();\\n }\\n\\n /**\\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\\n * @param newReduceReservesBlockDelta_ block difference value\\n */\\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\\n require(newReduceReservesBlockDelta_ > 0, \\\"Invalid Input\\\");\\n ensureAllowed(\\\"setReduceReservesBlockDelta(uint256)\\\");\\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\\n }\\n\\n /**\\n * @notice Sets protocol share reserve contract address\\n * @param protcolShareReserve_ The address of protocol share reserve contract\\n */\\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n ensureNonZeroAddress(protcolShareReserve_);\\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\\n protocolShareReserve = protcolShareReserve_;\\n }\\n\\n /**\\n * @notice Initialize the money market\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ EIP-20 name of this token\\n * @param symbol_ EIP-20 symbol of this token\\n * @param decimals_ EIP-20 decimal precision of this token\\n */\\n function initialize(\\n ComptrollerInterface comptroller_,\\n InterestRateModel interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n ensureAdmin(msg.sender);\\n require(accrualBlockNumber == 0 && borrowIndex == 0, \\\"market may only be initialized once\\\");\\n\\n // Set initial exchange rate\\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\\n require(initialExchangeRateMantissa > 0, \\\"initial exchange rate must be greater than zero.\\\");\\n\\n // Set the comptroller\\n uint err = _setComptroller(comptroller_);\\n require(err == uint(Error.NO_ERROR), \\\"setting comptroller failed\\\");\\n\\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\\n accrualBlockNumber = block.number;\\n borrowIndex = mantissaOne;\\n\\n // Set the interest rate model (depends on block number / borrow index)\\n err = _setInterestRateModelFresh(interestRateModel_);\\n require(err == uint(Error.NO_ERROR), \\\"setting interest rate model failed\\\");\\n\\n name = name_;\\n symbol = symbol_;\\n decimals = decimals_;\\n\\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\\n _notEntered = true;\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return exchangeRateStored();\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage and\\n * reduce spread reserves to protocol share reserve\\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\\n */\\n // @custom:event Emits AccrueInterest event\\n function accrueInterest() public returns (uint) {\\n /* Remember the initial block number */\\n uint currentBlockNumber = block.number;\\n uint accrualBlockNumberPrior = accrualBlockNumber;\\n\\n /* Short-circuit accumulating 0 interest */\\n if (accrualBlockNumberPrior == currentBlockNumber) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n /* Read the previous values out of storage */\\n uint cashPrior = getCashPrior();\\n uint borrowsPrior = totalBorrows;\\n uint reservesPrior = totalReserves;\\n uint borrowIndexPrior = borrowIndex;\\n\\n /* Calculate the current borrow interest rate */\\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\\n require(borrowRateMantissa <= borrowRateMaxMantissa, \\\"borrow rate is absurdly high\\\");\\n\\n /* Calculate the number of blocks elapsed since the last accrual */\\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\\n ensureNoMathError(mathErr);\\n\\n /*\\n * Calculate the interest accumulated into borrows and reserves and the new index:\\n * simpleInterestFactor = borrowRate * blockDelta\\n * interestAccumulated = simpleInterestFactor * totalBorrows\\n * totalBorrowsNew = interestAccumulated + totalBorrows\\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\\n */\\n\\n Exp memory simpleInterestFactor;\\n uint interestAccumulated;\\n uint totalBorrowsNew;\\n uint totalReservesNew;\\n uint borrowIndexNew;\\n\\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\\n Exp({ mantissa: reserveFactorMantissa }),\\n interestAccumulated,\\n reservesPrior\\n );\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accrualBlockNumber = currentBlockNumber;\\n borrowIndex = borrowIndexNew;\\n totalBorrows = totalBorrowsNew;\\n totalReserves = totalReservesNew;\\n\\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\\n ensureNoMathError(mathErr);\\n if (blockDelta >= reduceReservesBlockDelta) {\\n reduceReservesBlockNumber = currentBlockNumber;\\n if (cashPrior < totalReservesNew) {\\n _reduceReservesFresh(cashPrior);\\n } else {\\n _reduceReservesFresh(totalReservesNew);\\n }\\n }\\n\\n /* We emit an AccrueInterest event */\\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewComptroller event\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ComptrollerInterface oldComptroller = comptroller;\\n // Ensure invoke comptroller.isComptroller() returns true\\n require(newComptroller.isComptroller(), \\\"marker method returned false\\\");\\n\\n // Set market's comptroller to newComptroller\\n comptroller = newComptroller;\\n\\n // Emit NewComptroller(oldComptroller, newComptroller)\\n emit NewComptroller(oldComptroller, newComptroller);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\\n * @dev Governance function to accrue interest and update the interest rate model\\n * @param newInterestRateModel_ The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\\n ensureAllowed(\\\"_setInterestRateModel(address)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\\n }\\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\\n return _setInterestRateModelFresh(newInterestRateModel_);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view returns (uint) {\\n (MathError err, uint result) = exchangeRateStoredInternal();\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view returns (uint) {\\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\\n * @dev Called by both `transfer` and `transferFrom` internally\\n * @param spender The address of the account performing the transfer\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param tokens The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\\n /* Fail if transfer not allowed */\\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Do not allow self-transfers */\\n if (src == dst) {\\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n /* Get the allowance, infinite for the account owner */\\n uint startingAllowance = 0;\\n if (spender == src) {\\n startingAllowance = uint(-1);\\n } else {\\n startingAllowance = transferAllowances[src][spender];\\n }\\n\\n /* Do the calculations, checking for {under,over}flow */\\n MathError mathErr;\\n uint allowanceNew;\\n uint srvTokensNew;\\n uint dstTokensNew;\\n\\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\\n }\\n\\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n accountTokens[src] = srvTokensNew;\\n accountTokens[dst] = dstTokensNew;\\n\\n /* Eat some of the allowance (if necessary) */\\n if (startingAllowance != uint(-1)) {\\n transferAllowances[src][spender] = allowanceNew;\\n }\\n\\n /* We emit a Transfer event */\\n emit Transfer(src, dst, tokens);\\n\\n comptroller.transferVerify(address(this), src, dst, tokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintFresh(msg.sender, mintAmount);\\n }\\n\\n /**\\n * @notice User supplies assets into the market and receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param minter The address of the account which is supplying the assets\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the minter and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[minter] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[minter] = vars.accountTokensNew;\\n\\n /* We emit a Mint event, and a Transfer event */\\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), minter, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The address of the account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\\n }\\n\\n /**\\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param payer The address of the account which is paying the underlying token\\n * @param receiver The address of the account which is receiving vToken\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\\n ensureNonZeroAddress(receiver);\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the payer and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[receiver] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[receiver] = vars.accountTokensNew;\\n\\n /* We emit a MintBehalf event, and a Transfer event */\\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), receiver, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokens\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens, if called by a delegate\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlyingInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // solhint-disable-next-line code-complexity\\n function redeemFresh(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokensIn,\\n uint redeemAmountIn\\n ) internal returns (uint) {\\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \\\"one of redeemTokensIn or redeemAmountIn must be zero\\\");\\n\\n RedeemLocalVars memory vars;\\n\\n /* exchangeRate = invoke Exchange Rate Stored() */\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n ensureNoMathError(vars.mathErr);\\n\\n /* If redeemTokensIn > 0: */\\n if (redeemTokensIn > 0) {\\n /*\\n * We calculate the exchange rate and the amount of underlying to be redeemed:\\n * redeemTokens = redeemTokensIn\\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\\n */\\n vars.redeemTokens = redeemTokensIn;\\n\\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\\n Exp({ mantissa: vars.exchangeRateMantissa }),\\n redeemTokensIn\\n );\\n ensureNoMathError(vars.mathErr);\\n } else {\\n /*\\n * We get the current exchange rate and calculate the amount to be redeemed:\\n * redeemTokens = redeemAmountIn / exchangeRate\\n * redeemAmount = redeemAmountIn\\n */\\n\\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\\n redeemAmountIn,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n vars.redeemAmount = redeemAmountIn;\\n }\\n\\n /* Fail if redeem not allowed */\\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /*\\n * We calculate the new total supply and redeemer balance, checking for underflow:\\n * totalSupplyNew = totalSupply - redeemTokens\\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* Fail gracefully if protocol has insufficient cash */\\n if (getCashPrior() < vars.redeemAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[redeemer] = vars.accountTokensNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the redeemAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken has redeemAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n\\n uint feeAmount;\\n uint remainedAmount;\\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\\n (vars.mathErr, feeAmount) = mulUInt(\\n vars.redeemAmount,\\n IComptroller(address(comptroller)).treasuryPercent()\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\\n\\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\\n } else {\\n remainedAmount = vars.redeemAmount;\\n }\\n\\n doTransferOut(receiver, remainedAmount);\\n\\n /* We emit a Transfer event, and a Redeem event */\\n emit Transfer(redeemer, address(this), vars.redeemTokens);\\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrowInternal(\\n address borrower,\\n address payable receiver,\\n uint borrowAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\\n }\\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\\n return borrowFresh(borrower, receiver, borrowAmount);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @dev Before calling this function, ensure that the interest has been accrued\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\\n */\\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\\n /* Revert if borrow not allowed */\\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Revert if protocol has insufficient underlying cash */\\n if (getCashPrior() < borrowAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n BorrowLocalVars memory vars;\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on overflow:\\n * accountBorrowsNew = accountBorrows + borrowAmount\\n * totalBorrowsNew = totalBorrows + borrowAmount\\n */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the borrowAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken borrowAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n doTransferOut(receiver, borrowAmount);\\n\\n /* We emit a Borrow event */\\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\\n }\\n\\n /**\\n * @notice Borrows are repaid by another user (possibly the borrower).\\n * @param payer The account paying off the borrow\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount of undelrying tokens being returned\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\\n /* Fail if repayBorrow not allowed */\\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\\n if (allowed != 0) {\\n return (\\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\\n 0\\n );\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\\n }\\n\\n RepayBorrowLocalVars memory vars;\\n\\n /* We remember the original borrowerIndex for verification purposes */\\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\\n\\n /* We fetch the amount the borrower owes, with accumulated interest */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n uint(vars.mathErr)\\n ),\\n 0\\n );\\n }\\n\\n /* If repayAmount == -1, repayAmount = accountBorrows */\\n if (repayAmount == uint(-1)) {\\n vars.repayAmount = vars.accountBorrows;\\n } else {\\n vars.repayAmount = repayAmount;\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the payer and the repayAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional repayAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on underflow:\\n * accountBorrowsNew = accountBorrows - actualRepayAmount\\n * totalBorrowsNew = totalBorrows - actualRepayAmount\\n */\\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /* We emit a RepayBorrow event */\\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\\n\\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function liquidateBorrowInternal(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\\n }\\n\\n error = vTokenCollateral.accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\\n }\\n\\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\\n }\\n\\n /**\\n * @notice The liquidator liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param liquidator The address repaying the borrow and seizing collateral\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n // solhint-disable-next-line code-complexity\\n function liquidateBorrowFresh(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal returns (uint, uint) {\\n /* Fail if liquidate not allowed */\\n uint allowed = comptroller.liquidateBorrowAllowed(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n repayAmount\\n );\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Verify vTokenCollateral market's block number equals current block number */\\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\\n }\\n\\n /* Fail if repayAmount = 0 */\\n if (repayAmount == 0) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\\n }\\n\\n /* Fail if repayAmount = -1 */\\n if (repayAmount == uint(-1)) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\\n }\\n\\n /* Fail if repayBorrow fails */\\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\\n if (repayBorrowError != uint(Error.NO_ERROR)) {\\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We calculate the number of collateral tokens that will be seized */\\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\\n address(this),\\n address(vTokenCollateral),\\n actualRepayAmount\\n );\\n require(amountSeizeError == uint(Error.NO_ERROR), \\\"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\\\");\\n\\n /* Revert if borrower collateral token balance < seizeTokens */\\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \\\"LIQUIDATE_SEIZE_TOO_MUCH\\\");\\n\\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\\n uint seizeError;\\n if (address(vTokenCollateral) == address(this)) {\\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\\n } else {\\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\\n }\\n\\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\\n require(seizeError == uint(Error.NO_ERROR), \\\"token seizure failed\\\");\\n\\n /* We emit a LiquidateBorrow event */\\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.liquidateBorrowVerify(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n actualRepayAmount,\\n seizeTokens\\n );\\n\\n return (uint(Error.NO_ERROR), actualRepayAmount);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seizeInternal(\\n address seizerToken,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) internal returns (uint) {\\n /* Fail if seize not allowed */\\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\\n }\\n\\n MathError mathErr;\\n uint borrowerTokensNew;\\n uint liquidatorTokensNew;\\n\\n /*\\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\\n */\\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\\n }\\n\\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountTokens[borrower] = borrowerTokensNew;\\n accountTokens[liquidator] = liquidatorTokensNew;\\n\\n /* Emit a Transfer event */\\n emit Transfer(borrower, liquidator, seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\\n * @dev Governance function to set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\\n // Verify market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\\n }\\n\\n // Check newReserveFactor \\u2264 maxReserveFactor\\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\\n }\\n\\n uint oldReserveFactorMantissa = reserveFactorMantissa;\\n reserveFactorMantissa = newReserveFactorMantissa;\\n\\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\\n * @param addAmount Amount of addition to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\\n (error, ) = _addReservesFresh(addAmount);\\n return error;\\n }\\n\\n /**\\n * @notice Add reserves by transferring from caller\\n * @dev Requires fresh interest accrual\\n * @param addAmount Amount of addition to reserves\\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\\n */\\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\\n // totalReserves + actualAddAmount\\n uint totalReservesNew;\\n uint actualAddAmount;\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the caller and the addAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional addAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n\\n actualAddAmount = doTransferIn(msg.sender, addAmount);\\n\\n totalReservesNew = totalReserves + actualAddAmount;\\n\\n /* Revert on overflow */\\n require(totalReservesNew >= totalReserves, \\\"add reserves unexpected overflow\\\");\\n\\n // Store reserves[n+1] = reserves[n] + actualAddAmount\\n totalReserves = totalReservesNew;\\n\\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\\n\\n /* Return (NO_ERROR, actualAddAmount) */\\n return (uint(Error.NO_ERROR), actualAddAmount);\\n }\\n\\n /**\\n * @notice Reduces reserves by transferring to protocol share reserve contract\\n * @dev Requires fresh interest accrual\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\\n if (reduceAmount == 0) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\\n }\\n\\n // Fail gracefully if protocol has insufficient underlying cash\\n if (getCashPrior() < reduceAmount) {\\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\\n }\\n\\n // Check reduceAmount \\u2264 reserves[n] (totalReserves)\\n if (reduceAmount > totalReserves) {\\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n // totalReserves - reduceAmount\\n uint totalReservesNew = totalReserves - reduceAmount;\\n\\n // Store reserves[n+1] = reserves[n] - reduceAmount\\n totalReserves = totalReservesNew;\\n\\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n doTransferOut(protocolShareReserve, reduceAmount);\\n\\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\\n address(comptroller),\\n underlying,\\n IProtocolShareReserveV5.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice updates the interest rate model (requires fresh interest accrual)\\n * @dev Governance function to update the interest rate model\\n * @param newInterestRateModel the new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\\n // Used to store old model for use in the event that is emitted on success\\n InterestRateModel oldInterestRateModel;\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\\n }\\n\\n // Track the market's current interest rate model\\n oldInterestRateModel = interestRateModel;\\n\\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\\n require(newInterestRateModel.isInterestRateModel(), \\\"marker method returned false\\\");\\n\\n // Set the interest rate model to newInterestRateModel\\n interestRateModel = newInterestRateModel;\\n\\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\\n * This may revert due to insufficient balance or insufficient allowance.\\n */\\n function doTransferIn(address from, uint amount) internal returns (uint);\\n\\n /**\\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\\n */\\n function doTransferOut(address payable to, uint amount) internal;\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\\n */\\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\\n /* Note: we do not assert that the market is up to date */\\n MathError mathErr;\\n uint principalTimesIndex;\\n uint result;\\n\\n /* Get borrowBalance and borrowIndex */\\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\\n\\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\\n */\\n if (borrowSnapshot.principal == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n /* Calculate new borrow balance using the interest index:\\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\\n */\\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, result);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the vToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\\n uint _totalSupply = totalSupply;\\n if (_totalSupply == 0) {\\n /*\\n * If there are no tokens minted:\\n * exchangeRate = initialExchangeRate\\n */\\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\\n } else {\\n /*\\n * Otherwise:\\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\\n */\\n uint totalCash = getCashPrior();\\n uint cashPlusBorrowsMinusReserves;\\n Exp memory exchangeRate;\\n MathError mathErr;\\n\\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, exchangeRate.mantissa);\\n }\\n }\\n\\n function ensureAllowed(string memory functionSig) private view {\\n require(\\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\\n \\\"access denied\\\"\\n );\\n }\\n\\n function ensureAdmin(address caller_) private view {\\n require(caller_ == admin, \\\"Unauthorized\\\");\\n }\\n\\n function ensureNoMathError(MathError mErr) private pure {\\n require(mErr == MathError.NO_ERROR, \\\"math error\\\");\\n }\\n\\n function ensureNonZeroAddress(address address_) private pure {\\n require(address_ != address(0), \\\"zero address\\\");\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying owned by this contract\\n */\\n function getCashPrior() internal view returns (uint);\\n}\\n\",\"keccak256\":\"0xfdbcdbd6cab4aeba2c06f39adbfbd8e42a3e50d02aed628c2d76b97659d84b68\"},\"contracts/Tokens/VTokens/VTokenInterfaces.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport \\\"../../InterestRateModels/InterestRateModel.sol\\\";\\n\\ninterface IProtocolShareReserveV5 {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\\n}\\n\\ncontract VTokenStorageBase {\\n /**\\n * @notice Container for borrow balance information\\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\\n */\\n struct BorrowSnapshot {\\n uint principal;\\n uint interestIndex;\\n }\\n\\n /**\\n * @dev Guard variable for re-entrancy checks\\n */\\n bool internal _notEntered;\\n\\n /**\\n * @notice EIP-20 token name for this token\\n */\\n string public name;\\n\\n /**\\n * @notice EIP-20 token symbol for this token\\n */\\n string public symbol;\\n\\n /**\\n * @notice EIP-20 token decimals for this token\\n */\\n uint8 public decimals;\\n\\n /**\\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\\n */\\n\\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\\n\\n /**\\n * @notice Maximum fraction of interest that can be set aside for reserves\\n */\\n uint internal constant reserveFactorMaxMantissa = 1e18;\\n\\n /**\\n * @notice Administrator for this contract\\n */\\n address payable public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address payable public pendingAdmin;\\n\\n /**\\n * @notice Contract which oversees inter-vToken operations\\n */\\n ComptrollerInterface public comptroller;\\n\\n /**\\n * @notice Model which tells what the current interest rate should be\\n */\\n InterestRateModel public interestRateModel;\\n\\n /**\\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\\n */\\n uint internal initialExchangeRateMantissa;\\n\\n /**\\n * @notice Fraction of interest currently set aside for reserves\\n */\\n uint public reserveFactorMantissa;\\n\\n /**\\n * @notice Block number that interest was last accrued at\\n */\\n uint public accrualBlockNumber;\\n\\n /**\\n * @notice Accumulator of the total earned interest rate since the opening of the market\\n */\\n uint public borrowIndex;\\n\\n /**\\n * @notice Total amount of outstanding borrows of the underlying in this market\\n */\\n uint public totalBorrows;\\n\\n /**\\n * @notice Total amount of reserves of the underlying held in this market\\n */\\n uint public totalReserves;\\n\\n /**\\n * @notice Total number of tokens in circulation\\n */\\n uint public totalSupply;\\n\\n /**\\n * @notice Official record of token balances for each account\\n */\\n mapping(address => uint) internal accountTokens;\\n\\n /**\\n * @notice Approved token transfer amounts on behalf of others\\n */\\n mapping(address => mapping(address => uint)) internal transferAllowances;\\n\\n /**\\n * @notice Mapping of account addresses to outstanding borrow balances\\n */\\n mapping(address => BorrowSnapshot) internal accountBorrows;\\n\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n address public underlying;\\n\\n /**\\n * @notice Implementation address for this contract\\n */\\n address public implementation;\\n\\n /**\\n * @notice delta block after which reserves will be reduced\\n */\\n uint public reduceReservesBlockDelta;\\n\\n /**\\n * @notice last block number at which reserves were reduced\\n */\\n uint public reduceReservesBlockNumber;\\n\\n /**\\n * @notice address of protocol share reserve contract\\n */\\n address payable public protocolShareReserve;\\n\\n /**\\n * @notice address of accessControlManager\\n */\\n\\n address public accessControlManager;\\n}\\n\\ncontract VTokenStorage is VTokenStorageBase {\\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\\ncontract VTokenInterface is VTokenStorage {\\n /**\\n * @notice Indicator that this is a vToken contract (for inspection)\\n */\\n bool public constant isVToken = true;\\n\\n /*** Market Events ***/\\n\\n /**\\n * @notice Event emitted when interest is accrued\\n */\\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when tokens are minted\\n */\\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are minted behalf by payer to receiver\\n */\\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed\\n */\\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed and fee is transferred\\n */\\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\\n\\n /**\\n * @notice Event emitted when underlying is borrowed\\n */\\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is repaid\\n */\\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is liquidated\\n */\\n event LiquidateBorrow(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n address vTokenCollateral,\\n uint seizeTokens\\n );\\n\\n /*** Admin Events ***/\\n\\n /**\\n * @notice Event emitted when pendingAdmin is changed\\n */\\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\\n\\n /**\\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\\n */\\n event NewAdmin(address oldAdmin, address newAdmin);\\n\\n /**\\n * @notice Event emitted when comptroller is changed\\n */\\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\\n\\n /**\\n * @notice Event emitted when interestRateModel is changed\\n */\\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\\n\\n /**\\n * @notice Event emitted when the reserve factor is changed\\n */\\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\\n\\n /**\\n * @notice Event emitted when the reserves are added\\n */\\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\\n\\n /**\\n * @notice Event emitted when the reserves are reduced\\n */\\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\\n\\n /**\\n * @notice EIP20 Transfer event\\n */\\n event Transfer(address indexed from, address indexed to, uint amount);\\n\\n /**\\n * @notice EIP20 Approval event\\n */\\n event Approval(address indexed owner, address indexed spender, uint amount);\\n\\n /**\\n * @notice Event emitted when block delta for reduce reserves get updated\\n */\\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\\n\\n /**\\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\\n */\\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\\n\\n /**\\n * @notice Failure event\\n */\\n event Failure(uint error, uint info, uint detail);\\n\\n /// @notice Emitted when access control address is changed by admin\\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\\n\\n /*** User Interface ***/\\n\\n function transfer(address dst, uint amount) external returns (bool);\\n\\n function transferFrom(address src, address dst, uint amount) external returns (bool);\\n\\n function approve(address spender, uint amount) external returns (bool);\\n\\n function balanceOfUnderlying(address owner) external returns (uint);\\n\\n function totalBorrowsCurrent() external returns (uint);\\n\\n function borrowBalanceCurrent(address account) external returns (uint);\\n\\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _acceptAdmin() external returns (uint);\\n\\n /*** Admin Function ***/\\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\\n\\n /*** Admin Function ***/\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function balanceOf(address owner) external view returns (uint);\\n\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\\n\\n function borrowRatePerBlock() external view returns (uint);\\n\\n function supplyRatePerBlock() external view returns (uint);\\n\\n function getCash() external view returns (uint);\\n\\n function exchangeRateCurrent() public returns (uint);\\n\\n function accrueInterest() public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\\n\\n /*** Admin Function ***/\\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\\n\\n function borrowBalanceStored(address account) public view returns (uint);\\n\\n function exchangeRateStored() public view returns (uint);\\n}\\n\\ncontract VBep20Interface {\\n /*** User Interface ***/\\n\\n function mint(uint mintAmount) external returns (uint);\\n\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n function redeem(uint redeemTokens) external returns (uint);\\n\\n function redeemUnderlying(uint redeemAmount) external returns (uint);\\n\\n function borrow(uint borrowAmount) external returns (uint);\\n\\n function repayBorrow(uint repayAmount) external returns (uint);\\n\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\\n\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint);\\n\\n /*** Admin Functions ***/\\n\\n function _addReserves(uint addAmount) external returns (uint);\\n}\\n\\ncontract VDelegatorInterface {\\n /**\\n * @notice Emitted when implementation is changed\\n */\\n event NewImplementation(address oldImplementation, address newImplementation);\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public;\\n}\\n\\ncontract VDelegateInterface {\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @dev Should revert if any issues arise which make it unfit for delegation\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) public;\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() public;\\n}\\n\",\"keccak256\":\"0x2f12533847458414b423cc85677489709d772bec4e48933ae983d6861202a41b\"},\"contracts/Utils/CarefulMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Careful Math\\n * @author Venus\\n * @notice Derived from OpenZeppelin's SafeMath library\\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\\n */\\ncontract CarefulMath {\\n /**\\n * @dev Possible error codes that we can return\\n */\\n enum MathError {\\n NO_ERROR,\\n DIVISION_BY_ZERO,\\n INTEGER_OVERFLOW,\\n INTEGER_UNDERFLOW\\n }\\n\\n /**\\n * @dev Multiplies two numbers, returns an error on overflow.\\n */\\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (a == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n uint c = a * b;\\n\\n if (c / a != b) {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n } else {\\n return (MathError.NO_ERROR, c);\\n }\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b == 0) {\\n return (MathError.DIVISION_BY_ZERO, 0);\\n }\\n\\n return (MathError.NO_ERROR, a / b);\\n }\\n\\n /**\\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b <= a) {\\n return (MathError.NO_ERROR, a - b);\\n } else {\\n return (MathError.INTEGER_UNDERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev Adds two numbers, returns an error on overflow.\\n */\\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n uint c = a + b;\\n\\n if (c >= a) {\\n return (MathError.NO_ERROR, c);\\n } else {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev add a and b and then subtract c\\n */\\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\\n (MathError err0, uint sum) = addUInt(a, b);\\n\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, 0);\\n }\\n\\n return subUInt(sum, c);\\n }\\n}\\n\",\"keccak256\":\"0x5bd84fb723641b98d0559272323b90ce42595f025af89cfb214d8c064c9ee3c3\"},\"contracts/Utils/ErrorReporter.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\ncontract ComptrollerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n COMPTROLLER_MISMATCH,\\n INSUFFICIENT_SHORTFALL,\\n INSUFFICIENT_LIQUIDITY,\\n INVALID_CLOSE_FACTOR,\\n INVALID_COLLATERAL_FACTOR,\\n INVALID_LIQUIDATION_INCENTIVE,\\n MARKET_NOT_ENTERED, // no longer possible\\n MARKET_NOT_LISTED,\\n MARKET_ALREADY_LISTED,\\n MATH_ERROR,\\n NONZERO_BORROW_BALANCE,\\n PRICE_ERROR,\\n REJECTION,\\n SNAPSHOT_ERROR,\\n TOO_MANY_ASSETS,\\n TOO_MUCH_REPAY,\\n INSUFFICIENT_BALANCE_FOR_VAI,\\n MARKET_NOT_COLLATERAL\\n }\\n\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n EXIT_MARKET_BALANCE_OWED,\\n EXIT_MARKET_REJECTION,\\n SET_CLOSE_FACTOR_OWNER_CHECK,\\n SET_CLOSE_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_NO_EXISTS,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\\n SET_IMPLEMENTATION_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_PRICE_ORACLE_OWNER_CHECK,\\n SUPPORT_MARKET_EXISTS,\\n SUPPORT_MARKET_OWNER_CHECK,\\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\\n SET_VAI_MINT_RATE_CHECK,\\n SET_VAICONTROLLER_OWNER_CHECK,\\n SET_MINTED_VAI_REJECTION,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract TokenErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n BAD_INPUT,\\n COMPTROLLER_REJECTION,\\n COMPTROLLER_CALCULATION_ERROR,\\n INTEREST_RATE_MODEL_ERROR,\\n INVALID_ACCOUNT_PAIR,\\n INVALID_CLOSE_AMOUNT_REQUESTED,\\n INVALID_COLLATERAL_FACTOR,\\n MATH_ERROR,\\n MARKET_NOT_FRESH,\\n MARKET_NOT_LISTED,\\n TOKEN_INSUFFICIENT_ALLOWANCE,\\n TOKEN_INSUFFICIENT_BALANCE,\\n TOKEN_INSUFFICIENT_CASH,\\n TOKEN_TRANSFER_IN_FAILED,\\n TOKEN_TRANSFER_OUT_FAILED,\\n TOKEN_PRICE_ERROR\\n }\\n\\n /*\\n * Note: FailureInfo (but not Error) is kept in alphabetical order\\n * This is because FailureInfo grows significantly faster, and\\n * the order of Error has some meaning, while the order of FailureInfo\\n * is entirely arbitrary.\\n */\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n BORROW_ACCRUE_INTEREST_FAILED,\\n BORROW_CASH_NOT_AVAILABLE,\\n BORROW_FRESHNESS_CHECK,\\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n BORROW_MARKET_NOT_LISTED,\\n BORROW_COMPTROLLER_REJECTION,\\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n LIQUIDATE_COMPTROLLER_REJECTION,\\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n LIQUIDATE_FRESHNESS_CHECK,\\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_ACCRUE_INTEREST_FAILED,\\n MINT_COMPTROLLER_REJECTION,\\n MINT_EXCHANGE_CALCULATION_FAILED,\\n MINT_EXCHANGE_RATE_READ_FAILED,\\n MINT_FRESHNESS_CHECK,\\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n MINT_TRANSFER_IN_FAILED,\\n MINT_TRANSFER_IN_NOT_POSSIBLE,\\n REDEEM_ACCRUE_INTEREST_FAILED,\\n REDEEM_COMPTROLLER_REJECTION,\\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_RATE_READ_FAILED,\\n REDEEM_FRESHNESS_CHECK,\\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\\n REDUCE_RESERVES_ADMIN_CHECK,\\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\\n REDUCE_RESERVES_FRESH_CHECK,\\n REDUCE_RESERVES_VALIDATION,\\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_COMPTROLLER_REJECTION,\\n REPAY_BORROW_FRESHNESS_CHECK,\\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COMPTROLLER_OWNER_CHECK,\\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_ORACLE_MARKET_NOT_LISTED,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\\n SET_RESERVE_FACTOR_ADMIN_CHECK,\\n SET_RESERVE_FACTOR_FRESH_CHECK,\\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\\n TRANSFER_COMPTROLLER_REJECTION,\\n TRANSFER_NOT_ALLOWED,\\n TRANSFER_NOT_ENOUGH,\\n TRANSFER_TOO_MUCH,\\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\\n ADD_RESERVES_FRESH_CHECK,\\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\\n REPAY_VAI_COMPTROLLER_REJECTION,\\n REPAY_VAI_FRESHNESS_CHECK,\\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract VAIControllerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED, // The sender is not authorized to perform this action.\\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\\n MATH_ERROR, // A math calculation error occurred.\\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\\n }\\n\\n enum FailureInfo {\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_COMPTROLLER_OWNER_CHECK,\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n VAI_MINT_REJECTION,\\n VAI_BURN_REJECTION,\\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n VAI_LIQUIDATE_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_FEE_CALCULATION_FAILED,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\",\"keccak256\":\"0xc77c4dd91f93f778c5048fa0e68cc0cad2fd4a308add54f0172c507858ce06c8\"},\"contracts/Utils/Exponential.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"./CarefulMath.sol\\\";\\nimport \\\"./ExponentialNoError.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Venus\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract Exponential is CarefulMath, ExponentialNoError {\\n /**\\n * @dev Creates an exponential from numerator and denominator values.\\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\\n * or if `denom` is zero.\\n */\\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\\n }\\n\\n /**\\n * @dev Adds two exponentials, returning a new exponential.\\n */\\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Subtracts two exponentials, returning a new exponential.\\n */\\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, returning a new Exp.\\n */\\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(product));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return addUInt(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Divide an Exp by a scalar, returning a new Exp.\\n */\\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, returning a new Exp.\\n */\\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\\n /*\\n We are doing this as:\\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\\n\\n How it works:\\n Exp = a / b;\\n Scalar = s;\\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\\n */\\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n return getExp(numerator, divisor.mantissa);\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\\n */\\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(fraction));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials, returning a new exponential.\\n */\\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n // We add half the scale before dividing so that we get rounding instead of truncation.\\n // See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717\\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\\n assert(err2 == MathError.NO_ERROR);\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\\n */\\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\\n }\\n\\n /**\\n * @dev Multiplies three exponentials, returning a new exponential.\\n */\\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\\n (MathError err, Exp memory ab) = mulExp(a, b);\\n if (err != MathError.NO_ERROR) {\\n return (err, ab);\\n }\\n return mulExp(ab, c);\\n }\\n\\n /**\\n * @dev Divides two exponentials, returning a new exponential.\\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\\n */\\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n return getExp(a.mantissa, b.mantissa);\\n }\\n}\\n\",\"keccak256\":\"0x92a68e9f6de3a70b103aa0ddb68faa8e60c443b1268e03853d5054171fe8e290\"},\"contracts/Utils/ExponentialNoError.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n uint internal constant expScale = 1e18;\\n uint internal constant doubleScale = 1e36;\\n uint internal constant halfExpScale = expScale / 2;\\n uint internal constant mantissaOne = expScale;\\n\\n struct Exp {\\n uint mantissa;\\n }\\n\\n struct Double {\\n uint mantissa;\\n }\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / expScale;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp <= right Exp.\\n */\\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa <= right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp > right Exp.\\n */\\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa > right.mantissa;\\n }\\n\\n /**\\n * @dev returns true if Exp is exactly zero\\n */\\n function isZeroExp(Exp memory value) internal pure returns (bool) {\\n return value.mantissa == 0;\\n }\\n\\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\\n require(n < 2 ** 224, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2 ** 32, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint a, uint b) internal pure returns (uint) {\\n return add_(a, b, \\\"addition overflow\\\");\\n }\\n\\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint a, uint b) internal pure returns (uint) {\\n return sub_(a, b, \\\"subtraction underflow\\\");\\n }\\n\\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\\n }\\n\\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / expScale;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\\n }\\n\\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Double memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / doubleScale;\\n }\\n\\n function mul_(uint a, uint b) internal pure returns (uint) {\\n return mul_(a, b, \\\"multiplication overflow\\\");\\n }\\n\\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n uint c = a * b;\\n require(c / a == b, errorMessage);\\n return c;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Exp memory b) internal pure returns (uint) {\\n return div_(mul_(a, expScale), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Double memory b) internal pure returns (uint) {\\n return div_(mul_(a, doubleScale), b.mantissa);\\n }\\n\\n function div_(uint a, uint b) internal pure returns (uint) {\\n return div_(a, b, \\\"divide by zero\\\");\\n }\\n\\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n function fraction(uint a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\\n }\\n}\\n\",\"keccak256\":\"0x237e63d9ad2bf232d70f854b8867a465913cab4d2033d295ec7736bf618ca302\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50615a7280620000216000396000f3fe608060405234801561001057600080fd5b50600436106103af5760003560e01c806373acee98116101f4578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610c75578063f851a44014610cab578063f8f9da2814610cb3578063fca7820b14610cbb576103af565b8063e9a44fd914610c37578063e9c714f214610c3f578063f2b3abbd14610c47578063f3fdb15a14610c6d576103af565b8063d1109c2f116100e9578063d1109c2f14610bb8578063db006a7514610bc0578063dd62ed3e14610bdd578063df3a516e14610c0b576103af565b8063b71d1a0c14610b21578063bd6d894d14610b47578063c37f68e214610b4f578063c5ebeaec14610b9b576103af565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610ad3578063ae9d70b014610adb578063b2a02ff114610ae3578063b4a0bdf314610b19576103af565b8063a0712d6814610a7a578063a6afed9514610a97578063a9059cbb14610a9f578063aa5af0fd14610acb576103af565b80638f840ddd116101ce5780638f840ddd146108f657806395d89b41146108fe57806395dd91931461090657806399d8c1b41461092c576103af565b806373acee98146108a5578063852a12e3146108ad578063856e5bb3146108ca576103af565b806326782247116102d95780634576b5db11610277578063601a0bf111610246578063601a0bf1146108525780636c540baf1461086f5780636f307dc31461087757806370a082311461087f576103af565b80634576b5db1461081457806347bd37181461083a5780635c60da1b146108425780635fe3b5671461084a576103af565b80633b1d21a2116102b35780633b1d21a2146107c15780633d9ea3a1146107c95780633e941010146107d157806342f82260146107ee576103af565b80632678224714610759578063313ce5671461077d5780633af9e6691461079b576103af565b806318160ddd1161035157806323323e031161032057806323323e03146106ae57806323b872dd146106da5780632464176b146107105780632608f8181461072d576103af565b806318160ddd1461051c578063182df0f5146105245780631a31d4651461052c578063210bc05214610682576103af565b80630e7527021161038d5780630e752702146104a9578063107568df146104c6578063173b9904146104ee57806317bfdfbc146104f6576103af565b806306fdde03146103b4578063095ea7b3146104315780630e32cb8614610471575b600080fd5b6103bc610cd8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103f65781810151838201526020016103de565b50505050905090810190601f1680156104235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561044757600080fd5b506001600160a01b038135169060200135610d65565b604080519115158252519081900360200190f35b6104976004803603602081101561048757600080fd5b50356001600160a01b0316610dcb565b60408051918252519081900360200190f35b610497600480360360208110156104bf57600080fd5b5035610e4d565b6104ec600480360360208110156104dc57600080fd5b50356001600160a01b0316610e61565b005b610497610ecf565b6104976004803603602081101561050c57600080fd5b50356001600160a01b0316610ed5565b610497610f95565b610497610f9b565b6104ec600480360360e081101561054257600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561058457600080fd5b82018360208201111561059657600080fd5b803590602001918460018302840111600160201b831117156105b757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561060957600080fd5b82018360208201111561061b57600080fd5b803590602001918460018302840111600160201b8311171561063c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610fbc9050565b6104976004803603604081101561069857600080fd5b506001600160a01b03813516906020013561105b565b610497600480360360408110156106c457600080fd5b506001600160a01b03813516906020013561113c565b61045d600480360360608110156106f057600080fd5b506001600160a01b03813581169160208101359091169060400135611152565b6104ec6004803603602081101561072657600080fd5b50356111c5565b6104976004803603604081101561074357600080fd5b506001600160a01b03813516906020013561126d565b61076161127a565b604080516001600160a01b039092168252519081900360200190f35b610785611289565b6040805160ff9092168252519081900360200190f35b610497600480360360208110156107b157600080fd5b50356001600160a01b0316611292565b6104976112f0565b61045d6112ff565b610497600480360360208110156107e757600080fd5b5035611304565b6104ec6004803603602081101561080457600080fd5b50356001600160a01b031661130f565b6104976004803603602081101561082a57600080fd5b50356001600160a01b0316611331565b610497611463565b610761611469565b610761611478565b6104976004803603602081101561086857600080fd5b5035611487565b610497611572565b610761611578565b6104976004803603602081101561089557600080fd5b50356001600160a01b0316611587565b6104976115a2565b610497600480360360208110156108c357600080fd5b5035611658565b610497600480360360408110156108e057600080fd5b506001600160a01b038135169060200135611665565b61049761173f565b6103bc611745565b6104976004803603602081101561091c57600080fd5b50356001600160a01b031661179d565b6104ec600480360360c081101561094257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561097c57600080fd5b82018360208201111561098e57600080fd5b803590602001918460018302840111600160201b831117156109af57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610a0157600080fd5b820183602082011115610a1357600080fd5b803590602001918460018302840111600160201b83111715610a3457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506117b89050565b61049760048036036020811015610a9057600080fd5b5035611953565b61049761195f565b61045d60048036036040811015610ab557600080fd5b506001600160a01b038135169060200135611ca2565b610497611d13565b610497611d19565b610497611d1f565b61049760048036036060811015610af957600080fd5b506001600160a01b03813581169160208101359091169060400135611dbe565b610761611e2f565b61049760048036036020811015610b3757600080fd5b50356001600160a01b0316611e3e565b610497611eaf565b610b7560048036036020811015610b6557600080fd5b50356001600160a01b0316611f6b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61049760048036036020811015610bb157600080fd5b5035612000565b61049761200d565b61049760048036036020811015610bd657600080fd5b5035612013565b61049760048036036040811015610bf357600080fd5b506001600160a01b0381358116916020013516612020565b61049760048036036040811015610c2157600080fd5b506001600160a01b03813516906020013561204b565b610761612125565b610497612134565b61049760048036036020811015610c5d57600080fd5b50356001600160a01b031661222c565b6107616122a5565b61049760048036036060811015610c8b57600080fd5b506001600160a01b038135811691602081013591604090910135166122b4565b6107616122cc565b6104976122e0565b61049760048036036020811015610cd157600080fd5b5035612344565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b820191906000526020600020905b815481529060010190602001808311610d4057829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610dd633612401565b610ddf8261245a565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610e59836124a4565b509392505050565b610e6a33612401565b610e738161245a565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6000805460ff16610f1a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610f2c61195f565b14610f77576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610f808261179d565b90505b6000805460ff19166001179055919050565b600d5481565b6000806000610fa861254d565b91509150610fb5826125fc565b9150505b90565b610fca8686868686866117b8565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b505161112a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612649565b9392505050565b60008061114984846126ea565b50949350505050565b6000805460ff16611197576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556111ad33868686612795565b1490505b6000805460ff191660011790559392505050565b6000811161120a576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61122b60405180606001604052806024815260200161594160249139612aa3565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b6000806111498484612bc4565b6004546001600160a01b031681565b60035460ff1681565b600061129c6157cc565b60405180602001604052806112af611eaf565b90526001600160a01b0384166000908152600e60205260408120549192509081906112db908490612c46565b915091506112e8826125fc565b949350505050565b60006112fa612c9a565b905090565b600181565b6000610e4582612ce5565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061133c33612401565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d60208110156113ab57600080fd5b50516113fe576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff166114cc576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261151390612aa3565b600061151d61195f565b905080156115435761153b81601181111561153457fe5b6030612d79565b915050610f83565b43601454141561155457600061153b565b61155d83612ddf565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff166115e7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556115f961195f565b14611644576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610e45333384612f23565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156116bc57600080fd5b505afa1580156116d0573d6000803e3d6000fd5b505050506040513d60208110156116e657600080fd5b5051611734576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f9e565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b60008060006117ab8461301e565b91509150611135826125fc565b6117c133612401565b6009541580156117d15750600a54155b61180c5760405162461bcd60e51b815260040180806020018281038252602381526020018061591e6023913960400191505060405180910390fd5b60078490558361184d5760405162461bcd60e51b81526004018080602001828103825260308152602001806159656030913960400191505060405180910390fd5b600061185887611331565b905080156118ad576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a556118c6866130d2565b905080156119055760405162461bcd60e51b81526004018080602001828103825260228152602001806159956022913960400191505060405180910390fd5b83516119189060019060208701906157df565b50825161192c9060029060208601906157df565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610e598361321b565b60095460009043908082141561197a57600092505050610fb9565b6000611984612c9a565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051905065048c27395000811115611a7b576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611a888989613295565b91509150611a95826125fc565b611a9d6157cc565b600080600080611abb60405180602001604052808a815250876132b8565b90975094506000876003811115611ace57fe5b14611b0057611aeb60096006896003811115611ae657fe5b613320565b9e505050505050505050505050505050610fb9565b611b0a858c612c46565b90975093506000876003811115611b1d57fe5b14611b3557611aeb60096001896003811115611ae657fe5b611b3f848c613386565b90975092506000876003811115611b5257fe5b14611b6a57611aeb60096004896003811115611ae657fe5b611b856040518060200160405280600854815250858c6133ac565b90975091506000876003811115611b9857fe5b14611bb057611aeb60096005896003811115611ae657fe5b611bbb858a8b6133ac565b90975090506000876003811115611bce57fe5b14611be657611aeb60096003896003811115611ae657fe5b60098e9055600a819055600b839055600c829055601454611c08908f90613295565b9097509550611c16876125fc565b6013548610611c465760148e9055818c1015611c3b57611c358c612ddf565b50611c46565b611c4482612ddf565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611ce7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611cfd33338686612795565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611d3b612c9a565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611d8d57600080fd5b505afa158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b5051905090565b6000805460ff16611e03576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611e1933858585613408565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611e4933612401565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611135565b6000805460ff16611ef4576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611f0661195f565b14611f51576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611f59610f9b565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e6020526040812054819081908190818080611f968961301e565b935090506000816003811115611fa857fe5b14611fc65760095b975060009650869550859450611ff99350505050565b611fce61254d565b925090506000816003811115611fe057fe5b14611fec576009611fb0565b5060009650919450925090505b9193509193565b6000610e45333384612f9e565b60135481565b6000610e45333384612649565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156120a257600080fd5b505afa1580156120b6573d6000803e3d6000fd5b505050506040513d60208110156120cc57600080fd5b505161211a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f23565b6015546001600160a01b031681565b6004546000906001600160a01b0316331461215c5761215560016000612d79565b9050610fb9565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b600061226c6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612aa3565b600061227661195f565b9050801561229c5761229481601181111561228d57fe5b6040612d79565b915050610e48565b611135836130d2565b6006546001600160a01b031681565b6000806122c285858561366e565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f240536122fc612c9a565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611d8d57600080fd5b6000805460ff16612389576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e743235362900000000000060208201526123d090612aa3565b60006123da61195f565b905080156123f85761153b8160118111156123f157fe5b6046612d79565b61155d836137a0565b6003546001600160a01b038281166101009092041614612457576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b50565b6001600160a01b038116612457576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff166124eb576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556124fd61195f565b905080156125285761251b81601181111561251457fe5b6036612d79565b9250600091506125399050565b61253333338661381d565b92509250505b6000805460ff191660011790559092909150565b600d54600090819080612568575050600754600091506125f8565b6000612572612c9a565b9050600061257e6157cc565b600061258f84600b54600c54613b79565b9350905060008160038111156125a157fe5b146125b6579550600094506125f89350505050565b6125c08386613bb7565b9250905060008160038111156125d257fe5b146125e7579550600094506125f89350505050565b50516000955093506125f892505050565b9091565b600081600381111561260a57fe5b14612457576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff1661268e576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556126a061195f565b905080156126c6576126be8160118111156126b757fe5b6027612d79565b9150506111b1565b6126d38585856000613c67565b9150506000805460ff191660011790559392505050565b60008054819060ff16612731576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561274361195f565b9050801561276e5761276181601181111561275a57fe5b601e612d79565b92506000915061277f9050565b612779338686614317565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b1580156127fa57600080fd5b505af115801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b5051905080156128435761283b6003604a83613320565b9150506112e8565b836001600160a01b0316856001600160a01b031614156128695761283b6002604b612d79565b60006001600160a01b03878116908716141561288857506000196128b0565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b6000806000806128c08589613295565b909450925060008460038111156128d357fe5b146128f1576128e46009604b612d79565b96505050505050506112e8565b6001600160a01b038a166000908152600e60205260409020546129149089613295565b9094509150600084600381111561292757fe5b14612938576128e46009604c612d79565b6001600160a01b0389166000908152600e602052604090205461295b9089613386565b9094509050600084600381111561296e57fe5b1461297f576128e46009604d612d79565b6001600160a01b03808b166000908152600e6020526040808220859055918b1681522081905560001985146129d7576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b03166000805160206159b78339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612a7357600080fd5b505af1158015612a87573d6000803e3d6000fd5b5060009250612a94915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612b0c578181015183820152602001612af4565b50505050905090810190601f168015612b395780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612b5757600080fd5b505afa158015612b6b573d6000803e3d6000fd5b505050506040513d6020811015612b8157600080fd5b5051612457576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612c0b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612c1d61195f565b90508015612c3b57612761816011811115612c3457fe5b6035612d79565b61277933868661381d565b6000806000612c536157cc565b612c5d86866132b8565b90925090506000826003811115612c7057fe5b14612c815750915060009050612c93565b6000612c8c826146ba565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611d8d57600080fd5b6000805460ff16612d2a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d3c61195f565b90508015612d5a5761153b816011811115612d5357fe5b604e612d79565b612d63836146c9565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612da857fe5b836055811115612db457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561113557fe5b600081612df05760005b9050610e48565b4360095414612e0557612de9600a6033612d79565b81612e0e612c9a565b1015612e2057612de9600e6032612d79565b600c54821115612e3657612de960026034612d79565b600c805483900390819055601554612e57906001600160a01b0316846147aa565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b158015612eb757600080fd5b505af1158015612ecb573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611135565b6000805460ff16612f68576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612f7a61195f565b90508015612f91576126be8160118111156126b757fe5b6126d38585600086613c67565b6000805460ff16612fe3576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612ff561195f565b90508015613013576126be81601181111561300c57fe5b6008612d79565b6126d385858561489d565b6001600160a01b0381166000908152601060205260408120805482918291829182916130555750600094508493506130cd92505050565b6130658160000154600a54614bc3565b9094509250600084600381111561307857fe5b1461308d5750919350600092506130cd915050565b61309b838260010154614c02565b909450915060008460038111156130ae57fe5b146130c35750919350600092506130cd915050565b5060009450925050505b915091565b60008043600954146130ea57612294600a6041612d79565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561313b57600080fd5b505afa15801561314f573d6000803e3d6000fd5b505050506040513d602081101561316557600080fd5b50516131b8576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611135565b60008054819060ff16613262576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561327461195f565b9050801561328b5761251b81601181111561275a57fe5b6125333385614c2d565b6000808383116132ac575060009050818303612c93565b50600390506000612c93565b60006132c26157cc565b6000806132d3866000015186614bc3565b909250905060008260038111156132e657fe5b1461330557506040805160208101909152600081529092509050612c93565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa084601181111561334f57fe5b84605581111561335b57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156112e857fe5b60008083830184811061339e57600092509050612c93565b506002915060009050612c93565b60008060006133b96157cc565b6133c387876132b8565b909250905060008260038111156133d657fe5b146133e75750915060009050613400565b6133f96133f3826146ba565b86613386565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b15801561347557600080fd5b505af1158015613489573d6000803e3d6000fd5b505050506040513d602081101561349f57600080fd5b5051905080156134b65761283b6003601b83613320565b846001600160a01b0316846001600160a01b031614156134dc5761283b6006601c612d79565b6001600160a01b0384166000908152600e6020526040812054819081906135039087613295565b9093509150600083600381111561351657fe5b146135395761352e6009601a856003811115611ae657fe5b9450505050506112e8565b6001600160a01b0388166000908152600e602052604090205461355c9087613386565b9093509050600083600381111561356f57fe5b146135875761352e60096019856003811115611ae657fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a8152935191936000805160206159b7833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b15801561364057600080fd5b505af1158015613654573d6000803e3d6000fd5b5060009250613661915050565b9998505050505050505050565b60008054819060ff166136b5576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556136c761195f565b905080156136f2576136e58160118111156136de57fe5b600f612d79565b9250600091506137899050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561372d57600080fd5b505af1158015613741573d6000803e3d6000fd5b505050506040513d602081101561375757600080fd5b505190508015613777576136e581601181111561377057fe5b6010612d79565b61378333878787614f9a565b92509250505b6000805460ff191660011790559094909350915050565b600043600954146137b757612de9600a6048612d79565b670de0b6b3a76400008211156137d357612de960026049612d79565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611135565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b15801561388657600080fd5b505af115801561389a573d6000803e3d6000fd5b505050506040513d60208110156138b057600080fd5b5051905080156138d4576138c76003603883613320565b9250600091506134009050565b43600954146138e9576138c7600a6039612d79565b6138f161585d565b6001600160a01b038616600090815260106020526040902060010154606082015261391b8661301e565b608083018190526020830182600381111561393257fe5b600381111561393d57fe5b905250600090508160200151600381111561395457fe5b1461397e576139706009603783602001516003811115611ae657fe5b935060009250613400915050565b600019851415613997576080810151604082015261399f565b604081018590525b6139ad87826040015161550f565b60e0820181905260808201516139c291613295565b60a08301819052602083018260038111156139d957fe5b60038111156139e457fe5b81525050506139f681602001516125fc565b613a06600b548260e00151613295565b60c0830181905260208301826003811115613a1d57fe5b6003811115613a2857fe5b8152505050613a3a81602001516125fc565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613b4557600080fd5b505af1158015613b59573d6000803e3d6000fd5b5060009250613b66915050565b8160e00151935093505050935093915050565b600080600080613b898787613386565b90925090506000826003811115613b9c57fe5b14613bad5750915060009050613400565b6133f98186613295565b6000613bc16157cc565b600080613bd686670de0b6b3a7640000614bc3565b90925090506000826003811115613be957fe5b14613c0857506040805160208101909152600081529092509050612c93565b600080613c158388614c02565b90925090506000826003811115613c2857fe5b14613c4a57506040805160208101909152600081529094509250612c93915050565b604080516020810190915290815260009890975095505050505050565b6000821580613c74575081155b613caf5760405162461bcd60e51b8152600401808060200182810382526034815260200180615a0a6034913960400191505060405180910390fd5b613cb76158a3565b613cbf61254d565b6020830181905282826003811115613cd357fe5b6003811115613cde57fe5b905250508051613ced906125fc565b8315613d4857604080820185905280516020808201909252908201518152613d159085612c46565b6060830181905282826003811115613d2957fe5b6003811115613d3457fe5b905250508051613d43906125fc565b613d9a565b613d64836040518060200160405280846020015181525061575b565b6040830181905282826003811115613d7857fe5b6003811115613d8357fe5b905250508051613d92906125fc565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613dfd57600080fd5b505af1158015613e11573d6000803e3d6000fd5b505050506040513d6020811015613e2757600080fd5b505190508015613e6b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414613eae576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b613ebe600d548360400151613295565b6080840181905283826003811115613ed257fe5b6003811115613edd57fe5b905250508151613eec906125fc565b6001600160a01b0387166000908152600e6020526040908190205490830151613f159190613295565b60a0840181905283826003811115613f2957fe5b6003811115613f3457fe5b905250508151613f43906125fc565b8160600151613f50612c9a565b1015613f90576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b158015613ff957600080fd5b505afa15801561400d573d6000803e3d6000fd5b505050506040513d602081101561402357600080fd5b50511561420f57606084015160055460408051629df3ab60e31b815290516140a693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b15801561407557600080fd5b505afa158015614089573d6000803e3d6000fd5b505050506040513d602081101561409f57600080fd5b5051614bc3565b925082858260038111156140b657fe5b60038111156140c157fe5b9052505083516140d0906125fc565b6140e282670de0b6b3a7640000614c02565b925082858260038111156140f257fe5b60038111156140fd57fe5b90525050835161410c906125fc565b61411a846060015183613295565b9150818582600381111561412a57fe5b600381111561413557fe5b905250508351614144906125fc565b6005546040805163c5f956af60e01b815290516141bc926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d60208110156141b457600080fd5b5051836147aa565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614216565b5060608301515b61422088826147aa565b6040808501518151908152905130916001600160a01b038c16916000805160206159b78339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b15801561364057600080fd5b6000806143238461245a565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b15801561438257600080fd5b505af1158015614396573d6000803e3d6000fd5b505050506040513d60208110156143ac57600080fd5b5051905080156143c3576138c76003601f83613320565b43600954146143d8576138c7600a6022612d79565b6143e06158a3565b6143e861254d565b60208301819052828260038111156143fc57fe5b600381111561440757fe5b905250600090508151600381111561441b57fe5b14614437576139706009602183600001516003811115611ae657fe5b614441878661550f565b60a08201819052604080516020808201909252908301518152614464919061575b565b604083018190528282600381111561447857fe5b600381111561448357fe5b905250508051614492906125fc565b6144a2600d548260400151613386565b60608301819052828260038111156144b657fe5b60038111156144c157fe5b9052505080516144d0906125fc565b6001600160a01b0386166000908152600e60205260409081902054908201516144f99190613386565b608083018190528282600381111561450d57fe5b600381111561451857fe5b905250508051614527906125fc565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b15801561468657600080fd5b505af115801561469a573d6000803e3d6000fd5b50600092506146a7915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b60008060008043600954146146ef576146e4600a604f612d79565b935091506130cd9050565b6146f9338661550f565b905080600c54019150600c54821015614759576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156147ff57600080fd5b505af1158015614813573d6000803e3d6000fd5b5050505060003d6000811461482f576020811461483957600080fd5b6000199150614845565b60206000803e60005191505b5080614898576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b1580156148fa57600080fd5b505af115801561490e573d6000803e3d6000fd5b505050506040513d602081101561492457600080fd5b505190508015614968576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b43600954146149ab576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b826149b4612c9a565b10156149f4576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6149fc6158da565b614a058661301e565b6020830181905282826003811115614a1957fe5b6003811115614a2457fe5b905250508051614a33906125fc565b614a41816020015185613386565b6040830181905282826003811115614a5557fe5b6003811115614a6057fe5b905250508051614a6f906125fc565b614a7b600b5485613386565b6060830181905282826003811115614a8f57fe5b6003811115614a9a57fe5b905250508051614aa9906125fc565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614ae585856147aa565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614b9857600080fd5b505af1158015614bac573d6000803e3d6000fd5b5060009250614bb9915050565b9695505050505050565b60008083614bd657506000905080612c93565b83830283858281614be357fe5b0414614bf757506002915060009050612c93565b600092509050612c93565b60008082614c165750600190506000612c93565b6000838581614c2157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614c8e57600080fd5b505af1158015614ca2573d6000803e3d6000fd5b505050506040513d6020811015614cb857600080fd5b505190508015614cdc57614ccf6003601f83613320565b925060009150612c939050565b4360095414614cf157614ccf600a6022612d79565b614cf96158a3565b614d0161254d565b6020830181905282826003811115614d1557fe5b6003811115614d2057fe5b9052506000905081516003811115614d3457fe5b14614d5e57614d506009602183600001516003811115611ae657fe5b935060009250612c93915050565b614d68868661550f565b60a08201819052604080516020808201909252908301518152614d8b919061575b565b6040830181905282826003811115614d9f57fe5b6003811115614daa57fe5b905250508051614db9906125fc565b614dc9600d548260400151613386565b6060830181905282826003811115614ddd57fe5b6003811115614de857fe5b905250508051614df7906125fc565b6001600160a01b0386166000908152600e6020526040908190205490820151614e209190613386565b6080830181905282826003811115614e3457fe5b6003811115614e3f57fe5b905250508051614e4e906125fc565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b158015614f6757600080fd5b505af1158015614f7b573d6000803e3d6000fd5b5060009250614f88915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561500b57600080fd5b505af115801561501f573d6000803e3d6000fd5b505050506040513d602081101561503557600080fd5b5051905080156150595761504c6003601283613320565b9250600091506155069050565b436009541461506e5761504c600a6016612d79565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150a857600080fd5b505afa1580156150bc573d6000803e3d6000fd5b505050506040513d60208110156150d257600080fd5b5051146150e55761504c600a6011612d79565b866001600160a01b0316866001600160a01b0316141561510b5761504c60066017612d79565b8461511c5761504c60076015612d79565b6000198514156151325761504c60076014612d79565b60008061514089898961381d565b909250905081156151705761516182601181111561515a57fe5b6018612d79565b94506000935061550692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b1580156151ca57600080fd5b505afa1580156151de573d6000803e3d6000fd5b505050506040513d60408110156151f457600080fd5b5080516020909101519092509050811561523f5760405162461bcd60e51b81526004018080602001828103825260338152602001806159d76033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561529657600080fd5b505afa1580156152aa573d6000803e3d6000fd5b505050506040513d60208110156152c057600080fd5b50511015615315576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561533b57615334308d8d85613408565b90506153c5565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b15801561539657600080fd5b505af11580156153aa573d6000803e3d6000fd5b505050506040513d60208110156153c057600080fd5b505190505b801561540f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b1580156154da57600080fd5b505af11580156154ee573d6000803e3d6000fd5b50600092506154fb915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561555f57600080fd5b505afa158015615573573d6000803e3d6000fd5b505050506040513d602081101561558957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b1580156155e857600080fd5b505af11580156155fc573d6000803e3d6000fd5b5050505060003d60008114615618576020811461562257600080fd5b600019915061562e565b60206000803e60005191505b5080615681576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156156cc57600080fd5b505afa1580156156e0573d6000803e3d6000fd5b505050506040513d60208110156156f657600080fd5b505190508281101561574f576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006157686157cc565b612c5d868660006157776157cc565b60008061578c670de0b6b3a764000087614bc3565b9092509050600082600381111561579f57fe5b146157be57506040805160208101909152600081529092509050612c93565b612c8c818660000151613bb7565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061582057805160ff191683800117855561584d565b8280016001018555821561584d579182015b8281111561584d578251825591602001919060010190615832565b50615859929150615903565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b610fb991905b80821115615859576000815560010161590956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726fa265627a7a723158200f60f1a84ef2353709d9bed488df4f6b8443ccb970ba1cf365e35acbbe6530ef64736f6c63430005100032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103af5760003560e01c806373acee98116101f4578063b71d1a0c1161011a578063e9a44fd9116100ad578063f5e3c4621161007c578063f5e3c46214610c75578063f851a44014610cab578063f8f9da2814610cb3578063fca7820b14610cbb576103af565b8063e9a44fd914610c37578063e9c714f214610c3f578063f2b3abbd14610c47578063f3fdb15a14610c6d576103af565b8063d1109c2f116100e9578063d1109c2f14610bb8578063db006a7514610bc0578063dd62ed3e14610bdd578063df3a516e14610c0b576103af565b8063b71d1a0c14610b21578063bd6d894d14610b47578063c37f68e214610b4f578063c5ebeaec14610b9b576103af565b8063a0712d6811610192578063ae96f14111610161578063ae96f14114610ad3578063ae9d70b014610adb578063b2a02ff114610ae3578063b4a0bdf314610b19576103af565b8063a0712d6814610a7a578063a6afed9514610a97578063a9059cbb14610a9f578063aa5af0fd14610acb576103af565b80638f840ddd116101ce5780638f840ddd146108f657806395d89b41146108fe57806395dd91931461090657806399d8c1b41461092c576103af565b806373acee98146108a5578063852a12e3146108ad578063856e5bb3146108ca576103af565b806326782247116102d95780634576b5db11610277578063601a0bf111610246578063601a0bf1146108525780636c540baf1461086f5780636f307dc31461087757806370a082311461087f576103af565b80634576b5db1461081457806347bd37181461083a5780635c60da1b146108425780635fe3b5671461084a576103af565b80633b1d21a2116102b35780633b1d21a2146107c15780633d9ea3a1146107c95780633e941010146107d157806342f82260146107ee576103af565b80632678224714610759578063313ce5671461077d5780633af9e6691461079b576103af565b806318160ddd1161035157806323323e031161032057806323323e03146106ae57806323b872dd146106da5780632464176b146107105780632608f8181461072d576103af565b806318160ddd1461051c578063182df0f5146105245780631a31d4651461052c578063210bc05214610682576103af565b80630e7527021161038d5780630e752702146104a9578063107568df146104c6578063173b9904146104ee57806317bfdfbc146104f6576103af565b806306fdde03146103b4578063095ea7b3146104315780630e32cb8614610471575b600080fd5b6103bc610cd8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103f65781810151838201526020016103de565b50505050905090810190601f1680156104235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61045d6004803603604081101561044757600080fd5b506001600160a01b038135169060200135610d65565b604080519115158252519081900360200190f35b6104976004803603602081101561048757600080fd5b50356001600160a01b0316610dcb565b60408051918252519081900360200190f35b610497600480360360208110156104bf57600080fd5b5035610e4d565b6104ec600480360360208110156104dc57600080fd5b50356001600160a01b0316610e61565b005b610497610ecf565b6104976004803603602081101561050c57600080fd5b50356001600160a01b0316610ed5565b610497610f95565b610497610f9b565b6104ec600480360360e081101561054257600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561058457600080fd5b82018360208201111561059657600080fd5b803590602001918460018302840111600160201b831117156105b757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561060957600080fd5b82018360208201111561061b57600080fd5b803590602001918460018302840111600160201b8311171561063c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610fbc9050565b6104976004803603604081101561069857600080fd5b506001600160a01b03813516906020013561105b565b610497600480360360408110156106c457600080fd5b506001600160a01b03813516906020013561113c565b61045d600480360360608110156106f057600080fd5b506001600160a01b03813581169160208101359091169060400135611152565b6104ec6004803603602081101561072657600080fd5b50356111c5565b6104976004803603604081101561074357600080fd5b506001600160a01b03813516906020013561126d565b61076161127a565b604080516001600160a01b039092168252519081900360200190f35b610785611289565b6040805160ff9092168252519081900360200190f35b610497600480360360208110156107b157600080fd5b50356001600160a01b0316611292565b6104976112f0565b61045d6112ff565b610497600480360360208110156107e757600080fd5b5035611304565b6104ec6004803603602081101561080457600080fd5b50356001600160a01b031661130f565b6104976004803603602081101561082a57600080fd5b50356001600160a01b0316611331565b610497611463565b610761611469565b610761611478565b6104976004803603602081101561086857600080fd5b5035611487565b610497611572565b610761611578565b6104976004803603602081101561089557600080fd5b50356001600160a01b0316611587565b6104976115a2565b610497600480360360208110156108c357600080fd5b5035611658565b610497600480360360408110156108e057600080fd5b506001600160a01b038135169060200135611665565b61049761173f565b6103bc611745565b6104976004803603602081101561091c57600080fd5b50356001600160a01b031661179d565b6104ec600480360360c081101561094257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561097c57600080fd5b82018360208201111561098e57600080fd5b803590602001918460018302840111600160201b831117156109af57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115610a0157600080fd5b820183602082011115610a1357600080fd5b803590602001918460018302840111600160201b83111715610a3457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506117b89050565b61049760048036036020811015610a9057600080fd5b5035611953565b61049761195f565b61045d60048036036040811015610ab557600080fd5b506001600160a01b038135169060200135611ca2565b610497611d13565b610497611d19565b610497611d1f565b61049760048036036060811015610af957600080fd5b506001600160a01b03813581169160208101359091169060400135611dbe565b610761611e2f565b61049760048036036020811015610b3757600080fd5b50356001600160a01b0316611e3e565b610497611eaf565b610b7560048036036020811015610b6557600080fd5b50356001600160a01b0316611f6b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61049760048036036020811015610bb157600080fd5b5035612000565b61049761200d565b61049760048036036020811015610bd657600080fd5b5035612013565b61049760048036036040811015610bf357600080fd5b506001600160a01b0381358116916020013516612020565b61049760048036036040811015610c2157600080fd5b506001600160a01b03813516906020013561204b565b610761612125565b610497612134565b61049760048036036020811015610c5d57600080fd5b50356001600160a01b031661222c565b6107616122a5565b61049760048036036060811015610c8b57600080fd5b506001600160a01b038135811691602081013591604090910135166122b4565b6107616122cc565b6104976122e0565b61049760048036036020811015610cd157600080fd5b5035612344565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b820191906000526020600020905b815481529060010190602001808311610d4057829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000610dd633612401565b610ddf8261245a565b601654604080516001600160a01b039283168152918416602083015280517f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa09281900390910190a1601680546001600160a01b0319166001600160a01b03841617905560005b90505b919050565b600080610e59836124a4565b509392505050565b610e6a33612401565b610e738161245a565b6015546040516001600160a01b038084169216907fafec95c8612496c3ecf5dddc71e393528fe29bd145fbaf9c6b496d78d7e2d79b90600090a3601580546001600160a01b0319166001600160a01b0392909216919091179055565b60085481565b6000805460ff16610f1a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610f2c61195f565b14610f77576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610f808261179d565b90505b6000805460ff19166001179055919050565b600d5481565b6000806000610fa861254d565b91509150610fb5826125fc565b9150505b90565b610fca8686868686866117b8565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b15801561102657600080fd5b505afa15801561103a573d6000803e3d6000fd5b505050506040513d602081101561105057600080fd5b505050505050505050565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156110b257600080fd5b505afa1580156110c6573d6000803e3d6000fd5b505050506040513d60208110156110dc57600080fd5b505161112a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612649565b9392505050565b60008061114984846126ea565b50949350505050565b6000805460ff16611197576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556111ad33868686612795565b1490505b6000805460ff191660011790559392505050565b6000811161120a576040805162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a5908125b9c1d5d609a1b604482015290519081900360640190fd5b61122b60405180606001604052806024815260200161594160249139612aa3565b601354604080519182526020820183905280517fc2ac513cdb57f91eb2bef4db918c285829524f549682b99717c6cb06cc0111839281900390910190a1601355565b6000806111498484612bc4565b6004546001600160a01b031681565b60035460ff1681565b600061129c6157cc565b60405180602001604052806112af611eaf565b90526001600160a01b0384166000908152600e60205260408120549192509081906112db908490612c46565b915091506112e8826125fc565b949350505050565b60006112fa612c9a565b905090565b600181565b6000610e4582612ce5565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b600061133c33612401565b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd2916004808301926020929190829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d60208110156113ab57600080fd5b50516113fe576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d9281900390910190a160009392505050565b600b5481565b6012546001600160a01b031681565b6005546001600160a01b031681565b6000805460ff166114cc576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601881527f5f72656475636552657365727665732875696e74323536290000000000000000602082015261151390612aa3565b600061151d61195f565b905080156115435761153b81601181111561153457fe5b6030612d79565b915050610f83565b43601454141561155457600061153b565b61155d83612ddf565b9150506000805460ff19166001179055919050565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff166115e7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556115f961195f565b14611644576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610e45333384612f23565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156116bc57600080fd5b505afa1580156116d0573d6000803e3d6000fd5b505050506040513d60208110156116e657600080fd5b5051611734576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f9e565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610d5d5780601f10610d3257610100808354040283529160200191610d5d565b60008060006117ab8461301e565b91509150611135826125fc565b6117c133612401565b6009541580156117d15750600a54155b61180c5760405162461bcd60e51b815260040180806020018281038252602381526020018061591e6023913960400191505060405180910390fd5b60078490558361184d5760405162461bcd60e51b81526004018080602001828103825260308152602001806159656030913960400191505060405180910390fd5b600061185887611331565b905080156118ad576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b43600955670de0b6b3a7640000600a556118c6866130d2565b905080156119055760405162461bcd60e51b81526004018080602001828103825260228152602001806159956022913960400191505060405180910390fd5b83516119189060019060208701906157df565b50825161192c9060029060208601906157df565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600080610e598361321b565b60095460009043908082141561197a57600092505050610fb9565b6000611984612c9a565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d6020811015611a1c57600080fd5b5051905065048c27395000811115611a7b576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611a888989613295565b91509150611a95826125fc565b611a9d6157cc565b600080600080611abb60405180602001604052808a815250876132b8565b90975094506000876003811115611ace57fe5b14611b0057611aeb60096006896003811115611ae657fe5b613320565b9e505050505050505050505050505050610fb9565b611b0a858c612c46565b90975093506000876003811115611b1d57fe5b14611b3557611aeb60096001896003811115611ae657fe5b611b3f848c613386565b90975092506000876003811115611b5257fe5b14611b6a57611aeb60096004896003811115611ae657fe5b611b856040518060200160405280600854815250858c6133ac565b90975091506000876003811115611b9857fe5b14611bb057611aeb60096005896003811115611ae657fe5b611bbb858a8b6133ac565b90975090506000876003811115611bce57fe5b14611be657611aeb60096003896003811115611ae657fe5b60098e9055600a819055600b839055600c829055601454611c08908f90613295565b9097509550611c16876125fc565b6013548610611c465760148e9055818c1015611c3b57611c358c612ddf565b50611c46565b611c4482612ddf565b505b604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611ce7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611cfd33338686612795565b1490506000805460ff1916600117905592915050565b600a5481565b60145481565b6006546000906001600160a01b031663b8168816611d3b612c9a565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611d8d57600080fd5b505afa158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b5051905090565b6000805460ff16611e03576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611e1933858585613408565b90506000805460ff191660011790559392505050565b6016546001600160a01b031681565b6000611e4933612401565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9929181900390910190a16000611135565b6000805460ff16611ef4576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611f0661195f565b14611f51576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611f59610f9b565b90506000805460ff1916600117905590565b6001600160a01b0381166000908152600e6020526040812054819081908190818080611f968961301e565b935090506000816003811115611fa857fe5b14611fc65760095b975060009650869550859450611ff99350505050565b611fce61254d565b925090506000816003811115611fe057fe5b14611fec576009611fb0565b5060009650919450925090505b9193509193565b6000610e45333384612f9e565b60135481565b6000610e45333384612649565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b60055460408051630217306760e31b81526001600160a01b038581166004830152336024830152915160009392909216916310b9833891604480820192602092909190829003018186803b1580156120a257600080fd5b505afa1580156120b6573d6000803e3d6000fd5b505050506040513d60208110156120cc57600080fd5b505161211a576040805162461bcd60e51b81526020600482015260186024820152776e6f7420616e20617070726f7665642064656c656761746560401b604482015290519081900360640190fd5b611135833384612f23565b6015546001600160a01b031681565b6004546000906001600160a01b0316331461215c5761215560016000612d79565b9050610fb9565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99281900390910190a160009250505090565b600061226c6040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250612aa3565b600061227661195f565b9050801561229c5761229481601181111561228d57fe5b6040612d79565b915050610e48565b611135836130d2565b6006546001600160a01b031681565b6000806122c285858561366e565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f240536122fc612c9a565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611d8d57600080fd5b6000805460ff16612389576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916905560408051808201909152601a81527f5f73657452657365727665466163746f722875696e743235362900000000000060208201526123d090612aa3565b60006123da61195f565b905080156123f85761153b8160118111156123f157fe5b6046612d79565b61155d836137a0565b6003546001600160a01b038281166101009092041614612457576040805162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b604482015290519081900360640190fd5b50565b6001600160a01b038116612457576040805162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b604482015290519081900360640190fd5b60008054819060ff166124eb576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556124fd61195f565b905080156125285761251b81601181111561251457fe5b6036612d79565b9250600091506125399050565b61253333338661381d565b92509250505b6000805460ff191660011790559092909150565b600d54600090819080612568575050600754600091506125f8565b6000612572612c9a565b9050600061257e6157cc565b600061258f84600b54600c54613b79565b9350905060008160038111156125a157fe5b146125b6579550600094506125f89350505050565b6125c08386613bb7565b9250905060008160038111156125d257fe5b146125e7579550600094506125f89350505050565b50516000955093506125f892505050565b9091565b600081600381111561260a57fe5b14612457576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6000805460ff1661268e576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556126a061195f565b905080156126c6576126be8160118111156126b757fe5b6027612d79565b9150506111b1565b6126d38585856000613c67565b9150506000805460ff191660011790559392505050565b60008054819060ff16612731576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561274361195f565b9050801561276e5761276181601181111561275a57fe5b601e612d79565b92506000915061277f9050565b612779338686614317565b92509250505b6000805460ff1916600117905590939092509050565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b1580156127fa57600080fd5b505af115801561280e573d6000803e3d6000fd5b505050506040513d602081101561282457600080fd5b5051905080156128435761283b6003604a83613320565b9150506112e8565b836001600160a01b0316856001600160a01b031614156128695761283b6002604b612d79565b60006001600160a01b03878116908716141561288857506000196128b0565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b6000806000806128c08589613295565b909450925060008460038111156128d357fe5b146128f1576128e46009604b612d79565b96505050505050506112e8565b6001600160a01b038a166000908152600e60205260409020546129149089613295565b9094509150600084600381111561292757fe5b14612938576128e46009604c612d79565b6001600160a01b0389166000908152600e602052604090205461295b9089613386565b9094509050600084600381111561296e57fe5b1461297f576128e46009604d612d79565b6001600160a01b03808b166000908152600e6020526040808220859055918b1681522081905560001985146129d7576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b03166000805160206159b78339815191528a6040518082815260200191505060405180910390a36005546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c905291519190921691636a56947e91608480830192600092919082900301818387803b158015612a7357600080fd5b505af1158015612a87573d6000803e3d6000fd5b5060009250612a94915050565b9b9a5050505050505050505050565b601654604080516318c5e8ab60e01b81523360048201818152602483019384528551604484015285516001600160a01b03909516946318c5e8ab949293879391606490910190602085019080838360005b83811015612b0c578181015183820152602001612af4565b50505050905090810190601f168015612b395780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612b5757600080fd5b505afa158015612b6b573d6000803e3d6000fd5b505050506040513d6020811015612b8157600080fd5b5051612457576040805162461bcd60e51b815260206004820152600d60248201526c1858d8d95cdcc819195b9a5959609a1b604482015290519081900360640190fd5b60008054819060ff16612c0b576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612c1d61195f565b90508015612c3b57612761816011811115612c3457fe5b6035612d79565b61277933868661381d565b6000806000612c536157cc565b612c5d86866132b8565b90925090506000826003811115612c7057fe5b14612c815750915060009050612c93565b6000612c8c826146ba565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611d8d57600080fd5b6000805460ff16612d2a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612d3c61195f565b90508015612d5a5761153b816011811115612d5357fe5b604e612d79565b612d63836146c9565b509150506000805460ff19166001179055919050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836011811115612da857fe5b836055811115612db457fe5b604080519283526020830191909152600082820152519081900360600190a182601181111561113557fe5b600081612df05760005b9050610e48565b4360095414612e0557612de9600a6033612d79565b81612e0e612c9a565b1015612e2057612de9600e6032612d79565b600c54821115612e3657612de960026034612d79565b600c805483900390819055601554612e57906001600160a01b0316846147aa565b601554600554601154604080516305bebb3b60e21b81526001600160a01b0393841660048201529183166024830152600060448301819052905192909316926316faecec9260648084019382900301818387803b158015612eb757600080fd5b505af1158015612ecb573d6000803e3d6000fd5b5050601554604080516001600160a01b03909216825260208201879052818101859052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e9350908190036060019150a16000611135565b6000805460ff16612f68576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612f7a61195f565b90508015612f91576126be8160118111156126b757fe5b6126d38585600086613c67565b6000805460ff16612fe3576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612ff561195f565b90508015613013576126be81601181111561300c57fe5b6008612d79565b6126d385858561489d565b6001600160a01b0381166000908152601060205260408120805482918291829182916130555750600094508493506130cd92505050565b6130658160000154600a54614bc3565b9094509250600084600381111561307857fe5b1461308d5750919350600092506130cd915050565b61309b838260010154614c02565b909450915060008460038111156130ae57fe5b146130c35750919350600092506130cd915050565b5060009450925050505b915091565b60008043600954146130ea57612294600a6041612d79565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561313b57600080fd5b505afa15801561314f573d6000803e3d6000fd5b505050506040513d602081101561316557600080fd5b50516131b8576040805162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c736500000000604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a16000611135565b60008054819060ff16613262576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561327461195f565b9050801561328b5761251b81601181111561275a57fe5b6125333385614c2d565b6000808383116132ac575060009050818303612c93565b50600390506000612c93565b60006132c26157cc565b6000806132d3866000015186614bc3565b909250905060008260038111156132e657fe5b1461330557506040805160208101909152600081529092509050612c93565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa084601181111561334f57fe5b84605581111561335b57fe5b604080519283526020830191909152818101859052519081900360600190a18360118111156112e857fe5b60008083830184811061339e57600092509050612c93565b506002915060009050612c93565b60008060006133b96157cc565b6133c387876132b8565b909250905060008260038111156133d657fe5b146133e75750915060009050613400565b6133f96133f3826146ba565b86613386565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b15801561347557600080fd5b505af1158015613489573d6000803e3d6000fd5b505050506040513d602081101561349f57600080fd5b5051905080156134b65761283b6003601b83613320565b846001600160a01b0316846001600160a01b031614156134dc5761283b6006601c612d79565b6001600160a01b0384166000908152600e6020526040812054819081906135039087613295565b9093509150600083600381111561351657fe5b146135395761352e6009601a856003811115611ae657fe5b9450505050506112e8565b6001600160a01b0388166000908152600e602052604090205461355c9087613386565b9093509050600083600381111561356f57fe5b146135875761352e60096019856003811115611ae657fe5b6001600160a01b038088166000818152600e60209081526040808320879055938c168083529184902085905583518a8152935191936000805160206159b7833981519152929081900390910190a360055460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a905291519190921691636d35bf919160a480830192600092919082900301818387803b15801561364057600080fd5b505af1158015613654573d6000803e3d6000fd5b5060009250613661915050565b9998505050505050505050565b60008054819060ff166136b5576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556136c761195f565b905080156136f2576136e58160118111156136de57fe5b600f612d79565b9250600091506137899050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561372d57600080fd5b505af1158015613741573d6000803e3d6000fd5b505050506040513d602081101561375757600080fd5b505190508015613777576136e581601181111561377057fe5b6010612d79565b61378333878787614f9a565b92509250505b6000805460ff191660011790559094909350915050565b600043600954146137b757612de9600a6048612d79565b670de0b6b3a76400008211156137d357612de960026049612d79565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a16000611135565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b15801561388657600080fd5b505af115801561389a573d6000803e3d6000fd5b505050506040513d60208110156138b057600080fd5b5051905080156138d4576138c76003603883613320565b9250600091506134009050565b43600954146138e9576138c7600a6039612d79565b6138f161585d565b6001600160a01b038616600090815260106020526040902060010154606082015261391b8661301e565b608083018190526020830182600381111561393257fe5b600381111561393d57fe5b905250600090508160200151600381111561395457fe5b1461397e576139706009603783602001516003811115611ae657fe5b935060009250613400915050565b600019851415613997576080810151604082015261399f565b604081018590525b6139ad87826040015161550f565b60e0820181905260808201516139c291613295565b60a08301819052602083018260038111156139d957fe5b60038111156139e457fe5b81525050506139f681602001516125fc565b613a06600b548260e00151613295565b60c0830181905260208301826003811115613a1d57fe5b6003811115613a2857fe5b8152505050613a3a81602001516125fc565b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160055460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b8116604483015260648201949094526084810192909252519190921691631ededc919160a480830192600092919082900301818387803b158015613b4557600080fd5b505af1158015613b59573d6000803e3d6000fd5b5060009250613b66915050565b8160e00151935093505050935093915050565b600080600080613b898787613386565b90925090506000826003811115613b9c57fe5b14613bad5750915060009050613400565b6133f98186613295565b6000613bc16157cc565b600080613bd686670de0b6b3a7640000614bc3565b90925090506000826003811115613be957fe5b14613c0857506040805160208101909152600081529092509050612c93565b600080613c158388614c02565b90925090506000826003811115613c2857fe5b14613c4a57506040805160208101909152600081529094509250612c93915050565b604080516020810190915290815260009890975095505050505050565b6000821580613c74575081155b613caf5760405162461bcd60e51b8152600401808060200182810382526034815260200180615a0a6034913960400191505060405180910390fd5b613cb76158a3565b613cbf61254d565b6020830181905282826003811115613cd357fe5b6003811115613cde57fe5b905250508051613ced906125fc565b8315613d4857604080820185905280516020808201909252908201518152613d159085612c46565b6060830181905282826003811115613d2957fe5b6003811115613d3457fe5b905250508051613d43906125fc565b613d9a565b613d64836040518060200160405280846020015181525061575b565b6040830181905282826003811115613d7857fe5b6003811115613d8357fe5b905250508051613d92906125fc565b606081018390525b600554604080830151815163eabe7d9160e01b81523060048201526001600160a01b038a8116602483015260448201929092529151600093919091169163eabe7d9191606480830192602092919082900301818787803b158015613dfd57600080fd5b505af1158015613e11573d6000803e3d6000fd5b505050506040513d6020811015613e2757600080fd5b505190508015613e6b576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b4360095414613eae576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b613ebe600d548360400151613295565b6080840181905283826003811115613ed257fe5b6003811115613edd57fe5b905250508151613eec906125fc565b6001600160a01b0387166000908152600e6020526040908190205490830151613f159190613295565b60a0840181905283826003811115613f2957fe5b6003811115613f3457fe5b905250508151613f43906125fc565b8160600151613f50612c9a565b1015613f90576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6080820151600d5560a08201516001600160a01b038089166000908152600e60209081526040808320949094556005548451629df3ab60e31b815294519294859491909116926304ef9d5892600480840193919291829003018186803b158015613ff957600080fd5b505afa15801561400d573d6000803e3d6000fd5b505050506040513d602081101561402357600080fd5b50511561420f57606084015160055460408051629df3ab60e31b815290516140a693926001600160a01b0316916304ef9d58916004808301926020929190829003018186803b15801561407557600080fd5b505afa158015614089573d6000803e3d6000fd5b505050506040513d602081101561409f57600080fd5b5051614bc3565b925082858260038111156140b657fe5b60038111156140c157fe5b9052505083516140d0906125fc565b6140e282670de0b6b3a7640000614c02565b925082858260038111156140f257fe5b60038111156140fd57fe5b90525050835161410c906125fc565b61411a846060015183613295565b9150818582600381111561412a57fe5b600381111561413557fe5b905250508351614144906125fc565b6005546040805163c5f956af60e01b815290516141bc926001600160a01b03169163c5f956af916004808301926020929190829003018186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d60208110156141b457600080fd5b5051836147aa565b60408085015181516001600160a01b038c168152602081018590528083019190915290517fccf8e53b86a99b7e9ecf796342c165764d66154780f638c08e6241d711fba6d49181900360600190a1614216565b5060608301515b61422088826147aa565b6040808501518151908152905130916001600160a01b038c16916000805160206159b78339815191529181900360200190a360408085015160a086015182516001600160a01b038d1681526020810185905280840192909252606082015290517fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76469181900360800190a1600554606085015160408087015181516351dff98960e01b81523060048201526001600160a01b038e8116602483015260448201949094526064810191909152905191909216916351dff98991608480830192600092919082900301818387803b15801561364057600080fd5b6000806143238461245a565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b0387811660248301526044820187905291516000939290921691634ef4c3e19160648082019260209290919082900301818787803b15801561438257600080fd5b505af1158015614396573d6000803e3d6000fd5b505050506040513d60208110156143ac57600080fd5b5051905080156143c3576138c76003601f83613320565b43600954146143d8576138c7600a6022612d79565b6143e06158a3565b6143e861254d565b60208301819052828260038111156143fc57fe5b600381111561440757fe5b905250600090508151600381111561441b57fe5b14614437576139706009602183600001516003811115611ae657fe5b614441878661550f565b60a08201819052604080516020808201909252908301518152614464919061575b565b604083018190528282600381111561447857fe5b600381111561448357fe5b905250508051614492906125fc565b6144a2600d548260400151613386565b60608301819052828260038111156144b657fe5b60038111156144c157fe5b9052505080516144d0906125fc565b6001600160a01b0386166000908152600e60205260409081902054908201516144f99190613386565b608083018190528282600381111561450d57fe5b600381111561451857fe5b905250508051614527906125fc565b8060600151600d819055508060800151600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020819055507fa24ddbdf0865ba440d364725c062eac72a908faeedffc33fe64d4640c82e3ab887878360a001518460400151856080015160405180866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060405180910390a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b15801561468657600080fd5b505af115801561469a573d6000803e3d6000fd5b50600092506146a7915050565b8160a00151935093505050935093915050565b51670de0b6b3a7640000900490565b60008060008043600954146146ef576146e4600a604f612d79565b935091506130cd9050565b6146f9338661550f565b905080600c54019150600c54821015614759576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156147ff57600080fd5b505af1158015614813573d6000803e3d6000fd5b5050505060003d6000811461482f576020811461483957600080fd5b6000199150614845565b60206000803e60005191505b5080614898576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b505050565b6005546040805163368f515360e21b81523060048201526001600160a01b0386811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b1580156148fa57600080fd5b505af115801561490e573d6000803e3d6000fd5b505050506040513d602081101561492457600080fd5b505190508015614968576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b43600954146149ab576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b826149b4612c9a565b10156149f4576040805162461bcd60e51b815260206004820152600a60248201526936b0ba341032b93937b960b11b604482015290519081900360640190fd5b6149fc6158da565b614a058661301e565b6020830181905282826003811115614a1957fe5b6003811115614a2457fe5b905250508051614a33906125fc565b614a41816020015185613386565b6040830181905282826003811115614a5557fe5b6003811115614a6057fe5b905250508051614a6f906125fc565b614a7b600b5485613386565b6060830181905282826003811115614a8f57fe5b6003811115614a9a57fe5b905250508051614aa9906125fc565b6040808201516001600160a01b0388166000908152601060205291909120908155600a546001909101556060810151600b55614ae585856147aa565b60408082015160608084015183516001600160a01b038b16815260208101899052808501939093529082015290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a160055460408051635c77860560e01b81523060048201526001600160a01b0389811660248301526044820188905291519190921691635c77860591606480830192600092919082900301818387803b158015614b9857600080fd5b505af1158015614bac573d6000803e3d6000fd5b5060009250614bb9915050565b9695505050505050565b60008083614bd657506000905080612c93565b83830283858281614be357fe5b0414614bf757506002915060009050612c93565b600092509050612c93565b60008082614c165750600190506000612c93565b6000838581614c2157fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015614c8e57600080fd5b505af1158015614ca2573d6000803e3d6000fd5b505050506040513d6020811015614cb857600080fd5b505190508015614cdc57614ccf6003601f83613320565b925060009150612c939050565b4360095414614cf157614ccf600a6022612d79565b614cf96158a3565b614d0161254d565b6020830181905282826003811115614d1557fe5b6003811115614d2057fe5b9052506000905081516003811115614d3457fe5b14614d5e57614d506009602183600001516003811115611ae657fe5b935060009250612c93915050565b614d68868661550f565b60a08201819052604080516020808201909252908301518152614d8b919061575b565b6040830181905282826003811115614d9f57fe5b6003811115614daa57fe5b905250508051614db9906125fc565b614dc9600d548260400151613386565b6060830181905282826003811115614ddd57fe5b6003811115614de857fe5b905250508051614df7906125fc565b6001600160a01b0386166000908152600e6020526040908190205490820151614e209190613386565b6080830181905282826003811115614e3457fe5b6003811115614e3f57fe5b905250508051614e4e906125fc565b606080820151600d55608080830180516001600160a01b038a166000818152600e60209081526040918290209390935560a08701518188015194518251938452938301528181019390935293840152517fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb9281900390910190a1604080820151815190815290516001600160a01b0388169130916000805160206159b78339815191529181900360200190a360055460a082015160408084015181516341c728b960e01b81523060048201526001600160a01b038b8116602483015260448201949094526064810191909152905191909216916341c728b991608480830192600092919082900301818387803b158015614f6757600080fd5b505af1158015614f7b573d6000803e3d6000fd5b5060009250614f88915050565b8160a001519350935050509250929050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561500b57600080fd5b505af115801561501f573d6000803e3d6000fd5b505050506040513d602081101561503557600080fd5b5051905080156150595761504c6003601283613320565b9250600091506155069050565b436009541461506e5761504c600a6016612d79565b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156150a857600080fd5b505afa1580156150bc573d6000803e3d6000fd5b505050506040513d60208110156150d257600080fd5b5051146150e55761504c600a6011612d79565b866001600160a01b0316866001600160a01b0316141561510b5761504c60066017612d79565b8461511c5761504c60076015612d79565b6000198514156151325761504c60076014612d79565b60008061514089898961381d565b909250905081156151705761516182601181111561515a57fe5b6018612d79565b94506000935061550692505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b1580156151ca57600080fd5b505afa1580156151de573d6000803e3d6000fd5b505050506040513d60408110156151f457600080fd5b5080516020909101519092509050811561523f5760405162461bcd60e51b81526004018080602001828103825260338152602001806159d76033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561529657600080fd5b505afa1580156152aa573d6000803e3d6000fd5b505050506040513d60208110156152c057600080fd5b50511015615315576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b03891630141561533b57615334308d8d85613408565b90506153c5565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b15801561539657600080fd5b505af11580156153aa573d6000803e3d6000fd5b505050506040513d60208110156153c057600080fd5b505190505b801561540f576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600554604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a48201869052915191909216916347ef3b3b9160c480830192600092919082900301818387803b1580156154da57600080fd5b505af11580156154ee573d6000803e3d6000fd5b50600092506154fb915050565b975092955050505050505b94509492505050565b601154604080516370a0823160e01b8152306004820152905160009283926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561555f57600080fd5b505afa158015615573573d6000803e3d6000fd5b505050506040513d602081101561558957600080fd5b5051601154604080516323b872dd60e01b81526001600160a01b0388811660048301523060248301526044820188905291519394509116916323b872dd9160648082019260009290919082900301818387803b1580156155e857600080fd5b505af11580156155fc573d6000803e3d6000fd5b5050505060003d60008114615618576020811461562257600080fd5b600019915061562e565b60206000803e60005191505b5080615681576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156156cc57600080fd5b505afa1580156156e0573d6000803e3d6000fd5b505050506040513d60208110156156f657600080fd5b505190508281101561574f576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b91909103949350505050565b60008060006157686157cc565b612c5d868660006157776157cc565b60008061578c670de0b6b3a764000087614bc3565b9092509050600082600381111561579f57fe5b146157be57506040805160208101909152600081529092509050612c93565b612c8c818660000151613bb7565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061582057805160ff191683800117855561584d565b8280016001018555821561584d579182015b8281111561584d578251825591602001919060010190615832565b50615859929150615903565b5090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160c08101909152806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b610fb991905b80821115615859576000815560010161590956fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63657365745265647563655265736572766573426c6f636b44656c74612875696e7432353629696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726fa265627a7a723158200f60f1a84ef2353709d9bed488df4f6b8443ccb970ba1cf365e35acbbe6530ef64736f6c63430005100032", - "devdoc": { - "author": "Venus", - "methods": { - "_acceptAdmin()": { - "details": "Admin function for pending admin to accept role and update admin", - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_addReserves(uint256)": { - "params": { - "addAmount": "The amount of underlying tokens to add as reserves" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_reduceReserves(uint256)": { - "params": { - "reduceAmount_": "Amount of reduction to reserves" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setComptroller(address)": { - "details": "Admin function to set a new comptroller", - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setInterestRateModel(address)": { - "details": "Governance function to accrue interest and update the interest rate model", - "params": { - "newInterestRateModel_": "The new interest rate model to use" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setPendingAdmin(address)": { - "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.", - "params": { - "newPendingAdmin": "New pending admin." - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "_setReserveFactor(uint256)": { - "details": "Governor function to accrue interest and set a new reserve factor", - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "accrueInterest()": { - "details": "This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage and reduce spread reserves to protocol share reserve if currentBlock - reduceReservesBlockNumber >= blockDelta" - }, - "allowance(address,address)": { - "params": { - "owner": "The address of the account which owns the tokens to be spent", - "spender": "The address of the account which may transfer tokens" - }, - "return": "The number of tokens allowed to be spent (-1 means infinite)" - }, - "approve(address,uint256)": { - "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)", - "params": { - "amount": "The number of tokens that are approved (-1 means infinite)", - "spender": "The address of the account which may transfer tokens" - }, - "return": "Whether or not the approval succeeded" - }, - "balanceOf(address)": { - "params": { - "owner": "The address of the account to query" - }, - "return": "The number of tokens owned by `owner`" - }, - "balanceOfUnderlying(address)": { - "details": "This also accrues interest in a transaction", - "params": { - "owner": "The address of the account to query" - }, - "return": "The amount of underlying owned by `owner`" - }, - "borrow(uint256)": { - "params": { - "borrowAmount": "The amount of the underlying asset to borrow" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "borrowBalanceCurrent(address)": { - "params": { - "account": "The address whose balance should be calculated after updating borrowIndex" - }, - "return": "The calculated balance" - }, - "borrowBalanceStored(address)": { - "params": { - "account": "The address whose balance should be calculated" - }, - "return": "The calculated balance" - }, - "borrowBehalf(address,uint256)": { - "params": { - "borrowAmount": "The amount of the underlying asset to borrow", - "borrower": "The borrower, on behalf of whom to borrow." - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "borrowRatePerBlock()": { - "return": "The borrow interest rate per block, scaled by 1e18" - }, - "exchangeRateCurrent()": { - "return": "Calculated exchange rate scaled by 1e18" - }, - "exchangeRateStored()": { - "details": "This function does not accrue interest before calculating the exchange rate", - "return": "Calculated exchange rate scaled by 1e18" - }, - "getAccountSnapshot(address)": { - "details": "This is used by comptroller to more efficiently perform liquidity checks.", - "params": { - "account": "Address of the account to snapshot" - }, - "return": "(possible error, token balance, borrow balance, exchange rate mantissa)" - }, - "getCash()": { - "return": "The quantity of underlying asset owned by this contract" - }, - "initialize(address,address,address,uint256,string,string,uint8)": { - "params": { - "comptroller_": "The address of the Comptroller", - "decimals_": "BEP-20 decimal precision of this token", - "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", - "interestRateModel_": "The address of the interest rate model", - "name_": "BEP-20 name of this token", - "symbol_": "BEP-20 symbol of this token", - "underlying_": "The address of the underlying asset" - } - }, - "initialize(address,address,uint256,string,string,uint8)": { - "params": { - "comptroller_": "The address of the Comptroller", - "decimals_": "EIP-20 decimal precision of this token", - "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18", - "interestRateModel_": "The address of the interest rate model", - "name_": "EIP-20 name of this token", - "symbol_": "EIP-20 symbol of this token" - } - }, - "liquidateBorrow(address,uint256,address)": { - "params": { - "borrower": "The borrower of this vToken to be liquidated", - "repayAmount": "The amount of the underlying borrowed asset to repay", - "vTokenCollateral": "The market in which to seize collateral from the borrower" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "mint(uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "mintAmount": "The amount of the underlying asset to supply" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "mintBehalf(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "mintAmount": "The amount of the underlying asset to supply", - "receiver": "The account which is receiving the vTokens" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeem(uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemTokens": "The number of vTokens to redeem into underlying" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeemBehalf(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemTokens": "The number of vTokens to redeem into underlying", - "redeemer": "The user on behalf of whom to redeem" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeemUnderlying(uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemAmount": "The amount of underlying to redeem" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "redeemUnderlyingBehalf(address,uint256)": { - "details": "Accrues interest whether or not the operation succeeds, unless reverted", - "params": { - "redeemAmount": "The amount of underlying to receive from redeeming vTokens", - "redeemer": ", on behalf of whom to redeem" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "repayBorrow(uint256)": { - "params": { - "repayAmount": "The amount to repay" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "repayBorrowBehalf(address,uint256)": { - "params": { - "borrower": "The account with the debt being payed off", - "repayAmount": "The amount to repay" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "seize(address,address,uint256)": { - "details": "Will fail unless called by another vToken during the process of liquidation. Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.", - "params": { - "borrower": "The account having collateral seized", - "liquidator": "The account receiving seized collateral", - "seizeTokens": "The number of vTokens to seize" - }, - "return": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)." - }, - "setAccessControlManager(address)": { - "details": "Admin function to set the access control address", - "params": { - "newAccessControlManagerAddress": "New address for the access control" - }, - "return": "uint 0=success, otherwise will revert" - }, - "setProtocolShareReserve(address)": { - "params": { - "protcolShareReserve_": "The address of protocol share reserve contract" - } - }, - "setReduceReservesBlockDelta(uint256)": { - "params": { - "newReduceReservesBlockDelta_": "block difference value" - } - }, - "supplyRatePerBlock()": { - "return": "The supply interest rate per block, scaled by 1e18" - }, - "totalBorrowsCurrent()": { - "return": "The total borrows with interest" - }, - "transfer(address,uint256)": { - "params": { - "amount": "The number of tokens to transfer", - "dst": "The address of the destination account" - }, - "return": "Whether or not the transfer succeeded" - }, - "transferFrom(address,address,uint256)": { - "params": { - "amount": "The number of tokens to transfer", - "dst": "The address of the destination account", - "src": "The address of the source account" - }, - "return": "Whether or not the transfer succeeded" - } - }, - "title": "Venus's VBep20 Contract" - }, - "userdoc": { - "methods": { - "_acceptAdmin()": { - "notice": "Accepts transfer of admin rights. msg.sender must be pendingAdmin" - }, - "_addReserves(uint256)": { - "notice": "The sender adds to reserves." - }, - "_reduceReserves(uint256)": { - "notice": "Accrues interest and reduces reserves by transferring to protocol share reserve" - }, - "_setComptroller(address)": { - "notice": "Sets a new comptroller for the market" - }, - "_setInterestRateModel(address)": { - "notice": "Accrues interest and updates the interest rate model using _setInterestRateModelFresh" - }, - "_setPendingAdmin(address)": { - "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer." - }, - "_setReserveFactor(uint256)": { - "notice": "accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`" - }, - "accrueInterest()": { - "notice": "Applies accrued interest to total borrows and reserves" - }, - "allowance(address,address)": { - "notice": "Get the current allowance from `owner` for `spender`" - }, - "approve(address,uint256)": { - "notice": "Approve `spender` to transfer up to `amount` from `src`" - }, - "balanceOf(address)": { - "notice": "Get the token balance of the `owner`" - }, - "balanceOfUnderlying(address)": { - "notice": "Get the underlying balance of the `owner`" - }, - "borrow(uint256)": { - "notice": "Sender borrows assets from the protocol to their own address" - }, - "borrowBalanceCurrent(address)": { - "notice": "Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex" - }, - "borrowBalanceStored(address)": { - "notice": "Return the borrow balance of account based on stored data" - }, - "borrowBehalf(address,uint256)": { - "notice": "Sender borrows assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`" - }, - "borrowRatePerBlock()": { - "notice": "Returns the current per-block borrow interest rate for this vToken" - }, - "exchangeRateCurrent()": { - "notice": "Accrue interest then return the up-to-date exchange rate" - }, - "exchangeRateStored()": { - "notice": "Calculates the exchange rate from the underlying to the VToken" - }, - "getAccountSnapshot(address)": { - "notice": "Get a snapshot of the account's balances, and the cached exchange rate" - }, - "getCash()": { - "notice": "Get cash balance of this vToken in the underlying asset" - }, - "initialize(address,address,address,uint256,string,string,uint8)": { - "notice": "Initialize the new money market" - }, - "initialize(address,address,uint256,string,string,uint8)": { - "notice": "Initialize the money market" - }, - "liquidateBorrow(address,uint256,address)": { - "notice": "The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator." - }, - "mint(uint256)": { - "notice": "Sender supplies assets into the market and receives vTokens in exchange" - }, - "mintBehalf(address,uint256)": { - "notice": "Sender supplies assets into the market and receiver receives vTokens in exchange" - }, - "redeem(uint256)": { - "notice": "Sender redeems vTokens in exchange for the underlying asset" - }, - "redeemBehalf(address,uint256)": { - "notice": "Sender redeems assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" - }, - "redeemUnderlying(uint256)": { - "notice": "Sender redeems vTokens in exchange for a specified amount of underlying asset" - }, - "redeemUnderlyingBehalf(address,uint256)": { - "notice": "Sender redeems underlying assets on behalf of some other address. This function is only available for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`" - }, - "repayBorrow(uint256)": { - "notice": "Sender repays their own borrow" - }, - "repayBorrowBehalf(address,uint256)": { - "notice": "Sender repays a borrow belonging to another borrowing account" - }, - "seize(address,address,uint256)": { - "notice": "Transfers collateral tokens (this market) to the liquidator." - }, - "setAccessControlManager(address)": { - "notice": "Sets the address of the access control manager of this contract" - }, - "setProtocolShareReserve(address)": { - "notice": "Sets protocol share reserve contract address" - }, - "setReduceReservesBlockDelta(uint256)": { - "notice": "Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve" - }, - "supplyRatePerBlock()": { - "notice": "Returns the current per-block supply interest rate for this vToken" - }, - "totalBorrowsCurrent()": { - "notice": "Returns the current total borrows plus accrued interest" - }, - "transfer(address,uint256)": { - "notice": "Transfer `amount` tokens from `msg.sender` to `dst`" - }, - "transferFrom(address,address,uint256)": { - "notice": "Transfer `amount` tokens from `src` to `dst`" - } - }, - "notice": "vTokens which wrap an EIP-20 underlying" - }, - "storageLayout": { - "storage": [ - { - "astId": 23371, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "_notEntered", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 23373, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "name", - "offset": 0, - "slot": "1", - "type": "t_string_storage" - }, - { - "astId": 23375, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "symbol", - "offset": 0, - "slot": "2", - "type": "t_string_storage" - }, - { - "astId": 23377, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "decimals", - "offset": 0, - "slot": "3", - "type": "t_uint8" - }, - { - "astId": 23385, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "admin", - "offset": 1, - "slot": "3", - "type": "t_address_payable" - }, - { - "astId": 23387, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "pendingAdmin", - "offset": 0, - "slot": "4", - "type": "t_address_payable" - }, - { - "astId": 23389, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "comptroller", - "offset": 0, - "slot": "5", - "type": "t_contract(ComptrollerInterface)2305" - }, - { - "astId": 23391, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "interestRateModel", - "offset": 0, - "slot": "6", - "type": "t_contract(InterestRateModel)8971" - }, - { - "astId": 23393, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "initialExchangeRateMantissa", - "offset": 0, - "slot": "7", - "type": "t_uint256" - }, - { - "astId": 23395, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "reserveFactorMantissa", - "offset": 0, - "slot": "8", - "type": "t_uint256" - }, - { - "astId": 23397, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "accrualBlockNumber", - "offset": 0, - "slot": "9", - "type": "t_uint256" - }, - { - "astId": 23399, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "borrowIndex", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 23401, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "totalBorrows", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 23403, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "totalReserves", - "offset": 0, - "slot": "12", - "type": "t_uint256" - }, - { - "astId": 23405, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "totalSupply", - "offset": 0, - "slot": "13", - "type": "t_uint256" - }, - { - "astId": 23409, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "accountTokens", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 23415, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "transferAllowances", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 23419, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "accountBorrows", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_address,t_struct(BorrowSnapshot)23369_storage)" - }, - { - "astId": 23421, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "underlying", - "offset": 0, - "slot": "17", - "type": "t_address" - }, - { - "astId": 23423, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "implementation", - "offset": 0, - "slot": "18", - "type": "t_address" - }, - { - "astId": 23425, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "reduceReservesBlockDelta", - "offset": 0, - "slot": "19", - "type": "t_uint256" - }, - { - "astId": 23427, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "reduceReservesBlockNumber", - "offset": 0, - "slot": "20", - "type": "t_uint256" - }, - { - "astId": 23429, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "protocolShareReserve", - "offset": 0, - "slot": "21", - "type": "t_address_payable" - }, - { - "astId": 23431, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "accessControlManager", - "offset": 0, - "slot": "22", - "type": "t_address" - }, - { - "astId": 23438, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "__gap", - "offset": 0, - "slot": "23", - "type": "t_array(t_uint256)50_storage" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_address_payable": { - "encoding": "inplace", - "label": "address payable", - "numberOfBytes": "20" - }, - "t_array(t_uint256)50_storage": { - "base": "t_uint256", - "encoding": "inplace", - "label": "uint256[50]", - "numberOfBytes": "1600" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "t_contract(ComptrollerInterface)2305": { - "encoding": "inplace", - "label": "contract ComptrollerInterface", - "numberOfBytes": "20" - }, - "t_contract(InterestRateModel)8971": { - "encoding": "inplace", - "label": "contract InterestRateModel", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_struct(BorrowSnapshot)23369_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct VTokenStorageBase.BorrowSnapshot)", - "numberOfBytes": "32", - "value": "t_struct(BorrowSnapshot)23369_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(BorrowSnapshot)23369_storage": { - "encoding": "inplace", - "label": "struct VTokenStorageBase.BorrowSnapshot", - "members": [ - { - "astId": 23366, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "principal", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 23368, - "contract": "contracts/Tokens/VTokens/VBep20.sol:VBep20", - "label": "interestIndex", - "offset": 0, - "slot": "1", - "type": "t_uint256" - } - ], - "numberOfBytes": "64" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} diff --git a/deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json b/deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json deleted file mode 100644 index fccd3db7b..000000000 --- a/deployments/bsctestnet/solcInputs/42f81d8e85977bc834873ceceb7c8672.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" - }, - "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" - }, - "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" - }, - "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" - }, - "contracts/Comptroller/ComptrollerInterface.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" - }, - "contracts/Comptroller/ComptrollerLensInterface.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" - }, - "contracts/Comptroller/ComptrollerStorage.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" - }, - "contracts/Comptroller/Diamond/Diamond.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" - }, - "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" - }, - "contracts/Comptroller/Diamond/facets/FacetBase.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n ensureListed(markets[vToken]);\n\n uint256 borrowCap = borrowCaps[vToken];\n require(borrowCap != 0, \"market borrow cap is 0\");\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows <= borrowCap, \"market borrow cap reached\");\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to Borrow not allowed\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to Borrow not allowed\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" - }, - "contracts/Comptroller/Unitroller.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Governance/VTreasury.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" - }, - "contracts/InterestRateModels/InterestRateModel.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" - }, - "contracts/InterestRateModels/JumpRateModel.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" - }, - "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" - }, - "contracts/Lens/ComptrollerLens.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" - }, - "contracts/Lens/SnapshotLens.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" - }, - "contracts/Lens/VenusLens.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" - }, - "contracts/Oracle/PriceOracle.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" - }, - "contracts/test/BEP20.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" - }, - "contracts/test/ComptrollerHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" - }, - "contracts/test/ComptrollerMock.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" - }, - "contracts/test/ComptrollerScenario.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" - }, - "contracts/test/DiamondHarness.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" - }, - "contracts/test/EvilToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" - }, - "contracts/test/EvilXDelegator.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/test/EvilXToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" - }, - "contracts/test/Fauceteer.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" - }, - "contracts/test/FaucetToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" - }, - "contracts/test/FeeToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" - }, - "contracts/test/FixedPriceOracle.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" - }, - "contracts/test/InterestRateModelHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" - }, - "contracts/test/MockDeflationaryToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" - }, - "contracts/test/MockVBNB.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" - }, - "contracts/test/SimplePriceOracle.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" - }, - "contracts/test/VAIControllerHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" - }, - "contracts/test/VAIHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" - }, - "contracts/test/VBep20Harness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" - }, - "contracts/test/VBep20MockDelegate.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" - }, - "contracts/test/VRTConverterHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" - }, - "contracts/test/VRTVaultHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" - }, - "contracts/test/XVSHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" - }, - "contracts/test/XVSVaultScenario.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" - }, - "contracts/test/XVSVestingHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" - }, - "contracts/Tokens/EIP20Interface.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" - }, - "contracts/Tokens/EIP20NonStandardInterface.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" - }, - "contracts/Tokens/Prime/IPrime.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" - }, - "contracts/Tokens/VAI/lib.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" - }, - "contracts/Tokens/VAI/VAI.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n\n // --- Math ---\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint wad = allowed ? uint(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" - }, - "contracts/Tokens/VAI/VAIController.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint oldTreasuryPercent, uint newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint oldFloatRateMantissa, uint newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint oldMintCap, uint newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n /*** Main Actions ***/\n struct MintLocalVars {\n uint oErr;\n MathError mathErr;\n uint mintAmount;\n uint accountMintVAINew;\n uint accountMintableVAI;\n }\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint mintVAIAmount) external nonReentrant returns (uint) {\n if (address(comptroller) != address(0)) {\n require(mintVAIAmount > 0, \"mintVAIAmount cannot be zero\");\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n accrueVAIInterest();\n\n MintLocalVars memory vars;\n\n address minter = msg.sender;\n address _vai = vai;\n uint vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n uint vaiNewTotalSupply;\n\n (vars.mathErr, vaiNewTotalSupply) = addUInt(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.oErr, vars.accountMintableVAI) = getMintableVAI(minter);\n if (vars.oErr != uint(Error.NO_ERROR)) {\n return uint(Error.REJECTION);\n }\n\n // check that user have sufficient mintableVAI balance\n if (mintVAIAmount > vars.accountMintableVAI) {\n return fail(Error.REJECTION, FailureInfo.VAI_MINT_REJECTION);\n }\n\n // Calculate the minted balance based on interest index\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint remainedAmount;\n\n (vars.mathErr, remainedAmount) = subUInt(repayAmount, totalMintedVAI);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, pastVAIInterest[minter]) = addUInt(pastVAIInterest[minter], remainedAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n totalMintedVAI = repayAmount;\n }\n\n (vars.mathErr, vars.accountMintVAINew) = addUInt(totalMintedVAI, mintVAIAmount);\n require(vars.mathErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n uint error = comptroller.setMintedVAIOf(minter, vars.accountMintVAINew);\n if (error != 0) {\n return error;\n }\n\n uint feeAmount;\n uint remainedAmount;\n vars.mintAmount = mintVAIAmount;\n if (treasuryPercent != 0) {\n (vars.mathErr, feeAmount) = mulUInt(vars.mintAmount, treasuryPercent);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, remainedAmount) = subUInt(vars.mintAmount, feeAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = vars.mintAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint(Error.NO_ERROR);\n }\n }\n\n /**\n * @notice The repay function transfers VAI into the protocol and burn, reducing the user's borrow balance.\n * Before repaying an asset, users must first approve the VAI to access their VAI balance.\n * @param repayVAIAmount The amount of the VAI to be repaid.\n * @return 0 on success, otherwise an error code\n */\n function repayVAI(uint repayVAIAmount) external nonReentrant returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n require(repayVAIAmount > 0, \"repayVAIAmount cannt be zero\");\n\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n return repayVAIFresh(msg.sender, msg.sender, repayVAIAmount);\n }\n }\n\n /**\n * @notice Repay VAI Internal\n * @notice Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayVAIFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n MathError mErr;\n\n (uint burn, uint partOfCurrentInterest, uint partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n uint accountVAINew;\n\n (mErr, accountVAINew) = subUInt(vaiBalanceBorrower, burn);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, accountVAINew) = subUInt(accountVAINew, partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, pastVAIInterest[borrower]) = subUInt(pastVAIInterest[borrower], partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n if (error != 0) {\n return (error, 0);\n }\n emit RepayVAI(payer, borrower, burn);\n\n return (uint(Error.NO_ERROR), burn);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint, uint) {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n uint error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment VAI.\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint oErr;\n MathError mErr;\n uint sumSupply;\n uint marketSupply;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n @return (uint, uint) Tuple of error code and mintable VAI. Error 0 means no error. Mintable amount has 18 decimals\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint, uint) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint accountMintableVAI;\n uint i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n for (i = 0; i < enteredMarkets.length; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (, uint collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n }\n\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.REJECTION), 0);\n }\n\n return (uint(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint newTreasuryPercent\n ) external returns (uint) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint delta;\n uint rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint) {\n uint yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint) {\n uint storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint) {\n MathError mErr;\n uint delta;\n\n uint amount = comptroller.mintedVAIs(account);\n uint interest = pastVAIInterest[account];\n uint totalMintedVAI;\n uint newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return (uint, uint, uint) Amount of VAI to be burned, amount of VAI the user needs to pay in current interest and amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(address borrower, uint256 repayAmount) public view returns (uint, uint, uint) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint burn;\n uint partOfCurrentInterest = currentInterest;\n uint partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n require(newReceiver != address(0), \"invalid receiver address\");\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @notice Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n}\n" - }, - "contracts/Tokens/VAI/VAIControllerInterface.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function getVAIAddress() public view returns (address);\n\n function getMintableVAI(address minter) public view returns (uint, uint);\n\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\n\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\n\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint, uint);\n\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\n\n function updateVenusVAIMintIndex() external returns (uint);\n\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\n\n function getVAIRepayAmount(address account) public view returns (uint);\n}\n" - }, - "contracts/Tokens/VAI/VAIControllerStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" - }, - "contracts/Tokens/VAI/VAIUnitroller.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Tokens/VRT/VRT.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" - }, - "contracts/Tokens/VRT/VRTConverter.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" - }, - "contracts/Tokens/VRT/VRTConverterProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Tokens/VRT/VRTConverterStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" - }, - "contracts/Tokens/VTokens/VBep20.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n function updateUnderlying(address newUnderlying) external {\n underlying = newUnderlying;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBep20Delegate.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBep20Delegator.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBep20Immutable.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBNB.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" - }, - "contracts/Tokens/VTokens/VToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" - }, - "contracts/Tokens/VTokens/VTokenInterfaces.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" - }, - "contracts/Tokens/XVS/IXVSVesting.sol": { - "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" - }, - "contracts/Tokens/XVS/XVS.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" - }, - "contracts/Tokens/XVS/XVSVesting.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" - }, - "contracts/Tokens/XVS/XVSVestingProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Tokens/XVS/XVSVestingStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" - }, - "contracts/Utils/Address.sol": { - "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" - }, - "contracts/Utils/CarefulMath.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" - }, - "contracts/Utils/Context.sol": { - "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" - }, - "contracts/Utils/ECDSA.sol": { - "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" - }, - "contracts/Utils/ErrorReporter.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" - }, - "contracts/Utils/Exponential.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" - }, - "contracts/Utils/ExponentialNoError.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" - }, - "contracts/Utils/IBEP20.sol": { - "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" - }, - "contracts/Utils/Ownable.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" - }, - "contracts/Utils/Owned.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" - }, - "contracts/Utils/SafeBEP20.sol": { - "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" - }, - "contracts/Utils/SafeCast.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" - }, - "contracts/Utils/SafeMath.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" - }, - "contracts/Utils/Tokenlock.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" - }, - "contracts/VAIVault/VAIVault.sol": { - "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" - }, - "contracts/VAIVault/VAIVaultErrorReporter.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" - }, - "contracts/VAIVault/VAIVaultProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/VAIVault/VAIVaultStorage.sol": { - "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" - }, - "contracts/VRTVault/VRTVault.sol": { - "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" - }, - "contracts/VRTVault/VRTVaultProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/VRTVault/VRTVaultStorage.sol": { - "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" - }, - "contracts/XVSVault/TimeManagerV5.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /**\n * @dev Retrieves the current slot\n * @return Current slot\n */\n function() view returns (uint256) private _getCurrentSlot;\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[48] private __gap;\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n isInitialized = true;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" - }, - "contracts/XVSVault/XVSStore.sol": { - "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" - }, - "contracts/XVSVault/XVSVault.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\nimport { TimeManagerV5 } from \"./TimeManagerV5.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" - }, - "contracts/XVSVault/XVSVaultErrorReporter.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" - }, - "contracts/XVSVault/XVSVaultProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/XVSVault/XVSVaultStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) internal totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "storageLayout", - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "evm.gasEstimates" - ], - "": ["ast"] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} diff --git a/deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json b/deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json deleted file mode 100644 index 23324968f..000000000 --- a/deployments/bsctestnet/solcInputs/442b6826bad342d5527fff650c37c186.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" - }, - "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" - }, - "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" - }, - "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" - }, - "contracts/Comptroller/ComptrollerInterface.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" - }, - "contracts/Comptroller/ComptrollerLensInterface.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" - }, - "contracts/Comptroller/ComptrollerStorage.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" - }, - "contracts/Comptroller/Diamond/Diamond.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" - }, - "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" - }, - "contracts/Comptroller/Diamond/facets/FacetBase.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n ensureListed(markets[vToken]);\n\n uint256 borrowCap = borrowCaps[vToken];\n require(borrowCap != 0, \"market borrow cap is 0\");\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows <= borrowCap, \"market borrow cap reached\");\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to Borrow not allowed\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to Borrow not allowed\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" - }, - "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" - }, - "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" - }, - "contracts/Comptroller/Unitroller.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Governance/VTreasury.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" - }, - "contracts/InterestRateModels/InterestRateModel.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" - }, - "contracts/InterestRateModels/JumpRateModel.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" - }, - "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" - }, - "contracts/Lens/ComptrollerLens.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" - }, - "contracts/Lens/SnapshotLens.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" - }, - "contracts/Lens/VenusLens.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" - }, - "contracts/Oracle/PriceOracle.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" - }, - "contracts/test/BEP20.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" - }, - "contracts/test/ComptrollerHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" - }, - "contracts/test/ComptrollerMock.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" - }, - "contracts/test/ComptrollerScenario.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" - }, - "contracts/test/DiamondHarness.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" - }, - "contracts/test/EvilToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" - }, - "contracts/test/EvilXDelegator.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/test/EvilXToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" - }, - "contracts/test/Fauceteer.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" - }, - "contracts/test/FaucetToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" - }, - "contracts/test/FeeToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" - }, - "contracts/test/FixedPriceOracle.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" - }, - "contracts/test/InterestRateModelHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" - }, - "contracts/test/MockDeflationaryToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" - }, - "contracts/test/MockVBNB.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" - }, - "contracts/test/SimplePriceOracle.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" - }, - "contracts/test/VAIControllerHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" - }, - "contracts/test/VAIHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" - }, - "contracts/test/VBep20Harness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" - }, - "contracts/test/VBep20MockDelegate.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" - }, - "contracts/test/VRTConverterHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" - }, - "contracts/test/VRTVaultHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" - }, - "contracts/test/XVSHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" - }, - "contracts/test/XVSVaultScenario.sol": { - "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" - }, - "contracts/test/XVSVestingHarness.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" - }, - "contracts/Tokens/EIP20Interface.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" - }, - "contracts/Tokens/EIP20NonStandardInterface.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" - }, - "contracts/Tokens/Prime/IPrime.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" - }, - "contracts/Tokens/VAI/lib.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" - }, - "contracts/Tokens/VAI/VAI.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint wad);\n event Transfer(address indexed src, address indexed dst, uint wad);\n\n // --- Math ---\n function add(uint x, uint y) internal pure returns (uint z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint x, uint y) internal pure returns (uint z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint wad = allowed ? uint(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" - }, - "contracts/Tokens/VAI/VAIController.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint oldTreasuryPercent, uint newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint oldFloatRateMantissa, uint newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint oldMintCap, uint newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n /*** Main Actions ***/\n struct MintLocalVars {\n uint oErr;\n MathError mathErr;\n uint mintAmount;\n uint accountMintVAINew;\n uint accountMintableVAI;\n }\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint mintVAIAmount) external nonReentrant returns (uint) {\n if (address(comptroller) != address(0)) {\n require(mintVAIAmount > 0, \"mintVAIAmount cannot be zero\");\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n accrueVAIInterest();\n\n MintLocalVars memory vars;\n\n address minter = msg.sender;\n address _vai = vai;\n uint vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n uint vaiNewTotalSupply;\n\n (vars.mathErr, vaiNewTotalSupply) = addUInt(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.oErr, vars.accountMintableVAI) = getMintableVAI(minter);\n if (vars.oErr != uint(Error.NO_ERROR)) {\n return uint(Error.REJECTION);\n }\n\n // check that user have sufficient mintableVAI balance\n if (mintVAIAmount > vars.accountMintableVAI) {\n return fail(Error.REJECTION, FailureInfo.VAI_MINT_REJECTION);\n }\n\n // Calculate the minted balance based on interest index\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint remainedAmount;\n\n (vars.mathErr, remainedAmount) = subUInt(repayAmount, totalMintedVAI);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, pastVAIInterest[minter]) = addUInt(pastVAIInterest[minter], remainedAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n totalMintedVAI = repayAmount;\n }\n\n (vars.mathErr, vars.accountMintVAINew) = addUInt(totalMintedVAI, mintVAIAmount);\n require(vars.mathErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n uint error = comptroller.setMintedVAIOf(minter, vars.accountMintVAINew);\n if (error != 0) {\n return error;\n }\n\n uint feeAmount;\n uint remainedAmount;\n vars.mintAmount = mintVAIAmount;\n if (treasuryPercent != 0) {\n (vars.mathErr, feeAmount) = mulUInt(vars.mintAmount, treasuryPercent);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n (vars.mathErr, remainedAmount) = subUInt(vars.mintAmount, feeAmount);\n if (vars.mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.MINT_FEE_CALCULATION_FAILED, uint(vars.mathErr));\n }\n\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = vars.mintAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint(Error.NO_ERROR);\n }\n }\n\n /**\n * @notice The repay function transfers VAI into the protocol and burn, reducing the user's borrow balance.\n * Before repaying an asset, users must first approve the VAI to access their VAI balance.\n * @param repayVAIAmount The amount of the VAI to be repaid.\n * @return 0 on success, otherwise an error code\n */\n function repayVAI(uint repayVAIAmount) external nonReentrant returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n require(repayVAIAmount > 0, \"repayVAIAmount cannt be zero\");\n\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n return repayVAIFresh(msg.sender, msg.sender, repayVAIAmount);\n }\n }\n\n /**\n * @notice Repay VAI Internal\n * @notice Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayVAIFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n MathError mErr;\n\n (uint burn, uint partOfCurrentInterest, uint partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n uint accountVAINew;\n\n (mErr, accountVAINew) = subUInt(vaiBalanceBorrower, burn);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, accountVAINew) = subUInt(accountVAINew, partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, pastVAIInterest[borrower]) = subUInt(pastVAIInterest[borrower], partOfPastInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n if (error != 0) {\n return (error, 0);\n }\n emit RepayVAI(payer, borrower, burn);\n\n return (uint(Error.NO_ERROR), burn);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint, uint) {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n\n uint error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment VAI.\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint oErr;\n MathError mErr;\n uint sumSupply;\n uint marketSupply;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n @return (uint, uint) Tuple of error code and mintable VAI. Error 0 means no error. Mintable amount has 18 decimals\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint, uint) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint accountMintableVAI;\n uint i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n for (i = 0; i < enteredMarkets.length; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (, uint collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n }\n\n uint totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint(Error.REJECTION), 0);\n }\n\n return (uint(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint newTreasuryPercent\n ) external returns (uint) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint delta;\n uint rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint) {\n uint yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint) {\n uint storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint) {\n MathError mErr;\n uint delta;\n\n uint amount = comptroller.mintedVAIs(account);\n uint interest = pastVAIInterest[account];\n uint totalMintedVAI;\n uint newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return (uint, uint, uint) Amount of VAI to be burned, amount of VAI the user needs to pay in current interest and amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(address borrower, uint256 repayAmount) public view returns (uint, uint, uint) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint burn;\n uint partOfCurrentInterest = currentInterest;\n uint partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCURE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n require(newReceiver != address(0), \"invalid receiver address\");\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @notice Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n}\n" - }, - "contracts/Tokens/VAI/VAIControllerInterface.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function getVAIAddress() public view returns (address);\n\n function getMintableVAI(address minter) public view returns (uint, uint);\n\n function mintVAI(address minter, uint mintVAIAmount) external returns (uint);\n\n function repayVAI(address repayer, uint repayVAIAmount) external returns (uint);\n\n function liquidateVAI(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint, uint);\n\n function _initializeVenusVAIState(uint blockNumber) external returns (uint);\n\n function updateVenusVAIMintIndex() external returns (uint);\n\n function calcDistributeVAIMinterVenus(address vaiMinter) external returns (uint, uint, uint, uint);\n\n function getVAIRepayAmount(address account) public view returns (uint);\n}\n" - }, - "contracts/Tokens/VAI/VAIControllerStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" - }, - "contracts/Tokens/VAI/VAIUnitroller.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Tokens/VRT/VRT.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" - }, - "contracts/Tokens/VRT/VRTConverter.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" - }, - "contracts/Tokens/VRT/VRTConverterProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Tokens/VRT/VRTConverterStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" - }, - "contracts/Tokens/VTokens/VBep20.sol": { - "content": "// SPDX-License-Identifier: GPL-3.0-or-later\n\npragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n function updateUnderlying(address newUnderlying) external {\n underlying = newUnderlying;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBep20Delegate.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function updateUnderlying(address newUnderlying) public {\n underlying = newUnderlying;\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBep20Delegator.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBep20Immutable.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" - }, - "contracts/Tokens/VTokens/VBNB.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" - }, - "contracts/Tokens/VTokens/VToken.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" - }, - "contracts/Tokens/VTokens/VTokenInterfaces.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" - }, - "contracts/Tokens/XVS/IXVSVesting.sol": { - "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" - }, - "contracts/Tokens/XVS/XVS.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" - }, - "contracts/Tokens/XVS/XVSVesting.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" - }, - "contracts/Tokens/XVS/XVSVestingProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/Tokens/XVS/XVSVestingStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" - }, - "contracts/Utils/Address.sol": { - "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" - }, - "contracts/Utils/CarefulMath.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" - }, - "contracts/Utils/Context.sol": { - "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" - }, - "contracts/Utils/ECDSA.sol": { - "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" - }, - "contracts/Utils/ErrorReporter.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" - }, - "contracts/Utils/Exponential.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" - }, - "contracts/Utils/ExponentialNoError.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" - }, - "contracts/Utils/IBEP20.sol": { - "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" - }, - "contracts/Utils/Ownable.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" - }, - "contracts/Utils/Owned.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" - }, - "contracts/Utils/SafeBEP20.sol": { - "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" - }, - "contracts/Utils/SafeCast.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" - }, - "contracts/Utils/SafeMath.sol": { - "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" - }, - "contracts/Utils/Tokenlock.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" - }, - "contracts/VAIVault/VAIVault.sol": { - "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" - }, - "contracts/VAIVault/VAIVaultErrorReporter.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" - }, - "contracts/VAIVault/VAIVaultProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/VAIVault/VAIVaultStorage.sol": { - "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" - }, - "contracts/VRTVault/VRTVault.sol": { - "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" - }, - "contracts/VRTVault/VRTVaultProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/VRTVault/VRTVaultStorage.sol": { - "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" - }, - "contracts/XVSVault/TimeManagerV5.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /**\n * @dev Retrieves the current slot\n * @return Current slot\n */\n function() view returns (uint256) private _getCurrentSlot;\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[48] private __gap;\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n isInitialized = true;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" - }, - "contracts/XVSVault/XVSStore.sol": { - "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" - }, - "contracts/XVSVault/XVSVault.sol": { - "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\nimport { TimeManagerV5 } from \"./TimeManagerV5.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" - }, - "contracts/XVSVault/XVSVaultErrorReporter.sol": { - "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" - }, - "contracts/XVSVault/XVSVaultProxy.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" - }, - "contracts/XVSVault/XVSVaultStorage.sol": { - "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) internal totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "outputSelection": { - "*": { - "*": [ - "storageLayout", - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "evm.gasEstimates" - ], - "": ["ast"] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} From c492d3bec451b46dad120170dcd684ebc92a8b10 Mon Sep 17 00:00:00 2001 From: narayanprusty Date: Thu, 30 May 2024 12:18:59 +0000 Subject: [PATCH 03/85] feat: updating deployment files --- deployments/bscmainnet.json | 2 +- deployments/bscmainnet_addresses.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index ae18eadff..83b1891a9 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -8816,7 +8816,7 @@ ] }, "InterestRateModelVBNB": { - "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "address": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", "abi": [ { "inputs": [ diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 07606910a..23f75883f 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -24,7 +24,7 @@ "FIL": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "FIL_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", "FIL_Proxy": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", - "InterestRateModelVBNB": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "InterestRateModelVBNB": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps": "0xB105F9B511836cc7dF9F3dD0Ec4873766b5b6660", "LINK": "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", "LTC": "0x4338665CBB7B2485A8855A139b75D5e34AB0DB94", From 7514bbc04b21ad07a7170b5fc13434582280c2c3 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 3 Jun 2024 16:27:21 +0530 Subject: [PATCH 04/85] fix: added function to update IR --- contracts/Admin/VBNBAdmin.sol | 11 +++++++++++ contracts/Admin/VBNBAdminStorage.sol | 2 ++ tests/hardhat/Admin/VBNBAdmin.ts | 14 ++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/contracts/Admin/VBNBAdmin.sol b/contracts/Admin/VBNBAdmin.sol index 5be4cb34f..153e98254 100644 --- a/contracts/Admin/VBNBAdmin.sol +++ b/contracts/Admin/VBNBAdmin.sol @@ -91,6 +91,17 @@ contract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminS emit ReservesReduced(reduceAmount); } + /** + * @notice Sets the interest rate model of the vBNB contract + * @param newInterestRateModel Address of the new interest rate model + * @custom:access Controlled by ACM + */ + function setInterestRateModel(address newInterestRateModel) external { + _checkAccessAllowed("_setInterestRateModel(address)"); + uint256 err = vBNB._setInterestRateModel(newInterestRateModel); + require(err == 0, "setting interest rate model failed"); + } + /** * @notice Wraps BNB into WBNB */ diff --git a/contracts/Admin/VBNBAdminStorage.sol b/contracts/Admin/VBNBAdminStorage.sol index b13b1b185..82ef3b70e 100644 --- a/contracts/Admin/VBNBAdminStorage.sol +++ b/contracts/Admin/VBNBAdminStorage.sol @@ -9,6 +9,8 @@ interface VTokenInterface { function _acceptAdmin() external returns (uint); function comptroller() external returns (address); + + function _setInterestRateModel(address newInterestRateModel) external returns (uint); } interface IWBNB is IERC20Upgradeable { diff --git a/tests/hardhat/Admin/VBNBAdmin.ts b/tests/hardhat/Admin/VBNBAdmin.ts index 5bd1efda3..1953d153e 100644 --- a/tests/hardhat/Admin/VBNBAdmin.ts +++ b/tests/hardhat/Admin/VBNBAdmin.ts @@ -60,6 +60,8 @@ const setupMarketFixture = async (): Promise => { const accessControl = await smock.fake("IAccessControlManagerV8"); accessControl.isAllowedToCall.returns(true); + await mockVBNB.setAccessControlManager(accessControl.address); + const VBNBAdminFactory = await ethers.getContractFactory("VBNBAdmin"); const VBNBAdmin: VBNBAdmin = await upgrades.deployProxy( VBNBAdminFactory, @@ -125,4 +127,16 @@ describe("VBNBAdmin", () => { expect(balance).to.be.equal(amount); }); }); + + describe("set interest rate model", () => { + it("setInterestRateModel", async () => { + const interestRateModelHarnessFactory = await ethers.getContractFactory("InterestRateModelHarness"); + const InterestRateModelHarness = (await interestRateModelHarnessFactory.deploy( + BigNumber.from(18).mul(5), + )) as InterestRateModelHarness; + + await VBNBAdmin.setInterestRateModel(InterestRateModelHarness.address); + // expect(await vBNB.interestRateModel()).to.be.equal(InterestRateModelHarness.address); + }); + }); }); From 5f97c2c48a0016471eb6e022b3282bf7d54b9de6 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 3 Jun 2024 16:31:49 +0530 Subject: [PATCH 05/85] fix: uncomment test --- tests/hardhat/Admin/VBNBAdmin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/hardhat/Admin/VBNBAdmin.ts b/tests/hardhat/Admin/VBNBAdmin.ts index 1953d153e..bcabddac8 100644 --- a/tests/hardhat/Admin/VBNBAdmin.ts +++ b/tests/hardhat/Admin/VBNBAdmin.ts @@ -136,7 +136,7 @@ describe("VBNBAdmin", () => { )) as InterestRateModelHarness; await VBNBAdmin.setInterestRateModel(InterestRateModelHarness.address); - // expect(await vBNB.interestRateModel()).to.be.equal(InterestRateModelHarness.address); + expect(await vBNB.interestRateModel()).to.be.equal(InterestRateModelHarness.address); }); }); }); From 300d0af1e050ae9211b8fd8ba2f0b1b447c894f6 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 3 Jun 2024 16:36:30 +0530 Subject: [PATCH 06/85] fix: deployed new IR --- deploy/002-interest-rate-model.ts | 2 +- deployments/bscmainnet.json | 2 +- .../bscmainnet/InterestRateModelVBNB.json | 50 +-- .../InterestRateModelVBNBPreLaunchpad.json | 387 ++++++++++++++++++ deployments/bscmainnet_addresses.json | 2 +- 5 files changed, 415 insertions(+), 28 deletions(-) create mode 100644 deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index 9c7b4bc09..b2d2b5f80 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -24,7 +24,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], }); - await deploy("InterestRateModelVBNB", { + await deploy("InterestRateModelVBNBPreLaunchpad", { contract: "JumpRateModel", from: deployer, log: true, diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index 394642ba2..7f91cf91f 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -8816,7 +8816,7 @@ ] }, "InterestRateModelVBNB": { - "address": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", + "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", "abi": [ { "inputs": [ diff --git a/deployments/bscmainnet/InterestRateModelVBNB.json b/deployments/bscmainnet/InterestRateModelVBNB.json index 8054a37af..08dc5aa32 100644 --- a/deployments/bscmainnet/InterestRateModelVBNB.json +++ b/deployments/bscmainnet/InterestRateModelVBNB.json @@ -1,5 +1,5 @@ { - "address": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", + "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", "abi": [ { "inputs": [ @@ -248,36 +248,36 @@ "type": "function" } ], - "transactionHash": "0x4410c4aca8941562f7e41af02822969d0a8abd4498e93d6d1527f7597523cc75", + "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", "receipt": { "to": null, - "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", - "contractAddress": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", - "transactionIndex": 52, + "from": "0xA6575f1D5Bd6545fBd34BE05259D9d6ae60641f2", + "contractAddress": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "transactionIndex": 220, "gasUsed": "468712", - "logsBloom": "0x00000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa0a78282401028bf071f2ea8694ac8483f70a17741182be9342c6d128f340d14", - "transactionHash": "0x4410c4aca8941562f7e41af02822969d0a8abd4498e93d6d1527f7597523cc75", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000001080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2e26f3fd3a2baf7076b8190ded4cd88d84c9430ccf9e7cae9aa257197e481dd3", + "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", "logs": [ { - "transactionIndex": 52, - "blockNumber": 39174233, - "transactionHash": "0x4410c4aca8941562f7e41af02822969d0a8abd4498e93d6d1527f7597523cc75", - "address": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", + "transactionIndex": 220, + "blockNumber": 36583930, + "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", + "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd7d86d01000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", - "logIndex": 145, - "blockHash": "0xa0a78282401028bf071f2ea8694ac8483f70a17741182be9342c6d128f340d14" + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fbc8cb15000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", + "logIndex": 440, + "blockHash": "0x2e26f3fd3a2baf7076b8190ded4cd88d84c9430ccf9e7cae9aa257197e481dd3" } ], - "blockNumber": 39174233, - "cumulativeGasUsed": "5495849", + "blockNumber": 36583930, + "cumulativeGasUsed": "20317034", "status": 1, "byzantium": true }, - "args": [0, "625000000000000000", "6800000000000000000", "800000000000000000"], - "numDeployments": 2, - "solcInputHash": "6fc684307aeb3185be94f869ed923bc8", + "args": [0, "225000000000000000", "6800000000000000000", "800000000000000000"], + "numDeployments": 1, + "solcInputHash": "c3599fe405114938035c0ee8ddf55b7c", "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", @@ -337,7 +337,7 @@ "storageLayout": { "storage": [ { - "astId": 9002, + "astId": 8756, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "multiplierPerBlock", "offset": 0, @@ -345,7 +345,7 @@ "type": "t_uint256" }, { - "astId": 9004, + "astId": 8758, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "baseRatePerBlock", "offset": 0, @@ -353,7 +353,7 @@ "type": "t_uint256" }, { - "astId": 9006, + "astId": 8760, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "jumpMultiplierPerBlock", "offset": 0, @@ -361,7 +361,7 @@ "type": "t_uint256" }, { - "astId": 9008, + "astId": 8762, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "kink", "offset": 0, @@ -377,4 +377,4 @@ } } } -} +} \ No newline at end of file diff --git a/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json b/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json new file mode 100644 index 000000000..b388dee30 --- /dev/null +++ b/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json @@ -0,0 +1,387 @@ +{ + "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" + } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", + "receipt": { + "to": null, + "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", + "contractAddress": "0xa741125f4d6b9777a115b326E577F9b4004CB481", + "transactionIndex": 45, + "gasUsed": "468712", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000080000000000000000000000000000000000000000000000100000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x60286b8e84a285570d8c08dec99546f1e14473a81434b2dabf968c1809bcec85", + "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", + "logs": [ + { + "transactionIndex": 45, + "blockNumber": 39287767, + "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", + "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", + "topics": [ + "0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd7d86d01000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", + "logIndex": 111, + "blockHash": "0x60286b8e84a285570d8c08dec99546f1e14473a81434b2dabf968c1809bcec85" + } + ], + "blockNumber": 39287767, + "cumulativeGasUsed": "5089459", + "status": 1, + "byzantium": true + }, + "args": [ + 0, + "625000000000000000", + "6800000000000000000", + "800000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "1ccea21f99f9d0cf6dcde9df90c8a652", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", + "devdoc": { + "author": "Venus", + "methods": { + "constructor": { + "params": { + "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by 1e18)", + "jumpMultiplierPerYear": "The multiplierPerBlock after hitting a specified utilization point", + "kink_": "The utilization point at which the jump multiplier is applied", + "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by 1e18)" + } + }, + "getBorrowRate(uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserves": "The amount of reserves in the market" + }, + "return": "The borrow rate percentage per block as a mantissa (scaled by 1e18)" + }, + "getSupplyRate(uint256,uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserveFactorMantissa": "The current reserve factor for the market", + "reserves": "The amount of reserves in the market" + }, + "return": "The supply rate percentage per block as a mantissa (scaled by 1e18)" + }, + "utilizationRate(uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserves": "The amount of reserves in the market (currently unused)" + }, + "return": "The utilization rate as a mantissa between [0, 1e18]" + } + }, + "title": "Venus's JumpRateModel Contract" + }, + "userdoc": { + "methods": { + "constructor": "Construct an interest rate model", + "getBorrowRate(uint256,uint256,uint256)": { + "notice": "Calculates the current borrow rate per block, with the error code expected by the market" + }, + "getSupplyRate(uint256,uint256,uint256,uint256)": { + "notice": "Calculates the current supply rate per block" + }, + "utilizationRate(uint256,uint256,uint256)": { + "notice": "Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`" + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 9103, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "multiplierPerBlock", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 9105, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "baseRatePerBlock", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 9107, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "jumpMultiplierPerBlock", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 9109, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "kink", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "types": { + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 48aaff7e3..dde7070f3 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -24,7 +24,7 @@ "FIL": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "FIL_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", "FIL_Proxy": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", - "InterestRateModelVBNB": "0xeE9B16469D69A397A74C35D3Fb7Ba188659FeF94", + "InterestRateModelVBNB": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", From 3aaa586fd93ca72c6662d97762b2f00d698e52e6 Mon Sep 17 00:00:00 2001 From: narayanprusty Date: Mon, 3 Jun 2024 11:08:15 +0000 Subject: [PATCH 07/85] feat: updating deployment files --- deployments/bscmainnet.json | 251 ++++++++++++++++++ .../bscmainnet/InterestRateModelVBNB.json | 2 +- .../InterestRateModelVBNBPreLaunchpad.json | 13 +- deployments/bscmainnet_addresses.json | 1 + 4 files changed, 256 insertions(+), 11 deletions(-) diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index 7f91cf91f..b73a3f3c2 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -9066,6 +9066,257 @@ } ] }, + "InterestRateModelVBNBPreLaunchpad": { + "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" + } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ] + }, "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": { "address": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "abi": [ diff --git a/deployments/bscmainnet/InterestRateModelVBNB.json b/deployments/bscmainnet/InterestRateModelVBNB.json index 08dc5aa32..e16b95958 100644 --- a/deployments/bscmainnet/InterestRateModelVBNB.json +++ b/deployments/bscmainnet/InterestRateModelVBNB.json @@ -377,4 +377,4 @@ } } } -} \ No newline at end of file +} diff --git a/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json b/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json index b388dee30..f4e856004 100644 --- a/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json +++ b/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json @@ -264,9 +264,7 @@ "blockNumber": 39287767, "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", - "topics": [ - "0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d" - ], + "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd7d86d01000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", "logIndex": 111, "blockHash": "0x60286b8e84a285570d8c08dec99546f1e14473a81434b2dabf968c1809bcec85" @@ -277,12 +275,7 @@ "status": 1, "byzantium": true }, - "args": [ - 0, - "625000000000000000", - "6800000000000000000", - "800000000000000000" - ], + "args": [0, "625000000000000000", "6800000000000000000", "800000000000000000"], "numDeployments": 1, "solcInputHash": "1ccea21f99f9d0cf6dcde9df90c8a652", "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", @@ -384,4 +377,4 @@ } } } -} \ No newline at end of file +} diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index dde7070f3..40362d394 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -25,6 +25,7 @@ "FIL_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", "FIL_Proxy": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "InterestRateModelVBNB": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "InterestRateModelVBNBPreLaunchpad": "0xa741125f4d6b9777a115b326E577F9b4004CB481", "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", From c0bab5227dc5ea11a0e56e31dfeffa7e7c89dfc1 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 3 Jun 2024 20:34:19 +0530 Subject: [PATCH 08/85] fix: use public and return code --- contracts/Admin/VBNBAdmin.sol | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contracts/Admin/VBNBAdmin.sol b/contracts/Admin/VBNBAdmin.sol index 153e98254..c732db896 100644 --- a/contracts/Admin/VBNBAdmin.sol +++ b/contracts/Admin/VBNBAdmin.sol @@ -96,10 +96,9 @@ contract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminS * @param newInterestRateModel Address of the new interest rate model * @custom:access Controlled by ACM */ - function setInterestRateModel(address newInterestRateModel) external { + function setInterestRateModel(address newInterestRateModel) public returns (uint256) { _checkAccessAllowed("_setInterestRateModel(address)"); - uint256 err = vBNB._setInterestRateModel(newInterestRateModel); - require(err == 0, "setting interest rate model failed"); + return vBNB._setInterestRateModel(newInterestRateModel); } /** From 34fbc1a5790256d024c5ffb8da79f33534b46e48 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 4 Jun 2024 13:24:57 +0530 Subject: [PATCH 09/85] fix: deployed new vbnb admin implementation --- .../bscmainnet/VBNBAdmin_Implementation.json | 114 +++++++++++++----- .../47c23f1219f28308cf23b5e9c7cb2bf9.json | 73 +++++++++++ 2 files changed, 154 insertions(+), 33 deletions(-) create mode 100644 deployments/bscmainnet/solcInputs/47c23f1219f28308cf23b5e9c7cb2bf9.json diff --git a/deployments/bscmainnet/VBNBAdmin_Implementation.json b/deployments/bscmainnet/VBNBAdmin_Implementation.json index 0fb132eb2..6f0828bb0 100644 --- a/deployments/bscmainnet/VBNBAdmin_Implementation.json +++ b/deployments/bscmainnet/VBNBAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", + "address": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", "abi": [ { "inputs": [ @@ -267,6 +267,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -311,47 +330,57 @@ "type": "receive" } ], - "transactionHash": "0xf1a72d5f5d59ca591e8eb609d7af4dc0934e0c59027f7be6b68ad1bedc1ca60a", + "transactionHash": "0x5470269b96be6f65841922c604414d1c2d87b3ab8c5263bf2bf2864323e6838d", "receipt": { "to": null, "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", - "contractAddress": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", - "transactionIndex": 82, - "gasUsed": "1115623", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x10dece533172790a60824c96ae8ff25c03c51756035a9516ab117348271960f6", - "transactionHash": "0xf1a72d5f5d59ca591e8eb609d7af4dc0934e0c59027f7be6b68ad1bedc1ca60a", + "contractAddress": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", + "transactionIndex": 128, + "gasUsed": "1230256", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000001000000000000000000000000000400000000000000000000000200000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc5da6f5ad6fb2227b84bd5b7a8add3af5ba4df0a15240eb64217a10d9849cfcc", + "transactionHash": "0x5470269b96be6f65841922c604414d1c2d87b3ab8c5263bf2bf2864323e6838d", "logs": [ { - "transactionIndex": 82, - "blockNumber": 32659550, - "transactionHash": "0xf1a72d5f5d59ca591e8eb609d7af4dc0934e0c59027f7be6b68ad1bedc1ca60a", - "address": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", + "transactionIndex": 128, + "blockNumber": 39312584, + "transactionHash": "0x5470269b96be6f65841922c604414d1c2d87b3ab8c5263bf2bf2864323e6838d", + "address": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 219, - "blockHash": "0x10dece533172790a60824c96ae8ff25c03c51756035a9516ab117348271960f6" + "logIndex": 325, + "blockHash": "0xc5da6f5ad6fb2227b84bd5b7a8add3af5ba4df0a15240eb64217a10d9849cfcc" } ], - "blockNumber": 32659550, - "cumulativeGasUsed": "9225282", + "blockNumber": 39312584, + "cumulativeGasUsed": "13862915", "status": 1, "byzantium": true }, "args": ["0xA07c5b74C9B40447a954e1466938b865b6BBea36", "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"], - "numDeployments": 1, - "solcInputHash": "37ea7a8481da43b4dbe0a09811307281", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"_vBNB\",\"type\":\"address\"},{\"internalType\":\"contract IWBNB\",\"name\":\"_WBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\":\"contract IProtocolShareReserve\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"ProtocolShareReserveUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"contract IWBNB\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"_protocolShareReserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"reduceReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"reduceReserves(uint256)\":{\"params\":{\"reduceAmount\":\"amount of reserves to reduce\"}},\"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\"}},\"setProtocolShareReserve(address)\":{\"details\":\"PSR setter.\",\"params\":{\"protocolShareReserve_\":\"Address of the PSR contract\"}},\"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.\"}},\"stateVariables\":{\"WBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"ProtocolShareReserveUpdated(address,address)\":{\"notice\":\"Emitted when PSR is updated\"},\"ReservesReduced(uint256)\":{\"notice\":\"Emitted reserves are reduced\"}},\"kind\":\"user\",\"methods\":{\"WBNB()\":{\"notice\":\"address of WBNB contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"reduceReserves(uint256)\":{\"notice\":\"Reduce reserves of vBNB\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"vBNB()\":{\"notice\":\"address of vBNB\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Admin/VBNBAdmin.sol\":\"VBNBAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title Venus Access Control Contract.\\n * @dev The AccessControlledV8 contract is a wrapper around the OpenZeppelin AccessControl contract\\n * It provides a standardized way to control access to methods within the Venus Smart Contract Ecosystem.\\n * The contract allows the owner to set an AccessControlManager contract address.\\n * It can restrict method calls based on the sender's role and the method's signature.\\n */\\n\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _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\":\"0x618d942756b93e02340a42f3c80aa99fc56be1a96861f5464dc23a76bf30b3a5\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\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\":\"0x41deef84d1839590b243b66506691fde2fb938da01eabde53e82d3b8316fdaf9\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport \\\"./VBNBAdminStorage.sol\\\";\\n\\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\\n using SafeERC20Upgradeable for IWBNB;\\n\\n /// @notice address of vBNB\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n VTokenInterface public immutable vBNB;\\n\\n /// @notice address of WBNB contract\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IWBNB public immutable WBNB;\\n\\n /// @notice Emitted when PSR is updated\\n event ProtocolShareReserveUpdated(\\n IProtocolShareReserve indexed oldProtocolShareReserve,\\n IProtocolShareReserve indexed newProtocolShareReserve\\n );\\n\\n /// @notice Emitted reserves are reduced\\n event ReservesReduced(uint256 reduceAmount);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\\n require(address(_WBNB) != address(0), \\\"WBNB address invalid\\\");\\n require(address(_vBNB) != address(0), \\\"vBNB address invalid\\\");\\n\\n vBNB = _vBNB;\\n WBNB = _WBNB;\\n\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n function initialize(\\n IProtocolShareReserve _protocolShareReserve,\\n address accessControlManager\\n ) external initializer {\\n require(address(_protocolShareReserve) != address(0), \\\"PSR address invalid\\\");\\n protocolShareReserve = _protocolShareReserve;\\n\\n __ReentrancyGuard_init();\\n __AccessControlled_init(accessControlManager);\\n }\\n\\n /**\\n * @dev PSR setter.\\n * @param protocolShareReserve_ Address of the PSR contract\\n */\\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\\n require(address(protocolShareReserve_) != address(0), \\\"PSR address invalid\\\");\\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\\n protocolShareReserve = protocolShareReserve_;\\n }\\n\\n /**\\n * @notice Reduce reserves of vBNB\\n * @param reduceAmount amount of reserves to reduce\\n */\\n function reduceReserves(uint reduceAmount) external nonReentrant {\\n require(vBNB._reduceReserves(reduceAmount) == 0, \\\"reduceReserves failed\\\");\\n _wrapBNB();\\n\\n uint256 balance = WBNB.balanceOf(address(this));\\n WBNB.safeTransfer(address(protocolShareReserve), balance);\\n protocolShareReserve.updateAssetsState(\\n vBNB.comptroller(),\\n address(WBNB),\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(reduceAmount);\\n }\\n\\n /**\\n * @notice Wraps BNB into WBNB\\n */\\n function _wrapBNB() internal {\\n uint256 bnbBalance = address(this).balance;\\n WBNB.deposit{ value: bnbBalance }();\\n }\\n\\n /**\\n * @notice Invoked when BNB is sent to this contract\\n */\\n receive() external payable {\\n require(msg.sender == address(vBNB), \\\"only vBNB can send BNB to this contract\\\");\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n */\\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0x1e33043f7ed9ae20c800973fbb88d68fffb91eb0e4f7e0c73fa0a068db0020aa\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdminStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\ninterface VTokenInterface {\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function _acceptAdmin() external returns (uint);\\n\\n function comptroller() external returns (address);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n function deposit() external payable;\\n}\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\\ncontract VBNBAdminStorage {\\n /// @notice address of protocol share reserve contract\\n IProtocolShareReserve public protocolShareReserve;\\n\\n /// @dev gap to prevent collision in inheritence\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x125843041683cc2f550a611ef597ddee5f573e26929efd8bbd5b8aa40a83aeb5\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200152c3803806200152c8339810160408190526200003491620001e4565b6001600160a01b038116620000905760405162461bcd60e51b815260206004820152601460248201527f57424e42206164647265737320696e76616c696400000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620000e85760405162461bcd60e51b815260206004820152601460248201527f76424e42206164647265737320696e76616c6964000000000000000000000000604482015260640162000087565b6001600160a01b03808316608052811660a052620001056200010d565b505062000223565b600054610100900460ff1615620001775760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000087565b60005460ff90811614620001c9576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114620001e157600080fd5b50565b60008060408385031215620001f857600080fd5b82516200020581620001cb565b60208401519092506200021881620001cb565b809150509250929050565b60805160a0516112ac620002806000396000818161035e01528181610550015281816105d7015281816106aa0152610aff01526000818160d60152818161016c015281816102a601528181610476015261062601526112ac6000f3fe6080604052600436106100c65760003560e01c806379ba50971161007f578063b4a0bdf311610059578063b4a0bdf314610380578063e30c39781461039e578063e9a44fd9146103bc578063f2fde38b146103dc5761015a565b806379ba5097146103195780638da5cb5b1461032e5780638dd950021461034c5761015a565b806307e27959146102345780630e32cb8614610254578063107568df1461027457806333e1567f14610294578063485cc955146102e4578063715018a6146103045761015a565b3661015a57336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101585760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b60003660606101676103fc565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101a5929190611075565b60006040518083038185875af1925050503d80600081146101e2576040519150601f19603f3d011682016040523d82523d6000602084013e6101e7565b606091505b5091509150816102275760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014f565b8051945060200192505050f35b34801561024057600080fd5b5061015861024f366004611085565b610458565b34801561026057600080fd5b5061015861026f3660046110b3565b610761565b34801561028057600080fd5b5061015861028f3660046110b3565b610772565b3480156102a057600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156102f057600080fd5b506101586102ff3660046110d7565b610822565b34801561031057600080fd5b506101586109a5565b34801561032557600080fd5b506101586109b7565b34801561033a57600080fd5b506065546001600160a01b03166102c8565b34801561035857600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561038c57600080fd5b5060c9546001600160a01b03166102c8565b3480156103aa57600080fd5b506097546001600160a01b03166102c8565b3480156103c857600080fd5b5060fb546102c8906001600160a01b031681565b3480156103e857600080fd5b506101586103f73660046110b3565b610a2e565b6065546001600160a01b031633146104565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014f565b565b610460610a9f565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611110565b156105305760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161014f565b610538610af8565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561059f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611110565b60fb54909150610600906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610b74565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190611129565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b81526004016106e993929190611146565b600060405180830381600087803b15801561070357600080fd5b505af1158015610717573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161074c91815260200190565b60405180910390a15061075e60018055565b50565b6107696103fc565b61075e81610bcc565b61077a6103fc565b6001600160a01b0381166107c65760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156108425750600054600160ff909116105b8061085c5750303b15801561085c575060005460ff166001145b6108bf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014f565b6000805460ff1916600117905580156108e2576000805461ff0019166101001790555b6001600160a01b03831661092e5760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb80546001600160a01b0319166001600160a01b038516179055610951610c91565b61095a82610cc0565b80156109a0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109ad6103fc565b6104566000610cf8565b60975433906001600160a01b03168114610a255760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014f565b61075e81610cf8565b610a366103fc565b609780546001600160a01b0383166001600160a01b03199091168117909155610a676065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610af15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161014f565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b5857600080fd5b505af1158015610b6c573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109a0908490610d11565b60018055565b6001600160a01b038116610c305760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014f565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610cb85760405162461bcd60e51b815260040161014f9061118a565b610456610de6565b600054610100900460ff16610ce75760405162461bcd60e51b815260040161014f9061118a565b610cef610e0d565b61075e81610e3c565b609780546001600160a01b031916905561075e81610e63565b6000610d66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610eb59092919063ffffffff16565b9050805160001480610d87575080806020019051810190610d8791906111d5565b6109a05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161014f565b600054610100900460ff16610bc65760405162461bcd60e51b815260040161014f9061118a565b600054610100900460ff16610e345760405162461bcd60e51b815260040161014f9061118a565b610456610ecc565b600054610100900460ff166107695760405162461bcd60e51b815260040161014f9061118a565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060610ec48484600085610efc565b949350505050565b600054610100900460ff16610ef35760405162461bcd60e51b815260040161014f9061118a565b61045633610cf8565b606082471015610f5d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161014f565b600080866001600160a01b03168587604051610f799190611227565b60006040518083038185875af1925050503d8060008114610fb6576040519150601f19603f3d011682016040523d82523d6000602084013e610fbb565b606091505b5091509150610fcc87838387610fd7565b979650505050505050565b6060831561104657825160000361103f576001600160a01b0385163b61103f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014f565b5081610ec4565b610ec4838381511561105b5781518083602001fd5b8060405162461bcd60e51b815260040161014f9190611243565b8183823760009101908152919050565b60006020828403121561109757600080fd5b5035919050565b6001600160a01b038116811461075e57600080fd5b6000602082840312156110c557600080fd5b81356110d08161109e565b9392505050565b600080604083850312156110ea57600080fd5b82356110f58161109e565b915060208301356111058161109e565b809150509250929050565b60006020828403121561112257600080fd5b5051919050565b60006020828403121561113b57600080fd5b81516110d08161109e565b6001600160a01b03848116825283166020820152606081016002831061117c57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156111e757600080fd5b815180151581146110d057600080fd5b60005b838110156112125781810151838201526020016111fa565b83811115611221576000848401525b50505050565b600082516112398184602087016111f7565b9190910192915050565b60208152600082518060208401526112628160408501602087016111f7565b601f01601f1916919091016040019291505056fea2646970667358221220d221281eae8d1340bcba685e6151bc3cb01bba09ff6e580b682a236f2126eef864736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100c65760003560e01c806379ba50971161007f578063b4a0bdf311610059578063b4a0bdf314610380578063e30c39781461039e578063e9a44fd9146103bc578063f2fde38b146103dc5761015a565b806379ba5097146103195780638da5cb5b1461032e5780638dd950021461034c5761015a565b806307e27959146102345780630e32cb8614610254578063107568df1461027457806333e1567f14610294578063485cc955146102e4578063715018a6146103045761015a565b3661015a57336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101585760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b60003660606101676103fc565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101a5929190611075565b60006040518083038185875af1925050503d80600081146101e2576040519150601f19603f3d011682016040523d82523d6000602084013e6101e7565b606091505b5091509150816102275760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014f565b8051945060200192505050f35b34801561024057600080fd5b5061015861024f366004611085565b610458565b34801561026057600080fd5b5061015861026f3660046110b3565b610761565b34801561028057600080fd5b5061015861028f3660046110b3565b610772565b3480156102a057600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156102f057600080fd5b506101586102ff3660046110d7565b610822565b34801561031057600080fd5b506101586109a5565b34801561032557600080fd5b506101586109b7565b34801561033a57600080fd5b506065546001600160a01b03166102c8565b34801561035857600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561038c57600080fd5b5060c9546001600160a01b03166102c8565b3480156103aa57600080fd5b506097546001600160a01b03166102c8565b3480156103c857600080fd5b5060fb546102c8906001600160a01b031681565b3480156103e857600080fd5b506101586103f73660046110b3565b610a2e565b6065546001600160a01b031633146104565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014f565b565b610460610a9f565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611110565b156105305760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161014f565b610538610af8565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561059f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611110565b60fb54909150610600906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610b74565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190611129565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b81526004016106e993929190611146565b600060405180830381600087803b15801561070357600080fd5b505af1158015610717573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161074c91815260200190565b60405180910390a15061075e60018055565b50565b6107696103fc565b61075e81610bcc565b61077a6103fc565b6001600160a01b0381166107c65760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156108425750600054600160ff909116105b8061085c5750303b15801561085c575060005460ff166001145b6108bf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014f565b6000805460ff1916600117905580156108e2576000805461ff0019166101001790555b6001600160a01b03831661092e5760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb80546001600160a01b0319166001600160a01b038516179055610951610c91565b61095a82610cc0565b80156109a0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109ad6103fc565b6104566000610cf8565b60975433906001600160a01b03168114610a255760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014f565b61075e81610cf8565b610a366103fc565b609780546001600160a01b0383166001600160a01b03199091168117909155610a676065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610af15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161014f565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b5857600080fd5b505af1158015610b6c573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109a0908490610d11565b60018055565b6001600160a01b038116610c305760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014f565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610cb85760405162461bcd60e51b815260040161014f9061118a565b610456610de6565b600054610100900460ff16610ce75760405162461bcd60e51b815260040161014f9061118a565b610cef610e0d565b61075e81610e3c565b609780546001600160a01b031916905561075e81610e63565b6000610d66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610eb59092919063ffffffff16565b9050805160001480610d87575080806020019051810190610d8791906111d5565b6109a05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161014f565b600054610100900460ff16610bc65760405162461bcd60e51b815260040161014f9061118a565b600054610100900460ff16610e345760405162461bcd60e51b815260040161014f9061118a565b610456610ecc565b600054610100900460ff166107695760405162461bcd60e51b815260040161014f9061118a565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060610ec48484600085610efc565b949350505050565b600054610100900460ff16610ef35760405162461bcd60e51b815260040161014f9061118a565b61045633610cf8565b606082471015610f5d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161014f565b600080866001600160a01b03168587604051610f799190611227565b60006040518083038185875af1925050503d8060008114610fb6576040519150601f19603f3d011682016040523d82523d6000602084013e610fbb565b606091505b5091509150610fcc87838387610fd7565b979650505050505050565b6060831561104657825160000361103f576001600160a01b0385163b61103f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014f565b5081610ec4565b610ec4838381511561105b5781518083602001fd5b8060405162461bcd60e51b815260040161014f9190611243565b8183823760009101908152919050565b60006020828403121561109757600080fd5b5035919050565b6001600160a01b038116811461075e57600080fd5b6000602082840312156110c557600080fd5b81356110d08161109e565b9392505050565b600080604083850312156110ea57600080fd5b82356110f58161109e565b915060208301356111058161109e565b809150509250929050565b60006020828403121561112257600080fd5b5051919050565b60006020828403121561113b57600080fd5b81516110d08161109e565b6001600160a01b03848116825283166020820152606081016002831061117c57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156111e757600080fd5b815180151581146110d057600080fd5b60005b838110156112125781810151838201526020016111fa565b83811115611221576000848401525b50505050565b600082516112398184602087016111f7565b9190910192915050565b60208152600082518060208401526112628160408501602087016111f7565b601f01601f1916919091016040019291505056fea2646970667358221220d221281eae8d1340bcba685e6151bc3cb01bba09ff6e580b682a236f2126eef864736f6c634300080d0033", + "numDeployments": 2, + "solcInputHash": "47c23f1219f28308cf23b5e9c7cb2bf9", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"_vBNB\",\"type\":\"address\"},{\"internalType\":\"contract IWBNB\",\"name\":\"_WBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\":\"contract IProtocolShareReserve\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"ProtocolShareReserveUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"contract IWBNB\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"_protocolShareReserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"reduceReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Venus\",\"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\":{\"_WBNB\":\"Address of the WBNB token\",\"_vBNB\":\"Address of the vBNB contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"reduceReserves(uint256)\":{\"custom:event\":\"Emits ReservesReduced event.\",\"params\":{\"reduceAmount\":\"amount of reserves to reduce\"}},\"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\"}},\"setInterestRateModel(address)\":{\"custom:access\":\"Controlled by ACM\",\"params\":{\"newInterestRateModel\":\"Address of the new interest rate model\"}},\"setProtocolShareReserve(address)\":{\"custom:access\":\"Only owner (Governance)\",\"custom:event\":\"Emits ProtocolShareReserveUpdated event.\",\"params\":{\"protocolShareReserve_\":\"Address of the PSR contract\"}},\"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.\"}},\"stateVariables\":{\"WBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"VBNBAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"ProtocolShareReserveUpdated(address,address)\":{\"notice\":\"Emitted when PSR is updated\"},\"ReservesReduced(uint256)\":{\"notice\":\"Emitted reserves are reduced\"}},\"kind\":\"user\",\"methods\":{\"WBNB()\":{\"notice\":\"address of WBNB contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"initialize(address,address)\":{\"notice\":\"Used to initialize non-immutable variables\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"reduceReserves(uint256)\":{\"notice\":\"Reduce reserves of vBNB, wrap them and send them to the PSR contract\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model of the vBNB contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"PSR setter.\"},\"vBNB()\":{\"notice\":\"address of vBNB\"}},\"notice\":\"This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract, and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Admin/VBNBAdmin.sol\":\"VBNBAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 private _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\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"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\"},\"contracts/Admin/VBNBAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \\\"./VBNBAdminStorage.sol\\\";\\n\\n/**\\n * @title VBNBAdmin\\n * @author Venus\\n * @notice This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\\n */\\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\\n using SafeERC20Upgradeable for IWBNB;\\n\\n /// @notice address of vBNB\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n VTokenInterface public immutable vBNB;\\n\\n /// @notice address of WBNB contract\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IWBNB public immutable WBNB;\\n\\n /// @notice Emitted when PSR is updated\\n event ProtocolShareReserveUpdated(\\n IProtocolShareReserve indexed oldProtocolShareReserve,\\n IProtocolShareReserve indexed newProtocolShareReserve\\n );\\n\\n /// @notice Emitted reserves are reduced\\n event ReservesReduced(uint256 reduceAmount);\\n\\n /// @param _vBNB Address of the vBNB contract\\n /// @param _WBNB Address of the WBNB token\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\\n require(address(_WBNB) != address(0), \\\"WBNB address invalid\\\");\\n require(address(_vBNB) != address(0), \\\"vBNB address invalid\\\");\\n\\n vBNB = _vBNB;\\n WBNB = _WBNB;\\n\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n /// @notice Used to initialize non-immutable variables\\n function initialize(\\n IProtocolShareReserve _protocolShareReserve,\\n address accessControlManager\\n ) external initializer {\\n require(address(_protocolShareReserve) != address(0), \\\"PSR address invalid\\\");\\n protocolShareReserve = _protocolShareReserve;\\n\\n __ReentrancyGuard_init();\\n __AccessControlled_init(accessControlManager);\\n }\\n\\n /**\\n * @notice PSR setter.\\n * @param protocolShareReserve_ Address of the PSR contract\\n * @custom:access Only owner (Governance)\\n * @custom:event Emits ProtocolShareReserveUpdated event.\\n */\\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\\n require(address(protocolShareReserve_) != address(0), \\\"PSR address invalid\\\");\\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\\n protocolShareReserve = protocolShareReserve_;\\n }\\n\\n /**\\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\\n * @param reduceAmount amount of reserves to reduce\\n * @custom:event Emits ReservesReduced event.\\n */\\n function reduceReserves(uint reduceAmount) external nonReentrant {\\n require(vBNB._reduceReserves(reduceAmount) == 0, \\\"reduceReserves failed\\\");\\n _wrapBNB();\\n\\n uint256 balance = WBNB.balanceOf(address(this));\\n WBNB.safeTransfer(address(protocolShareReserve), balance);\\n protocolShareReserve.updateAssetsState(\\n vBNB.comptroller(),\\n address(WBNB),\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(reduceAmount);\\n }\\n\\n /**\\n * @notice Sets the interest rate model of the vBNB contract\\n * @param newInterestRateModel Address of the new interest rate model\\n * @custom:access Controlled by ACM\\n */\\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\\n _checkAccessAllowed(\\\"_setInterestRateModel(address)\\\");\\n return vBNB._setInterestRateModel(newInterestRateModel);\\n }\\n\\n /**\\n * @notice Wraps BNB into WBNB\\n */\\n function _wrapBNB() internal {\\n uint256 bnbBalance = address(this).balance;\\n WBNB.deposit{ value: bnbBalance }();\\n }\\n\\n /**\\n * @notice Invoked when BNB is sent to this contract\\n * @custom:access Only vBNB is considered a valid sender\\n */\\n receive() external payable {\\n require(msg.sender == address(vBNB), \\\"only vBNB can send BNB to this contract\\\");\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\\n * @custom:access Only owner (Governance)\\n */\\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0x75c310eb55af33b2d8ba3379b78e1692fbc537f9e7b802fdc565f13c2ea515c4\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdminStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\ninterface VTokenInterface {\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function _acceptAdmin() external returns (uint);\\n\\n function comptroller() external returns (address);\\n\\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n function deposit() external payable;\\n}\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\\ncontract VBNBAdminStorage {\\n /// @notice address of protocol share reserve contract\\n IProtocolShareReserve public protocolShareReserve;\\n\\n /// @dev gap to prevent collision in inheritence\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x75430843847643600d3bd145d8bd62f0c5b770e91a8aac30acce1ec3ebec0f5b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b5060405161173138038061173183398101604081905261002f916101d5565b6001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601460248201527f57424e42206164647265737320696e76616c696400000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166100e05760405162461bcd60e51b815260206004820152601460248201527f76424e42206164647265737320696e76616c69640000000000000000000000006044820152606401610081565b6001600160a01b03808316608052811660a0526100fb610102565b505061020f565b600054610100900460ff161561016a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610081565b60005460ff908116146101bb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101d257600080fd5b50565b600080604083850312156101e857600080fd5b82516101f3816101bd565b6020840151909250610204816101bd565b809150509250929050565b60805160a0516114bf610272600039600081816103a80152818161059a01528181610621015281816106f40152610c1b01526000818160f101528181610187015281816102c1015281816104c0015281816106700152610ad701526114bf6000f3fe6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220538caa24a6ce8f028660696e043a1581613ee53fbb89190e419046df6ae7cd5a64736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220538caa24a6ce8f028660696e043a1581613ee53fbb89190e419046df6ae7cd5a64736f6c63430008190033", "devdoc": { + "author": "Venus", + "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" + "custom:oz-upgrades-unsafe-allow": "constructor", + "params": { + "_WBNB": "Address of the WBNB token", + "_vBNB": "Address of the vBNB contract" + } }, "owner()": { "details": "Returns the address of the current owner." @@ -360,6 +389,7 @@ "details": "Returns the address of the pending owner." }, "reduceReserves(uint256)": { + "custom:event": "Emits ReservesReduced event.", "params": { "reduceAmount": "amount of reserves to reduce" } @@ -375,8 +405,15 @@ "accessControlManager_": "The new address of the AccessControlManager" } }, + "setInterestRateModel(address)": { + "custom:access": "Controlled by ACM", + "params": { + "newInterestRateModel": "Address of the new interest rate model" + } + }, "setProtocolShareReserve(address)": { - "details": "PSR setter.", + "custom:access": "Only owner (Governance)", + "custom:event": "Emits ProtocolShareReserveUpdated event.", "params": { "protocolShareReserve_": "Address of the PSR contract" } @@ -393,6 +430,7 @@ "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" } }, + "title": "VBNBAdmin", "version": 1 }, "userdoc": { @@ -422,19 +460,29 @@ "accessControlManager()": { "notice": "Returns the address of the access control manager contract" }, + "initialize(address,address)": { + "notice": "Used to initialize non-immutable variables" + }, "protocolShareReserve()": { "notice": "address of protocol share reserve contract" }, "reduceReserves(uint256)": { - "notice": "Reduce reserves of vBNB" + "notice": "Reduce reserves of vBNB, wrap them and send them to the PSR contract" }, "setAccessControlManager(address)": { "notice": "Sets the address of AccessControlManager" }, + "setInterestRateModel(address)": { + "notice": "Sets the interest rate model of the vBNB contract" + }, + "setProtocolShareReserve(address)": { + "notice": "PSR setter." + }, "vBNB()": { "notice": "address of vBNB" } }, + "notice": "This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract, and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).", "version": 1 }, "storageLayout": { @@ -472,7 +520,7 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 1376, + "astId": 1351, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "__gap", "offset": 0, @@ -512,15 +560,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 2502, + "astId": 1439, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "_accessControlManager", "offset": 0, "slot": "201", - "type": "t_contract(IAccessControlManagerV8)2686" + "type": "t_contract(IAccessControlManagerV8)1624" }, { - "astId": 2507, + "astId": 1444, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "__gap", "offset": 0, @@ -528,15 +576,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 3066, + "astId": 1984, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "protocolShareReserve", "offset": 0, "slot": "251", - "type": "t_contract(IProtocolShareReserve)3062" + "type": "t_contract(IProtocolShareReserve)1980" }, { - "astId": 3071, + "astId": 1989, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "__gap", "offset": 0, @@ -567,12 +615,12 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IAccessControlManagerV8)2686": { + "t_contract(IAccessControlManagerV8)1624": { "encoding": "inplace", "label": "contract IAccessControlManagerV8", "numberOfBytes": "20" }, - "t_contract(IProtocolShareReserve)3062": { + "t_contract(IProtocolShareReserve)1980": { "encoding": "inplace", "label": "contract IProtocolShareReserve", "numberOfBytes": "20" diff --git a/deployments/bscmainnet/solcInputs/47c23f1219f28308cf23b5e9c7cb2bf9.json b/deployments/bscmainnet/solcInputs/47c23f1219f28308cf23b5e9c7cb2bf9.json new file mode 100644 index 000000000..07905f029 --- /dev/null +++ b/deployments/bscmainnet/solcInputs/47c23f1219f28308cf23b5e9c7cb2bf9.json @@ -0,0 +1,73 @@ +{ + "language": "Solidity", + "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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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 private _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" + }, + "@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" + }, + "contracts/Admin/VBNBAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \"./VBNBAdminStorage.sol\";\n\n/**\n * @title VBNBAdmin\n * @author Venus\n * @notice This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\n */\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\n using SafeERC20Upgradeable for IWBNB;\n\n /// @notice address of vBNB\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n VTokenInterface public immutable vBNB;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IWBNB public immutable WBNB;\n\n /// @notice Emitted when PSR is updated\n event ProtocolShareReserveUpdated(\n IProtocolShareReserve indexed oldProtocolShareReserve,\n IProtocolShareReserve indexed newProtocolShareReserve\n );\n\n /// @notice Emitted reserves are reduced\n event ReservesReduced(uint256 reduceAmount);\n\n /// @param _vBNB Address of the vBNB contract\n /// @param _WBNB Address of the WBNB token\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\n require(address(_WBNB) != address(0), \"WBNB address invalid\");\n require(address(_vBNB) != address(0), \"vBNB address invalid\");\n\n vBNB = _vBNB;\n WBNB = _WBNB;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /// @notice Used to initialize non-immutable variables\n function initialize(\n IProtocolShareReserve _protocolShareReserve,\n address accessControlManager\n ) external initializer {\n require(address(_protocolShareReserve) != address(0), \"PSR address invalid\");\n protocolShareReserve = _protocolShareReserve;\n\n __ReentrancyGuard_init();\n __AccessControlled_init(accessControlManager);\n }\n\n /**\n * @notice PSR setter.\n * @param protocolShareReserve_ Address of the PSR contract\n * @custom:access Only owner (Governance)\n * @custom:event Emits ProtocolShareReserveUpdated event.\n */\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\n require(address(protocolShareReserve_) != address(0), \"PSR address invalid\");\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\n * @param reduceAmount amount of reserves to reduce\n * @custom:event Emits ReservesReduced event.\n */\n function reduceReserves(uint reduceAmount) external nonReentrant {\n require(vBNB._reduceReserves(reduceAmount) == 0, \"reduceReserves failed\");\n _wrapBNB();\n\n uint256 balance = WBNB.balanceOf(address(this));\n WBNB.safeTransfer(address(protocolShareReserve), balance);\n protocolShareReserve.updateAssetsState(\n vBNB.comptroller(),\n address(WBNB),\n IProtocolShareReserve.IncomeType.SPREAD\n );\n\n emit ReservesReduced(reduceAmount);\n }\n\n /**\n * @notice Sets the interest rate model of the vBNB contract\n * @param newInterestRateModel Address of the new interest rate model\n * @custom:access Controlled by ACM\n */\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\n _checkAccessAllowed(\"_setInterestRateModel(address)\");\n return vBNB._setInterestRateModel(newInterestRateModel);\n }\n\n /**\n * @notice Wraps BNB into WBNB\n */\n function _wrapBNB() internal {\n uint256 bnbBalance = address(this).balance;\n WBNB.deposit{ value: bnbBalance }();\n }\n\n /**\n * @notice Invoked when BNB is sent to this contract\n * @custom:access Only vBNB is considered a valid sender\n */\n receive() external payable {\n require(msg.sender == address(vBNB), \"only vBNB can send BNB to this contract\");\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\n * @custom:access Only owner (Governance)\n */\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\n require(ok, \"call failed\");\n return res;\n }\n}\n" + }, + "contracts/Admin/VBNBAdminStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\ninterface VTokenInterface {\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function _acceptAdmin() external returns (uint);\n\n function comptroller() external returns (address);\n\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ncontract VBNBAdminStorage {\n /// @notice address of protocol share reserve contract\n IProtocolShareReserve public protocolShareReserve;\n\n /// @dev gap to prevent collision in inheritence\n uint256[49] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} From caa262fb249a0e59b8513a9dcc0a98c574bd3161 Mon Sep 17 00:00:00 2001 From: narayanprusty Date: Tue, 4 Jun 2024 07:56:42 +0000 Subject: [PATCH 10/85] feat: updating deployment files --- deployments/bscmainnet.json | 21 ++++++++++++++++++++- deployments/bscmainnet_addresses.json | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index b73a3f3c2..56df033e5 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -45675,7 +45675,7 @@ ] }, "VBNBAdmin_Implementation": { - "address": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", + "address": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", "abi": [ { "inputs": [ @@ -45943,6 +45943,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 40362d394..1c6d70230 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -92,7 +92,7 @@ "VAIVaultProxy_Implementation": "0xa52f2a56abb7cbdd378bc36c6088fafeaf9ac423", "VAIVaultProxy_Proxy": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", "VBNBAdmin": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", - "VBNBAdmin_Implementation": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", + "VBNBAdmin_Implementation": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", "VBNBAdmin_Proxy": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", "VBep20Delegate": "0x6E5cFf66C7b671fA1D5782866D80BD15955d79F6", "VRT": "0x5f84ce30dc3cf7909101c69086c50de191895883", From a13820f72c811cb4d8197af4ad730a9984e1efb7 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 4 Jun 2024 13:49:39 +0530 Subject: [PATCH 11/85] fix: redeployed with acm signature fix --- contracts/Admin/VBNBAdmin.sol | 2 +- .../bscmainnet/VBNBAdmin_Implementation.json | 42 +++++------ .../86ac02e99d571dfb77843c33a94d604f.json | 73 +++++++++++++++++++ 3 files changed, 95 insertions(+), 22 deletions(-) create mode 100644 deployments/bscmainnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json diff --git a/contracts/Admin/VBNBAdmin.sol b/contracts/Admin/VBNBAdmin.sol index c732db896..ad5169d2c 100644 --- a/contracts/Admin/VBNBAdmin.sol +++ b/contracts/Admin/VBNBAdmin.sol @@ -97,7 +97,7 @@ contract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminS * @custom:access Controlled by ACM */ function setInterestRateModel(address newInterestRateModel) public returns (uint256) { - _checkAccessAllowed("_setInterestRateModel(address)"); + _checkAccessAllowed("setInterestRateModel(address)"); return vBNB._setInterestRateModel(newInterestRateModel); } diff --git a/deployments/bscmainnet/VBNBAdmin_Implementation.json b/deployments/bscmainnet/VBNBAdmin_Implementation.json index 6f0828bb0..a421e8d21 100644 --- a/deployments/bscmainnet/VBNBAdmin_Implementation.json +++ b/deployments/bscmainnet/VBNBAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", + "address": "0xaA8D9558d8D45666552a72CECbdd0a746aeaCDc9", "abi": [ { "inputs": [ @@ -330,39 +330,39 @@ "type": "receive" } ], - "transactionHash": "0x5470269b96be6f65841922c604414d1c2d87b3ab8c5263bf2bf2864323e6838d", + "transactionHash": "0x5d0d8c70110d3ea388abe9e630c062ffde6f47f4e0b47dc7fb2bfe19273939d7", "receipt": { "to": null, "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", - "contractAddress": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", - "transactionIndex": 128, - "gasUsed": "1230256", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000001000000000000000000000000000400000000000000000000000200000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc5da6f5ad6fb2227b84bd5b7a8add3af5ba4df0a15240eb64217a10d9849cfcc", - "transactionHash": "0x5470269b96be6f65841922c604414d1c2d87b3ab8c5263bf2bf2864323e6838d", + "contractAddress": "0xaA8D9558d8D45666552a72CECbdd0a746aeaCDc9", + "transactionIndex": 68, + "gasUsed": "1230244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000010000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000", + "blockHash": "0xbfbdb17b782b7a9526e09a601e9dd2a2bc96d563c782ca2d1c14303dc2a3584e", + "transactionHash": "0x5d0d8c70110d3ea388abe9e630c062ffde6f47f4e0b47dc7fb2bfe19273939d7", "logs": [ { - "transactionIndex": 128, - "blockNumber": 39312584, - "transactionHash": "0x5470269b96be6f65841922c604414d1c2d87b3ab8c5263bf2bf2864323e6838d", - "address": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", + "transactionIndex": 68, + "blockNumber": 39313165, + "transactionHash": "0x5d0d8c70110d3ea388abe9e630c062ffde6f47f4e0b47dc7fb2bfe19273939d7", + "address": "0xaA8D9558d8D45666552a72CECbdd0a746aeaCDc9", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 325, - "blockHash": "0xc5da6f5ad6fb2227b84bd5b7a8add3af5ba4df0a15240eb64217a10d9849cfcc" + "logIndex": 219, + "blockHash": "0xbfbdb17b782b7a9526e09a601e9dd2a2bc96d563c782ca2d1c14303dc2a3584e" } ], - "blockNumber": 39312584, - "cumulativeGasUsed": "13862915", + "blockNumber": 39313165, + "cumulativeGasUsed": "9242987", "status": 1, "byzantium": true }, "args": ["0xA07c5b74C9B40447a954e1466938b865b6BBea36", "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"], - "numDeployments": 2, - "solcInputHash": "47c23f1219f28308cf23b5e9c7cb2bf9", - "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"_vBNB\",\"type\":\"address\"},{\"internalType\":\"contract IWBNB\",\"name\":\"_WBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\":\"contract IProtocolShareReserve\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"ProtocolShareReserveUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"contract IWBNB\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"_protocolShareReserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"reduceReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Venus\",\"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\":{\"_WBNB\":\"Address of the WBNB token\",\"_vBNB\":\"Address of the vBNB contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"reduceReserves(uint256)\":{\"custom:event\":\"Emits ReservesReduced event.\",\"params\":{\"reduceAmount\":\"amount of reserves to reduce\"}},\"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\"}},\"setInterestRateModel(address)\":{\"custom:access\":\"Controlled by ACM\",\"params\":{\"newInterestRateModel\":\"Address of the new interest rate model\"}},\"setProtocolShareReserve(address)\":{\"custom:access\":\"Only owner (Governance)\",\"custom:event\":\"Emits ProtocolShareReserveUpdated event.\",\"params\":{\"protocolShareReserve_\":\"Address of the PSR contract\"}},\"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.\"}},\"stateVariables\":{\"WBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"VBNBAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"ProtocolShareReserveUpdated(address,address)\":{\"notice\":\"Emitted when PSR is updated\"},\"ReservesReduced(uint256)\":{\"notice\":\"Emitted reserves are reduced\"}},\"kind\":\"user\",\"methods\":{\"WBNB()\":{\"notice\":\"address of WBNB contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"initialize(address,address)\":{\"notice\":\"Used to initialize non-immutable variables\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"reduceReserves(uint256)\":{\"notice\":\"Reduce reserves of vBNB, wrap them and send them to the PSR contract\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model of the vBNB contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"PSR setter.\"},\"vBNB()\":{\"notice\":\"address of vBNB\"}},\"notice\":\"This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract, and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Admin/VBNBAdmin.sol\":\"VBNBAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 private _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\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"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\"},\"contracts/Admin/VBNBAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \\\"./VBNBAdminStorage.sol\\\";\\n\\n/**\\n * @title VBNBAdmin\\n * @author Venus\\n * @notice This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\\n */\\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\\n using SafeERC20Upgradeable for IWBNB;\\n\\n /// @notice address of vBNB\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n VTokenInterface public immutable vBNB;\\n\\n /// @notice address of WBNB contract\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IWBNB public immutable WBNB;\\n\\n /// @notice Emitted when PSR is updated\\n event ProtocolShareReserveUpdated(\\n IProtocolShareReserve indexed oldProtocolShareReserve,\\n IProtocolShareReserve indexed newProtocolShareReserve\\n );\\n\\n /// @notice Emitted reserves are reduced\\n event ReservesReduced(uint256 reduceAmount);\\n\\n /// @param _vBNB Address of the vBNB contract\\n /// @param _WBNB Address of the WBNB token\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\\n require(address(_WBNB) != address(0), \\\"WBNB address invalid\\\");\\n require(address(_vBNB) != address(0), \\\"vBNB address invalid\\\");\\n\\n vBNB = _vBNB;\\n WBNB = _WBNB;\\n\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n /// @notice Used to initialize non-immutable variables\\n function initialize(\\n IProtocolShareReserve _protocolShareReserve,\\n address accessControlManager\\n ) external initializer {\\n require(address(_protocolShareReserve) != address(0), \\\"PSR address invalid\\\");\\n protocolShareReserve = _protocolShareReserve;\\n\\n __ReentrancyGuard_init();\\n __AccessControlled_init(accessControlManager);\\n }\\n\\n /**\\n * @notice PSR setter.\\n * @param protocolShareReserve_ Address of the PSR contract\\n * @custom:access Only owner (Governance)\\n * @custom:event Emits ProtocolShareReserveUpdated event.\\n */\\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\\n require(address(protocolShareReserve_) != address(0), \\\"PSR address invalid\\\");\\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\\n protocolShareReserve = protocolShareReserve_;\\n }\\n\\n /**\\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\\n * @param reduceAmount amount of reserves to reduce\\n * @custom:event Emits ReservesReduced event.\\n */\\n function reduceReserves(uint reduceAmount) external nonReentrant {\\n require(vBNB._reduceReserves(reduceAmount) == 0, \\\"reduceReserves failed\\\");\\n _wrapBNB();\\n\\n uint256 balance = WBNB.balanceOf(address(this));\\n WBNB.safeTransfer(address(protocolShareReserve), balance);\\n protocolShareReserve.updateAssetsState(\\n vBNB.comptroller(),\\n address(WBNB),\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(reduceAmount);\\n }\\n\\n /**\\n * @notice Sets the interest rate model of the vBNB contract\\n * @param newInterestRateModel Address of the new interest rate model\\n * @custom:access Controlled by ACM\\n */\\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\\n _checkAccessAllowed(\\\"_setInterestRateModel(address)\\\");\\n return vBNB._setInterestRateModel(newInterestRateModel);\\n }\\n\\n /**\\n * @notice Wraps BNB into WBNB\\n */\\n function _wrapBNB() internal {\\n uint256 bnbBalance = address(this).balance;\\n WBNB.deposit{ value: bnbBalance }();\\n }\\n\\n /**\\n * @notice Invoked when BNB is sent to this contract\\n * @custom:access Only vBNB is considered a valid sender\\n */\\n receive() external payable {\\n require(msg.sender == address(vBNB), \\\"only vBNB can send BNB to this contract\\\");\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\\n * @custom:access Only owner (Governance)\\n */\\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0x75c310eb55af33b2d8ba3379b78e1692fbc537f9e7b802fdc565f13c2ea515c4\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdminStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\ninterface VTokenInterface {\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function _acceptAdmin() external returns (uint);\\n\\n function comptroller() external returns (address);\\n\\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n function deposit() external payable;\\n}\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\\ncontract VBNBAdminStorage {\\n /// @notice address of protocol share reserve contract\\n IProtocolShareReserve public protocolShareReserve;\\n\\n /// @dev gap to prevent collision in inheritence\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x75430843847643600d3bd145d8bd62f0c5b770e91a8aac30acce1ec3ebec0f5b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b5060405161173138038061173183398101604081905261002f916101d5565b6001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601460248201527f57424e42206164647265737320696e76616c696400000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166100e05760405162461bcd60e51b815260206004820152601460248201527f76424e42206164647265737320696e76616c69640000000000000000000000006044820152606401610081565b6001600160a01b03808316608052811660a0526100fb610102565b505061020f565b600054610100900460ff161561016a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610081565b60005460ff908116146101bb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101d257600080fd5b50565b600080604083850312156101e857600080fd5b82516101f3816101bd565b6020840151909250610204816101bd565b809150509250929050565b60805160a0516114bf610272600039600081816103a80152818161059a01528181610621015281816106f40152610c1b01526000818160f101528181610187015281816102c1015281816104c0015281816106700152610ad701526114bf6000f3fe6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220538caa24a6ce8f028660696e043a1581613ee53fbb89190e419046df6ae7cd5a64736f6c63430008190033", - "deployedBytecode": "0x6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601e81526020017f5f736574496e746572657374526174654d6f64656c2861646472657373290000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220538caa24a6ce8f028660696e043a1581613ee53fbb89190e419046df6ae7cd5a64736f6c63430008190033", + "numDeployments": 3, + "solcInputHash": "86ac02e99d571dfb77843c33a94d604f", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"_vBNB\",\"type\":\"address\"},{\"internalType\":\"contract IWBNB\",\"name\":\"_WBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\":\"contract IProtocolShareReserve\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"ProtocolShareReserveUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"contract IWBNB\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"_protocolShareReserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"reduceReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Venus\",\"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\":{\"_WBNB\":\"Address of the WBNB token\",\"_vBNB\":\"Address of the vBNB contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"reduceReserves(uint256)\":{\"custom:event\":\"Emits ReservesReduced event.\",\"params\":{\"reduceAmount\":\"amount of reserves to reduce\"}},\"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\"}},\"setInterestRateModel(address)\":{\"custom:access\":\"Controlled by ACM\",\"params\":{\"newInterestRateModel\":\"Address of the new interest rate model\"}},\"setProtocolShareReserve(address)\":{\"custom:access\":\"Only owner (Governance)\",\"custom:event\":\"Emits ProtocolShareReserveUpdated event.\",\"params\":{\"protocolShareReserve_\":\"Address of the PSR contract\"}},\"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.\"}},\"stateVariables\":{\"WBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"VBNBAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"ProtocolShareReserveUpdated(address,address)\":{\"notice\":\"Emitted when PSR is updated\"},\"ReservesReduced(uint256)\":{\"notice\":\"Emitted reserves are reduced\"}},\"kind\":\"user\",\"methods\":{\"WBNB()\":{\"notice\":\"address of WBNB contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"initialize(address,address)\":{\"notice\":\"Used to initialize non-immutable variables\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"reduceReserves(uint256)\":{\"notice\":\"Reduce reserves of vBNB, wrap them and send them to the PSR contract\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model of the vBNB contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"PSR setter.\"},\"vBNB()\":{\"notice\":\"address of vBNB\"}},\"notice\":\"This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract, and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Admin/VBNBAdmin.sol\":\"VBNBAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 private _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\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"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\"},\"contracts/Admin/VBNBAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \\\"./VBNBAdminStorage.sol\\\";\\n\\n/**\\n * @title VBNBAdmin\\n * @author Venus\\n * @notice This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\\n */\\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\\n using SafeERC20Upgradeable for IWBNB;\\n\\n /// @notice address of vBNB\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n VTokenInterface public immutable vBNB;\\n\\n /// @notice address of WBNB contract\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IWBNB public immutable WBNB;\\n\\n /// @notice Emitted when PSR is updated\\n event ProtocolShareReserveUpdated(\\n IProtocolShareReserve indexed oldProtocolShareReserve,\\n IProtocolShareReserve indexed newProtocolShareReserve\\n );\\n\\n /// @notice Emitted reserves are reduced\\n event ReservesReduced(uint256 reduceAmount);\\n\\n /// @param _vBNB Address of the vBNB contract\\n /// @param _WBNB Address of the WBNB token\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\\n require(address(_WBNB) != address(0), \\\"WBNB address invalid\\\");\\n require(address(_vBNB) != address(0), \\\"vBNB address invalid\\\");\\n\\n vBNB = _vBNB;\\n WBNB = _WBNB;\\n\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n /// @notice Used to initialize non-immutable variables\\n function initialize(\\n IProtocolShareReserve _protocolShareReserve,\\n address accessControlManager\\n ) external initializer {\\n require(address(_protocolShareReserve) != address(0), \\\"PSR address invalid\\\");\\n protocolShareReserve = _protocolShareReserve;\\n\\n __ReentrancyGuard_init();\\n __AccessControlled_init(accessControlManager);\\n }\\n\\n /**\\n * @notice PSR setter.\\n * @param protocolShareReserve_ Address of the PSR contract\\n * @custom:access Only owner (Governance)\\n * @custom:event Emits ProtocolShareReserveUpdated event.\\n */\\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\\n require(address(protocolShareReserve_) != address(0), \\\"PSR address invalid\\\");\\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\\n protocolShareReserve = protocolShareReserve_;\\n }\\n\\n /**\\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\\n * @param reduceAmount amount of reserves to reduce\\n * @custom:event Emits ReservesReduced event.\\n */\\n function reduceReserves(uint reduceAmount) external nonReentrant {\\n require(vBNB._reduceReserves(reduceAmount) == 0, \\\"reduceReserves failed\\\");\\n _wrapBNB();\\n\\n uint256 balance = WBNB.balanceOf(address(this));\\n WBNB.safeTransfer(address(protocolShareReserve), balance);\\n protocolShareReserve.updateAssetsState(\\n vBNB.comptroller(),\\n address(WBNB),\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(reduceAmount);\\n }\\n\\n /**\\n * @notice Sets the interest rate model of the vBNB contract\\n * @param newInterestRateModel Address of the new interest rate model\\n * @custom:access Controlled by ACM\\n */\\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\\n _checkAccessAllowed(\\\"setInterestRateModel(address)\\\");\\n return vBNB._setInterestRateModel(newInterestRateModel);\\n }\\n\\n /**\\n * @notice Wraps BNB into WBNB\\n */\\n function _wrapBNB() internal {\\n uint256 bnbBalance = address(this).balance;\\n WBNB.deposit{ value: bnbBalance }();\\n }\\n\\n /**\\n * @notice Invoked when BNB is sent to this contract\\n * @custom:access Only vBNB is considered a valid sender\\n */\\n receive() external payable {\\n require(msg.sender == address(vBNB), \\\"only vBNB can send BNB to this contract\\\");\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\\n * @custom:access Only owner (Governance)\\n */\\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0x515dad16e8d02229c184c30140c8c3945ef4a44c8dbaf3907e29e617da85dd3c\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdminStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\ninterface VTokenInterface {\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function _acceptAdmin() external returns (uint);\\n\\n function comptroller() external returns (address);\\n\\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n function deposit() external payable;\\n}\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\\ncontract VBNBAdminStorage {\\n /// @notice address of protocol share reserve contract\\n IProtocolShareReserve public protocolShareReserve;\\n\\n /// @dev gap to prevent collision in inheritence\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x75430843847643600d3bd145d8bd62f0c5b770e91a8aac30acce1ec3ebec0f5b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b5060405161173138038061173183398101604081905261002f916101d5565b6001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601460248201527f57424e42206164647265737320696e76616c696400000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166100e05760405162461bcd60e51b815260206004820152601460248201527f76424e42206164647265737320696e76616c69640000000000000000000000006044820152606401610081565b6001600160a01b03808316608052811660a0526100fb610102565b505061020f565b600054610100900460ff161561016a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610081565b60005460ff908116146101bb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101d257600080fd5b50565b600080604083850312156101e857600080fd5b82516101f3816101bd565b6020840151909250610204816101bd565b809150509250929050565b60805160a0516114bf610272600039600081816103a80152818161059a01528181610621015281816106f40152610c1b01526000818160f101528181610187015281816102c1015281816104c0015281816106700152610ad701526114bf6000f3fe6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601d81526020017f736574496e746572657374526174654d6f64656c286164647265737329000000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220571d20ad0cee3c6f3f28158a6ede877a7ccec3c47044ae46453014388b14c31f64736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601d81526020017f736574496e746572657374526174654d6f64656c286164647265737329000000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220571d20ad0cee3c6f3f28158a6ede877a7ccec3c47044ae46453014388b14c31f64736f6c63430008190033", "devdoc": { "author": "Venus", "events": { diff --git a/deployments/bscmainnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json b/deployments/bscmainnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json new file mode 100644 index 000000000..875a9ffa2 --- /dev/null +++ b/deployments/bscmainnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json @@ -0,0 +1,73 @@ +{ + "language": "Solidity", + "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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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 private _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" + }, + "@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" + }, + "contracts/Admin/VBNBAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \"./VBNBAdminStorage.sol\";\n\n/**\n * @title VBNBAdmin\n * @author Venus\n * @notice This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\n */\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\n using SafeERC20Upgradeable for IWBNB;\n\n /// @notice address of vBNB\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n VTokenInterface public immutable vBNB;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IWBNB public immutable WBNB;\n\n /// @notice Emitted when PSR is updated\n event ProtocolShareReserveUpdated(\n IProtocolShareReserve indexed oldProtocolShareReserve,\n IProtocolShareReserve indexed newProtocolShareReserve\n );\n\n /// @notice Emitted reserves are reduced\n event ReservesReduced(uint256 reduceAmount);\n\n /// @param _vBNB Address of the vBNB contract\n /// @param _WBNB Address of the WBNB token\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\n require(address(_WBNB) != address(0), \"WBNB address invalid\");\n require(address(_vBNB) != address(0), \"vBNB address invalid\");\n\n vBNB = _vBNB;\n WBNB = _WBNB;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /// @notice Used to initialize non-immutable variables\n function initialize(\n IProtocolShareReserve _protocolShareReserve,\n address accessControlManager\n ) external initializer {\n require(address(_protocolShareReserve) != address(0), \"PSR address invalid\");\n protocolShareReserve = _protocolShareReserve;\n\n __ReentrancyGuard_init();\n __AccessControlled_init(accessControlManager);\n }\n\n /**\n * @notice PSR setter.\n * @param protocolShareReserve_ Address of the PSR contract\n * @custom:access Only owner (Governance)\n * @custom:event Emits ProtocolShareReserveUpdated event.\n */\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\n require(address(protocolShareReserve_) != address(0), \"PSR address invalid\");\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\n * @param reduceAmount amount of reserves to reduce\n * @custom:event Emits ReservesReduced event.\n */\n function reduceReserves(uint reduceAmount) external nonReentrant {\n require(vBNB._reduceReserves(reduceAmount) == 0, \"reduceReserves failed\");\n _wrapBNB();\n\n uint256 balance = WBNB.balanceOf(address(this));\n WBNB.safeTransfer(address(protocolShareReserve), balance);\n protocolShareReserve.updateAssetsState(\n vBNB.comptroller(),\n address(WBNB),\n IProtocolShareReserve.IncomeType.SPREAD\n );\n\n emit ReservesReduced(reduceAmount);\n }\n\n /**\n * @notice Sets the interest rate model of the vBNB contract\n * @param newInterestRateModel Address of the new interest rate model\n * @custom:access Controlled by ACM\n */\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\n _checkAccessAllowed(\"setInterestRateModel(address)\");\n return vBNB._setInterestRateModel(newInterestRateModel);\n }\n\n /**\n * @notice Wraps BNB into WBNB\n */\n function _wrapBNB() internal {\n uint256 bnbBalance = address(this).balance;\n WBNB.deposit{ value: bnbBalance }();\n }\n\n /**\n * @notice Invoked when BNB is sent to this contract\n * @custom:access Only vBNB is considered a valid sender\n */\n receive() external payable {\n require(msg.sender == address(vBNB), \"only vBNB can send BNB to this contract\");\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\n * @custom:access Only owner (Governance)\n */\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\n require(ok, \"call failed\");\n return res;\n }\n}\n" + }, + "contracts/Admin/VBNBAdminStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\ninterface VTokenInterface {\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function _acceptAdmin() external returns (uint);\n\n function comptroller() external returns (address);\n\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ncontract VBNBAdminStorage {\n /// @notice address of protocol share reserve contract\n IProtocolShareReserve public protocolShareReserve;\n\n /// @dev gap to prevent collision in inheritence\n uint256[49] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} From d89969ae25a6715016af56d62cc4a55d773d19a8 Mon Sep 17 00:00:00 2001 From: narayanprusty Date: Tue, 4 Jun 2024 08:21:54 +0000 Subject: [PATCH 12/85] feat: updating deployment files --- deployments/bscmainnet.json | 2 +- deployments/bscmainnet_addresses.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index 56df033e5..f33c5a597 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -45675,7 +45675,7 @@ ] }, "VBNBAdmin_Implementation": { - "address": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", + "address": "0xaA8D9558d8D45666552a72CECbdd0a746aeaCDc9", "abi": [ { "inputs": [ diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 1c6d70230..186f7dfea 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -92,7 +92,7 @@ "VAIVaultProxy_Implementation": "0xa52f2a56abb7cbdd378bc36c6088fafeaf9ac423", "VAIVaultProxy_Proxy": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", "VBNBAdmin": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", - "VBNBAdmin_Implementation": "0x611e8ef0020BAa9FCA2583778B43E7A240Ef7EcC", + "VBNBAdmin_Implementation": "0xaA8D9558d8D45666552a72CECbdd0a746aeaCDc9", "VBNBAdmin_Proxy": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", "VBep20Delegate": "0x6E5cFf66C7b671fA1D5782866D80BD15955d79F6", "VRT": "0x5f84ce30dc3cf7909101c69086c50de191895883", From 613418cf1e29b35ac777364757c6de0816940ad1 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Wed, 5 Jun 2024 13:18:06 +0530 Subject: [PATCH 13/85] fix: deployed on testnet --- .../bsctestnet/VBNBAdmin_Implementation.json | 110 +++++++++++++----- .../86ac02e99d571dfb77843c33a94d604f.json | 73 ++++++++++++ 2 files changed, 152 insertions(+), 31 deletions(-) create mode 100644 deployments/bsctestnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json diff --git a/deployments/bsctestnet/VBNBAdmin_Implementation.json b/deployments/bsctestnet/VBNBAdmin_Implementation.json index 424841b4c..d136499a7 100644 --- a/deployments/bsctestnet/VBNBAdmin_Implementation.json +++ b/deployments/bsctestnet/VBNBAdmin_Implementation.json @@ -1,5 +1,5 @@ { - "address": "0x698B2c7c82B980265ed4B4a7653a5735E93767b4", + "address": "0x90c891bb2b1821ADE159ECa6FbA0418b2bD1b86D", "abi": [ { "inputs": [ @@ -267,6 +267,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -311,47 +330,57 @@ "type": "receive" } ], - "transactionHash": "0xa639c1fb64a21bbcfa0834f9200538948cf85bda9428e284234bd701d0d0aace", + "transactionHash": "0xc0c001791cbff86e06e506e1c1a92f482a1b72a00e5b23a4abc61befdd53886a", "receipt": { "to": null, - "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", - "contractAddress": "0x698B2c7c82B980265ed4B4a7653a5735E93767b4", - "transactionIndex": 0, - "gasUsed": "1115623", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000204000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x646e8e83e665d49ec629b9b4afbffbaff63e4f84484ef683bc145b1fb294d66d", - "transactionHash": "0xa639c1fb64a21bbcfa0834f9200538948cf85bda9428e284234bd701d0d0aace", + "from": "0x464779C41C5f1Be598853C1F87bCC7087Ea75f28", + "contractAddress": "0x90c891bb2b1821ADE159ECa6FbA0418b2bD1b86D", + "transactionIndex": 2, + "gasUsed": "1230244", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf74f5f333cecf84c42c5a05962e1efec4515e4331e4c0b44104aff162bf32836", + "transactionHash": "0xc0c001791cbff86e06e506e1c1a92f482a1b72a00e5b23a4abc61befdd53886a", "logs": [ { - "transactionIndex": 0, - "blockNumber": 34111882, - "transactionHash": "0xa639c1fb64a21bbcfa0834f9200538948cf85bda9428e284234bd701d0d0aace", - "address": "0x698B2c7c82B980265ed4B4a7653a5735E93767b4", + "transactionIndex": 2, + "blockNumber": 40951782, + "transactionHash": "0xc0c001791cbff86e06e506e1c1a92f482a1b72a00e5b23a4abc61befdd53886a", + "address": "0x90c891bb2b1821ADE159ECa6FbA0418b2bD1b86D", "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0x646e8e83e665d49ec629b9b4afbffbaff63e4f84484ef683bc145b1fb294d66d" + "logIndex": 4, + "blockHash": "0xf74f5f333cecf84c42c5a05962e1efec4515e4331e4c0b44104aff162bf32836" } ], - "blockNumber": 34111882, - "cumulativeGasUsed": "1115623", + "blockNumber": 40951782, + "cumulativeGasUsed": "1353394", "status": 1, "byzantium": true }, "args": ["0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c", "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd"], - "numDeployments": 1, - "solcInputHash": "9c6b851a5034b2ff812c942adcca86e5", - "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"_vBNB\",\"type\":\"address\"},{\"internalType\":\"contract IWBNB\",\"name\":\"_WBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\":\"contract IProtocolShareReserve\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"ProtocolShareReserveUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"contract IWBNB\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"_protocolShareReserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"reduceReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"reduceReserves(uint256)\":{\"params\":{\"reduceAmount\":\"amount of reserves to reduce\"}},\"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\"}},\"setProtocolShareReserve(address)\":{\"details\":\"PSR setter.\",\"params\":{\"protocolShareReserve_\":\"Address of the PSR contract\"}},\"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.\"}},\"stateVariables\":{\"WBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"ProtocolShareReserveUpdated(address,address)\":{\"notice\":\"Emitted when PSR is updated\"},\"ReservesReduced(uint256)\":{\"notice\":\"Emitted reserves are reduced\"}},\"kind\":\"user\",\"methods\":{\"WBNB()\":{\"notice\":\"address of WBNB contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"reduceReserves(uint256)\":{\"notice\":\"Reduce reserves of vBNB\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"vBNB()\":{\"notice\":\"address of vBNB\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Admin/VBNBAdmin.sol\":\"VBNBAdmin\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\\\";\\n\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title Venus Access Control Contract.\\n * @dev The AccessControlledV8 contract is a wrapper around the OpenZeppelin AccessControl contract\\n * It provides a standardized way to control access to methods within the Venus Smart Contract Ecosystem.\\n * The contract allows the owner to set an AccessControlManager contract address.\\n * It can restrict method calls based on the sender's role and the method's signature.\\n */\\n\\nabstract contract AccessControlledV8 is Initializable, Ownable2StepUpgradeable {\\n /// @notice Access control manager contract\\n IAccessControlManagerV8 private _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\":\"0x618d942756b93e02340a42f3c80aa99fc56be1a96861f5464dc23a76bf30b3a5\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\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\":\"0x41deef84d1839590b243b66506691fde2fb938da01eabde53e82d3b8316fdaf9\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport \\\"./VBNBAdminStorage.sol\\\";\\n\\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\\n using SafeERC20Upgradeable for IWBNB;\\n\\n /// @notice address of vBNB\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n VTokenInterface public immutable vBNB;\\n\\n /// @notice address of WBNB contract\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IWBNB public immutable WBNB;\\n\\n /// @notice Emitted when PSR is updated\\n event ProtocolShareReserveUpdated(\\n IProtocolShareReserve indexed oldProtocolShareReserve,\\n IProtocolShareReserve indexed newProtocolShareReserve\\n );\\n\\n /// @notice Emitted reserves are reduced\\n event ReservesReduced(uint256 reduceAmount);\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\\n require(address(_WBNB) != address(0), \\\"WBNB address invalid\\\");\\n require(address(_vBNB) != address(0), \\\"vBNB address invalid\\\");\\n\\n vBNB = _vBNB;\\n WBNB = _WBNB;\\n\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n function initialize(\\n IProtocolShareReserve _protocolShareReserve,\\n address accessControlManager\\n ) external initializer {\\n require(address(_protocolShareReserve) != address(0), \\\"PSR address invalid\\\");\\n protocolShareReserve = _protocolShareReserve;\\n\\n __ReentrancyGuard_init();\\n __AccessControlled_init(accessControlManager);\\n }\\n\\n /**\\n * @dev PSR setter.\\n * @param protocolShareReserve_ Address of the PSR contract\\n */\\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\\n require(address(protocolShareReserve_) != address(0), \\\"PSR address invalid\\\");\\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\\n protocolShareReserve = protocolShareReserve_;\\n }\\n\\n /**\\n * @notice Reduce reserves of vBNB\\n * @param reduceAmount amount of reserves to reduce\\n */\\n function reduceReserves(uint reduceAmount) external nonReentrant {\\n require(vBNB._reduceReserves(reduceAmount) == 0, \\\"reduceReserves failed\\\");\\n _wrapBNB();\\n\\n uint256 balance = WBNB.balanceOf(address(this));\\n WBNB.safeTransfer(address(protocolShareReserve), balance);\\n protocolShareReserve.updateAssetsState(\\n vBNB.comptroller(),\\n address(WBNB),\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(reduceAmount);\\n }\\n\\n /**\\n * @notice Wraps BNB into WBNB\\n */\\n function _wrapBNB() internal {\\n uint256 bnbBalance = address(this).balance;\\n WBNB.deposit{ value: bnbBalance }();\\n }\\n\\n /**\\n * @notice Invoked when BNB is sent to this contract\\n */\\n receive() external payable {\\n require(msg.sender == address(vBNB), \\\"only vBNB can send BNB to this contract\\\");\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract\\n */\\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0x1e33043f7ed9ae20c800973fbb88d68fffb91eb0e4f7e0c73fa0a068db0020aa\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdminStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\ninterface VTokenInterface {\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function _acceptAdmin() external returns (uint);\\n\\n function comptroller() external returns (address);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n function deposit() external payable;\\n}\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\\ncontract VBNBAdminStorage {\\n /// @notice address of protocol share reserve contract\\n IProtocolShareReserve public protocolShareReserve;\\n\\n /// @dev gap to prevent collision in inheritence\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x125843041683cc2f550a611ef597ddee5f573e26929efd8bbd5b8aa40a83aeb5\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200152c3803806200152c8339810160408190526200003491620001e4565b6001600160a01b038116620000905760405162461bcd60e51b815260206004820152601460248201527f57424e42206164647265737320696e76616c696400000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620000e85760405162461bcd60e51b815260206004820152601460248201527f76424e42206164647265737320696e76616c6964000000000000000000000000604482015260640162000087565b6001600160a01b03808316608052811660a052620001056200010d565b505062000223565b600054610100900460ff1615620001775760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840162000087565b60005460ff90811614620001c9576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b0381168114620001e157600080fd5b50565b60008060408385031215620001f857600080fd5b82516200020581620001cb565b60208401519092506200021881620001cb565b809150509250929050565b60805160a0516112ac620002806000396000818161035e01528181610550015281816105d7015281816106aa0152610aff01526000818160d60152818161016c015281816102a601528181610476015261062601526112ac6000f3fe6080604052600436106100c65760003560e01c806379ba50971161007f578063b4a0bdf311610059578063b4a0bdf314610380578063e30c39781461039e578063e9a44fd9146103bc578063f2fde38b146103dc5761015a565b806379ba5097146103195780638da5cb5b1461032e5780638dd950021461034c5761015a565b806307e27959146102345780630e32cb8614610254578063107568df1461027457806333e1567f14610294578063485cc955146102e4578063715018a6146103045761015a565b3661015a57336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101585760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b60003660606101676103fc565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101a5929190611075565b60006040518083038185875af1925050503d80600081146101e2576040519150601f19603f3d011682016040523d82523d6000602084013e6101e7565b606091505b5091509150816102275760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014f565b8051945060200192505050f35b34801561024057600080fd5b5061015861024f366004611085565b610458565b34801561026057600080fd5b5061015861026f3660046110b3565b610761565b34801561028057600080fd5b5061015861028f3660046110b3565b610772565b3480156102a057600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156102f057600080fd5b506101586102ff3660046110d7565b610822565b34801561031057600080fd5b506101586109a5565b34801561032557600080fd5b506101586109b7565b34801561033a57600080fd5b506065546001600160a01b03166102c8565b34801561035857600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561038c57600080fd5b5060c9546001600160a01b03166102c8565b3480156103aa57600080fd5b506097546001600160a01b03166102c8565b3480156103c857600080fd5b5060fb546102c8906001600160a01b031681565b3480156103e857600080fd5b506101586103f73660046110b3565b610a2e565b6065546001600160a01b031633146104565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014f565b565b610460610a9f565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611110565b156105305760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161014f565b610538610af8565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561059f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611110565b60fb54909150610600906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610b74565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190611129565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b81526004016106e993929190611146565b600060405180830381600087803b15801561070357600080fd5b505af1158015610717573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161074c91815260200190565b60405180910390a15061075e60018055565b50565b6107696103fc565b61075e81610bcc565b61077a6103fc565b6001600160a01b0381166107c65760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156108425750600054600160ff909116105b8061085c5750303b15801561085c575060005460ff166001145b6108bf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014f565b6000805460ff1916600117905580156108e2576000805461ff0019166101001790555b6001600160a01b03831661092e5760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb80546001600160a01b0319166001600160a01b038516179055610951610c91565b61095a82610cc0565b80156109a0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109ad6103fc565b6104566000610cf8565b60975433906001600160a01b03168114610a255760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014f565b61075e81610cf8565b610a366103fc565b609780546001600160a01b0383166001600160a01b03199091168117909155610a676065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610af15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161014f565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b5857600080fd5b505af1158015610b6c573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109a0908490610d11565b60018055565b6001600160a01b038116610c305760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014f565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610cb85760405162461bcd60e51b815260040161014f9061118a565b610456610de6565b600054610100900460ff16610ce75760405162461bcd60e51b815260040161014f9061118a565b610cef610e0d565b61075e81610e3c565b609780546001600160a01b031916905561075e81610e63565b6000610d66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610eb59092919063ffffffff16565b9050805160001480610d87575080806020019051810190610d8791906111d5565b6109a05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161014f565b600054610100900460ff16610bc65760405162461bcd60e51b815260040161014f9061118a565b600054610100900460ff16610e345760405162461bcd60e51b815260040161014f9061118a565b610456610ecc565b600054610100900460ff166107695760405162461bcd60e51b815260040161014f9061118a565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060610ec48484600085610efc565b949350505050565b600054610100900460ff16610ef35760405162461bcd60e51b815260040161014f9061118a565b61045633610cf8565b606082471015610f5d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161014f565b600080866001600160a01b03168587604051610f799190611227565b60006040518083038185875af1925050503d8060008114610fb6576040519150601f19603f3d011682016040523d82523d6000602084013e610fbb565b606091505b5091509150610fcc87838387610fd7565b979650505050505050565b6060831561104657825160000361103f576001600160a01b0385163b61103f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014f565b5081610ec4565b610ec4838381511561105b5781518083602001fd5b8060405162461bcd60e51b815260040161014f9190611243565b8183823760009101908152919050565b60006020828403121561109757600080fd5b5035919050565b6001600160a01b038116811461075e57600080fd5b6000602082840312156110c557600080fd5b81356110d08161109e565b9392505050565b600080604083850312156110ea57600080fd5b82356110f58161109e565b915060208301356111058161109e565b809150509250929050565b60006020828403121561112257600080fd5b5051919050565b60006020828403121561113b57600080fd5b81516110d08161109e565b6001600160a01b03848116825283166020820152606081016002831061117c57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156111e757600080fd5b815180151581146110d057600080fd5b60005b838110156112125781810151838201526020016111fa565b83811115611221576000848401525b50505050565b600082516112398184602087016111f7565b9190910192915050565b60208152600082518060208401526112628160408501602087016111f7565b601f01601f1916919091016040019291505056fea2646970667358221220d221281eae8d1340bcba685e6151bc3cb01bba09ff6e580b682a236f2126eef864736f6c634300080d0033", - "deployedBytecode": "0x6080604052600436106100c65760003560e01c806379ba50971161007f578063b4a0bdf311610059578063b4a0bdf314610380578063e30c39781461039e578063e9a44fd9146103bc578063f2fde38b146103dc5761015a565b806379ba5097146103195780638da5cb5b1461032e5780638dd950021461034c5761015a565b806307e27959146102345780630e32cb8614610254578063107568df1461027457806333e1567f14610294578063485cc955146102e4578063715018a6146103045761015a565b3661015a57336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101585760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b60003660606101676103fc565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101a5929190611075565b60006040518083038185875af1925050503d80600081146101e2576040519150601f19603f3d011682016040523d82523d6000602084013e6101e7565b606091505b5091509150816102275760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161014f565b8051945060200192505050f35b34801561024057600080fd5b5061015861024f366004611085565b610458565b34801561026057600080fd5b5061015861026f3660046110b3565b610761565b34801561028057600080fd5b5061015861028f3660046110b3565b610772565b3480156102a057600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b3480156102f057600080fd5b506101586102ff3660046110d7565b610822565b34801561031057600080fd5b506101586109a5565b34801561032557600080fd5b506101586109b7565b34801561033a57600080fd5b506065546001600160a01b03166102c8565b34801561035857600080fd5b506102c87f000000000000000000000000000000000000000000000000000000000000000081565b34801561038c57600080fd5b5060c9546001600160a01b03166102c8565b3480156103aa57600080fd5b506097546001600160a01b03166102c8565b3480156103c857600080fd5b5060fb546102c8906001600160a01b031681565b3480156103e857600080fd5b506101586103f73660046110b3565b610a2e565b6065546001600160a01b031633146104565760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161014f565b565b610460610a9f565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af11580156104c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104eb9190611110565b156105305760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161014f565b610538610af8565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561059f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611110565b60fb54909150610600906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610b74565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a89190611129565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b81526004016106e993929190611146565b600060405180830381600087803b15801561070357600080fd5b505af1158015610717573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161074c91815260200190565b60405180910390a15061075e60018055565b50565b6107696103fc565b61075e81610bcc565b61077a6103fc565b6001600160a01b0381166107c65760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16158080156108425750600054600160ff909116105b8061085c5750303b15801561085c575060005460ff166001145b6108bf5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161014f565b6000805460ff1916600117905580156108e2576000805461ff0019166101001790555b6001600160a01b03831661092e5760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161014f565b60fb80546001600160a01b0319166001600160a01b038516179055610951610c91565b61095a82610cc0565b80156109a0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109ad6103fc565b6104566000610cf8565b60975433906001600160a01b03168114610a255760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161014f565b61075e81610cf8565b610a366103fc565b609780546001600160a01b0383166001600160a01b03199091168117909155610a676065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610af15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161014f565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b5857600080fd5b505af1158015610b6c573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109a0908490610d11565b60018055565b6001600160a01b038116610c305760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161014f565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610cb85760405162461bcd60e51b815260040161014f9061118a565b610456610de6565b600054610100900460ff16610ce75760405162461bcd60e51b815260040161014f9061118a565b610cef610e0d565b61075e81610e3c565b609780546001600160a01b031916905561075e81610e63565b6000610d66826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610eb59092919063ffffffff16565b9050805160001480610d87575080806020019051810190610d8791906111d5565b6109a05760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161014f565b600054610100900460ff16610bc65760405162461bcd60e51b815260040161014f9061118a565b600054610100900460ff16610e345760405162461bcd60e51b815260040161014f9061118a565b610456610ecc565b600054610100900460ff166107695760405162461bcd60e51b815260040161014f9061118a565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6060610ec48484600085610efc565b949350505050565b600054610100900460ff16610ef35760405162461bcd60e51b815260040161014f9061118a565b61045633610cf8565b606082471015610f5d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161014f565b600080866001600160a01b03168587604051610f799190611227565b60006040518083038185875af1925050503d8060008114610fb6576040519150601f19603f3d011682016040523d82523d6000602084013e610fbb565b606091505b5091509150610fcc87838387610fd7565b979650505050505050565b6060831561104657825160000361103f576001600160a01b0385163b61103f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161014f565b5081610ec4565b610ec4838381511561105b5781518083602001fd5b8060405162461bcd60e51b815260040161014f9190611243565b8183823760009101908152919050565b60006020828403121561109757600080fd5b5035919050565b6001600160a01b038116811461075e57600080fd5b6000602082840312156110c557600080fd5b81356110d08161109e565b9392505050565b600080604083850312156110ea57600080fd5b82356110f58161109e565b915060208301356111058161109e565b809150509250929050565b60006020828403121561112257600080fd5b5051919050565b60006020828403121561113b57600080fd5b81516110d08161109e565b6001600160a01b03848116825283166020820152606081016002831061117c57634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000602082840312156111e757600080fd5b815180151581146110d057600080fd5b60005b838110156112125781810151838201526020016111fa565b83811115611221576000848401525b50505050565b600082516112398184602087016111f7565b9190910192915050565b60208152600082518060208401526112628160408501602087016111f7565b601f01601f1916919091016040019291505056fea2646970667358221220d221281eae8d1340bcba685e6151bc3cb01bba09ff6e580b682a236f2126eef864736f6c634300080d0033", + "numDeployments": 2, + "solcInputHash": "86ac02e99d571dfb77843c33a94d604f", + "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"_vBNB\",\"type\":\"address\"},{\"internalType\":\"contract IWBNB\",\"name\":\"_WBNB\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\":\"contract IProtocolShareReserve\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"ProtocolShareReserveUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"WBNB\",\"outputs\":[{\"internalType\":\"contract IWBNB\",\"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\":\"contract IProtocolShareReserve\",\"name\":\"_protocolShareReserve\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"accessControlManager\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"reduceReserves\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IProtocolShareReserve\",\"name\":\"protocolShareReserve_\",\"type\":\"address\"}],\"name\":\"setProtocolShareReserve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vBNB\",\"outputs\":[{\"internalType\":\"contract VTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Venus\",\"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\":{\"_WBNB\":\"Address of the WBNB token\",\"_vBNB\":\"Address of the vBNB contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"reduceReserves(uint256)\":{\"custom:event\":\"Emits ReservesReduced event.\",\"params\":{\"reduceAmount\":\"amount of reserves to reduce\"}},\"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\"}},\"setInterestRateModel(address)\":{\"custom:access\":\"Controlled by ACM\",\"params\":{\"newInterestRateModel\":\"Address of the new interest rate model\"}},\"setProtocolShareReserve(address)\":{\"custom:access\":\"Only owner (Governance)\",\"custom:event\":\"Emits ProtocolShareReserveUpdated event.\",\"params\":{\"protocolShareReserve_\":\"Address of the PSR contract\"}},\"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.\"}},\"stateVariables\":{\"WBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"vBNB\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"VBNBAdmin\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"ProtocolShareReserveUpdated(address,address)\":{\"notice\":\"Emitted when PSR is updated\"},\"ReservesReduced(uint256)\":{\"notice\":\"Emitted reserves are reduced\"}},\"kind\":\"user\",\"methods\":{\"WBNB()\":{\"notice\":\"address of WBNB contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"initialize(address,address)\":{\"notice\":\"Used to initialize non-immutable variables\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"reduceReserves(uint256)\":{\"notice\":\"Reduce reserves of vBNB, wrap them and send them to the PSR contract\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setInterestRateModel(address)\":{\"notice\":\"Sets the interest rate model of the vBNB contract\"},\"setProtocolShareReserve(address)\":{\"notice\":\"PSR setter.\"},\"vBNB()\":{\"notice\":\"address of vBNB\"}},\"notice\":\"This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract, and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Admin/VBNBAdmin.sol\":\"VBNBAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"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 private _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\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"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\"},\"contracts/Admin/VBNBAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\\\";\\nimport \\\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \\\"./VBNBAdminStorage.sol\\\";\\n\\n/**\\n * @title VBNBAdmin\\n * @author Venus\\n * @notice This contract is the \\\"admin\\\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\\n */\\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\\n using SafeERC20Upgradeable for IWBNB;\\n\\n /// @notice address of vBNB\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n VTokenInterface public immutable vBNB;\\n\\n /// @notice address of WBNB contract\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n IWBNB public immutable WBNB;\\n\\n /// @notice Emitted when PSR is updated\\n event ProtocolShareReserveUpdated(\\n IProtocolShareReserve indexed oldProtocolShareReserve,\\n IProtocolShareReserve indexed newProtocolShareReserve\\n );\\n\\n /// @notice Emitted reserves are reduced\\n event ReservesReduced(uint256 reduceAmount);\\n\\n /// @param _vBNB Address of the vBNB contract\\n /// @param _WBNB Address of the WBNB token\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\\n require(address(_WBNB) != address(0), \\\"WBNB address invalid\\\");\\n require(address(_vBNB) != address(0), \\\"vBNB address invalid\\\");\\n\\n vBNB = _vBNB;\\n WBNB = _WBNB;\\n\\n // Note that the contract is upgradeable. Use initialize() or reinitializers\\n // to set the state variables.\\n _disableInitializers();\\n }\\n\\n /// @notice Used to initialize non-immutable variables\\n function initialize(\\n IProtocolShareReserve _protocolShareReserve,\\n address accessControlManager\\n ) external initializer {\\n require(address(_protocolShareReserve) != address(0), \\\"PSR address invalid\\\");\\n protocolShareReserve = _protocolShareReserve;\\n\\n __ReentrancyGuard_init();\\n __AccessControlled_init(accessControlManager);\\n }\\n\\n /**\\n * @notice PSR setter.\\n * @param protocolShareReserve_ Address of the PSR contract\\n * @custom:access Only owner (Governance)\\n * @custom:event Emits ProtocolShareReserveUpdated event.\\n */\\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\\n require(address(protocolShareReserve_) != address(0), \\\"PSR address invalid\\\");\\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\\n protocolShareReserve = protocolShareReserve_;\\n }\\n\\n /**\\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\\n * @param reduceAmount amount of reserves to reduce\\n * @custom:event Emits ReservesReduced event.\\n */\\n function reduceReserves(uint reduceAmount) external nonReentrant {\\n require(vBNB._reduceReserves(reduceAmount) == 0, \\\"reduceReserves failed\\\");\\n _wrapBNB();\\n\\n uint256 balance = WBNB.balanceOf(address(this));\\n WBNB.safeTransfer(address(protocolShareReserve), balance);\\n protocolShareReserve.updateAssetsState(\\n vBNB.comptroller(),\\n address(WBNB),\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(reduceAmount);\\n }\\n\\n /**\\n * @notice Sets the interest rate model of the vBNB contract\\n * @param newInterestRateModel Address of the new interest rate model\\n * @custom:access Controlled by ACM\\n */\\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\\n _checkAccessAllowed(\\\"setInterestRateModel(address)\\\");\\n return vBNB._setInterestRateModel(newInterestRateModel);\\n }\\n\\n /**\\n * @notice Wraps BNB into WBNB\\n */\\n function _wrapBNB() internal {\\n uint256 bnbBalance = address(this).balance;\\n WBNB.deposit{ value: bnbBalance }();\\n }\\n\\n /**\\n * @notice Invoked when BNB is sent to this contract\\n * @custom:access Only vBNB is considered a valid sender\\n */\\n receive() external payable {\\n require(msg.sender == address(vBNB), \\\"only vBNB can send BNB to this contract\\\");\\n }\\n\\n /**\\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\\n * @custom:access Only owner (Governance)\\n */\\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\\n require(ok, \\\"call failed\\\");\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0x515dad16e8d02229c184c30140c8c3945ef4a44c8dbaf3907e29e617da85dd3c\",\"license\":\"BSD-3-Clause\"},\"contracts/Admin/VBNBAdminStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\\\";\\n\\ninterface VTokenInterface {\\n function _reduceReserves(uint reduceAmount) external returns (uint);\\n\\n function _acceptAdmin() external returns (uint);\\n\\n function comptroller() external returns (address);\\n\\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\\n}\\n\\ninterface IWBNB is IERC20Upgradeable {\\n function deposit() external payable;\\n}\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\\ncontract VBNBAdminStorage {\\n /// @notice address of protocol share reserve contract\\n IProtocolShareReserve public protocolShareReserve;\\n\\n /// @dev gap to prevent collision in inheritence\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x75430843847643600d3bd145d8bd62f0c5b770e91a8aac30acce1ec3ebec0f5b\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b5060405161173138038061173183398101604081905261002f916101d5565b6001600160a01b03811661008a5760405162461bcd60e51b815260206004820152601460248201527f57424e42206164647265737320696e76616c696400000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b0382166100e05760405162461bcd60e51b815260206004820152601460248201527f76424e42206164647265737320696e76616c69640000000000000000000000006044820152606401610081565b6001600160a01b03808316608052811660a0526100fb610102565b505061020f565b600054610100900460ff161561016a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608401610081565b60005460ff908116146101bb576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6001600160a01b03811681146101d257600080fd5b50565b600080604083850312156101e857600080fd5b82516101f3816101bd565b6020840151909250610204816101bd565b809150509250929050565b60805160a0516114bf610272600039600081816103a80152818161059a01528181610621015281816106f40152610c1b01526000818160f101528181610187015281816102c1015281816104c0015281816106700152610ad701526114bf6000f3fe6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601d81526020017f736574496e746572657374526174654d6f64656c286164647265737329000000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220571d20ad0cee3c6f3f28158a6ede877a7ccec3c47044ae46453014388b14c31f64736f6c63430008190033", + "deployedBytecode": "0x6080604052600436106100e15760003560e01c80638bcd40161161007f578063b4a0bdf311610059578063b4a0bdf3146103ca578063e30c3978146103e8578063e9a44fd914610406578063f2fde38b1461042657610175565b80638bcd40161461034a5780638da5cb5b146103785780638dd950021461039657610175565b806333e1567f116100bb57806333e1567f146102af578063485cc95514610300578063715018a61461032057806379ba50971461033557610175565b806307e279591461024f5780630e32cb861461026f578063107568df1461028f57610175565b3661017557336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101735760405162461bcd60e51b815260206004820152602760248201527f6f6e6c792076424e422063616e2073656e6420424e4220746f207468697320636044820152661bdb9d1c9858dd60ca1b60648201526084015b60405180910390fd5b005b6000366060610182610446565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163486866040516101c092919061122f565b60006040518083038185875af1925050503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b5091509150816102425760405162461bcd60e51b815260206004820152600b60248201526a18d85b1b0819985a5b195960aa1b604482015260640161016a565b8051945060200192505050f35b34801561025b57600080fd5b5061017361026a36600461123f565b6104a2565b34801561027b57600080fd5b5061017361028a36600461126d565b6107ab565b34801561029b57600080fd5b506101736102aa36600461126d565b6107bc565b3480156102bb57600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561030c57600080fd5b5061017361031b366004611291565b61086c565b34801561032c57600080fd5b506101736109ef565b34801561034157600080fd5b50610173610a01565b34801561035657600080fd5b5061036a61036536600461126d565b610a78565b6040519081526020016102f7565b34801561038457600080fd5b506065546001600160a01b03166102e3565b3480156103a257600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d657600080fd5b5060c9546001600160a01b03166102e3565b3480156103f457600080fd5b506097546001600160a01b03166102e3565b34801561041257600080fd5b5060fb546102e3906001600160a01b031681565b34801561043257600080fd5b5061017361044136600461126d565b610b4a565b6065546001600160a01b031633146104a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161016a565b565b6104aa610bbb565b60405163601a0bf160e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063601a0bf1906024016020604051808303816000875af1158015610511573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053591906112ca565b1561057a5760405162461bcd60e51b81526020600482015260156024820152741c99591d58d954995cd95c9d995cc819985a5b1959605a1b604482015260640161016a565b610582610c14565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060d91906112ca565b60fb5490915061064a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683610c90565b60fb60009054906101000a90046001600160a01b03166001600160a01b03166316faecec7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635fe3b5676040518163ffffffff1660e01b81526004016020604051808303816000875af11580156106ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f291906112e3565b7f000000000000000000000000000000000000000000000000000000000000000060006040518463ffffffff1660e01b815260040161073393929190611300565b600060405180830381600087803b15801561074d57600080fd5b505af1158015610761573d6000803e3d6000fd5b505050507f5613a0582c3342b7f79f0fb769c4fc616285893163837fa2891a118ee024b0d68260405161079691815260200190565b60405180910390a1506107a860018055565b50565b6107b3610446565b6107a881610ce8565b6107c4610446565b6001600160a01b0381166108105760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb546040516001600160a01b038084169216907f67bd76c153f3af98b05bd613863bf4115f6c5fd2628d2bf2b498259cfc169e2790600090a360fb80546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff161580801561088c5750600054600160ff909116105b806108a65750303b1580156108a6575060005460ff166001145b6109095760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161016a565b6000805460ff19166001179055801561092c576000805461ff0019166101001790555b6001600160a01b0383166109785760405162461bcd60e51b81526020600482015260136024820152721414d4881859191c995cdcc81a5b9d985b1a59606a1b604482015260640161016a565b60fb80546001600160a01b0319166001600160a01b03851617905561099b610dad565b6109a482610ddc565b80156109ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6109f7610446565b6104a06000610e14565b60975433906001600160a01b03168114610a6f5760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b606482015260840161016a565b6107a881610e14565b6000610ab86040518060400160405280601d81526020017f736574496e746572657374526174654d6f64656c286164647265737329000000815250610e2d565b60405163f2b3abbd60e01b81526001600160a01b0383811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f2b3abbd906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906112ca565b92915050565b610b52610446565b609780546001600160a01b0383166001600160a01b03199091168117909155610b836065546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600260015403610c0d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161016a565b6002600155565b60004790507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c7457600080fd5b505af1158015610c88573d6000803e3d6000fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ea908490610ecb565b60018055565b6001600160a01b038116610d4c5760405162461bcd60e51b815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e61676572206164604482015264647265737360d81b606482015260840161016a565b60c980546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0910160405180910390a15050565b600054610100900460ff16610dd45760405162461bcd60e51b815260040161016a90611344565b6104a0610fa0565b600054610100900460ff16610e035760405162461bcd60e51b815260040161016a90611344565b610e0b610fc7565b6107a881610ff6565b609780546001600160a01b03191690556107a88161101d565b60c9546040516318c5e8ab60e01b81526000916001600160a01b0316906318c5e8ab90610e6090339086906004016113df565b602060405180830381865afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611403565b905080610ec757333083604051634a3fa29360e01b815260040161016a93929190611425565b5050565b6000610f20826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661106f9092919063ffffffff16565b9050805160001480610f41575080806020019051810190610f419190611403565b6109ea5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161016a565b600054610100900460ff16610ce25760405162461bcd60e51b815260040161016a90611344565b600054610100900460ff16610fee5760405162461bcd60e51b815260040161016a90611344565b6104a0611086565b600054610100900460ff166107b35760405162461bcd60e51b815260040161016a90611344565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606061107e84846000856110b6565b949350505050565b600054610100900460ff166110ad5760405162461bcd60e51b815260040161016a90611344565b6104a033610e14565b6060824710156111175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161016a565b600080866001600160a01b03168587604051611133919061145a565b60006040518083038185875af1925050503d8060008114611170576040519150601f19603f3d011682016040523d82523d6000602084013e611175565b606091505b509150915061118687838387611191565b979650505050505050565b606083156112005782516000036111f9576001600160a01b0385163b6111f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161016a565b508161107e565b61107e83838151156112155781518083602001fd5b8060405162461bcd60e51b815260040161016a9190611476565b8183823760009101908152919050565b60006020828403121561125157600080fd5b5035919050565b6001600160a01b03811681146107a857600080fd5b60006020828403121561127f57600080fd5b813561128a81611258565b9392505050565b600080604083850312156112a457600080fd5b82356112af81611258565b915060208301356112bf81611258565b809150509250929050565b6000602082840312156112dc57600080fd5b5051919050565b6000602082840312156112f557600080fd5b815161128a81611258565b6001600160a01b03848116825283166020820152606081016002831061133657634e487b7160e01b600052602160045260246000fd5b826040830152949350505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60005b838110156113aa578181015183820152602001611392565b50506000910152565b600081518084526113cb81602086016020860161138f565b601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061107e908301846113b3565b60006020828403121561141557600080fd5b8151801515811461128a57600080fd5b6001600160a01b03848116825283166020820152606060408201819052600090611451908301846113b3565b95945050505050565b6000825161146c81846020870161138f565b9190910192915050565b60208152600061128a60208301846113b356fea2646970667358221220571d20ad0cee3c6f3f28158a6ede877a7ccec3c47044ae46453014388b14c31f64736f6c63430008190033", "devdoc": { + "author": "Venus", + "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" + "custom:oz-upgrades-unsafe-allow": "constructor", + "params": { + "_WBNB": "Address of the WBNB token", + "_vBNB": "Address of the vBNB contract" + } }, "owner()": { "details": "Returns the address of the current owner." @@ -360,6 +389,7 @@ "details": "Returns the address of the pending owner." }, "reduceReserves(uint256)": { + "custom:event": "Emits ReservesReduced event.", "params": { "reduceAmount": "amount of reserves to reduce" } @@ -375,8 +405,15 @@ "accessControlManager_": "The new address of the AccessControlManager" } }, + "setInterestRateModel(address)": { + "custom:access": "Controlled by ACM", + "params": { + "newInterestRateModel": "Address of the new interest rate model" + } + }, "setProtocolShareReserve(address)": { - "details": "PSR setter.", + "custom:access": "Only owner (Governance)", + "custom:event": "Emits ProtocolShareReserveUpdated event.", "params": { "protocolShareReserve_": "Address of the PSR contract" } @@ -393,6 +430,7 @@ "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" } }, + "title": "VBNBAdmin", "version": 1 }, "userdoc": { @@ -422,19 +460,29 @@ "accessControlManager()": { "notice": "Returns the address of the access control manager contract" }, + "initialize(address,address)": { + "notice": "Used to initialize non-immutable variables" + }, "protocolShareReserve()": { "notice": "address of protocol share reserve contract" }, "reduceReserves(uint256)": { - "notice": "Reduce reserves of vBNB" + "notice": "Reduce reserves of vBNB, wrap them and send them to the PSR contract" }, "setAccessControlManager(address)": { "notice": "Sets the address of AccessControlManager" }, + "setInterestRateModel(address)": { + "notice": "Sets the interest rate model of the vBNB contract" + }, + "setProtocolShareReserve(address)": { + "notice": "PSR setter." + }, "vBNB()": { "notice": "address of vBNB" } }, + "notice": "This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract, and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).", "version": 1 }, "storageLayout": { @@ -517,7 +565,7 @@ "label": "_accessControlManager", "offset": 0, "slot": "201", - "type": "t_contract(IAccessControlManagerV8)1623" + "type": "t_contract(IAccessControlManagerV8)1624" }, { "astId": 1444, @@ -528,15 +576,15 @@ "type": "t_array(t_uint256)49_storage" }, { - "astId": 1951, + "astId": 1984, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "protocolShareReserve", "offset": 0, "slot": "251", - "type": "t_contract(IProtocolShareReserve)1947" + "type": "t_contract(IProtocolShareReserve)1980" }, { - "astId": 1956, + "astId": 1989, "contract": "contracts/Admin/VBNBAdmin.sol:VBNBAdmin", "label": "__gap", "offset": 0, @@ -567,12 +615,12 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IAccessControlManagerV8)1623": { + "t_contract(IAccessControlManagerV8)1624": { "encoding": "inplace", "label": "contract IAccessControlManagerV8", "numberOfBytes": "20" }, - "t_contract(IProtocolShareReserve)1947": { + "t_contract(IProtocolShareReserve)1980": { "encoding": "inplace", "label": "contract IProtocolShareReserve", "numberOfBytes": "20" diff --git a/deployments/bsctestnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json b/deployments/bsctestnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json new file mode 100644 index 000000000..875a9ffa2 --- /dev/null +++ b/deployments/bsctestnet/solcInputs/86ac02e99d571dfb77843c33a94d604f.json @@ -0,0 +1,73 @@ +{ + "language": "Solidity", + "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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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 private _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" + }, + "@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" + }, + "contracts/Admin/VBNBAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \"./VBNBAdminStorage.sol\";\n\n/**\n * @title VBNBAdmin\n * @author Venus\n * @notice This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\n */\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\n using SafeERC20Upgradeable for IWBNB;\n\n /// @notice address of vBNB\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n VTokenInterface public immutable vBNB;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IWBNB public immutable WBNB;\n\n /// @notice Emitted when PSR is updated\n event ProtocolShareReserveUpdated(\n IProtocolShareReserve indexed oldProtocolShareReserve,\n IProtocolShareReserve indexed newProtocolShareReserve\n );\n\n /// @notice Emitted reserves are reduced\n event ReservesReduced(uint256 reduceAmount);\n\n /// @param _vBNB Address of the vBNB contract\n /// @param _WBNB Address of the WBNB token\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\n require(address(_WBNB) != address(0), \"WBNB address invalid\");\n require(address(_vBNB) != address(0), \"vBNB address invalid\");\n\n vBNB = _vBNB;\n WBNB = _WBNB;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /// @notice Used to initialize non-immutable variables\n function initialize(\n IProtocolShareReserve _protocolShareReserve,\n address accessControlManager\n ) external initializer {\n require(address(_protocolShareReserve) != address(0), \"PSR address invalid\");\n protocolShareReserve = _protocolShareReserve;\n\n __ReentrancyGuard_init();\n __AccessControlled_init(accessControlManager);\n }\n\n /**\n * @notice PSR setter.\n * @param protocolShareReserve_ Address of the PSR contract\n * @custom:access Only owner (Governance)\n * @custom:event Emits ProtocolShareReserveUpdated event.\n */\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\n require(address(protocolShareReserve_) != address(0), \"PSR address invalid\");\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\n * @param reduceAmount amount of reserves to reduce\n * @custom:event Emits ReservesReduced event.\n */\n function reduceReserves(uint reduceAmount) external nonReentrant {\n require(vBNB._reduceReserves(reduceAmount) == 0, \"reduceReserves failed\");\n _wrapBNB();\n\n uint256 balance = WBNB.balanceOf(address(this));\n WBNB.safeTransfer(address(protocolShareReserve), balance);\n protocolShareReserve.updateAssetsState(\n vBNB.comptroller(),\n address(WBNB),\n IProtocolShareReserve.IncomeType.SPREAD\n );\n\n emit ReservesReduced(reduceAmount);\n }\n\n /**\n * @notice Sets the interest rate model of the vBNB contract\n * @param newInterestRateModel Address of the new interest rate model\n * @custom:access Controlled by ACM\n */\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\n _checkAccessAllowed(\"setInterestRateModel(address)\");\n return vBNB._setInterestRateModel(newInterestRateModel);\n }\n\n /**\n * @notice Wraps BNB into WBNB\n */\n function _wrapBNB() internal {\n uint256 bnbBalance = address(this).balance;\n WBNB.deposit{ value: bnbBalance }();\n }\n\n /**\n * @notice Invoked when BNB is sent to this contract\n * @custom:access Only vBNB is considered a valid sender\n */\n receive() external payable {\n require(msg.sender == address(vBNB), \"only vBNB can send BNB to this contract\");\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\n * @custom:access Only owner (Governance)\n */\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\n require(ok, \"call failed\");\n return res;\n }\n}\n" + }, + "contracts/Admin/VBNBAdminStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\ninterface VTokenInterface {\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function _acceptAdmin() external returns (uint);\n\n function comptroller() external returns (address);\n\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ncontract VBNBAdminStorage {\n /// @notice address of protocol share reserve contract\n IProtocolShareReserve public protocolShareReserve;\n\n /// @dev gap to prevent collision in inheritence\n uint256[49] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} From 7e37125afa710bbb76b9851db9d09bbcbb87bed6 Mon Sep 17 00:00:00 2001 From: narayanprusty Date: Wed, 5 Jun 2024 10:10:27 +0000 Subject: [PATCH 14/85] feat: updating deployment files --- deployments/bsctestnet.json | 21 ++++++++++++++++++++- deployments/bsctestnet_addresses.json | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/deployments/bsctestnet.json b/deployments/bsctestnet.json index 24eba09e1..b2b94f582 100644 --- a/deployments/bsctestnet.json +++ b/deployments/bsctestnet.json @@ -36383,7 +36383,7 @@ ] }, "VBNBAdmin_Implementation": { - "address": "0x698B2c7c82B980265ed4B4a7653a5735E93767b4", + "address": "0x90c891bb2b1821ADE159ECa6FbA0418b2bD1b86D", "abi": [ { "inputs": [ @@ -36651,6 +36651,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "setInterestRateModel", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { diff --git a/deployments/bsctestnet_addresses.json b/deployments/bsctestnet_addresses.json index 479837ec4..3009f0199 100644 --- a/deployments/bsctestnet_addresses.json +++ b/deployments/bsctestnet_addresses.json @@ -50,7 +50,7 @@ "VAIVaultProxy_Implementation": "0x3f047c3022b35ed59484a4ee12b28849903a8c3b", "VAIVaultProxy_Proxy": "0x7Db4f5cC3bBA3e12FF1F528D2e3417afb0a57118", "VBNBAdmin": "0x04109575c1dbB4ac2e59e60c783800ea10441BBe", - "VBNBAdmin_Implementation": "0x698B2c7c82B980265ed4B4a7653a5735E93767b4", + "VBNBAdmin_Implementation": "0x90c891bb2b1821ADE159ECa6FbA0418b2bD1b86D", "VBNBAdmin_Proxy": "0x04109575c1dbB4ac2e59e60c783800ea10441BBe", "VBep20Delegate": "0xad6aa8Bb4829560412A94AA930745f407BF8000B", "VRT": "0x331F639B4F3CF6E391CD244e0b5027C5968Ec325", From 77ce780094384179af133456a7519a714f9035f2 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Mon, 24 Jun 2024 11:29:06 -0300 Subject: [PATCH 15/85] feat: add second mock token --- helpers/deploymentConfig.ts | 40 +++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 49b799bf6..0b830d06c 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -1,6 +1,5 @@ import { contracts as governanceBscMainnet } from "@venusprotocol/governance-contracts/deployments/bscmainnet.json"; import { contracts as governanceBscTestnet } from "@venusprotocol/governance-contracts/deployments/bsctestnet.json"; -import { ethers } from "hardhat"; import { DeploymentsExtension } from "hardhat-deploy/types"; import { addresses as venusProtocolBscMainnet } from "../deployments/bscmainnet_addresses.json"; @@ -12,14 +11,18 @@ export enum InterestRateModels { JumpRate, } -export type TokenConfig = { - isMock: boolean; - name?: string; - symbol: string; - decimals?: number; - tokenAddress: string; - faucetInitialLiquidity?: boolean; -}; +export type TokenConfig = + | { + isMock: true; + name: string; + symbol: string; + decimals: number; + } + | { + isMock: false; + symbol: string; + tokenAddress: string; + }; export type VTokenConfig = { name: string; @@ -77,7 +80,12 @@ export const globalConfig: NetworkConfig = { name: "First Digital USD", symbol: "FDUSD", decimals: 18, - tokenAddress: ethers.constants.AddressZero, + }, + { + isMock: true, + name: "Wrapped BNB", + symbol: "WBNB", + decimals: 18, }, ], marketsConfig: [ @@ -108,7 +116,6 @@ export const globalConfig: NetworkConfig = { name: "First Digital USD", symbol: "FDUSD", decimals: 18, - tokenAddress: ethers.constants.AddressZero, }, ], marketsConfig: [ @@ -136,9 +143,7 @@ export const globalConfig: NetworkConfig = { tokensConfig: [ { isMock: false, - name: "First Digital USD", symbol: "FDUSD", - decimals: 18, tokenAddress: "0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409", }, ], @@ -190,15 +195,6 @@ export function getTokenConfig(tokenSymbol: string, tokens: TokenConfig[]): Toke } } -export async function getTokenAddress(tokenConfig: TokenConfig, deployments: DeploymentsExtension) { - if (tokenConfig.isMock) { - const token = await deployments.get(`Mock${tokenConfig.symbol}`); - return token.address; - } else { - return tokenConfig.tokenAddress; - } -} - export const getContractAddressOrNullAddress = async (deployments: DeploymentsExtension, name: string) => { try { return (await deployments.get(name)).address; From f6c3898eaaec778e2e4e78f5de2ae3770f6371f4 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Tue, 25 Jun 2024 14:48:10 +0000 Subject: [PATCH 16/85] chore(release): 9.2.0-dev.1 [skip ci] ## [9.2.0-dev.1](https://github.com/VenusProtocol/venus-protocol/compare/v9.1.0...v9.2.0-dev.1) (2024-06-25) ### Features * add second mock token ([77ce780](https://github.com/VenusProtocol/venus-protocol/commit/77ce780094384179af133456a7519a714f9035f2)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01373eaea..921496186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [9.2.0-dev.1](https://github.com/VenusProtocol/venus-protocol/compare/v9.1.0...v9.2.0-dev.1) (2024-06-25) + + +### Features + +* add second mock token ([77ce780](https://github.com/VenusProtocol/venus-protocol/commit/77ce780094384179af133456a7519a714f9035f2)) + ## [9.1.0](https://github.com/VenusProtocol/venus-protocol/compare/v9.0.0...v9.1.0) (2024-06-04) diff --git a/package.json b/package.json index 4d0d97b12..9ccae55ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.1.0", + "version": "9.2.0-dev.1", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 11510df081d8626107a0ff64a82004695986e572 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 2 Jul 2024 13:15:56 +0530 Subject: [PATCH 17/85] fix: added TwoKinksInterestRateModel --- .../TwoKinksInterestRateModel.sol | 164 ++++++++++++++++++ contracts/Utils/SignedSafeMath.sol | 60 +++++++ 2 files changed, 224 insertions(+) create mode 100644 contracts/InterestRateModels/TwoKinksInterestRateModel.sol create mode 100644 contracts/Utils/SignedSafeMath.sol diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol new file mode 100644 index 000000000..c8c12a59a --- /dev/null +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -0,0 +1,164 @@ +pragma solidity ^0.5.16; + +import "../Utils/SafeMath.sol"; +import "../Utils/SignedSafeMath.sol"; +import "./InterestRateModel.sol"; + +/** + * @title Venus's TwoKinksInterestRateModel Contract + * @author Venus + */ +contract TwoKinksInterestRateModel is InterestRateModel { + using SafeMath for uint256; + using SignedSafeMath for int256; + + /** + * @notice The approximate number of blocks per year that is assumed by the interest rate model + */ + int256 public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks) + + ////////////////////// SLOPE 1 ////////////////////// + + /** + * @notice The multiplier of utilization rate per block or second that gives the slope 1 of the interest rate + */ + int256 public multiplierPerBlock; + + /** + * @notice The base interest rate per block or second which is the y-intercept when utilization rate is 0 + */ + int256 public baseRatePerBlock; + + ////////////////////// SLOPE 2 ////////////////////// + + /** + * @notice The utilization point at which the multiplier2 is applied + */ + int256 public kink1; + + /** + * @notice The multiplier of utilization rate per block or second that gives the slope 2 of the interest rate + */ + int256 public multiplier2PerBlock; + + /** + * @notice The base interest rate per block or second which is the y-intercept when utilization rate hits kink1 + */ + int256 public baseRate2PerBlock; + + ////////////////////// SLOPE 3 ////////////////////// + + /** + * @notice The utilization point at which the jump multiplier is applied + */ + int256 public kink2; + + /** + * @notice The multiplier per block or second after hitting kink2 + */ + int256 public jumpMultiplierPerBlock; + + /** + * @notice Construct an interest rate model + * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18) + * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18) + * @param kink1_ The utilization point at which the multiplier2 is applied + * @param multiplier2PerYear The multiplier after hitting kink1 + * @param baseRate2PerYear The base rate after hitting kink1 + * @param kink2_ The utilization point at which the jump multiplier is applied + * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point + */ + constructor( + int256 multiplierPerYear, + int256 baseRatePerYear, + int256 kink1_, + int256 multiplier2PerYear, + int256 baseRate2PerYear, + int256 kink2_, + int256 jumpMultiplierPerYear + ) public { + require(baseRatePerYear > 0, "baseRatePerYear must be greater than zero"); + require(baseRate2PerYear > 0, "baseRate2PerYear must be greater than zero"); + require(kink1_ > 0, "kink1 must be greater than zero"); + require(kink2_ > 0, "kink2 must be greater than zero"); + + multiplierPerBlock = multiplierPerYear.div(blocksPerYear); + baseRatePerBlock = baseRatePerYear.div(blocksPerYear); + kink1 = kink1_; + multiplier2PerBlock = multiplier2PerYear.div(blocksPerYear); + baseRate2PerBlock = baseRate2PerYear.div(blocksPerYear); + kink2 = kink2_; + jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear); + } + + /** + * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)` + * @param cash The amount of cash in the market + * @param borrows The amount of borrows in the market + * @param reserves The amount of reserves in the market (currently unused) + * @return The utilization rate as a mantissa between [0, 1e18] + */ + function utilizationRate(uint256 cash, uint256 borrows, uint256 reserves) public pure returns (uint256) { + // Utilization rate is 0 when there are no borrows + if (borrows == 0) { + return 0; + } + + return borrows.mul(1e18).div(cash.add(borrows).sub(reserves)); + } + + /** + * @notice Calculates the current borrow rate per block, with the error code expected by the market + * @param cash The amount of cash in the market + * @param borrows The amount of borrows in the market + * @param reserves The amount of reserves in the market + * @return The borrow rate percentage per block as a mantissa (scaled by 1e18) + */ + function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) public view returns (uint256) { + int256 util = int256(utilizationRate(cash, borrows, reserves)); + int256 expScale = int256(1e18); + + if (util < kink1) { + return _max(0, util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock)); + } else if (util < kink2) { + int256 rate1 = util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); + int256 rate2 = util.sub(kink1).mul(multiplier2PerBlock).div(expScale).add(baseRate2PerBlock); + return _max(0, rate1.add(rate2)); + } else { + int256 rate1 = util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); + int256 rate2 = kink2.sub(kink1).mul(multiplier2PerBlock).div(expScale).add(baseRate2PerBlock); + int256 rate3 = util.sub(kink2).mul(jumpMultiplierPerBlock).div(expScale).add(rate2); + return _max(0, rate1.add(rate2).add(rate3)); + } + } + + /** + * @notice Calculates the current supply rate per block + * @param cash The amount of cash in the market + * @param borrows The amount of borrows in the market + * @param reserves The amount of reserves in the market + * @param reserveFactorMantissa The current reserve factor for the market + * @return The supply rate percentage per block as a mantissa (scaled by 1e18) + */ + function getSupplyRate( + uint256 cash, + uint256 borrows, + uint256 reserves, + uint256 reserveFactorMantissa + ) public view returns (uint256) { + uint256 oneMinusReserveFactor = uint256(1e18).sub(reserveFactorMantissa); + uint256 borrowRate = getBorrowRate(cash, borrows, reserves); + uint256 rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18); + return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18); + } + + /** + * @notice Returns the larger of two numbers + * @param a The first number + * @param b The second number + * @return The larger of the two numbers + */ + function _max(int256 a, int256 b) internal pure returns (uint256) { + return uint256(a > b ? a : b); + } +} diff --git a/contracts/Utils/SignedSafeMath.sol b/contracts/Utils/SignedSafeMath.sol new file mode 100644 index 000000000..ea894fc1f --- /dev/null +++ b/contracts/Utils/SignedSafeMath.sol @@ -0,0 +1,60 @@ +pragma solidity ^0.5.2; + +/** + * @title SignedSafeMath + * @dev Signed math operations with safety checks that revert on error + */ +library SignedSafeMath { + int256 constant private INT256_MIN = -2**255; + + /** + * @dev Multiplies two signed integers, reverts on overflow. + */ + function mul(int256 a, int256 b) internal pure returns (int256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 + if (a == 0) { + return 0; + } + + require(!(a == -1 && b == INT256_MIN)); // This is the only case of overflow not detected by the check below + + int256 c = a * b; + require(c / a == b); + + return c; + } + + /** + * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero. + */ + function div(int256 a, int256 b) internal pure returns (int256) { + require(b != 0); // Solidity only automatically asserts when dividing by 0 + require(!(b == -1 && a == INT256_MIN)); // This is the only case of overflow + + int256 c = a / b; + + return c; + } + + /** + * @dev Subtracts two signed integers, reverts on overflow. + */ + function sub(int256 a, int256 b) internal pure returns (int256) { + int256 c = a - b; + require((b >= 0 && c <= a) || (b < 0 && c > a)); + + return c; + } + + /** + * @dev Adds two signed integers, reverts on overflow. + */ + function add(int256 a, int256 b) internal pure returns (int256) { + int256 c = a + b; + require((b >= 0 && c >= a) || (b < 0 && c < a)); + + return c; + } +} \ No newline at end of file From 0cb0b2168255b31315a45763a57a088ee772f084 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 2 Jul 2024 13:29:20 +0530 Subject: [PATCH 18/85] fix: wip - unit tests --- .../TwoKinksInterestRateModel.sol | 4 +- .../TwoKinksInterestRateModel.ts | 252 ++++++++++++++++++ 2 files changed, 254 insertions(+), 2 deletions(-) create mode 100644 tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index c8c12a59a..ebbb2b167 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -60,8 +60,8 @@ contract TwoKinksInterestRateModel is InterestRateModel { /** * @notice Construct an interest rate model - * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18) * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18) + * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18) * @param kink1_ The utilization point at which the multiplier2 is applied * @param multiplier2PerYear The multiplier after hitting kink1 * @param baseRate2PerYear The base rate after hitting kink1 @@ -69,8 +69,8 @@ contract TwoKinksInterestRateModel is InterestRateModel { * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point */ constructor( - int256 multiplierPerYear, int256 baseRatePerYear, + int256 multiplierPerYear, int256 kink1_, int256 multiplier2PerYear, int256 baseRate2PerYear, diff --git a/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts b/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts new file mode 100644 index 000000000..4a25fb822 --- /dev/null +++ b/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts @@ -0,0 +1,252 @@ +import { smock } from "@defi-wonderland/smock"; +import { loadFixture } from "@nomicfoundation/hardhat-network-helpers"; +import BigNumber from "bignumber.js"; +import chai from "chai"; +import { ethers } from "hardhat"; + +import { TwoKinksInterestRateModel } from "../../../typechain"; + +const { expect } = chai; +chai.use(smock.matchers); + +const convertToUnit = (amount: string | number, decimals: number) => { + return new BigNumber(amount).times(new BigNumber(10).pow(decimals)).toString(); +}; + + +let twoKinksInterestRateModel: TwoKinksInterestRateModel; + +const baseRatePerYear = convertToUnit("0.2", 16); +const multiplierPerYear = convertToUnit("0.225", 18); +const kink1 = convertToUnit("0.2", 18); +const multiplier2PerYear = convertToUnit("0.625", 18); +const baseRate2PerYear = convertToUnit("0.6", 16); +const kink2 = convertToUnit("0.8", 18); +const jumpMultiplierPerYear = convertToUnit("6.8", 18); + +const cash = convertToUnit("10", 19); +const borrows = convertToUnit("4", 19); +const reserves = convertToUnit("2", 19); +const expScale = convertToUnit("1", 18); + + +describe(`Two Kinks Interest Rate Model Tests`, async () => { + const fixture = async () => { + const TwoKinksInterestRateModelFactory = await ethers.getContractFactory("TwoKinksInterestRateModel"); + + twoKinksInterestRateModel = await TwoKinksInterestRateModelFactory.deploy( + baseRatePerYear, + multiplierPerYear, + kink1, + multiplier2PerYear, + baseRate2PerYear, + kink2, + jumpMultiplierPerYear, + ); + await twoKinksInterestRateModel.deployed(); + }; + + before(async () => { + await loadFixture(fixture); + }); + + it("Utilization rate: borrows is zero", async () => { + expect(await twoKinksInterestRateModel.utilizationRate(cash, 0, reserves)).equal(0); + }); + + + it("Utilization rate", async () => { + const utilizationRate = new BigNumber(Number(borrows)) + .multipliedBy(expScale) + .dividedBy(Number(cash) + Number(borrows) - Number(reserves)) + .toFixed(0); + + expect(await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).equal(utilizationRate); + }); + + it("Borrow Rate: below kink1 utilization", async () => { + const cash = convertToUnit("12", 19); + const borrows = convertToUnit("1", 19); + const reserves = convertToUnit("2", 19); + + const multiplierPerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplierPerBlock() + ).toString(); + const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const utilizationRate = ( + await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) + ).toString(); + + expect(new BigNumber(utilizationRate).toNumber()).to.be.lt(new BigNumber(kink1).toNumber()); + + const value = new BigNumber(utilizationRate) + .multipliedBy(multiplierPerBlockOrTimestamp) + .dividedBy(expScale) + .toFixed(0); + + expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal( + Number(value) + Number(baseRatePerBlockOrTimestamp), + ); + }); + + it("Borrow Rate: above kink1 and below kink2 utilization", async () => { + const cash = convertToUnit("12", 19); + const borrows = convertToUnit("3", 19); + const reserves = convertToUnit("1", 19); + + const multiplierPerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplierPerBlock() + ).toString(); + const multiplier2PerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplier2PerBlock() + ).toString(); + const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const baseRate2PerBlockOrTimestamp = ( + await twoKinksInterestRateModel.baseRate2PerBlock() + ).toString(); + const utilizationRate = ( + await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) + ).toString(); + + expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink1).toNumber()); + expect(new BigNumber(utilizationRate).toNumber()).to.be.lt(new BigNumber(kink2).toNumber()); + + const rate1 = new BigNumber(kink1) + .multipliedBy(multiplierPerBlockOrTimestamp) + .dividedBy(expScale) + .plus(baseRatePerBlockOrTimestamp) + .toFixed(0); + const rate2 = new BigNumber(new BigNumber(utilizationRate).minus(kink1)) + .multipliedBy(multiplier2PerBlockOrTimestamp) + .dividedBy(expScale) + .plus(baseRate2PerBlockOrTimestamp) + .toFixed(0); + + expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal( + Number(rate1) + Number(rate2), + ); + }); + + it("Borrow Rate: above kink2 utilization", async () => { + const cash = convertToUnit("12", 19); + const borrows = convertToUnit("21", 19); + const reserves = convertToUnit("1", 19); + + const multiplierPerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplierPerBlock() + ).toString(); + const multiplier2PerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplier2PerBlock() + ).toString(); + const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const baseRate2PerBlockOrTimestamp = ( + await twoKinksInterestRateModel.baseRate2PerBlock() + ).toString(); + const jumpMultiplierPerBlockOrTimestamp = ( + await twoKinksInterestRateModel.jumpMultiplierPerBlock() + ).toString(); + const utilizationRate = ( + await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) + ).toString(); + + expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink2).toNumber()); + + const rate1 = new BigNumber(kink1) + .multipliedBy(multiplierPerBlockOrTimestamp) + .dividedBy(expScale) + .plus(baseRatePerBlockOrTimestamp) + .toFixed(0); + const rate2 = new BigNumber(new BigNumber(kink2).minus(kink1)) + .multipliedBy(multiplier2PerBlockOrTimestamp) + .dividedBy(expScale) + .plus(baseRate2PerBlockOrTimestamp) + .toFixed(0); + const rate3 = new BigNumber(new BigNumber(utilizationRate).minus(kink2)) + .multipliedBy(jumpMultiplierPerBlockOrTimestamp) + .dividedBy(expScale) + .toFixed(0); + + expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal( + new BigNumber(rate1).plus(rate2).plus(rate3).toString(), + ); + }); + + it("Borrow Rate: above kink2 utilization and negative multipliers", async () => { + const multiplierPerYear = convertToUnit(-0.225, 18); + const multiplier2PerYear = convertToUnit(-0.625, 18); + const jumpMultiplierPerYear = convertToUnit(-6.8, 18); + + const TwoKinksInterestRateModelFactory = await ethers.getContractFactory("TwoKinksInterestRateModel"); + + twoKinksInterestRateModel = await TwoKinksInterestRateModelFactory.deploy( + baseRatePerYear, + multiplierPerYear, + kink1, + multiplier2PerYear, + baseRate2PerYear, + kink2, + jumpMultiplierPerYear, + ); + await twoKinksInterestRateModel.deployed(); + + const cash = convertToUnit("12", 19); + const borrows = convertToUnit("21", 19); + const reserves = convertToUnit("1", 19); + + const multiplierPerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplierPerBlock() + ).toString(); + const multiplier2PerBlockOrTimestamp = ( + await twoKinksInterestRateModel.multiplier2PerBlock() + ).toString(); + const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const baseRate2PerBlockOrTimestamp = ( + await twoKinksInterestRateModel.baseRate2PerBlock() + ).toString(); + const jumpMultiplierPerBlockOrTimestamp = ( + await twoKinksInterestRateModel.jumpMultiplierPerBlock() + ).toString(); + const utilizationRate = ( + await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) + ).toString(); + + expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink2).toNumber()); + + const rate1 = new BigNumber(kink1) + .multipliedBy(multiplierPerBlockOrTimestamp) + .dividedBy(expScale) + .plus(baseRatePerBlockOrTimestamp) + .toFixed(0); + const rate2 = new BigNumber(new BigNumber(kink2).minus(kink1)) + .multipliedBy(multiplier2PerBlockOrTimestamp) + .dividedBy(expScale) + .plus(baseRate2PerBlockOrTimestamp) + .toFixed(0); + const rate3 = new BigNumber(new BigNumber(utilizationRate).minus(kink2)) + .multipliedBy(jumpMultiplierPerBlockOrTimestamp) + .dividedBy(expScale) + .toFixed(0); + + let finalRate = new BigNumber(rate1).plus(rate2).plus(rate3).toNumber(); + if (finalRate < 0) { + finalRate = 0; + } + + expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal(finalRate); + }); + + it("Supply Rate", async () => { + const reserveMantissa = convertToUnit("1", 17); + const oneMinusReserveFactor = Number(expScale) - Number(reserveMantissa); + const borrowRate = (await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).toString(); + const rateToPool = new BigNumber(borrowRate).multipliedBy(oneMinusReserveFactor).dividedBy(expScale).toFixed(0); + const rate = new BigNumber(borrows) + .multipliedBy(expScale) + .dividedBy(Number(cash) + Number(borrows) - Number(reserves)); + const supplyRate = new BigNumber(rateToPool).multipliedBy(rate).dividedBy(expScale).toFixed(0); + + expect(await twoKinksInterestRateModel.getSupplyRate(cash, borrows, reserves, reserveMantissa)).equal( + supplyRate, + ); + }); +}); \ No newline at end of file From f3a10bb03edae8a9a967bb72c20a845f9341fae0 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 2 Jul 2024 15:25:39 +0530 Subject: [PATCH 19/85] fix: fixed tests --- .../TwoKinksInterestRateModel.sol | 10 +- contracts/Utils/SignedSafeMath.sol | 20 +-- .../TwoKinksInterestRateModel.ts | 130 +++++++----------- 3 files changed, 61 insertions(+), 99 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index ebbb2b167..3858d412b 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -69,8 +69,8 @@ contract TwoKinksInterestRateModel is InterestRateModel { * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point */ constructor( - int256 baseRatePerYear, - int256 multiplierPerYear, + int256 baseRatePerYear, + int256 multiplierPerYear, int256 kink1_, int256 multiplier2PerYear, int256 baseRate2PerYear, @@ -121,13 +121,13 @@ contract TwoKinksInterestRateModel is InterestRateModel { if (util < kink1) { return _max(0, util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock)); } else if (util < kink2) { - int256 rate1 = util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); + int256 rate1 = kink1.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); int256 rate2 = util.sub(kink1).mul(multiplier2PerBlock).div(expScale).add(baseRate2PerBlock); return _max(0, rate1.add(rate2)); } else { - int256 rate1 = util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); + int256 rate1 = kink1.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); int256 rate2 = kink2.sub(kink1).mul(multiplier2PerBlock).div(expScale).add(baseRate2PerBlock); - int256 rate3 = util.sub(kink2).mul(jumpMultiplierPerBlock).div(expScale).add(rate2); + int256 rate3 = util.sub(kink2).mul(jumpMultiplierPerBlock).div(expScale); return _max(0, rate1.add(rate2).add(rate3)); } } diff --git a/contracts/Utils/SignedSafeMath.sol b/contracts/Utils/SignedSafeMath.sol index ea894fc1f..819298d83 100644 --- a/contracts/Utils/SignedSafeMath.sol +++ b/contracts/Utils/SignedSafeMath.sol @@ -5,11 +5,11 @@ pragma solidity ^0.5.2; * @dev Signed math operations with safety checks that revert on error */ library SignedSafeMath { - int256 constant private INT256_MIN = -2**255; + int256 private constant INT256_MIN = -2 ** 255; /** - * @dev Multiplies two signed integers, reverts on overflow. - */ + * @dev Multiplies two signed integers, reverts on overflow. + */ function mul(int256 a, int256 b) internal pure returns (int256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. @@ -27,8 +27,8 @@ library SignedSafeMath { } /** - * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero. - */ + * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero. + */ function div(int256 a, int256 b) internal pure returns (int256) { require(b != 0); // Solidity only automatically asserts when dividing by 0 require(!(b == -1 && a == INT256_MIN)); // This is the only case of overflow @@ -39,8 +39,8 @@ library SignedSafeMath { } /** - * @dev Subtracts two signed integers, reverts on overflow. - */ + * @dev Subtracts two signed integers, reverts on overflow. + */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); @@ -49,12 +49,12 @@ library SignedSafeMath { } /** - * @dev Adds two signed integers, reverts on overflow. - */ + * @dev Adds two signed integers, reverts on overflow. + */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } -} \ No newline at end of file +} diff --git a/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts b/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts index 4a25fb822..cbfbf839d 100644 --- a/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts +++ b/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts @@ -13,7 +13,6 @@ const convertToUnit = (amount: string | number, decimals: number) => { return new BigNumber(amount).times(new BigNumber(10).pow(decimals)).toString(); }; - let twoKinksInterestRateModel: TwoKinksInterestRateModel; const baseRatePerYear = convertToUnit("0.2", 16); @@ -29,7 +28,6 @@ const borrows = convertToUnit("4", 19); const reserves = convertToUnit("2", 19); const expScale = convertToUnit("1", 18); - describe(`Two Kinks Interest Rate Model Tests`, async () => { const fixture = async () => { const TwoKinksInterestRateModelFactory = await ethers.getContractFactory("TwoKinksInterestRateModel"); @@ -54,7 +52,6 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { expect(await twoKinksInterestRateModel.utilizationRate(cash, 0, reserves)).equal(0); }); - it("Utilization rate", async () => { const utilizationRate = new BigNumber(Number(borrows)) .multipliedBy(expScale) @@ -69,23 +66,16 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const borrows = convertToUnit("1", 19); const reserves = convertToUnit("2", 19); - const multiplierPerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplierPerBlock() - ).toString(); - const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const utilizationRate = ( - await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) - ).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.lt(new BigNumber(kink1).toNumber()); - const value = new BigNumber(utilizationRate) - .multipliedBy(multiplierPerBlockOrTimestamp) - .dividedBy(expScale) - .toFixed(0); + const value = new BigNumber(utilizationRate).multipliedBy(multiplierPerBlock).dividedBy(expScale).toFixed(0); expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal( - Number(value) + Number(baseRatePerBlockOrTimestamp), + Number(value) + Number(baseRatePerBlock), ); }); @@ -94,80 +84,64 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const borrows = convertToUnit("3", 19); const reserves = convertToUnit("1", 19); - const multiplierPerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplierPerBlock() - ).toString(); - const multiplier2PerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplier2PerBlock() - ).toString(); - const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const baseRate2PerBlockOrTimestamp = ( - await twoKinksInterestRateModel.baseRate2PerBlock() - ).toString(); - const utilizationRate = ( - await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) - ).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); + const multiplier2PerBlock = (await twoKinksInterestRateModel.multiplier2PerBlock()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const baseRate2PerBlock = (await twoKinksInterestRateModel.baseRate2PerBlock()).toString(); + const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink1).toNumber()); expect(new BigNumber(utilizationRate).toNumber()).to.be.lt(new BigNumber(kink2).toNumber()); const rate1 = new BigNumber(kink1) - .multipliedBy(multiplierPerBlockOrTimestamp) + .multipliedBy(multiplierPerBlock) .dividedBy(expScale) - .plus(baseRatePerBlockOrTimestamp) + .plus(baseRatePerBlock) .toFixed(0); const rate2 = new BigNumber(new BigNumber(utilizationRate).minus(kink1)) - .multipliedBy(multiplier2PerBlockOrTimestamp) + .multipliedBy(multiplier2PerBlock) .dividedBy(expScale) - .plus(baseRate2PerBlockOrTimestamp) + .plus(baseRate2PerBlock) .toFixed(0); - expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal( + expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).closeTo( Number(rate1) + Number(rate2), + 1, ); }); it("Borrow Rate: above kink2 utilization", async () => { const cash = convertToUnit("12", 19); - const borrows = convertToUnit("21", 19); + const borrows = convertToUnit("80", 19); const reserves = convertToUnit("1", 19); - const multiplierPerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplierPerBlock() - ).toString(); - const multiplier2PerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplier2PerBlock() - ).toString(); - const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const baseRate2PerBlockOrTimestamp = ( - await twoKinksInterestRateModel.baseRate2PerBlock() - ).toString(); - const jumpMultiplierPerBlockOrTimestamp = ( - await twoKinksInterestRateModel.jumpMultiplierPerBlock() - ).toString(); - const utilizationRate = ( - await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) - ).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); + const multiplier2PerBlock = (await twoKinksInterestRateModel.multiplier2PerBlock()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const baseRate2PerBlock = (await twoKinksInterestRateModel.baseRate2PerBlock()).toString(); + const jumpMultiplierPerBlock = (await twoKinksInterestRateModel.jumpMultiplierPerBlock()).toString(); + const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink2).toNumber()); const rate1 = new BigNumber(kink1) - .multipliedBy(multiplierPerBlockOrTimestamp) + .multipliedBy(multiplierPerBlock) .dividedBy(expScale) - .plus(baseRatePerBlockOrTimestamp) + .plus(baseRatePerBlock) .toFixed(0); const rate2 = new BigNumber(new BigNumber(kink2).minus(kink1)) - .multipliedBy(multiplier2PerBlockOrTimestamp) + .multipliedBy(multiplier2PerBlock) .dividedBy(expScale) - .plus(baseRate2PerBlockOrTimestamp) + .plus(baseRate2PerBlock) .toFixed(0); const rate3 = new BigNumber(new BigNumber(utilizationRate).minus(kink2)) - .multipliedBy(jumpMultiplierPerBlockOrTimestamp) + .multipliedBy(jumpMultiplierPerBlock) .dividedBy(expScale) .toFixed(0); - expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).equal( - new BigNumber(rate1).plus(rate2).plus(rate3).toString(), + expect(await twoKinksInterestRateModel.getBorrowRate(cash, borrows, reserves)).closeTo( + new BigNumber(rate1).plus(rate2).plus(rate3).toNumber(), + 1, ); }); @@ -190,40 +164,30 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { await twoKinksInterestRateModel.deployed(); const cash = convertToUnit("12", 19); - const borrows = convertToUnit("21", 19); + const borrows = convertToUnit("45", 19); const reserves = convertToUnit("1", 19); - const multiplierPerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplierPerBlock() - ).toString(); - const multiplier2PerBlockOrTimestamp = ( - await twoKinksInterestRateModel.multiplier2PerBlock() - ).toString(); - const baseRatePerBlockOrTimestamp = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const baseRate2PerBlockOrTimestamp = ( - await twoKinksInterestRateModel.baseRate2PerBlock() - ).toString(); - const jumpMultiplierPerBlockOrTimestamp = ( - await twoKinksInterestRateModel.jumpMultiplierPerBlock() - ).toString(); - const utilizationRate = ( - await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves) - ).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); + const multiplier2PerBlock = (await twoKinksInterestRateModel.multiplier2PerBlock()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const baseRate2PerBlock = (await twoKinksInterestRateModel.baseRate2PerBlock()).toString(); + const jumpMultiplierPerBlock = (await twoKinksInterestRateModel.jumpMultiplierPerBlock()).toString(); + const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink2).toNumber()); const rate1 = new BigNumber(kink1) - .multipliedBy(multiplierPerBlockOrTimestamp) + .multipliedBy(multiplierPerBlock) .dividedBy(expScale) - .plus(baseRatePerBlockOrTimestamp) + .plus(baseRatePerBlock) .toFixed(0); const rate2 = new BigNumber(new BigNumber(kink2).minus(kink1)) - .multipliedBy(multiplier2PerBlockOrTimestamp) + .multipliedBy(multiplier2PerBlock) .dividedBy(expScale) - .plus(baseRate2PerBlockOrTimestamp) + .plus(baseRate2PerBlock) .toFixed(0); const rate3 = new BigNumber(new BigNumber(utilizationRate).minus(kink2)) - .multipliedBy(jumpMultiplierPerBlockOrTimestamp) + .multipliedBy(jumpMultiplierPerBlock) .dividedBy(expScale) .toFixed(0); @@ -242,11 +206,9 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const rateToPool = new BigNumber(borrowRate).multipliedBy(oneMinusReserveFactor).dividedBy(expScale).toFixed(0); const rate = new BigNumber(borrows) .multipliedBy(expScale) - .dividedBy(Number(cash) + Number(borrows) - Number(reserves)); + .dividedBy(Number(cash) + Number(borrows) - Number(reserves)); const supplyRate = new BigNumber(rateToPool).multipliedBy(rate).dividedBy(expScale).toFixed(0); - expect(await twoKinksInterestRateModel.getSupplyRate(cash, borrows, reserves, reserveMantissa)).equal( - supplyRate, - ); + expect(await twoKinksInterestRateModel.getSupplyRate(cash, borrows, reserves, reserveMantissa)).equal(supplyRate); }); -}); \ No newline at end of file +}); From 29af8c617e6148849170cefab61d23e41e0ad005 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 16 Jul 2024 13:26:06 +0530 Subject: [PATCH 20/85] fix: remove deployment from script --- deploy/002-interest-rate-model.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index b2d2b5f80..74124520a 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -23,14 +23,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { autoMine: true, args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], }); - - await deploy("InterestRateModelVBNBPreLaunchpad", { - contract: "JumpRateModel", - from: deployer, - log: true, - autoMine: true, - args: [0, parseUnits("0.625", 18), parseUnits("6.8", 18), parseUnits("0.8", 18)], - }); }; func.tags = ["InterestRateModel"]; From 9cd374ca00ae1501aab3c501e7e590312f6da17e Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 16 Jul 2024 13:49:36 +0530 Subject: [PATCH 21/85] fix: removed ir deployment --- deploy/002-interest-rate-model.ts | 1 - deployments/bscmainnet.json | 251 ------------ .../InterestRateModelVBNBPreLaunchpad.json | 380 ------------------ deployments/bscmainnet_addresses.json | 1 - 4 files changed, 633 deletions(-) delete mode 100644 deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index 74124520a..3ce7e3865 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -1,4 +1,3 @@ -import { parseUnits } from "ethers/lib/utils"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index f33c5a597..d0885f8c5 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -9066,257 +9066,6 @@ } ] }, - "InterestRateModelVBNBPreLaunchpad": { - "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "kink", - "type": "uint256" - } - ], - "name": "NewInterestParams", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "blocksPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "getBorrowRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" - } - ], - "name": "getSupplyRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "jumpMultiplierPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kink", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "utilizationRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - } - ] - }, "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": { "address": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "abi": [ diff --git a/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json b/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json deleted file mode 100644 index f4e856004..000000000 --- a/deployments/bscmainnet/InterestRateModelVBNBPreLaunchpad.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "kink", - "type": "uint256" - } - ], - "name": "NewInterestParams", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "blocksPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "getBorrowRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" - } - ], - "name": "getSupplyRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "jumpMultiplierPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kink", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "utilizationRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - } - ], - "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", - "receipt": { - "to": null, - "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", - "contractAddress": "0xa741125f4d6b9777a115b326E577F9b4004CB481", - "transactionIndex": 45, - "gasUsed": "468712", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000080000000000000000000000000000000000000000000000100000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x60286b8e84a285570d8c08dec99546f1e14473a81434b2dabf968c1809bcec85", - "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", - "logs": [ - { - "transactionIndex": 45, - "blockNumber": 39287767, - "transactionHash": "0xd68e33d4aa465ec5d7b0878e891a5bcb4c7346266c8124ebb3e393d177d9aada", - "address": "0xa741125f4d6b9777a115b326E577F9b4004CB481", - "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], - "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd7d86d01000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", - "logIndex": 111, - "blockHash": "0x60286b8e84a285570d8c08dec99546f1e14473a81434b2dabf968c1809bcec85" - } - ], - "blockNumber": 39287767, - "cumulativeGasUsed": "5089459", - "status": 1, - "byzantium": true - }, - "args": [0, "625000000000000000", "6800000000000000000", "800000000000000000"], - "numDeployments": 1, - "solcInputHash": "1ccea21f99f9d0cf6dcde9df90c8a652", - "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", - "devdoc": { - "author": "Venus", - "methods": { - "constructor": { - "params": { - "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by 1e18)", - "jumpMultiplierPerYear": "The multiplierPerBlock after hitting a specified utilization point", - "kink_": "The utilization point at which the jump multiplier is applied", - "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by 1e18)" - } - }, - "getBorrowRate(uint256,uint256,uint256)": { - "params": { - "borrows": "The amount of borrows in the market", - "cash": "The amount of cash in the market", - "reserves": "The amount of reserves in the market" - }, - "return": "The borrow rate percentage per block as a mantissa (scaled by 1e18)" - }, - "getSupplyRate(uint256,uint256,uint256,uint256)": { - "params": { - "borrows": "The amount of borrows in the market", - "cash": "The amount of cash in the market", - "reserveFactorMantissa": "The current reserve factor for the market", - "reserves": "The amount of reserves in the market" - }, - "return": "The supply rate percentage per block as a mantissa (scaled by 1e18)" - }, - "utilizationRate(uint256,uint256,uint256)": { - "params": { - "borrows": "The amount of borrows in the market", - "cash": "The amount of cash in the market", - "reserves": "The amount of reserves in the market (currently unused)" - }, - "return": "The utilization rate as a mantissa between [0, 1e18]" - } - }, - "title": "Venus's JumpRateModel Contract" - }, - "userdoc": { - "methods": { - "constructor": "Construct an interest rate model", - "getBorrowRate(uint256,uint256,uint256)": { - "notice": "Calculates the current borrow rate per block, with the error code expected by the market" - }, - "getSupplyRate(uint256,uint256,uint256,uint256)": { - "notice": "Calculates the current supply rate per block" - }, - "utilizationRate(uint256,uint256,uint256)": { - "notice": "Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`" - } - } - }, - "storageLayout": { - "storage": [ - { - "astId": 9103, - "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", - "label": "multiplierPerBlock", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 9105, - "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", - "label": "baseRatePerBlock", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 9107, - "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", - "label": "jumpMultiplierPerBlock", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 9109, - "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", - "label": "kink", - "offset": 0, - "slot": "3", - "type": "t_uint256" - } - ], - "types": { - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 186f7dfea..ade87b8e6 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -25,7 +25,6 @@ "FIL_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", "FIL_Proxy": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "InterestRateModelVBNB": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", - "InterestRateModelVBNBPreLaunchpad": "0xa741125f4d6b9777a115b326E577F9b4004CB481", "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", From 22e14f452eabc08ee613a50ae183985753d16934 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 16 Jul 2024 11:08:12 -0300 Subject: [PATCH 22/85] refactor: add generalized skip functions --- helpers/deploymentConfig.ts | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 0b830d06c..3afdf802b 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -1,7 +1,7 @@ import { contracts as governanceBscMainnet } from "@venusprotocol/governance-contracts/deployments/bscmainnet.json"; import { contracts as governanceBscTestnet } from "@venusprotocol/governance-contracts/deployments/bsctestnet.json"; import { DeploymentsExtension } from "hardhat-deploy/types"; - +import { HardhatRuntimeEnvironment } from "hardhat/types"; import { addresses as venusProtocolBscMainnet } from "../deployments/bscmainnet_addresses.json"; import { addresses as venusProtocolBscTestnet } from "../deployments/bsctestnet_addresses.json"; import { convertToUnit } from "./utils"; @@ -13,16 +13,16 @@ export enum InterestRateModels { export type TokenConfig = | { - isMock: true; - name: string; - symbol: string; - decimals: number; - } + isMock: true; + name: string; + symbol: string; + decimals: number; + } | { - isMock: false; - symbol: string; - tokenAddress: string; - }; + isMock: false; + symbol: string; + tokenAddress: string; + }; export type VTokenConfig = { name: string; @@ -203,3 +203,17 @@ export const getContractAddressOrNullAddress = async (deployments: DeploymentsEx return "0x0000000000000000000000000000000000000000"; } }; + +export const skipRemoteNetworks = + () => + async (hre: HardhatRuntimeEnvironment) => { + return ( + hre.network.name !== "bscmainnet" && + hre.network.name !== "bsctestnet" && + hre.network.name !== "hardhat" + ); + }; + +export const skipSourceNetworks = ({ hardhat }: { hardhat: boolean } = { hardhat: false }) => async (hre: HardhatRuntimeEnvironment) => { + return hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet" || hardhat; +} From 6706439b904f13ce86abf5ba3af68bb4d36f3694 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 16 Jul 2024 11:08:35 -0300 Subject: [PATCH 23/85] fix: deploy Vai controller on hardhat --- deploy/013-vai-controller-impl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/013-vai-controller-impl.ts b/deploy/013-vai-controller-impl.ts index 2935610b6..75f72bf92 100644 --- a/deploy/013-vai-controller-impl.ts +++ b/deploy/013-vai-controller-impl.ts @@ -1,5 +1,6 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipRemoteNetworks } from '../helpers/deploymentConfig'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; @@ -17,6 +18,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["VAIController"]; -func.skip = async hre => hre.network.name !== "bscmainnet" && hre.network.name !== "bsctestnet"; +func.skip = skipRemoteNetworks() export default func; From 6481a2cbeee2c90569fec1834ba7a3c76e8d0162 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 16 Jul 2024 11:09:28 -0300 Subject: [PATCH 24/85] fix: deploy XVS on all networks --- deploy/007-deploy-xvs.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/deploy/007-deploy-xvs.ts b/deploy/007-deploy-xvs.ts index 967d86c7a..0d0be2b4a 100644 --- a/deploy/007-deploy-xvs.ts +++ b/deploy/007-deploy-xvs.ts @@ -16,6 +16,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.tags = ["xvs"]; -func.skip = async (hre: HardhatRuntimeEnvironment) => hre.network.live; - export default func; From 789cc8c2e88d31368d98f8274f564584c9f7c064 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 16 Jul 2024 11:09:44 -0300 Subject: [PATCH 25/85] refactor: use skip generalized skip functions --- deploy/000-lenses.ts | 8 +++---- deploy/001-comptroller.ts | 3 +++ deploy/005-deploy-VTreasuryV8.ts | 4 +++- deploy/006-deploy-psm.ts | 5 +++-- deploy/006-deploy-swaprouter.ts | 8 ++----- deploy/006-update-liquidator.ts | 8 +++---- deploy/007-deploy-VBNBAdmin.ts | 8 +++---- deploy/011-deploy-markets.ts | 8 ++----- deploy/013-vai-controller-impl.ts | 5 +++-- helpers/deploymentConfig.ts | 37 ++++++++++++++----------------- 10 files changed, 42 insertions(+), 52 deletions(-) diff --git a/deploy/000-lenses.ts b/deploy/000-lenses.ts index 4a47285b3..83b027369 100644 --- a/deploy/000-lenses.ts +++ b/deploy/000-lenses.ts @@ -1,6 +1,8 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; const { deploy } = deployments; @@ -30,10 +32,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["Lens"]; -func.skip = async hre => - hre.network.name === "sepolia" || - hre.network.name === "opbnbtestnet" || - hre.network.name === "opbnbmainnet" || - hre.network.name === "ethereum"; +func.skip = skipRemoteNetworks(); export default func; diff --git a/deploy/001-comptroller.ts b/deploy/001-comptroller.ts index 7378e17b5..04d45bd28 100644 --- a/deploy/001-comptroller.ts +++ b/deploy/001-comptroller.ts @@ -4,6 +4,8 @@ import { network } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; const { deploy } = deployments; @@ -45,5 +47,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["Comptroller"]; +func.skip = skipRemoteNetworks(); export default func; diff --git a/deploy/005-deploy-VTreasuryV8.ts b/deploy/005-deploy-VTreasuryV8.ts index 89481d421..57afd275f 100644 --- a/deploy/005-deploy-VTreasuryV8.ts +++ b/deploy/005-deploy-VTreasuryV8.ts @@ -2,6 +2,8 @@ import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipSourceNetworks } from "../helpers/deploymentConfig"; + interface AdminAccounts { [key: string]: string; } @@ -57,6 +59,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["VTreasuryV8"]; -func.skip = async hre => hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet"; +func.skip = skipSourceNetworks(); export default func; diff --git a/deploy/006-deploy-psm.ts b/deploy/006-deploy-psm.ts index 3d6bdc7b3..8a0dfe699 100644 --- a/deploy/006-deploy-psm.ts +++ b/deploy/006-deploy-psm.ts @@ -4,6 +4,8 @@ import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, network, getNamedAccounts, getChainId } = hre; const { deploy } = deployments; @@ -74,7 +76,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.id = "psm_initial_deploy"; // id required to prevent re-execution func.tags = ["PSM"]; -func.skip = async hre => - hre.network.name !== "bscmainnet" && hre.network.name !== "bsctestnet" && hre.network.name !== "hardhat"; +func.skip = skipRemoteNetworks(); export default func; diff --git a/deploy/006-deploy-swaprouter.ts b/deploy/006-deploy-swaprouter.ts index 36d6fedca..8f679145c 100644 --- a/deploy/006-deploy-swaprouter.ts +++ b/deploy/006-deploy-swaprouter.ts @@ -5,6 +5,7 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import Mainnet from "../deployments/bscmainnet.json"; // TESTNET DEPLOYED CONTRACTS import Testnet from "../deployments/bsctestnet.json"; +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; @@ -32,11 +33,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.tags = ["SwapRouter"]; // Pancake Factory is not deployed on the local network -func.skip = async hre => - hre.network.name === "sepolia" || - hre.network.name === "hardhat" || - hre.network.name === "opbnbtestnet" || - hre.network.name === "opbnbmainnet" || - hre.network.name === "ethereum"; +func.skip = skipRemoteNetworks({ hardhat: false }); export default func; diff --git a/deploy/006-update-liquidator.ts b/deploy/006-update-liquidator.ts index b86cef5cb..548898ce5 100644 --- a/deploy/006-update-liquidator.ts +++ b/deploy/006-update-liquidator.ts @@ -2,6 +2,8 @@ import { parseUnits } from "ethers/lib/utils"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, network, getNamedAccounts } = hre; const { deploy, catchUnknownSigner } = deployments; @@ -37,10 +39,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["liquidator-upgrade"]; -func.skip = async hre => - hre.network.name === "sepolia" || - hre.network.name === "opbnbtestnet" || - hre.network.name === "opbnbmainnet" || - hre.network.name === "ethereum"; +func.skip = skipRemoteNetworks(); export default func; diff --git a/deploy/007-deploy-VBNBAdmin.ts b/deploy/007-deploy-VBNBAdmin.ts index 27d6d9136..c3c964557 100644 --- a/deploy/007-deploy-VBNBAdmin.ts +++ b/deploy/007-deploy-VBNBAdmin.ts @@ -3,6 +3,8 @@ import { ethers } from "hardhat"; import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; + const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, network, getNamedAccounts } = hre; const { deploy } = deployments; @@ -46,10 +48,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.id = "vbnbadmin_deploy"; // id required to prevent re-execution func.tags = ["VBNBAdmin"]; -func.skip = async hre => - hre.network.name === "sepolia" || - hre.network.name === "opbnbtestnet" || - hre.network.name === "opbnbmainnet" || - hre.network.name === "ethereum"; +func.skip = skipRemoteNetworks(); export default func; diff --git a/deploy/011-deploy-markets.ts b/deploy/011-deploy-markets.ts index 486edc4a3..a45caf909 100644 --- a/deploy/011-deploy-markets.ts +++ b/deploy/011-deploy-markets.ts @@ -4,7 +4,7 @@ import { ethers } from "hardhat"; import { DeployFunction, DeployResult } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { InterestRateModels, getConfig, getTokenConfig } from "../helpers/deploymentConfig"; +import { InterestRateModels, getConfig, getTokenConfig, skipRemoteNetworks } from "../helpers/deploymentConfig"; const mantissaToBps = (num: BigNumberish) => { return BigNumber.from(num).div(parseUnits("1", 14)).toString(); @@ -88,10 +88,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["Markets"]; -func.skip = async hre => - hre.network.name === "sepolia" || - hre.network.name === "opbnbtestnet" || - hre.network.name === "opbnbmainnet" || - hre.network.name === "ethereum"; +func.skip = skipRemoteNetworks(); export default func; diff --git a/deploy/013-vai-controller-impl.ts b/deploy/013-vai-controller-impl.ts index 75f72bf92..f2fd18ec9 100644 --- a/deploy/013-vai-controller-impl.ts +++ b/deploy/013-vai-controller-impl.ts @@ -1,6 +1,7 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { skipRemoteNetworks } from '../helpers/deploymentConfig'; + +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; @@ -18,6 +19,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; func.tags = ["VAIController"]; -func.skip = skipRemoteNetworks() +func.skip = skipRemoteNetworks(); export default func; diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 3afdf802b..1ecc8a930 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -2,6 +2,7 @@ import { contracts as governanceBscMainnet } from "@venusprotocol/governance-con import { contracts as governanceBscTestnet } from "@venusprotocol/governance-contracts/deployments/bsctestnet.json"; import { DeploymentsExtension } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; + import { addresses as venusProtocolBscMainnet } from "../deployments/bscmainnet_addresses.json"; import { addresses as venusProtocolBscTestnet } from "../deployments/bsctestnet_addresses.json"; import { convertToUnit } from "./utils"; @@ -13,16 +14,16 @@ export enum InterestRateModels { export type TokenConfig = | { - isMock: true; - name: string; - symbol: string; - decimals: number; - } + isMock: true; + name: string; + symbol: string; + decimals: number; + } | { - isMock: false; - symbol: string; - tokenAddress: string; - }; + isMock: false; + symbol: string; + tokenAddress: string; + }; export type VTokenConfig = { name: string; @@ -204,16 +205,12 @@ export const getContractAddressOrNullAddress = async (deployments: DeploymentsEx } }; -export const skipRemoteNetworks = - () => +export const skipRemoteNetworks = () => async (hre: HardhatRuntimeEnvironment) => { + return hre.network.name !== "bscmainnet" && hre.network.name !== "bsctestnet" && hre.network.name !== "hardhat"; +}; + +export const skipSourceNetworks = + ({ hardhat }: { hardhat: boolean } = { hardhat: false }) => async (hre: HardhatRuntimeEnvironment) => { - return ( - hre.network.name !== "bscmainnet" && - hre.network.name !== "bsctestnet" && - hre.network.name !== "hardhat" - ); + return hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet" || hardhat; }; - -export const skipSourceNetworks = ({ hardhat }: { hardhat: boolean } = { hardhat: false }) => async (hre: HardhatRuntimeEnvironment) => { - return hre.network.name === "bsctestnet" || hre.network.name === "bscmainnet" || hardhat; -} From 0112a0f122333b6bef5b3b46f295765f620cbc97 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 16 Jul 2024 12:57:43 -0300 Subject: [PATCH 26/85] fix: deploy proxy and set implementation --- ...r-impl.ts => 014-vai-controller-deploy.ts} | 8 +++++++ deploy/014-vai-controller-set-config.ts | 22 +++++++++++++++++++ ...deemer.ts => 015-deploy-token-redeemer.ts} | 0 deployments/bscmainnet/.migrations.json | 3 ++- deployments/bsctestnet/.migrations.json | 3 ++- 5 files changed, 34 insertions(+), 2 deletions(-) rename deploy/{013-vai-controller-impl.ts => 014-vai-controller-deploy.ts} (81%) create mode 100644 deploy/014-vai-controller-set-config.ts rename deploy/{014-deploy-token-redeemer.ts => 015-deploy-token-redeemer.ts} (100%) diff --git a/deploy/013-vai-controller-impl.ts b/deploy/014-vai-controller-deploy.ts similarity index 81% rename from deploy/013-vai-controller-impl.ts rename to deploy/014-vai-controller-deploy.ts index f2fd18ec9..5651c14b9 100644 --- a/deploy/013-vai-controller-impl.ts +++ b/deploy/014-vai-controller-deploy.ts @@ -16,6 +16,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { autoMine: true, args: [], }); + + await deploy("VaiUnitroller", { + contract: "VAIUnitroller", + from: deployer, + log: true, + autoMine: true, + args: [], + }); }; func.tags = ["VAIController"]; diff --git a/deploy/014-vai-controller-set-config.ts b/deploy/014-vai-controller-set-config.ts new file mode 100644 index 000000000..de44d019e --- /dev/null +++ b/deploy/014-vai-controller-set-config.ts @@ -0,0 +1,22 @@ +import { ethers } from "hardhat"; +import { DeployFunction } from "hardhat-deploy/types"; + +import { skipRemoteNetworks } from "../helpers/deploymentConfig"; + +const func: DeployFunction = async function () { + const vaiController = await ethers.getContract("VaiController"); + + let vaiUnitroller = await ethers.getContract("VaiUnitroller"); + + await vaiUnitroller._setPendingImplementation(vaiController.address); + await vaiController._become(vaiUnitroller.address); + + vaiUnitroller = await ethers.getContractAt("VAIController", (await ethers.getContract("VaiUnitroller")).address); + await vaiUnitroller.initialize(); +}; + +func.tags = ["VAIController", "configuration"]; +func.id = "vai_controller_config"; // id required to prevent re-execution +func.skip = skipRemoteNetworks(); + +export default func; diff --git a/deploy/014-deploy-token-redeemer.ts b/deploy/015-deploy-token-redeemer.ts similarity index 100% rename from deploy/014-deploy-token-redeemer.ts rename to deploy/015-deploy-token-redeemer.ts diff --git a/deployments/bscmainnet/.migrations.json b/deployments/bscmainnet/.migrations.json index d36c1e8df..522d782a7 100644 --- a/deployments/bscmainnet/.migrations.json +++ b/deployments/bscmainnet/.migrations.json @@ -3,5 +3,6 @@ "vbnbadmin_deploy": 1697477430, "xvs_vault_configuration": 1697032901, "configure_prime": 1697032901, - "configure_xvs_vaults": 1697032901 + "configure_xvs_vaults": 1697032901, + "vai_controller_config": 40555052 } diff --git a/deployments/bsctestnet/.migrations.json b/deployments/bsctestnet/.migrations.json index bcc51cbb4..b17b2aaba 100644 --- a/deployments/bsctestnet/.migrations.json +++ b/deployments/bsctestnet/.migrations.json @@ -3,5 +3,6 @@ "vbnbadmin_deploy": 1697032901, "xvs_vault_configuration": 1697032901, "configure_prime": 1697032901, - "configure_xvs_vaults": 1697032901 + "configure_xvs_vaults": 1697032901, + "vai_controller_config": 42169786 } From 56b54c58d142b3ba67821f8c4b5334f1bf544aef Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:43:34 +0530 Subject: [PATCH 27/85] feat: add VTreasuryV8 deployment on zksyncsepolia --- .env.example | 1 + .github/workflows/ci.yml | 2 +- .gitignore | 2 + deploy/005-deploy-VTreasuryV8.ts | 13 +- deployments/zksyncsepolia/.chainId | 1 + deployments/zksyncsepolia/VTreasuryV8.json | 424 +++++++++ .../38fe5c4d0593c7264a718b3ec83e4caf.json | 277 ++++++ hardhat.config.ts | 28 +- package.json | 11 +- yarn.lock | 861 +++++++++++++++++- 10 files changed, 1589 insertions(+), 31 deletions(-) create mode 100644 deployments/zksyncsepolia/.chainId create mode 100644 deployments/zksyncsepolia/VTreasuryV8.json create mode 100644 deployments/zksyncsepolia/solcInputs/38fe5c4d0593c7264a718b3ec83e4caf.json diff --git a/.env.example b/.env.example index 9181e4eef..5773c1852 100644 --- a/.env.example +++ b/.env.example @@ -18,6 +18,7 @@ DEPLOYER_PRIVATE_KEY= #ARCHIVE_NODE_arbitrumsepolia=https://sepolia-rollup.arbitrum.io/rpc #ARCHIVE_NODE_xlayertestnet=https://rpc.ankr.com/xlayer_testnet/ #ARCHIVE_NODE_xlayermainnet=https://rpc.ankr.com/xlayer +# ARCHIVE_NODE_zksyncsepolia=https://zksync-sepolia.g.alchemy.com/v2/ ETHERSCAN_API_KEY= diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3bed78e7..9d6c1c1d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,7 @@ jobs: - name: Export deployments run: | - for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone xlayertestnet xlayermainnet; do + for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone xlayertestnet xlayermainnet zksyncsepolia; do EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done diff --git a/.gitignore b/.gitignore index fc0a2ab9c..62e02dcb0 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,9 @@ junit.xml # hardhat typechain artifacts +artifacts-zk cache +cache-zk # OZ .openzeppelin/ diff --git a/deploy/005-deploy-VTreasuryV8.ts b/deploy/005-deploy-VTreasuryV8.ts index 57afd275f..7f58367f4 100644 --- a/deploy/005-deploy-VTreasuryV8.ts +++ b/deploy/005-deploy-VTreasuryV8.ts @@ -32,30 +32,29 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2", // ARBITRUM_SEPOLIA MULTISIG arbitrumone: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0", // ARBITRUM_ONE MULTISIG xlayertestnet: "0x5961449d63149035aCfC0714D5155f24C9819004", // XLAYER TESTNET MULTISIG + zksyncsepolia: "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866", // ZKSYNC SEPOLIA MULTISIG bscmainnet: await getTimelock(), bsctestnet: await getTimelock(), hardhat: deployer, }; - const deployerSigner = await hre.ethers.getSigner(deployer); const treasuryInstance = await deploy("VTreasuryV8", { contract: "VTreasuryV8", from: deployer, args: [], log: true, autoMine: true, + skipIfAlreadyDeployed: true, }); const adminAccount: string = acmAdminAccount[hre.network.name]; const VTreasuryV8 = await ethers.getContractAt("VTreasuryV8", treasuryInstance.address); - if ((await VTreasuryV8.owner()).toLowerCase() != adminAccount.toLowerCase()) { - console.log("Transferring owner to venus admin account"); - const tx = await VTreasuryV8.connect(deployerSigner).transferOwnership(adminAccount); - tx.wait(); - console.log("Ownership Transferred to: ", await VTreasuryV8.pendingOwner()); - } + console.log("Transferring owner to venus admin account"); + const tx = await VTreasuryV8.transferOwnership(adminAccount); + tx.wait(); + console.log("Ownership Transferred to: ", await VTreasuryV8.pendingOwner()); }; func.tags = ["VTreasuryV8"]; diff --git a/deployments/zksyncsepolia/.chainId b/deployments/zksyncsepolia/.chainId new file mode 100644 index 000000000..f1efb2054 --- /dev/null +++ b/deployments/zksyncsepolia/.chainId @@ -0,0 +1 @@ +300 \ No newline at end of file diff --git a/deployments/zksyncsepolia/VTreasuryV8.json b/deployments/zksyncsepolia/VTreasuryV8.json new file mode 100644 index 000000000..d65459474 --- /dev/null +++ b/deployments/zksyncsepolia/VTreasuryV8.json @@ -0,0 +1,424 @@ +{ + "address": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA", + "abi": [ + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "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": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryNative", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryToken", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA", + "transactionIndex": 0, + "gasUsed": "1279287", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6", + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x00000000000000000000000000000000000000000000000000017212dbd72b00", + "logIndex": 0, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + }, + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x0000000000000000000000000000000000008008", + "topics": ["0x27fe8c0b49f49507b9d4fe5968c9f49edfe5c9df277d433a07a0717ede97638d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000004950000000000000000000000000000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000800e8ff8579340dce92cb8d3a2dad85cbedc221bd192e8ce40459d995d79d7667df1", + "logIndex": 1, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + }, + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x0000000000000000000000000000000000008008", + "topics": [ + "0x3a36e47291f4201faf137fab081d92295bce2d53be2c6ca68ba82c7faa9ce241", + "0x000000000000000000000000000000000000000000000000000000000000800e", + "0x8ff8579340dce92cb8d3a2dad85cbedc221bd192e8ce40459d995d79d7667df1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000186202230000000000000000000002db00010430000000b801008041ffffffffffffffff0000000000320435000000b80210009c000000b802008041000002ba0000c13d0000000102000039000000000101004b000000800010043f0000800d020000390000000002000414000000000100041a000000b80320009c00000040011002100000000000210435000000400100043d000000c0011002100000000001000414000002ba0000213d000000000101043b000002ba0000413d000002da0001042e000000200100003902d902cf0000040f0000000303000039000000bb011001c700000000010004160000000102200190000000000001042d000000000201004b000000000112019f000000c40010043f000000a40010043f000000840010043f000000cb01000041000000db0000c13d000000010100003900000000030100190000000002000019000000000101043300000020030000390000000402100039000000cb0200004100000024021000390000004402100039000000c0022002100000000005000019000100000001035502d902d40000040f0000000001000019000000e201000041000000000202004b000000ba01100197000000000201041a000000000021041b000002ba0000613d0000000101200190000000bc04000041000000c001200210000000b80120009c000000000262019f000000d90000c13d000000600330027053616665455243320000002400000000020000000000000000000000ffffffff000000000001042f000000b80310009c0000000401000029000000e704400197000000000121019f00000000014101cf000000000141022f000001000440008900000003044002100000001f0430018f000000000968004b0000000008980436000000007907043c0000026c0000c13d00000001055001900000026c0000213d0000000105004039000000400400043d000000e703300197000000cd011001c70000000000560435000000000701034f000000200430008c0000000002080019000700000008001d000600000009001d00050000000a001d00000000040340190000002004000039000000000131034f000000740000613d0000028b0000613d000000c8011001c7000000040010044300000000001004390000001f010000390000000202000039000000000200041600000000050004110000000402100370000000d60000013d000000b9022001970000000201000039000000ba05100197000000000020041b0000000006000411000000b902100197000000000012041b000000b901100197000000400040043f000000b803300197a5a5b6fb5ee820e5e7a2de409e1e4a895abe6f14a9c1a648a1a8f67cf36b6872ffffffffffffffe06865206f776e65726973206e6f7420742063616c6c6572204f776e61626c653a6e742063616c6c00207265656e747261637947756172643a5265656e7472616e00000004000000808579befe0000000000000064000000806265207a65726f00757374206e6f7420416d6f756e74206d77697468647261774e487b71000000007472616374000000206e6f6e2d636f6e2063616c6c20746f416464726573733ada8d42c9c056980c840c85d79c130dcb36c8f8bdf640d0de6d043f5c542a67e800000084000000006f6e20646964206e206f706572617469303a20455243323065640000000000006f742073756363657fffffffffffffff023a8d90e8508b8302500962caba6a1568e884a7374b41e01806aa1896bbf2656c206661696c65646576656c2063616c303a206c6f772d6ca9059cbb00000000000000240000008070a0823100000000000000840000008072000000000000006e6577206f776e656e6f7420746865206c6c657220697320537465703a2063614f776e61626c65320000002000000080d8c362d765e22700fa1faef420bfe791c7c124b9cd0de2d338d16b8cac22d99fbdd8bdfcdaf30dfa598c481af871c76f02c636f8939b0b1b41448dfa44379fc60000002000000000000000640000000008c379a0000000006c6564000000000043616c6c206661690200000200000000125fc972a6507f396b1951864fbfc14e829bd487b90b72539cc7f708afc659440000000079ba50970000000074c17a3500000000715018a600000000e30c3978000000008da5cb5b00000000fed7036e00000000f2fde38b00000000f2fde38a000000008da5cb5a00000040000001000000000200000000e3b4186f6b6457e019497f9722a3daaf1344cd1fd0a4f2848be0079c53165914ffffffff00000000000002d900000432000002d700210423000002d200210421000001a10000013d00000006060000290000000705000029000000dd040000410000000502000029000000dc011001c70000002a03000039000000db03000041000000da030000410000006402100039000002bc0000c13d000000000221004b000000010200c0390000000301000029000000200110008c000000d90210009c000002bc0000613d00000060011002100000004002300210000000b803008041000000b80230009c0000000303000029000001d80000013d0000001d03000039000000de03000041000002950000c13d00008002020000390000000701000029000000d801000041000002990000c13d000000e001000041000000040010043f00000041010000390000000000100435000000df0100004100000060022002100000004402400039000000000002043500000000023200190000001f04200039000002580000413d000000000524004b0000002004400039000000000065043500000000060604330000000006740019000000000534001900000000040000190000025f0000613d0000000207000029000000000402004b000000440310003900000000002304350000002403100039000000000202043300000001020000290000028c0000c13d000002720000c13d0000000000130435000000000151019f000000000545022f00000000054501cf00000000050304330000000303300029000002430000613d000000000504004b000002310000c13d000000000857004b0000000007870436000000006806043c000000000601034f00000000053700190000000307000029000002350000613d00000005033002100000000503300272000300000005001d00000000053504360000000405000029000000c90640009c000000000554004b0000000004450019000400000004001d000000e7054001970000003f044000390000001f04300039000002430000013d000300800000003d000400600000003d000002180000c13d000000b803300198000000b80030019d000000010220018f000000000113019f0000006003500210000000b805008041000000b80350009c0000004001400210000000400220021000000060013002100000000000150435000000000161019f000000000646022f00000000064601cf00000000060504330000000005520019000000000151034f000001fd0000613d000000000604004b000001eb0000c13d00000000080200190000000006520019000001ef0000613d00000005055002100000000505300272000000400200043d000000cc011001c70000000b03000039000000ca030000410000018f0000013d0000000000310435000000000343019f00000000033501cf000000000535022f0000010003300089000000000505043b000000000434022f00000000043401cf000000000401043300000003033002100000000001140019000000000515034f0000018f0000613d000000000603004b000001c00000c13d0000000008040019000000000705034f0000000006140019000001c40000613d00000005011002100000000501100272000000010500036700000000041404360000001f0310018f000000400030043f000000c90630009c000000000543004b00000000033400190000003f033000390000001f031000390000000605000029000000ce0400004100000002030000390000000702000029000001d30000613d000001a90000c13d000000000301004b000000b801100197000000b80010019d00000060011002700000800902000039000002180000013d000002030000c13d000000040680008c0000000005020433000100000006001d000000200500003900000100065001bf0000000000670435000200000007001d000000d7060000410000012007500039000000400060043f0000014006500039000000000062043500000044060000390000000000a60435000000c406500039000000000a06801900000000076a004b0000000000970435000000a4075000390000000000740435000000d607000041000000800600043d000000a004500039000000400020043f00000080025001bf000000600520018f0000001f02400039000000050a00002900000006090000290000000708000029000001e30000613d000000000003001f000000000585019f00000000055701cf000000000757022f0000010005500089000000000707043b000000000858022f00000000085801cf000000000806043300000080066000390000000305500210000000000761034f0000000506600210000001590000613d000000000705004b000001460000c13d000000a00890008c0000000009890436000000007807043c0000014a0000613d00000005064002720000001f0540018f0000008009000039000000d5011001c7000001880000013d0000000002040019000001850000c13d000000000203004b000001600000013d000000200230008c0000000003000031000001320000c13d000000040480008c000000840020043f0000000002000410000000800020043f000000d402000041000000e1010000410000011e0000c13d00000000020a004b000000000209004b000000000208004b000000000022041b0000018d0000013d00000000010000310000012b0000c13d000700000003001d000000040240008c00000006040000290000000703004029000000070210006b0000800a020000390000000001000410000000c701000041000600000003001d000700000004001d000001140000613d000000000104004b000000d301000041000000e40010043f000000d201000041000000d1010000410000002901000039000000e601000041000000cf04000041000000000151004b000000ba0160009c000000000601043b0000000401100370000000240230008c000000e5010000410000010d0000c13d000000020440008c000000000402041a000000000242004b0000000004000411000000ba02200197000000000200041a000000ba0220009c000000ba09200197000000000202043b0000004402100370000000000a02043b0000002402100370000000ba0280009c000000000802043b000000640230008c0000000006000019000000000010041b000000000032041b000000b903300197000000000302041a000000000252004b000000ba02100197000000d001000041000000e401000041000000e301000041000000f00000c13d000000000103004b000000000011041b000000b10000613d000000020220008c000000000121004b0000000002000411000000ba0110009c000000ba031001970000002401100370000000000402043b000000440230008c000000c10220009c000000bb0000613d000000c00420009c000000e40000c13d000000000363004b000000ba03200197000000c60120009c000000980000613d000000c50420009c000000800000613d000000c40420009c000000bd0100004100000120000004430000010000100443000000000102041a0000007c0000013d000000000101041a000000c30120009c000000780000613d000000c20120009c0000005b0000213d000000bf0420009c0000003c0000a13d000000be0420009c000000e002200270000000000201043b000000d90000413d000000040230008c0000001c0000c13d0000008004000039000100000031035500070000000000020002000000000002022202210027004000770220021f0076001d021e021d021c021b021a0219021802170216021502140213003f001c00090007002602120211001c000900070008021000750074000d00730072003e0071000c0070003d0006003c001b000b001a003b0019003a0039006f000800380018020f020e020d0017020c020b020a02090208003f001c00090007002600370207007202060205006e0038000d0073003e0071000c0070003d0006003c001b000b001a003b006d020402030202003f02010016006c020001ff001501fe01fd0014000d003601fc01fb0025006f003701fa01f901f801f701f601f5000a01f40001001c00090007000d0036000a01f30017001c00090007000d01f2006b01f10025000801f001ef01ee007501ed0013000500020012001b000b001a003b01ec006d01eb0016006a00350007006c01ea01e9001401e801e701e601e501e401e3001401e201e101e001df0025006901de01dd01dc0024000a001800230068002201db00210034000101da0016006a0035000701d901d801d70014000d0036006b01d6002500260037006e003e00380013000500020012001b000b001a01d50019003a0039003300170024000a00180023002201d40021003400010024000a0018002301d3002201d2002101d101d001cf000101ce01cd01cc01cb01ca006701c900660013000500020012006501c80032001d0064001501c7002701c6001301c501c401c301c2000801c101c001bf01be006301bd006301bc01bb0024000a001800230068002201ba00210034000101b901b801b701b6000c01b501b4006201b301b20061006001b100050002001201b001af01ae01ad005f005e003d0006003c01ac005d005c003201ab002700400077005b0061006001aa01a901a8005a01a701a601a501a401a301a201a101a0019f019e019d019c019b019a0199019801970196005901950031001d01940193019201910190018f018e018d005b0016018c018b018a01890188005e0187018601850184005f0183018201810180017f017e017d017c017b017a0179017800590177000c0176005d017500080174001b0173003000190031017201710170016f016e0011001d016d016c001000050002000f000c000e0006002f00200058000b016b016a01690019003a00390026006900740033001701680057016700570056016601650030005501640054005300520163016201610160015f015e015d015c015b015a00510050004f0159015801570156015501540153015201510150014f014e014d014c014b014a002e01490004002d01480004002c0010002b002a000400050002000f014700010146004e0145014401430142005a014100510050004f0140013f013e013d013c004d013b013a01390015004c004b004a013801370136000e000601350020000101340133013201310130000e0006002f0049005c0019012f003100270040012e012d012c012b012a0129012800480127012600560125012401230030005501220054005300520076004e01210120011f011e011d011c011b011a011901180117011601150114011300620112004d01110110010f0015004c004b004a010e010d004700290035010c001f010b0011002c0010002b002a0004010a010901080107010601050104010301020101010000ff00fe00fd00fc00fb00fa004800f900f800f7000e000600f600460002000f0020000100f500f400f300f200f10001001f00f000ef006700ee00660013000500020012006500ed0032001d00640015000900ec0011002e00eb0004002d00ea00e9004500e800e700e600e50046000200e40049000100470029001f00e300e2001400e1001600e00029001f002800df00de0007000900dd001100dc00db0004002e00da0004002d00d90004002c0010002b002a000400050002000f00d8000100330001001100d7001000050002000f000c000e0006002f00200058000b001a00d600d500d400d3004500d20008001e0028001e00d10008001e0028001e00d00017000100000000000000000000000000000044000300cf000000000000004400030003004300000000000000ce00cd00cc00cb00ca000000c9000000000000000000c800000000000000c700000000000000c600000000000000c500000000000000c400000000000000c300000000000000c200000000000000c100000000000000c000bf00be00bd00bc00bb000000420000000000000000000300ba00b90000000000b80000000000000000000000b700000043000000b6000000b500b400b300b200b100b000af00ae0000000000ad000000ac00ab00aa00a900a800a7000000000000000000a6000000a50000000000000000000000a4000000a3000000000000004100a200a100a0009f009e009d009c009b000300030003009a0099000000000041009800970096000000000095000000940093009200910090008f008e008d008c0000000000000000000000420000008b008a0089008800000000008700000086000000000000000000000085000000840083008200810080007f007e007d000300030003007c007b007a00790078000000000000000000000000000000000000000000000000000000000000", + "logIndex": 2, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + }, + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x0000000000000000000000000000000000008004", + "topics": [ + "0xc94722ff13eacf53547c4741dab5228353a05938ffcdd5d4a2d533ae0e618287", + "0x010000e9722371af5b1399b228ece938fb8c93e1aebf95f10a09bfc0feb3e2d6", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + }, + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + }, + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010000e9722371af5b1399b228ece938fb8c93e1aebf95f10a09bfc0feb3e2d6", + "0x000000000000000000000000943ebe4460a12f551d60a68f510ea10cd8d564ba" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + }, + { + "transactionIndex": 0, + "blockNumber": 3453977, + "transactionHash": "0x2009c9d82866199d048668395cc079b400dbd915ecd1507350445f60ef40ccd2", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000000154fc6da91540", + "logIndex": 6, + "blockHash": "0xa6c404c08a401e17edc65f8face1276907266b75d28834399e076657f1a81fd6" + } + ], + "blockNumber": 3453977, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "38fe5c4d0593c7264a718b3ec83e4caf", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"WithdrawTreasuryNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"WithdrawTreasuryToken\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawTreasuryNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawTreasuryToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"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.\"},\"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.\"},\"withdrawTreasuryNative(uint256,address)\":{\"custom:error\":\"ZeroAddressNotAllowed thrown when withdrawAddress is zero.\",\"params\":{\"withdrawAddress\":\"The withdraw address\",\"withdrawAmount\":\"The withdraw amount to owner\"}},\"withdrawTreasuryToken(address,uint256,address)\":{\"custom:error\":\"ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.\",\"params\":{\"tokenAddress\":\"The address of treasury token\",\"withdrawAddress\":\"The withdraw address\",\"withdrawAmount\":\"The withdraw amount to owner\"}}},\"title\":\"VTreasuryV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"kind\":\"user\",\"methods\":{\"withdrawTreasuryNative(uint256,address)\":{\"notice\":\"Withdraw Treasury Native, Only owner call it\"},\"withdrawTreasuryToken(address,uint256,address)\":{\"notice\":\"Withdraw Treasury Tokens, Only owner call it\"}},\"notice\":\"Protocol treasury that holds tokens owned by Venus\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/VTreasuryV8.sol\":\"VTreasuryV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"@openzeppelin/contracts/access/Ownable2Step.sol\":{\"keccak256\":\"0xde231558366826d7cb61725af8147965a61c53b77a352cc8c9af38fc5a92ac3c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd55624076bf61d44af5ff351919e32dda748567acfbdd6ba3d6c7be61c758e\",\"dweb:/ipfs/QmSki4dTrf4GPm7MTpG3fk8mC7rnjwd2zMomLp6jLuF63Q\"]},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://41319e7f621f2dc3733511332c4fd032f8e32ad2aa7fd6f665c19741d9941a34\",\"dweb:/ipfs/QmcYR3bd862GD1Bc7jwrU9bGxrhUu5na1oP964bDCu2id1\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5\",\"dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc5b5dc12fbc4002f282eaa7a5f06d8310ed62c1c77c5770f6283e058454c39a\",\"dweb:/ipfs/Qme9rE2wS3yBuyJq9GgbmzbsBQsW2M2sVFqYYLw7bosGrv\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9d213d3befca47da33f6db0310826bcdb148299805c10d77175ecfe1d06a9a68\",\"dweb:/ipfs/QmRgCn6SP1hbBkExUADFuDo8xkT4UU47yjNF5FhCeRbQmS\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931\",\"dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"contracts/Governance/VTreasuryV8.sol\":{\"keccak256\":\"0x254876cbfd6840dc6d610db8b4d930656f0eda51a00b3aeee6d91ed8c96dcfc1\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://452e607b3ff5eb14d37315022627848ada87df047ae3745f6f42f1ba4ee43e69\",\"dweb:/ipfs/QmU2s1o166cT16BFguGZdTW5tPfsPiVcUzo86yJRhNN3ay\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0002000000000002000700000000000200000000030100190000006003300270000000b80330019700010000003103550000008004000039000000400040043f00000001022001900000001c0000c13d000000040230008c000000d90000413d000000000201043b000000e002200270000000be0420009c0000003c0000a13d000000bf0420009c0000005b0000213d000000c20120009c000000780000613d000000c30120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000101041a0000007c0000013d0000000001000416000000000101004b000002ba0000c13d0000000102000039000000000102041a000000b901100197000000000012041b000000000100041a000000b9021001970000000006000411000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc0400004102d902cf0000040f0000000101200190000002ba0000613d00000002010000390000000102000039000000000021041b000000200100003900000100001004430000012000000443000000bd01000041000002da0001042e000000c40420009c000000800000613d000000c50420009c000000980000613d000000c60120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000201041a000000ba032001970000000006000411000000000363004b000000e40000c13d000000b902200197000000000021041b000000000100041a000000b902100197000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc04000041000000d60000013d000000c00420009c000000bb0000613d000000c10220009c000000d90000c13d000000440230008c000002ba0000413d0000000402100370000000000402043b0000002401100370000000000101043b000000ba03100197000000ba0110009c000002ba0000213d000000000100041a000000ba011001970000000002000411000000000121004b000000db0000c13d0000000201000039000000000201041a000000020220008c000000b10000613d000000000011041b000000000103004b000000f00000c13d000000e301000041000000800010043f000000e401000041000002db000104300000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba01100197000000800010043f000000d001000041000002da0001042e0000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba021001970000000005000411000000000252004b000000db0000c13d0000000102000039000000000302041a000000b903300197000000000032041b000000b901100197000000000010041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000bc040000410000000006000019000000d60000013d000000640230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000402100370000000000802043b000000ba0280009c000002ba0000213d0000002402100370000000000a02043b0000004402100370000000000202043b000000ba09200197000000ba0220009c000002ba0000213d000000000200041a000000ba022001970000000004000411000000000242004b000000db0000c13d0000000202000039000000000402041a000000020440008c0000010d0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e501000041000000c40010043f000000e201000041000002db00010430000000240230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000401100370000000000601043b000000ba0160009c000002ba0000213d000000000100041a000000ba011001970000000005000411000000000151004b000000db0000c13d0000000101000039000000000201041a000000b902200197000000000262019f000000000021041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000cf0400004102d902cf0000040f0000000101200190000002ba0000613d0000000001000019000002da0001042e000000cb01000041000000800010043f0000002001000039000000840010043f000000a40010043f000000e601000041000000c40010043f000000e201000041000002db00010430000000cb01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000000d101000041000000c40010043f000000d201000041000000e40010043f000000d301000041000002db00010430000000000104004b000001140000613d000700000004001d000600000003001d000000c7010000410000000000100439000000000100041000000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c70000800a0200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000070210006b0000000003010019000000070300402900000000010004140000000604000029000000040240008c000700000003001d0000012b0000c13d000000010200003900000000010000310000018d0000013d000000000022041b000000000208004b000000740000613d000000000209004b000000740000613d00000000020a004b0000011e0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e101000041000000c40010043f000000e201000041000002db00010430000000d402000041000000800020043f0000000002000410000000840020043f0000000002000414000000040480008c000001320000c13d000000000131034f0000000003000031000000200230008c00000020040000390000000004034019000001600000013d000000b80210009c000000b801008041000000c001100210000000000203004b000001850000c13d0000000002040019000001880000013d00050000000a001d000600000009001d000000b80120009c000000b802008041000000c001200210000000d5011001c7000700000008001d000000000208001902d902d40000040f000000800900003900000000030100190000006003300270000000b803300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000014a0000613d000000000701034f000000007807043c0000000009890436000000a00890008c000001460000c13d000000000705004b000001590000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00010000000103550000000102200190000001e30000613d00000007080000290000000609000029000000050a0000290000001f02400039000000600520018f00000080025001bf000000400020043f000000200430008c000002ba0000413d000000a004500039000000800600043d000000d6070000410000000000740435000000a407500039000600000009001d000000000097043500000000076a004b000000000a068019000000c40650003900050000000a001d0000000000a60435000000440600003900000000006204350000014006500039000000400060043f0000012007500039000000d706000041000200000007001d000000000067043500000100065001bf0000002005000039000100000006001d000000000056043500000000050204330000000002000414000000040680008c000700000008001d000002030000c13d0000000102000039000002180000013d000000bb011001c70000800902000039000000000500001902d902cf0000040f00010000000103550000006001100270000000b80010019d000000b801100197000000000301004b000001a90000c13d000000400100043d0000000102200190000001d30000613d00000007020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000203000039000000ce04000041000000060500002902d902cf0000040f0000000101200190000002ba0000613d00000001010000390000000202000039000000000012041b0000000001000019000002da0001042e0000001f03100039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000543004b00000000050000190000000105004039000000c90630009c0000026c0000213d00000001055001900000026c0000c13d000000400030043f0000001f0310018f0000000004140436000000010500036700000005011002720000000501100210000001c40000613d0000000006140019000000000705034f0000000008040019000000007907043c0000000008980436000000000968004b000001c00000c13d000000000603004b0000018f0000613d000000000515034f00000000011400190000000303300210000000000401043300000000043401cf000000000434022f000000000505043b0000010003300089000000000535022f00000000033501cf000000000343019f00000000003104350000018f0000013d0000004402100039000000ca03000041000000000032043500000024021000390000000b030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000cc011001c7000002db00010430000000400200043d0000001f0430018f00000005053002720000000505500210000001ef0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000001eb0000c13d000000000604004b000001fd0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000b80320009c000000b8020080410000004002200210000000000112019f000002db000104300000004001400210000000b80350009c000000b8050080410000006003500210000000000113019f000000b80320009c000000b802008041000000c002200210000000000121019f000000000208001902d902cf0000040f000000010220018f000100000001035500000000030100190000006003300270000000b80030019d000000b803300198000002180000c13d000400600000003d000300800000003d000002430000013d0000001f04300039000000e7044001970000003f04400039000000e705400197000000400400043d000400000004001d0000000004450019000000000554004b00000000050000190000000105004039000000c90640009c0000026c0000213d00000001055001900000026c0000c13d000000400040043f0000001f0430018f00000004050000290000000005350436000300000005001d00000005033002720000000503300210000002350000613d00000003070000290000000005370019000000000601034f000000006806043c0000000007870436000000000857004b000002310000c13d000000000504004b000002430000613d000000000131034f00000003033000290000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000013043500000004010000290000000001010433000000000202004b000002720000c13d000000000201004b0000028c0000c13d000000400100043d000000cb02000041000000000021043500000004021000390000002003000039000000000032043500000001020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b00000002070000290000025f0000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000002580000413d0000001f04200039000000e704400197000000000232001900000000000204350000004402400039000000b80320009c000000b8020080410000006002200210000000b80310009c000000b8010080410000004001100210000000000112019f000002db00010430000000df0100004100000000001004350000004101000039000000040010043f000000e001000041000002db00010430000000000201004b000002990000c13d000000d8010000410000000000100439000000070100002900000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c7000080020200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000000101004b000002950000c13d000000400100043d0000004402100039000000de03000041000000000032043500000024021000390000001d03000039000001d80000013d000000000001042f0000000303000029000000b80230009c000000b8030080410000004002300210000000b80310009c000000b8010080410000006001100210000000000121019f000002db0001043000000004010000290000000001010433000000000201004b000002bc0000613d000000d90210009c000002ba0000213d000000200110008c000002ba0000413d00000003010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000002ba0000c13d000000000101004b000002bc0000c13d000000400100043d0000006402100039000000da0300004100000000003204350000004402100039000000db03000041000000000032043500000024021000390000002a030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000dc011001c7000002db000104300000000001000019000002db00010430000000400100043d00000005020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000303000039000000dd0400004100000007050000290000000606000029000001a10000013d000000000001042f000002d2002104210000000102000039000000000001042d0000000002000019000000000001042d000002d7002104230000000102000039000000000001042d0000000002000019000000000001042d000002d900000432000002da0001042e000002db00010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008da5cb5a00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fed7036e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000715018a60000000000000000000000000000000000000000000000000000000074c17a350000000000000000000000000000000000000000000000000000000079ba50979cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff43616c6c206661696c656400000000000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000020000000000000000000000000000000000002000000000000000000000000041448dfa44379fc602c636f8939b0b1b598c481af871c76fbdd8bdfcdaf30dfa38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270000000000000000000000000000000000000000200000008000000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000070a08231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000800000000000000000a9059cbb000000000000000000000000000000000000000000000000000000005361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65641806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e00000000000000000000000000000000000000840000000000000000000000006d043f5c542a67e836c8f8bdf640d0de840c85d79c130dcbda8d42c9c056980c416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000007769746864726177416d6f756e74206d757374206e6f74206265207a65726f0000000000000000000000000000000000000000640000008000000000000000008579befe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000005265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0a1a8f67cf36b68725abe6f14a9c1a648e7a2de409e1e4a89a5a5b6fb5ee820e5", + "deployedBytecode": "0x0002000000000002000700000000000200000000030100190000006003300270000000b80330019700010000003103550000008004000039000000400040043f00000001022001900000001c0000c13d000000040230008c000000d90000413d000000000201043b000000e002200270000000be0420009c0000003c0000a13d000000bf0420009c0000005b0000213d000000c20120009c000000780000613d000000c30120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000101041a0000007c0000013d0000000001000416000000000101004b000002ba0000c13d0000000102000039000000000102041a000000b901100197000000000012041b000000000100041a000000b9021001970000000006000411000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc0400004102d902cf0000040f0000000101200190000002ba0000613d00000002010000390000000102000039000000000021041b000000200100003900000100001004430000012000000443000000bd01000041000002da0001042e000000c40420009c000000800000613d000000c50420009c000000980000613d000000c60120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000201041a000000ba032001970000000006000411000000000363004b000000e40000c13d000000b902200197000000000021041b000000000100041a000000b902100197000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc04000041000000d60000013d000000c00420009c000000bb0000613d000000c10220009c000000d90000c13d000000440230008c000002ba0000413d0000000402100370000000000402043b0000002401100370000000000101043b000000ba03100197000000ba0110009c000002ba0000213d000000000100041a000000ba011001970000000002000411000000000121004b000000db0000c13d0000000201000039000000000201041a000000020220008c000000b10000613d000000000011041b000000000103004b000000f00000c13d000000e301000041000000800010043f000000e401000041000002db000104300000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba01100197000000800010043f000000d001000041000002da0001042e0000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba021001970000000005000411000000000252004b000000db0000c13d0000000102000039000000000302041a000000b903300197000000000032041b000000b901100197000000000010041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000bc040000410000000006000019000000d60000013d000000640230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000402100370000000000802043b000000ba0280009c000002ba0000213d0000002402100370000000000a02043b0000004402100370000000000202043b000000ba09200197000000ba0220009c000002ba0000213d000000000200041a000000ba022001970000000004000411000000000242004b000000db0000c13d0000000202000039000000000402041a000000020440008c0000010d0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e501000041000000c40010043f000000e201000041000002db00010430000000240230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000401100370000000000601043b000000ba0160009c000002ba0000213d000000000100041a000000ba011001970000000005000411000000000151004b000000db0000c13d0000000101000039000000000201041a000000b902200197000000000262019f000000000021041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000cf0400004102d902cf0000040f0000000101200190000002ba0000613d0000000001000019000002da0001042e000000cb01000041000000800010043f0000002001000039000000840010043f000000a40010043f000000e601000041000000c40010043f000000e201000041000002db00010430000000cb01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000000d101000041000000c40010043f000000d201000041000000e40010043f000000d301000041000002db00010430000000000104004b000001140000613d000700000004001d000600000003001d000000c7010000410000000000100439000000000100041000000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c70000800a0200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000070210006b0000000003010019000000070300402900000000010004140000000604000029000000040240008c000700000003001d0000012b0000c13d000000010200003900000000010000310000018d0000013d000000000022041b000000000208004b000000740000613d000000000209004b000000740000613d00000000020a004b0000011e0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e101000041000000c40010043f000000e201000041000002db00010430000000d402000041000000800020043f0000000002000410000000840020043f0000000002000414000000040480008c000001320000c13d000000000131034f0000000003000031000000200230008c00000020040000390000000004034019000001600000013d000000b80210009c000000b801008041000000c001100210000000000203004b000001850000c13d0000000002040019000001880000013d00050000000a001d000600000009001d000000b80120009c000000b802008041000000c001200210000000d5011001c7000700000008001d000000000208001902d902d40000040f000000800900003900000000030100190000006003300270000000b803300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000014a0000613d000000000701034f000000007807043c0000000009890436000000a00890008c000001460000c13d000000000705004b000001590000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00010000000103550000000102200190000001e30000613d00000007080000290000000609000029000000050a0000290000001f02400039000000600520018f00000080025001bf000000400020043f000000200430008c000002ba0000413d000000a004500039000000800600043d000000d6070000410000000000740435000000a407500039000600000009001d000000000097043500000000076a004b000000000a068019000000c40650003900050000000a001d0000000000a60435000000440600003900000000006204350000014006500039000000400060043f0000012007500039000000d706000041000200000007001d000000000067043500000100065001bf0000002005000039000100000006001d000000000056043500000000050204330000000002000414000000040680008c000700000008001d000002030000c13d0000000102000039000002180000013d000000bb011001c70000800902000039000000000500001902d902cf0000040f00010000000103550000006001100270000000b80010019d000000b801100197000000000301004b000001a90000c13d000000400100043d0000000102200190000001d30000613d00000007020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000203000039000000ce04000041000000060500002902d902cf0000040f0000000101200190000002ba0000613d00000001010000390000000202000039000000000012041b0000000001000019000002da0001042e0000001f03100039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000543004b00000000050000190000000105004039000000c90630009c0000026c0000213d00000001055001900000026c0000c13d000000400030043f0000001f0310018f0000000004140436000000010500036700000005011002720000000501100210000001c40000613d0000000006140019000000000705034f0000000008040019000000007907043c0000000008980436000000000968004b000001c00000c13d000000000603004b0000018f0000613d000000000515034f00000000011400190000000303300210000000000401043300000000043401cf000000000434022f000000000505043b0000010003300089000000000535022f00000000033501cf000000000343019f00000000003104350000018f0000013d0000004402100039000000ca03000041000000000032043500000024021000390000000b030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000cc011001c7000002db00010430000000400200043d0000001f0430018f00000005053002720000000505500210000001ef0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000001eb0000c13d000000000604004b000001fd0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000b80320009c000000b8020080410000004002200210000000000112019f000002db000104300000004001400210000000b80350009c000000b8050080410000006003500210000000000113019f000000b80320009c000000b802008041000000c002200210000000000121019f000000000208001902d902cf0000040f000000010220018f000100000001035500000000030100190000006003300270000000b80030019d000000b803300198000002180000c13d000400600000003d000300800000003d000002430000013d0000001f04300039000000e7044001970000003f04400039000000e705400197000000400400043d000400000004001d0000000004450019000000000554004b00000000050000190000000105004039000000c90640009c0000026c0000213d00000001055001900000026c0000c13d000000400040043f0000001f0430018f00000004050000290000000005350436000300000005001d00000005033002720000000503300210000002350000613d00000003070000290000000005370019000000000601034f000000006806043c0000000007870436000000000857004b000002310000c13d000000000504004b000002430000613d000000000131034f00000003033000290000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000013043500000004010000290000000001010433000000000202004b000002720000c13d000000000201004b0000028c0000c13d000000400100043d000000cb02000041000000000021043500000004021000390000002003000039000000000032043500000001020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b00000002070000290000025f0000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000002580000413d0000001f04200039000000e704400197000000000232001900000000000204350000004402400039000000b80320009c000000b8020080410000006002200210000000b80310009c000000b8010080410000004001100210000000000112019f000002db00010430000000df0100004100000000001004350000004101000039000000040010043f000000e001000041000002db00010430000000000201004b000002990000c13d000000d8010000410000000000100439000000070100002900000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c7000080020200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000000101004b000002950000c13d000000400100043d0000004402100039000000de03000041000000000032043500000024021000390000001d03000039000001d80000013d000000000001042f0000000303000029000000b80230009c000000b8030080410000004002300210000000b80310009c000000b8010080410000006001100210000000000121019f000002db0001043000000004010000290000000001010433000000000201004b000002bc0000613d000000d90210009c000002ba0000213d000000200110008c000002ba0000413d00000003010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000002ba0000c13d000000000101004b000002bc0000c13d000000400100043d0000006402100039000000da0300004100000000003204350000004402100039000000db03000041000000000032043500000024021000390000002a030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000dc011001c7000002db000104300000000001000019000002db00010430000000400100043d00000005020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000303000039000000dd0400004100000007050000290000000606000029000001a10000013d000000000001042f000002d2002104210000000102000039000000000001042d0000000002000019000000000001042d000002d7002104230000000102000039000000000001042d0000000002000019000000000001042d000002d900000432000002da0001042e000002db00010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008da5cb5a00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fed7036e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000715018a60000000000000000000000000000000000000000000000000000000074c17a350000000000000000000000000000000000000000000000000000000079ba50979cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff43616c6c206661696c656400000000000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000020000000000000000000000000000000000002000000000000000000000000041448dfa44379fc602c636f8939b0b1b598c481af871c76fbdd8bdfcdaf30dfa38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270000000000000000000000000000000000000000200000008000000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000070a08231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000800000000000000000a9059cbb000000000000000000000000000000000000000000000000000000005361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65641806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e00000000000000000000000000000000000000840000000000000000000000006d043f5c542a67e836c8f8bdf640d0de840c85d79c130dcbda8d42c9c056980c416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000007769746864726177416d6f756e74206d757374206e6f74206265207a65726f0000000000000000000000000000000000000000640000008000000000000000008579befe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000005265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0a1a8f67cf36b68725abe6f14a9c1a648e7a2de409e1e4a89a5a5b6fb5ee820e5", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "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." + }, + "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." + }, + "withdrawTreasuryNative(uint256,address)": { + "custom:error": "ZeroAddressNotAllowed thrown when withdrawAddress is zero.", + "params": { + "withdrawAddress": "The withdraw address", + "withdrawAmount": "The withdraw amount to owner" + } + }, + "withdrawTreasuryToken(address,uint256,address)": { + "custom:error": "ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.", + "params": { + "tokenAddress": "The address of treasury token", + "withdrawAddress": "The withdraw address", + "withdrawAmount": "The withdraw amount to owner" + } + } + }, + "title": "VTreasuryV8", + "version": 1 + }, + "userdoc": { + "errors": { + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "kind": "user", + "methods": { + "withdrawTreasuryNative(uint256,address)": { + "notice": "Withdraw Treasury Native, Only owner call it" + }, + "withdrawTreasuryToken(address,uint256,address)": { + "notice": "Withdraw Treasury Tokens, Only owner call it" + } + }, + "notice": "Protocol treasury that holds tokens owned by Venus", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3126, + "contract": "contracts/Governance/VTreasuryV8.sol:VTreasuryV8", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3239, + "contract": "contracts/Governance/VTreasuryV8.sol:VTreasuryV8", + "label": "_pendingOwner", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 4218, + "contract": "contracts/Governance/VTreasuryV8.sol:VTreasuryV8", + "label": "_status", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/zksyncsepolia/solcInputs/38fe5c4d0593c7264a718b3ec83e4caf.json b/deployments/zksyncsepolia/solcInputs/38fe5c4d0593c7264a718b3ec83e4caf.json new file mode 100644 index 000000000..4f6476348 --- /dev/null +++ b/deployments/zksyncsepolia/solcInputs/38fe5c4d0593c7264a718b3ec83e4caf.json @@ -0,0 +1,277 @@ +{ + "language": "Solidity", + "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" + }, + "@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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n require(value <= type(uint248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n require(value <= type(uint240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n require(value <= type(uint232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.2._\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n require(value <= type(uint216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n require(value <= type(uint208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n require(value <= type(uint200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n require(value <= type(uint192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n require(value <= type(uint184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n require(value <= type(uint176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n require(value <= type(uint168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n require(value <= type(uint160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n require(value <= type(uint152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n require(value <= type(uint144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n require(value <= type(uint136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v2.5._\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n require(value <= type(uint120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n require(value <= type(uint112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n require(value <= type(uint104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.2._\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n require(value <= type(uint88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n require(value <= type(uint80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n require(value <= type(uint72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v2.5._\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n require(value <= type(uint56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n require(value <= type(uint48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n require(value <= type(uint40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v2.5._\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n require(value <= type(uint24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v2.5._\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v2.5._\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n *\n * _Available since v3.0._\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 248 bits\");\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 240 bits\");\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 232 bits\");\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.7._\n */\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 224 bits\");\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 216 bits\");\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 208 bits\");\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 200 bits\");\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 192 bits\");\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 184 bits\");\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 176 bits\");\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 168 bits\");\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 160 bits\");\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 152 bits\");\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 144 bits\");\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 136 bits\");\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 128 bits\");\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 120 bits\");\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 112 bits\");\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 104 bits\");\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.7._\n */\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 96 bits\");\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 88 bits\");\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 80 bits\");\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 72 bits\");\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 64 bits\");\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 56 bits\");\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 48 bits\");\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 40 bits\");\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 32 bits\");\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 24 bits\");\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 16 bits\");\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 8 bits\");\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n *\n * _Available since v3.0._\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "@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" + }, + "@openzeppelin/contracts/access/Ownable.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/Context.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 Ownable is Context {\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 constructor() {\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" + }, + "@openzeppelin/contracts/access/Ownable2Step.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 \"./Ownable.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 Ownable2Step is Ownable {\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" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.8.3._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/IERC1967.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n function admin() external view returns (address);\n\n function implementation() external view returns (address);\n\n function changeAdmin(address) external;\n\n function upgradeTo(address) external;\n\n function upgradeToAndCall(address, bytes memory) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n *\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\n * implementation provides a function with the same selector.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\n */\n function _fallback() internal virtual override {\n if (msg.sender == _getAdmin()) {\n bytes memory ret;\n bytes4 selector = msg.sig;\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\n ret = _dispatchUpgradeTo();\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n ret = _dispatchUpgradeToAndCall();\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\n ret = _dispatchChangeAdmin();\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\n ret = _dispatchAdmin();\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\n ret = _dispatchImplementation();\n } else {\n revert(\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n }\n assembly {\n return(add(ret, 0x20), mload(ret))\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function _dispatchAdmin() private returns (bytes memory) {\n _requireZeroValue();\n\n address admin = _getAdmin();\n return abi.encode(admin);\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _dispatchImplementation() private returns (bytes memory) {\n _requireZeroValue();\n\n address implementation = _implementation();\n return abi.encode(implementation);\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _dispatchChangeAdmin() private returns (bytes memory) {\n _requireZeroValue();\n\n address newAdmin = abi.decode(msg.data[4:], (address));\n _changeAdmin(newAdmin);\n\n return \"\";\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n */\n function _dispatchUpgradeTo() private returns (bytes memory) {\n _requireZeroValue();\n\n address newImplementation = abi.decode(msg.data[4:], (address));\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n\n return \"\";\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n */\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n _upgradeToAndCall(newImplementation, data, true);\n\n return \"\";\n }\n\n /**\n * @dev Returns the current admin.\n *\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\n * emulate some proxy functions being non-payable while still allowing value to pass through.\n */\n function _requireZeroValue() private {\n require(msg.value == 0);\n }\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\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 ReentrancyGuard {\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 constructor() {\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" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.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 IERC20Permit {\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" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.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 IERC20 {\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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.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 \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.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 SafeERC20 {\n using Address 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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 IERC20Permit 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(IERC20 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(IERC20 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))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.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 Address {\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" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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 Context {\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" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" + }, + "@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 private _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" + }, + "@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" + }, + "@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" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n\n/// @dev The approximate number of seconds per year\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\n" + }, + "@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/**\n * @title MaxLoopsLimitHelper\n * @author Venus\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\n */\nabstract contract MaxLoopsLimitHelper {\n // Limit for the loops to avoid the DOS\n uint256 public maxLoopsLimit;\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 max loops limit is set\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\n\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param limit Limit for the max loops can execute at a time\n */\n function _setMaxLoopsLimit(uint256 limit) internal {\n require(limit > maxLoopsLimit, \"Comptroller: Invalid maxLoopsLimit\");\n\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\n maxLoopsLimit = limit;\n\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\n }\n\n /**\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\n * @param len Length of the loops iterate\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\n */\n function _ensureMaxLoops(uint256 len) internal view {\n if (len > maxLoopsLimit) {\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\n }\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SECONDS_PER_YEAR } from \"./constants.sol\";\n\nabstract contract TimeManagerV8 {\n /// @notice Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable blocksOrSecondsPerYear;\n\n /// @notice Acknowledges if a contract is time based or not\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n bool public immutable isTimeBased;\n\n /// @notice Stores the current block timestamp or block number depending on isTimeBased\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n function() view returns (uint256) private immutable _getCurrentSlot;\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[48] private __gap;\n\n /// @notice Thrown when blocks per year is invalid\n error InvalidBlocksPerYear();\n\n /// @notice Thrown when time based but blocks per year is provided\n error InvalidTimeBasedConfiguration();\n\n /**\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n * @custom:error InvalidBlocksPerYear is thrown if blocksPerYear entered is zero and timeBased is false\n * @custom:error InvalidTimeBasedConfiguration is thrown if blocksPerYear entered is non zero and timeBased is true\n * @custom:oz-upgrades-unsafe-allow constructor\n */\n constructor(bool timeBased_, uint256 blocksPerYear_) {\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert InvalidBlocksPerYear();\n }\n\n if (timeBased_ && blocksPerYear_ != 0) {\n revert InvalidTimeBasedConfiguration();\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view virtual returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "@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" + }, + "contracts/Admin/VBNBAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \"./VBNBAdminStorage.sol\";\n\n/**\n * @title VBNBAdmin\n * @author Venus\n * @notice This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\n */\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\n using SafeERC20Upgradeable for IWBNB;\n\n /// @notice address of vBNB\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n VTokenInterface public immutable vBNB;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IWBNB public immutable WBNB;\n\n /// @notice Emitted when PSR is updated\n event ProtocolShareReserveUpdated(\n IProtocolShareReserve indexed oldProtocolShareReserve,\n IProtocolShareReserve indexed newProtocolShareReserve\n );\n\n /// @notice Emitted reserves are reduced\n event ReservesReduced(uint256 reduceAmount);\n\n /// @param _vBNB Address of the vBNB contract\n /// @param _WBNB Address of the WBNB token\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\n require(address(_WBNB) != address(0), \"WBNB address invalid\");\n require(address(_vBNB) != address(0), \"vBNB address invalid\");\n\n vBNB = _vBNB;\n WBNB = _WBNB;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /// @notice Used to initialize non-immutable variables\n function initialize(\n IProtocolShareReserve _protocolShareReserve,\n address accessControlManager\n ) external initializer {\n require(address(_protocolShareReserve) != address(0), \"PSR address invalid\");\n protocolShareReserve = _protocolShareReserve;\n\n __ReentrancyGuard_init();\n __AccessControlled_init(accessControlManager);\n }\n\n /**\n * @notice PSR setter.\n * @param protocolShareReserve_ Address of the PSR contract\n * @custom:access Only owner (Governance)\n * @custom:event Emits ProtocolShareReserveUpdated event.\n */\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\n require(address(protocolShareReserve_) != address(0), \"PSR address invalid\");\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\n * @param reduceAmount amount of reserves to reduce\n * @custom:event Emits ReservesReduced event.\n */\n function reduceReserves(uint reduceAmount) external nonReentrant {\n require(vBNB._reduceReserves(reduceAmount) == 0, \"reduceReserves failed\");\n _wrapBNB();\n\n uint256 balance = WBNB.balanceOf(address(this));\n WBNB.safeTransfer(address(protocolShareReserve), balance);\n protocolShareReserve.updateAssetsState(\n vBNB.comptroller(),\n address(WBNB),\n IProtocolShareReserve.IncomeType.SPREAD\n );\n\n emit ReservesReduced(reduceAmount);\n }\n\n /**\n * @notice Wraps BNB into WBNB\n */\n function _wrapBNB() internal {\n uint256 bnbBalance = address(this).balance;\n WBNB.deposit{ value: bnbBalance }();\n }\n\n /**\n * @notice Invoked when BNB is sent to this contract\n * @custom:access Only vBNB is considered a valid sender\n */\n receive() external payable {\n require(msg.sender == address(vBNB), \"only vBNB can send BNB to this contract\");\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\n * @custom:access Only owner (Governance)\n */\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\n require(ok, \"call failed\");\n return res;\n }\n}\n" + }, + "contracts/Admin/VBNBAdminStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\ninterface VTokenInterface {\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function _acceptAdmin() external returns (uint);\n\n function comptroller() external returns (address);\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ncontract VBNBAdminStorage {\n /// @notice address of protocol share reserve contract\n IProtocolShareReserve public protocolShareReserve;\n\n /// @dev gap to prevent collision in inheritence\n uint256[49] private __gap;\n}\n" + }, + "contracts/DelegateBorrowers/MoveDebtDelegate.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { IVBep20, IComptroller } from \"../InterfacesV8.sol\";\n\ncontract MoveDebtDelegate is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n /// @dev VToken return value signalling about successful execution\n uint256 internal constant NO_ERROR = 0;\n\n /// @notice A wildcard indicating that repayment is allowed for _any_ user in the market\n address public constant ANY_USER = address(1);\n\n /// @notice User to borrow on behalf of\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable newBorrower;\n\n /// @notice Whether to allow borrowing from the corresponding vToken\n mapping(address => bool) public borrowAllowed;\n\n /// @notice Whether to allow repaying to the corresponding vToken on behalf of\n /// a certain user. Use ANY_USER to check if repayment is allowed for any user.\n mapping(address => mapping(address => bool)) public repaymentAllowed;\n\n /// @notice Emitted when vToken is allowed or denied to be borrowed from\n event BorrowAllowedSet(address indexed vTokenToBorrow, bool allowed);\n\n /// @notice Emitted when vToken is allowed or denied to be borrowed from\n event RepaymentAllowedSet(address indexed vTokenToRepay, address indexed originalBorrower, bool allowed);\n\n /// @notice Emitted if debt is swapped successfully\n event DebtMoved(\n address indexed originalBorrower,\n address indexed vTokenRepaid,\n uint256 repaidAmount,\n address newBorrower,\n address indexed vTokenBorrowed,\n uint256 borrowedAmount\n );\n\n /// @notice Emitted when the owner transfers tokens, accidentially sent to this contract,\n /// to their account\n event SweptTokens(address indexed token, uint256 amount);\n\n /// @notice Thrown if VTokens' comptrollers are not equal\n error ComptrollerMismatch();\n\n /// @notice Thrown if repayment fails with an error code\n error RepaymentFailed(uint256 errorCode);\n\n /// @notice Thrown if borrow fails with an error code\n error BorrowFailed(uint256 errorCode);\n\n /// @notice Thrown if borrowing from the corresponding vToken is not allowed\n error BorrowNotAllowed(address vToken);\n\n /// @notice Thrown if repaying the debts of the borrower to the corresponding vToken is not allowed\n error RepaymentNotAllowed(address vToken, address borrower);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param newBorrower_ User to borrow on behalf of\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address newBorrower_) {\n newBorrower = newBorrower_;\n _disableInitializers();\n }\n\n function initialize() external initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n }\n\n /**\n * @notice Repays originalBorrower's borrow in vTokenToRepay.underlying() and borrows\n * vTokenToBorrow.underlying() on behalf of newBorrower.\n *\n * @param originalBorrower The address of the borrower, whose debt to repay\n * @param vTokenToRepay VToken to repay to on behalf of originalBorrower\n * @param repayAmount The amount to repay in terms of vTokenToRepay.underlying()\n * @param vTokenToBorrow VToken to borrow from\n */\n function moveDebt(\n IVBep20 vTokenToRepay,\n address originalBorrower,\n uint256 repayAmount,\n IVBep20 vTokenToBorrow\n ) external nonReentrant {\n if (!borrowAllowed[address(vTokenToBorrow)]) {\n revert BorrowNotAllowed(address(vTokenToBorrow));\n }\n\n mapping(address => bool) storage repaymentAllowedFor = repaymentAllowed[address(vTokenToRepay)];\n if (!repaymentAllowedFor[ANY_USER] && !repaymentAllowedFor[originalBorrower]) {\n revert RepaymentNotAllowed(address(vTokenToRepay), originalBorrower);\n }\n\n uint256 actualRepaymentAmount = _repay(vTokenToRepay, originalBorrower, repayAmount);\n uint256 amountToBorrow = _convert(vTokenToRepay, vTokenToBorrow, actualRepaymentAmount);\n _borrow(vTokenToBorrow, amountToBorrow);\n emit DebtMoved(\n originalBorrower,\n address(vTokenToRepay),\n actualRepaymentAmount,\n newBorrower,\n address(vTokenToBorrow),\n amountToBorrow\n );\n }\n\n /**\n * @notice Allows or denies borrowing from the corresponding vToken\n * @param vTokenToBorrow VToken to borrow from\n * @param allow Whether to allow borrowing from the corresponding vToken\n */\n function setBorrowAllowed(address vTokenToBorrow, bool allow) external onlyOwner {\n ensureNonzeroAddress(vTokenToBorrow);\n if (borrowAllowed[vTokenToBorrow] != allow) {\n borrowAllowed[vTokenToBorrow] = allow;\n emit BorrowAllowedSet(vTokenToBorrow, allow);\n }\n }\n\n /**\n * @notice Allows or denies repaying the debts of originalBorrower to the corresponding vToken\n * @param vTokenToRepay VToken to repay to\n * @param originalBorrower The address of the borrower, whose debt to repay (or ANY_USER to allow\n * repayments for all users in the market, e.g. if the market is going to be deprecated soon)\n * @param allow Whether to allow repaying to the corresponding vToken on behalf of originalBorrower\n */\n function setRepaymentAllowed(address vTokenToRepay, address originalBorrower, bool allow) external onlyOwner {\n ensureNonzeroAddress(vTokenToRepay);\n ensureNonzeroAddress(originalBorrower);\n if (repaymentAllowed[vTokenToRepay][originalBorrower] != allow) {\n repaymentAllowed[vTokenToRepay][originalBorrower] = allow;\n emit RepaymentAllowedSet(vTokenToRepay, originalBorrower, allow);\n }\n }\n\n /**\n * @notice Transfers tokens, accidentially sent to this contract, to the owner\n * @param token ERC-20 token to sweep\n */\n function sweepTokens(IERC20Upgradeable token) external onlyOwner {\n uint256 amount = token.balanceOf(address(this));\n token.safeTransfer(owner(), amount);\n emit SweptTokens(address(token), amount);\n }\n\n /**\n * @dev Transfers the funds from the sender and repays a borrow in vToken on behalf of the borrower\n * @param vTokenToRepay VToken to repay to\n * @param borrower The address of the borrower, whose debt to repay\n * @param repayAmount The amount to repay in terms of underlying\n */\n function _repay(\n IVBep20 vTokenToRepay,\n address borrower,\n uint256 repayAmount\n ) internal returns (uint256 actualRepaymentAmount) {\n IERC20Upgradeable underlying = IERC20Upgradeable(vTokenToRepay.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n underlying.safeTransferFrom(msg.sender, address(this), repayAmount);\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 repayAmountMinusFee = balanceAfter - balanceBefore;\n\n uint256 borrowBalanceBefore = vTokenToRepay.borrowBalanceCurrent(borrower);\n approveOrRevert(underlying, address(vTokenToRepay), repayAmountMinusFee);\n uint256 err = vTokenToRepay.repayBorrowBehalf(borrower, repayAmountMinusFee);\n if (err != NO_ERROR) {\n revert RepaymentFailed(err);\n }\n approveOrRevert(underlying, address(vTokenToRepay), 0);\n uint256 borrowBalanceAfter = vTokenToRepay.borrowBalanceCurrent(borrower);\n return borrowBalanceBefore - borrowBalanceAfter;\n }\n\n /**\n * @dev Borrows in vToken on behalf of the borrower and transfers the funds to the sender\n * @param vTokenToBorrow VToken to borrow from\n * @param borrowAmount The amount to borrow in terms of underlying\n */\n function _borrow(IVBep20 vTokenToBorrow, uint256 borrowAmount) internal {\n IERC20Upgradeable underlying = IERC20Upgradeable(vTokenToBorrow.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n uint256 err = vTokenToBorrow.borrowBehalf(newBorrower, borrowAmount);\n if (err != NO_ERROR) {\n revert BorrowFailed(err);\n }\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 actualBorrowedAmount = balanceAfter - balanceBefore;\n underlying.safeTransfer(msg.sender, actualBorrowedAmount);\n }\n\n /**\n * @dev Converts the value expressed in convertFrom.underlying() to a value\n * in convertTo.underlying(), using the oracle price\n * @param convertFrom VToken to convert from\n * @param convertTo VToken to convert to\n * @param amount The amount in convertFrom.underlying()\n */\n function _convert(IVBep20 convertFrom, IVBep20 convertTo, uint256 amount) internal view returns (uint256) {\n IComptroller comptroller = convertFrom.comptroller();\n if (comptroller != convertTo.comptroller()) {\n revert ComptrollerMismatch();\n }\n ResilientOracleInterface oracle = comptroller.oracle();\n\n // Decimals are accounted for in the oracle contract\n uint256 scaledUsdValue = oracle.getUnderlyingPrice(address(convertFrom)) * amount; // the USD value here has 36 decimals\n return scaledUsdValue / oracle.getUnderlyingPrice(address(convertTo));\n }\n}\n" + }, + "contracts/DelegateBorrowers/SwapDebtDelegate.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { IVBep20, IComptroller } from \"../InterfacesV8.sol\";\n\ncontract SwapDebtDelegate is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n /// @dev VToken return value signalling about successful execution\n uint256 internal constant NO_ERROR = 0;\n\n /// @notice Emitted if debt is swapped successfully\n event DebtSwapped(\n address indexed borrower,\n address indexed vTokenRepaid,\n uint256 repaidAmount,\n address indexed vTokenBorrowed,\n uint256 borrowedAmount\n );\n\n /// @notice Emitted when the owner transfers tokens, accidentially sent to this contract,\n /// to their account\n event SweptTokens(address indexed token, uint256 amount);\n\n /// @notice Thrown if VTokens' comptrollers are not equal\n error ComptrollerMismatch();\n\n /// @notice Thrown if repayment fails with an error code\n error RepaymentFailed(uint256 errorCode);\n\n /// @notice Thrown if borrow fails with an error code\n error BorrowFailed(uint256 errorCode);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n function initialize() external initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n }\n\n /**\n * @notice Repays a borrow in repayTo.underlying() and borrows borrowFrom.underlying()\n * @param borrower The address of the borrower, whose debt to swap\n * @param repayTo VToken to repay the debt to\n * @param borrowFrom VToken to borrow from\n * @param repayAmount The amount to repay in terms of repayTo.underlying()\n */\n function swapDebt(\n address borrower,\n IVBep20 repayTo,\n IVBep20 borrowFrom,\n uint256 repayAmount\n ) external onlyOwner nonReentrant {\n uint256 actualRepaymentAmount = _repay(repayTo, borrower, repayAmount);\n uint256 amountToBorrow = _convert(repayTo, borrowFrom, actualRepaymentAmount);\n _borrow(borrowFrom, borrower, amountToBorrow);\n emit DebtSwapped(borrower, address(repayTo), actualRepaymentAmount, address(borrowFrom), amountToBorrow);\n }\n\n /**\n * @notice Transfers tokens, accidentially sent to this contract, to the owner\n * @param token ERC-20 token to sweep\n */\n function sweepTokens(IERC20Upgradeable token) external onlyOwner {\n uint256 amount = token.balanceOf(address(this));\n token.safeTransfer(owner(), amount);\n emit SweptTokens(address(token), amount);\n }\n\n /**\n * @dev Transfers the funds from the sender and repays a borrow in vToken on behalf of the borrower\n * @param vToken VToken to repay the debt to\n * @param borrower The address of the borrower, whose debt to repay\n * @param repayAmount The amount to repay in terms of underlying\n */\n function _repay(\n IVBep20 vToken,\n address borrower,\n uint256 repayAmount\n ) internal returns (uint256 actualRepaymentAmount) {\n IERC20Upgradeable underlying = IERC20Upgradeable(vToken.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n underlying.safeTransferFrom(msg.sender, address(this), repayAmount);\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 repayAmountMinusFee = balanceAfter - balanceBefore;\n\n underlying.safeApprove(address(vToken), 0);\n underlying.safeApprove(address(vToken), repayAmountMinusFee);\n uint256 borrowBalanceBefore = vToken.borrowBalanceCurrent(borrower);\n uint256 err = vToken.repayBorrowBehalf(borrower, repayAmountMinusFee);\n if (err != NO_ERROR) {\n revert RepaymentFailed(err);\n }\n uint256 borrowBalanceAfter = vToken.borrowBalanceCurrent(borrower);\n return borrowBalanceBefore - borrowBalanceAfter;\n }\n\n /**\n * @dev Borrows in vToken on behalf of the borrower and transfers the funds to the sender\n * @param vToken VToken to borrow from\n * @param borrower The address of the borrower, who will own the borrow\n * @param borrowAmount The amount to borrow in terms of underlying\n */\n function _borrow(IVBep20 vToken, address borrower, uint256 borrowAmount) internal {\n IERC20Upgradeable underlying = IERC20Upgradeable(vToken.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n uint256 err = vToken.borrowBehalf(borrower, borrowAmount);\n if (err != NO_ERROR) {\n revert BorrowFailed(err);\n }\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 actualBorrowedAmount = balanceAfter - balanceBefore;\n underlying.safeTransfer(msg.sender, actualBorrowedAmount);\n }\n\n /**\n * @dev Converts the value expressed in convertFrom.underlying() to a value\n * in convertTo.underlying(), using the oracle price\n * @param convertFrom VToken to convert from\n * @param convertTo VToken to convert to\n * @param amount The amount in convertFrom.underlying()\n */\n function _convert(IVBep20 convertFrom, IVBep20 convertTo, uint256 amount) internal view returns (uint256) {\n IComptroller comptroller = convertFrom.comptroller();\n if (comptroller != convertTo.comptroller()) {\n revert ComptrollerMismatch();\n }\n ResilientOracleInterface oracle = comptroller.oracle();\n\n // Decimals are accounted for in the oracle contract\n uint256 scaledUsdValue = oracle.getUnderlyingPrice(address(convertFrom)) * amount; // the USD value here has 36 decimals\n return scaledUsdValue / oracle.getUnderlyingPrice(address(convertTo));\n }\n}\n" + }, + "contracts/Governance/TokenRedeemer.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport { Ownable2Step } from \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { IVAIController, IVToken, IVBep20, IVBNB } from \"../InterfacesV8.sol\";\nimport { Currency, CurrencyLibrary } from \"../lib/Currency.sol\";\n\ncontract TokenRedeemer is ReentrancyGuard, Ownable2Step {\n using CurrencyLibrary for Currency;\n\n struct Repayment {\n address borrower;\n uint256 amount;\n }\n\n IVBNB public immutable VBNB;\n\n error AccrueInterestFailed(uint256 errCode);\n error RedeemFailed(uint256 errCode);\n error RepaymentFailed(uint256 errCode);\n error NativeTokenTransferFailed();\n\n constructor(address owner_, IVBNB vBNB) {\n ensureNonzeroAddress(owner_);\n VBNB = vBNB;\n _transferOwnership(owner_);\n }\n\n receive() external payable {}\n\n function redeemAndTransfer(IVToken vToken, address destination) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n uint256 err = vToken.redeem(vToken.balanceOf(address(this)));\n if (err != 0) {\n revert RedeemFailed(err);\n }\n underlying.transferAll(destination);\n }\n\n function redeemUnderlyingAndTransfer(\n IVToken vToken,\n address destination,\n uint256 amount,\n address receiver\n ) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n underlying.transferAll(receiver); // Just in case there were some underlying tokens on the contract\n uint256 err = vToken.redeemUnderlying(amount);\n if (err != 0) {\n revert RedeemFailed(err);\n }\n underlying.transferAll(destination);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function redeemUnderlyingAndRepayBorrowBehalf(\n IVToken vToken,\n address borrower,\n uint256 amount,\n address receiver\n ) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n\n uint256 err = vToken.redeemUnderlying(amount);\n if (err != 0) {\n revert RedeemFailed(err);\n }\n\n underlying.approve(address(vToken), amount);\n\n _repay(vToken, borrower, amount);\n\n underlying.approve(address(vToken), 0);\n\n underlying.transferAll(receiver);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function redeemAndBatchRepay(\n IVToken vToken,\n Repayment[] calldata requestedRepayments,\n address receiver\n ) external nonReentrant onlyOwner {\n _accrueInterest(vToken);\n\n (uint256 totalBorrowedAmount, Repayment[] memory repayments) = _getAmountsToRepay(vToken, requestedRepayments);\n _redeemUpTo(vToken, totalBorrowedAmount);\n\n Currency underlying = _underlying(vToken);\n uint256 balance = underlying.balanceOfSelf();\n underlying.approve(address(vToken), totalBorrowedAmount);\n uint256 repaymentsCount = repayments.length;\n // The code below assumes no fees on transfer\n if (balance >= totalBorrowedAmount) {\n // If we're doing a full repayment, we can optimize it by skipping the balance checks\n for (uint256 i = 0; i < repaymentsCount; ++i) {\n Repayment memory repayment = repayments[i];\n _repay(vToken, repayment.borrower, repayment.amount);\n }\n } else {\n // Otherwise, we have to check and update the balance on every iteration\n for (uint256 i = 0; i < repaymentsCount && balance != 0; ++i) {\n Repayment memory repayment = repayments[i];\n _repay(vToken, repayment.borrower, _min(repayment.amount, balance));\n balance = underlying.balanceOfSelf();\n }\n }\n underlying.approve(address(vToken), 0);\n\n underlying.transferAll(receiver);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function batchRepayVAI(\n IVAIController vaiController,\n Repayment[] calldata requestedRepayments,\n address receiver\n ) external nonReentrant onlyOwner {\n vaiController.accrueVAIInterest();\n Currency vai = Currency.wrap(vaiController.getVAIAddress());\n uint256 balance = vai.balanceOfSelf();\n vai.approve(address(vaiController), type(uint256).max);\n uint256 repaymentsCount = requestedRepayments.length;\n for (uint256 i = 0; i < repaymentsCount && balance != 0; ++i) {\n Repayment calldata requestedRepayment = requestedRepayments[i];\n uint256 repaymentCap = requestedRepayment.amount;\n uint256 debt = vaiController.getVAIRepayAmount(requestedRepayment.borrower);\n uint256 amount = _min(repaymentCap, debt);\n _repayVAI(vaiController, requestedRepayment.borrower, _min(amount, balance));\n balance = vai.balanceOfSelf();\n }\n vai.approve(address(vaiController), 0);\n vai.transferAll(receiver);\n }\n\n function sweepTokens(address token, address destination) external onlyOwner {\n Currency.wrap(token).transferAll(destination);\n }\n\n function _accrueInterest(IVToken vToken) internal {\n uint256 err = vToken.accrueInterest();\n if (err != 0) {\n revert AccrueInterestFailed(err);\n }\n }\n\n function _redeemUpTo(IVToken vToken, uint256 amount) internal {\n uint256 unredeemedUnderlying = vToken.balanceOfUnderlying(address(this));\n if (unredeemedUnderlying > 0) {\n uint256 err = vToken.redeemUnderlying(_min(amount, unredeemedUnderlying));\n if (err != 0) {\n revert RedeemFailed(err);\n }\n }\n }\n\n function _repay(IVToken vToken, address borrower, uint256 amount) internal {\n if (amount == 0) {\n return;\n }\n if (_isVBNB(vToken)) {\n IVBNB(address(vToken)).repayBorrowBehalf{ value: amount }(borrower);\n } else {\n uint256 err = IVBep20(address(vToken)).repayBorrowBehalf(borrower, amount);\n if (err != 0) {\n revert RepaymentFailed(err);\n }\n }\n }\n\n function _repayVAI(IVAIController vaiController, address borrower, uint256 amount) internal {\n if (amount == 0) {\n return;\n }\n (uint256 err, ) = vaiController.repayVAIBehalf(borrower, amount);\n if (err != 0) {\n revert RepaymentFailed(err);\n }\n }\n\n function _getAmountsToRepay(\n IVToken vToken,\n Repayment[] calldata requestedRepayments\n ) internal view returns (uint256, Repayment[] memory) {\n uint256 repaymentsCount = requestedRepayments.length;\n Repayment[] memory actualRepayments = new Repayment[](repaymentsCount);\n uint256 totalAmountToRepay = 0;\n for (uint256 i = 0; i < repaymentsCount; ++i) {\n Repayment calldata requestedRepayment = requestedRepayments[i];\n uint256 repaymentCap = requestedRepayment.amount;\n uint256 debt = vToken.borrowBalanceStored(requestedRepayment.borrower);\n uint256 amountToRepay = _min(repaymentCap, debt);\n totalAmountToRepay += amountToRepay;\n actualRepayments[i] = Repayment({ borrower: requestedRepayment.borrower, amount: amountToRepay });\n }\n return (totalAmountToRepay, actualRepayments);\n }\n\n function _underlying(IVToken vToken) internal view returns (Currency) {\n if (_isVBNB(vToken)) {\n return CurrencyLibrary.NATIVE;\n }\n return Currency.wrap(IVBep20(address(vToken)).underlying());\n }\n\n function _isVBNB(IVToken vToken) internal view returns (bool) {\n return address(vToken) == address(VBNB);\n }\n\n function _min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n}\n" + }, + "contracts/Governance/VTreasuryV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { Ownable2Step } from \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\n\n/**\n * @title VTreasuryV8\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasuryV8 is Ownable2Step, ReentrancyGuard {\n using SafeERC20 for IERC20;\n\n // WithdrawTreasuryToken Event\n event WithdrawTreasuryToken(address indexed tokenAddress, uint256 withdrawAmount, address indexed withdrawAddress);\n\n // WithdrawTreasuryNative Event\n event WithdrawTreasuryNative(uint256 withdrawAmount, address indexed withdrawAddress);\n\n /// @notice Thrown if the supplied address is a zero address where it is not allowed\n error ZeroAddressNotAllowed();\n\n /**\n * @notice To receive Native when msg.data is not empty\n */\n fallback() external payable {}\n\n /**\n * @notice To receive Native when msg.data is empty\n */\n receive() external payable {}\n\n /**\n * @notice Withdraw Treasury Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n * @custom:error ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.\n */\n function withdrawTreasuryToken(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner nonReentrant {\n ensureNonzeroAddress(tokenAddress);\n ensureNonzeroAddress(withdrawAddress);\n require(withdrawAmount > 0, \"withdrawAmount must not be zero\");\n\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IERC20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer Token to withdrawAddress\n IERC20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryToken(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury Native, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n * @custom:error ZeroAddressNotAllowed thrown when withdrawAddress is zero.\n */\n function withdrawTreasuryNative(\n uint256 withdrawAmount,\n address payable withdrawAddress\n ) external payable onlyOwner nonReentrant {\n ensureNonzeroAddress(withdrawAddress);\n require(withdrawAmount > 0, \"withdrawAmount must not be zero\");\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Native Balance\n uint256 nativeBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > nativeBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = nativeBalance;\n }\n // Transfer the native token to withdrawAddress\n (bool sent, ) = withdrawAddress.call{ value: actualWithdrawAmount }(\"\");\n require(sent, \"Call failed\");\n emit WithdrawTreasuryNative(actualWithdrawAmount, withdrawAddress);\n }\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\n function ensureNonzeroAddress(address address_) internal pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n }\n}\n" + }, + "contracts/InterfacesV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\ninterface IVToken is IERC20Upgradeable {\n function accrueInterest() external returns (uint256);\n\n function redeem(uint256 redeemTokens) external returns (uint256);\n\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\n\n function borrowBalanceCurrent(address borrower) external returns (uint256);\n\n function balanceOfUnderlying(address owner) external returns (uint256);\n\n function comptroller() external view returns (IComptroller);\n\n function borrowBalanceStored(address account) external view returns (uint256);\n}\n\ninterface IVBep20 is IVToken {\n function borrowBehalf(address borrower, uint256 borrowAmount) external returns (uint256);\n\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256);\n\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external returns (uint256);\n\n function underlying() external view returns (address);\n}\n\ninterface IVBNB is IVToken {\n function repayBorrowBehalf(address borrower) external payable;\n\n function liquidateBorrow(address borrower, IVToken vTokenCollateral) external payable;\n}\n\ninterface IVAIController {\n function accrueVAIInterest() external;\n\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external returns (uint256, uint256);\n\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\n\n function getVAIAddress() external view returns (address);\n\n function getVAIRepayAmount(address borrower) external view returns (uint256);\n}\n\ninterface IComptroller {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external;\n\n function liquidationIncentiveMantissa() external view returns (uint256);\n\n function vaiController() external view returns (IVAIController);\n\n function liquidatorContract() external view returns (address);\n\n function oracle() external view returns (ResilientOracleInterface);\n\n function actionPaused(address market, Action action) external view returns (bool);\n\n function markets(address) external view returns (bool, uint256, bool);\n\n function isForcedLiquidationEnabled(address) external view returns (bool);\n}\n\ninterface ILiquidator {\n function restrictLiquidation(address borrower) external;\n\n function unrestrictLiquidation(address borrower) external;\n\n function addToAllowlist(address borrower, address liquidator) external;\n\n function removeFromAllowlist(address borrower, address liquidator) external;\n\n function liquidateBorrow(\n address vToken,\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external payable;\n\n function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external;\n\n function treasuryPercentMantissa() external view returns (uint256);\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n" + }, + "contracts/lib/approveOrRevert.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\n\n/// @notice Thrown if a contract is unable to approve a transfer\nerror ApproveFailed();\n\n/// @notice Approves a transfer, ensuring that it is successful. This function supports non-compliant\n/// tokens like the ones that don't return a boolean value on success. Thus, such approve call supports\n/// three different kinds of tokens:\n/// * Compliant tokens that revert on failure\n/// * Compliant tokens that return false on failure\n/// * Non-compliant tokens that don't return a value\n/// @param token The contract address of the token which will be transferred\n/// @param spender The spender contract address\n/// @param amount The value of the transfer\nfunction approveOrRevert(IERC20Upgradeable token, address spender, uint256 amount) {\n bytes memory callData = abi.encodeCall(token.approve, (spender, amount));\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory result) = address(token).call(callData);\n\n if (!success || (result.length != 0 && !abi.decode(result, (bool)))) {\n revert ApproveFailed();\n }\n}\n" + }, + "contracts/lib/Currency.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n// This library is heavily inspired by Uniswap v4 Currency lib\n// (https://github.com/Uniswap/v4-core/blob/b230769238879e1d4f58ffa57a4696b0c390d188/src/types/Currency.sol)\n// Contrary to the implementation above, this library does not\n// use assembly to save gas. It rather relies on OpenZeppelin's\n// SafeERC20 to simplify the review and audits. This might change\n// in future if it's more heavily used by Venus contracts.\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ntype Currency is address;\n\nlibrary CurrencyLibrary {\n using CurrencyLibrary for Currency;\n\n /// @notice Thrown when a native transfer fails\n error NativeTransferFailed();\n\n Currency public constant NATIVE = Currency.wrap(0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB);\n\n /**\n * @dev If currency is a token, invokes SafeERC20.forceApprove to allow spender\n * to spend the amount of tokens on behalf of the current contract. Otherwise,\n * does nothing.\n * @param currency Currency\n * @param spender The account approved to spend the tokens\n * @param amount The approved amount\n */\n function approve(Currency currency, address spender, uint256 amount) internal {\n if (!currency.isNative()) {\n // I'd rather use approveOrRevert instead of forceApprove\n // once we migrate to OZ v5: force-approve does approve(0)\n // before approving the amount, and it's not always\n // desirable. The users will need to pay gas unnecessarily,\n // and using just approve() is safe as long as we revert on\n // errors (approveOrRevert handles that) and reset the approvals\n // after transfers (which is a best practice recommended by\n // auditors anyway).\n SafeERC20.forceApprove(IERC20(Currency.unwrap(currency)), spender, amount);\n }\n }\n\n /**\n * @dev Transfers an amount of currency to the receiver. If currency is a token,\n * uses SafeERC20.safeTransfer, otherwise transfers the native currency using\n * the recommended approach (`receiver.call{value: amount}(\"\")`).\n * @param currency Currency\n * @param receiver The account that would receive the tokens\n * @param amount The amount to transfer\n */\n function transfer(Currency currency, address receiver, uint256 amount) internal {\n if (currency.isNative()) {\n (bool success, ) = receiver.call{ value: amount }(\"\");\n if (!success) {\n revert NativeTransferFailed();\n }\n } else {\n SafeERC20.safeTransfer(IERC20(Currency.unwrap(currency)), receiver, amount);\n }\n }\n\n function transferAll(Currency currency, address receiver) internal {\n uint256 balance = currency.balanceOfSelf();\n if (balance > 0) {\n currency.transfer(receiver, balance);\n }\n }\n\n function balanceOfSelf(Currency currency) internal view returns (uint256) {\n if (currency.isNative()) {\n return address(this).balance;\n }\n return IERC20(Currency.unwrap(currency)).balanceOf(address(this));\n }\n\n function isNative(Currency currency) internal pure returns (bool) {\n return Currency.unwrap(currency) == Currency.unwrap(NATIVE);\n }\n}\n" + }, + "contracts/Liquidator/BUSDLiquidator.sol": { + "content": "// SPDX-License-Identifier: MIT\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 { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { MANTISSA_ONE } from \"@venusprotocol/solidity-utilities/contracts/constants.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { ILiquidator, IComptroller, IVToken, IVBep20, IVBNB, IVAIController } from \"../InterfacesV8.sol\";\n\n/**\n * @title BUSDLiquidator\n * @author Venus\n * @notice A custom contract for force-liquidating BUSD debts\n */\ncontract BUSDLiquidator is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n using SafeERC20Upgradeable for IVToken;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVBep20 public immutable vBUSD;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IComptroller public immutable comptroller;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable treasury;\n\n /// @notice The liquidator's share, scaled by 1e18 (e.g. 1.02 * 1e18 for 102% of the debt covered)\n uint256 public liquidatorShareMantissa;\n\n /// @notice Thrown if trying to set liquidator's share lower than 100% of the debt covered\n error LiquidatorShareTooLow(uint256 liquidatorShareMantissa_);\n\n /// @notice Thrown if trying to set liquidator's share larger than this contract can receive from a liquidation\n error LiquidatorShareTooHigh(uint256 maxLiquidatorShareMantissa, uint256 liquidatorShareMantissa_);\n\n /// @notice Emitted when the liquidator's share is set\n event NewLiquidatorShare(uint256 oldLiquidatorShareMantissa, uint256 newLiquidatorShareMantissa);\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param comptroller_ The address of the Comptroller contract\n /// @param vBUSD_ The address of the VBNB\n /// @param treasury_ The address of Venus treasury\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address vBUSD_, address treasury_) {\n ensureNonzeroAddress(vBUSD_);\n ensureNonzeroAddress(comptroller_);\n ensureNonzeroAddress(treasury_);\n vBUSD = IVBep20(vBUSD_);\n comptroller = IComptroller(comptroller_);\n treasury = treasury_;\n _disableInitializers();\n }\n\n /// @notice Initializer for the implementation contract.\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n /// @custom:error LiquidatorShareTooHigh is thrown if trying to set liquidator percent larger than the liquidation profit\n function initialize(uint256 liquidatorShareMantissa_) external virtual initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n _validateLiquidatorShareMantissa(liquidatorShareMantissa_);\n liquidatorShareMantissa = liquidatorShareMantissa_;\n }\n\n /// @notice Liquidate the entire BUSD debt of a borrower, seizing vTokenCollateral\n /// @param borrower The borrower whose debt should be liquidated\n /// @param vTokenCollateral The collateral to seize from the borrower\n function liquidateEntireBorrow(address borrower, IVToken vTokenCollateral) external nonReentrant {\n uint256 repayAmount = vBUSD.borrowBalanceCurrent(borrower);\n _unpauseAndLiquidate(borrower, repayAmount, vTokenCollateral);\n }\n\n /// @notice Liquidate a BUSD borrow, repaying the repayAmount of BUSD\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function liquidateBorrow(address borrower, uint256 repayAmount, IVToken vTokenCollateral) external nonReentrant {\n _unpauseAndLiquidate(borrower, repayAmount, vTokenCollateral);\n }\n\n /// @notice Allows Governance to set the liquidator's share\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n /// @custom:access Only Governance\n function setLiquidatorShare(uint256 liquidatorShareMantissa_) external onlyOwner {\n _validateLiquidatorShareMantissa(liquidatorShareMantissa_);\n uint256 oldLiquidatorShareMantissa = liquidatorShareMantissa;\n liquidatorShareMantissa = liquidatorShareMantissa_;\n emit NewLiquidatorShare(oldLiquidatorShareMantissa, liquidatorShareMantissa_);\n }\n\n /// @notice Allows to recover token accidentally sent to this contract by sending the entire balance to Governance\n /// @param token The address of the token to recover\n /// @custom:access Only Governance\n function sweepToken(IERC20Upgradeable token) external onlyOwner {\n token.safeTransfer(msg.sender, token.balanceOf(address(this)));\n }\n\n /// @dev Unpauses the liquidation on the BUSD market, liquidates the borrower's debt,\n /// and pauses the liquidations back\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function _unpauseAndLiquidate(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n address[] memory vTokens = new address[](1);\n vTokens[0] = address(vBUSD);\n IComptroller.Action[] memory actions = new IComptroller.Action[](1);\n actions[0] = IComptroller.Action.LIQUIDATE;\n\n comptroller._setActionsPaused(vTokens, actions, false);\n _liquidateBorrow(borrower, repayAmount, vTokenCollateral);\n comptroller._setActionsPaused(vTokens, actions, true);\n }\n\n /// @dev Performs the actual liquidation, transferring BUSD from the sender to this contract,\n /// repaying the debt, and transferring the seized collateral to the sender and the treasury\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function _liquidateBorrow(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n ILiquidator liquidatorContract = ILiquidator(comptroller.liquidatorContract());\n IERC20Upgradeable busd = IERC20Upgradeable(vBUSD.underlying());\n\n uint256 actualRepayAmount = _transferIn(busd, msg.sender, repayAmount);\n approveOrRevert(busd, address(liquidatorContract), actualRepayAmount);\n uint256 balanceBefore = vTokenCollateral.balanceOf(address(this));\n liquidatorContract.liquidateBorrow(address(vBUSD), borrower, actualRepayAmount, vTokenCollateral);\n uint256 receivedAmount = vTokenCollateral.balanceOf(address(this)) - balanceBefore;\n approveOrRevert(busd, address(liquidatorContract), 0);\n\n (uint256 liquidatorAmount, uint256 treasuryAmount) = _computeShares(receivedAmount);\n vTokenCollateral.safeTransfer(msg.sender, liquidatorAmount);\n vTokenCollateral.safeTransfer(treasury, treasuryAmount);\n }\n\n /// @dev Transfers tokens to this contract and returns the actual transfer amount\n /// @param token The token to transfer\n /// @param from The account to transfer from\n /// @param amount The amount to transfer\n /// @return The actual amount transferred\n function _transferIn(IERC20Upgradeable token, address from, uint256 amount) internal returns (uint256) {\n uint256 prevBalance = token.balanceOf(address(this));\n token.safeTransferFrom(from, address(this), amount);\n return token.balanceOf(address(this)) - prevBalance;\n }\n\n /// @dev Computes the liquidator's and treasury's shares of the received amount\n /// @param receivedAmount The amount received from the liquidation\n /// @return liquidatorAmount The liquidator's share\n /// @return treasuryAmount The treasury's share\n function _computeShares(\n uint256 receivedAmount\n ) internal view returns (uint256 liquidatorAmount, uint256 treasuryAmount) {\n uint256 denominator = _getDenominator();\n liquidatorAmount = (receivedAmount * liquidatorShareMantissa) / denominator;\n treasuryAmount = receivedAmount - liquidatorAmount;\n }\n\n /// @dev Returns (liquidation incentive - treasury percent), the value used as the denominator\n /// when calculating the liquidator's share\n /// @return The denominator for the seized amount used when calculating the liquidator's share\n function _getDenominator() internal view returns (uint256) {\n uint256 totalPercentageToDistribute = comptroller.liquidationIncentiveMantissa();\n uint256 regularTreasuryPercent = ILiquidator(comptroller.liquidatorContract()).treasuryPercentMantissa();\n uint256 denominator = totalPercentageToDistribute - regularTreasuryPercent;\n return denominator;\n }\n\n /// @dev Checks if the liquidator's share is more than 100% of the debt covered and less\n /// than (liquidation incentive - treasury percent)\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n function _validateLiquidatorShareMantissa(uint256 liquidatorShareMantissa_) internal view {\n uint256 maxLiquidatorShareMantissa = _getDenominator();\n if (liquidatorShareMantissa_ < MANTISSA_ONE) {\n revert LiquidatorShareTooLow(liquidatorShareMantissa_);\n }\n\n if (liquidatorShareMantissa_ > maxLiquidatorShareMantissa) {\n revert LiquidatorShareTooHigh(maxLiquidatorShareMantissa, liquidatorShareMantissa_);\n }\n }\n}\n" + }, + "contracts/Liquidator/Liquidator.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"./LiquidatorStorage.sol\";\nimport { IComptroller, IVToken, IVBep20, IVBNB, IVAIController, IProtocolShareReserve, IWBNB } from \"../InterfacesV8.sol\";\n\ncontract Liquidator is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable, LiquidatorStorage, AccessControlledV8 {\n /// @notice Address of vBNB contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVBNB public immutable vBnb;\n\n /// @notice Address of Venus Unitroller contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IComptroller public immutable comptroller;\n\n /// @notice Address of VAIUnitroller contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVAIController public immutable vaiController;\n\n /// @notice Address of wBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable wBNB;\n\n /// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\n uint256 internal constant MANTISSA_ONE = 1e18;\n\n /* Events */\n\n /// @notice Emitted when the percent of the seized amount that goes to treasury changes.\n event NewLiquidationTreasuryPercent(uint256 oldPercent, uint256 newPercent);\n\n /// @notice Emitted when a borrow is liquidated\n event LiquidateBorrowedTokens(\n address indexed liquidator,\n address indexed borrower,\n uint256 repayAmount,\n address vTokenBorrowed,\n address indexed vTokenCollateral,\n uint256 seizeTokensForTreasury,\n uint256 seizeTokensForLiquidator\n );\n\n /// @notice Emitted when the liquidation is restricted for a borrower\n event LiquidationRestricted(address indexed borrower);\n\n /// @notice Emitted when the liquidation restrictions are removed for a borrower\n event LiquidationRestrictionsDisabled(address indexed borrower);\n\n /// @notice Emitted when a liquidator is added to the allowedLiquidatorsByAccount mapping\n event AllowlistEntryAdded(address indexed borrower, address indexed liquidator);\n\n /// @notice Emitted when a liquidator is removed from the allowedLiquidatorsByAccount mapping\n event AllowlistEntryRemoved(address indexed borrower, address indexed liquidator);\n\n /// @notice Emitted when the amount of minLiquidatableVAI is updated\n event NewMinLiquidatableVAI(uint256 oldMinLiquidatableVAI, uint256 newMinLiquidatableVAI);\n\n /// @notice Emitted when the length of chunk gets updated\n event NewPendingRedeemChunkLength(uint256 oldPendingRedeemChunkLength, uint256 newPendingRedeemChunkLength);\n\n /// @notice Emitted when force liquidation is paused\n event ForceVAILiquidationPaused(address indexed sender);\n\n /// @notice Emitted when force liquidation is resumed\n event ForceVAILiquidationResumed(address indexed sender);\n\n /// @notice Emitted when new address of protocol share reserve is set\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserves);\n\n /// @notice Emitted when reserves are reduced from liquidator contract to protocol share reserves\n event ProtocolLiquidationIncentiveTransferred(address indexed sender, address indexed token, uint256 reducedAmount);\n\n /* Errors */\n\n /// @notice Thrown if the liquidation is restricted and the liquidator is not in the allowedLiquidatorsByAccount mapping\n error LiquidationNotAllowed(address borrower, address liquidator);\n\n /// @notice Thrown if VToken transfer fails after the liquidation\n error VTokenTransferFailed(address from, address to, uint256 amount);\n\n /// @notice Thrown if the liquidation is not successful (the error code is from TokenErrorReporter)\n error LiquidationFailed(uint256 errorCode);\n\n /// @notice Thrown if trying to restrict liquidations for an already restricted borrower\n error AlreadyRestricted(address borrower);\n\n /// @notice Thrown if trying to unrestrict liquidations for a borrower that is not restricted\n error NoRestrictionsExist(address borrower);\n\n /// @notice Thrown if the liquidator is already in the allowedLiquidatorsByAccount mapping\n error AlreadyAllowed(address borrower, address liquidator);\n\n /// @notice Thrown if trying to remove a liquidator that is not in the allowedLiquidatorsByAccount mapping\n error AllowlistEntryNotFound(address borrower, address liquidator);\n\n /// @notice Thrown if BNB amount sent with the transaction doesn't correspond to the\n /// intended BNB repayment\n error WrongTransactionAmount(uint256 expected, uint256 actual);\n\n /// @notice Thrown if trying to set treasury percent larger than the liquidation profit\n error TreasuryPercentTooHigh(uint256 maxTreasuryPercentMantissa, uint256 treasuryPercentMantissa_);\n\n /// @notice Thrown if trying to liquidate any token when VAI debt is too high\n error VAIDebtTooHigh(uint256 vaiDebt, uint256 minLiquidatableVAI);\n\n /// @notice Thrown when vToken is not listed\n error MarketNotListed(address vToken);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param comptroller_ The address of the Comptroller contract\n /// @param vBnb_ The address of the VBNB\n /// @param wBNB_ The address of wBNB\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address payable vBnb_, address wBNB_) {\n ensureNonzeroAddress(vBnb_);\n ensureNonzeroAddress(comptroller_);\n ensureNonzeroAddress(wBNB_);\n vBnb = IVBNB(vBnb_);\n wBNB = wBNB_;\n comptroller = IComptroller(comptroller_);\n vaiController = IVAIController(IComptroller(comptroller_).vaiController());\n _disableInitializers();\n }\n\n receive() external payable {}\n\n /// @notice Initializer for the implementation contract.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param accessControlManager_ address of access control manager\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function initialize(\n uint256 treasuryPercentMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) external virtual reinitializer(2) {\n __Liquidator_init(treasuryPercentMantissa_, accessControlManager_, protocolShareReserve_);\n }\n\n /// @dev Liquidator initializer for derived contracts.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param accessControlManager_ address of access control manager\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function __Liquidator_init(\n uint256 treasuryPercentMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) internal onlyInitializing {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n __Liquidator_init_unchained(treasuryPercentMantissa_, protocolShareReserve_);\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n /// @dev Liquidator initializer for derived contracts that doesn't call parent initializers.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function __Liquidator_init_unchained(\n uint256 treasuryPercentMantissa_,\n address protocolShareReserve_\n ) internal onlyInitializing {\n validateTreasuryPercentMantissa(treasuryPercentMantissa_);\n treasuryPercentMantissa = treasuryPercentMantissa_;\n _setProtocolShareReserve(protocolShareReserve_);\n }\n\n /// @notice An admin function to restrict liquidations to allowed addresses only.\n /// @dev Use {addTo,removeFrom}AllowList to configure the allowed addresses.\n /// @param borrower The address of the borrower\n function restrictLiquidation(address borrower) external {\n _checkAccessAllowed(\"restrictLiquidation(address)\");\n if (liquidationRestricted[borrower]) {\n revert AlreadyRestricted(borrower);\n }\n liquidationRestricted[borrower] = true;\n emit LiquidationRestricted(borrower);\n }\n\n /// @notice An admin function to remove restrictions for liquidations.\n /// @dev Does not impact the allowedLiquidatorsByAccount mapping for the borrower, just turns off the check.\n /// @param borrower The address of the borrower\n function unrestrictLiquidation(address borrower) external {\n _checkAccessAllowed(\"unrestrictLiquidation(address)\");\n if (!liquidationRestricted[borrower]) {\n revert NoRestrictionsExist(borrower);\n }\n liquidationRestricted[borrower] = false;\n emit LiquidationRestrictionsDisabled(borrower);\n }\n\n /// @notice An admin function to add the liquidator to the allowedLiquidatorsByAccount mapping for a certain\n /// borrower. If the liquidations are restricted, only liquidators from the\n /// allowedLiquidatorsByAccount mapping can participate in liquidating the positions of this borrower.\n /// @param borrower The address of the borrower\n /// @param borrower The address of the liquidator\n function addToAllowlist(address borrower, address liquidator) external {\n _checkAccessAllowed(\"addToAllowlist(address,address)\");\n if (allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert AlreadyAllowed(borrower, liquidator);\n }\n allowedLiquidatorsByAccount[borrower][liquidator] = true;\n emit AllowlistEntryAdded(borrower, liquidator);\n }\n\n /// @notice An admin function to remove the liquidator from the allowedLiquidatorsByAccount mapping of a certain\n /// borrower. If the liquidations are restricted, this liquidator will not be\n /// able to liquidate the positions of this borrower.\n /// @param borrower The address of the borrower\n /// @param borrower The address of the liquidator\n function removeFromAllowlist(address borrower, address liquidator) external {\n _checkAccessAllowed(\"removeFromAllowlist(address,address)\");\n if (!allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert AllowlistEntryNotFound(borrower, liquidator);\n }\n allowedLiquidatorsByAccount[borrower][liquidator] = false;\n emit AllowlistEntryRemoved(borrower, liquidator);\n }\n\n /// @notice Liquidates a borrow and splits the seized amount between protocol share reserve and\n /// liquidator. The liquidators should use this interface instead of calling\n /// vToken.liquidateBorrow(...) directly.\n /// @notice Checks force VAI liquidation first; vToken should be address of vaiController if vaiDebt is greater than threshold\n /// @notice For BNB borrows msg.value should be equal to repayAmount; otherwise msg.value\n /// should be zero.\n /// @param vToken Borrowed vToken\n /// @param borrower The address of the borrower\n /// @param repayAmount The amount to repay on behalf of the borrower\n /// @param vTokenCollateral The collateral to seize\n function liquidateBorrow(\n address vToken,\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external payable nonReentrant {\n ensureNonzeroAddress(borrower);\n checkRestrictions(borrower, msg.sender);\n (bool isListed, , ) = IComptroller(comptroller).markets(address(vTokenCollateral));\n if (!isListed) {\n revert MarketNotListed(address(vTokenCollateral));\n }\n\n _checkForceVAILiquidate(vToken, borrower);\n uint256 ourBalanceBefore = vTokenCollateral.balanceOf(address(this));\n if (vToken == address(vBnb)) {\n if (repayAmount != msg.value) {\n revert WrongTransactionAmount(repayAmount, msg.value);\n }\n vBnb.liquidateBorrow{ value: msg.value }(borrower, vTokenCollateral);\n } else {\n if (msg.value != 0) {\n revert WrongTransactionAmount(0, msg.value);\n }\n if (vToken == address(vaiController)) {\n _liquidateVAI(borrower, repayAmount, vTokenCollateral);\n } else {\n _liquidateBep20(IVBep20(vToken), borrower, repayAmount, vTokenCollateral);\n }\n }\n uint256 ourBalanceAfter = vTokenCollateral.balanceOf(address(this));\n uint256 seizedAmount = ourBalanceAfter - ourBalanceBefore;\n (uint256 ours, uint256 theirs) = _distributeLiquidationIncentive(vTokenCollateral, seizedAmount);\n _reduceReservesInternal();\n emit LiquidateBorrowedTokens(\n msg.sender,\n borrower,\n repayAmount,\n vToken,\n address(vTokenCollateral),\n ours,\n theirs\n );\n }\n\n /// @notice Sets the new percent of the seized amount that goes to treasury. Should\n /// be less than or equal to comptroller.liquidationIncentiveMantissa().sub(1e18).\n /// @param newTreasuryPercentMantissa New treasury percent (scaled by 10^18).\n function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external {\n _checkAccessAllowed(\"setTreasuryPercent(uint256)\");\n validateTreasuryPercentMantissa(newTreasuryPercentMantissa);\n emit NewLiquidationTreasuryPercent(treasuryPercentMantissa, newTreasuryPercentMantissa);\n treasuryPercentMantissa = newTreasuryPercentMantissa;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protocolShareReserve_ The address of the protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protocolShareReserve_) external onlyOwner {\n _setProtocolShareReserve(protocolShareReserve_);\n }\n\n /**\n * @notice Reduce the reserves of the pending accumulated reserves\n */\n function reduceReserves() external nonReentrant {\n _reduceReservesInternal();\n }\n\n function _reduceReservesInternal() internal {\n uint256 _pendingRedeemLength = pendingRedeem.length;\n uint256 range = _pendingRedeemLength >= pendingRedeemChunkLength\n ? pendingRedeemChunkLength\n : _pendingRedeemLength;\n for (uint256 index = range; index > 0; ) {\n address vToken = pendingRedeem[index - 1];\n uint256 vTokenBalance_ = IVToken(vToken).balanceOf(address(this));\n if (_redeemUnderlying(vToken, vTokenBalance_)) {\n if (vToken == address(vBnb)) {\n _reduceBnbReserves();\n } else {\n _reduceVTokenReserves(vToken);\n }\n pendingRedeem[index - 1] = pendingRedeem[pendingRedeem.length - 1];\n pendingRedeem.pop();\n }\n unchecked {\n index--;\n }\n }\n }\n\n /// @dev Transfers BEP20 tokens to self, then approves vToken to take these tokens.\n function _liquidateBep20(IVBep20 vToken, address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n (bool isListed, , ) = IComptroller(comptroller).markets(address(vToken));\n if (!isListed) {\n revert MarketNotListed(address(vToken));\n }\n\n IERC20Upgradeable borrowedToken = IERC20Upgradeable(vToken.underlying());\n uint256 actualRepayAmount = _transferBep20(borrowedToken, msg.sender, address(this), repayAmount);\n borrowedToken.safeApprove(address(vToken), 0);\n borrowedToken.safeApprove(address(vToken), actualRepayAmount);\n requireNoError(vToken.liquidateBorrow(borrower, actualRepayAmount, vTokenCollateral));\n }\n\n /// @dev Transfers BEP20 tokens to self, then approves VAI to take these tokens.\n function _liquidateVAI(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n IERC20Upgradeable vai = IERC20Upgradeable(vaiController.getVAIAddress());\n vai.safeTransferFrom(msg.sender, address(this), repayAmount);\n vai.safeApprove(address(vaiController), 0);\n vai.safeApprove(address(vaiController), repayAmount);\n\n (uint256 err, ) = vaiController.liquidateVAI(borrower, repayAmount, vTokenCollateral);\n requireNoError(err);\n }\n\n /// @dev Distribute seized collateral between liquidator and protocol share reserve\n function _distributeLiquidationIncentive(\n IVToken vTokenCollateral,\n uint256 seizedAmount\n ) internal returns (uint256 ours, uint256 theirs) {\n (ours, theirs) = _splitLiquidationIncentive(seizedAmount);\n if (!vTokenCollateral.transfer(msg.sender, theirs)) {\n revert VTokenTransferFailed(address(this), msg.sender, theirs);\n }\n\n if (ours > 0 && !_redeemUnderlying(address(vTokenCollateral), ours)) {\n // Check if asset is already present in pendingRedeem array\n uint256 index;\n for (index; index < pendingRedeem.length; ) {\n if (pendingRedeem[index] == address(vTokenCollateral)) {\n break;\n }\n unchecked {\n index++;\n }\n }\n if (index == pendingRedeem.length) {\n pendingRedeem.push(address(vTokenCollateral));\n }\n } else {\n if (address(vTokenCollateral) == address(vBnb)) {\n _reduceBnbReserves();\n } else {\n _reduceVTokenReserves(address(vTokenCollateral));\n }\n }\n }\n\n /// @dev Wraps BNB to wBNB and sends to protocol share reserve\n function _reduceBnbReserves() private {\n uint256 bnbBalance = address(this).balance;\n IWBNB(wBNB).deposit{ value: bnbBalance }();\n IERC20Upgradeable(wBNB).safeTransfer(protocolShareReserve, bnbBalance);\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\n address(comptroller),\n wBNB,\n IProtocolShareReserve.IncomeType.LIQUIDATION\n );\n emit ProtocolLiquidationIncentiveTransferred(msg.sender, wBNB, bnbBalance);\n }\n\n /// @dev Redeem seized collateral to underlying assets\n function _redeemUnderlying(address vToken, uint256 amount) private returns (bool) {\n try IVToken(address(vToken)).redeem(amount) returns (uint256 response) {\n if (response == 0) {\n return true;\n } else {\n return false;\n }\n } catch {\n return false;\n }\n }\n\n /// @dev Transfers seized collateral other than BNB to protocol share reserve\n function _reduceVTokenReserves(address vToken) private {\n address underlying = IVBep20(vToken).underlying();\n uint256 underlyingBalance = IERC20Upgradeable(underlying).balanceOf(address(this));\n IERC20Upgradeable(underlying).safeTransfer(protocolShareReserve, underlyingBalance);\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserve.IncomeType.LIQUIDATION\n );\n emit ProtocolLiquidationIncentiveTransferred(msg.sender, underlying, underlyingBalance);\n }\n\n /// @dev Transfers tokens and returns the actual transfer amount\n function _transferBep20(\n IERC20Upgradeable token,\n address from,\n address to,\n uint256 amount\n ) internal returns (uint256) {\n uint256 prevBalance = token.balanceOf(to);\n token.safeTransferFrom(from, to, amount);\n return token.balanceOf(to) - prevBalance;\n }\n\n /// @dev Computes the amounts that would go to treasury and to the liquidator.\n function _splitLiquidationIncentive(uint256 seizedAmount) internal view returns (uint256 ours, uint256 theirs) {\n uint256 totalIncentive = comptroller.liquidationIncentiveMantissa();\n ours = (seizedAmount * treasuryPercentMantissa) / totalIncentive;\n theirs = seizedAmount - ours;\n }\n\n function requireNoError(uint256 errCode) internal pure {\n if (errCode == uint256(0)) {\n return;\n }\n\n revert LiquidationFailed(errCode);\n }\n\n function checkRestrictions(address borrower, address liquidator) internal view {\n if (liquidationRestricted[borrower] && !allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert LiquidationNotAllowed(borrower, liquidator);\n }\n }\n\n function validateTreasuryPercentMantissa(uint256 treasuryPercentMantissa_) internal view {\n uint256 maxTreasuryPercentMantissa = comptroller.liquidationIncentiveMantissa() - MANTISSA_ONE;\n if (treasuryPercentMantissa_ > maxTreasuryPercentMantissa) {\n revert TreasuryPercentTooHigh(maxTreasuryPercentMantissa, treasuryPercentMantissa_);\n }\n }\n\n /// @dev Checks liquidation action in comptroller and vaiDebt with minLiquidatableVAI threshold\n function _checkForceVAILiquidate(address vToken_, address borrower_) private view {\n uint256 _vaiDebt = vaiController.getVAIRepayAmount(borrower_);\n bool _isVAILiquidationPaused = comptroller.actionPaused(address(vaiController), IComptroller.Action.LIQUIDATE);\n bool _isForcedLiquidationEnabled = comptroller.isForcedLiquidationEnabled(vToken_);\n if (\n _isForcedLiquidationEnabled ||\n _isVAILiquidationPaused ||\n !forceVAILiquidate ||\n _vaiDebt < minLiquidatableVAI ||\n vToken_ == address(vaiController)\n ) return;\n revert VAIDebtTooHigh(_vaiDebt, minLiquidatableVAI);\n }\n\n function _setProtocolShareReserve(address protocolShareReserve_) internal {\n ensureNonzeroAddress(protocolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Sets the threshold for minimum amount of vaiLiquidate\n * @param minLiquidatableVAI_ New address for the access control\n */\n function setMinLiquidatableVAI(uint256 minLiquidatableVAI_) external {\n _checkAccessAllowed(\"setMinLiquidatableVAI(uint256)\");\n emit NewMinLiquidatableVAI(minLiquidatableVAI, minLiquidatableVAI_);\n minLiquidatableVAI = minLiquidatableVAI_;\n }\n\n /**\n * @notice Length of the pendingRedeem array to be consider while redeeming in Liquidation transaction\n * @param newLength_ Length of the chunk\n */\n function setPendingRedeemChunkLength(uint256 newLength_) external {\n _checkAccessAllowed(\"setPendingRedeemChunkLength(uint256)\");\n require(newLength_ > 0, \"Invalid chunk size\");\n emit NewPendingRedeemChunkLength(pendingRedeemChunkLength, newLength_);\n pendingRedeemChunkLength = newLength_;\n }\n\n /**\n * @notice Pause Force Liquidation of VAI\n */\n function pauseForceVAILiquidate() external {\n _checkAccessAllowed(\"pauseForceVAILiquidate()\");\n require(forceVAILiquidate, \"Force Liquidation of VAI is already Paused\");\n forceVAILiquidate = false;\n emit ForceVAILiquidationPaused(msg.sender);\n }\n\n /**\n * @notice Resume Force Liquidation of VAI\n */\n function resumeForceVAILiquidate() external {\n _checkAccessAllowed(\"resumeForceVAILiquidate()\");\n require(!forceVAILiquidate, \"Force Liquidation of VAI is already resumed\");\n forceVAILiquidate = true;\n emit ForceVAILiquidationResumed(msg.sender);\n }\n\n function renounceOwnership() public override {}\n}\n" + }, + "contracts/Liquidator/LiquidatorStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\ncontract LiquidatorStorage {\n /* State */\n\n /// @notice Percent of seized amount that goes to treasury.\n uint256 public treasuryPercentMantissa;\n\n /// @notice Mapping of addresses allowed to liquidate an account if liquidationRestricted[borrower] == true\n mapping(address => mapping(address => bool)) public allowedLiquidatorsByAccount;\n\n /// @notice Whether the liquidations are restricted to enabled allowedLiquidatorsByAccount addresses only\n mapping(address => bool) public liquidationRestricted;\n\n /// @notice minimum amount of VAI liquidation threshold\n uint256 public minLiquidatableVAI;\n\n /// @notice check for liquidation of VAI\n bool public forceVAILiquidate;\n\n /// @notice assests whose redeem is pending to reduce reserves\n address[] public pendingRedeem;\n\n /// @notice protocol share reserve contract address\n address public protocolShareReserve;\n\n /// @dev Size of chunk to consider when redeeming underlying at the time of liquidation\n uint256 internal pendingRedeemChunkLength;\n\n /// @notice gap to prevent collision in inheritance\n uint256[49] private __gap;\n}\n" + }, + "contracts/PegStability/IVAI.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IVAI {\n function balanceOf(address usr) external returns (uint256);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function mint(address usr, uint wad) external;\n\n function burn(address usr, uint wad) external;\n}\n" + }, + "contracts/PegStability/PegStability.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { IVAI } from \"./IVAI.sol\";\n\n/**\n * @title Peg Stability Contract.\n * @notice Contract for swapping stable token for VAI token and vice versa to maintain the peg stability between them.\n * @author Venus Protocol\n */\ncontract PegStability is AccessControlledV8, ReentrancyGuardUpgradeable {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n // Helper enum for calculation of the fee.\n enum FeeDirection {\n IN,\n OUT\n }\n\n /// @notice The divisor used to convert fees to basis points.\n uint256 public constant BASIS_POINTS_DIVISOR = 10000;\n\n /// @notice The mantissa value representing 1 (used for calculations).\n uint256 public constant MANTISSA_ONE = 1e18;\n\n /// @notice The value representing one dollar in the stable token.\n /// @dev Our oracle is returning amount depending on the number of decimals of the stable token. (36 - asset_decimals) E.g. 8 decimal asset = 1e28.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable ONE_DOLLAR;\n\n /// @notice VAI token contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVAI public immutable VAI;\n\n /// @notice The address of the stable token contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable STABLE_TOKEN_ADDRESS;\n\n /// @notice The address of ResilientOracle contract wrapped in its interface.\n ResilientOracleInterface public oracle;\n\n /// @notice The address of the Venus Treasury contract.\n address public venusTreasury;\n\n /// @notice The incoming stableCoin fee. (Fee for swapStableForVAI).\n uint256 public feeIn;\n\n /// @notice The outgoing stableCoin fee. (Fee for swapVAIForStable).\n uint256 public feeOut;\n\n /// @notice The maximum amount of VAI that can be minted through this contract.\n uint256 public vaiMintCap;\n\n /// @notice The total amount of VAI minted through this contract.\n uint256 public vaiMinted;\n\n /// @notice A flag indicating whether the contract is currently paused or not.\n bool public isPaused;\n\n /// @notice Event emitted when contract is paused.\n event PSMPaused(address indexed admin);\n\n /// @notice Event emitted when the contract is resumed after pause.\n event PSMResumed(address indexed admin);\n\n /// @notice Event emitted when feeIn state var is modified.\n event FeeInChanged(uint256 oldFeeIn, uint256 newFeeIn);\n\n /// @notice Event emitted when feeOut state var is modified.\n event FeeOutChanged(uint256 oldFeeOut, uint256 newFeeOut);\n\n /// @notice Event emitted when vaiMintCap state var is modified.\n event VAIMintCapChanged(uint256 oldCap, uint256 newCap);\n\n /// @notice Event emitted when venusTreasury state var is modified.\n event VenusTreasuryChanged(address indexed oldTreasury, address indexed newTreasury);\n\n /// @notice Event emitted when oracle state var is modified.\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n\n /// @notice Event emitted when stable token is swapped for VAI.\n event StableForVAISwapped(uint256 stableIn, uint256 vaiOut, uint256 fee);\n\n /// @notice Event emitted when stable token is swapped for VAI.\n event VAIForStableSwapped(uint256 vaiBurnt, uint256 stableOut, uint256 vaiFee);\n\n /// @notice thrown when contract is in paused state\n error Paused();\n\n /// @notice thrown when attempted to pause an already paused contract\n error AlreadyPaused();\n\n /// @notice thrown when attempted to resume the contract if it is already resumed\n error NotPaused();\n\n /// @notice thrown when stable token has more than 18 decimals\n error TooManyDecimals();\n\n /// @notice thrown when fee is >= 100%\n error InvalidFee();\n\n /// @notice thrown when a zero address is passed as a function parameter\n error ZeroAddress();\n\n /// @notice thrown when a zero amount is passed as stable token amount parameter\n error ZeroAmount();\n\n /// @notice thrown when the user doesn't have enough VAI balance to provide for the amount of stable tokens he wishes to get\n error NotEnoughVAI();\n\n /// @notice thrown when the amount of VAI to be burnt exceeds the vaiMinted amount\n error VAIMintedUnderflow();\n\n /// @notice thrown when the VAI transfer to treasury fails\n error VAITransferFail();\n\n /// @notice thrown when VAI to be minted will go beyond the mintCap threshold\n error VAIMintCapReached();\n /// @notice thrown when fee calculation will result in rounding down to 0 due to stable token amount being a too small number\n error AmountTooSmall();\n\n /**\n * @dev Prevents functions to execute when contract is paused.\n */\n modifier isActive() {\n if (isPaused) revert Paused();\n _;\n }\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address stableTokenAddress_, address vaiAddress_) {\n _ensureNonzeroAddress(stableTokenAddress_);\n _ensureNonzeroAddress(vaiAddress_);\n\n uint256 decimals_ = IERC20MetadataUpgradeable(stableTokenAddress_).decimals();\n\n if (decimals_ > 18) {\n revert TooManyDecimals();\n }\n\n ONE_DOLLAR = 10 ** (36 - decimals_); // 1$ scaled to the decimals returned by our Oracle\n STABLE_TOKEN_ADDRESS = stableTokenAddress_;\n VAI = IVAI(vaiAddress_);\n _disableInitializers();\n }\n\n /**\n * @notice Initializes the contract via Proxy Contract with the required parameters.\n * @param accessControlManager_ The address of the AccessControlManager contract.\n * @param venusTreasury_ The address where fees will be sent.\n * @param oracleAddress_ The address of the ResilientOracle contract.\n * @param feeIn_ The percentage of fees to be applied to a stablecoin -> VAI swap.\n * @param feeOut_ The percentage of fees to be applied to a VAI -> stablecoin swap.\n * @param vaiMintCap_ The cap for the total amount of VAI that can be minted.\n */\n function initialize(\n address accessControlManager_,\n address venusTreasury_,\n address oracleAddress_,\n uint256 feeIn_,\n uint256 feeOut_,\n uint256 vaiMintCap_\n ) external initializer {\n _ensureNonzeroAddress(accessControlManager_);\n _ensureNonzeroAddress(venusTreasury_);\n _ensureNonzeroAddress(oracleAddress_);\n __AccessControlled_init(accessControlManager_);\n __ReentrancyGuard_init();\n\n if (feeIn_ >= BASIS_POINTS_DIVISOR || feeOut_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n\n feeIn = feeIn_;\n feeOut = feeOut_;\n vaiMintCap = vaiMintCap_;\n venusTreasury = venusTreasury_;\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /*** Swap Functions ***/\n\n /**\n * @notice Swaps VAI for a stable token.\n * @param receiver The address where the stablecoin will be sent.\n * @param stableTknAmount The amount of stable tokens to receive.\n * @return The amount of VAI received and burnt from the sender.\n */\n // @custom:event Emits VAIForStableSwapped event.\n function swapVAIForStable(\n address receiver,\n uint256 stableTknAmount\n ) external isActive nonReentrant returns (uint256) {\n _ensureNonzeroAddress(receiver);\n _ensureNonzeroAmount(stableTknAmount);\n\n // update oracle price and calculate USD value of the stable token amount scaled in 18 decimals\n oracle.updateAssetPrice(STABLE_TOKEN_ADDRESS);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.OUT);\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.OUT);\n\n if (VAI.balanceOf(msg.sender) < stableTknAmountUSD + fee) {\n revert NotEnoughVAI();\n }\n if (vaiMinted < stableTknAmountUSD) {\n revert VAIMintedUnderflow();\n }\n\n unchecked {\n vaiMinted -= stableTknAmountUSD;\n }\n\n if (fee != 0) {\n bool success = VAI.transferFrom(msg.sender, venusTreasury, fee);\n if (!success) {\n revert VAITransferFail();\n }\n }\n\n VAI.burn(msg.sender, stableTknAmountUSD);\n IERC20Upgradeable(STABLE_TOKEN_ADDRESS).safeTransfer(receiver, stableTknAmount);\n emit VAIForStableSwapped(stableTknAmountUSD, stableTknAmount, fee);\n return stableTknAmountUSD;\n }\n\n /**\n * @notice Swaps stable tokens for VAI with fees.\n * @dev This function adds support to fee-on-transfer tokens. The actualTransferAmt is calculated, by recording token balance state before and after the transfer.\n * @param receiver The address that will receive the VAI tokens.\n * @param stableTknAmount The amount of stable tokens to be swapped.\n * @return Amount of VAI minted to the sender.\n */\n // @custom:event Emits StableForVAISwapped event.\n function swapStableForVAI(\n address receiver,\n uint256 stableTknAmount\n ) external isActive nonReentrant returns (uint256) {\n _ensureNonzeroAddress(receiver);\n _ensureNonzeroAmount(stableTknAmount);\n // transfer IN, supporting fee-on-transfer tokens\n uint256 balanceBefore = IERC20Upgradeable(STABLE_TOKEN_ADDRESS).balanceOf(address(this));\n IERC20Upgradeable(STABLE_TOKEN_ADDRESS).safeTransferFrom(msg.sender, address(this), stableTknAmount);\n uint256 balanceAfter = IERC20Upgradeable(STABLE_TOKEN_ADDRESS).balanceOf(address(this));\n\n //calculate actual transfered amount (in case of fee-on-transfer tokens)\n uint256 actualTransferAmt = balanceAfter - balanceBefore;\n\n // update oracle price and calculate USD value of the stable token amount scaled in 18 decimals\n oracle.updateAssetPrice(STABLE_TOKEN_ADDRESS);\n uint256 actualTransferAmtInUSD = _previewTokenUSDAmount(actualTransferAmt, FeeDirection.IN);\n\n //calculate feeIn\n uint256 fee = _calculateFee(actualTransferAmtInUSD, FeeDirection.IN);\n uint256 vaiToMint = actualTransferAmtInUSD - fee;\n\n if (vaiMinted + actualTransferAmtInUSD > vaiMintCap) {\n revert VAIMintCapReached();\n }\n unchecked {\n vaiMinted += actualTransferAmtInUSD;\n }\n\n // mint VAI to receiver\n VAI.mint(receiver, vaiToMint);\n\n // mint VAI fee to venus treasury\n if (fee != 0) {\n VAI.mint(venusTreasury, fee);\n }\n\n emit StableForVAISwapped(actualTransferAmt, vaiToMint, fee);\n return vaiToMint;\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Pause the PSM contract.\n * @dev Reverts if the contract is already paused.\n */\n // @custom:event Emits PSMPaused event.\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n if (isPaused) {\n revert AlreadyPaused();\n }\n isPaused = true;\n emit PSMPaused(msg.sender);\n }\n\n /**\n * @notice Resume the PSM contract.\n * @dev Reverts if the contract is not paused.\n */\n // @custom:event Emits PSMResumed event.\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n if (!isPaused) {\n revert NotPaused();\n }\n isPaused = false;\n emit PSMResumed(msg.sender);\n }\n\n /**\n * @notice Set the fee percentage for incoming swaps.\n * @dev Reverts if the new fee percentage is invalid (greater than or equal to BASIS_POINTS_DIVISOR).\n * @param feeIn_ The new fee percentage for incoming swaps.\n */\n // @custom:event Emits FeeInChanged event.\n function setFeeIn(uint256 feeIn_) external {\n _checkAccessAllowed(\"setFeeIn(uint256)\");\n // feeIn = 10000 = 100%\n if (feeIn_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n uint256 oldFeeIn = feeIn;\n feeIn = feeIn_;\n emit FeeInChanged(oldFeeIn, feeIn_);\n }\n\n /**\n * @notice Set the fee percentage for outgoing swaps.\n * @dev Reverts if the new fee percentage is invalid (greater than or equal to BASIS_POINTS_DIVISOR).\n * @param feeOut_ The new fee percentage for outgoing swaps.\n */\n // @custom:event Emits FeeOutChanged event.\n function setFeeOut(uint256 feeOut_) external {\n _checkAccessAllowed(\"setFeeOut(uint256)\");\n // feeOut = 10000 = 100%\n if (feeOut_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n uint256 oldFeeOut = feeOut;\n feeOut = feeOut_;\n emit FeeOutChanged(oldFeeOut, feeOut_);\n }\n\n /**\n * @dev Set the maximum amount of VAI that can be minted through this contract.\n * @param vaiMintCap_ The new maximum amount of VAI that can be minted.\n */\n // @custom:event Emits VAIMintCapChanged event.\n function setVAIMintCap(uint256 vaiMintCap_) external {\n _checkAccessAllowed(\"setVAIMintCap(uint256)\");\n uint256 oldVAIMintCap = vaiMintCap;\n vaiMintCap = vaiMintCap_;\n emit VAIMintCapChanged(oldVAIMintCap, vaiMintCap_);\n }\n\n /**\n * @notice Set the address of the Venus Treasury contract.\n * @dev Reverts if the new address is zero.\n * @param venusTreasury_ The new address of the Venus Treasury contract.\n */\n // @custom:event Emits VenusTreasuryChanged event.\n function setVenusTreasury(address venusTreasury_) external {\n _checkAccessAllowed(\"setVenusTreasury(address)\");\n _ensureNonzeroAddress(venusTreasury_);\n address oldTreasuryAddress = venusTreasury;\n venusTreasury = venusTreasury_;\n emit VenusTreasuryChanged(oldTreasuryAddress, venusTreasury_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n */\n // @custom:event Emits OracleChanged event.\n function setOracle(address oracleAddress_) external {\n _checkAccessAllowed(\"setOracle(address)\");\n _ensureNonzeroAddress(oracleAddress_);\n address oldOracleAddress = address(oracle);\n oracle = ResilientOracleInterface(oracleAddress_);\n emit OracleChanged(oldOracleAddress, oracleAddress_);\n }\n\n /**\n * @dev Disabling renounceOwnership function.\n */\n function renounceOwnership() public override {}\n\n /*** Helper Functions ***/\n\n /**\n * @notice Calculates the amount of VAI that would be burnt from the user.\n * @dev This calculation might be off with a bit, if the price of the oracle for this asset is not updated in the block this function is invoked.\n * @param stableTknAmount The amount of stable tokens to be received after the swap.\n * @return The amount of VAI that would be taken from the user.\n */\n function previewSwapVAIForStable(uint256 stableTknAmount) external view returns (uint256) {\n _ensureNonzeroAmount(stableTknAmount);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.OUT);\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.OUT);\n\n if (vaiMinted < stableTknAmountUSD) {\n revert VAIMintedUnderflow();\n }\n\n return stableTknAmountUSD + fee;\n }\n\n /**\n * @notice Calculates the amount of VAI that would be sent to the receiver.\n * @dev This calculation might be off with a bit, if the price of the oracle for this asset is not updated in the block this function is invoked.\n * @param stableTknAmount The amount of stable tokens provided for the swap.\n * @return The amount of VAI that would be sent to the receiver.\n */\n function previewSwapStableForVAI(uint256 stableTknAmount) external view returns (uint256) {\n _ensureNonzeroAmount(stableTknAmount);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.IN);\n\n //calculate feeIn\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.IN);\n uint256 vaiToMint = stableTknAmountUSD - fee;\n\n if (vaiMinted + stableTknAmountUSD > vaiMintCap) {\n revert VAIMintCapReached();\n }\n\n return vaiToMint;\n }\n\n /**\n * @dev Calculates the USD value of the given amount of stable tokens depending on the swap direction.\n * @param amount The amount of stable tokens.\n * @param direction The direction of the swap.\n * @return The USD value of the given amount of stable tokens scaled by 1e18 taking into account the direction of the swap\n */\n function _previewTokenUSDAmount(uint256 amount, FeeDirection direction) internal view returns (uint256) {\n return (amount * _getPriceInUSD(direction)) / MANTISSA_ONE;\n }\n\n /**\n * @notice Get the price of stable token in USD.\n * @dev This function returns either min(1$,oraclePrice) or max(1$,oraclePrice) with a decimal scale (36 - asset_decimals). E.g. for 8 decimal token 1$ will be 1e28.\n * @param direction The direction of the swap: FeeDirection.IN or FeeDirection.OUT.\n * @return The price in USD, adjusted based on the selected direction.\n */\n function _getPriceInUSD(FeeDirection direction) internal view returns (uint256) {\n // get price with a scale = (36 - asset_decimals)\n uint256 price = oracle.getPrice(STABLE_TOKEN_ADDRESS);\n\n if (direction == FeeDirection.IN) {\n // MIN(1, price)\n return price < ONE_DOLLAR ? price : ONE_DOLLAR;\n } else {\n // MAX(1, price)\n return price > ONE_DOLLAR ? price : ONE_DOLLAR;\n }\n }\n\n /**\n * @notice Calculate the fee amount based on the input amount and fee percentage.\n * @dev Reverts if the fee percentage calculation results in rounding down to 0.\n * @param amount The input amount to calculate the fee from.\n * @param direction The direction of the fee: FeeDirection.IN or FeeDirection.OUT.\n * @return The fee amount.\n */\n function _calculateFee(uint256 amount, FeeDirection direction) internal view returns (uint256) {\n uint256 feePercent;\n if (direction == FeeDirection.IN) {\n feePercent = feeIn;\n } else {\n feePercent = feeOut;\n }\n if (feePercent == 0) {\n return 0;\n } else {\n // checking if the percent calculation will result in rounding down to 0\n if (amount * feePercent < BASIS_POINTS_DIVISOR) {\n revert AmountTooSmall();\n }\n return (amount * feePercent) / BASIS_POINTS_DIVISOR;\n }\n }\n\n /**\n * @notice Checks that the address is not the zero address.\n * @param someone The address to check.\n */\n function _ensureNonzeroAddress(address someone) private pure {\n if (someone == address(0)) revert ZeroAddress();\n }\n\n /**\n * @notice Checks that the amount passed as stable tokens is bigger than zero\n * @param amount The amount to validate\n */\n function _ensureNonzeroAmount(uint256 amount) private pure {\n if (amount == 0) revert ZeroAmount();\n }\n}\n" + }, + "contracts/Swap/interfaces/CustomErrors.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\n// **************\n// *** ERRORS ***\n// **************\n\n///@notice Error indicating that suplying to a given market failed.\nerror SupplyError(address supplier, address vToken, uint256 errorCode);\n\n///@notice Error indicating that repaying to given market failed.\nerror RepayError(address repayer, address vToken, uint256 errorCode);\n\n///@notice Error indicating wBNB address passed is not the expected one.\nerror WrongAddress(address expectedAdddress, address passedAddress);\n\n///@notice Error thrown when deadline for swap has expired\nerror SwapDeadlineExpire(uint256 deadline, uint256 timestemp);\n\n///@notice Error thrown where the input amount parameter for a token is 0\nerror InsufficientInputAmount();\n\n///@notice Error thrown when the amount out passed is 0\nerror InsufficientOutputAmount();\n\n///@notice Error thrown when the amount received from a trade is below the minimum\nerror OutputAmountBelowMinimum(uint256 amountOut, uint256 amountOutMin);\n\n///@notice Error thrown when the amount In is above the amount in maximum\nerror InputAmountAboveMaximum(uint256 amountIn, uint256 amountIntMax);\n\n///@notice Error thrown when amount is above the msg.value(amountMax)\nerror ExcessiveInputAmount(uint256 amount, uint256 amountMax);\n\n///@notice Error thrown when the given reserves are equal to 0\nerror InsufficientLiquidity();\n\n///@notice Error thrown if a zero address is passed\nerror ZeroAddress();\n\n///@notice Error thrown if two token addresses are identical\nerror IdenticalAddresses();\n\n///@notice Error thrown when the trade path[] parameter consists of only 1 token (i.e. path.length<2)\nerror InvalidPath();\n\n///@notice Error thrown when invalid vToken address is passed to swap router\nerror VTokenNotListed(address vToken);\n\n///@notice Error thrown when invalid underlying is passed as per given vToken\nerror VTokenUnderlyingInvalid(address underlying);\n\n///@notice Error thrown when swapamount is less than the amountOutmin\nerror SwapAmountLessThanAmountOutMin(uint256 swapAmount, uint256 amountOutMin);\n\n///@notice Error thrown when swapRouter's balance is less than sweep amount\nerror InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n///@notice Error thrown when safeApprove failed\nerror SafeApproveFailed();\n\n///@notice Error thrown when safeTransfer failed\nerror SafeTransferFailed();\n\n///@notice Error thrown when transferFrom failed\nerror SafeTransferFromFailed();\n\n///@notice Error thrown when safeTransferBNB failed\nerror SafeTransferBNBFailed();\n\n///@notice Error thrown when reentrant check fails\nerror ReentrantCheck();\n" + }, + "contracts/Swap/interfaces/InterfaceComptroller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface InterfaceComptroller {\n function markets(address) external view returns (bool);\n}\n" + }, + "contracts/Swap/interfaces/IPancakePair.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakePair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n\n function transfer(address to, uint value) external returns (bool);\n\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint);\n\n function price1CumulativeLast() external view returns (uint);\n\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n\n function burn(address to) external returns (uint amount0, uint amount1);\n\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/Swap/interfaces/IPancakeSwapV2Factory.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakeSwapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n\n function allPairs(uint) external view returns (address pair);\n\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}\n" + }, + "contracts/Swap/interfaces/IPancakeSwapV2Router.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakeSwapV2Router {\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForTokensAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256 swapAmount);\n\n function swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapExactBNBForTokensAtSupportingFee(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256 swapAmount);\n\n function swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForBNBAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256 swapAmount);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForTokensAndSupply(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactBNBForTokensAndSupply(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactBNBForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapTokensForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForBNBAndSupply(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForBNBAndSupplyAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForExactBNBAndSupply(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForFullTokenDebtAndRepay(\n address vTokenAddress,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForTokensAndRepay(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactBNBForTokensAndRepay(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactBNBForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapTokensForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForFullTokenDebtAndRepay(\n address vTokenAddress,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForBNBAndRepay(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForBNBAndRepayAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForExactBNBAndRepay(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForFullBNBDebtAndRepay(uint256 amountInMax, address[] calldata path, uint256 deadline) external;\n}\n" + }, + "contracts/Swap/interfaces/IVBNB.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IVBNB {\n function repayBorrowBehalf(address borrower) external payable;\n\n function mint() external payable;\n\n function balanceOf(address owner) external view returns (uint256);\n}\n" + }, + "contracts/Swap/interfaces/IVtoken.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IVToken {\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function underlying() external returns (address);\n}\n" + }, + "contracts/Swap/interfaces/IWBNB.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IWBNB {\n function deposit() external payable;\n\n function transfer(address to, uint value) external returns (bool);\n\n function withdraw(uint) external;\n\n function balanceOf(address owner) external view returns (uint256 balance);\n}\n" + }, + "contracts/Swap/IRouterHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IRouterHelper {\n function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\n}\n" + }, + "contracts/Swap/lib/PancakeLibrary.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"../interfaces/IPancakePair.sol\";\nimport \"../interfaces/CustomErrors.sol\";\n\nlibrary PancakeLibrary {\n /**\n * @notice Used to handle return values from pairs sorted in this order\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return token0 token1 Sorted token addresses\n **/\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\n if (tokenA == tokenB) {\n revert IdenticalAddresses();\n }\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n if (token0 == address(0)) {\n revert ZeroAddress();\n }\n }\n\n /**\n * @notice Calculates the CREATE2 address for a pair without making any external calls\n * @param factory Address of the pancake swap factory\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return pair Address for a pair\n **/\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\n (address token0, address token1) = sortTokens(tokenA, tokenB);\n pair = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(\n hex\"ff\",\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex\"00fb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5\" // init code hash\n )\n )\n )\n )\n );\n }\n\n /**\n * @notice Fetches and sorts the reserves for a pair\n * @param factory Address of the pancake swap factory\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return reserveA reserveB Reserves for the token A and token B\n **/\n function getReserves(\n address factory,\n address tokenA,\n address tokenB\n ) internal view returns (uint256 reserveA, uint256 reserveB) {\n (address token0, ) = sortTokens(tokenA, tokenB);\n address pairAddress = pairFor(factory, tokenA, tokenB);\n (uint256 reserve0, uint256 reserve1, ) = IPancakePair(pairAddress).getReserves();\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\n }\n\n /**\n * @notice Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n * @param amountA The amount of token A\n * @param reserveA The amount of reserves for token A before swap\n * @param reserveB The amount of reserves for token B before swap\n * @return amountB An equivalent amount of the token B\n **/\n function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) internal pure returns (uint256 amountB) {\n if (amountA == 0) {\n revert InsufficientInputAmount();\n } else if (reserveA == 0 || reserveB == 0) {\n revert InsufficientLiquidity();\n }\n amountB = (amountA * reserveB) / reserveA;\n }\n\n /**\n * @notice Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n * @param amountIn The amount of token A need to swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountOut The maximum output amount of the token B\n **/\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) internal pure returns (uint256 amountOut) {\n if (amountIn == 0) {\n revert InsufficientInputAmount();\n } else if (reserveIn == 0 || reserveOut == 0) {\n revert InsufficientLiquidity();\n }\n uint256 amountInWithFee = amountIn * 9975;\n uint256 numerator = amountInWithFee * reserveOut;\n uint256 denominator = (reserveIn * 10000) + amountInWithFee;\n amountOut = numerator / denominator;\n }\n\n /**\n * @notice Given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n * @param amountOut The amount of token B after swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountIn Required input amount of the token A\n **/\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) internal pure returns (uint256 amountIn) {\n if (amountOut == 0) {\n revert InsufficientOutputAmount();\n } else if (reserveIn == 0 || reserveOut == 0) {\n revert InsufficientLiquidity();\n }\n uint256 numerator = reserveIn * amountOut * 10000;\n uint256 denominator = (reserveOut - amountOut) * 9975;\n amountIn = (numerator / denominator) + 1;\n }\n\n /**\n * @notice Performs chained getAmountOut calculations on any number of pairs\n * @param factory Address of the pancake swap factory\n * @param amountIn The amount of tokens to swap.\n * @param path Array with addresses of the underlying assets to be swapped\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function getAmountsOut(\n address factory,\n uint256 amountIn,\n address[] memory path\n ) internal view returns (uint256[] memory amounts) {\n if (path.length <= 1) {\n revert InvalidPath();\n }\n amounts = new uint256[](path.length);\n amounts[0] = amountIn;\n for (uint256 i; i < path.length - 1; ) {\n (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]);\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\n unchecked {\n i += 1;\n }\n }\n }\n\n /**\n * @notice Performs chained getAmountIn calculations on any number of pairs\n * @param factory Address of the pancake swap factory\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function getAmountsIn(\n address factory,\n uint256 amountOut,\n address[] memory path\n ) internal view returns (uint256[] memory amounts) {\n if (path.length <= 1) {\n revert InvalidPath();\n }\n amounts = new uint256[](path.length);\n amounts[amounts.length - 1] = amountOut;\n for (uint256 i = path.length - 1; i > 0; ) {\n (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]);\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\n unchecked {\n i -= 1;\n }\n }\n }\n}\n" + }, + "contracts/Swap/lib/TransferHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"../interfaces/CustomErrors.sol\";\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n /**\n * @dev `value` as the allowance of `spender` over the caller's tokens.\n * @param token Address of the token\n * @param to Address of the spender\n * @param value Amount as allowance\n */\n function safeApprove(address token, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('approve(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeApproveFailed();\n }\n }\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 * @param token Address of the token\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransfer(address token, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeTransferFailed();\n }\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 * @param token Address of the token\n * @param from Address of the asset'sowner\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransferFrom(address token, address from, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeTransferFromFailed();\n }\n }\n\n /**\n * @dev Transfer `value` amount of `BNB` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransferBNB(address to, uint256 value) internal {\n (bool success, ) = to.call{ value: value }(new bytes(0));\n if (!success) {\n revert SafeTransferBNBFailed();\n }\n }\n}\n" + }, + "contracts/Swap/RouterHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport \"./lib/PancakeLibrary.sol\";\nimport \"./interfaces/IWBNB.sol\";\nimport \"./lib/TransferHelper.sol\";\n\nimport \"./interfaces/CustomErrors.sol\";\nimport \"./IRouterHelper.sol\";\n\nabstract contract RouterHelper is IRouterHelper {\n /// @notice Select the type of Token for which either a supporting fee would be deducted or not at the time of transfer.\n enum TypesOfTokens {\n NON_SUPPORTING_FEE,\n SUPPORTING_FEE\n }\n\n /// @notice Address of WBNB contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WBNB;\n\n /// @notice Address of pancake swap factory contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable factory;\n\n // **************\n // *** EVENTS ***\n // **************\n /// @notice This event is emitted whenever a successful swap (tokenA -> tokenB) occurs\n event SwapTokensForTokens(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (tokenA -> tokenB) occurs\n event SwapTokensForTokensAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @notice This event is emitted whenever a successful swap (BNB -> token) occurs\n event SwapBnbForTokens(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (BNB -> token) occurs\n event SwapBnbForTokensAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @notice This event is emitted whenever a successful swap (token -> BNB) occurs\n event SwapTokensForBnb(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (token -> BNB) occurs\n event SwapTokensForBnbAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address WBNB_, address factory_) {\n if (WBNB_ == address(0) || factory_ == address(0)) {\n revert ZeroAddress();\n }\n WBNB = WBNB_;\n factory = factory_;\n }\n\n /**\n * @notice Perform swap on the path(pairs)\n * @param amounts Araay of amounts of tokens after performing the swap\n * @param path Array with addresses of the underlying assets to be swapped\n * @param _to Recipient of the output tokens.\n */\n function _swap(uint256[] memory amounts, address[] memory path, address _to) internal virtual {\n for (uint256 i; i < path.length - 1; ) {\n (address input, address output) = (path[i], path[i + 1]);\n (address token0, ) = PancakeLibrary.sortTokens(input, output);\n uint256 amountOut = amounts[i + 1];\n (uint256 amount0Out, uint256 amount1Out) = input == token0\n ? (uint256(0), amountOut)\n : (amountOut, uint256(0));\n address to = i < path.length - 2 ? PancakeLibrary.pairFor(factory, output, path[i + 2]) : _to;\n IPancakePair(PancakeLibrary.pairFor(factory, input, output)).swap(amount0Out, amount1Out, to, new bytes(0));\n unchecked {\n i += 1;\n }\n }\n }\n\n // **** SWAP (supporting fee-on-transfer tokens) ****\n\n /**\n * @notice Perform swap on the path(pairs) for supporting fee\n * @dev requires the initial amount to have already been sent to the first pair\n * @param path Array with addresses of the underlying assets to be swapped\n * @param _to Recipient of the output tokens.\n */\n function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {\n for (uint256 i; i < path.length - 1; ) {\n (address input, address output) = (path[i], path[i + 1]);\n (address token0, ) = PancakeLibrary.sortTokens(input, output);\n IPancakePair pair = IPancakePair(PancakeLibrary.pairFor(factory, input, output));\n uint256 amountInput;\n uint256 amountOutput;\n {\n // scope to avoid stack too deep errors\n (uint256 reserve0, uint256 reserve1, ) = pair.getReserves();\n (uint256 reserveInput, uint256 reserveOutput) = input == token0\n ? (reserve0, reserve1)\n : (reserve1, reserve0);\n\n uint256 balance = IERC20(input).balanceOf(address(pair));\n amountInput = balance - reserveInput;\n amountOutput = PancakeLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);\n }\n (uint256 amount0Out, uint256 amount1Out) = input == token0\n ? (uint256(0), amountOutput)\n : (amountOutput, uint256(0));\n address to = i < path.length - 2 ? PancakeLibrary.pairFor(factory, output, path[i + 2]) : _to;\n pair.swap(amount0Out, amount1Out, to, new bytes(0));\n unchecked {\n i += 1;\n }\n }\n }\n\n /**\n * @notice Swap token A for token B\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n address pairAddress = PancakeLibrary.pairFor(factory, path[0], path[1]);\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, amountIn, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n TransferHelper.safeTransferFrom(path[0], msg.sender, pairAddress, amounts[0]);\n _swap(amounts, path, to);\n emit SwapTokensForTokens(msg.sender, path, amounts);\n } else {\n TransferHelper.safeTransferFrom(path[0], msg.sender, pairAddress, amountIn);\n _swapSupportingFeeOnTransferTokens(path, to);\n emit SwapTokensForTokensAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap exact BNB for token\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n address wBNBAddress = WBNB;\n if (path[0] != wBNBAddress) {\n revert WrongAddress(wBNBAddress, path[0]);\n }\n IWBNB(wBNBAddress).deposit{ value: msg.value }();\n TransferHelper.safeTransfer(wBNBAddress, PancakeLibrary.pairFor(factory, path[0], path[1]), msg.value);\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, msg.value, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n _swap(amounts, path, to);\n emit SwapBnbForTokens(msg.sender, path, amounts);\n } else {\n _swapSupportingFeeOnTransferTokens(path, to);\n emit SwapBnbForTokensAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap token A for BNB\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of BNB to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n if (path[path.length - 1] != WBNB) {\n revert WrongAddress(WBNB, path[path.length - 1]);\n }\n uint256 WBNBAmount;\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, amountIn, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, address(this));\n WBNBAmount = amounts[amounts.length - 1];\n } else {\n uint256 balanceBefore = IWBNB(WBNB).balanceOf(address(this));\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amountIn\n );\n _swapSupportingFeeOnTransferTokens(path, address(this));\n uint256 balanceAfter = IWBNB(WBNB).balanceOf(address(this));\n WBNBAmount = balanceAfter - balanceBefore;\n }\n IWBNB(WBNB).withdraw(WBNBAmount);\n if (to != address(this)) {\n TransferHelper.safeTransferBNB(to, WBNBAmount);\n }\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n emit SwapTokensForBnb(msg.sender, path, amounts);\n } else {\n emit SwapTokensForBnbAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap token A for exact amount of token B\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > amountInMax) {\n revert InputAmountAboveMaximum(amounts[0], amountInMax);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, to);\n emit SwapTokensForTokens(msg.sender, path, amounts);\n }\n\n /**\n * @notice Swap BNB for exact amount of token B\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n if (path[0] != WBNB) {\n revert WrongAddress(WBNB, path[0]);\n }\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > msg.value) {\n revert ExcessiveInputAmount(amounts[0], msg.value);\n }\n IWBNB(WBNB).deposit{ value: amounts[0] }();\n TransferHelper.safeTransfer(WBNB, PancakeLibrary.pairFor(factory, path[0], path[1]), amounts[0]);\n _swap(amounts, path, to);\n // refund dust BNB, if any\n if (msg.value > amounts[0]) TransferHelper.safeTransferBNB(msg.sender, msg.value - amounts[0]);\n emit SwapBnbForTokens(msg.sender, path, amounts);\n }\n\n /**\n * @notice Swap token A for exact BNB\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n if (path[path.length - 1] != WBNB) {\n revert WrongAddress(WBNB, path[path.length - 1]);\n }\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > amountInMax) {\n revert InputAmountAboveMaximum(amounts[amounts.length - 1], amountInMax);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, address(this));\n IWBNB(WBNB).withdraw(amounts[amounts.length - 1]);\n if (to != address(this)) {\n TransferHelper.safeTransferBNB(to, amounts[amounts.length - 1]);\n }\n emit SwapTokensForBnb(msg.sender, path, amounts);\n }\n\n // **** LIBRARY FUNCTIONS ****\n\n /**\n * @notice Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n * @param amountA The amount of token A\n * @param reserveA The amount of reserves for token A before swap\n * @param reserveB The amount of reserves for token B before swap\n * @return amountB An equivalent amount of the token B\n **/\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure virtual override returns (uint256 amountB) {\n return PancakeLibrary.quote(amountA, reserveA, reserveB);\n }\n\n /**\n * @notice Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n * @param amountIn The amount of token A need to swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountOut The maximum output amount of the token B\n **/\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure virtual override returns (uint256 amountOut) {\n return PancakeLibrary.getAmountOut(amountIn, reserveIn, reserveOut);\n }\n\n /**\n * @notice Given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n * @param amountOut The amount of token B after swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountIn Required input amount of the token A\n **/\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure virtual override returns (uint256 amountIn) {\n return PancakeLibrary.getAmountIn(amountOut, reserveIn, reserveOut);\n }\n\n /**\n * @notice performs chained getAmountOut calculations on any number of pairs.\n * @param amountIn The amount of tokens to swap.\n * @param path Array with addresses of the underlying assets to be swapped.\n */\n function getAmountsOut(\n uint256 amountIn,\n address[] memory path\n ) external view virtual override returns (uint256[] memory amounts) {\n return PancakeLibrary.getAmountsOut(factory, amountIn, path);\n }\n\n /**\n * @notice performs chained getAmountIn calculations on any number of pairs.\n * @param amountOut amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped.\n */\n function getAmountsIn(\n uint256 amountOut,\n address[] memory path\n ) external view virtual override returns (uint256[] memory amounts) {\n return PancakeLibrary.getAmountsIn(factory, amountOut, path);\n }\n}\n" + }, + "contracts/Swap/SwapRouter.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"./interfaces/IPancakeSwapV2Router.sol\";\nimport \"./interfaces/IVtoken.sol\";\nimport \"./RouterHelper.sol\";\nimport \"./interfaces/IVBNB.sol\";\nimport \"./interfaces/IVtoken.sol\";\nimport \"./interfaces/InterfaceComptroller.sol\";\n\n/**\n * @title Venus's Pancake Swap Integration Contract\n * @notice This contracts allows users to swap a token for another one and supply/repay with the latter.\n * @dev For all functions that do not swap native BNB, user must approve this contract with the amount, prior the calling the swap function.\n * @author 0xlucian\n */\n\ncontract SwapRouter is Ownable2Step, RouterHelper, IPancakeSwapV2Router {\n using SafeERC20 for IERC20;\n\n address public immutable comptrollerAddress;\n\n uint256 private constant _NOT_ENTERED = 1;\n\n uint256 private constant _ENTERED = 2;\n\n address public vBNBAddress;\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n uint256 internal _status;\n\n // ***************\n // ** MODIFIERS **\n // ***************\n modifier ensure(uint256 deadline) {\n if (deadline < block.timestamp) {\n revert SwapDeadlineExpire(deadline, block.timestamp);\n }\n _;\n }\n\n modifier ensurePath(address[] calldata path) {\n if (path.length < 2) {\n revert InvalidPath();\n }\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n if (_status == _ENTERED) {\n revert ReentrantCheck();\n }\n _status = _ENTERED;\n _;\n _status = _NOT_ENTERED;\n }\n\n /// @notice event emitted on sweep token success\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n\n /// @notice event emitted on vBNBAddress update\n event VBNBAddressUpdated(address indexed oldAddress, address indexed newAddress);\n\n // *********************\n // **** CONSTRUCTOR ****\n // *********************\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address WBNB_,\n address factory_,\n address _comptrollerAddress,\n address _vBNBAddress\n ) RouterHelper(WBNB_, factory_) {\n if (_comptrollerAddress == address(0) || _vBNBAddress == address(0)) {\n revert ZeroAddress();\n }\n comptrollerAddress = _comptrollerAddress;\n _status = _NOT_ENTERED;\n vBNBAddress = _vBNBAddress;\n }\n\n receive() external payable {\n assert(msg.sender == WBNB); // only accept BNB via fallback from the WBNB contract\n }\n\n // ****************************\n // **** EXTERNAL FUNCTIONS ****\n // ****************************\n\n /**\n * @notice Setter for the vBNB address.\n * @param _vBNBAddress Address of the BNB vToken to update.\n */\n function setVBNBAddress(address _vBNBAddress) external onlyOwner {\n if (_vBNBAddress == address(0)) {\n revert ZeroAddress();\n }\n\n _isVTokenListed(_vBNBAddress);\n\n address oldAddress = vBNBAddress;\n vBNBAddress = _vBNBAddress;\n\n emit VBNBAddressUpdated(oldAddress, vBNBAddress);\n }\n\n /**\n * @notice Swap token A for token B and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n */\n function swapExactTokensForTokensAndSupply(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap deflationary (a small amount of fee is deducted at the time of transfer of token) token A for token B and supply to a Venus market.\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n */\n function swapExactTokensForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another token and supply to a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactBNBForTokensAndSupply(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another deflationary token (a small amount of fee is deducted at the time of transfer of token) and supply to a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactBNBForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact tokens and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap Exact tokens for BNB and supply to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndSupply(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap Exact deflationary tokens (a small amount of fee is deducted at the time of transfer of tokens) for BNB and supply to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndSupplyAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and supply to a Venus market\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactBNBAndSupply(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap token A for token B and repay a borrow from a Venus market\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive (and repay)\n */\n function swapExactTokensForTokensAndRepay(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap deflationary token (a small amount of fee is deducted at the time of transfer of token) token A for token B and repay a borrow from a Venus market\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive (and repay)\n */\n function swapExactTokensForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another token and repay a borrow from a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered so the swap path tokens are listed first and last asset is the token we receive\n */\n function swapExactBNBForTokensAndRepay(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another deflationary token (a small amount of fee is deducted at the time of transfer of token) and repay a borrow from a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered so the swap path tokens are listed first and last asset is the token we receive\n */\n function swapExactBNBForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for full tokens debt and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForFullTokenDebtAndRepay(\n address vTokenAddress,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n uint256 amountOut = IVToken(vTokenAddress).borrowBalanceCurrent(msg.sender);\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForFullTokenDebtAndRepay(\n address vTokenAddress,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n uint256 amountOut = IVToken(vTokenAddress).borrowBalanceCurrent(msg.sender);\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap Exact tokens for BNB and repay to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndRepay(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap Exact deflationary tokens (a small amount of fee is deducted at the time of transfer of tokens) for BNB and repay to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndRepayAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and repay to a Venus market\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactBNBAndRepay(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and repay to a Venus market\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForFullBNBDebtAndRepay(\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n uint256 amountOut = IVToken(vBNBAddress).borrowBalanceCurrent(msg.sender);\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output tokens as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapExactTokensForTokens(amountIn, amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output tokens as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForTokensAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(to);\n _swapExactTokensForTokens(amountIn, amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, to);\n }\n\n /**\n * @notice Swaps an exact amount of BNB for as many output tokens as possible,\n * along the route determined by the path. The first element of path must be WBNB,\n * the last is the output token, and any intermediate elements represent\n * intermediate pairs to trade through (if, for example, a direct pair does not exist).\n * @dev amountIn is passed through the msg.value of the transaction\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n )\n external\n payable\n virtual\n override\n nonReentrant\n ensure(deadline)\n ensurePath(path)\n returns (uint256[] memory amounts)\n {\n amounts = _swapExactBNBForTokens(amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of ETH for as many output tokens as possible,\n * along the route determined by the path. The first element of path must be WBNB,\n * the last is the output token, and any intermediate elements represent\n * intermediate pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev amountIn is passed through the msg.value of the transaction\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactBNBForTokensAtSupportingFee(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(to);\n _swapExactBNBForTokens(amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, to);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output ETH as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapExactTokensForBNB(amountIn, amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output ETH as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForBNBAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n uint256 balanceBefore = to.balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = to.balance;\n swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n }\n\n /**\n * @notice Swaps an as many amount of input tokens for as exact amount of tokens as output,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapTokensForExactTokens(amountOut, amountInMax, path, to);\n }\n\n /**\n * @notice Swaps an as ETH as input tokens for as exact amount of tokens as output,\n * along the route determined by the path. The first element of path is the input WBNB,\n * the last is the output as token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n )\n external\n payable\n virtual\n override\n nonReentrant\n ensure(deadline)\n ensurePath(path)\n returns (uint256[] memory amounts)\n {\n amounts = _swapBNBForExactTokens(amountOut, path, to);\n }\n\n /**\n * @notice Swaps an as many amount of input tokens for as exact amount of ETH as output,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output as ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapTokensForExactBNB(amountOut, amountInMax, path, to);\n }\n\n /**\n * @notice A public function to sweep accidental BEP-20 transfers to this contract. Tokens are sent to the address `to`, provided in input\n * @param token The address of the ERC-20 token to sweep\n * @param to Recipient of the output tokens.\n * @param sweepAmount The ampunt of the tokens to sweep\n * @custom:access Only Governance\n */\n function sweepToken(IERC20 token, address to, uint256 sweepAmount) external onlyOwner nonReentrant {\n if (to == address(0)) {\n revert ZeroAddress();\n }\n uint256 balance = token.balanceOf(address(this));\n if (sweepAmount > balance) {\n revert InsufficientBalance(sweepAmount, balance);\n }\n token.safeTransfer(to, sweepAmount);\n\n emit SweepToken(address(token), to, sweepAmount);\n }\n\n /**\n * @notice Supply token to a Venus market\n * @param path The addresses of the underlying token\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param swapAmount The amount of tokens supply to Venus Market.\n */\n function _supply(address path, address vTokenAddress, uint256 swapAmount) internal {\n TransferHelper.safeApprove(path, vTokenAddress, 0);\n TransferHelper.safeApprove(path, vTokenAddress, swapAmount);\n uint256 response = IVToken(vTokenAddress).mintBehalf(msg.sender, swapAmount);\n if (response != 0) {\n revert SupplyError(msg.sender, vTokenAddress, response);\n }\n }\n\n /**\n * @notice Repay a borrow from Venus market\n * @param path The addresses of the underlying token\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param swapAmount The amount of tokens repay to Venus Market.\n */\n function _repay(address path, address vTokenAddress, uint256 swapAmount) internal {\n TransferHelper.safeApprove(path, vTokenAddress, 0);\n TransferHelper.safeApprove(path, vTokenAddress, swapAmount);\n uint256 response = IVToken(vTokenAddress).repayBorrowBehalf(msg.sender, swapAmount);\n if (response != 0) {\n revert RepayError(msg.sender, vTokenAddress, response);\n }\n }\n\n /**\n * @notice Check if the balance of to minus the balanceBefore is greater or equal to the amountOutMin.\n * @param asset The address of the underlying token\n * @param balanceBefore Balance before the swap.\n * @param amountOutMin Min amount out threshold.\n * @param to Recipient of the output tokens.\n */\n function _checkForAmountOut(\n address asset,\n uint256 balanceBefore,\n uint256 amountOutMin,\n address to\n ) internal view returns (uint256 swapAmount) {\n uint256 balanceAfter = IERC20(asset).balanceOf(to);\n swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n }\n\n /**\n * @notice Returns the difference between the balance of this and the balanceBefore\n * @param asset The address of the underlying token\n * @param balanceBefore Balance before the swap.\n */\n function _getSwapAmount(address asset, uint256 balanceBefore) internal view returns (uint256 swapAmount) {\n uint256 balanceAfter = IERC20(asset).balanceOf(address(this));\n swapAmount = balanceAfter - balanceBefore;\n }\n\n /**\n * @notice Check isVTokenListed and last address in the path should be vToken underlying.\n * @param vTokenAddress Address of the vToken.\n * @param underlying Address of the underlying asset.\n */\n function _ensureVTokenChecks(address vTokenAddress, address underlying) internal {\n _isVTokenListed(vTokenAddress);\n if (IVToken(vTokenAddress).underlying() != underlying) {\n revert VTokenUnderlyingInvalid(underlying);\n }\n }\n\n /**\n * @notice Check is vToken listed in the pool.\n * @param vToken Address of the vToken.\n */\n function _isVTokenListed(address vToken) internal view {\n bool isListed = InterfaceComptroller(comptrollerAddress).markets(vToken);\n if (!isListed) {\n revert VTokenNotListed(vToken);\n }\n }\n\n /**\n * @notice Mint vBNB tokens to the market then transfer them to user\n * @param swapAmount Swapped BNB amount\n */\n function _mintVBNBandTransfer(uint256 swapAmount) internal {\n uint256 vBNBBalanceBefore = IVBNB(vBNBAddress).balanceOf(address(this));\n IVBNB(vBNBAddress).mint{ value: swapAmount }();\n uint256 vBNBBalanceAfter = IVBNB(vBNBAddress).balanceOf(address(this));\n IERC20(vBNBAddress).safeTransfer(msg.sender, (vBNBBalanceAfter - vBNBBalanceBefore));\n }\n}\n" + }, + "contracts/test/AccessControlManagerMock.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\ncontract AccessControlManagerMock {\n address public owner;\n\n constructor(address _owner) {\n owner = _owner;\n }\n\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\n if (account == owner) {\n return true;\n }\n\n functionSig;\n\n return false;\n }\n}\n" + }, + "contracts/test/LiquidatorHarness.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Liquidator/Liquidator.sol\";\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\n\ncontract LiquidatorHarness is Liquidator {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address payable vBnb_, address wBnb_) Liquidator(comptroller_, vBnb_, wBnb_) {}\n\n function initialize(\n uint256 liquidationIncentiveMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) external override initializer {\n __Liquidator_init(liquidationIncentiveMantissa_, accessControlManager_, protocolShareReserve_);\n }\n\n event DistributeLiquidationIncentive(uint256 seizeTokensForTreasury, uint256 seizeTokensForLiquidator);\n\n /// @dev Splits the received vTokens between the liquidator and treasury.\n function distributeLiquidationIncentive(\n IVToken vTokenCollateral,\n uint256 siezedAmount\n ) public returns (uint256 ours, uint256 theirs) {\n (ours, theirs) = super._distributeLiquidationIncentive(vTokenCollateral, siezedAmount);\n emit DistributeLiquidationIncentive(ours, theirs);\n return (ours, theirs);\n }\n\n /// @dev Computes the amounts that would go to treasury and to the liquidator.\n function splitLiquidationIncentive(uint256 seizedAmount) public view returns (uint256 ours, uint256 theirs) {\n return super._splitLiquidationIncentive(seizedAmount);\n }\n}\n" + }, + "contracts/test/MockProtocolShareReserve.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\ninterface IIncomeDestination {\n function updateAssetsState(address comptroller, address asset) external;\n}\n\ninterface IVToken {\n function underlying() external view returns (address);\n}\n\ninterface IPrime is IIncomeDestination {\n function accrueInterest(address vToken) external;\n\n function vTokenForAsset(address asset) external view returns (address);\n\n function getAllMarkets() external view returns (address[] memory);\n}\n\ninterface IPoolRegistry {\n /// @notice Get VToken in the Pool for an Asset\n function getVTokenForAsset(address comptroller, address asset) external view returns (address);\n\n /// @notice Get the addresss of the Pools supported that include a market for the provided asset\n function getPoolsSupportedByAsset(address asset) external view returns (address[] memory);\n}\n\ninterface IMockProtocolShareReserve {\n /// @notice it represents the type of vToken income\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ninterface IComptroller {\n function isComptroller() external view returns (bool);\n\n function markets(address) external view returns (bool);\n\n function getAllMarkets() external view returns (address[] memory);\n}\n\nerror InvalidAddress();\nerror UnsupportedAsset();\nerror InvalidTotalPercentage();\nerror InvalidMaxLoopsLimit();\n\n/**\n * @title MaxLoopsLimitHelper\n * @author Venus\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\n */\nabstract contract MaxLoopsLimitHelper {\n // Limit for the loops to avoid the DOS\n uint256 public maxLoopsLimit;\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 max loops limit is set\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\n\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param limit Limit for the max loops can execute at a time\n */\n function _setMaxLoopsLimit(uint256 limit) internal {\n require(limit > maxLoopsLimit, \"Comptroller: Invalid maxLoopsLimit\");\n\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\n maxLoopsLimit = limit;\n\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\n }\n\n /**\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\n * @param len Length of the loops iterate\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\n */\n function _ensureMaxLoops(uint256 len) internal view {\n if (len > maxLoopsLimit) {\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\n }\n }\n}\n\ncontract MockProtocolShareReserve is\n AccessControlledV8,\n ReentrancyGuardUpgradeable,\n MaxLoopsLimitHelper,\n IMockProtocolShareReserve\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice protocol income is categorized into two schemas.\n /// The first schema is the default one\n /// The second schema is for spread income from prime markets in core protocol\n enum Schema {\n DEFAULT,\n SPREAD_PRIME_CORE\n }\n\n struct DistributionConfig {\n Schema schema;\n /// @dev percenatge is represented without any scale\n uint256 percentage;\n address destination;\n }\n\n /// @notice address of core pool comptroller contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable CORE_POOL_COMPTROLLER;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WBNB;\n\n /// @notice address of vBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable vBNB;\n\n /// @notice address of Prime contract\n address public prime;\n\n /// @notice address of pool registry contract\n address public poolRegistry;\n\n uint256 private constant MAX_PERCENT = 100;\n\n /// @notice comptroller => asset => schema => balance\n mapping(address => mapping(address => mapping(Schema => uint256))) public assetsReserves;\n\n /// @notice asset => balance\n mapping(address => uint256) public totalAssetReserve;\n\n /// @notice configuration for different income distribution targets\n DistributionConfig[] public distributionTargets;\n\n /// @notice Emitted when pool registry address is updated\n event PoolRegistryUpdated(address indexed oldPoolRegistry, address indexed newPoolRegistry);\n\n /// @notice Emitted when prime address is updated\n event PrimeUpdated(address indexed oldPrime, address indexed newPrime);\n\n /// @notice Event emitted after the updation of the assets reserves.\n event AssetsReservesUpdated(\n address indexed comptroller,\n address indexed asset,\n uint256 amount,\n IncomeType incomeType,\n Schema schema\n );\n\n /// @notice Event emitted when an asset is released to a target\n event AssetReleased(\n address indexed destination,\n address indexed asset,\n Schema schema,\n uint256 percent,\n uint256 amount\n );\n\n /// @notice Event emitted when asset reserves state is updated\n event ReservesUpdated(\n address indexed comptroller,\n address indexed asset,\n Schema schema,\n uint256 oldBalance,\n uint256 newBalance\n );\n\n /// @notice Event emitted when distribution configuration is updated\n event DistributionConfigUpdated(\n address indexed destination,\n uint256 oldPercentage,\n uint256 newPercentage,\n Schema schema\n );\n\n /// @notice Event emitted when distribution configuration is added\n event DistributionConfigAdded(address indexed destination, uint256 percentage, Schema schema);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address _corePoolComptroller, address _wbnb, address _vbnb) {\n if (_corePoolComptroller == address(0)) revert InvalidAddress();\n if (_wbnb == address(0)) revert InvalidAddress();\n if (_vbnb == address(0)) revert InvalidAddress();\n\n CORE_POOL_COMPTROLLER = _corePoolComptroller;\n WBNB = _wbnb;\n vBNB = _vbnb;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the deployer to owner.\n * @param _accessControlManager The address of ACM contract\n * @param _loopsLimit Limit for the loops in the contract to avoid DOS\n */\n function initialize(address _accessControlManager, uint256 _loopsLimit) external initializer {\n __AccessControlled_init(_accessControlManager);\n __ReentrancyGuard_init();\n _setMaxLoopsLimit(_loopsLimit);\n }\n\n /**\n * @dev Pool registry setter.\n * @param _poolRegistry Address of the pool registry\n * @custom:error ZeroAddressNotAllowed is thrown when pool registry address is zero\n */\n function setPoolRegistry(address _poolRegistry) external onlyOwner {\n if (_poolRegistry == address(0)) revert InvalidAddress();\n emit PoolRegistryUpdated(poolRegistry, _poolRegistry);\n poolRegistry = _poolRegistry;\n }\n\n /**\n * @dev Prime contract address setter.\n * @param _prime Address of the prime contract\n */\n function setPrime(address _prime) external onlyOwner {\n if (_prime == address(0)) revert InvalidAddress();\n emit PrimeUpdated(prime, _prime);\n prime = _prime;\n }\n\n /**\n * @dev Add or update destination targets based on destination address\n * @param configs configurations of the destinations.\n */\n function addOrUpdateDistributionConfigs(DistributionConfig[] memory configs) external nonReentrant {\n _checkAccessAllowed(\"addOrUpdateDistributionConfigs(DistributionConfig[])\");\n\n //we need to accrue and release funds to prime before updating the distribution configuration\n //because prime relies on getUnreleasedFunds and its return value may change after config update\n _accrueAndReleaseFundsToPrime();\n for (uint256 i = 0; i < configs.length; ) {\n DistributionConfig memory _config = configs[i];\n require(_config.destination != address(0), \"ProtocolShareReserve: Destination address invalid\");\n\n bool updated = false;\n for (uint256 j = 0; j < distributionTargets.length; ) {\n DistributionConfig storage config = distributionTargets[j];\n\n if (_config.schema == config.schema && config.destination == _config.destination) {\n emit DistributionConfigUpdated(\n _config.destination,\n config.percentage,\n _config.percentage,\n _config.schema\n );\n config.percentage = _config.percentage;\n updated = true;\n break;\n }\n\n unchecked {\n ++j;\n }\n }\n\n if (!updated) {\n distributionTargets.push(_config);\n emit DistributionConfigAdded(_config.destination, _config.percentage, _config.schema);\n }\n\n unchecked {\n ++i;\n }\n }\n\n _ensurePercentages();\n _ensureMaxLoops(distributionTargets.length);\n }\n\n /**\n * @dev Release funds\n * @param comptroller the comptroller address of the pool\n * @param assets assets to be released to distribution targets\n */\n function releaseFunds(address comptroller, address[] memory assets) external nonReentrant {\n _accruePrimeInterest();\n\n for (uint256 i = 0; i < assets.length; ) {\n _releaseFund(comptroller, assets[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Used to find out the amount of funds that's going to be released when release funds is called.\n * @param comptroller the comptroller address of the pool\n * @param schema the schema of the distribution target\n * @param destination the destination address of the distribution target\n * @param asset the asset address which will be released\n */\n function getUnreleasedFunds(\n address comptroller,\n Schema schema,\n address destination,\n address asset\n ) external view returns (uint256) {\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig storage _config = distributionTargets[i];\n if (_config.schema == schema && _config.destination == destination) {\n uint256 total = assetsReserves[comptroller][asset][schema];\n return (total * _config.percentage) / MAX_PERCENT;\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Returns the total number of distribution targets\n */\n function totalDistributions() external view returns (uint256) {\n return distributionTargets.length;\n }\n\n /**\n * @dev Update the reserve of the asset for the specific pool after transferring to the protocol share reserve.\n * @param comptroller Comptroller address (pool)\n * @param asset Asset address.\n * @param incomeType type of income\n */\n function updateAssetsState(\n address comptroller,\n address asset,\n IncomeType incomeType\n ) public override(IMockProtocolShareReserve) nonReentrant {\n if (!IComptroller(comptroller).isComptroller()) revert InvalidAddress();\n if (asset == address(0)) revert InvalidAddress();\n if (\n comptroller != CORE_POOL_COMPTROLLER &&\n IPoolRegistry(poolRegistry).getVTokenForAsset(comptroller, asset) == address(0)\n ) revert InvalidAddress();\n\n Schema schema = getSchema(comptroller, asset, incomeType);\n uint256 currentBalance = IERC20Upgradeable(asset).balanceOf(address(this));\n uint256 assetReserve = totalAssetReserve[asset];\n\n if (currentBalance > assetReserve) {\n uint256 balanceDifference;\n unchecked {\n balanceDifference = currentBalance - assetReserve;\n }\n\n assetsReserves[comptroller][asset][schema] += balanceDifference;\n totalAssetReserve[asset] += balanceDifference;\n emit AssetsReservesUpdated(comptroller, asset, balanceDifference, incomeType, schema);\n }\n }\n\n /**\n * @dev Fetches the list of prime markets and then accrues interest and\n * releases the funds to prime for each market\n */\n function _accrueAndReleaseFundsToPrime() internal {\n address[] memory markets = IPrime(prime).getAllMarkets();\n for (uint256 i = 0; i < markets.length; ) {\n address market = markets[i];\n IPrime(prime).accrueInterest(market);\n _releaseFund(CORE_POOL_COMPTROLLER, _getUnderlying(market));\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Fetches the list of prime markets and then accrues interest\n * to prime for each market\n */\n function _accruePrimeInterest() internal {\n // address[] memory markets = IPrime(prime).getAllMarkets();\n address[] memory markets = IPrime(prime).getAllMarkets();\n\n for (uint256 i = 0; i < markets.length; ) {\n address market = markets[i];\n IPrime(prime).accrueInterest(market);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev asset from a particular pool to be release to distribution targets\n * @param comptroller Comptroller address(pool)\n * @param asset Asset address.\n */\n function _releaseFund(address comptroller, address asset) internal {\n uint256 totalSchemas = uint256(type(Schema).max) + 1;\n uint256[] memory schemaBalances = new uint256[](totalSchemas);\n uint256 totalBalance;\n for (uint256 schemaValue; schemaValue < totalSchemas; ) {\n schemaBalances[schemaValue] = assetsReserves[comptroller][asset][Schema(schemaValue)];\n totalBalance += schemaBalances[schemaValue];\n\n unchecked {\n ++schemaValue;\n }\n }\n\n if (totalBalance == 0) {\n return;\n }\n\n uint256[] memory totalTransferAmounts = new uint256[](totalSchemas);\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig memory _config = distributionTargets[i];\n\n uint256 transferAmount = (schemaBalances[uint256(_config.schema)] * _config.percentage) / MAX_PERCENT;\n totalTransferAmounts[uint256(_config.schema)] += transferAmount;\n\n IERC20Upgradeable(asset).safeTransfer(_config.destination, transferAmount);\n IIncomeDestination(_config.destination).updateAssetsState(comptroller, asset);\n\n emit AssetReleased(_config.destination, asset, _config.schema, _config.percentage, transferAmount);\n\n unchecked {\n ++i;\n }\n }\n\n uint256[] memory newSchemaBalances = new uint256[](totalSchemas);\n for (uint256 schemaValue = 0; schemaValue < totalSchemas; ) {\n newSchemaBalances[schemaValue] = schemaBalances[schemaValue] - totalTransferAmounts[schemaValue];\n assetsReserves[comptroller][asset][Schema(schemaValue)] = newSchemaBalances[schemaValue];\n totalAssetReserve[asset] = totalAssetReserve[asset] - totalTransferAmounts[schemaValue];\n\n emit ReservesUpdated(\n comptroller,\n asset,\n Schema(schemaValue),\n schemaBalances[schemaValue],\n newSchemaBalances[schemaValue]\n );\n\n unchecked {\n ++schemaValue;\n }\n }\n }\n\n /**\n * @dev Returns the schema based on comptroller, asset and income type\n * @param comptroller Comptroller address(pool)\n * @param asset Asset address.\n * @param incomeType type of income\n * @return schema schema for distribution\n */\n function getSchema(\n address comptroller,\n address asset,\n IncomeType incomeType\n ) internal view returns (Schema schema) {\n schema = Schema.DEFAULT;\n address vToken = IPrime(prime).vTokenForAsset(asset);\n if (vToken != address(0) && comptroller == CORE_POOL_COMPTROLLER && incomeType == IncomeType.SPREAD) {\n schema = Schema.SPREAD_PRIME_CORE;\n }\n }\n\n function _ensurePercentages() internal view {\n uint256 totalSchemas = uint256(type(Schema).max) + 1;\n uint256[] memory totalPercentages = new uint256[](totalSchemas);\n\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig memory config = distributionTargets[i];\n totalPercentages[uint256(config.schema)] += config.percentage;\n\n unchecked {\n ++i;\n }\n }\n for (uint256 schemaValue = 0; schemaValue < totalSchemas; ) {\n if (totalPercentages[schemaValue] != MAX_PERCENT && totalPercentages[schemaValue] != 0)\n revert InvalidTotalPercentage();\n\n unchecked {\n ++schemaValue;\n }\n }\n }\n\n /**\n * @dev Returns the underlying asset address for the vToken\n * @param vToken vToken address\n * @return asset address of asset\n */\n function _getUnderlying(address vToken) internal view returns (address) {\n if (vToken == vBNB) {\n return WBNB;\n } else {\n return IVToken(vToken).underlying();\n }\n }\n}\n" + }, + "contracts/test/MockToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "contracts/test/PrimeScenario.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Tokens/Prime/Prime.sol\";\n\ncontract PrimeScenario is Prime {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address _wbnb,\n address _vbnb,\n uint256 _blocksPerYear,\n uint256 _stakingPeriod,\n uint256 _minimumStakedXVS,\n uint256 _maximumXVSCap,\n bool _timeBased\n ) Prime(_wbnb, _vbnb, _blocksPerYear, _stakingPeriod, _minimumStakedXVS, _maximumXVSCap, _timeBased) {}\n\n function calculateScore(uint256 xvs, uint256 capital) external view returns (uint256) {\n return Scores._calculateScore(xvs, capital, alphaNumerator, alphaDenominator);\n }\n\n function setPLP(address plp) external {\n primeLiquidityProvider = plp;\n }\n\n function mintForUser(address user) external {\n tokens[user] = Token(true, true);\n }\n\n function burnForUser(address user) external {\n tokens[user] = Token(false, false);\n }\n}\n" + }, + "contracts/test/WBNB.sol": { + "content": "// /**\n// *Submitted for verification at BscScan.com on 2020-09-03\n// */\n\n// /**\n// *Submitted for verification at Bscscan.com on 2020-09-03\n// */\n\n// pragma solidity ^0.5.16;\n\n// contract WBNB {\n// string public name = \"Wrapped BNB\";\n// string public symbol = \"WBNB\";\n// uint8 public decimals = 18;\n\n// event Approval(address indexed src, address indexed guy, uint wad);\n// event Transfer(address indexed src, address indexed dst, uint wad);\n// event Deposit(address indexed dst, uint wad);\n// event Withdrawal(address indexed src, uint wad);\n\n// mapping(address => uint) public balanceOf;\n// mapping(address => mapping(address => uint)) public allowance;\n\n// function() external payable {\n// deposit();\n// }\n\n// function deposit() public payable {\n// balanceOf[msg.sender] += msg.value;\n// emit Deposit(msg.sender, msg.value);\n// }\n\n// function withdraw(uint wad) public {\n// require(balanceOf[msg.sender] >= wad);\n// balanceOf[msg.sender] -= wad;\n// msg.sender.transfer(wad);\n// emit Withdrawal(msg.sender, wad);\n// }\n\n// function approve(address guy, uint wad) public returns (bool) {\n// allowance[msg.sender][guy] = wad;\n// emit Approval(msg.sender, guy, wad);\n// return true;\n// }\n\n// function transfer(address dst, uint wad) public returns (bool) {\n// return transferFrom(msg.sender, dst, wad);\n// }\n\n// function transferFrom(address src, address dst, uint wad) public returns (bool) {\n// require(balanceOf[src] >= wad);\n\n// if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {\n// require(allowance[src][msg.sender] >= wad);\n// allowance[src][msg.sender] -= wad;\n// }\n\n// balanceOf[src] -= wad;\n// balanceOf[dst] += wad;\n\n// emit Transfer(src, dst, wad);\n\n// return true;\n// }\n\n// function setBalanceOf(address sender, uint256 balance) public {\n// balanceOf[sender] += balance;\n// emit Deposit(sender, balance);\n// }\n// }\n" + }, + "contracts/Tokens/Prime/Interfaces/InterfaceComptroller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface InterfaceComptroller {\n function markets(address) external view returns (bool);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPoolRegistry.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title PoolRegistryInterface\n * @author Venus\n * @notice Interface implemented by `PoolRegistry`.\n */\ninterface PoolRegistryInterface {\n /**\n * @notice Struct for a Venus interest rate pool.\n */\n struct VenusPool {\n string name;\n address creator;\n address comptroller;\n uint256 blockPosted;\n uint256 timestampPosted;\n }\n\n /// @notice Get a pool by comptroller address\n function getPoolByComptroller(address comptroller) external view returns (VenusPool memory);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { PrimeStorageV1 } from \"../PrimeStorage.sol\";\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n struct APRInfo {\n // supply APR of the user in BPS\n uint256 supplyAPR;\n // borrow APR of the user in BPS\n uint256 borrowAPR;\n // total score of the market\n uint256 totalScore;\n // score of the user\n uint256 userScore;\n // capped XVS balance of the user\n uint256 xvsBalanceForScore;\n // capital of the user\n uint256 capital;\n // capped supply of the user\n uint256 cappedSupply;\n // capped borrow of the user\n uint256 cappedBorrow;\n // capped supply of user in USD\n uint256 supplyCapUSD;\n // capped borrow of user in USD\n uint256 borrowCapUSD;\n }\n\n struct Capital {\n // capital of the user\n uint256 capital;\n // capped supply of the user\n uint256 cappedSupply;\n // capped borrow of the user\n uint256 cappedBorrow;\n // capped supply of user in USD\n uint256 supplyCapUSD;\n // capped borrow of user in USD\n uint256 borrowCapUSD;\n }\n\n /**\n * @notice Returns boosted pending interest accrued for a user for all markets\n * @param user the account for which to get the accrued interests\n * @return pendingRewards the number of underlying tokens accrued by the user for all markets\n */\n function getPendingRewards(address user) external returns (PrimeStorageV1.PendingReward[] memory pendingRewards);\n\n /**\n * @notice Update total score of multiple users and market\n * @param users accounts for which we need to update score\n */\n function updateScores(address[] memory users) external;\n\n /**\n * @notice Update value of alpha\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n */\n function updateAlpha(uint128 _alphaNumerator, uint128 _alphaDenominator) external;\n\n /**\n * @notice Update multipliers for a market\n * @param market address of the market vToken\n * @param supplyMultiplier new supply multiplier for the market, scaled by 1e18\n * @param borrowMultiplier new borrow multiplier for the market, scaled by 1e18\n */\n function updateMultipliers(address market, uint256 supplyMultiplier, uint256 borrowMultiplier) external;\n\n /**\n * @notice Add a market to prime program\n * @param comptroller address of the comptroller\n * @param market address of the market vToken\n * @param supplyMultiplier the multiplier for supply cap. It should be converted to 1e18\n * @param borrowMultiplier the multiplier for borrow cap. It should be converted to 1e18\n */\n function addMarket(\n address comptroller,\n address market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n ) external;\n\n /**\n * @notice Set limits for total tokens that can be minted\n * @param _irrevocableLimit total number of irrevocable tokens that can be minted\n * @param _revocableLimit total number of revocable tokens that can be minted\n */\n function setLimit(uint256 _irrevocableLimit, uint256 _revocableLimit) external;\n\n /**\n * @notice Directly issue prime tokens to users\n * @param isIrrevocable are the tokens being issued\n * @param users list of address to issue tokens to\n */\n function issue(bool isIrrevocable, address[] calldata users) external;\n\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice For claiming prime token when staking period is completed\n */\n function claim() external;\n\n /**\n * @notice For burning any prime token\n * @param user the account address for which the prime token will be burned\n */\n function burn(address user) external;\n\n /**\n * @notice To pause or unpause claiming of interest\n */\n function togglePause() external;\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken) external returns (uint256);\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @param user the user for which to claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken, address user) external returns (uint256);\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns boosted interest accrued for a user\n * @param vToken the market for which to fetch the accrued interest\n * @param user the account for which to get the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function getInterestAccrued(address vToken, address user) external returns (uint256);\n\n /**\n * @notice Retrieves an array of all available markets\n * @return an array of addresses representing all available markets\n */\n function getAllMarkets() external view returns (address[] memory);\n\n /**\n * @notice fetch the numbers of seconds remaining for staking period to complete\n * @param user the account address for which we are checking the remaining time\n * @return timeRemaining the number of seconds the user needs to wait to claim prime token\n */\n function claimTimeRemaining(address user) external view returns (uint256);\n\n /**\n * @notice Returns supply and borrow APR for user for a given market\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function calculateAPR(address market, address user) external view returns (APRInfo memory aprInfo);\n\n /**\n * @notice Returns supply and borrow APR for estimated supply, borrow and XVS staked\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @param borrow hypothetical borrow amount\n * @param supply hypothetical supply amount\n * @param xvsStaked hypothetical staked XVS amount\n * @return aprInfo APR information for the user for the given market\n */\n function estimateAPR(\n address market,\n address user,\n uint256 borrow,\n uint256 supply,\n uint256 xvsStaked\n ) external view returns (APRInfo memory aprInfo);\n\n /**\n * @notice the total income that's going to be distributed in a year to prime token holders\n * @param vToken the market for which to fetch the total income that's going to distributed in a year\n * @return amount the total income\n */\n function incomeDistributionYearly(address vToken) external view returns (uint256 amount);\n\n /**\n * @notice Returns if user is a prime holder\n * @return isPrimeHolder true if user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Number of loops limit\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external;\n\n /**\n * @notice Update staked at timestamp for multiple users\n * @param users accounts for which we need to update staked at timestamp\n * @param timestamps new staked at timestamp for the users\n */\n function setStakedAt(address[] calldata users, uint256[] calldata timestamps) external;\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPrimeLiquidityProvider.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\n/**\n * @title IPrimeLiquidityProvider\n * @author Venus\n * @notice Interface for PrimeLiquidityProvider\n */\ninterface IPrimeLiquidityProvider {\n /**\n * @notice Initialize the distribution of the token\n * @param tokens_ Array of addresses of the tokens to be intialized\n */\n function initializeTokens(address[] calldata tokens_) external;\n\n /**\n * @notice Pause fund transfer of tokens to Prime contract\n */\n function pauseFundsTransfer() external;\n\n /**\n * @notice Resume fund transfer of tokens to Prime contract\n */\n function resumeFundsTransfer() external;\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n */\n function setTokensDistributionSpeed(address[] calldata tokens_, uint256[] calldata distributionSpeeds_) external;\n\n /**\n * @notice Set max distribution speed for token (amount of maximum token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param maxDistributionSpeeds_ New distribution speeds for tokens\n */\n function setMaxTokensDistributionSpeed(\n address[] calldata tokens_,\n uint256[] calldata maxDistributionSpeeds_\n ) external;\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external;\n\n /**\n * @notice Claim all the token accrued till last block or second\n * @param token_ The token to release to the Prime contract\n */\n function releaseFunds(address token_) external;\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n */\n function sweepToken(IERC20Upgradeable token_, address to_, uint256 amount_) external;\n\n /**\n * @notice Accrue token by updating the distribution state\n * @param token_ Address of the token\n */\n function accrueTokens(address token_) external;\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Limit for the max loops can execute at a time\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external;\n\n /**\n * @notice Get rewards per block or second for token\n * @param token_ Address of the token\n * @return speed returns the per block or second reward\n */\n function getEffectiveDistributionSpeed(address token_) external view returns (uint256);\n\n /**\n * @notice Get the amount of tokens accrued\n * @param token_ Address of the token\n * @return Amount of tokens that are accrued\n */\n function tokenAmountAccrued(address token_) external view returns (uint256);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IVToken.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IVToken {\n function borrowBalanceStored(address account) external view returns (uint256);\n\n function exchangeRateStored() external view returns (uint256);\n\n function balanceOf(address account) external view returns (uint256);\n\n function underlying() external view returns (address);\n\n function totalBorrows() external view returns (uint256);\n\n function borrowRatePerBlock() external view returns (uint256);\n\n function reserveFactorMantissa() external view returns (uint256);\n\n function decimals() external view returns (uint8);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IXVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IXVSVault {\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals);\n\n function xvsAddress() external view returns (address);\n}\n" + }, + "contracts/Tokens/Prime/libs/FixedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable var-name-mixedcase\n\npragma solidity 0.8.25;\n\nimport { SafeCastUpgradeable } from \"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\";\nimport { FixedMath0x } from \"./FixedMath0x.sol\";\n\nusing SafeCastUpgradeable for uint256;\n\nerror InvalidFixedPoint();\n\n/**\n * @title FixedMath\n * @author Venus\n * @notice FixedMath library is used for complex mathematical operations\n */\nlibrary FixedMath {\n error InvalidFraction(uint256 n, uint256 d);\n\n /**\n * @notice Convert some uint256 fraction `n` numerator / `d` denominator to a fixed-point number `f`.\n * @param n numerator\n * @param d denominator\n * @return fixed-point number\n */\n function _toFixed(uint256 n, uint256 d) internal pure returns (int256) {\n if (d.toInt256() < n.toInt256()) revert InvalidFraction(n, d);\n\n return (n.toInt256() * FixedMath0x.FIXED_1) / int256(d.toInt256());\n }\n\n /**\n * @notice Divide some unsigned int `u` by a fixed point number `f`\n * @param u unsigned dividend\n * @param f fixed point divisor, in FIXED_1 units\n * @return unsigned int quotient\n */\n function _uintDiv(uint256 u, int256 f) internal pure returns (uint256) {\n if (f < 0) revert InvalidFixedPoint();\n // multiply `u` by FIXED_1 to cancel out the built-in FIXED_1 in f\n return uint256((u.toInt256() * FixedMath0x.FIXED_1) / f);\n }\n\n /**\n * @notice Multiply some unsigned int `u` by a fixed point number `f`\n * @param u unsigned multiplicand\n * @param f fixed point multiplier, in FIXED_1 units\n * @return unsigned int product\n */\n function _uintMul(uint256 u, int256 f) internal pure returns (uint256) {\n if (f < 0) revert InvalidFixedPoint();\n // divide the product by FIXED_1 to cancel out the built-in FIXED_1 in f\n return uint256((u.toInt256() * f) / FixedMath0x.FIXED_1);\n }\n\n /// @notice see FixedMath0x\n function _ln(int256 x) internal pure returns (int256) {\n return FixedMath0x._ln(x);\n }\n\n /// @notice see FixedMath0x\n function _exp(int256 x) internal pure returns (int256) {\n return FixedMath0x._exp(x);\n }\n}\n" + }, + "contracts/Tokens/Prime/libs/FixedMath0x.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable max-line-length\n\npragma solidity 0.8.25;\n\n// Below is code from 0x's LibFixedMath.sol. Changes:\n// - addition of 0.8-style errors\n// - removal of unused functions\n// - added comments for clarity\n// https://github.com/0xProject/exchange-v3/blob/aae46bef841bfd1cc31028f41793db4fe7197084/contracts/staking/contracts/src/libs/LibFixedMath.sol\n\n/*\n\n Copyright 2017 Bprotocol Foundation, 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n/// Thrown when the natural log function is given too large of an argument\nerror LnTooLarge(int256 x);\n/// Thrown when the natural log would have returned a number outside of ℝ\nerror LnNonRealResult(int256 x);\n/// Thrown when exp is given too large of an argument\nerror ExpTooLarge(int256 x);\n/// Thrown when an unsigned value is too large to be converted to a signed value\nerror UnsignedValueTooLarge(uint256 x);\n\n/**\n * @title FixedMath0x\n * @notice Signed, fixed-point, 127-bit precision math library\n */\nlibrary FixedMath0x {\n // Base for the fixed point numbers (this is our 1)\n int256 internal constant FIXED_1 = int256(0x0000000000000000000000000000000080000000000000000000000000000000);\n // Maximum ln argument (1)\n int256 private constant LN_MAX_VAL = FIXED_1;\n // Minimum ln argument. Notice this is related to EXP_MIN_VAL (e ^ -63.875)\n int256 private constant LN_MIN_VAL = int256(0x0000000000000000000000000000000000000000000000000000000733048c5a);\n // Maximum exp argument (0)\n int256 private constant EXP_MAX_VAL = 0;\n // Minimum exp argument. Notice this is related to LN_MIN_VAL (-63.875)\n int256 private constant EXP_MIN_VAL = -int256(0x0000000000000000000000000000001ff0000000000000000000000000000000);\n\n /// @dev Get the natural logarithm of a fixed-point number 0 < `x` <= LN_MAX_VAL\n function _ln(int256 x) internal pure returns (int256 r) {\n if (x > LN_MAX_VAL) {\n revert LnTooLarge(x);\n }\n if (x <= 0) {\n revert LnNonRealResult(x);\n }\n if (x == FIXED_1) {\n return 0;\n }\n if (x <= LN_MIN_VAL) {\n return EXP_MIN_VAL;\n }\n\n int256 y;\n int256 z;\n int256 w;\n\n // Rewrite the input as a quotient of negative natural exponents and a single residual q, such that 1 < q < 2\n // For example: log(0.3) = log(e^-1 * e^-0.25 * 1.0471028872385522)\n // = 1 - 0.25 - log(1 + 0.0471028872385522)\n // e ^ -32\n if (x <= int256(0x00000000000000000000000000000000000000000001c8464f76164760000000)) {\n r -= int256(0x0000000000000000000000000000001000000000000000000000000000000000); // - 32\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000000000001c8464f76164760000000); // / e ^ -32\n }\n // e ^ -16\n if (x <= int256(0x00000000000000000000000000000000000000f1aaddd7742e90000000000000)) {\n r -= int256(0x0000000000000000000000000000000800000000000000000000000000000000); // - 16\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000000f1aaddd7742e90000000000000); // / e ^ -16\n }\n // e ^ -8\n if (x <= int256(0x00000000000000000000000000000000000afe10820813d78000000000000000)) {\n r -= int256(0x0000000000000000000000000000000400000000000000000000000000000000); // - 8\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000afe10820813d78000000000000000); // / e ^ -8\n }\n // e ^ -4\n if (x <= int256(0x0000000000000000000000000000000002582ab704279ec00000000000000000)) {\n r -= int256(0x0000000000000000000000000000000200000000000000000000000000000000); // - 4\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000002582ab704279ec00000000000000000); // / e ^ -4\n }\n // e ^ -2\n if (x <= int256(0x000000000000000000000000000000001152aaa3bf81cc000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000100000000000000000000000000000000); // - 2\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000001152aaa3bf81cc000000000000000000); // / e ^ -2\n }\n // e ^ -1\n if (x <= int256(0x000000000000000000000000000000002f16ac6c59de70000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000080000000000000000000000000000000); // - 1\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000002f16ac6c59de70000000000000000000); // / e ^ -1\n }\n // e ^ -0.5\n if (x <= int256(0x000000000000000000000000000000004da2cbf1be5828000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000040000000000000000000000000000000); // - 0.5\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000004da2cbf1be5828000000000000000000); // / e ^ -0.5\n }\n // e ^ -0.25\n if (x <= int256(0x0000000000000000000000000000000063afbe7ab2082c000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000020000000000000000000000000000000); // - 0.25\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000063afbe7ab2082c000000000000000000); // / e ^ -0.25\n }\n // e ^ -0.125\n if (x <= int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d)) {\n r -= int256(0x0000000000000000000000000000000010000000000000000000000000000000); // - 0.125\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d); // / e ^ -0.125\n }\n // `x` is now our residual in the range of 1 <= x <= 2 (or close enough).\n\n // Add the taylor series for log(1 + z), where z = x - 1\n z = y = x - FIXED_1;\n w = (y * y) / FIXED_1;\n r += (z * (0x100000000000000000000000000000000 - y)) / 0x100000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^01 / 01 - y^02 / 02\n r += (z * (0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - y)) / 0x200000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^03 / 03 - y^04 / 04\n r += (z * (0x099999999999999999999999999999999 - y)) / 0x300000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^05 / 05 - y^06 / 06\n r += (z * (0x092492492492492492492492492492492 - y)) / 0x400000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^07 / 07 - y^08 / 08\n r += (z * (0x08e38e38e38e38e38e38e38e38e38e38e - y)) / 0x500000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^09 / 09 - y^10 / 10\n r += (z * (0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b - y)) / 0x600000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^11 / 11 - y^12 / 12\n r += (z * (0x089d89d89d89d89d89d89d89d89d89d89 - y)) / 0x700000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^13 / 13 - y^14 / 14\n r += (z * (0x088888888888888888888888888888888 - y)) / 0x800000000000000000000000000000000; // add y^15 / 15 - y^16 / 16\n }\n\n /// @dev Compute the natural exponent for a fixed-point number EXP_MIN_VAL <= `x` <= 1\n function _exp(int256 x) internal pure returns (int256 r) {\n if (x < EXP_MIN_VAL) {\n // Saturate to zero below EXP_MIN_VAL.\n return 0;\n }\n if (x == 0) {\n return FIXED_1;\n }\n if (x > EXP_MAX_VAL) {\n revert ExpTooLarge(x);\n }\n\n // Rewrite the input as a product of natural exponents and a\n // single residual q, where q is a number of small magnitude.\n // For example: e^-34.419 = e^(-32 - 2 - 0.25 - 0.125 - 0.044)\n // = e^-32 * e^-2 * e^-0.25 * e^-0.125 * e^-0.044\n // -> q = -0.044\n\n // Multiply with the taylor series for e^q\n int256 y;\n int256 z;\n // q = x % 0.125 (the residual)\n z = y = x % 0x0000000000000000000000000000000010000000000000000000000000000000;\n z = (z * y) / FIXED_1;\n r += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\n z = (z * y) / FIXED_1;\n r += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\n z = (z * y) / FIXED_1;\n r += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\n z = (z * y) / FIXED_1;\n r += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\n z = (z * y) / FIXED_1;\n r += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\n z = (z * y) / FIXED_1;\n r += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\n z = (z * y) / FIXED_1;\n r += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\n z = (z * y) / FIXED_1;\n r += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\n z = (z * y) / FIXED_1;\n r += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000000001c638; // add y^16 * (20! / 16!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000000000017c; // add y^18 * (20! / 18!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000000014; // add y^19 * (20! / 19!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000000001; // add y^20 * (20! / 20!)\n r = r / 0x21c3677c82b40000 + y + FIXED_1; // divide by 20! and then add y^1 / 1! + y^0 / 0!\n\n // Multiply with the non-residual terms.\n x = -x;\n // e ^ -32\n if ((x & int256(0x0000000000000000000000000000001000000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000000000f1aaddd7742e56d32fb9f99744)) /\n int256(0x0000000000000000000000000043cbaf42a000812488fc5c220ad7b97bf6e99e); // * e ^ -32\n }\n // e ^ -16\n if ((x & int256(0x0000000000000000000000000000000800000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000000afe10820813d65dfe6a33c07f738f)) /\n int256(0x000000000000000000000000000005d27a9f51c31b7c2f8038212a0574779991); // * e ^ -16\n }\n // e ^ -8\n if ((x & int256(0x0000000000000000000000000000000400000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000002582ab704279e8efd15e0265855c47a)) /\n int256(0x0000000000000000000000000000001b4c902e273a58678d6d3bfdb93db96d02); // * e ^ -8\n }\n // e ^ -4\n if ((x & int256(0x0000000000000000000000000000000200000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000001152aaa3bf81cb9fdb76eae12d029571)) /\n int256(0x00000000000000000000000000000003b1cc971a9bb5b9867477440d6d157750); // * e ^ -4\n }\n // e ^ -2\n if ((x & int256(0x0000000000000000000000000000000100000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000002f16ac6c59de6f8d5d6f63c1482a7c86)) /\n int256(0x000000000000000000000000000000015bf0a8b1457695355fb8ac404e7a79e3); // * e ^ -2\n }\n // e ^ -1\n if ((x & int256(0x0000000000000000000000000000000080000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000004da2cbf1be5827f9eb3ad1aa9866ebb3)) /\n int256(0x00000000000000000000000000000000d3094c70f034de4b96ff7d5b6f99fcd8); // * e ^ -1\n }\n // e ^ -0.5\n if ((x & int256(0x0000000000000000000000000000000040000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000063afbe7ab2082ba1a0ae5e4eb1b479dc)) /\n int256(0x00000000000000000000000000000000a45af1e1f40c333b3de1db4dd55f29a7); // * e ^ -0.5\n }\n // e ^ -0.25\n if ((x & int256(0x0000000000000000000000000000000020000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d)) /\n int256(0x00000000000000000000000000000000910b022db7ae67ce76b441c27035c6a1); // * e ^ -0.25\n }\n // e ^ -0.125\n if ((x & int256(0x0000000000000000000000000000000010000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000783eafef1c0a8f3978c7f81824d62ebf)) /\n int256(0x0000000000000000000000000000000088415abbe9a76bead8d00cf112e4d4a8); // * e ^ -0.125\n }\n }\n}\n" + }, + "contracts/Tokens/Prime/libs/Scores.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { SafeCastUpgradeable } from \"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\";\nimport { FixedMath } from \"./FixedMath.sol\";\n\nusing SafeCastUpgradeable for uint256;\n\n/**\n * @title Scores\n * @author Venus\n * @notice Scores library is used to calculate score of users\n */\nlibrary Scores {\n /**\n * @notice Calculate a membership score given some amount of `xvs` and `capital`, along\n * with some 𝝰 = `alphaNumerator` / `alphaDenominator`.\n * @param xvs amount of xvs (xvs, 1e18 decimal places)\n * @param capital amount of capital (1e18 decimal places)\n * @param alphaNumerator alpha param numerator\n * @param alphaDenominator alpha param denominator\n * @return membership score with 1e18 decimal places\n *\n * @dev 𝝰 must be in the range [0, 1]\n */\n function _calculateScore(\n uint256 xvs,\n uint256 capital,\n uint256 alphaNumerator,\n uint256 alphaDenominator\n ) internal pure returns (uint256) {\n // Score function is:\n // xvs^𝝰 * capital^(1-𝝰)\n // = capital * capital^(-𝝰) * xvs^𝝰\n // = capital * (xvs / capital)^𝝰\n // = capital * (e ^ (ln(xvs / capital))) ^ 𝝰\n // = capital * e ^ (𝝰 * ln(xvs / capital)) (1)\n // or\n // = capital / ( 1 / e ^ (𝝰 * ln(xvs / capital)))\n // = capital / (e ^ (𝝰 * ln(xvs / capital)) ^ -1)\n // = capital / e ^ (𝝰 * -1 * ln(xvs / capital))\n // = capital / e ^ (𝝰 * ln(capital / xvs)) (2)\n //\n // To avoid overflows, use (1) when xvs < capital and\n // use (2) when capital < xvs\n\n // If any side is 0, exit early\n if (xvs == 0 || capital == 0) return 0;\n\n // If both sides are equal, we have:\n // xvs^𝝰 * capital^(1-𝝰)\n // = xvs^𝝰 * xvs^(1-𝝰)\n // = xvs^(𝝰 + 1 - 𝝰) = xvs\n if (xvs == capital) return xvs;\n\n bool lessxvsThanCapital = xvs < capital;\n\n // (xvs / capital) or (capital / xvs), always in range (0, 1)\n int256 ratio = lessxvsThanCapital ? FixedMath._toFixed(xvs, capital) : FixedMath._toFixed(capital, xvs);\n\n // e ^ ( ln(ratio) * 𝝰 )\n int256 exponentiation = FixedMath._exp(\n (FixedMath._ln(ratio) * alphaNumerator.toInt256()) / alphaDenominator.toInt256()\n );\n\n if (lessxvsThanCapital) {\n // capital * e ^ (𝝰 * ln(xvs / capital))\n return FixedMath._uintMul(capital, exponentiation);\n }\n\n // capital / e ^ (𝝰 * ln(capital / xvs))\n return FixedMath._uintDiv(capital, exponentiation);\n }\n}\n" + }, + "contracts/Tokens/Prime/Prime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { PausableUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport { MaxLoopsLimitHelper } from \"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\";\nimport { TimeManagerV8 } from \"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\";\n\nimport { IERC20MetadataUpgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\n\nimport { PrimeStorageV1 } from \"./PrimeStorage.sol\";\nimport { Scores } from \"./libs/Scores.sol\";\n\nimport { IPrimeLiquidityProvider } from \"./Interfaces/IPrimeLiquidityProvider.sol\";\nimport { IPrime } from \"./Interfaces/IPrime.sol\";\nimport { IXVSVault } from \"./Interfaces/IXVSVault.sol\";\nimport { IVToken } from \"./Interfaces/IVToken.sol\";\nimport { InterfaceComptroller } from \"./Interfaces/InterfaceComptroller.sol\";\nimport { PoolRegistryInterface } from \"./Interfaces/IPoolRegistry.sol\";\n\n/**\n * @title Prime\n * @author Venus\n * @notice Prime Token is used to provide extra rewards to the users who have staked a minimum of `MINIMUM_STAKED_XVS` XVS in the XVSVault for `STAKING_PERIOD` days\n * @custom:security-contact https://github.com/VenusProtocol/venus-protocol\n */\ncontract Prime is IPrime, AccessControlledV8, PausableUpgradeable, MaxLoopsLimitHelper, PrimeStorageV1, TimeManagerV8 {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice address of wrapped native token contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WRAPPED_NATIVE_TOKEN;\n\n /// @notice address of native market contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable NATIVE_MARKET;\n\n /// @notice minimum amount of XVS user needs to stake to become a prime member\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable MINIMUM_STAKED_XVS;\n\n /// @notice maximum XVS taken in account when calculating user score\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable MAXIMUM_XVS_CAP;\n\n /// @notice number of days user need to stake to claim prime token\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable STAKING_PERIOD;\n\n /// @notice Emitted when prime token is minted\n event Mint(address indexed user, bool isIrrevocable);\n\n /// @notice Emitted when prime token is burned\n event Burn(address indexed user);\n\n /// @notice Emitted when a market is added to prime program\n event MarketAdded(\n address indexed comptroller,\n address indexed market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n );\n\n /// @notice Emitted when mint limits are updated\n event MintLimitsUpdated(\n uint256 indexed oldIrrevocableLimit,\n uint256 indexed oldRevocableLimit,\n uint256 indexed newIrrevocableLimit,\n uint256 newRevocableLimit\n );\n\n /// @notice Emitted when user score is updated\n event UserScoreUpdated(address indexed user);\n\n /// @notice Emitted when alpha is updated\n event AlphaUpdated(\n uint128 indexed oldNumerator,\n uint128 indexed oldDenominator,\n uint128 indexed newNumerator,\n uint128 newDenominator\n );\n\n /// @notice Emitted when multiplier is updated\n event MultiplierUpdated(\n address indexed market,\n uint256 indexed oldSupplyMultiplier,\n uint256 indexed oldBorrowMultiplier,\n uint256 newSupplyMultiplier,\n uint256 newBorrowMultiplier\n );\n\n /// @notice Emitted when interest is claimed\n event InterestClaimed(address indexed user, address indexed market, uint256 amount);\n\n /// @notice Emitted when revocable token is upgraded to irrevocable token\n event TokenUpgraded(address indexed user);\n\n /// @notice Emitted when stakedAt is updated\n event StakedAtUpdated(address indexed user, uint256 timestamp);\n\n /// @notice Error thrown when market is not supported\n error MarketNotSupported();\n\n /// @notice Error thrown when mint limit is reached\n error InvalidLimit();\n\n /// @notice Error thrown when user is not eligible to claim prime token\n error IneligibleToClaim();\n\n /// @notice Error thrown when user needs to wait more time to claim prime token\n error WaitMoreTime();\n\n /// @notice Error thrown when user has no prime token\n error UserHasNoPrimeToken();\n\n /// @notice Error thrown when no score updates are required\n error NoScoreUpdatesRequired();\n\n /// @notice Error thrown when market already exists\n error MarketAlreadyExists();\n\n /// @notice Error thrown when asset already exists\n error AssetAlreadyExists();\n\n /// @notice Error thrown when invalid address is passed\n error InvalidAddress();\n\n /// @notice Error thrown when invalid alpha arguments are passed\n error InvalidAlphaArguments();\n\n /// @notice Error thrown when invalid vToken is passed\n error InvalidVToken();\n\n /// @notice Error thrown when invalid length is passed\n error InvalidLength();\n\n /// @notice Error thrown when timestamp is invalid\n error InvalidTimestamp();\n\n /// @notice Error thrown when invalid comptroller is passed\n error InvalidComptroller();\n\n /**\n * @notice Prime constructor\n * @param _wrappedNativeToken Address of wrapped native token\n * @param _nativeMarket Address of native market\n * @param _blocksPerYear total blocks per year\n * @param _stakingPeriod total number of seconds for which user needs to stake to claim prime token\n * @param _minimumStakedXVS minimum amount of XVS user needs to stake to become a prime member (scaled by 1e18)\n * @param _maximumXVSCap maximum XVS taken in account when calculating user score (scaled by 1e18)\n * @param _timeBased A boolean indicating whether the contract is based on time or block.\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address _wrappedNativeToken,\n address _nativeMarket,\n uint256 _blocksPerYear,\n uint256 _stakingPeriod,\n uint256 _minimumStakedXVS,\n uint256 _maximumXVSCap,\n bool _timeBased\n ) TimeManagerV8(_timeBased, _blocksPerYear) {\n WRAPPED_NATIVE_TOKEN = _wrappedNativeToken;\n NATIVE_MARKET = _nativeMarket;\n STAKING_PERIOD = _stakingPeriod;\n MINIMUM_STAKED_XVS = _minimumStakedXVS;\n MAXIMUM_XVS_CAP = _maximumXVSCap;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /**\n * @notice Prime initializer\n * @param xvsVault_ Address of XVSVault\n * @param xvsVaultRewardToken_ Address of XVSVault reward token\n * @param xvsVaultPoolId_ Pool id of XVSVault\n * @param alphaNumerator_ numerator of alpha. If alpha is 0.5 then numerator is 1.\n alphaDenominator_ must be greater than alphaNumerator_, alphaDenominator_ cannot be zero and alphaNumerator_ cannot be zero\n * @param alphaDenominator_ denominator of alpha. If alpha is 0.5 then denominator is 2.\n alpha is alphaNumerator_/alphaDenominator_. So, 0 < alpha < 1\n * @param accessControlManager_ Address of AccessControlManager\n * @param primeLiquidityProvider_ Address of PrimeLiquidityProvider\n * @param comptroller_ Address of core pool comptroller\n * @param oracle_ Address of Oracle\n * @param loopsLimit_ Maximum number of loops allowed in a single transaction\n * @custom:error Throw InvalidAddress if any of the address is invalid\n */\n function initialize(\n address xvsVault_,\n address xvsVaultRewardToken_,\n uint256 xvsVaultPoolId_,\n uint128 alphaNumerator_,\n uint128 alphaDenominator_,\n address accessControlManager_,\n address primeLiquidityProvider_,\n address comptroller_,\n address oracle_,\n uint256 loopsLimit_\n ) external initializer {\n if (xvsVault_ == address(0)) revert InvalidAddress();\n if (xvsVaultRewardToken_ == address(0)) revert InvalidAddress();\n if (oracle_ == address(0)) revert InvalidAddress();\n if (primeLiquidityProvider_ == address(0)) revert InvalidAddress();\n\n _checkAlphaArguments(alphaNumerator_, alphaDenominator_);\n\n alphaNumerator = alphaNumerator_;\n alphaDenominator = alphaDenominator_;\n xvsVaultRewardToken = xvsVaultRewardToken_;\n xvsVaultPoolId = xvsVaultPoolId_;\n xvsVault = xvsVault_;\n nextScoreUpdateRoundId = 0;\n primeLiquidityProvider = primeLiquidityProvider_;\n corePoolComptroller = comptroller_;\n oracle = ResilientOracleInterface(oracle_);\n\n __AccessControlled_init(accessControlManager_);\n __Pausable_init();\n _setMaxLoopsLimit(loopsLimit_);\n\n _pause();\n }\n\n /**\n * @notice Prime initializer V2 for initializing pool registry\n * @param poolRegistry_ Address of IL pool registry\n */\n function initializeV2(address poolRegistry_) external reinitializer(2) {\n poolRegistry = poolRegistry_;\n }\n\n /**\n * @notice Returns boosted pending interest accrued for a user for all markets\n * @param user the account for which to get the accrued interests\n * @return pendingRewards the number of underlying tokens accrued by the user for all markets\n */\n function getPendingRewards(address user) external returns (PendingReward[] memory pendingRewards) {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n pendingRewards = new PendingReward[](marketsLength);\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n uint256 interestAccrued = getInterestAccrued(market, user);\n uint256 accrued = interests[market][user].accrued;\n\n pendingRewards[i] = PendingReward({\n vToken: market,\n rewardToken: _getUnderlying(market),\n amount: interestAccrued + accrued\n });\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Update total score of multiple users and market\n * @param users accounts for which we need to update score\n * @custom:error Throw NoScoreUpdatesRequired if no score updates are required\n * @custom:error Throw UserHasNoPrimeToken if user has no prime token\n * @custom:event Emits UserScoreUpdated event\n */\n function updateScores(address[] calldata users) external {\n if (pendingScoreUpdates == 0) revert NoScoreUpdatesRequired();\n if (nextScoreUpdateRoundId == 0) revert NoScoreUpdatesRequired();\n\n for (uint256 i; i < users.length; ) {\n address user = users[i];\n\n if (!tokens[user].exists) revert UserHasNoPrimeToken();\n if (isScoreUpdated[nextScoreUpdateRoundId][user]) {\n unchecked {\n ++i;\n }\n continue;\n }\n\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 j; j < marketsLength; ) {\n address market = allMarkets[j];\n _executeBoost(user, market);\n _updateScore(user, market);\n\n unchecked {\n ++j;\n }\n }\n\n --pendingScoreUpdates;\n isScoreUpdated[nextScoreUpdateRoundId][user] = true;\n\n unchecked {\n ++i;\n }\n\n emit UserScoreUpdated(user);\n }\n }\n\n /**\n * @notice Update value of alpha\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n * @custom:event Emits AlphaUpdated event\n * @custom:access Controlled by ACM\n */\n function updateAlpha(uint128 _alphaNumerator, uint128 _alphaDenominator) external {\n _checkAccessAllowed(\"updateAlpha(uint128,uint128)\");\n _checkAlphaArguments(_alphaNumerator, _alphaDenominator);\n\n emit AlphaUpdated(alphaNumerator, alphaDenominator, _alphaNumerator, _alphaDenominator);\n\n alphaNumerator = _alphaNumerator;\n alphaDenominator = _alphaDenominator;\n\n uint256 marketslength = _allMarkets.length;\n\n for (uint256 i; i < marketslength; ) {\n accrueInterest(_allMarkets[i]);\n\n unchecked {\n ++i;\n }\n }\n\n _startScoreUpdateRound();\n }\n\n /**\n * @notice Update multipliers for a market\n * @param market address of the market vToken\n * @param supplyMultiplier new supply multiplier for the market, scaled by 1e18\n * @param borrowMultiplier new borrow multiplier for the market, scaled by 1e18\n * @custom:error Throw MarketNotSupported if market is not supported\n * @custom:event Emits MultiplierUpdated event\n * @custom:access Controlled by ACM\n */\n function updateMultipliers(address market, uint256 supplyMultiplier, uint256 borrowMultiplier) external {\n _checkAccessAllowed(\"updateMultipliers(address,uint256,uint256)\");\n\n Market storage _market = markets[market];\n if (!_market.exists) revert MarketNotSupported();\n\n accrueInterest(market);\n\n emit MultiplierUpdated(\n market,\n _market.supplyMultiplier,\n _market.borrowMultiplier,\n supplyMultiplier,\n borrowMultiplier\n );\n _market.supplyMultiplier = supplyMultiplier;\n _market.borrowMultiplier = borrowMultiplier;\n\n _startScoreUpdateRound();\n }\n\n /**\n * @notice Update staked at timestamp for multiple users\n * @param users accounts for which we need to update staked at timestamp\n * @param timestamps new staked at timestamp for the users\n * @custom:error Throw InvalidLength if users and timestamps length are not equal\n * @custom:event Emits StakedAtUpdated event for each user\n * @custom:access Controlled by ACM\n */\n function setStakedAt(address[] calldata users, uint256[] calldata timestamps) external {\n _checkAccessAllowed(\"setStakedAt(address[],uint256[])\");\n if (users.length != timestamps.length) revert InvalidLength();\n\n for (uint256 i; i < users.length; ) {\n if (timestamps[i] > block.timestamp) revert InvalidTimestamp();\n\n stakedAt[users[i]] = timestamps[i];\n emit StakedAtUpdated(users[i], timestamps[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Add a market to prime program\n * @param comptroller address of the comptroller\n * @param market address of the market vToken\n * @param supplyMultiplier the multiplier for supply cap. It should be converted to 1e18\n * @param borrowMultiplier the multiplier for borrow cap. It should be converted to 1e18\n * @custom:error Throw MarketAlreadyExists if market already exists\n * @custom:error Throw InvalidVToken if market is not valid\n * @custom:event Emits MarketAdded event\n * @custom:access Controlled by ACM\n */\n function addMarket(\n address comptroller,\n address market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n ) external {\n _checkAccessAllowed(\"addMarket(address,address,uint256,uint256)\");\n\n if (comptroller == address(0)) revert InvalidComptroller();\n\n if (\n comptroller != corePoolComptroller &&\n PoolRegistryInterface(poolRegistry).getPoolByComptroller(comptroller).comptroller != comptroller\n ) revert InvalidComptroller();\n\n Market storage _market = markets[market];\n if (_market.exists) revert MarketAlreadyExists();\n\n bool isMarketExist = InterfaceComptroller(comptroller).markets(market);\n if (!isMarketExist) revert InvalidVToken();\n\n delete _market.rewardIndex;\n _market.supplyMultiplier = supplyMultiplier;\n _market.borrowMultiplier = borrowMultiplier;\n delete _market.sumOfMembersScore;\n _market.exists = true;\n\n address underlying = _getUnderlying(market);\n\n if (vTokenForAsset[underlying] != address(0)) revert AssetAlreadyExists();\n vTokenForAsset[underlying] = market;\n\n _allMarkets.push(market);\n _startScoreUpdateRound();\n\n _ensureMaxLoops(_allMarkets.length);\n\n emit MarketAdded(comptroller, market, supplyMultiplier, borrowMultiplier);\n }\n\n /**\n * @notice Set limits for total tokens that can be minted\n * @param _irrevocableLimit total number of irrevocable tokens that can be minted\n * @param _revocableLimit total number of revocable tokens that can be minted\n * @custom:error Throw InvalidLimit if any of the limit is less than total tokens minted\n * @custom:event Emits MintLimitsUpdated event\n * @custom:access Controlled by ACM\n */\n function setLimit(uint256 _irrevocableLimit, uint256 _revocableLimit) external {\n _checkAccessAllowed(\"setLimit(uint256,uint256)\");\n if (_irrevocableLimit < totalIrrevocable || _revocableLimit < totalRevocable) revert InvalidLimit();\n\n emit MintLimitsUpdated(irrevocableLimit, revocableLimit, _irrevocableLimit, _revocableLimit);\n\n revocableLimit = _revocableLimit;\n irrevocableLimit = _irrevocableLimit;\n }\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Number of loops limit\n * @custom:event Emits MaxLoopsLimitUpdated event on success\n * @custom:access Controlled by ACM\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external {\n _checkAccessAllowed(\"setMaxLoopsLimit(uint256)\");\n _setMaxLoopsLimit(loopsLimit);\n }\n\n /**\n * @notice Directly issue prime tokens to users\n * @param isIrrevocable are the tokens being issued\n * @param users list of address to issue tokens to\n * @custom:access Controlled by ACM\n */\n function issue(bool isIrrevocable, address[] calldata users) external {\n _checkAccessAllowed(\"issue(bool,address[])\");\n\n if (isIrrevocable) {\n for (uint256 i; i < users.length; ) {\n Token storage userToken = tokens[users[i]];\n if (userToken.exists && !userToken.isIrrevocable) {\n _upgrade(users[i]);\n } else {\n _mint(true, users[i]);\n _initializeMarkets(users[i]);\n }\n\n unchecked {\n ++i;\n }\n }\n } else {\n for (uint256 i; i < users.length; ) {\n _mint(false, users[i]);\n _initializeMarkets(users[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n }\n\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external {\n uint256 totalStaked = _xvsBalanceOfUser(user);\n bool isAccountEligible = _isEligible(totalStaked);\n\n uint256 userStakedAt = stakedAt[user];\n Token memory token = tokens[user];\n\n if (token.exists && !isAccountEligible) {\n delete stakedAt[user];\n emit StakedAtUpdated(user, 0);\n\n if (token.isIrrevocable) {\n _accrueInterestAndUpdateScore(user);\n } else {\n _burn(user);\n }\n } else if (!isAccountEligible && !token.exists && userStakedAt != 0) {\n delete stakedAt[user];\n emit StakedAtUpdated(user, 0);\n } else if (userStakedAt == 0 && isAccountEligible && !token.exists) {\n stakedAt[user] = block.timestamp;\n emit StakedAtUpdated(user, block.timestamp);\n } else if (token.exists && isAccountEligible) {\n _accrueInterestAndUpdateScore(user);\n\n if (stakedAt[user] == 0) {\n stakedAt[user] = block.timestamp;\n emit StakedAtUpdated(user, block.timestamp);\n }\n }\n }\n\n /**\n * @notice accrues interes and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external {\n _executeBoost(user, market);\n _updateScore(user, market);\n }\n\n /**\n * @notice For claiming prime token when staking period is completed\n */\n function claim() external {\n uint256 userStakedAt = stakedAt[msg.sender];\n if (userStakedAt == 0) revert IneligibleToClaim();\n if (block.timestamp - userStakedAt < STAKING_PERIOD) revert WaitMoreTime();\n\n _mint(false, msg.sender);\n _initializeMarkets(msg.sender);\n }\n\n /**\n * @notice For burning any prime token\n * @param user the account address for which the prime token will be burned\n * @custom:access Controlled by ACM\n */\n function burn(address user) external {\n _checkAccessAllowed(\"burn(address)\");\n _burn(user);\n }\n\n /**\n * @notice To pause or unpause claiming of interest\n * @custom:access Controlled by ACM\n */\n function togglePause() external {\n _checkAccessAllowed(\"togglePause()\");\n if (paused()) {\n _unpause();\n } else {\n _pause();\n }\n }\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @return amount the amount of tokens transferred to the msg.sender\n */\n function claimInterest(address vToken) external whenNotPaused returns (uint256) {\n return _claimInterest(vToken, msg.sender);\n }\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @param user the user for which to claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken, address user) external whenNotPaused returns (uint256) {\n return _claimInterest(vToken, user);\n }\n\n /**\n * @notice Retrieves an array of all available markets\n * @return an array of addresses representing all available markets\n */\n function getAllMarkets() external view returns (address[] memory) {\n return _allMarkets;\n }\n\n /**\n * @notice Retrieves the core pool comptroller address\n * @return the core pool comptroller address\n */\n function comptroller() external view returns (address) {\n return corePoolComptroller;\n }\n\n /**\n * @notice fetch the numbers of seconds remaining for staking period to complete\n * @param user the account address for which we are checking the remaining time\n * @return timeRemaining the number of seconds the user needs to wait to claim prime token\n */\n function claimTimeRemaining(address user) external view returns (uint256) {\n uint256 userStakedAt = stakedAt[user];\n if (userStakedAt == 0) return STAKING_PERIOD;\n\n uint256 totalTimeStaked;\n unchecked {\n totalTimeStaked = block.timestamp - userStakedAt;\n }\n\n if (totalTimeStaked < STAKING_PERIOD) {\n unchecked {\n return STAKING_PERIOD - totalTimeStaked;\n }\n }\n return 0;\n }\n\n /**\n * @notice Returns if user is a prime holder\n * @return isPrimeHolder true if user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool) {\n return tokens[user].exists;\n }\n\n /**\n * @notice Returns supply and borrow APR for user for a given market\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function calculateAPR(address market, address user) external view returns (APRInfo memory aprInfo) {\n IVToken vToken = IVToken(market);\n uint256 borrow = vToken.borrowBalanceStored(user);\n uint256 exchangeRate = vToken.exchangeRateStored();\n uint256 balanceOfAccount = vToken.balanceOf(user);\n uint256 supply = (exchangeRate * balanceOfAccount) / EXP_SCALE;\n\n aprInfo.userScore = interests[market][user].score;\n aprInfo.totalScore = markets[market].sumOfMembersScore;\n\n aprInfo.xvsBalanceForScore = _xvsBalanceForScore(_xvsBalanceOfUser(user));\n Capital memory capital = _capitalForScore(aprInfo.xvsBalanceForScore, borrow, supply, address(vToken));\n\n aprInfo.capital = capital.capital;\n aprInfo.cappedSupply = capital.cappedSupply;\n aprInfo.cappedBorrow = capital.cappedBorrow;\n aprInfo.supplyCapUSD = capital.supplyCapUSD;\n aprInfo.borrowCapUSD = capital.borrowCapUSD;\n\n (aprInfo.supplyAPR, aprInfo.borrowAPR) = _calculateUserAPR(\n market,\n supply,\n borrow,\n aprInfo.cappedSupply,\n aprInfo.cappedBorrow,\n aprInfo.userScore,\n aprInfo.totalScore\n );\n }\n\n /**\n * @notice Returns supply and borrow APR for estimated supply, borrow and XVS staked\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function estimateAPR(\n address market,\n address user,\n uint256 borrow,\n uint256 supply,\n uint256 xvsStaked\n ) external view returns (APRInfo memory aprInfo) {\n aprInfo.totalScore = markets[market].sumOfMembersScore - interests[market][user].score;\n\n aprInfo.xvsBalanceForScore = _xvsBalanceForScore(xvsStaked);\n Capital memory capital = _capitalForScore(aprInfo.xvsBalanceForScore, borrow, supply, market);\n\n aprInfo.capital = capital.capital;\n aprInfo.cappedSupply = capital.cappedSupply;\n aprInfo.cappedBorrow = capital.cappedBorrow;\n aprInfo.supplyCapUSD = capital.supplyCapUSD;\n aprInfo.borrowCapUSD = capital.borrowCapUSD;\n\n uint256 decimals = IERC20MetadataUpgradeable(_getUnderlying(market)).decimals();\n aprInfo.capital = aprInfo.capital * (10 ** (18 - decimals));\n\n aprInfo.userScore = Scores._calculateScore(\n aprInfo.xvsBalanceForScore,\n aprInfo.capital,\n alphaNumerator,\n alphaDenominator\n );\n\n aprInfo.totalScore = aprInfo.totalScore + aprInfo.userScore;\n\n (aprInfo.supplyAPR, aprInfo.borrowAPR) = _calculateUserAPR(\n market,\n supply,\n borrow,\n aprInfo.cappedSupply,\n aprInfo.cappedBorrow,\n aprInfo.userScore,\n aprInfo.totalScore\n );\n }\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n * @custom:error Throw MarketNotSupported if market is not supported\n */\n function accrueInterest(address vToken) public {\n Market storage market = markets[vToken];\n\n if (!market.exists) revert MarketNotSupported();\n\n address underlying = _getUnderlying(vToken);\n\n IPrimeLiquidityProvider _primeLiquidityProvider = IPrimeLiquidityProvider(primeLiquidityProvider);\n _primeLiquidityProvider.accrueTokens(underlying);\n uint256 totalAccruedInPLP = _primeLiquidityProvider.tokenAmountAccrued(underlying);\n uint256 unreleasedPLPAccruedInterest = totalAccruedInPLP - unreleasedPLPIncome[underlying];\n uint256 distributionIncome = unreleasedPLPAccruedInterest;\n\n if (distributionIncome == 0) {\n return;\n }\n\n unreleasedPLPIncome[underlying] = totalAccruedInPLP;\n\n uint256 delta;\n if (market.sumOfMembersScore != 0) {\n delta = ((distributionIncome * EXP_SCALE) / market.sumOfMembersScore);\n }\n\n market.rewardIndex += delta;\n }\n\n /**\n * @notice Returns boosted interest accrued for a user\n * @param vToken the market for which to fetch the accrued interest\n * @param user the account for which to get the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function getInterestAccrued(address vToken, address user) public returns (uint256) {\n accrueInterest(vToken);\n\n return _interestAccrued(vToken, user);\n }\n\n /**\n * @notice accrues interest and updates score of all markets for an user\n * @param user the account address for which to accrue interest and update score\n */\n function _accrueInterestAndUpdateScore(address user) internal {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n _executeBoost(user, market);\n _updateScore(user, market);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Initializes all the markets for the user when a prime token is minted\n * @param account the account address for which markets needs to be initialized\n */\n function _initializeMarkets(address account) internal {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n accrueInterest(market);\n\n interests[market][account].rewardIndex = markets[market].rewardIndex;\n\n uint256 score = _calculateScore(market, account);\n interests[market][account].score = score;\n markets[market].sumOfMembersScore = markets[market].sumOfMembersScore + score;\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice calculate the current score of user\n * @param market the market for which to calculate the score\n * @param user the account for which to calculate the score\n * @return score the score of the user\n */\n function _calculateScore(address market, address user) internal returns (uint256) {\n uint256 xvsBalanceForScore = _xvsBalanceForScore(_xvsBalanceOfUser(user));\n\n IVToken vToken = IVToken(market);\n uint256 borrow = vToken.borrowBalanceStored(user);\n uint256 exchangeRate = vToken.exchangeRateStored();\n uint256 balanceOfAccount = vToken.balanceOf(user);\n uint256 supply = (exchangeRate * balanceOfAccount) / EXP_SCALE;\n\n address xvsToken = IXVSVault(xvsVault).xvsAddress();\n oracle.updateAssetPrice(xvsToken);\n oracle.updatePrice(market);\n\n Capital memory capital = _capitalForScore(xvsBalanceForScore, borrow, supply, market);\n\n uint256 decimals = IERC20MetadataUpgradeable(_getUnderlying(market)).decimals();\n\n capital.capital = capital.capital * (10 ** (18 - decimals));\n\n return Scores._calculateScore(xvsBalanceForScore, capital.capital, alphaNumerator, alphaDenominator);\n }\n\n /**\n * @notice To transfer the accrued interest to user\n * @param vToken the market for which to claim\n * @param user the account for which to get the accrued interest\n * @return amount the amount of tokens transferred to the user\n * @custom:event Emits InterestClaimed event\n */\n function _claimInterest(address vToken, address user) internal returns (uint256) {\n uint256 amount = getInterestAccrued(vToken, user);\n amount += interests[vToken][user].accrued;\n\n interests[vToken][user].rewardIndex = markets[vToken].rewardIndex;\n delete interests[vToken][user].accrued;\n\n address underlying = _getUnderlying(vToken);\n IERC20Upgradeable asset = IERC20Upgradeable(underlying);\n\n if (amount > asset.balanceOf(address(this))) {\n delete unreleasedPLPIncome[underlying];\n IPrimeLiquidityProvider(primeLiquidityProvider).releaseFunds(address(asset));\n }\n\n asset.safeTransfer(user, amount);\n\n emit InterestClaimed(user, vToken, amount);\n\n return amount;\n }\n\n /**\n * @notice Used to mint a new prime token\n * @param isIrrevocable is the tokens being issued is irrevocable\n * @param user token owner\n * @custom:error Throw IneligibleToClaim if user is not eligible to claim prime token\n * @custom:event Emits Mint event\n */\n function _mint(bool isIrrevocable, address user) internal {\n Token storage token = tokens[user];\n if (token.exists) revert IneligibleToClaim();\n\n token.exists = true;\n token.isIrrevocable = isIrrevocable;\n\n if (isIrrevocable) {\n ++totalIrrevocable;\n } else {\n ++totalRevocable;\n }\n\n if (totalIrrevocable > irrevocableLimit || totalRevocable > revocableLimit) revert InvalidLimit();\n _updateRoundAfterTokenMinted(user);\n\n emit Mint(user, isIrrevocable);\n }\n\n /**\n * @notice Used to burn a new prime token\n * @param user owner whose prime token to burn\n * @custom:error Throw UserHasNoPrimeToken if user has no prime token\n * @custom:event Emits Burn event\n */\n function _burn(address user) internal {\n Token memory token = tokens[user];\n if (!token.exists) revert UserHasNoPrimeToken();\n\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n _executeBoost(user, market);\n markets[market].sumOfMembersScore = markets[market].sumOfMembersScore - interests[market][user].score;\n\n delete interests[market][user].score;\n delete interests[market][user].rewardIndex;\n\n unchecked {\n ++i;\n }\n }\n\n if (token.isIrrevocable) {\n --totalIrrevocable;\n } else {\n --totalRevocable;\n }\n\n delete tokens[user].exists;\n delete tokens[user].isIrrevocable;\n\n _updateRoundAfterTokenBurned(user);\n\n emit Burn(user);\n }\n\n /**\n * @notice Used to upgrade an token\n * @param user owner whose prime token to upgrade\n * @custom:error Throw InvalidLimit if total irrevocable tokens exceeds the limit\n * @custom:event Emits TokenUpgraded event\n */\n function _upgrade(address user) internal {\n Token storage userToken = tokens[user];\n\n userToken.isIrrevocable = true;\n ++totalIrrevocable;\n --totalRevocable;\n\n if (totalIrrevocable > irrevocableLimit) revert InvalidLimit();\n\n emit TokenUpgraded(user);\n }\n\n /**\n * @notice Accrue rewards for the user. Must be called before updating score\n * @param user account for which we need to accrue rewards\n * @param vToken the market for which we need to accrue rewards\n */\n function _executeBoost(address user, address vToken) internal {\n if (!markets[vToken].exists || !tokens[user].exists) {\n return;\n }\n\n accrueInterest(vToken);\n interests[vToken][user].accrued += _interestAccrued(vToken, user);\n interests[vToken][user].rewardIndex = markets[vToken].rewardIndex;\n }\n\n /**\n * @notice Update total score of user and market. Must be called after changing account's borrow or supply balance.\n * @param user account for which we need to update score\n * @param market the market for which we need to score\n */\n function _updateScore(address user, address market) internal {\n Market storage _market = markets[market];\n if (!_market.exists || !tokens[user].exists) {\n return;\n }\n\n uint256 score = _calculateScore(market, user);\n _market.sumOfMembersScore = _market.sumOfMembersScore - interests[market][user].score + score;\n\n interests[market][user].score = score;\n }\n\n /**\n * @notice Verify new alpha arguments\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n * @custom:error Throw InvalidAlphaArguments if alpha is invalid\n */\n function _checkAlphaArguments(uint128 _alphaNumerator, uint128 _alphaDenominator) internal pure {\n if (_alphaNumerator >= _alphaDenominator || _alphaNumerator == 0) {\n revert InvalidAlphaArguments();\n }\n }\n\n /**\n * @notice starts round to update scores of a particular or all markets\n */\n function _startScoreUpdateRound() internal {\n nextScoreUpdateRoundId++;\n totalScoreUpdatesRequired = totalIrrevocable + totalRevocable;\n pendingScoreUpdates = totalScoreUpdatesRequired;\n }\n\n /**\n * @notice update the required score updates when token is burned before round is completed\n */\n function _updateRoundAfterTokenBurned(address user) internal {\n if (totalScoreUpdatesRequired != 0) --totalScoreUpdatesRequired;\n\n if (pendingScoreUpdates != 0 && !isScoreUpdated[nextScoreUpdateRoundId][user]) {\n --pendingScoreUpdates;\n }\n }\n\n /**\n * @notice update the required score updates when token is minted before round is completed\n */\n function _updateRoundAfterTokenMinted(address user) internal {\n if (totalScoreUpdatesRequired != 0) isScoreUpdated[nextScoreUpdateRoundId][user] = true;\n }\n\n /**\n * @notice fetch the current XVS balance of user in the XVSVault\n * @param user the account address\n * @return xvsBalance the XVS balance of user\n */\n function _xvsBalanceOfUser(address user) internal view returns (uint256) {\n (uint256 xvs, , uint256 pendingWithdrawals) = IXVSVault(xvsVault).getUserInfo(\n xvsVaultRewardToken,\n xvsVaultPoolId,\n user\n );\n return (xvs - pendingWithdrawals);\n }\n\n /**\n * @notice calculate the current XVS balance that will be used in calculation of score\n * @param xvs the actual XVS balance of user\n * @return xvsBalanceForScore the XVS balance to use in score\n */\n function _xvsBalanceForScore(uint256 xvs) internal view returns (uint256) {\n if (xvs > MAXIMUM_XVS_CAP) {\n return MAXIMUM_XVS_CAP;\n }\n return xvs;\n }\n\n /**\n * @notice calculate the capital for calculation of score\n * @param xvs the actual XVS balance of user\n * @param borrow the borrow balance of user\n * @param supply the supply balance of user\n * @param market the market vToken address\n * @return capital the capital to use in calculation of score\n */\n function _capitalForScore(\n uint256 xvs,\n uint256 borrow,\n uint256 supply,\n address market\n ) internal view returns (Capital memory capital) {\n address xvsToken = IXVSVault(xvsVault).xvsAddress();\n\n uint256 xvsPrice = oracle.getPrice(xvsToken);\n capital.borrowCapUSD = (xvsPrice * ((xvs * markets[market].borrowMultiplier) / EXP_SCALE)) / EXP_SCALE;\n capital.supplyCapUSD = (xvsPrice * ((xvs * markets[market].supplyMultiplier) / EXP_SCALE)) / EXP_SCALE;\n\n uint256 tokenPrice = oracle.getUnderlyingPrice(market);\n uint256 supplyUSD = (tokenPrice * supply) / EXP_SCALE;\n uint256 borrowUSD = (tokenPrice * borrow) / EXP_SCALE;\n\n if (supplyUSD >= capital.supplyCapUSD) {\n supply = supplyUSD != 0 ? (supply * capital.supplyCapUSD) / supplyUSD : 0;\n }\n\n if (borrowUSD >= capital.borrowCapUSD) {\n borrow = borrowUSD != 0 ? (borrow * capital.borrowCapUSD) / borrowUSD : 0;\n }\n\n capital.capital = supply + borrow;\n capital.cappedSupply = supply;\n capital.cappedBorrow = borrow;\n }\n\n /**\n * @notice Used to get if the XVS balance is eligible for prime token\n * @param amount amount of XVS\n * @return isEligible true if the staked XVS amount is enough to consider the associated user eligible for a Prime token, false otherwise\n */\n function _isEligible(uint256 amount) internal view returns (bool) {\n if (amount >= MINIMUM_STAKED_XVS) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @notice Calculate the interests accrued by the user in the market, since the last accrual\n * @param vToken the market for which to calculate the accrued interest\n * @param user the user for which to calculate the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function _interestAccrued(address vToken, address user) internal view returns (uint256) {\n Interest memory interest = interests[vToken][user];\n uint256 index = markets[vToken].rewardIndex - interest.rewardIndex;\n\n uint256 score = interest.score;\n\n return (index * score) / EXP_SCALE;\n }\n\n /**\n * @notice Returns the underlying token associated with the VToken, or wrapped native token if the market is native market\n * @param vToken the market whose underlying token will be returned\n * @return underlying The address of the underlying token associated with the VToken, or the address of the WRAPPED_NATIVE_TOKEN token if the market is NATIVE_MARKET\n */\n function _getUnderlying(address vToken) internal view returns (address) {\n if (vToken == NATIVE_MARKET) {\n return WRAPPED_NATIVE_TOKEN;\n }\n return IVToken(vToken).underlying();\n }\n\n //////////////////////////////////////////////////\n //////////////// APR Calculation ////////////////\n ////////////////////////////////////////////////\n\n /**\n * @notice the total income that's going to be distributed in a year to prime token holders\n * @param vToken the market for which to fetch the total income that's going to distributed in a year\n * @return amount the total income\n */\n function incomeDistributionYearly(address vToken) public view returns (uint256 amount) {\n uint256 totalIncomePerBlockOrSecondFromPLP = IPrimeLiquidityProvider(primeLiquidityProvider)\n .getEffectiveDistributionSpeed(_getUnderlying(vToken));\n amount = blocksOrSecondsPerYear * totalIncomePerBlockOrSecondFromPLP;\n }\n\n /**\n * @notice used to calculate the supply and borrow APR of the user\n * @param vToken the market for which to fetch the APR\n * @param totalSupply the total token supply of the user\n * @param totalBorrow the total tokens borrowed by the user\n * @param totalCappedSupply the total token capped supply of the user\n * @param totalCappedBorrow the total capped tokens borrowed by the user\n * @param userScore the score of the user\n * @param totalScore the total market score\n * @return supplyAPR the supply APR of the user\n * @return borrowAPR the borrow APR of the user\n */\n function _calculateUserAPR(\n address vToken,\n uint256 totalSupply,\n uint256 totalBorrow,\n uint256 totalCappedSupply,\n uint256 totalCappedBorrow,\n uint256 userScore,\n uint256 totalScore\n ) internal view returns (uint256 supplyAPR, uint256 borrowAPR) {\n if (totalScore == 0) return (0, 0);\n\n uint256 userYearlyIncome = (userScore * incomeDistributionYearly(vToken)) / totalScore;\n\n uint256 totalCappedValue = totalCappedSupply + totalCappedBorrow;\n\n if (totalCappedValue == 0) return (0, 0);\n\n uint256 maximumBps = MAXIMUM_BPS;\n uint256 userSupplyIncomeYearly;\n uint256 userBorrowIncomeYearly;\n userSupplyIncomeYearly = (userYearlyIncome * totalCappedSupply) / totalCappedValue;\n userBorrowIncomeYearly = (userYearlyIncome * totalCappedBorrow) / totalCappedValue;\n supplyAPR = totalSupply == 0 ? 0 : ((userSupplyIncomeYearly * maximumBps) / totalSupply);\n borrowAPR = totalBorrow == 0 ? 0 : ((userBorrowIncomeYearly * maximumBps) / totalBorrow);\n }\n}\n" + }, + "contracts/Tokens/Prime/PrimeLiquidityProvider.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { PrimeLiquidityProviderStorageV1 } from \"./PrimeLiquidityProviderStorage.sol\";\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { PausableUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport { IPrimeLiquidityProvider } from \"./Interfaces/IPrimeLiquidityProvider.sol\";\nimport { MaxLoopsLimitHelper } from \"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\";\nimport { TimeManagerV8 } from \"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\";\n\n/**\n * @title PrimeLiquidityProvider\n * @author Venus\n * @notice PrimeLiquidityProvider is used to fund Prime\n */\ncontract PrimeLiquidityProvider is\n IPrimeLiquidityProvider,\n AccessControlledV8,\n PausableUpgradeable,\n MaxLoopsLimitHelper,\n PrimeLiquidityProviderStorageV1,\n TimeManagerV8\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice The default max token distribution speed\n uint256 public constant DEFAULT_MAX_DISTRIBUTION_SPEED = 1e18;\n\n /// @notice Emitted when a token distribution is initialized\n event TokenDistributionInitialized(address indexed token);\n\n /// @notice Emitted when a new token distribution speed is set\n event TokenDistributionSpeedUpdated(address indexed token, uint256 oldSpeed, uint256 newSpeed);\n\n /// @notice Emitted when a new max distribution speed for token is set\n event MaxTokenDistributionSpeedUpdated(address indexed token, uint256 oldSpeed, uint256 newSpeed);\n\n /// @notice Emitted when prime token contract address is changed\n event PrimeTokenUpdated(address indexed oldPrimeToken, address indexed newPrimeToken);\n\n /// @notice Emitted when distribution state(Index and block or second) is updated\n event TokensAccrued(address indexed token, uint256 amount);\n\n /// @notice Emitted when token is transferred to the prime contract\n event TokenTransferredToPrime(address indexed token, uint256 amount);\n\n /// @notice Emitted on sweep token success\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n\n /// @notice Thrown when arguments are passed are invalid\n error InvalidArguments();\n\n /// @notice Thrown when distribution speed is greater than maxTokenDistributionSpeeds[tokenAddress]\n error InvalidDistributionSpeed(uint256 speed, uint256 maxSpeed);\n\n /// @notice Thrown when caller is not the desired caller\n error InvalidCaller();\n\n /// @notice Thrown when token is initialized\n error TokenAlreadyInitialized(address token);\n\n ///@notice Error thrown when PrimeLiquidityProvider's balance is less than sweep amount\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /// @notice Error thrown when funds transfer is paused\n error FundsTransferIsPaused();\n\n /// @notice Error thrown when accrueTokens is called for an uninitialized token\n error TokenNotInitialized(address token_);\n\n /// @notice Error thrown when argument value in setter is same as previous value\n error AddressesMustDiffer();\n\n /**\n * @notice Compares two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n if (newAddress == oldAddress) {\n revert AddressesMustDiffer();\n }\n _;\n }\n\n /**\n * @notice Prime Liquidity Provider constructor\n * @param _timeBased A boolean indicating whether the contract is based on time or block.\n * @param _blocksPerYear total blocks per year\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(bool _timeBased, uint256 _blocksPerYear) TimeManagerV8(_timeBased, _blocksPerYear) {\n _disableInitializers();\n }\n\n /**\n * @notice PrimeLiquidityProvider initializer\n * @dev Initializes the deployer to owner\n * @param accessControlManager_ AccessControlManager contract address\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n * @param loopsLimit_ Maximum number of loops allowed in a single transaction\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function initialize(\n address accessControlManager_,\n address[] calldata tokens_,\n uint256[] calldata distributionSpeeds_,\n uint256[] calldata maxDistributionSpeeds_,\n uint256 loopsLimit_\n ) external initializer {\n _ensureZeroAddress(accessControlManager_);\n\n __AccessControlled_init(accessControlManager_);\n __Pausable_init();\n _setMaxLoopsLimit(loopsLimit_);\n\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if ((numTokens != distributionSpeeds_.length) || (numTokens != maxDistributionSpeeds_.length)) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _initializeToken(tokens_[i]);\n _setMaxTokenDistributionSpeed(tokens_[i], maxDistributionSpeeds_[i]);\n _setTokenDistributionSpeed(tokens_[i], distributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Initialize the distribution of the token\n * @param tokens_ Array of addresses of the tokens to be intialized\n * @custom:access Only Governance\n */\n function initializeTokens(address[] calldata tokens_) external onlyOwner {\n uint256 tokensLength = tokens_.length;\n _ensureMaxLoops(tokensLength);\n\n for (uint256 i; i < tokensLength; ) {\n _initializeToken(tokens_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Pause fund transfer of tokens to Prime contract\n * @custom:access Controlled by ACM\n */\n function pauseFundsTransfer() external {\n _checkAccessAllowed(\"pauseFundsTransfer()\");\n _pause();\n }\n\n /**\n * @notice Resume fund transfer of tokens to Prime contract\n * @custom:access Controlled by ACM\n */\n function resumeFundsTransfer() external {\n _checkAccessAllowed(\"resumeFundsTransfer()\");\n _unpause();\n }\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n * @custom:access Controlled by ACM\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function setTokensDistributionSpeed(address[] calldata tokens_, uint256[] calldata distributionSpeeds_) external {\n _checkAccessAllowed(\"setTokensDistributionSpeed(address[],uint256[])\");\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if (numTokens != distributionSpeeds_.length) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _ensureTokenInitialized(tokens_[i]);\n _setTokenDistributionSpeed(tokens_[i], distributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Set max distribution speed for token (amount of maximum token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param maxDistributionSpeeds_ New distribution speeds for tokens\n * @custom:access Controlled by ACM\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function setMaxTokensDistributionSpeed(\n address[] calldata tokens_,\n uint256[] calldata maxDistributionSpeeds_\n ) external {\n _checkAccessAllowed(\"setMaxTokensDistributionSpeed(address[],uint256[])\");\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if (numTokens != maxDistributionSpeeds_.length) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _setMaxTokenDistributionSpeed(tokens_[i], maxDistributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n * @custom:event Emits PrimeTokenUpdated event\n * @custom:access Only owner\n */\n function setPrimeToken(address prime_) external onlyOwner compareAddress(prime, prime_) {\n _ensureZeroAddress(prime_);\n\n emit PrimeTokenUpdated(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Limit for the max loops can execute at a time\n * @custom:event Emits MaxLoopsLimitUpdated event on success\n * @custom:access Controlled by ACM\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external {\n _checkAccessAllowed(\"setMaxLoopsLimit(uint256)\");\n _setMaxLoopsLimit(loopsLimit);\n }\n\n /**\n * @notice Claim all the token accrued till last block or second\n * @param token_ The token to release to the Prime contract\n * @custom:event Emits TokenTransferredToPrime event\n * @custom:error Throw InvalidArguments on Zero address(token)\n * @custom:error Throw FundsTransferIsPaused is paused\n * @custom:error Throw InvalidCaller if the sender is not the Prime contract\n */\n function releaseFunds(address token_) external {\n address _prime = prime;\n if (msg.sender != _prime) revert InvalidCaller();\n if (paused()) {\n revert FundsTransferIsPaused();\n }\n\n accrueTokens(token_);\n uint256 accruedAmount = _tokenAmountAccrued[token_];\n delete _tokenAmountAccrued[token_];\n\n emit TokenTransferredToPrime(token_, accruedAmount);\n\n IERC20Upgradeable(token_).safeTransfer(_prime, accruedAmount);\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Governance\n */\n function sweepToken(IERC20Upgradeable token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\n }\n\n /**\n * @notice Get rewards per block or second for token\n * @param token_ Address of the token\n * @return speed returns the per block or second reward\n */\n function getEffectiveDistributionSpeed(address token_) external view returns (uint256) {\n uint256 distributionSpeed = tokenDistributionSpeeds[token_];\n uint256 balance = IERC20Upgradeable(token_).balanceOf(address(this));\n uint256 accrued = _tokenAmountAccrued[token_];\n\n if (balance > accrued) {\n return distributionSpeed;\n }\n\n return 0;\n }\n\n /**\n * @notice Accrue token by updating the distribution state\n * @param token_ Address of the token\n * @custom:event Emits TokensAccrued event\n */\n function accrueTokens(address token_) public {\n _ensureZeroAddress(token_);\n\n _ensureTokenInitialized(token_);\n\n uint256 blockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 deltaBlocksOrSeconds;\n unchecked {\n deltaBlocksOrSeconds = blockNumberOrSecond - lastAccruedBlockOrSecond[token_];\n }\n\n if (deltaBlocksOrSeconds != 0) {\n uint256 distributionSpeed = tokenDistributionSpeeds[token_];\n uint256 balance = IERC20Upgradeable(token_).balanceOf(address(this));\n\n uint256 balanceDiff = balance - _tokenAmountAccrued[token_];\n if (distributionSpeed != 0 && balanceDiff != 0) {\n uint256 accruedSinceUpdate = deltaBlocksOrSeconds * distributionSpeed;\n uint256 tokenAccrued = (balanceDiff <= accruedSinceUpdate ? balanceDiff : accruedSinceUpdate);\n\n _tokenAmountAccrued[token_] += tokenAccrued;\n emit TokensAccrued(token_, tokenAccrued);\n }\n\n lastAccruedBlockOrSecond[token_] = blockNumberOrSecond;\n }\n }\n\n /**\n * @notice Get the last accrued block or second for token\n * @param token_ Address of the token\n * @return blockNumberOrSecond returns the last accrued block or second\n */\n function lastAccruedBlock(address token_) external view returns (uint256) {\n return lastAccruedBlockOrSecond[token_];\n }\n\n /**\n * @notice Get the tokens accrued\n * @param token_ Address of the token\n * @return returns the amount of accrued tokens for the token provided\n */\n function tokenAmountAccrued(address token_) external view returns (uint256) {\n return _tokenAmountAccrued[token_];\n }\n\n /**\n * @notice Initialize the distribution of the token\n * @param token_ Address of the token to be intialized\n * @custom:event Emits TokenDistributionInitialized event\n * @custom:error Throw TokenAlreadyInitialized if token is already initialized\n */\n function _initializeToken(address token_) internal {\n _ensureZeroAddress(token_);\n uint256 blockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 initializedBlockOrSecond = lastAccruedBlockOrSecond[token_];\n\n if (initializedBlockOrSecond != 0) {\n revert TokenAlreadyInitialized(token_);\n }\n\n /*\n * Update token state block number or second\n */\n lastAccruedBlockOrSecond[token_] = blockNumberOrSecond;\n\n emit TokenDistributionInitialized(token_);\n }\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param token_ Address of the token\n * @param distributionSpeed_ New distribution speed for token\n * @custom:event Emits TokenDistributionSpeedUpdated event\n * @custom:error Throw InvalidDistributionSpeed if speed is greater than max speed\n */\n function _setTokenDistributionSpeed(address token_, uint256 distributionSpeed_) internal {\n uint256 maxDistributionSpeed = maxTokenDistributionSpeeds[token_];\n if (maxDistributionSpeed == 0) {\n maxTokenDistributionSpeeds[token_] = maxDistributionSpeed = DEFAULT_MAX_DISTRIBUTION_SPEED;\n }\n\n if (distributionSpeed_ > maxDistributionSpeed) {\n revert InvalidDistributionSpeed(distributionSpeed_, maxDistributionSpeed);\n }\n\n uint256 oldDistributionSpeed = tokenDistributionSpeeds[token_];\n if (oldDistributionSpeed != distributionSpeed_) {\n // Distribution speed updated so let's update distribution state to ensure that\n // 1. Token accrued properly for the old speed, and\n // 2. Token accrued at the new speed starts after this block or second.\n accrueTokens(token_);\n\n // Update speed\n tokenDistributionSpeeds[token_] = distributionSpeed_;\n\n emit TokenDistributionSpeedUpdated(token_, oldDistributionSpeed, distributionSpeed_);\n }\n }\n\n /**\n * @notice Set max distribution speed (amount of maximum token distribute per block or second)\n * @param token_ Address of the token\n * @param maxDistributionSpeed_ New max distribution speed for token\n * @custom:event Emits MaxTokenDistributionSpeedUpdated event\n */\n function _setMaxTokenDistributionSpeed(address token_, uint256 maxDistributionSpeed_) internal {\n emit MaxTokenDistributionSpeedUpdated(token_, tokenDistributionSpeeds[token_], maxDistributionSpeed_);\n maxTokenDistributionSpeeds[token_] = maxDistributionSpeed_;\n }\n\n /**\n * @notice Revert on non initialized token\n * @param token_ Token Address to be verified for\n */\n function _ensureTokenInitialized(address token_) internal view {\n uint256 lastBlockOrSecondAccrued = lastAccruedBlockOrSecond[token_];\n\n if (lastBlockOrSecondAccrued == 0) {\n revert TokenNotInitialized(token_);\n }\n }\n\n /**\n * @notice Revert on zero address\n * @param address_ Address to be verified\n */\n function _ensureZeroAddress(address address_) internal pure {\n if (address_ == address(0)) {\n revert InvalidArguments();\n }\n }\n}\n" + }, + "contracts/Tokens/Prime/PrimeLiquidityProviderStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/**\n * @title PrimeLiquidityProviderStorageV1\n * @author Venus\n * @notice Storage for Prime Liquidity Provider\n */\ncontract PrimeLiquidityProviderStorageV1 {\n /// @notice Address of the Prime contract\n address public prime;\n\n /// @notice The rate at which token is distributed (per block or second)\n mapping(address => uint256) public tokenDistributionSpeeds;\n\n /// @notice The max token distribution speed for token\n mapping(address => uint256) public maxTokenDistributionSpeeds;\n\n /// @notice The block or second till which rewards are distributed for an asset\n mapping(address => uint256) public lastAccruedBlockOrSecond;\n\n /// @notice The token accrued but not yet transferred to prime contract\n mapping(address => uint256) internal _tokenAmountAccrued;\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 uint256[45] private __gap;\n}\n" + }, + "contracts/Tokens/Prime/PrimeStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\n/**\n * @title PrimeStorageV1\n * @author Venus\n * @notice Storage for Prime Token\n */\ncontract PrimeStorageV1 {\n struct Token {\n bool exists;\n bool isIrrevocable;\n }\n\n struct Market {\n uint256 supplyMultiplier;\n uint256 borrowMultiplier;\n uint256 rewardIndex;\n uint256 sumOfMembersScore;\n bool exists;\n }\n\n struct Interest {\n uint256 accrued;\n uint256 score;\n uint256 rewardIndex;\n }\n\n struct PendingReward {\n address vToken;\n address rewardToken;\n uint256 amount;\n }\n\n /// @notice Base unit for computations, usually used in scaling (multiplications, divisions)\n uint256 internal constant EXP_SCALE = 1e18;\n\n /// @notice maximum BPS = 100%\n uint256 internal constant MAXIMUM_BPS = 1e4;\n\n /// @notice Mapping to get prime token's metadata\n mapping(address => Token) public tokens;\n\n /// @notice Tracks total irrevocable tokens minted\n uint256 public totalIrrevocable;\n\n /// @notice Tracks total revocable tokens minted\n uint256 public totalRevocable;\n\n /// @notice Indicates maximum revocable tokens that can be minted\n uint256 public revocableLimit;\n\n /// @notice Indicates maximum irrevocable tokens that can be minted\n uint256 public irrevocableLimit;\n\n /// @notice Tracks when prime token eligible users started staking for claiming prime token\n mapping(address => uint256) public stakedAt;\n\n /// @notice vToken to market configuration\n mapping(address => Market) public markets;\n\n /// @notice vToken to user to user index\n mapping(address => mapping(address => Interest)) public interests;\n\n /// @notice A list of boosted markets\n address[] internal _allMarkets;\n\n /// @notice numerator of alpha. Ex: if alpha is 0.5 then this will be 1\n uint128 public alphaNumerator;\n\n /// @notice denominator of alpha. Ex: if alpha is 0.5 then this will be 2\n uint128 public alphaDenominator;\n\n /// @notice address of XVS vault\n address public xvsVault;\n\n /// @notice address of XVS vault reward token\n address public xvsVaultRewardToken;\n\n /// @notice address of XVS vault pool id\n uint256 public xvsVaultPoolId;\n\n /// @notice mapping to check if a account's score was updated in the round\n mapping(uint256 => mapping(address => bool)) public isScoreUpdated;\n\n /// @notice unique id for next round\n uint256 public nextScoreUpdateRoundId;\n\n /// @notice total number of accounts whose score needs to be updated\n uint256 public totalScoreUpdatesRequired;\n\n /// @notice total number of accounts whose score is yet to be updated\n uint256 public pendingScoreUpdates;\n\n /// @notice mapping used to find if an asset is part of prime markets\n mapping(address => address) public vTokenForAsset;\n\n /// @notice Address of core pool comptroller contract\n address internal corePoolComptroller;\n\n /// @notice unreleased income from PLP that's already distributed to prime holders\n /// @dev mapping of asset address => amount\n mapping(address => uint256) public unreleasedPLPIncome;\n\n /// @notice The address of PLP contract\n address public primeLiquidityProvider;\n\n /// @notice The address of ResilientOracle contract\n ResilientOracleInterface public oracle;\n\n /// @notice The address of PoolRegistry contract\n address public poolRegistry;\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 uint256[26] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "mode": "3" + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": ["storageLayout", "abi", "evm.methodIdentifiers", "metadata", "devdoc", "userdoc"], + "": ["ast"] + } + }, + "detectMissingLibraries": false, + "forceEVMLA": false, + "enableEraVMExtensions": false, + "libraries": {} + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index 71c89dc08..1610855dc 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,10 +1,10 @@ import "module-alias/register"; +import "@matterlabs/hardhat-zksync-deploy"; +import "@matterlabs/hardhat-zksync-solc"; +import "@matterlabs/hardhat-zksync-verify"; import "@nomicfoundation/hardhat-chai-matchers"; -import "@nomicfoundation/hardhat-toolbox"; import "@nomiclabs/hardhat-ethers"; -import "@nomiclabs/hardhat-etherscan"; -import "@openzeppelin/hardhat-upgrades"; import "@typechain/hardhat"; import fs from "fs"; import "hardhat-deploy"; @@ -104,6 +104,10 @@ task("run-script", "Runs a hardhard script by name") const config: HardhatUserConfig = { defaultNetwork: "hardhat", + zksolc: { + version: "1.5.0", + settings: {}, + }, solidity: { compilers: [ { @@ -146,17 +150,20 @@ const config: HardhatUserConfig = { gasPrice: 10000000000, // 10 gwei gasMultiplier: 10, timeout: 12000000, + zksync: false, }, bscmainnet: { url: process.env.ARCHIVE_NODE_bscmainnet || "https://bsc-dataseed.binance.org/", chainId: 56, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, sepolia: { url: process.env.ARCHIVE_NODE_sepolia || "https://ethereum-sepolia.blockpi.network/v1/rpc/public", chainId: 11155111, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, ethereum: { url: process.env.ARCHIVE_NODE_ethereum || "https://ethereum.blockpi.network/v1/rpc/public", @@ -164,42 +171,57 @@ const config: HardhatUserConfig = { live: true, timeout: 1200000, // 20 minutes accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, opbnbtestnet: { url: process.env.ARCHIVE_NODE_opbnbtestnet || "https://opbnb-testnet-rpc.bnbchain.org", chainId: 5611, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, opbnbmainnet: { url: process.env.ARCHIVE_NODE_opbnbmainnet || "https://opbnb-mainnet-rpc.bnbchain.org", chainId: 204, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, arbitrumsepolia: { url: process.env.ARCHIVE_NODE_arbitrumsepolia || "https://sepolia-rollup.arbitrum.io/rpc", chainId: 421614, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, arbitrumone: { url: process.env.ARCHIVE_NODE_arbitrumone || "https://arb1.arbitrum.io/rpc", chainId: 42161, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, xlayertestnet: { url: process.env.ARCHIVE_NODE_xlayertestnet || "https://testrpc.xlayer.tech/", chainId: 195, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, }, xlayermainnet: { url: process.env.ARCHIVE_NODE_xlayermainnet || "https://rpc.xlayer.tech/", chainId: 196, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: false, + }, + zksyncsepolia: { + url: process.env.ARCHIVE_NODE_zksyncsepolia || "https://sepolia.era.zksync.dev", + ethNetwork: "sepolia", + live: true, + verifyURL: "https://explorer.sepolia.era.zksync.dev/contract_verification", + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: true, }, }, etherscan: { diff --git a/package.json b/package.json index 9ccae55ff..6293ca783 100644 --- a/package.json +++ b/package.json @@ -50,9 +50,13 @@ "@ethersproject/abstract-signer": "^5", "@ethersproject/bytes": "^5.0.0", "@ethersproject/providers": "^5.6.8", + "@matterlabs/hardhat-zksync-deploy": "^1.5.0", + "@matterlabs/hardhat-zksync-solc": "^1.2.1", + "@matterlabs/hardhat-zksync-verify": "^1.6.0", "@nomicfoundation/hardhat-chai-matchers": "^1.0.3", "@nomicfoundation/hardhat-network-helpers": "^1.0.10", "@nomicfoundation/hardhat-toolbox": "^2.0.0", + "@nomicfoundation/hardhat-verify": "^2.0.8", "@nomiclabs/hardhat-etherscan": "^3.1.0", "@openzeppelin/hardhat-upgrades": "^1.21.0", "@semantic-release/changelog": "^6.0.1", @@ -71,11 +75,11 @@ "chai": "^4.3.6", "eslint": "^8.25.0", "eslint-config-prettier": "^8.5.0", - "ethers": "^5.7.0", + "ethers": "^6.10.0", "hardhat": "^2.19.2", "hardhat-contract-sizer": "^2.8.0", "hardhat-deploy": "^0.11.14", - "hardhat-deploy-ethers": "^0.3.0-beta.13", + "hardhat-deploy-ethers": "^0.4.2", "hardhat-gas-reporter": "^1.0.8", "husky": "^8.0.1", "prettier": "^2.7.1", @@ -87,7 +91,8 @@ "ts-node": "^10.9.1", "typechain": "^8.1.0", "typescript": "^4.7.4", - "web3-utils": "^1.7.5" + "web3-utils": "^1.7.5", + "zksync-ethers": "^6.10.0" }, "_moduleAliases": { "@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers" diff --git a/yarn.lock b/yarn.lock index 89e55c01d..df4051171 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,13 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:1.10.1": + version: 1.10.1 + resolution: "@adraffy/ens-normalize@npm:1.10.1" + checksum: 0836f394ea256972ec19a0b5e78cb7f5bcdfd48d8a32c7478afc94dd53ae44c04d1aa2303d7f3077b4f3ac2323b1f557ab9188e8059978748fdcd83e04a80dcc + languageName: node + linkType: hard + "@ampproject/remapping@npm:^2.1.0": version: 2.2.1 resolution: "@ampproject/remapping@npm:2.2.1" @@ -347,6 +354,13 @@ __metadata: languageName: node linkType: hard +"@balena/dockerignore@npm:^1.0.2": + version: 1.0.2 + resolution: "@balena/dockerignore@npm:1.0.2" + checksum: 0d39f8fbcfd1a983a44bced54508471ab81aaaa40e2c62b46a9f97eac9d6b265790799f16919216db486331dedaacdde6ecbd6b7abe285d39bc50de111991699 + languageName: node + linkType: hard + "@chainlink/contracts@npm:^0.5.1": version: 0.5.1 resolution: "@chainlink/contracts@npm:0.5.1" @@ -1283,6 +1297,71 @@ __metadata: languageName: node linkType: hard +"@matterlabs/hardhat-zksync-deploy@npm:^1.5.0": + version: 1.5.0 + resolution: "@matterlabs/hardhat-zksync-deploy@npm:1.5.0" + dependencies: + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + chai: ^4.3.4 + chalk: ^4.1.2 + fs-extra: ^11.2.0 + glob: ^10.4.1 + lodash: ^4.17.21 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + ts-morph: ^22.0.0 + peerDependencies: + ethers: ^6.12.2 + hardhat: ^2.22.5 + zksync-ethers: ^6.8.0 + checksum: ad36aa28e7f89958b3bcecede71f658f019582485b377cc3107f191a85aa482be7aae2adcd11651a845b54bbb26406584c89370df25fcf498f33fa341d2e7484 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-solc@npm:^1.2.0, @matterlabs/hardhat-zksync-solc@npm:^1.2.1": + version: 1.2.1 + resolution: "@matterlabs/hardhat-zksync-solc@npm:1.2.1" + dependencies: + "@nomiclabs/hardhat-docker": ^2.0.2 + chai: ^4.3.4 + chalk: ^4.1.2 + debug: ^4.3.5 + dockerode: ^4.0.2 + fs-extra: ^11.2.0 + proper-lockfile: ^4.1.2 + semver: ^7.6.2 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + undici: ^6.18.2 + peerDependencies: + hardhat: ^2.22.5 + checksum: b83add58be577845d8715e21dee8b712af7f37de5c8edf4b6544f5f37d7ae9f3586ce5749fc44416210f0c6d235f1f9773126e7ab58926a612f30d12e1ac7c80 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-verify@npm:^1.6.0": + version: 1.6.0 + resolution: "@matterlabs/hardhat-zksync-verify@npm:1.6.0" + dependencies: + "@ethersproject/abi": ^5.7.0 + "@ethersproject/address": 5.7.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.1 + "@nomicfoundation/hardhat-verify": ^2.0.8 + axios: ^1.7.2 + cbor: ^9.0.2 + chai: ^4.3.4 + chalk: ^4.1.2 + debug: ^4.3.5 + semver: ^7.6.2 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + peerDependencies: + "@nomicfoundation/hardhat-verify": ^2.0.8 + hardhat: ^2.22.5 + checksum: 289f380abcfeeee71524d504754507f39cdb2d1214914f9e178522b6187edfa59e0e48eb3d3efb745a0f613492af4fbea972d34637d2e96823c7a7e4c63b50a2 + languageName: node + linkType: hard + "@metamask/eth-sig-util@npm:^4.0.0": version: 4.0.1 resolution: "@metamask/eth-sig-util@npm:4.0.1" @@ -1305,6 +1384,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.2.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": 1.3.2 + checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -1319,7 +1407,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": +"@noble/hashes@npm:1.3.2, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": version: 1.3.2 resolution: "@noble/hashes@npm:1.3.2" checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 @@ -1754,6 +1842,25 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/hardhat-verify@npm:^2.0.8": + version: 2.0.8 + resolution: "@nomicfoundation/hardhat-verify@npm:2.0.8" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@ethersproject/address": ^5.0.2 + cbor: ^8.1.0 + chalk: ^2.4.2 + debug: ^4.1.1 + lodash.clonedeep: ^4.5.0 + semver: ^6.3.0 + table: ^6.8.0 + undici: ^5.14.0 + peerDependencies: + hardhat: ^2.0.4 + checksum: 2c6d239a08e7aca26625ab8c3637e5e7c1e7c8a88f62fb80c6a008fd56352431856aaf79b7a24b1755a6ee48d1423995e02d85a58ea53ceb5552b30c03073c97 + languageName: node + linkType: hard + "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": version: 0.1.1 resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" @@ -1863,6 +1970,17 @@ __metadata: languageName: node linkType: hard +"@nomiclabs/hardhat-docker@npm:^2.0.2": + version: 2.0.2 + resolution: "@nomiclabs/hardhat-docker@npm:2.0.2" + dependencies: + dockerode: ^2.5.8 + fs-extra: ^7.0.1 + node-fetch: ^2.6.0 + checksum: 1e019c2050668326e006a046d3285a11bf1830bfc222c2957eb8f9a5b262c9b5061ae42abbf2346f3e1bb46c98aa767c3651c0f842192f3171b28b1deafc4d05 + languageName: node + linkType: hard + "@nomiclabs/hardhat-ethers@npm:^2.2.3": version: 2.2.3 resolution: "@nomiclabs/hardhat-ethers@npm:2.2.3" @@ -2659,6 +2777,51 @@ __metadata: languageName: node linkType: hard +"@sinonjs/commons@npm:^2.0.0": + version: 2.0.0 + resolution: "@sinonjs/commons@npm:2.0.0" + dependencies: + type-detect: 4.0.8 + checksum: 5023ba17edf2b85ed58262313b8e9b59e23c6860681a9af0200f239fe939e2b79736d04a260e8270ddd57196851dde3ba754d7230be5c5234e777ae2ca8af137 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^3.0.0, @sinonjs/commons@npm:^3.0.1": + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" + dependencies: + type-detect: 4.0.8 + checksum: a7c3e7cc612352f4004873747d9d8b2d4d90b13a6d483f685598c945a70e734e255f1ca5dc49702515533c403b32725defff148177453b3f3915bcb60e9d4601 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^11.2.2": + version: 11.2.2 + resolution: "@sinonjs/fake-timers@npm:11.2.2" + dependencies: + "@sinonjs/commons": ^3.0.0 + checksum: 68c29b0e1856fdc280df03ddbf57c726420b78e9f943a241b471edc018fb14ff36fdc1daafd6026cba08c3c7f50c976fb7ae11b88ff44cd7f609692ca7d25158 + languageName: node + linkType: hard + +"@sinonjs/samsam@npm:^8.0.0": + version: 8.0.0 + resolution: "@sinonjs/samsam@npm:8.0.0" + dependencies: + "@sinonjs/commons": ^2.0.0 + lodash.get: ^4.4.2 + type-detect: ^4.0.8 + checksum: 95e40d0bb9f7288e27c379bee1b03c3dc51e7e78b9d5ea6aef66a690da7e81efc4715145b561b449cefc5361a171791e3ce30fb1a46ab247d4c0766024c60a60 + languageName: node + linkType: hard + +"@sinonjs/text-encoding@npm:^0.7.2": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: fe690002a32ba06906cf87e2e8fe84d1590294586f2a7fd180a65355b53660c155c3273d8011a5f2b77209b819aa7306678ae6e4aea0df014bd7ffd4bbbcf1ab + languageName: node + linkType: hard + "@smithy/types@npm:^2.4.0": version: 2.5.0 resolution: "@smithy/types@npm:2.5.0" @@ -2720,6 +2883,18 @@ __metadata: languageName: node linkType: hard +"@ts-morph/common@npm:~0.23.0": + version: 0.23.0 + resolution: "@ts-morph/common@npm:0.23.0" + dependencies: + fast-glob: ^3.3.2 + minimatch: ^9.0.3 + mkdirp: ^3.0.1 + path-browserify: ^1.0.1 + checksum: 96463742ec1114900901ded8aecc2c9664b20119454a56c896042e6a5e5b153af1d986467362d737ed0130506aeac9655731922dc8c4e851a16f9c1a8a8099b4 + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": version: 1.0.9 resolution: "@tsconfig/node10@npm:1.0.9" @@ -2909,6 +3084,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:18.15.13": + version: 18.15.13 + resolution: "@types/node@npm:18.15.13" + checksum: 79cc5a2b5f98e8973061a4260a781425efd39161a0e117a69cd089603964816c1a14025e1387b4590c8e82d05133b7b4154fa53a7dffb3877890a66145e76515 + languageName: node + linkType: hard + "@types/node@npm:20.5.1": version: 20.5.1 resolution: "@types/node@npm:20.5.1" @@ -3352,10 +3534,14 @@ __metadata: "@ethersproject/abstract-signer": ^5 "@ethersproject/bytes": ^5.0.0 "@ethersproject/providers": ^5.6.8 + "@matterlabs/hardhat-zksync-deploy": ^1.5.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.1 + "@matterlabs/hardhat-zksync-verify": ^1.6.0 "@nomicfoundation/hardhat-chai-matchers": ^1.0.3 "@nomicfoundation/hardhat-ethers": ^3.0.0 "@nomicfoundation/hardhat-network-helpers": ^1.0.10 "@nomicfoundation/hardhat-toolbox": ^2.0.0 + "@nomicfoundation/hardhat-verify": ^2.0.8 "@nomiclabs/hardhat-etherscan": ^3.1.0 "@openzeppelin/contracts": 4.9.3 "@openzeppelin/contracts-upgradeable": ^4.8.0 @@ -3381,11 +3567,11 @@ __metadata: dotenv: ^16.0.1 eslint: ^8.25.0 eslint-config-prettier: ^8.5.0 - ethers: ^5.7.0 + ethers: ^6.10.0 hardhat: ^2.19.2 hardhat-contract-sizer: ^2.8.0 hardhat-deploy: ^0.11.14 - hardhat-deploy-ethers: ^0.3.0-beta.13 + hardhat-deploy-ethers: ^0.4.2 hardhat-gas-reporter: ^1.0.8 husky: ^8.0.1 module-alias: ^2.2.2 @@ -3399,6 +3585,7 @@ __metadata: typechain: ^8.1.0 typescript: ^4.7.4 web3-utils: ^1.7.5 + zksync-ethers: ^6.10.0 languageName: unknown linkType: soft @@ -3472,6 +3659,18 @@ __metadata: languageName: node linkType: hard +"JSONStream@npm:1.3.2": + version: 1.3.2 + resolution: "JSONStream@npm:1.3.2" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: d83b86f846eaeba7b947181245b977bb7e32c49e25d210234ecbf6b2d9128924610224e150558deeb65d063b07b8c28e5a1a4ab8daeb89d4c34e718047f046fd + languageName: node + linkType: hard + "JSONStream@npm:^1.0.4, JSONStream@npm:^1.3.5": version: 1.3.5 resolution: "JSONStream@npm:1.3.5" @@ -3566,6 +3765,13 @@ __metadata: languageName: node linkType: hard +"aes-js@npm:4.0.0-beta.5": + version: 4.0.0-beta.5 + resolution: "aes-js@npm:4.0.0-beta.5" + checksum: cc2ea969d77df939c32057f7e361b6530aa6cb93cb10617a17a45cd164e6d761002f031ff6330af3e67e58b1f0a3a8fd0b63a720afd591a653b02f649470e15b + languageName: node + linkType: hard + "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -3899,6 +4105,15 @@ __metadata: languageName: node linkType: hard +"asn1@npm:^0.2.6": + version: 0.2.6 + resolution: "asn1@npm:0.2.6" + dependencies: + safer-buffer: ~2.1.0 + checksum: 39f2ae343b03c15ad4f238ba561e626602a3de8d94ae536c46a4a93e69578826305366dc09fbb9b56aec39b4982a463682f259c38e59f6fa380cd72cd61e493d + languageName: node + linkType: hard + "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -3995,6 +4210,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:^1.7.2": + version: 1.7.2 + resolution: "axios@npm:1.7.2" + dependencies: + follow-redirects: ^1.15.6 + form-data: ^4.0.0 + proxy-from-env: ^1.1.0 + checksum: e457e2b0ab748504621f6fa6609074ac08c824bf0881592209dfa15098ece7e88495300e02cd22ba50b3468fd712fe687e629dcb03d6a3f6a51989727405aedf + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -4018,6 +4244,15 @@ __metadata: languageName: node linkType: hard +"bcrypt-pbkdf@npm:^1.0.2": + version: 1.0.2 + resolution: "bcrypt-pbkdf@npm:1.0.2" + dependencies: + tweetnacl: ^0.14.3 + checksum: 4edfc9fe7d07019609ccf797a2af28351736e9d012c8402a07120c4453a3b789a15f2ee1530dc49eee8f7eb9379331a8dd4b3766042b9e502f74a68e7f662291 + languageName: node + linkType: hard + "bech32@npm:1.1.4": version: 1.1.4 resolution: "bech32@npm:1.1.4" @@ -4067,6 +4302,27 @@ __metadata: languageName: node linkType: hard +"bl@npm:^1.0.0": + version: 1.2.3 + resolution: "bl@npm:1.2.3" + dependencies: + readable-stream: ^2.3.5 + safe-buffer: ^5.1.1 + checksum: 123f097989ce2fa9087ce761cd41176aaaec864e28f7dfe5c7dab8ae16d66d9844f849c3ad688eb357e3c5e4f49b573e3c0780bb8bc937206735a3b6f8569a5f + languageName: node + linkType: hard + +"bl@npm:^4.0.3": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: ^5.5.0 + inherits: ^2.0.4 + readable-stream: ^3.4.0 + checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662 + languageName: node + linkType: hard + "blakejs@npm:^1.1.0": version: 1.2.1 resolution: "blakejs@npm:1.2.1" @@ -4204,6 +4460,30 @@ __metadata: languageName: node linkType: hard +"buffer-alloc-unsafe@npm:^1.1.0": + version: 1.1.0 + resolution: "buffer-alloc-unsafe@npm:1.1.0" + checksum: c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 + languageName: node + linkType: hard + +"buffer-alloc@npm:^1.2.0": + version: 1.2.0 + resolution: "buffer-alloc@npm:1.2.0" + dependencies: + buffer-alloc-unsafe: ^1.1.0 + buffer-fill: ^1.0.0 + checksum: 560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 + languageName: node + linkType: hard + +"buffer-fill@npm:^1.0.0": + version: 1.0.0 + resolution: "buffer-fill@npm:1.0.0" + checksum: c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -4229,6 +4509,16 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.1.13 + checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 + languageName: node + linkType: hard + "buffer@npm:^6.0.3": version: 6.0.3 resolution: "buffer@npm:6.0.3" @@ -4246,6 +4536,13 @@ __metadata: languageName: node linkType: hard +"buildcheck@npm:~0.0.6": + version: 0.0.6 + resolution: "buildcheck@npm:0.0.6" + checksum: ad61759dc98d62e931df2c9f54ccac7b522e600c6e13bdcfdc2c9a872a818648c87765ee209c850f022174da4dd7c6a450c00357c5391705d26b9c5807c2a076 + languageName: node + linkType: hard + "builtins@npm:^5.0.0": version: 5.0.1 resolution: "builtins@npm:5.0.1" @@ -4409,6 +4706,15 @@ __metadata: languageName: node linkType: hard +"cbor@npm:^9.0.2": + version: 9.0.2 + resolution: "cbor@npm:9.0.2" + dependencies: + nofilter: ^3.1.0 + checksum: 925edae7bf964be5a26dba1b7ba6311ac12b6a66234dc958958997a0576cdc740632dc19852a5b84d8a75101936bea1fe122dc22539d6e11f4539c731853ba2e + languageName: node + linkType: hard + "chai-as-promised@npm:^7.1.1": version: 7.1.1 resolution: "chai-as-promised@npm:7.1.1" @@ -4498,6 +4804,13 @@ __metadata: languageName: node linkType: hard +"chownr@npm:^1.0.1, chownr@npm:^1.1.1": + version: 1.1.4 + resolution: "chownr@npm:1.1.4" + checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -4627,6 +4940,13 @@ __metadata: languageName: node linkType: hard +"code-block-writer@npm:^13.0.1": + version: 13.0.1 + resolution: "code-block-writer@npm:13.0.1" + checksum: 678b740d1723c7cc3c5addcbc1a91d9a7a3f033510eb8e0639154fcaae456c80630dbd40d16aefdffaf3edb5ffb352d7d46f195f69c8be692c4d7debb1dc7933 + languageName: node + linkType: hard + "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -4770,7 +5090,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": +"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2, concat-stream@npm:~1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -4949,6 +5269,17 @@ __metadata: languageName: node linkType: hard +"cpu-features@npm:~0.0.9": + version: 0.0.10 + resolution: "cpu-features@npm:0.0.10" + dependencies: + buildcheck: ~0.0.6 + nan: ^2.19.0 + node-gyp: latest + checksum: ab17e25cea0b642bdcfd163d3d872be4cc7d821e854d41048557799e990d672ee1cc7bd1d4e7c4de0309b1683d4c001d36ba8569b5035d1e7e2ff2d681f681d7 + languageName: node + linkType: hard + "crc-32@npm:^1.2.0": version: 1.2.2 resolution: "crc-32@npm:1.2.2" @@ -5059,6 +5390,27 @@ __metadata: languageName: node linkType: hard +"debug@npm:^3.2.6": + version: 3.2.7 + resolution: "debug@npm:3.2.7" + dependencies: + ms: ^2.1.1 + checksum: b3d8c5940799914d30314b7c3304a43305fd0715581a919dacb8b3176d024a782062368405b47491516d2091d6462d4d11f2f4974a405048094f8bfebfa3071c + languageName: node + linkType: hard + +"debug@npm:^4.3.5": + version: 4.3.5 + resolution: "debug@npm:4.3.5" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 7c002b51e256257f936dda09eb37167df952758c57badf6bf44bdc40b89a4bcb8e5a0a2e4c7b53f97c69e2970dd5272d33a757378a12c8f8e64ea7bf99e8e86e + languageName: node + linkType: hard + "debuglog@npm:^1.0.1": version: 1.0.1 resolution: "debuglog@npm:1.0.1" @@ -5232,6 +5584,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:^5.2.0": + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 12b63ca9c36c72bafa3effa77121f0581b4015df18bc16bac1f8e263597735649f1a173c26f7eba17fb4162b073fee61788abe49610e6c70a2641fe1895443fd + languageName: node + linkType: hard + "difflib@npm:^0.2.4": version: 0.2.4 resolution: "difflib@npm:0.2.4" @@ -5250,6 +5609,52 @@ __metadata: languageName: node linkType: hard +"docker-modem@npm:^1.0.8": + version: 1.0.9 + resolution: "docker-modem@npm:1.0.9" + dependencies: + JSONStream: 1.3.2 + debug: ^3.2.6 + readable-stream: ~1.0.26-4 + split-ca: ^1.0.0 + checksum: b34829f5abecf28332f1870c88bdf795750520264e9fdc8e9041058f18b1846543061ee32fb21ff14e9da6b5498af6b2cb4d96422d8c2dc02d9f622b01f34fe6 + languageName: node + linkType: hard + +"docker-modem@npm:^5.0.3": + version: 5.0.3 + resolution: "docker-modem@npm:5.0.3" + dependencies: + debug: ^4.1.1 + readable-stream: ^3.5.0 + split-ca: ^1.0.1 + ssh2: ^1.15.0 + checksum: 68f4948591622860ca95c10a01cae7f53ff2b2e8435b73b901698083b24ceb24208da12c1db2c47f073d48bc2f64a274cbf30e3c73979734f6fb3fbdf5bdb72e + languageName: node + linkType: hard + +"dockerode@npm:^2.5.8": + version: 2.5.8 + resolution: "dockerode@npm:2.5.8" + dependencies: + concat-stream: ~1.6.2 + docker-modem: ^1.0.8 + tar-fs: ~1.16.3 + checksum: 01381da98f98a3236b735fb2bb2a66f521da39200a2a11b83777cee3b104b32966ba7dfeb93f3fa8ab85b5e639265842d66f576e7db9562b1049564c2af6ec84 + languageName: node + linkType: hard + +"dockerode@npm:^4.0.2": + version: 4.0.2 + resolution: "dockerode@npm:4.0.2" + dependencies: + "@balena/dockerignore": ^1.0.2 + docker-modem: ^5.0.3 + tar-fs: ~2.0.1 + checksum: 4d36633d04ac5f662b0322d2fa4fe51fb1dd5a45f00b07379196ee5ff5dae13688a9ec1adf1edeaefab5eb22f3ae2219f62026241555a8bcf7edb396bbb5a92f + languageName: node + linkType: hard + "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -5350,6 +5755,15 @@ __metadata: languageName: node linkType: hard +"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: ^1.4.0 + checksum: 530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b + languageName: node + linkType: hard + "enquirer@npm:^2.3.0, enquirer@npm:^2.3.6": version: 2.4.1 resolution: "enquirer@npm:2.4.1" @@ -5847,6 +6261,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.10.0": + version: 6.13.1 + resolution: "ethers@npm:6.13.1" + dependencies: + "@adraffy/ens-normalize": 1.10.1 + "@noble/curves": 1.2.0 + "@noble/hashes": 1.3.2 + "@types/node": 18.15.13 + aes-js: 4.0.0-beta.5 + tslib: 2.4.0 + ws: 8.17.1 + checksum: beef4b6d117f64c369f44be631e0f666b966374eac0cc0446fa7abe114b11d6b3019060022eec65c031f150711f4913d249de507ff3da3204e654635db80a07e + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -5923,7 +6352,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -6095,6 +6524,16 @@ __metadata: languageName: node linkType: hard +"follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" + peerDependenciesMeta: + debug: + optional: true + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 + languageName: node + linkType: hard + "for-each@npm:^0.3.3": version: 0.3.3 resolution: "for-each@npm:0.3.3" @@ -6167,6 +6606,13 @@ __metadata: languageName: node linkType: hard +"fs-constants@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-constants@npm:1.0.0" + checksum: 18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d + languageName: node + linkType: hard + "fs-extra@npm:^0.30.0": version: 0.30.0 resolution: "fs-extra@npm:0.30.0" @@ -6202,6 +6648,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^11.2.0": + version: 11.2.0 + resolution: "fs-extra@npm:11.2.0" + dependencies: + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: b12e42fa40ba47104202f57b8480dd098aa931c2724565e5e70779ab87605665594e76ee5fb00545f772ab9ace167fe06d2ab009c416dc8c842c5ae6df7aa7e8 + languageName: node + linkType: hard + "fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -6495,6 +6952,22 @@ __metadata: languageName: node linkType: hard +"glob@npm:^10.4.1": + version: 10.4.5 + resolution: "glob@npm:10.4.5" + dependencies: + foreground-child: ^3.1.0 + jackspeak: ^3.1.2 + minimatch: ^9.0.4 + minipass: ^7.1.2 + package-json-from-dist: ^1.0.0 + path-scurry: ^1.11.1 + bin: + glob: dist/esm/bin.mjs + checksum: 0bc725de5e4862f9f387fd0f2b274baf16850dcd2714502ccf471ee401803997983e2c05590cb65f9675a3c6f2a58e7a53f9e365704108c6ad3cbf1d60934c4a + languageName: node + linkType: hard + "glob@npm:^5.0.15": version: 5.0.15 resolution: "glob@npm:5.0.15" @@ -6697,6 +7170,17 @@ __metadata: languageName: node linkType: hard +"hardhat-deploy-ethers@npm:^0.4.2": + version: 0.4.2 + resolution: "hardhat-deploy-ethers@npm:0.4.2" + peerDependencies: + "@nomicfoundation/hardhat-ethers": ^3.0.2 + hardhat: ^2.16.0 + hardhat-deploy: ^0.12.0 + checksum: 38c06f6b1d482cff92f31f1daf4cc4b6be943e1f62148e29cdddfc481d040470b9d6f233e0d61517fd02cc259f9f77ebd4512ea79624a893c72c90d70eff3f65 + languageName: node + linkType: hard + "hardhat-deploy@npm:^0.10.5": version: 0.10.6 resolution: "hardhat-deploy@npm:0.10.6" @@ -7254,7 +7738,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": +"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -7339,7 +7823,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -7700,6 +8184,13 @@ __metadata: languageName: node linkType: hard +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + "isarray@npm:^1.0.0, isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" @@ -7764,6 +8255,19 @@ __metadata: languageName: node linkType: hard +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" + dependencies: + "@isaacs/cliui": ^8.0.2 + "@pkgjs/parseargs": ^0.11.0 + dependenciesMeta: + "@pkgjs/parseargs": + optional: true + checksum: be31027fc72e7cc726206b9f560395604b82e0fddb46c4cbf9f97d049bcef607491a5afc0699612eaa4213ca5be8fd3e1e7cd187b3040988b65c9489838a7c00 + languageName: node + linkType: hard + "java-properties@npm:^1.0.0": version: 1.0.2 resolution: "java-properties@npm:1.0.2" @@ -7968,6 +8472,13 @@ __metadata: languageName: node linkType: hard +"just-extend@npm:^6.2.0": + version: 6.2.0 + resolution: "just-extend@npm:6.2.0" + checksum: 022024d6f687c807963b97a24728a378799f7e4af7357d1c1f90dedb402943d5c12be99a5136654bed8362c37a358b1793feaad3366896f239a44e17c5032d86 + languageName: node + linkType: hard + "keccak@npm:^3.0.0, keccak@npm:^3.0.2": version: 3.0.4 resolution: "keccak@npm:3.0.4" @@ -8251,6 +8762,13 @@ __metadata: languageName: node linkType: hard +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 + languageName: node + linkType: hard + "lodash.escaperegexp@npm:^4.1.2": version: 4.1.2 resolution: "lodash.escaperegexp@npm:4.1.2" @@ -8258,6 +8776,13 @@ __metadata: languageName: node linkType: hard +"lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: e403047ddb03181c9d0e92df9556570e2b67e0f0a930fcbbbd779370972368f5568e914f913e93f3b08f6d492abc71e14d4e9b7a18916c31fa04bd2306efe545 + languageName: node + linkType: hard + "lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" @@ -8398,6 +8923,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 6476138d2125387a6d20f100608c2583d415a4f64a0fecf30c9e2dda976614f09cad4baa0842447bd37dd459a7bd27f57d9d8f8ce558805abd487c583f3d774a + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -8717,6 +9249,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" + dependencies: + brace-expansion: ^2.0.1 + checksum: 2c035575eda1e50623c731ec6c14f65a85296268f749b9337005210bb2b34e2705f8ef1a358b188f69892286ab99dc42c8fb98a57bde55c8d81b3023c19cea28 + languageName: node + linkType: hard + "minimist-options@npm:4.1.0": version: 4.1.0 resolution: "minimist-options@npm:4.1.0" @@ -8834,6 +9375,13 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -8844,6 +9392,13 @@ __metadata: languageName: node linkType: hard +"mkdirp-classic@npm:^0.5.2": + version: 0.5.3 + resolution: "mkdirp-classic@npm:0.5.3" + checksum: 3f4e088208270bbcc148d53b73e9a5bd9eef05ad2cbf3b3d0ff8795278d50dd1d11a8ef1875ff5aea3fa888931f95bfcb2ad5b7c1061cfefd6284d199e6776ac + languageName: node + linkType: hard + "mkdirp-infer-owner@npm:^2.0.0": version: 2.0.0 resolution: "mkdirp-infer-owner@npm:2.0.0" @@ -8855,7 +9410,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:0.5.x": +"mkdirp@npm:0.5.x, mkdirp@npm:^0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -8875,6 +9430,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d + languageName: node + linkType: hard + "mnemonist@npm:^0.38.0": version: 0.38.5 resolution: "mnemonist@npm:0.38.5" @@ -8944,7 +9508,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.2": +"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -8969,6 +9533,15 @@ __metadata: languageName: node linkType: hard +"nan@npm:^2.18.0, nan@npm:^2.19.0": + version: 2.20.0 + resolution: "nan@npm:2.20.0" + dependencies: + node-gyp: latest + checksum: eb09286e6c238a3582db4d88c875db73e9b5ab35f60306090acd2f3acae21696c9b653368b4a0e32abcef64ee304a923d6223acaddd16169e5eaaf5c508fb533 + languageName: node + linkType: hard + "nanoid@npm:3.3.3": version: 3.3.3 resolution: "nanoid@npm:3.3.3" @@ -9029,6 +9602,19 @@ __metadata: languageName: node linkType: hard +"nise@npm:^6.0.0": + version: 6.0.0 + resolution: "nise@npm:6.0.0" + dependencies: + "@sinonjs/commons": ^3.0.0 + "@sinonjs/fake-timers": ^11.2.2 + "@sinonjs/text-encoding": ^0.7.2 + just-extend: ^6.2.0 + path-to-regexp: ^6.2.1 + checksum: 86d6ebe5baf239b73e97cd4125b03bf5f5d934fabbbf044b801dfc709d786908f68b00eac9ebd08662c20eab39a53ac4f09084885d241e994eb3f502e3b8b618 + languageName: node + linkType: hard + "node-addon-api@npm:^2.0.0": version: 2.0.2 resolution: "node-addon-api@npm:2.0.2" @@ -9485,7 +10071,7 @@ __metadata: languageName: node linkType: hard -"once@npm:1.x, once@npm:^1.3.0, once@npm:^1.4.0": +"once@npm:1.x, once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -9668,6 +10254,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + "pacote@npm:^13.0.3, pacote@npm:^13.6.1, pacote@npm:^13.6.2": version: 13.6.2 resolution: "pacote@npm:13.6.2" @@ -9748,6 +10341,13 @@ __metadata: languageName: node linkType: hard +"path-browserify@npm:^1.0.1": + version: 1.0.1 + resolution: "path-browserify@npm:1.0.1" + checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 + languageName: node + linkType: hard + "path-exists@npm:^3.0.0": version: 3.0.0 resolution: "path-exists@npm:3.0.0" @@ -9793,6 +10393,23 @@ __metadata: languageName: node linkType: hard +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" + dependencies: + lru-cache: ^10.2.0 + minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 + checksum: 890d5abcd593a7912dcce7cf7c6bf7a0b5648e3dee6caf0712c126ca0a65c7f3d7b9d769072a4d1baf370f61ce493ab5b038d59988688e0c5f3f646ee3c69023 + languageName: node + linkType: hard + +"path-to-regexp@npm:^6.2.1": + version: 6.2.2 + resolution: "path-to-regexp@npm:6.2.2" + checksum: b7b0005c36f5099f9ed1fb20a820d2e4ed1297ffe683ea1d678f5e976eb9544f01debb281369dabdc26da82e6453901bf71acf2c7ed14b9243536c2a45286c33 + languageName: node + linkType: hard + "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -9992,7 +10609,7 @@ __metadata: languageName: node linkType: hard -"proper-lockfile@npm:^4.1.1": +"proper-lockfile@npm:^4.1.1, proper-lockfile@npm:^4.1.2": version: 4.1.2 resolution: "proper-lockfile@npm:4.1.2" dependencies: @@ -10017,6 +10634,26 @@ __metadata: languageName: node linkType: hard +"pump@npm:^1.0.0": + version: 1.0.3 + resolution: "pump@npm:1.0.3" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: 61fe58694f9900020a5cf5bc765d74396891c201afecf06659df2f5874fd832be4e19e2f95cc72d8b9eb98ace0a4db3cebf7343f9fc893a930577be29e3ad8b5 + languageName: node + linkType: hard + +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 + languageName: node + linkType: hard + "punycode@npm:^2.1.0": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -10159,7 +10796,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -10170,7 +10807,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.2, readable-stream@npm:^2.2.2, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.2, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -10185,6 +10822,18 @@ __metadata: languageName: node linkType: hard +"readable-stream@npm:~1.0.26-4": + version: 1.0.34 + resolution: "readable-stream@npm:1.0.34" + dependencies: + core-util-is: ~1.0.0 + inherits: ~2.0.1 + isarray: 0.0.1 + string_decoder: ~0.10.x + checksum: 85042c537e4f067daa1448a7e257a201070bfec3dd2706abdbd8ebc7f3418eb4d3ed4b8e5af63e2544d69f88ab09c28d5da3c0b77dc76185fddd189a59863b60 + languageName: node + linkType: hard + "readdir-scoped-modules@npm:^1.1.0": version: 1.1.0 resolution: "readdir-scoped-modules@npm:1.1.0" @@ -10525,7 +11174,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 @@ -10658,6 +11307,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.6.2": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 4110ec5d015c9438f322257b1c51fe30276e5f766a3f64c09edd1d7ea7118ecbc3f379f3b69032bacf13116dc7abc4ad8ce0d7e2bd642e26b0d271b56b61a7d8 + languageName: node + linkType: hard + "serialize-javascript@npm:6.0.0": version: 6.0.0 resolution: "serialize-javascript@npm:6.0.0" @@ -10798,6 +11456,30 @@ __metadata: languageName: node linkType: hard +"sinon-chai@npm:^3.7.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 49a353d8eb66cc6db35ac452f6965c72778aa090d1f036dd1e54ba88594b1c3f314b1a403eaff22a4e314f94dc92d9c7d03cbb88c21d89e814293bf5b299964d + languageName: node + linkType: hard + +"sinon@npm:^18.0.0": + version: 18.0.0 + resolution: "sinon@npm:18.0.0" + dependencies: + "@sinonjs/commons": ^3.0.1 + "@sinonjs/fake-timers": ^11.2.2 + "@sinonjs/samsam": ^8.0.0 + diff: ^5.2.0 + nise: ^6.0.0 + supports-color: ^7 + checksum: 5d7bc61c6c3d89cd8ba5a03b2f782703ae9637aa592ace3da041c0ce18aa36d4752a46276d822f9e982c0c886322935099d87508850051a2668241650e77b9c3 + languageName: node + linkType: hard + "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -11046,6 +11728,13 @@ __metadata: languageName: node linkType: hard +"split-ca@npm:^1.0.0, split-ca@npm:^1.0.1": + version: 1.0.1 + resolution: "split-ca@npm:1.0.1" + checksum: 1e7409938a95ee843fe2593156a5735e6ee63772748ee448ea8477a5a3e3abde193c3325b3696e56a5aff07c7dcf6b1f6a2f2a036895b4f3afe96abb366d893f + languageName: node + linkType: hard + "split2@npm:^3.0.0, split2@npm:^3.2.2": version: 3.2.2 resolution: "split2@npm:3.2.2" @@ -11080,6 +11769,23 @@ __metadata: languageName: node linkType: hard +"ssh2@npm:^1.15.0": + version: 1.15.0 + resolution: "ssh2@npm:1.15.0" + dependencies: + asn1: ^0.2.6 + bcrypt-pbkdf: ^1.0.2 + cpu-features: ~0.0.9 + nan: ^2.18.0 + dependenciesMeta: + cpu-features: + optional: true + nan: + optional: true + checksum: 56baa07dc0dd8d97aefa05033b8a95d220a34b2f203aa9116173d7adc5e9fd46be22d7cfed99cdd9f5548862ae44abd1ec136e20ea856d5c470a0df0e5aea9d1 + languageName: node + linkType: hard + "ssri@npm:^10.0.0": version: 10.0.5 resolution: "ssri@npm:10.0.5" @@ -11205,6 +11911,13 @@ __metadata: languageName: node linkType: hard +"string_decoder@npm:~0.10.x": + version: 0.10.31 + resolution: "string_decoder@npm:0.10.31" + checksum: fe00f8e303647e5db919948ccb5ce0da7dea209ab54702894dd0c664edd98e5d4df4b80d6fabf7b9e92b237359d21136c95bf068b2f7760b772ca974ba970202 + languageName: node + linkType: hard + "string_decoder@npm:~1.1.1": version: 1.1.1 resolution: "string_decoder@npm:1.1.1" @@ -11314,7 +12027,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": +"supports-color@npm:^7, supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" dependencies: @@ -11385,6 +12098,58 @@ __metadata: languageName: node linkType: hard +"tar-fs@npm:~1.16.3": + version: 1.16.3 + resolution: "tar-fs@npm:1.16.3" + dependencies: + chownr: ^1.0.1 + mkdirp: ^0.5.1 + pump: ^1.0.0 + tar-stream: ^1.1.2 + checksum: 0c78aa173cde0df44e5fbbd85077240b8340444bff5ec026539e9e20806ca31b5d4b8cee58befe5c1dae7fa47cd1bb3f9a0efebf2212c2bfbad31f23de329c79 + languageName: node + linkType: hard + +"tar-fs@npm:~2.0.1": + version: 2.0.1 + resolution: "tar-fs@npm:2.0.1" + dependencies: + chownr: ^1.1.1 + mkdirp-classic: ^0.5.2 + pump: ^3.0.0 + tar-stream: ^2.0.0 + checksum: 26cd297ed2421bc8038ce1a4ca442296b53739f409847d495d46086e5713d8db27f2c03ba2f461d0f5ddbc790045628188a8544f8ae32cbb6238b279b68d0247 + languageName: node + linkType: hard + +"tar-stream@npm:^1.1.2": + version: 1.6.2 + resolution: "tar-stream@npm:1.6.2" + dependencies: + bl: ^1.0.0 + buffer-alloc: ^1.2.0 + end-of-stream: ^1.0.0 + fs-constants: ^1.0.0 + readable-stream: ^2.3.0 + to-buffer: ^1.1.1 + xtend: ^4.0.0 + checksum: a5d49e232d3e33321bbd150381b6a4e5046bf12b1c2618acb95435b7871efde4d98bd1891eb2200478a7142ef7e304e033eb29bbcbc90451a2cdfa1890e05245 + languageName: node + linkType: hard + +"tar-stream@npm:^2.0.0": + version: 2.2.0 + resolution: "tar-stream@npm:2.2.0" + dependencies: + bl: ^4.0.3 + end-of-stream: ^1.4.1 + fs-constants: ^1.0.0 + inherits: ^2.0.3 + readable-stream: ^3.1.1 + checksum: 699831a8b97666ef50021c767f84924cfee21c142c2eb0e79c63254e140e6408d6d55a065a2992548e72b06de39237ef2b802b99e3ece93ca3904a37622a66f3 + languageName: node + linkType: hard + "tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.2.0 resolution: "tar@npm:6.2.0" @@ -11494,6 +12259,13 @@ __metadata: languageName: node linkType: hard +"to-buffer@npm:^1.1.1": + version: 1.1.1 + resolution: "to-buffer@npm:1.1.1" + checksum: 6c897f58c2bdd8b8b1645ea515297732fec6dafb089bf36d12370c102ff5d64abf2be9410e0b1b7cfc707bada22d9a4084558010bfc78dd7023748dc5dd9a1ce + languageName: node + linkType: hard + "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -11568,6 +12340,16 @@ __metadata: languageName: node linkType: hard +"ts-morph@npm:^22.0.0": + version: 22.0.0 + resolution: "ts-morph@npm:22.0.0" + dependencies: + "@ts-morph/common": ~0.23.0 + code-block-writer: ^13.0.1 + checksum: 7bf0ec8cc9ab2a4ce528ec249634db315caa01b5783259484fd91ac0dae2f05b94d9c53ba236939fad2b8ab882e7fce1c82a689ab7c9a4a9dcec5c1160d77264 + languageName: node + linkType: hard + "ts-node@npm:^10.8.1, ts-node@npm:^10.9.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1" @@ -11606,6 +12388,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 + languageName: node + linkType: hard + "tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -11645,6 +12434,13 @@ __metadata: languageName: node linkType: hard +"tweetnacl@npm:^0.14.3": + version: 0.14.5 + resolution: "tweetnacl@npm:0.14.5" + checksum: 6061daba1724f59473d99a7bb82e13f211cdf6e31315510ae9656fefd4779851cb927adad90f3b488c8ed77c106adc0421ea8055f6f976ff21b27c5c4e918487 + languageName: node + linkType: hard + "tweetnacl@npm:^1.0.3": version: 1.0.3 resolution: "tweetnacl@npm:1.0.3" @@ -11670,7 +12466,7 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": +"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 @@ -11900,6 +12696,13 @@ __metadata: languageName: node linkType: hard +"undici@npm:^6.18.2": + version: 6.19.2 + resolution: "undici@npm:6.19.2" + checksum: 024ff60791bef86646730dc0f240e8a643219d18c6070d7e067d4f7fd311cea85b485b79ebeabff2bb60f4a7ca18fa7ae37da1cc008b23e7b6f17b289c728771 + languageName: node + linkType: hard + "unfetch@npm:^4.2.0": version: 4.2.0 resolution: "unfetch@npm:4.2.0" @@ -12261,6 +13064,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.17.1": + version: 8.17.1 + resolution: "ws@npm:8.17.1" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf + languageName: node + linkType: hard + "ws@npm:^7.4.6": version: 7.5.9 resolution: "ws@npm:7.5.9" @@ -12276,7 +13094,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:~4.0.1": +"xtend@npm:^4.0.0, xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -12388,6 +13206,15 @@ __metadata: languageName: node linkType: hard +"zksync-ethers@npm:^6.10.0": + version: 6.10.0 + resolution: "zksync-ethers@npm:6.10.0" + peerDependencies: + ethers: ^6.7.1 + checksum: ab1699b63d6b1b0bc9a5a1af6243a2a5b33797fd8aef30a297684570a5e4615bdfbee0259a2f00f900525c0b2062e09fb4378ad16364c7819604c16bc575128d + languageName: node + linkType: hard + "zksync-web3@npm:^0.14.3": version: 0.14.4 resolution: "zksync-web3@npm:0.14.4" From d4ddde4536da12f659d8d58e3bfd5d2cc1deefa9 Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Thu, 18 Jul 2024 09:17:03 +0000 Subject: [PATCH 28/85] feat: updating deployment files --- deployments/zksyncsepolia.json | 200 +++++++++++++++++++++++ deployments/zksyncsepolia_addresses.json | 7 + 2 files changed, 207 insertions(+) create mode 100644 deployments/zksyncsepolia.json create mode 100644 deployments/zksyncsepolia_addresses.json diff --git a/deployments/zksyncsepolia.json b/deployments/zksyncsepolia.json new file mode 100644 index 000000000..6867b0fdc --- /dev/null +++ b/deployments/zksyncsepolia.json @@ -0,0 +1,200 @@ +{ + "name": "zksyncsepolia", + "chainId": "300", + "contracts": { + "VTreasuryV8": { + "address": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA", + "abi": [ + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "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": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryNative", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryToken", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + } + } +} diff --git a/deployments/zksyncsepolia_addresses.json b/deployments/zksyncsepolia_addresses.json new file mode 100644 index 000000000..d10d489aa --- /dev/null +++ b/deployments/zksyncsepolia_addresses.json @@ -0,0 +1,7 @@ +{ + "name": "zksyncsepolia", + "chainId": "300", + "addresses": { + "VTreasuryV8": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA" + } +} From 5e4563ab0f2f98a04659e065b6c49acebf00df3b Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Thu, 18 Jul 2024 11:17:04 +0200 Subject: [PATCH 29/85] docs: add audit report from Certik about the VBNBAdmin updated --- audits/112_VBNBAdmin_certik_20240717.pdf | Bin 0 -> 1271443 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 audits/112_VBNBAdmin_certik_20240717.pdf diff --git a/audits/112_VBNBAdmin_certik_20240717.pdf b/audits/112_VBNBAdmin_certik_20240717.pdf new file mode 100644 index 0000000000000000000000000000000000000000..aa02011bc454888fe9c9165a7bb86a23e0c4ce8e GIT binary patch literal 1271443 zcmeFYcT^K;{4b2_sw)n_s9tc&XbvEzR%~|%P2aTS*V>n zt|_h9IX?DL`sBeA2Sd&gr40j51e^Ip_#RX-(>rzIl;#QTliDXS8mCU^sGc~XjC_#m>_aa6 zpD!^olJ*V0@Ph`8|Dol)&%u+@>ZbMw)g3~@f_wu1=OWGjxd@29?0Zn%#qk``_k4u3 zI-Ybc;=dK^AfJoA((2Cs7a}elJc-fKkyf|z^}l#2;^3)Mnpz0yA%P)b_{%=$k-N=& zBmK|&;w(*(`|W+g0}f)4{c*^n{UgGie8bL!1YHgZ_6?3Wh-_lv9~gl^p>7d~oY~Cx ze8>glDR#cW7m>$kYMwl)qhn-rFgyZ*F-ZDK!Nikw>!hTl{z_l1occ`~`S0h?PXvA< z@DqWb2>e9gCjvha_=&(z1b!m$6M>%y{6yd<0{>4V@YnlBnd6NVjey5nm?v+a-uveR z``@KMU!n&Eb}X!|y|o;4`B<(;YUkC3)Xf=ix{kg6=U*Zxq2@hz%m34`{5;%G1b!m$ z6M>%y{6yd<0zVP>zlT7*w3q7k{S~XBTs?${$EsG6=kVc2zaZ_K+`JQ%01IFPvfQ06 zMaiYT{?W^+*y0oqG$eM@rUSSv>`&N8;s$+;WWONW&+i$m(^zqKe z_UZU|&yF_*OY!aDS$L!^bov>mH%YHaI2S|sOsM`sK$gA|V_s#k-Y4N3G0z|FugoJ& z$$K#sAcTewisH9g#eOYLqp26~jH1#wH4w6OeY;nt0#TFvHj0cnR^eH=v}q>v@BhAd z>UGOcIQ?SeWygW^f`8>#ALuJ{7aN<(Zq2+7U%O;{)8+@Y&d<1Z^iqzKbMrcqWa3MM z{=%9m)fMD~$0r?ADF5-)xe9MxB14)q)kjw#>pcu#lPSn=MqQawr$73S0G-T$95eer z>FsU_JG4FBFMfY>s_%i`LT=xQ|KNC5ftQ1)%?c0UU38;zp8D#v%9JOuM19_AM}Qw> zvOLmGK%GequP=Wf!?e}!Z*>h~Rf4lm~ulf$RhifnS{Z$!=*eR#xwzFq<#TUP$X*=ND)YA-(iQF~^zO*OUP)$*9* zjZyTzH7}2XPrB1-H}Pva(*v6f7P{lj|J#4ZBT9zwf`*83+&EH)&^gvu^oASpMR~;z zRhAXEc{%uO@JgStb>MGoWc!LD&K_iYL9xSp<80Ax@7}qf;AhZwnyFpBS@XH?Nk{94508mHYeXH6o{t-8qOygf z4-CJMN96mcXVMAcq!4D|m*=mZh{8|Vc z1*=o{xVI5q4lD$SWGwAC6*%OSOyrb*d+<)6*{Amp)eU}<8`o|CH~O2U?XNsi?{Stv3e$G@(XCf+Q5g&u zTRpeQRrtzBk=`4n$cz-S)r^MLC3f z?e8x&gi=@LKYI2kABN7W3CemBIK>Qby)LK$$sQ=zdm)f~H0F2|rrTs8Vspi{Ksim% z)mZf0S|~3AnIDin-D2xBJk@C>0)Ts|K85f0D=tOPzQ}i8TAu$y?%Bgr6&8y`hbt&^ zXKV*C&JTlfKj2cPcis)2!WVwL2>hV#^0vaGnR@o-qMOk|p_`EXjHU9oth&j8xQ|m7 zp*f1S%$Y8CWnJZe|Eafl${9LFDX;oUtS6GL--4?Oh%9%~Wsc}EE#Z2)=xzLUn1Qgc zqKSje(3=S56(6%y3$Qq#e@ph#nQdUv_K?%08>K^Lds~Mlz6@6%TN3T6p@hGdCcw3_ zUtG;&2%EY%5^vY?*P^*{XuT<3b73yCofu+r1qxi8DzS3-PR+@!RlryKv9*P z@XDN~=T$dCc*D>ioo)F~9%b&TskNBebNq|Pw)ry2Hcsa-u(KTM1fcDUN#hHn$MMl0 zWTd2YXx;5qL2=JDMUPKF-pOw1W@@*KuA2(S8%=>qY3|p<1E&|*JI@r-yZ_v1Rym=2 z?k2dwb$uI0uPM*xLRu`{i>q0k=gH2q;k2W`qyNdrt=3e=Q`MMFX1Gm@=T)bDG{=HASV{*f2SIB5&#I6;%R$21ZZ7?^v zT06(1yu&>iUzRZf@-JgJ7ctFGR)QCq19jzQ}x$Qoinx~ z)`B=k3Hwsbvh7vTkQ;Cc7)UMl+f64MvL0>}PW1VYSf64ZbZy`ow)Qn(B6c+v@Z&W4 z^H5$1YGn@(a=?1oX;-xd)VoQ7XTgy_IesM|lLH*c#urxFDgNN+_Q>cAAa>vIF%;WR z19DH*Gu0qQsu6>gq5fNWWu|KWr~4;r?&WP@vRZ3`RSvu=d|3URud~{1@R{HEJcRbF zz7+m)j@0Tr8vzlpftW@g5a#UqlVec~DN-R-6t3_nGt&vtvRO}}t;j_cm#oatYhw|N zMIVBNrA^qEPCMIJA58(~HrR$Xvcc&Sl_?tNi%37^rqU3;;%0I_2|08YIsoKhHxR-ppe-77J_4alAzR6#0g|zl)Y*SZxC}4V z8J2B@6-k0Elz#4$0Tl0ro9}58l8GpKLl7%^(Zu6Ay3vs|?60!n6+IU^2ITymch`<; z-~T8)iqtbTpw>RjF}}tAj$U%GkJ~|)?wY|7j96fIg=_-nF32enLpLa3h;X;m#dff* z9Kalg5)Q#bG=p&^SkVmpVL9)IwdV*+60q@KCM?^IS+@OFED95zBx1`QgeKkJZduUg z$MDKgB5^phtRPX!qFX6%&zuBFAZ^vKRJz6*2exZiDxnAj1MLW}w zeRjiOVAb241ZVA#1DuPf_6LKPgd7WZFy#$Y{2Dw^;>ev)ZfLQlj>jQ(Qr82ACY8Cz zwBp!zS6B{*F*~eVhFP!tgs&Je(Tf2QF%^Y!wVFmslm#dz#{Nyl9dCc!;RvxX~_hRnn-roze%(q3-m3o|Z zf-DPbrHx3#Ji$97yd-)O5tYdJ&Y<7=lCW^|cJY zQEZzT(ZZOhnJJ5C)+LJ+JM$DXEa?yg-^xRu!Pq+O6f^6mgh%y*0!(?CZ_VyU7))zA ztgZD*=2zAPp>{1E{pjwItU+Ui+1J6tQ#D7IEz0m@z zh|dZAWcYOrG0U~hyG&XY96OTl3SbCq;%7iZ0_5i6{c(sYYIvC1ivFbtL!YuNOo;w_ zxP11)DEc-rr`YcTHe_QPYqDpyZx4}bI@#m2o6q#7)iT;}fzp#PPSy{8$K1c(=l@`) zMj=!-?eYs;>87^X4^N)i8WqZn4DHXk1itC|XhIP3DKi}MEV|N-+DiZd*z?@rYnRFR zciObyCN>g!W5wd6QAlZ8O6d%k(i>kXe-e^K<2@Z5NQ?GR_g3b5smG+Sz2UgTTt@0n z>uru!YHF6;B`iKfWUpPE+MkrycZ*nC)L_U8+DKBDB@+j#_odw{CEK4@EJ1tZO~27? z59G&oT)z}xk;b8Vq}*~|@hmeaCj#Yy$54aZ9p^F%84P%g9wVq7CA2uMd$C)pkqTY5 zS@|axV%d>iq}!Mxj%lKBKI+%u9O0Nd?%6iBFN#fmbrlTzyA>N!){31pAbvQ?i_?I> z+lb^pzub+-u*Utg-9yY$7wrPun=(04}j05uuH@Ri_Wib7s5sF(tHzEYTHTXz>sn zt@Xnta6VKe<1}`%2iN9f3XU*vmK>`CQ3gc%e$4w6k&rHOvw~4ay#)a%IzO-kl=tGjZ>0>5xR3U=L-@mYv=7(tKNw#gSpF><5N5i0 zWuSw{TYLciepDiMDGrF&LRXmgAM2uT48VpeqgBlML%2nPnCMN^`!hp$x1O=?g3=?U zFW$IROjZKk)45i?vtKF(b zVm*h@FMmF_Y1Gj0mNksOYm}U_+@gKae*oUjrF8yX4J{MzUj-AKcP=@TVCb%Eix@fq zQN}?H3Yd`p>Kyo>(ulyep+lMs;wUgH0X8K7>AY>MS5tVWNNH21N|f7v#g$?8_`=XtvTu8tOpO0q#CBlN zF8w{=J=YSDlaaeg`4^5tb>0^Oh7L`%qE{#ZX@vf~tD7EB@jTEGu&-o?ghO3M@as^B z9TWdD&ykklaw35W?!-*x|$Ouu{=LHRBo}~ZA;ikSi2t%3b?>` ztzgn~BIpeXtT+_(=0;EMeL3;CqscdRcT}Do?QrMfTkkbV-QLj<=aJWv2Z{9Z$QuDB z2UOL)!9tG1SyT&Qy&|Wkr8^0d?F3WK!G-8@x7hxK7HG(L7Zu9aSOP+{mH-m~90mGc zuI4BMg{R=89nc_6xo8Js@gARJ9=B2B*J}q1ENeyshW-OAt2U7(ILy*XC#qY*-E%X+ z!0dIePam7gc5zn?ujE;BrLkGsGqN#GzB1^5)An7ojXRjGu6SQP4@vLffc}@Js7IrJ z$&e2A2)0Jl(2oV2dYY%=!Q~LF&w{D0B<**brq%~ctAlP$aJ1-x8AlnzFUR(b5H_g6k^u;o{n&4kv zTm#+8po(=<=KgTA3-vbVZpj#<9Hu5gC>c8liJID|$ z0m_Ssg8@}XrKIl6^;jQacSC^4EJIk81FU&3I6KehWsRt1t*|2ZgW_T(0X9l@m{qn5 zrB(bQimtZ>n-a|`(gJj(P!^6m`4Nin#eshP;irpLIYKi9F?sP{FP9AIPpl*g zppi*w#cC@Huyu`ypxkcIK44+rO@}gAmuUv7W{SS7YiPjpx+sD+a?vRqZ6`nBa6lV0 zy4{hO+>y07`WN4G{8I;P(iQW5FOg{PN62d9IP^jeoQ5m{=^1h8(c}4@*VY$jol5l-it=(D3j=jl`qs)eN&Thz zrACe2z1>B}SRqZXUXf~CQ|F11udt%-#QDp@6PDCr)`wEB_h~kiohG`_LocIuw<-GA zHaB3Gg(8*ZbqI1#5arz87|wiBiti7m*qHIk*!#3&zkkfi9XqzA%7W}lIuZ~(3;p4q z0CN0ZLEH=COWJ<$B!Sujz4(_rJ|4UeoJ{O5MT1e48b|{x&hO8YSkcgbLsh51Kq{Ve zkzFbPJ}QpCQi99klTYe1^}I|;Q}JIA?+%7fjxtgQGi5ne_T^S>(cbFrrv{sM4^CJH zc^9Nfu%Wt8&uyYsu`HLhX&3;`E1>VFsOw`VPe2u>ZQimWpB>Bx*;cgc&)KeE9!=ly zZqz-4#V;NgrxNuv_{6K*_qh`CJT?q-PVn;{bq%0hQ?$w`Z^U$W)Nao4&;Ia0@3bZb zY}@izuccHc6`Gvn_YQO7pP0czMqun%i0FlPogL{riQh`Z9pG3XG*2Nkqe4;1xaw8v z0@fV|yT^P?7oIgIDx^?e6pL0^Go@Z|Dq4aym&4#viI`%!?5yEVeXQ7K(diJx+r(x3 z3ac2kbdN({FVK`ygoze(M%qYWnh}{Cde3WU@lyOqT+JEl?vJFh6V(vWIsYr@~Wug1Cz_Uls7z`EamhlE1VF^Q&;6JuvJK@*GKxTiGung_Z&!M6(sJ%rDV< zV2#md=p8K5TTn;JT^}YYhW=T+ZH4}=WV^pLDrC|e#r{6z<(1KJ(j`Nn%+Ok4xnqrq zjdJ12)0V@Zuq0h{G9$I;w(M1mdS0SH8vFi)@B#{&GJzFY1WC4b&9qL)+C~}CG6#U!E4iI4cxZ+$cu6KfWr?Ufphf0 zo=pT0CaOS0Oxar&G+5q~LI_F*Q(B;7kRTbfE`g{7lq$H8s07W6Ta#j;&piHv%QfAtuQ%?IN5Y-9T=1IeaP_}VGti0#AV-6g4fMKSq(CK`<^&k;UBvBOLu*|Y|H zPVu~tu%B!|tly6cvf$=pm%@OCo#Np0X!L{`%34^U1@Je4FPuJZYjik2dU*ZbV>SD;DZ)KV#8t?*7z#TFhx8|@>7B1oX&ZM*83&PT4qSrHM z&jV2;M|2J@c6ccAarzN`e2;F zP`=pl9CIMmhW3_|k4+Q!0i%;m_G*yf4h%_Oop=TYS@oN!et#57@QpLsxrNt>omvqh zbGweH(F=FqCU??~_OoA+EqR4)x+smdqvZ;U*L3Wix=2he*|Z8jh=1jPV7#7~97z6I!t*d*DC| z>h3vuZ?t#=kG%&icPmd;L4LvnUI!QsYQBwvOqpI)n#!T%)n)T&FUIJnyQ3}ZE=~=q zO7cerbN8AMw0mr-n(rsW$GqV-&XZa=iZ|b;9c{>;*f}*v*T8|RWx>Smq zcI=7b)Ox!%R&ozMK-WUG<&Y%^h!6Gy9rCMNHo;L?m}kJG%(F8WR_Uj}Onmtgz$*~7 zT`*d)Frp1y{Ztu@+ZMuf48fVF?!%F~SnVsSzamvN_PATNbX?Yhs}97EIl`tx>~rR# zF2GzA8DL86PeUAKznRD+!!lu*rI2BhhuxWvZ5*8y^hU1~vVwMik@R^Vz;G+5?Ve}I zx^mV)WMt^QP0w(g8cCNz+Y}6a_dOUYedE5P(eZZWmD#Z|$A$GQ;}0(u0u&MgqUx&t z42WBVbeFxH%kTXOa$d2ZV3*kXR7mtj%yP$QKzS;J$tkH_hroy>^-7>+Cm2l=O)4-O zxAF+_T*a zsa=_}eOiuQ?;8)07*!M?##9u?lZVwTdHC$&Of%voEvUZKS;k`62MDh**pozzq~|5D zyig*4rvzzRr}Nbg;P_FZ9@p01ziKY@&b!Y^c#SQR3*Qzs4QXx0ui{t!k||#F%wH~0 zpf!|L!kqIhD;&RB^qtExTD{fxKx|c>b0vCu{YXE=a)BRhyfd(_j|uv6&~gwN@RWM3 z3X09ZI!BW67koJy?EORB*m&`byD#Kk=R7+`%7Q#g^;p(o$sc*ZN8{TsilIk`5Gj6w zNU>!UR3VH`#w9Xv=hdfLG63Z?8yuTpPF(8)V@%PIm3V5LE5VZFxJeAkdsb1H@H>XL zFjyH$7dZ$|?}3BQfFMhZYPz^yk);$(IGeoCq4;=tsX-9&Ts`_=x|&r(iu7) z2A!or-AtQSU_o#SG@{>A$Cpf}J9sUq3V^Zo@munM-YZ0`DOcash%|B2Mr(uA_@EhypSS+tS z3;Xir|N3XV0PdN zm%5SQ^m2VC0|%ZU^#DXsKd%T7r8KBu;7oFOjUp*r-g?6|Vd-J&Ft+6;;E{ozVcnMp z2f8`lUHNf@5LaF3&26HcxqSp(t1U}23EF}+*+)FL9*s5uTR$G@9yc0LbO5C=I2TD7 zRekc)eRZXdQSZ5q+}yA{`N#i6`NSxNmnZG$zWo|4s1%SEM*NoEp<{AfQU36AGN@Ce z^~go+PGeBei};6=>Mu;*QPBBTe3y1GtlQJc7R+e+t2Y?XZS#VEof;c+VYL33TM zNBwX^ONR%PNm`)x{p$gt(eKA*Pu#Fs{hs`xKs{E^Ef5vQ7o-!{HsyD=vW)_Oaz785 zzP{fljLr7Ez_*FTC+@iwesz6(tVr^uSiHMsr1e6~(^Ig7bF6V;A#U~~|BB^GrF9~4 zHtY0a*0bUh_XPTYOjkb8INLs@%o+kla!di*%PHg-UJ(nr757B3x{T$i z2cW2@1?c)Oxfu3ad*~7-mWnSoh4SmFl)z8)!RzTz(--ZFDbQB-u7Q~>`*l)Z-|Cp4 zN!uv6F_!SGEmUTeQo{%yQDdu6i2!42Btyts^5@=n%^*K0w>nTM&kex;>Nqhe!1`;5 zRz5d-#rmoTSQsuokS@Mw7ieMMl-FHAA=VTrZF)7n5dh;MRY%_;VA!GBl)2&Ln`lu`_KRb_o?Uq1O(-QZrP%~s@Bpr#w_B4vRg(ua77!z|(D&#zrcjvr z%HJ61VM)aMKaqih_W`;8Qe~4Fw{UEUw`$a3_6Uzxqrz>dcdlhzw}Y@5vX`v6>Qh0h z=4%y)NXlha!*%l%iV&ST z*lG3m3}P;uVg!mG4<2WVwAsPiFzgY#(vAV!%2rx;%*jSYFA z3a2qdTdt-!LC0)R8GuW+^bvObVXnV*e_kpBvWd?IT0kl=J%d14!k+W@Wf_pr>_e+;G5o_w`mXr&FdlGfr5spZjQAb|Ths#&=}K zo=4wH9eAU9o~4imWwGji7h6~V4%QVt-HQGj>68Ml@x))9cCv+Mzs$kiEqf^u&8s85 zxu0Hdu9~Nn+&EI^u!!cH>-5(W`+h&BzR_#>LEv^5aRbPyPJ@Q1;)(4O5gd^4XwhVp=*3m3V-D~*{QT4*XV0E8ee_}8dHLg7s)nE z<#w|KCXfn45DuMD>g-r)-6|#ZML+BW_k(1h3V4)PDYcX;ix2o6hAj|EP_J3qx9G+gcW@L)!NYMUr}mHRdpTrkv*~2YY4Y^=Pai zM!jv!5|t~~@)0J!x$+=w8f&EC_d<$FuY2sxPI ztMG9T-*_dtT4IVTQb5o>i{ZJ0T&PNWU6y*oMUW%%-wPUUE{57*zVgd)Jhv6_ci@KL zO0-ugxvO%4tw74Y_>b%3{jK1pZ*_~-abFq+=Q`t7qE%{o$4#BL1p!!44uk#MZB1^i`u^{r%$byF6L_!CYJr_=5=1t6R#FT)RkvNPTD#IP z+ds(nzU;7qg=sfqSs1K961?vMsj4hv22|zCx;7HE%7*rG-uFWdF5*|sE|?xD?=|}# z!+Fhbj=j-R_~{h%PMN2utXIHI=D4Pw@ z!cWK2WFaf+^p7Z8e&iE&%$JuD20Yv=9x|`n3-=^ZEa?JMq23LNfr=Sv*G;W;K(KeyA(|uN4C5$|m2l0Lx9pX#x|m z1m-t5!dIp%F%GbRE!zq#mhgw}@;wF^6uIxMc|c)0T8=^HlwnhD0ZbOQa48p=LV6I{ zR{`W$Z|f@Y+g&2b!X0s(ZbRGH-?k3&?rVhKXEtORHPpFlhj1AbpV`T#Xlw>Kdz&?) z-D#r)2HgOfZT4cy!wqG-jabf_#a^!iET~*o#{!piErIna2uU6>ZV94pTJ1@|se3W9 zbMmfpxTwT>Y3=(n$+68DaV&@L%4sCG_?OY_?kO|c-De{AUTH#cxVWv(+cBa-FM(t6 ziWtX3=T$U(r(YWUbvZDs0^J~SCP0)Vi0MlcjWrp;OGv_a{}dQyV%YetuHPY^8I0o< z2IE>Pmq5-~OJ|%ma|cvo4Lh)A(nVH3>Kdrukg=iqoslJ}(Xo}i*|HP{*>QSXg4?90~H$Lw~TA`V@vXJ zS2wp`qM%~)zg_RDi|4Bp*(*2?#&u77*w2>b;}PiiSh>sDXyfM~kC zcwjcZ<1LH$1?G9jN56*ZYz!%D*&!URjODAjWVVjYZ;LplfGwg zV>y7P0w%;9NiT<2STf!Hx60(XDGY&u$UndU?V3t{sBgUkMJ=W)ptlu^*sOM>OlCHG z5*Y|VDP#NP0J2G7jX2wrm=Ec$IGNcQmmSWN&wXic>{TEiw>&1Ii4)0Z)47sQZ?1PW zCvX>OrCY0R1vtOCabvK?YhNIyOthCHId%5y4L;KK^;+N80s59hj$P%@H5+hdcrcGe zoW_?#fB#1Zo?>zv?BEGJCYLR@O`H9;du7HRDsM-)-)j#|c=EOLrzQ46mY)*BfA|Og z?;nXOIsR!~bC$Y|?~&2<;kd@em^V$)xD4r1Ms3tWo;xnuR%BwRfZ{R)6eOn|P|ECa zw2J-R&T4Y7dr5^?nLA-=cwov>vGs=`5Sj4MX^_{yTXwhJa08~jypV1~Z4n&}yt#o+ zyw^Obd0*6p-;=g=SHbb2JlgSg8Qa+sTAaS|+LZ(CGP^H^)=;lDdhIqd;|LxN$~y^YeT8 zRk?&8)#th9fh zCyV|ul(j2#{BrDq{HqZ8k0Ua1clTaUR9=Y?_qtY3?WhfK9z=0Dryhy6xr6&Ae0W4E zVH+~R(E=TYY}`Q_p&Xibf|=$eq82>{`OO!+VaNn)^oXd1$F~RIV|ZTf2w;MA_2#qh_K{Vrs0=a6k^`cfpvhY5CQ+Nv-DXZ;765s<&n-YhJ*vd{S zu@qNM7w$7rK^?bA`LjeX9EY_>bF5m_r#7gu6MHGb;-W+BSBdijgGkaq5oXmKhRNqD z5$pNz!s_8KmT-t@a)#A08wQXqEBkIs=VQeVz&Eb}Gi7v2QKrO(BaO*AjV~n~H+Vv0b>Bk;0=GQWiOUy14$kUd@;-X*> zD3cItKrj$AKLgSn0LU#Cni&{0bD$c{?{1pY_9(SEzG8j|e9s^^$vK1|<-=!VzNVzg zGHi?El9&jv4drb!^Yy49W>2@dSF27s=fvCXK&p3V|Gem@I>azjur8YlSV|G#RNZ=2O8j!Mcfogom;9`TwlL^NujD$+ zzfg5aF$=8;g5TH52Dqe`G!iy+A)A4w+68y!)+h1^8Iv3i5} zFjM;8V*Wqu9BsConLQL_MdH6iGi`46=zaZ7ENg!ZU z*}8;KxuNXp>-Kbr1qUsMz2 zi`@YJPSCrp@wei)1FdQK#$Oih$9*3gs?lH(zGMLR;^ff!!=z#Z&SDAWM%TsMU%++P zKjl}#Fb*2Eg61t_QJ2LpeXmes-A3lQwWzYmu@E0jo-?Nw)UK5@M_Zp@Idj9H&o86- zAa`3?^L95d+JPJE@qtr?qZ%*gIzvWF7nU?mf9rg@%HzYaW<5o54SDDIN>%+U&^i_(dgnggFPVsok4ztyl^Q02byq!x1S&c}M$hmR_2~ z-Vt$E-N+PPQ<+1S%>lM5>7AH2)xIdC3sX*H*~G03PFW+?dpuk_(3)z_E>q;jg-$QgSYGSw#-Qg~51d4?(Y^>B>9enesaBxcRrFjes)QEw_-q=A4dM!6}^>ulI}l zK3kbQ+p)4}iNr8*@vB^YzC*#>K177dWt3KQoaGlIDo_fZM<&Y%9im*=f7m%Ih(q{@ z4tAN8_bRg`eEbWxszWbBN8Ld0?SWtr8qBXj61L$(Fr@q_dPe>pT-eU(UU_>{H2LBnJVGDr z4>l#moKufQ;rdn1KqKb-6AYwL<$_ErFM5ns08ACq7Zy;hLOL&RE#6fkYsl^$*WVp& z4Hf)|f)ELvHn2O)UVg)Sl_PxK!h7K!B#V|lD3Pclz6tIzpGQ-XZ)zY9%i~({H(-5kX;b# zHP<2f^BQhtnqz>kknX?hJv0f<W~lB` zq;3x37kceVwTVE!2{Z}$guYSdU@@l9BMg!|iZ&px>O3QfY*zfeoFPNfDxZYL)P^^! z+qBrT10A5HDX-s=$!p6@HMV9ZMZRDEoUO=OPXP%Y4DAVwdzcwyZUd>C^_b(talmT* zK zB|yx+7w^$Dw{UnXyH*!;Efw{B?>&Yuuj|~6cnD{EDAo$xic{o_EhMKC7b?69oF-SJ zxtrO9(r(tk?QRyLqka5a>yQ_VF4vqD)qAqT0OFJNSFN2P{!yw0?i(E-WJ_zXSCl4? zXF-SAU*GWT?TJxQ(>`9=HbmT+*^&OB*<+c+t=5yllZL7xlZI(W*cV`f{B&tmT)vg4 zI>MNE!2pfeIavNS|beY`W2=WK|^@gcqqU) z`ro;L1KKOqzePgnquq1Mqx{`W@u+h98az5U>-fEUuSALx5wODh?l`X;zwKGgWW1d* z$wZ$cekCJt9wrh-pMFq(lJMk3EeJHI9^Y6i0(W*xJv#?3$(}{Zr?n5u2He=v5`YAt z#OzvM=n4%Yk5zh=lJBYEV*zzMSPhJ6#D9yFOdwL%e_3+8i0rZ*mw}eR5cb0% z(jr~<;S2!C2Wf?&t5?cJB#zlZ2@HSJzTQU^t6eZD6wo89F3{Gr&`(TR2Vz6x+T>2 z*FU;wwd(-S_A%{3Nhp4YUipsvpdnz?s$A#GP{*3K-r8>3nn%G})YI9)wI#=;>9|lz z+U!u{?@E4aD^Yu*sVfz09&^ocLBG2C><+jh8z8US#pQHudvfU=+M`PH5W|x*-d^wJ zkX*4YZZHX=6X3eS8nioGkKu^%ES2aq&MjPx8Jl(uH(6QiWWLe?>+Rt84)GyWJkrjQ zkod%O5#3sRX`#V8&#A;7DziZ9;*ESqRuu-CFOK7{tPj4LLWGNY5)n(-f|LTgg_tp$ z!Uc(!MB?@Pk7Oz8Q^xGqp@AEpBSsjJd~0h&;4Bwj)H04A&%fC_;%`fow?;i189oyu zAA-iI_n_EK^3?wBUXU>#B1p^?*P_^Td8Ewi9q&2Vy-&rmt;~G*q|gzoOcYrRH2h9= zFhwRi^t^sM$BLZ;wC_Ld^Iv-jO6JBZwhPNow0wNKc5&Liuh^iXX;OV!f7Ub0`qbSk zLnmvi-=Eal6WDZi---Nn)tk4P?&~QDCe<;5)jlk*buS6uiwf|dW8LZ00!BM{$esfe z%L#*h{K0GCbf}EBm6je<`r{?1NGLbR3;6-wECPuDdJZTKc}^>oMcdv_>3HzI8pP<{;^N?&?yEv z(H`w@|B|L$2PX6)POgg-W)#f2zXp)E@WPHh`yI_y;tN3tCR8y9T0japVQ9MaC|p8o(=im@XZma#rF>Z?gZnuIH~u9lrH_Dz0dX37MH);Vrc-9u4-mQnMJPaHiq= zdfe(|RMW9aPsM}d`pM;C2V7l0qH}lN{`UA-c|#B6oTBE&SEv!3fv%nhz1S22+?@o% zIM#6^cz5>F(qS?Csr5nX%~dIIY=`)^Bgvr^kj0f0h@Sn5D6~oINh@knc2xL7%z#rW?d+7!A)mp0FN95-TAp{>`wnW-9v1bz;;0JmF1D~=k7=E z{uyAt$fQK`w%oIf^~)W%rbSB^U%gPNU`cfzOHsu7myHRi$C4<}W+d*v8+SZA3cfW% zY58OwpK&=U-yvSG$0=#dtViaKv9zZ75O5+d?0%B^C6(tMUua?lkMVmZL5cyk6UVkJ ze8!*NA-l)bzvA-k=#r&MrGGa2ZR1$?Lm`#55#^351XQlnt?9O}+m=WiT!}k`quCTg z9nC5utM8Z%>6g*Y^!9Yo)rUEhSSU?*uDfbPeas;qlSSNtObsZ+ti13CPCQiS6^QrA z&n<~V93+Ius+e_DN!lyhl2aAH^^)gQK{76MK`sgRNw#EbCWW4T z2FF$bPvi1z9+79A>lo7JxQp%-MmxUu0Y~$qIXVc_9rtH~*u$%`C9UC0Yq6Jms-VVv zm_y&8EON6wBg7mrqXwze&9`fX;O(O(VksMe%e3dOk49-YU5RvR6-kvO8+-SqTf)Q+h|xq{DauZmj|m8bvqc)xnj!R+DIM>AeslloDL zfp@5t^l;KkUFXZqv$fRmFzvk^wMMFv9XwHQcX-Np*56<|G}9*9;4qvGRi@y;d3JNy zDe3|{>=c~PVN_kPKaZ`mz|3d2(;RiFcYx8pJbquQ@p`rZX{in{-lju5jA6dGbyBP^ z&I;lHf$0T1NoOd6UcFZ#E-1mj z%I*dg&!XN=D}2-k?gbC`DJ#zZhFbUX==wr|aCr5`^k&U|$IUxDI+w>n)0uV&;rwBP zg3R@G1w`G2iAndV$fuh|2JlzpS1?)kp`n+%jJCK^s9K@^4K6pG>pBBJsExX&*l&>K zL2xOGW^&0e_E&NZj zM=$CdUsEORKh)eEUQ)%w@rmw_7xGVTZr+iND+MgF1==>emI~ofYJZG-5^nmbT~2>B z3HLQ*e43-j=KGnkPl`t_2G%{|GK^|-0FRp7%~OiW^T#i^x5bu3%f8S5H%(U6vV=3& z)6<$^60J;;E`AHC^zKA83X-+5D{p3c+$)z~kOSU+|2&q}mV5M@|0!UH{UMT)ug=xd zt+MEXP588@(Rmvp7$Z8j7Rz0P<3kBwmpw?0H9lLTn!Kh0Ifmq6vIT2Agpg?QZM4 zGhUvlzuNxpK>WoWS)zz@IP(cKuoc5K9z<2GR!A$-FF(pRlgfP1V56``mfCe~_Cv?-^j?B~xm(fYx`L zd9wQt+vC}Hsl3&x*ue$rIzkl5AwBEf!&f4G&&T&_oxeGU5Xu?`4ih{zN)cnR8#~JhyY~ zr*z5Ed0e~gsi_Ei1E!13O2A$cF%{JVWVWY*{G~{yKsu-=N!;>*;wd?BVu!9mkqwoN zMXZq~`^i8Q3WLsEEm8Y-c>9H!`@E#myv}5qOrh{OI1d$>THtEEg(M!kRQLA_#V00z zaKl#p{d&GMetBB0E@%Pl5<6^&(r~+tV2W<>Jj4$e=!pN*a6{vZla!6}Xs0EiawP*6 z%zgus^u9#dWUdu*r?>T5{Wp)^?ro;XTpVhLd=0X|5vUxA-cDd8g5j!_S0;>Bq}8i- z17R^ee+J6%no^;rx{+NMO{MBgzC6Y@8C_b$o#mRjamemZ$=!3HicOkp$6e(#))u^P z*dwhd84bXhQMx%ZbD>(|{iz|c>htE!qYwBL-rHl-Ei>d3@=4#WR!?YlG$nTOgdE{? zqMs3X`{71nQ5m`Q&wl*9@suMqeorEWZd;YwRZ^(VI7;EBv0vE*(G{pG3?X9{DlCif z?;d)6#LwPj1r^(hDP4=ep?qtM%T?9!@CiJ3cu@; zt|5L;^#D4N=XZ^_QnLS>XByc`d#8pDnKE9`0gYG*Vb+aSqsgQc6e$nP2V08=&-aUw zw8b5fjyljf_)w-QAns|f*Ry!@)w^+597(sUMZ49;T&7O<1{AN6XY3 z=P`QpW$t=_^h*x1iVxh+;9DU(Q6 zVY@kSBwD!gh-U8hU%c)-+pW_kaWr(Mv4ipm@?Da?<`FgFGf9&Q!m}&B$`|T)4)TZg zW=uPeklRecMw9BBW)BAMth&6<2wm8?ob$u{`TgDa*H&?{wrh)C5pRa&@FxwvL`ZH( z4jE)f`zELh&HXSGouEO8L_Y@wxC0^CKZeEv<;a0-*Vd$gqJRA?Dl(db5Ufn}Y zGI=H>0eVWd(PwC?`L0v*kZ1={ncoP3-Hzn{T0Ivw?b^V;q*oWW?YO=rEQ03(b_F8A z7NEh*$H`joB66(=iuSRhD1gEs{XhF~B!`2DzgRj7;v z3Jq};2)r|E{j$Cs3(WZe3%kOWHO^$PC~5iRWJ{M?8L{I}4e=1tQ3^6il7>POaEI1u z$!ZCls&QHx47Vi$Sy2RL%jYckn!IThHnD*!FA-_z#E$OH+6283#I+GL+f5}ol<2az zF_(Ni=hKf#hn8>}a@@jVlD;3Y1(l7qd8)$oNjD14#E6d=B&@v@(CT!`QcVwKnT%HN z9#IWd=uJ({%*sq(RL#s>^_aeDxZQk2=3}$Q-S0oUT{c!yYdKCOzbTsDIeJQ{RBzSU zw^YdU)?!JKzvDASPQ?4a4_~_KG`dPs%7XB2Hj`a`8)Xfy$DPIQQ6)b(_eeb3XODhxNCPPS6qI-UMe3uYd+_0!^t-EW{S>ky8t|GPyypib4wTyhlfEh7U?Mh{ zUM$Six%0!0s>2vPWWDxfEj4AAe6JvDjj)WY17FqLxf@hd`o2hqw7)Kxnj4hC!pzZ$ z9Od>-T@yW;lNbAGwFRRPJ(Bbzqg6La@QU2tpGEXzt@4K>y|cbPEH|dlU0CmN_F2)O zr&grQS)1_3sV&xDngtdz_uHJlCor4#L%XoZDexIdL$j|MSZu}It?;*V6e@&HP~h#{ z`Y)(};-N}9Cbj)>)q*N zclK*gVQKO_E$#sj8X|ocaAbixrnD&R-i5pGb(vx2ge?Oaxy&70=p%(Ky#Is&bz)mN z5F~V+rX~zt{Ql2R9Q|#{!XTDT+M64Cbs#^C!@~6fp110;N%3$u$XKtQ3-(N%3s$I4 z!2(UXkYOe*cmeM9>|M&@6#*v6^P%_3gY%8C5y7CR-CLscSp!#?>LCw9g4~aAc|ew) ziw=CQX1qvHSe4N)F%*{WDciY$X45U@_cLRT9O7uYs%B>8@rYL3KU5%u*a;L}&{pE} zOX*y9*8*psqTF&mx>k#eYN~l1;ktR^q~eM7;oG+A6GtSQ1X9jjpJ<&279tHB9wiq<>J`o>t)0TKDGsBjBnCk+8n&( zman5!ZmH#V2Pt#rGeQZW-yCdi_NBaQ2b*%-*zttKslv}gV{B_j?=~Tr10PiO`1(d5}|bRrji4!ED>J_`ABuJW`!_J0)% zKgLexq-YMHp<%($uvOor#U$X{E3g%w;pLN_JpI6dAK(SrS zj#bqy|CNls2j6QmxpYq_Zq?t{9l%)Of<`;N-rq03zqP8rU+kl)3rn0tZSkSQ7cR^D z6fwEtznZZXd7;=kUY^d#nojDDcX}q@Zv757q8~HXx$bzDQ( z3qI}d^nS6_UKlRpin;M~r~GBwVQF*C&p}%c%*9>r+l{m|A8{vacZ>Hw#J3%BI#IY? zO@Go+Tob(TVc>HyhcSjySd&>wVX0u4L&{nP7|9fgx$W)B_X~01V$p`Abg16^Bm*#T zJWp#7YXSR+@Oqvr5U8)ii{~onR=`|b=S)J}2Md}PnBBY>{}O&qiUx@n?@8c@Wk?mH zEB*&^>i#!^_p*FcZzG;>*wtFOa#&Cf<-cmiJ0K3wMwx3Gi zU3p0Rkhx+Qa?(~I4avPWe-6zU)5^qE64jT^ulGqpOZqGj7Xr{Gy%l8oAropG;%VHG z#QI(HxgG-q(Q1c0bM7oYfe^1f@ceEdj?(SYop&v+#=sptqE!17t^1

wUyY=E3~M z2ke1V&kTK#qxSMpv{&;>)UVWI=jAx>7+E=^Y()s7=kkdzCajWHw`}ZgwPsHmNbE`S z4?R(_c^mHjD)2-ML$XQ3?3=vBC0mwzmeCTVTd4L{M|SS_X{m(HoDhWN-LYRe=EYfu zt?+*iRool5Di(Z`cB2H9^mz5KrxIpOMff2_CBRd!|5OpB|1)$S-#FJ_W48Nz22`AG zh%mu}P_OT*vpD6&pB zVgX|dX@x9QZBkZ-xJQFMM>UueXBNlDf`iuW1W~EI4GAZ(C)CdDG1Aj8v%RdF*YZ1yrAE~3f@h^-rX zO8?a#9b0|r*4t39sA)=c`@vB>spQpm*3yy3&ErGot24yYtu@`&JLxifw!5kN;#{IzK{XpbYwl1b84>KMD6NIMF@Fs7Hgz~z@ z;Oe?jpP~F6Df;AHLkjC^_pi74J_4AH{aKcCQBFnTMCGJ`8AW44s|>TP3Y{7oRwJ{U zDKxci&H^FQ{{=~#7O%&Sn8CzA{`hO6sBGiowDjRx>~DHleqJt5OT61e+4c~<%`h7n z@x0jyc|`5IB=h-?;B_>GBb$*{Oy)Jqn@`>iRWZ*;q=S~JtxdZyYv4JYgg6K#!i%48 z;gR9ROV`VTv9U{*xo+ z3rE@c)%49L)V|`iq5D}LBH3s7gl86?X-+FFPoHbck$f(@>Y_d!fW@PtH*j0VmQ#PE z^68TIIX;#r3K%?2R7mS~>F9Ivsd@NEE1<4C(wU$%kfoAt?Y-5WeSS$cW8%o3!q#`@ z`K_;+EB*M(?8o`+oKNz}U1+bpFp#J5$x^4LDgTVU>7};URvWqg=RQrEe?TNVRK~j5@F((6pHu+J(xGir6{DfZi4xm18HE2tjZqF(C_o%@M>ekRY$dAQd3JD&pcjZp&P7}3M}Sct|m zLWJw}f~cRc{6Wnf>BuEs2#JA4JK;mv_5$_^a-I>y72{|9Ecp zMEWNl-H_)SfM5EL+ZJr~Z#R9Om9QQ4JZH~3Xnvis^tr8_5F7ViV`}Z_#Ya8EClso- z_WSzoNgvQJExR5wD|!0uA-iJTFh|Lvx0l>>cJkVPCr#;%&jO zIBdaC^G-$nk#XgH^{BW(Wg&OAs#%$byk1AG2eojKxNLOC~UM;BF_@m$H+m*zDD>KQGq{um5EhPUra;?Wt^&uXmPDN^N=KV(!6(p85MFfr?K& zBIEWQs48AeIOiMm)I$c4#Jx+46CzvQcYgAU`)Sk>yAPH+KUB#kq@_!m8C19@&%3MQ<0>a?gmp?OyzYo4vNk11x_=4 zzsff~aq<-QyXWaq#qMBulLEpUPC_FLJqSZ8>hSP$H2W7F{=MguQA0DCM8$TK%5J;v zu+>NRcMO@@PKq=%V}`xAQ@L9rHUBH5BRGI z?+tk4`ZJsB#-~SBWwhJVlD(z>rYem8@fm!M8hs?FE#P{CgL^y1cTaj!9offL9R*}5 zXAoHftBm7bbeo4;zZ4OcJbct8__~(lWt_{ejNOBw%OS|5>;v-N&P3^Zo^KTQN25Ae z51B2ML@_Q93z#QAY?tvwpD`=ieY*JJT+_iz5|@f5KE2?QsJXS7t?J zfd;Fg-&QxhD{_Zn0eOac*r4DrGbM^}e+5t;jm zn8%CGg_vvC=sm)OchAnR zcZ*;=YVFgQa>di{;TU+ntZg6J#&PSMb*jfT%6gIl;@DPQwmG^wHmpzV3j(p@DYkc% zNemD87rQ_{HY@9FOLbHU`N00b7JOQc1?n~K4W#(W)NdX}FPZOv-nrm#Nmy%G%lL~y zi_a6?U9RgHATr9WaLO0?xGQx-3ZLp~vKHDeM)B@dLEgIesk)YRh+-X!A zGjIQ70A3o-|ELzye^{VKqBk$SU{a2k-du!sl<3Cm3cG^^ zCc#mR5`FSs+8SxBq3tE>R>Doct_Dr||2OmDcc_#cXnV!)CD{5Hx?DW6?P3cJaoa$O z%{9P1RNabkG736me*@65z{Z2KN{S?aie}tAL+W^^43*a#BQB$QH?mx>|Gj1f*iR`# zzSDeQ&f91p)i3xi$f_fCQ zYtZ{Dq38@Zr=eE>UvuVTZAWaYa~`J-fU;s2?v*ezc;%()cvFep)dgSnXjD^kjB{e4 z^7GR^27Ay`_d}*)>IvTnfFH|E@h@E;b6&CKzcNf+V|AXL8!s8VN7-RUnL}9q_?v>D z-Y|OW2wQ6^yMd2VpnYDXFv}TUw|3`;kN>zj2e{p6(KIct{8?*#&)VI;M?o2D8Q6(^ zjPFBC2|h6{k@ev2Deg2q`@PCyI*%EDNT?L?WuLn(eje;BIRHj7QjM7zCa|blnSs4W z@t%@thN#X;bZ&Z1SZ~xGIJyAjr!op3{FbR2ma)j#+jK7GrHj5Y#b2Yy-9>bF=h)|C z8ER%an7*mW3osNFru+v*-8yD!fQIY!r-p>wHp-~9a3Ym!3TPfjMZ#=tmpY8v^^B1a zE(WBiT!jE94&@@m+@FH_(4cLNW)R{o;FZs>&u3ziY0bwI6T>Aujd_13&Dy<)daVo@ zKJvonU@X#NMe>32?V70r|%7z<`xc zLbR1zH?>mi4?0h$i9$}jmZ=zbM{GeGGR-=Z_r*c%-D59Rmqx;mr~B_XC{{^K_cqhmM=`Qz9b`bF?pa`hG61L9n9I?o5MwU;f>I| z6^KtZ8)#_*)mJC)QHYwm*0mE0*ikSAGgV@m9o90t(alTmu@8qv;X9Yurs>q8p~*8q zDB}{n`hnw?-!q;QZNpROZsTg(;2#B#E=KB#@j<^(ru3;IQ(xtQ3~zVS`iZuz5vK?dncfJ?l7Xc1Qq@uP#F|z?pEx)6RyE^(zTiBqW z%NDe@fiiYE$4tf}!fud_w|FT38FM8HCH$l5V2UyaKJA?qBZcG&J$P24_91}Ff??!O z8Vu>a1DWYqFl?(Hdqz-vszMh+>p~aal7L=aamzYq9q8L&oyl7<{QN-7z(jkt{V!7R z#;k4(U>`aVLHwTRt&goC!jJ=j#Z?e}AIf|pps?^DQ`|)d_@yeLq2SFoc8NVP@)L1} zfJt#z`m4g#EPX>y5%ZZ}j|U?}&>O#16U7EF(n2gO;eRYOdQA&wYR+PP0&Oq0KGk_t znj8|$6O+64JoqT#Ozws7Nyzq$TB@5}=Eajq4V5+rQ`o0F)i!4Yba=*k z#-W36erN`b=_ zp5{goZZvvU<0Ul36ZsM@E=sw_Y|TtySppT1~{JEfZe5)7UQco{i{ik{X|EGF-nGG`{^%mVE5%#6& zV?!;~K*3jhP(Ks(1b$JF1HBr%fP`pA7q;hu3rq??#$}!%l{VqY$#_%+9ho3Tf@qUG z>TOa3a(;k)w3zT;!G-dFY*$xgQ_#w{nz}-m9;w+?rC7iQRH&#v;tx|bu?vgS1M)Q} z#otsH^wj9yG(#IwvlH!_^Xh@PG{y6)d1os0)zDOGhWSMC6h3gq)pBqPOS|dr`%|&@ z{Kb!^cT@(~qz{lk%s+J2pIJQcw5;OK@grV!x{=02eJzKG2SUI8#Lv_(MG#E51kF~z z+{nFIQD9Gs+b4el(5m0qJ0FfCQtQ4HsztUAFz)882cId%$69VTrP6(Ok z4tO1f4vdwmQ~mjIR7Pn2?$AJgfk0>q)^*K(R-Fa{TJ6+fLH&-mzUPsC5BlEShdo~H+P>qb6my$|v?#fG5>4pEG! zHr({>dMru>?vLr1|N3Lgv!n7Bz+>!MhYxu0_e|q}@_trf^sx3FWzXR2edp%yh?zVz^0%;+NcYav ziQ+SRv~{&U`1fNG6VF6Wi;h%@l^k)mbJNY{52+jxZ}}B}FJ;wU&Uh4T)~O?G8#1~2 zJi;}S{}8Q|P40S(T~MQ^UUl8) zZ=86@>hL&o%6$AY<#Taj#p9opu4#=o6sMb7{(Kj8Y(e2j#tTXWl7yz;ZHB_`FF{w< z0~9Cr_-+|D$#U;Vj{eR@6gYr7vh;u|)q)xi&hQ@Aeu~333 z;YC`GocxIgYPhTbB@4#7-b2!0DV6KXIvHfKg=|6=WCT&Y0Q8usJ`6uk9h~=Z^*rD- zvSm0sJvY06%kgBpD)`r(+f%rX*4H8mxHdc%@qU2X`bLkn|JCnyW5hF_V8U^)zjI$U z`dZAPX&jxf9R1iW{C-T<;uG;>ocyAunV*Vg|C~0@Aq?}Av=7R@gqMrg=0gv{$=TYUphMFKPv`~Y--a1r<3+Ikuq>R z(;B7;gJQKn&{2C8d}|F5-ue!XOxQpTBACenIm~1Z3IfE-LuK4?%Z2M*!*+c>R2@i0 zhRr0hlL!u#orRUbb_l4W8heepaJ8<%_!o7?CJ--Zdp-` zJ+V==365V_6{Y-*JC0>Z&{J26mxCl58nfc>k9^VB zqq3|T;Elk!jTrxBD7IeYo9DJ``fdFOeUAC{O14*qa|FR&r<fKZZUsP=Au>W{616)&MTHaIp1}y_eC>jhEj&Iqw*xI0 z2f2q-ipPRs_xdz)dM@}GF+*Z}ZT?OsZITUn6~7$3j`ailr}-{J60M0{AhtX>Xe>(y z=((8az=xMgboETAnXzsce?E2_w?^P2h2dCd+Vy?7dS3e&cDi?SDk0z}SwVJmiNVsx zGv&MTw3OMA;EGVF^V#IAc-HN$SiSNmHud5|K zZ#o`}lkJ+V-VjQm3zXJ{JF2_|UAA{#@Oz2g4iB#CKL6mO!VPUqd(}7DJorJix z)lhB}mg!);4qoEIv>&*Wtl(#}BkIn`0g=%`Amvf-5c~3FQbh*h2^g?2y;@pg;+*sk zQiV_CQIin8^8rfEKqx0%$T>y0iaRME5ASjjUFqawK&D2@Wzc!~8KQTpAgzn345tcg z3;!j5#x7yf=^LoquFI!}WSZ}Y*FBeE%|C?v5vdRR*39h;3CAGPU|4!7&J;>M9MVXX zrQ#&;TW$src(qV+d?ebuZs;fw^ z`=2y;B^e93@LqJX%N)Hsd&x2qsTG;}Nja%?o%h^_ z4#eP~KuBecv=>qT>BDQqdwgANF}EDkDTvl3h)YYWYo0NY##Y{w#<=Hu2)E7E^9e zBs?mzWr&D*rjKQVj7(50%HR1lDXdavm$TuAi3-R97@6vfn}rR-z0}j@zg}9lveHd@ z1w2x}if5tX3Sp!hK=O{9Y#u|UZVaBaXq6t8TdHG!5F#UvN33UTZ)9jD;h z+>xOI`ivKOwDGnS)x^B;9K~c15XD;oJtq_MoNgx^mDNYMBmmZH`Pa)*T;$m&uQK(} zcI^JGZW@f}CBl^=XSZ({JDKN9Syflt4`jdR==63om#LS1EWxYaU$VRwJ|pHRaAWy| znu1D;)3t9uW7pWD!m=}O8ZPl_bFP}RMeFs#3cmXz^)m(C59f0_h(p(=47YczEEVJ* zIGZW$!?65}t;zyMaUaPRDu)RE&-+yZ6-YxKTiD}ACF*3>cH8et=&(v5E(EZZJ(CNI zJ}}*9q5CsTL}3cCDhdY%Oa6Y<56}&MI`HG?r5s9yu`a|CwPxjnr4UKjyzs}AVHGuV zuwoPJ?))Qqd}2?s0Nb_)q_Tt}>ZWDzkVp0BYznDn`Z`_~qHY#tdm1(5S#>jAHCnbR z?!(I)M&EV0zdi&h++`Kr~kt-V-ppA;`_}?&{9kWh{70D zoXLu_|CCYyym`K$4>!rn)j)OS%6kcJ1JW-%oStgLYazx*gOgFA5zWo(02-U6O;(2e zCtJyD|9DO$3D7%iymcHoL-ZieX59jY0u8W?c7m{9|DpAHQZm;ian4>dDd1{_UKscc z{noKlswdbLj(HlUR^#+6`S6l7PQD6FR;Ge-X=4T}q4H|F$jQNKeBiiyz{eCeuBXax z!;O-AFW$SsSq>dMOkktg!%_Um5#jOZ3V!-Wpk71OYah<#O3*6%Sa8kQBqW{x4INv&P zaz)b1&`eF9>Uwvu<qV zA}2Ah62>O1kSs5TDqHtk7sIxNK98s7VdGJpl(?iE`(dyncgwV7MP=H)?mt^_D$vNn z)!Wu}^prgt@}di;eKM+|Xe7y1T#w{1u({y)3oq+FS%7t)jFuQDa|uAvwoo?=QuP^z z3iSc6Akb-h@Ngc0!fn~mk);yj45HQAd?1>omWUJc6HXs!lOCuI9H9S`M|@KOuj*8F z3qoXlwf80<faxsV8_Np*1!2s}55Xv}bBLvB9zaYPPi8!(cO&yQrU z`hGKojw-(k&=_(zmI6e|c&cWVG+eVRU|(MB7F9Hz`An~Of*k8ey=wnyLd=lCtO{=L z4uAA>NL8hy64s-n9m=K-W0?5lfa0D;?MY?=K0}ZjD_py;Sf0E8nO^l527wZZ$T89_PQ=u3C)s~ zcnj_NQdrmz=t&~M81&AkYDiJh4|sEXKmd;CeeA9}YR1l&M$1|hqh4Fb;#y{0_()sd zNZ&Gc$Rv(9*)ZCcQ$Tr73@h__@b7zB{;wzd+Sp|gIHQr&EU~-Dx$4G?wn@Kp1wg4x zEk0eStH2%eJ(Jt-1gcM7vdt8l`o(7{_UYxzAvWF*onnUSN}~uX4i7F{~R0BnZ;B53hL7NhYAy* zl0M$qESmnaBOmO4EerWBC|?{gPE}v4I~Xo!RJf*Ayxb-{5Q#xvID{qOOica-$>%HKmZV-8n*86wh+5t#KPsO#|uRTz~on0 zsuAZLda4U`YU8$KEf9`m95o5WOS;mEz5yhoj9w7CX0xh@@FDrjP}Du7xDMl}E}&kv z{>khUA*+K|2VtI85UAEy!t;oh$UY+w*Jsnz9#q+)s><(~_1xKFpaL_Fd-}-EXW0)p zj+cGp`Znbw^%FX`G2}X`kw)bqfjwrUUB~#Y(zFI{c~r~&HV?w^HN4)J8Ku;2aBlBJ z>7!OtF18sL1>vfI*{?P-gIr_cnn-Vrz}IH#sR2(Gu6Roc8@1q1_qJr$E}la!(kiRH zHWo+6-ATsq-#lX(G73EyTTm8lu!~9H0sIt%nN%m9ixqI^Ck%z}lj#k-ogGeT*AU z_&tM*3$L4${;O(-k8cK|p=dwo!ANx#Nu(%w`4(1Nyhjr6Me?oSDjt!eg6HuZLgNt4 z-r5#=5VG(Rf%m4;L=#X=bHUYFK1QTGG3I#F<=KI;=PU4mN_dS|5GLn0a4fcf)3jYH z;Xq=IXfk*j*>pzyYuhvDKzIU{W4S8ybNQL710_}QD};{+f^GmdPR3#2(N;oGd-)@M z#$2o1{Fx);EDv!XwMWgeOfPZ-$>y7}CSnInziV>^cdWB1Rai)0QS4dR@_VF=EU1tu zeWSabyRCnv>6NQE|MJXyvbS?!*eJVQ1D$_ZlMro+KYnmt@cu{E+_dBTC+hqdZr*xw z64`J1J4R$hj1T(BK4alaY!vp00i@=4evL*qUJ3gquS%=J^}ig}Ur7G5zw}sPfqGDT zb8$0&=jzjJ7Lb(Wxi5W~i-q2Q%T44J#f85AuhRV6H{z3Kb0^l*7M5a-J>3aUqpstb z5IF<2^-r9s6?&&R@L(%FYs4|U6JBlARwQdU88d(R71SOMKMiaeBSgT>pT1ksp>s9T z#F{1dn!Zl+e1fjyaqgYe&aF~iI-t{}sXAG-c8IuXWVX^6lz0 z@OS+$pULDVnv8o0A^o8D68JM&4W~cg;QNi7&1k6VD}MAC{|vBDPv8vU8a+RTs?+#_ z-#W$-GQ#g~OW#a|JE{$|at`6A`Om&r0Ypo2U#f%Io+&hif|SLDQO6VEyC*t8{>X(u z*sB2Xtq1!b&L?nvvCDriD4YyF%2QM$Shs)Dl|mC8B5`dq34+|aV#Db3jRa-4Tn$Rk z95dZ{zQ2}`n?guDkP#9NJ~O@{`*h$|t+tImWEv57NG&=S*B*0v z1l=qBKB;aZtZ3^a|C56u(^;%1oPO4%nv2~t<5ip{AQDfMv&hUb$B(%P0QW{X%Aj0? zLC-H|3x(Z;bgm}Kivm!x|J9_8PwelGJdG&upL1=}ssN?M(#FujpiV$u{a%3HsxWT$ zC=RFy@k#TcuCWXi2WpL{(GM2%&3G>O2R)sLy0Jpow+)>Fro#{$J~q)?A01YnzWBLQ zY8XkzUcz66^5LUats!zwdtYOe=+Ue;YoRjracG1%J)Z+die6W&7-|SBui)a zv20WEZvT!Na1bAK-UfO-9IR&}j*+4>P<89|dcY5S8S92B{vWWEXx*4nto-)?&tjlZ z6UfMmSqM#1$gt0MKBIRZSA*sv?K8ZS$+c&oc4)mwnETaD;GHjgkTUU}SJMP2)RfF6 z27nKwvEZ+=C{_d@s16Jv*ipU&T#$737mG z=$U5Jax#8)u2IkPZB)Q3PvH>iI=lUa_m9LyS2ZtQm=`~l#!W(X@HNCOvaw8;J#e+K z=YyjkzD3A=KffbZi$<#!?+{yqKgJuVbI)$Oh4D6)HAvy0+r8OZm_m+S0*BupkQHl& zl*4a;avt6MJ{0~e)YGlEpLd^`Zhjs*_;P#Pi1Ka`WPv@|>y{$#7)TjfoPsK$!Vu5r9eeh)x`8 z+!m6lkI!0JTBWLz+v&VcJugI(g!+#s=82-%kZ`N0^^loUu)xyF z9}}INh07FUu(Sh9V%h*GKuX|R5~EzRFAbf@)o_(q)kE6FWi3{E>>=LM1fkGclu449 za+-Wg%vrTqqCIbRAI}{Sm3Pg<)sueY)}6(}oG&+OZXni9=pyAMnA{WF;<*yT^5N>mzN>jOD%;fb z``qB0%ROg*kL4F>CT??v8oY;W&p)EY!7}TKd7S}+$c@FD#k0^SH66cwv$J|aq@8OP zN%G%crMj2&(aU~o+LQ(~PM+HHHCPuUwj+b)XRZ|Ut|VsV*Khw6@*NUiEhs&d>amI6 z|GrQ5?k%Mbn_IVT4E409pPxNZyF1rjJQ(Ec=FTZVf6lV&uCDN;14FL z;29$VwJENp<60_h;JKF+)YXvnFM-;L`8ETHx99H-&H+lc3^E;fOj1qakd>e2t$!C8 z=PTa#VcnwxzhzeQbV2Rc2lzQ`UFnz5p@L3F?TeE07#0sAcK<{SeXwBQ5j6nfLjjrV z33LMA8V&Tc3Qr0PanH0rK`HS?nq->dKH3H=2{E+`)(+s|V+(S*`mWEp#I4>ISQA&1 z)ke^#s!Fl6d@f{hKuu;?LqlE6Hq*a!RJ4KV!Dx(E8e0>UF) zKIYN6lG*RQjK(>Yhjj`e-*Cs_er@wXeL}7h#4R)D3 z;8yCgkF)^)gYM>2r;~mev8BO0VE}RRp$*QP_{n#~OzwjIJ&q@QHpdnWUh-4)I^Lfi zFWi0l>0lG#T9%*=g3p}7p&COc$Tp+IiKOkjwxff|C@lKboOXn zrl||KE}zTsgr$tGMfT{n)1ar#Z*_@!k)=;(VKo~J#B;YM(t+Q`E9#fbpdC?^7b|8Zqh+}q4>Rga@Xhgp`+Sy1q(P!i8#s9FaetKVt{X|)9Q zi8+#K#lIeg6`G1--Vk4)TnrGtNTjQ0(2?5q0%s@qPH%oZ?6|_f(yCoEq3;D$$84{7 z4>|e(Hy|%;JfaU;PZTC9czy;;bC0ysPg#*oS657;BrnHF?SA_7`l(qmuFyFJ{>OM2c|Bf-ckJ&@ z4YD7ZKQ?ya?&SLy)?MzxR~thkbJtoDl|M_Y%ZK(^xYYld{Skb+zi(vbyR`0V`^qPr zDXD+AOMh5MG6fmNpCX&0H5!LYHA7=L!po*jIKpEN zK~9`Wu0c*7K_Xg+KOiNEaeQy*Eid-_Z3~qKri z4P`310gUQBvA4M|&yA-MmT}R`L60nlUaH04T>os-Et)-c*8mX;3B5n^GRv1yTreE{ z#cZ?==U>AtPQC2j|NFr@rnLE!9M8h6I@gJrsSb=NKLx6b-RQ^F!!j4lNst= z+0SGm+n65rSD+DSj3D038hIW~6v)jxu%aHS`+1uM!+3*5%Nv~ohzX|;h>V` z-+lSYVa2f?wO>43v`3exCf>aD}0!JMH!XZrnB9mT(-KzGIWP_zd8p#)GfkoC~ROsv3;chCe8tK1yCt~5F5Eaa|V9dOG z+*y@5i6Y5@46CxB1zmyqfWq%$q?Gw{28=sIz@-kpi*o&4K|H+lcOTg#C@u|S4_Gn( zHuFTVVm}sK0skLUZxt6+19p9rA|(wiv zpXQ#n9g0|k3`(zRL)T}LQsA)llK^H~Rh9A0LMA7VgUbv&%<1W>iSSBp-29aDGBs`e z@)4%5)P`_E3)Ty`To$J=Mjk=F>}7pNpcP#@>B`eeGZP~-LJRYQ!E)PS10ZB`M=cBT z9=(jZF&u73A2iQm6S6&)GA5G^H8N5kz+0iB^|5g_H%>@1YHC4yUw%t)NJb?p{M!3^ zh`QtHWpE>J@{-%5MK}>7mA}e0c_3Hw1)$D8$-Fq}!OhjvZ(bPDvkOZ13sZ(v}P<)xKRm9Jb2v^>N2%_X<`4}L!d zYDfKs{WUc1s2cy%A!bAbP4@L=eUv7V58B$OzeC|SwXHCMGd9~BKPr2!EiiH#+7@;K z1MDK<1>6*!$?nL940oiYyxx9cBDd>E6qH((1aSw`MvVfhy;(-%MIt9+xyxN-zJsGO zIXS#u2y7wGRmOb=xjqi!W*ZGCS`mkGy;G5}U=1~a)|Ej9jG*|TKz+)aLdbJL90hpc zmuZGWJE2jHOskm$`7;rpe5!$_Q_gGgDa-3~4ZB587)ELaeodqyN2Wa8_*kTEgn2b& z7ajV9uojCXz8|BeBM{!BcsvzeaL${iuxu*jv-Ffa@8vWNLDp4$pChVnTJDNdUqdye zpb=}?>FdI?q)QxeganCYupnbdlpAlaqeO5d&Kni^PXJDAou!fe{A}O zpf_c=cr{HnrctbL3h9|B#^;jCO}e-ADeJBYE*1RS8?~QJdu>0z1Fq}K@D+hiXV@>W zPjOl%W2aQkta>?4h6>up8x18(@25jGj~J>M`rZs^0$ZUUfnC(dU@H3it}V=!1|oUV3lbnj~U;|gy?C%5bYS@4IzFHgTE~f zd|xu@g#9OEKnz4!ZyH`L1k?G`C8Knomvl3jhm^ryO$UVnup~6-u=A2biqWLn(r6~^ zZl^jJ_N~Y%1SkV5?fl0o5G&EDQL(_)(JE}k(1E2+fZ2$}YCu{XU(T zIKexGK&rP>T6m5EfZ8kFXuMurt+~z+%e4HXiqtjDCa?>O@`-@ag z(eMHiYBluDyjiRlO5s;7*j|U$1(<{@v>l7m&MH&Ioymg4J_7zGruI4ARo@LZSU%$h zPC$vZfM9G2RS(s~IrBBjVZl zmq#5_5t-S<^yhw^%kdUT3zZMQeg(|_#l^=E;-VaJcr_Xc=po86MY8*+nh{Bp$e$Rd zPwe)$2EP{r;yBII>vtq6zE20d_=hb$qcy%#QXLN7Z`g60f0!FUW>%5EOlk;|a~tBP zp5{ej_>SLM=N^;@A2e}f!KM0(U+32f=-%6N996^pj9*J-dsT002v3)xkWpd)vJfu| ze00O2+_1LcSEpg+^3lt!fq@b#5r*`8$2gsBJOgaRuCHbl5tF67ga6He=ZWJKX8$L(%(Q1aIc+k~B8Qxaoo8n|Q|jO5*S;N?9RqZpm|6!@5H^u1qYvcNE8IdC~6oe&e)6-jG

W~cZ88z{<9X9S!AjtvYlpxYfxK~ynqzO1tAqAW-|{R!mH zhYdxkKv?4WAStL}3Xo*Di^KO5$4h}<6-pEH%>Hrq2LIQSH3=l@MS1n${3alp4cq13 z)T$JxWhmfb{Xh!ZnmKJREKROT0St0AhJgF=ng?;WCSZbkx+6?S4eK9fQ)Pb(V8!Sk#+rROF7c}k&1*(O;NF&sMV&q z)J!M{p%aiym}QMunoH&l>rT#n45KNN#k()&r0j1{AG23yPN`R}ke_IXjZF%<>it+i zPH+6Rxvj0bSs2GvqR#nZINi)+#rUGFrN#-Fa!ZfV5>$8Uqm|ooyR%M_Nre_>XkfyE zK`CCjy^b9)^P8f#+Hqz*xQ;X_fM&uzbb(?|r>qU1B!xW4b^d+upgzz&))0*5tSMT6 zFVidQCqVm17P}mcM8bwZVJM18r&l{ldwm|?YzH2=HYThUoZY;l<^Hx0=bKsXT|?t^ zQ*fy-bHHsHXz-1oUAw0Hm_NFGus4H8)9bw-%JgtECnTp$bqo1p4u70&*dvGNtObs8=eNBvU-UF;0Jf=YNuE~nRw#p^-u`DNq@-JA zG7kd0>1`9FkqX95OT5V`6aD(SalcI;#3r$0nA{44O@08LhW(X4-sy)cEIt`Yw!%0N z_@jiW!^`K>D#(;%S*R`T(yQg|PeqNbe`Kr$!a3Z%pMfkMs9z?_|8}~+`DGKGF7h~N zf-IMWDp8*2Ou`LP>WvfZx{#YsO8?d3xj`u99QiDLA85_P_#TAWJu!sy>(MWf%*a!`6C4yfGhGPeOJN!rtzyr9fY;RY zf+XsFe{5~XXY2Zkn^qdL@T;-l?%e{tlAE^&eidWSLK#y%$CbH)#@7aX`K(hcI4Ogl zU&p+9-uZr6J(tBWMH|UK-BGD8^}sBOHtc|Apom%d zik9lPjdDYtC~CX6sNl#?gX@^8>3;q*18JGkHAOyvb_tv;Jv99~m#Q8Q&~S$J6)1!$ z{%n4~`i^q4hpps;%Sx+5z_ev9*=853lSvOemH%Th+{t|t8xE!;O1l%Y`=T_Z!56xQU76i8(<~SqkIg!`L%l=OjVAjbP5WEfV$evYdC;86EvUYuif1*zbDk7Kh|`4enI1JC_Z@;ulp9b5Z;T}9NE zRfZq8e3)1tH#6$~1UB=dQCX(erayqIMosuMRAXnp%-p`XM1z4y=T*A86Yqy^R}YVv zGTNO-PMpWveV(0USS*g6;ENdgWg^~u{1puQx%v!O}l<#F+AO%{)j9RHgO6f zs1lU;i>uPf+i|y`c+o&2ocLJ%=@+>zT&9VM0r-VsS{yzao>xup+QP2O(hSg1G0V5B zakIVK9!6x6%kQ;aSYcTA9g1IivbGk#RJ6_aWo!xCvpp{`5>xR^(c`Jfv3fuLxy&|^ z$=Ci|>!G_YDqLcalHZy(uC=v$Y8T5)QAxNDs~?vp<7vYCmkh5MR3c@`KPve*d{+TX zEXVq+(T1slC|F#paqPh@Yx9l}W@FXQcWaH|{H*RzpU!(}-mCm5y;RYo#V z5SMv3@@L;ooUICHDY_nog#j>6IPg8lsM9(^R9?CvDh2r$scQLeeqDOffdp*2rnFp9 zzla%jZjyNs0RL@*y~Dg=>hE?r(r5iv?4-k1@C;Epg=KrwYzRcTm1Yp4Mvh2Ht`@+y z18C5d`^FpIJg@>W$E^GGF-4H;czy}YtuX~j~?`bCUbGciW5kzk-)lMU4O zbl-weozIjS?W(}z$!)jfAnTG1rjnG6&KnTTO!U>}!~@UhRwU@~7fzW6tzphYj~y1{ z^qVzC+#s%je*2mxmdx|115#+`i@etb{ZU19EsFX{;)XFYrL{E57yT5Y9=o#rDvjprlHxZWF|dCw3q~z zfd)FIr=gYO1H4)5yhj`O6dHW~ziUJ^#p#n=N@ZJ!mqvIgr~2dEegoS(X0Gk;-y7fL zZqPnB@sdvXEk0k)|5QIKo+CZ*IJw=0Ltehcj`qIzi8)oPO|4Ts-t`7drRezuZkrJsZ4lsu{yBRKl(mzzU+QbP~W=z?)Ywz#cFRxQW~VF z;SD-Sy)2D;UPf)04tIC>Dx}Fi-Rc76O2YGy+%F!bD9SK1o?u73|D*a*l%&jN$ZYZR z>N|L$S3F8}R0LMcC&6%;)NyHB7K6t)jc_27?K8M?GPo0Je4hOn5Gr}~{>MXf5hvy! zw{Y>!K2=mUqN)he@L}UV_dS^zAY$_rLmi9&qdL|!^n}X<^d*cBc>l$GL`tVpAAk{H z)Ysx6~twY6+Ef zbm((c5n-L)BLpU)iowR~0Sr!mQhLO?I-tb-yx8dPp=9l=Or}I$I$hV~Vq#IK{uLGXYZ}ygce`z(h`YY`NB=M|tETqP%SX0b>(q(A*#t5X&PBHYDMLOyhJkR;0=W?|$T)S!yW7R2wZf<&iDr(-zl1FtG(kF2usYePqLzScCQP=~=Hmso< zsdlMTq7MgBEGWNS!JUc&Z@_O)rI@4Lu3QS!ijIPTB%;7wWTraalC*mqZR5$BTRV%g zmd)NuEL?9TUk;a~Q$#BQo0q(QL73yV`gwt4W17jSFE|UFv%IO>u|0xRfG6FC^$xgv zi}6k>g@GNiX_Re+&cj(f*s}0)4*R!UK9!hzyS@J?ah{=R4|Pi-$rTi(6UC^?BcWR? zmG9_YeC@8_&j0ic168C-dj~7t-XCfLFWo9UEY)@jyJk4=Yd-rGmfZlnJ2F4hwTjE9 zL05sceVRWh-ys=ILJjYHm49R7T{7?L_}`!Pe{Cn=@X%EakshUq8IvZ=j^9QvUK=pCp+o(g>UAUMa|q&ve&le>YdGKz%Rg z?+sxe&+#Hggo}etuQ7}2@0JWMD~@73Vraur26#`iEw%N(cUrT^6VMg)n|+;9 z81=^B8&o5)nGMpDkP7e8yS2~sJ3{0a0ZiFrb&@9Kaxm1K_&|WQlE74+q6gJqEf;C$`8naElhCd=lPjcYi)j zS*Mph8yN$UsehXjJnjD(XD&S|pp<{Y8YsC3((`QP#Zxd==;(@U^AI(n`AMaa|G0)i zSJ_^!$hL@It$U#KI8uiVB}7HUF_q?Er%chZBt`z(b-X(fRAg_8v72NT1-KXEak~h^ z_X7n^gyooI-lu3Xt><@hM%>^U;OT`~g6yIV?Vki^sN)Qx&|cfS6?n46>bl!G*$55hE-xSTbY7j{x7%4JV&`i@k9Oc>@ZD8$pPO(>*5R@uh(wh!A15F z@neJ|=o7jiL*+KffD#)0!~z~4WimnGX-`gKM~G%%zXeRlr8SDfL zCiLZR_oE+}(s1v}U&d*1m3P;tVEa>|L_tUU^@xy)`XNboHZ#Dv0+fk(C{&{sVCjOz@=!`ze=p z)LQHTWPtxQwr1MAVo$D6FkID!CI~WnN5lj~wSoEKY7uzL*ha*4O&PuHbswc}UU zRmD?PS*7X7_x^fD@Jn`u-&fBds_0=?q-U5CTNJEV540x|*TgD|;6|LAK+7f-e^5An zelBA&aAyFzPVWah#}wV1r&PR-TZyGC@KDOJ8^EV>bXZ<^B>Pmg6MJIf;OY^qzharf z^Fb0!ncih#4tldD@_our~OMkz068-<1sI~#zkVH`HY?Dt8~bZK#fCPDx--z-zQFUAPu2wNo+6cHRSwtqpF zFaMbZa5CPFAq`Pe31Xvhv>SuPH-3{7yoj)ym54@|Q3RhZBpV8hwD)+Ue}z@nJsS-{ zACV(35K)y={Xj5qk`@t#+rbwA_IlkW~O&LySdT2J0 zd3b6aZ4(ofX5B=WkRI?%Kcm1Y$JYx)D7N_`s_$q?%IWz55)(g`&!)KRwpsrR`LBkq z0l`YyL~d6bVWst^R)O>o}hrcz^qT*(D0^>DbmxX1ah^X=puKSPwK{3 z12)+&%NV74tv#OltoU&tJfn*C%?I*uEc?$8Z`?1SHrx|G&RJP;WZ814=%XGr`1Ea! zh+u=iW8N!Y8>yBjkB&d~iJlD7FfEdEfT{W*OFD%n!XG)-q(RGeQaWLu-g4-4_y1II zoFc+&pF9U*)M=^=1L0GcWv2nL2J*Y-*YW! zag#{An!8Yjix zmqBH<9`sII%v;Pr9{WG!PFOsW@87ohi7Y}&a!eIn7x|T zFKfo@=h~*SZ$km$y*mO;NQ-L{9C2S!5hxw%M{c>1vAB8AT`py&Z`V`hFN(r(uu=Kn8a%d=NZ;#_t;>ymlu_YIwW6G)Q zMyz9pp2c)#hvf@cHVF6wdMPr$_UwF!P&hudp(a)@qI`awLc}yoNM6nu8(Hs2W7Ih3 zNK-3HK`tyG3*F~^rW%_0OQ8@5LI=V!w2?10>JJ-T`^noBaGAbgo}{+0n>@o^jZBPD zU>Bc@JUUn~TPVrpzBk-LjeH2VVt+l<$xZ+@e&1FBEm<#X<+#F=MpYuqeg_-n-o0gN9<{X3o(?p z%1f~{_5?v1r4yhs8llQsMT)@*ZCUL2|BIpkXes~yx;HZFZ<_s25EISdy<+%EJL&nr zO}F9vOmYHAi}31cglx(A81o{_k@_j!IzGT$8%1zalq1uCeb4n<)q0^R*BG+; z^f#Fq58#=yn&Y-0^+8u1r(|jfIN^>s@s*fCY%Ijgxs4Pge?)$u24S<+cfg{&Ms%iI zG`XTqLUWuQk$KqHI4d1g`%0FUC4peGn!5oYf!TjVp6&_CefnC% z1~|TT{C#)#^W!0J-nG=gA;#o3}>6GktyvQMhk|h@n8zb3Q`PlY8K`2 z@u2@kS0%4!vy{2O4~fi?%C$m|tipY7^T98_1>=E$DkF7dtycNQ`EK6M8U3Bd z3^VIv`0?Il9fw9q?jzIJm}cwiYbIwF%}%_=EdlZH$YU$QIZ|>rdvG!l6Y)9n^kqox z^>)~>?HhVWOSfP1su$UpZ7soLl#hf;mVHQbd;QAj4llcX{lmxeyQ`+RZAq<(1ifsA zo^B*b5S(3&0l<6^FWzE|Uov8=*PkptG{Po zm1Xfor%|0)=c79;)Y}6|zj3%7o3%1Gw9t3Ip-_5*3D@ND=il_wzip~V?eN;cT;t|< zMYav4V7i2cAlQV#&Ut`g9(bVm7uyC^ChC(kKzgnNu4&CJI~6jVz^xn(w1F;VbTC)! zX%%h=f_MR%RMcYW`zo`?cOPd?UN&jvD_%M7S3bF0##Uwvg}K|!oXliru6oM4n$Uvi zE?Hy|pD(okP1xf9CaiPL<{0vuBZ@ig?%IE}|7HQ8*^8v}PE&3`L`Ow>tpv|JK}eyq zw_zvQ=jYSZ$ ztE4(rLH&D-P4$3?0T=3g3<<2@3sNKdg+`bRvNc0t(r=Oxv&R+`I%?Z!DP; zy(D+yr)n8d0w9qRQPha#MX!^$dx_@g_Ybn^8#|XGymU3Gx|Q0J99<&Tj(#?&v$Y8cVTrcRiUkRS@Y$XF!*AI3 z%Q3^pmN=iE+TazK+QKVW7Nw>Lz^wZo2HPsL0S;Ts=khfZ@wF{WHVC3643{$s97hcZ2&BUf%!x?`awhf#$N>wW`ViF(RmL|hZ zjL;B@8~9g`g4LTAea3XVwhax7Rhd@;>rI%(dM3)Y*@nw6$D{D^AA(526G{D_kx`k4 z?!EANc7j92yT;{K+Pxq%t$`h1#v!oB46dOHmoJaDIL~uA>TH!Fo18Q=IZ|2}qRruN z5yvlnQ?(Hrs5QRHET@uM){-62dK4q;e>Xk(dDU;|ZhZ%`@Uu5JdBPO~T%4KBv{<<@ z?ZNg}N7g@9rVlRGzG6LFooux9ScZ>3wi&!QWt70c3=dGZvS9G z_XNv4wbLKodllctDLBK%i0b@EFTHzZq=-YfOy1quLwG=2e!s1o)Lsszofkkm4 zAe_3r_j`l1|2jZPfmH!k=GieRjtS4f>(b`8o9|X@+Ssny<+m)a1%z4I+Hn@B0JfpypAtrG4@u+rWQIC0+lEcUv6D7nq6Wl0J-M6+^4s+Y=18w9T}Fg%`wxEVmZFN#7TS zwfI}07FD8=E9pJ6q;XN5>HhWhGZSj@uoKjyCd$eAW5?Dzyjr6ZX|~2%pH? z2Df~cWDC7yA>jD3V%v{c1J}53!{vd}Bj1MNJH-2@g{(9}z?hr6#wh0^q<3=7^5ffr znI>3^@26OBP}~oW7v=4Lv~Fan-)d2O_!G=Gh4HCiDhFhDaz@h-efucNb`OrC+j{;i zwhXdz=i5#@8KKjeCrtBr)q27)^u1~V@`$c1lgyklRK)>i0Q$V(eYE$&E6)n z-!T%Y?NUl!(fx!w1XjkM%?LEw)F?J|^m_lP7RV0r8>N~yl{$pvYD4~HDN@KU;b=?l zav*^GMWCW^WdKF>f`2egR0 zsyWZfPT*eqCywZ>J)P(*+skMV`m(n~bQIDGtg=o_l14lf_@h#i+^thBS-fnxl4Hn3 zQ!bTLT*Mtvp7Rr&!0Eb06Ln&-I0Agmw?c*5xVI=z4fKF|iZ8KXwY{4aa&1(9;&O1# z1;^yutCiR6`I^ZY{f8^0DPXNapg2c&wt=%@MI3P?G`blE%Q6R#BxQTy^fh>?Cr@mU zS)B?5l=Wd;099_{WuRRvR{tz^1*U18igR8sEmN=ELF4Oj?f%g_o!_rQY2hZAVd^o^?%T6wwt0nTFr)hYa#;0U%-^BsCVq;_c=?l?3_0TP4la7B z4-fLPeeBaN&YSaS4YEff8G11OzP)yy?;Ea7=7eI$X!3%6BqBGvt{G%QLUtRnH9Mk%gtZ51eSy#d(mE;4bipB4S%6b9nKtP;Z&yLHNa3iYxUIKTL z4V=1LPIS!0cs2hG1A8~oiO-d#TxXQu?+9P63o%kjbqrZy+YmJNg?|?_ADL>BUM9u%o;pb745FvG>8B zm~qa`!MOZ=m$9S&}R3k?Bp$Td#4axI;v!oj=2A~fc z-m{cB+D$M&GBe)GlrVCtXz%EICD^`H8iBm&DuvhZY}O zeF#zC1C!IIfD-GyOdYee9s%=kc)i#sCayhMqR}O><%XCT3&RvDape4M9@AUKCv)4h zk2bbnJQETVf>2M;h8%XA?c{Z+3}kD*Cv^+yYLyO=E&D)uHue1Hx#mE(v~k4tOY|Nm z(4K4w6xFBj2E3-$W#sUrgQ?9w#N_FcoN_1zMK&;T)ir`m1!BnYo&4+cO{Uu-3F9+f z^o2`TX*B%A{2XtH6QQ(-m4Au5*wl^So|+u7=^&)+e5?^l7#4ph=M8`7oa9=JhTAit z=+U?R^0k@5FbAaiy>vn+igjbw=eYHEB$;67$qj)|NA+(!L3(JgL{)%%G%l_NmVAJ1 zX`w1PyLG|BtQjmq0*L`BO@LdhCQ$7O1f?a&!`K`NYW)`H0*m9wi^AQL+B$gc-e7&7 zQFy$RB5L9i*sP-+T`Kf=5H@p!n?ac7I*Ndf)7B?<}GvpC;o|vI>BN{N?_|5`{M>3rpNCZ(@ z@+9&(VuLu>pvOII_OuVqRRQ7B+t)6F=C)$3?$}f%gHL?{gzF3dhG{j1i_Izzv_g5i zN=&%){t;qg!E9_h&0Y>Ex+f$E!_H}Ml|pjCtZ24|aq;MRyPQKHI5e8b`la9Y>Z#mO zIsV*ouTVA5E(+S$L56iU!HdFdo9HZc-0-?iSXW<+lKi2)*IX?r%fVal5mLLMUYX#h zF#8fYdvVp<^@2`2LD&9D$4BFYTpJ--=xb@qM8Cx#t?`o(B#cKo_yo-VNAq>aJ_Lt4 z`1Dbmy?t*xG$Nl9GeWQ6Q4djYr|fspE-?k)W#U~UQv>Xdmqhxw7DdGV?`p9membH@ zk_{-w`For{g=fCd;9v!zYm=~r4hAGzj+q59bM=Dr4Qc7oDCOSbBF>9BSE*P+9Fe^0 zO0X*zuU1dZn>qTw0T|Ppj<-LOPOFbt987IRp3f~t+-XyVaH3H+yAZjr3s5C6R;*W` zbFT}~${MGHbKIqOwr*pPRuiKw&FN!zhW>%kkTc20lcpi2{3{&n%vH!OUj>eZjXF6i zIJ=fCF6L>jKVpBm_3k_int1SBZT$;b2P`n-crBF@QIBaLn^7htUh6IdgWTy0ZEU}u zDllIaW0{%T7|Ee;JZ35DR^CH9l=-Ti_%?xi-%Me*se>t#w?_c3SNLA`%yNAo#xd^@ zU-CN|W+Z=CA+r6^sVQU5K5h<1q&mGIDQKxgg&&|Ps=Pz&R~=jko_d)qpd?f!Tkmg_WsMDs|FkX6YLc1WEeh3KDq+ z+!HKXV7$GvP+r7huigxDCBNAVHo7I(O~+bK`D0}S?J%fv8t2zMx(brJB=k+?;4|}XEJm_lUomJi@)mGK<(%c zkjKVzvc9WBt2%XkOSdX(SCweuw?EC~{kWKtJYUM|ch6Lz5>e(~^u!D=@+YR>A{f{o zPVcr~pWsJmkJbp|M-A(-wnn_LagFKaP^Fu=lPqN|DIY&92q!UhCOmoendwcYkC3^< zTW_h}r{3q&v07rj#3`UNzSotLLfDwJA+RjsB^|Zxk0y*>nhDr4VwBXzK~@U=-LE$u zrT*a4K6F8Z)N9T%KuZUWH5;*<==|twHf^7MP!xEu4b*13BkOMak={>O&47FZhg575 z)C`Zzuvdt@Nh%|IMwJOm+vy|9o3EDsb2R_R^_w=-Q|Upc85#X>v@T#+cpefZP-Ze# znvr|-a*GNVSf;hc98_#!fIRH9T008_+yM`WY&=}l8m6IY=4D-YPCboTq1EE*ce>go z*8G6^_s1i;vV+Kfa3J)V|H0G$rroy6hggV>a!etkm^wnhTdrIKXX(VblgLZ<4(-;9 zEYRo=1a(~`AD8%b=8bX02?6jGn6(StG5LqOxE}(dj##+`P%~Q)qCT4jPZ8i?W zQ{aLiKX8I9Ajsn=fCM$=3)o3cwVorO1yi3$fex~_KU!>)nYDnjF$>`Q)x9FY0~VQ& zL;-xRvY$VtuL{WeWM3ewDS*>2bDCF;|C{)!h$dsgt;o4!Yoj;hypBy`b$4yQcz0FX zO~b|BnhQq^M&VM9k90KOR(cjL5q1!Udy+5JRT+G1|0O2YN`T{_C?cs%Pk}@&CotAF zdl5`(v}=yY4T~E^@z)SgVsY5Df17q79^VINz344uq{04d{@(o}0U8=k6Y?bD<|B*O z#pPE|-Hz68Z=&4R(R1+Fv}ikmu{}jm;df+mWj3eDjMAyXu=VaC0!I#BS)$K-B4adn z2hVxd3WKRBkdJrrW8ojqM5=zvjRaQ(g;DUH1cy0yTRbj|&y+bMPXMmF*hz5Eclx;F za3C;GR8pKVI2_Hmf^%|JH(%2BooKjxTSHpkIT`|)+Q!O#*~z~=-Eh^{hukLNmHR?2 zWFZlrQQ2p);uPU)aJrstf863Z>3*_o`(St6<{2H(mGW}hdT{ z7@GTGR}(H-_vcEwNqKd{kzor5_x`neA0AngtU{_yX2-{{a|N3F+uP`LvwCi`(civQ z_S_UKeTGgT2vrOoOZfU=W^j1o*B+ct*@nHv9s))1O|ulx!`9#a6>mSGM2q=$4G2R{ ztJ15)GJ(q3Pl~T5JIcNczDH_g6g8ne4nUJ3UKuaiyZ-C%aee4J(jtU`&OYd(ZAj*> zP!rE69;p0{@A`pGy3ehj)*{s{aB!%vmDCX5UFauK!V54Hg=ieBIw-Byyh_OJ?OleK zXM6zU^T{OY+F#onaU#9_p_3(NVE7!u4^uDQwqek$(-Bd=;yt=s{%H>5ybC=DQ<8kj z@v_Vh12v@Rn%q=8M(uLhYX2|kE(Ui)A9_1lRYboVJ4zD zn|k+`Ucb@_QEt2i(rX#G+C3Pr-&y@gYPOMjNAJdkghnBq@=-p^J-F}&C!nwF9kWf*tI2n}VCutBxtXrxpl#Ut2EeBQ61kq}$?KnAx_`m0njM^?G zg7ir&!UD}DzVymj=zU5}mSg>OF0PN@Iz}d4C3YRma((JXH!ORXace1?_Vcm(p}}LS zK}YGd{&Xjq;?o`Sms>&5(w*l;+3qwKdM!5Q7e8yZd^Yj%V}!q-mqI~x=EQ@f+OHh6 zwDc_E)OZUgoKiABcTJ^^J1zX`9%~{BTb6YEoVhGu4*N#QSKOW8Ll)>D{b5)&&$vrn+haB!SsBlmDD~3KlGjoBeBwrG%v$w?W6Rg)0 zjD?Hf7^&l-BZMCNujiTbH$+N=!*RK{QBTlH%DnKWlcI3SS^X(Gyggi4kG@)x)t=F- zZJRPA&HLQ7T_PuO<|m$0I*I8$_4{}KkJNM?OyI}o%bmk`fW zSe&+Gmj&ocmh)!=lh%S2iPw*3UT3zd4-9&Ff+TgkEDKz-KdtRP{WREl6~l_Ezp&ll zQiV5n{NO;HhYTdame}@>$65E?(^;pTmPfot7G-^+- z#H!djE|c)0{V1|`-F@I8WiR9!{BxtqtW#Fs{RRE+$G7>w8;bgyY(09yq`iu(x}1r) zyL{21v50)Qk7|ZB_LfL=AVw|XMCJ(w&2t55=-gf#s z2{up%)$)ja>7$|xT3mCknsU+w{jP0quz9n8lwyf|KO+d+83F^r??PjsTDd+WA4&ig zc$yqlc-_4&$Gu-PPt)wiX7G%Sx1GE4xnvwz<+=3BCmo4e~mew;C!z`hNdtwbQOjehN ziD@(7WE_~qwY_^YLW(7qLyI1gw+J)FK%3~FmhYnBc1dfbkkKLDR~NV+RlGtt6v;on zGVBpfDoA7^6DXXw;gZYIeflS|-kK~j_VB)uMO?vt7;AUMN@1Ui!w9=hfHa5)i$U83a z0OzpcHwotKU~AH*p2F%_6(p9NP0oID({E%3G& zPcJB|OljPUX8f~bF#=B~MxclqvVvARgp@QwG1GH&B zJMx9+%BeZGpQLuQa@zQb{>FG!R?eS0%L-WX$3FvEK7MEAMtNH?*Y5ZX$QVZQ;c92s zeTv*AFAN}b(!x!y#RG9H)o6GlKy|84eHvSH2dzsK`YVxNo_j5XH(osR7~_tC8Q|dy z)kfT*rd0Zv@|_09*>vLb!A*|rjk_hSzV6wsP_|N#+n-9`(%k;ibCa(!3s;b6zn%1g zT#_=yx`j96Cj^0}fiMvYgjMNtX$l<}_U7*>%Ug+G4#EF-JnQ`5NgdbhhxOu0f>ax2 zvj6tYe!d$QhxY0q?^V-nbFvnSl}Cp>HLCDNQXuk#%EowKk2-ZgV}lzCsp-AGPeWj& z6`Zz}_Fk)DX^T`%HEBfGK@B&&uYml18lv{c?196K?tA14dzrKS=@F8!Ljqg7Ow=6| z`k5RFwfb=>Q38G1j#CIr&T`jr`XGan42HHlet(^bse%##$3UMHuNb-W84W;My`Oc# zo(Oqr0-X$9>GY3I9SqXhuFBKmLf_R{MoJB+^{Kd9TH=&x$C>U*S0-$5DL%iWRkgf0 zc$RlAtj)`dkb$B=I}3vDC&o%dEevVi^gk34eR2+03Pz_tgtqmCzYci-j3ZHYx0DF- zMAl20P|Tw`uXfTWXd2x2;p_HfD^gJKqSEos&Cle?c@LK68H!BJx4|V*=T=&zCT?FS zgW$|%u%@cdYc}wH9u3))cq8+{p@yGm@;o$6vrhM9Riz@#_B(qF2EFCkFFE@XJVB9o zG`F9s3r}NS5!0()+NOP?(|eg^5!3DXarLQZkRgc7zni^&;3UXMIL2{`$@E7sU6^S1 z+4&5mn7goZ>a&v5Aftyeb9eG5{XHdhxF2=vpeTBJ`lB$7CSwtw&v89H_!@2ae@G~f zKfesKDsFVMFsSxk-wVjh4wS&dCGeMTKF~b=bHlo%=kdx|#wnH+(X<{`iOdKJe_kJi z_oKz<^LBEst*COHo}tb=sqs1;)%VCc_VzD3cqkV^vtzjg^=FO(cg!l7u}N=JKNvcD zWJXPL8L)I`b0*MplT(k;RJneAnjt%+v6A~ElCtPdyr0{zUhk?05>AA=zArfP*>Al$ zuw8T?rXn7H2QxQ=L?qd*y75=PD6uNtFqUFCvO3K6H#S~Xl+_6-vBaPMDNkBFpgc7U zrD$?TrR-zk2dsBb_FXxRpMc&0yGfM7*Ay8L2kfnwZNcvBn@?aPKMn{8G^%-YY-Qxv z_pHo*R5SFb#-Hgqu$BCOkNuWc@>MWus{PHr%tsXSk>^`u_zzy4-PF5-zjr2w(A=#f zs4`@EQ~dAkDE<*N7Kv7zsN(at)r)kM&o8|c=~qG6vHHFa8UgV&%}W6wB^xh&H26QF z!Yz1#0}I9G>Wt{KT1K zbp32ib!X$HcfdC_YGk$CVWc?&ZFy|ATHlWoLHVJEbrqA5%f849pA`K(=fWeCqMj6E z^)@+FY&42cl`Z(&3stqoj+xKK=&#?ZV~);-b)bqODqfy&Cmc=DsBu-{h9^iaJal!T z#}68`qc=4^d9FZkNiCY@8pltJp3irA#nGm^`p^b7YX zpa4-*tIh47K#CC80x+;-GXE427Y!rDOJ^5lYrt~yQ$E`JIPv_B zzDIeT76PR+PoiOp#4{UC2 zc=5$=&B>#7BT=-1R(Szj&7`J#?%Y*QWeRn{?V}#Hp5f)C8j&B`Z<|lnV;3)U40JT< zpj>DF$#itMq24nhM_<>bNN9}H!uTlgE*RZ)N8OvWspW2hhk-)qoh~dlCT7dfXly@d zj{t*EhAqb#+qg}nsC;S2VGa~k@-(%(*e)uU`mb^SC1c0_tBDe_gsLP{Ke#A+{8vYo zR<5$8gprftP4c}>Xkgm0PBATsa8$7Hj$}i8SnJtTv0E(rl9)wZEE(qZM>&y?{IAvf z#{DEIU+@sMrhwGo&vK&DCvN%k!If##(Dp%rhi(R{Cil97%rlo2qA%DdcZB>VUxlYe z-@#H1FE1kf2s3tx3k#kvGwQ@@(pg3M-M4)7^9GkTzLyIF<4(W(YxuwSnp86>jI_Jx z$Hji;ZYWjb{St`&ev%ssiBHtTAzts zBx@(?6y9~w&kg&bgz)^W9|;U#fk5J3Pl36vFaHXPrNl+DBH|1iu{=A!MUZbGM#@M^oW##>S$p9!UdR%P(*^o42^J{@r=J<~tBfgXNpTX26&sf@q%$j2 zh(2g|NNC49ZS9%j`PO@~a*5Hl_zudD8l|`8FTV0RSLuGnHr@B6oi4u+D}tNn@C+!e z{Cbi==kWA)t%F2YE>FMGE`iYn`GiUp6#phcUG>c@gU&2b_3x+I>V9;OT2H(q`cXX? z$!T8KFBRmvx|=$g4jp_&XsFNA6BEed^#EBuqxUJ=LvvT?k3ZA3!^otMCGg|rpD1Uj!nH&Y|B}Vh!a0ffA1c8-y5UI8PSyt zdJetw^|m)%fWmmfKoMsM2(->lj3((Yi{2E0zWRg1zqwYo^*xdP3zQW8@5=e^vFE8{F*O+ZC)NA^7g zjJ4XE(9d0m65z~%SHp)6wHgWHqtr+# z3MqLG8Nk;QRswt=so(v%rOCR>SOOg{U(I46fy?rDtOeBHQlfM7XZjKw#|5&F}eUhn>>dTuTEvC1^w%=CZr%0-|9S`p=z?-ZwxVXrUkKcwr+^Lq>V6dzAIvqerV9i>*zMpS zOB>AD%OR@4JhkFKtDu#wT|f7JheLinYQF?ih^!lKa$}{X9GS_%MST-(JC|)F3Be08 zl5of|7dP4V&U4+YPo!MxMxAX0l^$_WBy|E){X8m1J?PJD1T!#(+_1w@I1et1muR37 zq!J8tnJ%8t)>Q|293lc2jOO~C1!hz+<0c?b+iQu-!pPf_%oOTrSq=QzJs%z~x1|@} zss^3;ba;({w%5dezE0glH>Ik?@*WUi0AHHQM}H#xxH+F)J?8-b+VY{Uv!uh;*OkW^ zd6VvvyHz;(JtkEhWz_kr3tL2}C>Oix4G2GlyXitOhh|#2O+;k0EKOhMU&IqK`h1(t zB)PV*y06bTNRPJvAd4A*%lvVE&vgZ5^m>(_Gy`s3nlRtqB4#f%@nvWaWuL*FabJ&q zWL2iFVjK|vMhc3tiO7gF5UlY2Ldf=fxbM9Qb7{LkN`bmpq>SftrrenFg5;xtHl+VgcB>y!eNRqN+Q zC8iGPuc-WJU!Cqmqri;uw#cOnW{V*p*Tv)|EHE$yaGz2v1zV-l_J97zC-aJ*Eyv+CZzuHCxq*q9s4(M2ZnHxnY* z?OHhd#5C`EyNv!iR8a=;QvuwT3NJq8nSQJ2Arm@2qf~lep4wX)7J%->>nyR2j+GU~ z;=tsP7rl&gfi3um;v`_!0c*tmZfUxwNe5pV?=)S)K zghzjIk{*m+tkBupm=@Wv#U{)Gs5kMfKV(%Rb#?3D^Tu8vKfYx3@g;EyRP=<3V5o87 z@~AomFrutTX)D>~%dr8;%Fef{5M(1mq&d^4Y4}@@?gu7=abmt+hVI2V$4tp9r*5g} zCOn@F6}Z&2_?`5=Xd;8TT=2Y9q3UL2J)c&k;aFZsyn&=Qu9ZP*{j=D9fZH&_B>V2u zP`;YOs|+K5edeXLgC8HO&-bV&q6D|NGf^kv(@9~RdG|ivXjXUjW$jJETiro zDM8W07g*EppCI1d+PzPz?tAGN?0m)dX?xm3iin)}K)cYXORd>aFWj8Bn8XkOuF$3Z z;w#rpB21y`Ae*S-sP)p-S9K@;?_ugw9FCQhBDGj?1lR5O=wQQ2PE(UXt$8$8uBEq@ zsNPK`i7Fp=69W&gxs@f)R@2Asm!-e+~syRC|*6R;UL1B@Zt;ShI-(K?6>NA(0Q)b^?hng z?;mrWf&ZkOX{_Gp;>+}z?%CxGQi}zD({mkhk(K`W*BSgvXzB5Qv2geyN`O&wLw;Yi z$@R%%AE^tWQi+WwefCH4yy@iZWwMh93#Uxdhai!SJgE$Lc@`V(lYpG1jSCqU)sH}8 zB#a9AM-VN zU=o70!kog>85{ebhot6_i2D&uYm(2kO}i9SWMXY$}6{~dqG#+cT| zJ%L(~mE!vCG4Z-T7~awEn|KnG1x6U}`!j+>crO{@kXjF@BbOTbFZ$AMSy@9zzW;(_ zuCD8(gY{(Lyupb`Pqd%(vNMhb_B5rT3hFAF9r28qwo`fJwqUqyC0N}LMGOP3=|mN6 zIJ8HW4qdMYU%*XZ$8+!2m7cp{{txE27N9##9kQM6({{;o zh0`t?5eBfA6@LXs8K*cStLx0z){5&(WFP%&;prNsK!~3&QRDYu=3}Lg2=97^&h2K5 zFTI?v&c!xV7FTPb$n~z?yyeC$Ip|+bbB?juKO4+Ote^Uct1UK-GcVZ?dGk6$s&eN(q1n1;dfmxe=2oh z`-jEC4-vF~hfCin+ptG75}LsJU2CEr?3v57w{rP9qO6y;Gmzd#v|;M@B{uc>ah0@R2~3G&KVW=XazFR(r()Eo)Ec8eM(ESr)M4-&VI{^( z1+BQ2u4hHGP7xvW*Ut=kJ^g-R)Y_^di|$W%o3okAF8pyzoHdK5ZcLb;0L@w2$uMgK zePD??R$4BK(lI)rXt?~h+7$VNO2rcdW@cA1`yH9ag_`Xiafx`1VH8kDC$gK3M6Rj3 znyb5W=#i`b|HJwJw@V%H)OE4K?udF&zPqPzKo^;07l89pM9~K^)m37)Pp`|VN0|Y9 zq6>z{=I$78+{47Ds50)}`w$n{qC4OKT@~r0AKAsHy6^4|?q?xDkk;UdVr`npjg%~0 zU+|{6MUn$HzUH~qhMfGd7KiktYB{>>{8~8)VB5azWagM1(`LUlxUrI^8Hr%xKFzg9 zprZSI@?%tjIZGjfWm09g6*M_#g`^@^H-C!l_Fcq82AEi`3wRFcuQyGB#6VKFY2kvF ztMmh|8UM2L22`EeNm_InzE(ZkQ0en_Z!TIfU)6Q>sf0qJ2o+^E^`2F_rIdKh>WllXB%hHwdRTD9`s&W)6!Y8+ zsmrul^}eG=aHOf}vv(=-litghFP+ekdQ{(@*WxkZes5XA8}pQ080tx+h7hGEEtmkkD`kMAGbH}Jt6B7vD{gc6m%5AMYJ_}* z9;<|ix+fNKcDsKo7>M(I-lk~~Y2jqv-JFKY0AB&$ z>L1%$lqRzNZcQugY}8-N!>QVR+ie$^eAInnct?lq*tgOQ{oxF{!CP|uatZ_8%5fd6 zN1VN14%;dT0_}d3?pi;IefvCB1$oLRJ?|S?to~ zzN>8?dP?Byc50>V$yM~W*u~}4xpDt|MmNHutWH<;vC22K01lr34&1Y>tf`9KfAFG zpQ<4JP%>!)PY{6amqO%&Yilkg$G`)3E1eL8+dE!Lt@3lH5%9>XPLQp!WN__A-B3}S zfYGRuE#B`4=yP3qRM4MCPuIxhuNf@&FjjIgVc2;0xnq98r()Q_hL!)~a@N$$6Ft66 zenaL=>@b%U#(>=C1ZJkDnH(ccBZr5jwldI4%+uZ3vNeaGr&q^yKc4?#U?j$|W^>wU zs%G=mv?WP}?u>vWl5#Qi*13g$*1g(*ysK9=f2Xy!6I$l770eb_^yaN@lpqCH-s)G;kU8tGp3fjw8p?2YiD7*D?nY84%K{=9>UOR7-oQ~vBk zNH2@Aw?wrOlVh1?j~+C-CiN1#P}7T;UNe*8;X;8&e;sg{n2jXfX~RW~^8u29;^~oV zon{t^=%mX4r>l*5Jity>xKYv1avt{DPv@Dc&+-=+?Ow*p@N{^Pjzt^DQ~sbTvERXt znSCyhuixjngP9B9c@dC?Ez{JeY_Ss0v_CeO`r};~gBN4IV++r|H$FyM#A}mS3H;&C z;7a|!&8FS)rNo(a2UpPD{~Y+gbgy2G^lCs5Z<9J)|N2H>Z0a9S9*!Frg#O}9 z<9H5077c1#VpB78Xsenf!Ze0ZsH?aYYP>Pi3Jv++5D?_P3=Bh<>hDXf-_8WZ)XJa> z&;}ZeM=R27;d5~aQUUbvFo`( zwgP(E9I#6_M%@qgJ(e0Kf2LF4RK67W5P(H_$xWv2Zw;0l87+j+2B<@RWs?FhG_vaV zF8UPyq>cBQaN4!)`QdfWdr3{Xb7ARflP4CRDVp|=CW~j%9zO+4CM#zsN3X$6e)G=! zg?91j5@AheIjSaFP2B(bQkdpcLYdI}_7f=f8`7o51HwKX4{jP9{;n$OCXq7yN?w7K z+c&?=H1@2(hrdeZj@rgIlJS!0#AtIP3orT=NzQ_1@Wl!UjtZ8N(pP7W1 z-fCQIvYIe74`(NU&);p$q}9)1R|4k87(+s&qPi0syX{C>a3 zL^S4f23$544arE#{JR|4Y;?x~8s?@bI+=gFAs-?SF}tNgA*s7{|mC(8~-cshwJMi;;(`f(U_7HSq55xaRS;wd)X!@q98Eh!LV+`DfsKE9&*gwk^|`Px zNfy049$Ps7vm504ylEq(6mqnEM;8WJZ)M5rVuc{wMOoU~0I+}zD{U%D*!Zt89mI3C z5uzapCg`yM#A{619dlKp-K8T_@79I*U)yQLmZ(ZXjCyQHDh}6{hqn808od>OBFDm_ zJQTxqV?5>U2<3{KFxks!R-*$_%$+@VYgXE<3>;7$g4HCfG*?zEr8kEAz0R;QgL3Fb zK1;)*@tj&Sp6gYzQPJa^2lI>g8EB6XM5)-4cvMFWkfds=z8jVYdG_*}6lXS{Y=K$2 z@zy7YKnhv$r0ThK(jf0`V`JlM7cme8@kjI8)pvq>b1b@YIkoH`T!crohR=J`rQE51 zFeo_cfCob8*>c}a9lWxSTvDJ^KTUIWE>>+MtQLHs@if;_wE(>uPzxB0Q!fBE_4*AX zDW3aWFqMtw6{cDqB7cGb00ah{7PhO^D?uQX}XBn@!K?;V-aoekfR0vGSu&G z=x!z>cbit!cm5{#=zDY_~_53eo_tn z!)sNoS6Li=KN}bZ*==&(aQqgy53h92cVzx2$9KIDMB}mVEd5uK&sPpM|IbBAu|i+) zk+JlwTUMolr7;p&an}bgUVRe^r6SYI-DTyHhQV2ZzzJnF|7F;KKNGt` zB3ezS|vCz>TRLc2ZipmWL6%b&#f4=&A6QZpa zd>Xwwq9{i~-mOA{^zh;yVugzNURKV81}p-n8O~k}%ZSx9Q9ozU z9@?zvk|oZjUORi>n0d2I~z`-@#-T@xXvN{x8?{U?}oj!uaeNteyyg+{Q?CipY8U*!29)4M#b*^$l7u; zqJV;8OC>2EOsllN^q&w8R>&`{td8ul(@YN^L-&jOWW5hhi-7Oi*q1&b9fe-#KhYIp zHLxeAtNg@nW()2h=Q+$E74|khHBdFD68cO}Pe(VhC50pUUch?mveR%|ml96ZC_<{$ z`6G_#^!@SSr`rw)1Dwe})t;G9H$Ow_33J(Qc#4bxoSK`~JoUt!I$=n_F1eIkgdVS+ z>hek9T`$Ll#_XQy*QwkYLZL+aV}JvmFg5I5qO>>vprM)JJ)1E9vSORKQ})F?iB^3i z_)`RLYBM%f*;DrH1c&5?_*980Dj$y|vQ0f~eTOsP%hrBYqKcu-I4SIJ!*!sSFN_xn z;^i@6v|<|5^RvCZ2A(hJnWOlF@~nP#4XNzvD}9#w67*Ah_SD0eF@roZmL2R*{_GC{ zq*X(Q>`b#b*ZK^}lw1^7XJ+n>U#MN{7PiN}y+zD69S^9uRLmYo;cr;Z(Es<e2YCxAEw(!I9~5NzDtjmI&=_n?1VT+n-jOzk7Z142p0k=I( zhkXS6%PB+7bbl3Z6QUZ!BR-`HZvb>nN&nlp9%1g1Ce_@ycSQ7GZ!K|V0!P7}!+29f z83FRVO*H_i5{RS3s$YBlDR_ZWY65&zI||kTz5wb80Aa|<_fIUqa1RKg3puF>Z2AO2 z*aE$CoL^Y(qlH0iFQ%$#VejT0sI;sai7gIK;Ys`Hsmq-cJ5g5s734ohq`#Y(I?C4K zY2B|wKvuh|%HM_xNf%IzbT$q?j03vn+a-O2LZb0HrzSr>Nm)|I>a)cb)l_V(>#+7f z9kmHpFI&^_%A7Cgbkv7*4c)>8NB|$B))`$!48H|UBK=pwG7vrJCf1V|=QoqDu%;Im z`NANA{Ipqqv7QH+D;U|LixfDsQiDgd-w8B#rZE;jT%bGbj&v#Mx}pxWz4}w$^lOsw z)5~Otvtoi_gbS}1;mZk%t^GEnM4x*AAi~maWRn1^PUeuoHs&1k^QzpN*lRWM==)mT z&H)t|FSl6jBuEe6l)+OG=#4EQ9({d^_USS^la{*HpHoV0&aE-!fVJ8qM#qA!I)5$V z)|&Wvqp~BTdr!mIPW4bh0G<-ys6!#HYxtw(H<6v?lLWWdTV-2ESp0peL1%*)Gk6wa zzqMAfb}w+iVauFBJRR8O`_PO`eLqWe2cq3jQ@y@>`KNDFa`4(K!{36=P6Ya8x@#JF zSfS2K?7v@Vq$I2)T}szJY7j@a6woony2I z-g6XDgcJh+{g3Yu zLY^@?4~OjB*2=&`^7`R2a8h+yzehC3hSiRu?;amSvjuc$q)6~49UR00vY3irXUd$; zI?KYe2sOZUWS{3vse+b5>|w@|6X0zG^k!nY6k;@c`wD_UCt&$j9R^1iLTh?5Anej~ zI+9Rs8Se}R=-jVBik;JBYnR3mYvuG>*?Jj7F5(N;6+=T+Aeb>cw=`*UXD80^X zNS~2)Wqk(9>QOG+<#oN2!a9GKnXgNkHBAE8_Kj|t#NYapnb~LMw~mdYDzbW z;dY}R*>L(yn==x6Zw=sQPkoN)C99mJrk^q@krkhXN|0|th6!W?S5lZpS;hiHe-u8L zSP{L|9872>2Evoe)yHb>#?GNa9h`nIOyM>0cwzv%XloK}YrEZrBFCXeT62Jv=sHeR z`N(ZB^i#=D`6gc9heBurjnyL(07f%L7f1!qQ>**VzWvRBLpfvm=$Eiss^?6c=24iXVZqmd; zzq~G^2Yn+IYgg3?#t%%k<52=vaD3ka@6r9*lXMrdHv%i$MJxvoZ3UwoeV~cE6%>tE zE8|Hvp{ZpWwgg8tMw9@VmQ_`LBhx)fp1WMe#GyHfZHw32&X$#=)H&Dl(2nUZ*>}>3 z2S8{Eh)Vz5PCQ)@ggn9KsST*c6YV=?lu@i;J2u^hx|w@_<*sYMVuwp_L*2&<>~tw~ z6ybirN4OihW-BFY-^XrNT8u%2xIN^GBAOT&e;&>mEPk-V4}B=z-H8B~(c3}Mow7Hv zF|p`4LAra2;s2b>^iIKAz-`NY<)8UHx`_Lx9e*@xx}aAj`O`f}j1xAYhQ1hL(G~%B z#D{KaZbcx#9kFTy4jL`{(qHb5R#fltcB#P8lyfq)>Hp2V-v}ycF?asM&%G5CgOXbSTMJrbicA_tIVkb|7 zK=`ahjEU18EtfQrej%9&8g5M!OO>(hE*IWI#35v~3b%}>Fc zoh>mv4XfE#++hW{a?IpUFdUnOMOJZJKjy1=nEs9mqsRjx2k7YS&zr^*xJxj%iFe{P z_hiH?f5Xq%1hU4$nJ&d8X4pf%L^_clez6Yj1d{ERs{mr&gB@T&-gJ6JS-4XPqLWXd zGzP4t39@Cut>yjiAN8Bv0_^R5?W1cydH}E1n%_vUWSeIsku6s*}iV9BLyg(2s zYSJlrd_a9`P@Z0Ut1udJN9uVRNkAwC>OI+f1Hen<2Hl(xM^;8$yS9e3TDQ9SRYv?| z{(DFnnCijO9(ZQzvm3aBFKgGwjDKZ!G+X(Tm_C^7@t-*8^9fDw?2py7pWJ`h-Zc=T zqA;z0POHfaWlUMKI3kk>>>K~I)D5mSeLgqg{UMk>;``XM2gm4DTaHY;!n-D$#7o2| z!RO#bt_O#Gr?b{KyPMThB}+~_1k}{J){r?(Q5Awcb^m@m@526GwahBPIF12bp_{}v zKyjPjhZSg$>Mx9RUevf?X%)KO6Hx6(6N*+j9evs2_-hpXMujxi4+z3vzN9@4;J%hP zh^8o7lBA%}Rr{y-%x|=I>?{4y3pqc4owrL$=~v>IfK_amuISMP7odz020lS)$kp_U zA!dOS77M1`q>z!HPX632skg-e(+lnoI#)b$_^88g?h>rl;ph|L^tK zKGe0MEIjB|weWhN32J0I2vGW+I*G2d+8M-%bK7#%DF{t_mP-ChGXpQAX|u@ef8O8A@^7Xa!whCs6qXl736CLzvwhob?K z+Y?=triK=_^3UGZ(I;fvl|qi`Wzbe*rC+I;XM$<;QZ`)MgUKI@yyO-3g%LLkw`Gzd zo}`2bG)R?%svfMsE~$Cz1sp@DRIH_pHeY!$q9IC76Co`^MS;k!;gT|(oU^(J*HHv9 zFJS4_c3vntY}N7I5yK>HT-ZhE*z_iLcfakgb4s!wsl-UbKaGrJMCrm9OOrv=s*!f4@;*1~#Nv}i+{gl^ybNzK1t>gej=Ljp*G96#WQ0U~x zTsPf#th{Hkd(2X!3 zxQVpSk{TzqwgXh#D@vuYwp^&BT6Y1AdT^b-%kI41esHj_W??`G zi!B$%XcEm#Buvy0zxAJetzb_qERh)ga;ajUk0LFf-n`RI??PKl|2Lf z{LGv>uI|GHn+4@?bxgh>Jz_u2%cKX(^|9&{>ps+IzOrntd%KQ~DQaAyoMfmI;#tTN zpL%t4W=OHx`bB8QJJ}O-9gSos z9g4f^8vHzN#M}+#;Mz5sqL_K$PImtq76Sen^1iM*G)3CKsMkS!y3Y(HYq!tOFE5<8 zNyUK9l4L=AIUQ;XO{=)Z{HFW%^f=PMl1^w(vzSJSObOY#bKNcLr`n@CPaH0eGuv+Z zV+u#_MonYr_7ZRK)>aQ{z^yh#45Zz;p6^!rFB|>sk|}fQ-{GRCHKJgpRgS+{{^rA8RC^ETbS2CK6Ojx04Wkpp!&xWcV$hmQ;ynyAiU0 z5hO|bO?kEr+m7S{8ec9|s)Br?g~8ToFTta`pk|5Ekj>%ASCQ9Uf4=lVGkqE1)RK+^ zR-8zqy`PuWj#5UzD6mpM#89KVFs|3*LES%M2@>5jEE;)ZCYA{!hQv+P%U9Iu*%}b1 z-|Xh>abS5TZ{O$S46e}E4on!P(@8ChAW&_In?v zoXtCxV(TKFxjW%ZWyYxm`Cv^CwTd4xUS{GcSj4AKL)2u8cZM{#6w3tFMibYw$HDdf zElQ4G*iX6CpMh{hD6dq2!wsJu*v!(b*Nfx>x_z-L28MH&H)Fa)i9bE7$M>bDd&PCy zo}_mg6G5;7-1Cm27o31De?#0!S-O_~5`TZrkW)JE^F$Km$DdVM97Lx{2#w$-%@9&L z_+}pP{gZ0x$uAC4IwCIl3Va%#+?R<_e|!LMU-`8is!CQ=U^W}dD!8Ru?6o?T@`(lzV7HmU+w@J_%8I(Oq-gCGd$nQ}&bufH#vtmx;Ip$K5M+G8fn25sjH zdn!y?qU%JF>cLYv!B?)Q9b3JViB!nf6T0ghQyqLpU+FAUv~OQ=-x&TD{uk`1dkf;Q zooR=NoilH+B&yyd1ytU{laZt*pOu*KG}hfrSh}BSUcOJrj6}EB9|y%K5mW;1np(T23xraL}JrE1E=nnCI}7urMWu z_3*o3Gx#n(yG|B226CdsrOLwtU{sYy8wSLkw^gE3p?#eJU1+RfyBufgFk&P!c9eTF3xF7}sZHy)VZtX?a^9Jhk!~7uf zZH#(XP1%pn*>ee{x5-za_@X+PQZ|zAVM2L#@1#A_0^mVe6Fm~}_abJm!xJZfwfzN1)|zcnImuw9|CnO#Ubm5aKLjbmn)CGX zX<`aa=1JRL)L4ruJbUHr?LcDT)KjSWpVv#Jy`lp=2Sua!zZ=~{s6dyG;hXGXRSt3$ zLAeE&_Z|XPtIy0;$F$H><9`-U({yv03f{@uhxu-;|Ga|W<4egN)Q3BaFvPJyqN}Yb z&}0j3?5Rf6bfJi+M{PTB+zrU817*P=TDxSQdXv(MIwo#M?ZlV?(K?NI=zgM_J3>8% z2aevM=r396$%S^X9Mx>TbK0^79u9WFpbCX*`e3` zbFZ}0+}M=&gUt9ge7Ljx7yW7w#%gPtQVl;VGAkmzCQretBY_*0mi=T0ypZ z^F9mrcsv>6(^K1elA9Y&*yOB6JpQ??_h%>8qj5Y5xvuhRr68-pvS4*kPy&w4GnB(OmN$#vOF4NPvUiEL9euQp@rTToY zaenu{hUt9c@Xm3%=NV}JQ*B+v_jTr!0S2kQUwslWLzvL|-8j3!*<+f-yLNibq#+bM3sk@j!0|UftN6AZWdyCxDpUzg_EF}Mukx02~)L!byk+qTUhi>G2ogN96 zq!ME5;kqsP$lv6w;T%z54WN(S5C7|o^(XLg`OQz7qO$P?Oq&ao$e%L_gZJ>|h!T=vt+K z-AuQlM6~j^W+95ueMKp57!p2b!IQXNa$?F)m{o;JXF%k+X=hDfBTf?F?rO>-bEi?V0J71$yBQ z)y-japl*XjwVMhfCm&}lVP}B(##>n5qaSyz-1juowXkLm0XlCQEh5e&b-t$USMd?J z04WVsJ|%eL`71Z;_9QtEp@OCP*5NWyz3=we`MCk?JXX395c|nIphGpGSDAiX5$CsD z%EGfsLw*kZe}e7sMm(+W$8kBE?DOAWs1p6s22Mg#*vgYq_=N$yVCN0j6@~WJ_dFJz z#T>zbfq_$&6dWGV&}6Crnn_8^ab#Ye>Nob_EofRCez!5+2b-waD2^M%)eDhOQTI)z za=X||nP6_$mbsrI=6E$&k|wK#FY>JYf!z@wX=w$Z51Mt($F zXGmWP+rHT2Okmkkm+YEVteGuNQ&(XJyFL?N7t*)=EDd!RBiB|XD!V5TbN~1zqheIq zk!6#AovB5uC7cI2J%adzRM!(Rcq5!GTAQDVOn?G4>2e{r+;0vbcI-%YJbI;p0R<)P zw3z~LMP_ez_5}9MAZ0oIb$5EwjQywlUlyV?{j`Mv<%7fTfCeBpc8Tu=TRt zQ+)Qd1AiDwUv=X@$O_y?7UXT0Cn0MayfUZh?^{Oy15_P<4XLx-mjYhWenZKB*^xG? z&iGn8)bhN{d3*5m;g{pl?bJU$4+IuEb&hWJ*&#&L)DeCjz(K>{ zYJXElCLRz4Fp@6_9XVBzRtZl?;NoslfK$7DRG7Vek(}oI2L^6{7_7^1(2$v~vOo}e z$n%X>w9olN03q{s4imz+`4?ahVJl}_ZreU4{Fu%W;!vH4DEAsQS1QOU1fJup`XSMi zs3mK#AWxXiRyje~cZvzkk;lw0BmJc=)%(_@B0QywDtq_U5yGVy+lw@~;TZw{ zcn+5>s{<65zuixvQ9l*@yv<7a)n4}s%DT9BtPfhC@THew?>!I!69#; zpET=hhrYnzfc6d{0(~RpTDWy3`Ho+H{Q@ifVCi=BtDHte<;q9aubp%z5fo>47Xj-C zyXfofg|xW`@=w()J{Jl}bkR=CO#fsmT&CGW_^i|niV8HL(d&t5Z(V54G?(h^L_kHZ zw&c}u`hN($Rfh+o9#r|n4&i4tTM}K4HWYE@=*!Lf!_dX^?N(GQ-ReJdz^#-IVzt6- zzvb2{sG!y(UjhcV)LpPO@IYuk@1lzcOOPJkBgw)6gG!S~G>;A%VJ zyocXtpU#*&0uGw>h#GA$1 zguVR5BsHBh{cT_j^i^<9FyT^Ca#|2N;D%zWFEr8B0_^N3HoRT8A+{*6Vyiw}-_5Ki z5Su9ZZMYSq(TQDRtq(k7%MbS`@OgNn^0PG!2k})wFXNrCe@85P+}K6?ubOOsXZ|-J z*$lcuYq(Zr*!%RG#hL;~@t83E&UNZaPp%S%C0!8*e^?qo2N5osmmlyY$|Bf@Zs_Qv^S!`wsk$l4w7*0_F(N(3gKkjjIdQ4=z7wvOhp8T`p$VOD^&Rc8 zWZ9`KcVgIGavfX9uYjNEA~h;daTHI>dP7vNbgXtRXgc3>)iw6J&IB(NCUg$YQfR+jQ)g8n4E%p^daBqN|hYt&>Ip0*C8v zc!fnqmP>0WC$S011dlGiKJSdsLhC39lyz*@ZSfOhzc`Y7bFsHqp4LzIc}w`?))0Bl z_=C9oE*VAK$3$V`x08ZHm(lEC1f%yMNs@GM548U3?{VBFMC|BRnsxE~%TUH3 zT%TZ5?GWM*Y+~fT9I8k+_Q{tX8Gw&-Uz(}~O{IZtQ4pyZt@k^MfG)HW(C2^5MQ>Hw z8+L~i#dZHLc_P^_2+%}FX%7~!B7(F6CHi+In8^s?OP?~j@=(OCPz2(DIjc={ai%bS z1Ug=EH6lzKk6qa1y^qQeIS~@JSVui3AsN41Tn(Rfw0lz8UO23eu&r7v08K_;&(QVR z(RV2l#%GUwCQa7hJGXpV!2r!x^S@+l4W_qkO1j>KaWyaqi_CqPnR^DfR6Q zpz^Xxy4T&i%wn$5e%+o{Rg z-XzS*|03+IcnB^67-CUo_$S4_gj%_^Wd1*MM68W0c5GK% zaLi|L*I()x=gaps0dM^EvyQEQSDG8}dIM57y;{G$;efUjqBseZ61WCzxXfLN{dJsJT*AGWT_rpVOKwYMZ zJXmGWzjfFqXcbged$dK6PZ4OVi3H`0zCWuTuJT~|dp64cXmT}u(J9EL$h%#{ zt_;zv?D%dU+<6cIw(b8tW3!x38;B$tm}*&0yE+>#p~SBX(<*o`K?4O=$Ie{1J*PP* zq@khL)A8wjJ|<5h8W_svb8WaV6Q4SFar5LWPUcrZS5FtuTr#Z#v4(enn1@d@<<=AY zMn9sjyX3TxjQLmwj{N3UROAczBF#`45UKB#k9X{m_;s-^rgSnxKdym&?;`6Or%7z? zS`)i$K8J*HyHm_wc_`iYEMyhI?ZH|@!bxC~=O~~B_7C7;?LfHs+kAd$D4!~qwG4UT z+lxK77Zcg!r(08e=1OGqgQSa9?P!D9KtWFm+x1yqS6!#l-0t?6!IVYEtFyP3`#G-I zA^8}09X1`{7kjnlo!`vWJoIJcYP2ZsXPoM#-^Uy~QhdQ@WSygQlA~T0nCtHlX5g(D zTW?dTaR>~|fyuW`Wblmi_il8~gpqZfsXy{9^CXcrXusp>Rf6*&o0`0-fA+n_T^;!B z`rTY{Q(T!GVmDyG35q|d>w9K*J@e&O{Oa_tDd6wpWI2EEuB2(uU$NOKF|x;q5p-$V zOl|6(+dF~B69>q4w*R!~q1F(tW3cw|0EWZEz|MiEcdII^Ro_C7guHj(iPe zh8v^bN-^BT{eolf{4xgJf|elpmz~^qjS~}2S$#M^FQvZgq*Gs`*TtE?k!6pqJ^Kdq zyc(H@y#_lX9Y;yP3kGuJWKS4Cibp<81U0 zCUX&XZiFWN@f&Ty&xgDwv%e)^)!o#gl0$>BHvfU4ByApedA+sF9be=CbBA^;_h-&; zaL*uUY)K*TarGmdRMSX*zp)_LIPi}lkRoGr37#Gp^zXOj=pp23S;!0CCYua&;G};_ zCa_s86dZXun_;2Y4yDexQ$j$|UT!)dEKbc9jE)df=W1%2;0p@;q(-|Hv7<=PC5}K* zH9$1s%RVa@FzXmXsAEO5XI77|y*UC4UYaWb00G64KdTLJ)D%M$AjfeYx=}^Arn?SK zeUI)zA+*~%38hu1MJ%4utN$K;{rY`V(tKriPMP5mEk<}+g%Z#tWG)wtWp2jZxn|~H zzZCfe5r*Zfyx$r&z6cVht1S+ec?~ElV;57-f@$G0edM2kZb3&ZyYf9*H`tlfGFBF1 zNbdM!*ojI5^MOB#eAzOsrJiTMO@9v4_ScSGuc(k5f_3ynf6@EdwDZ2SythYyXE*xX zOPxqY)}fj}>M2K9GG^3;yCI!;a7wTT*HwLa&dWqonbH~$<4PD5ht=#(Kr{9=zPASPZl3a6J^)5b*F z#`7!0X!x|+5a}(kk@W6{J93bpgwgr!Nt#7!J(36{6VX-m#maN*?u*rB0_J*Whu0Ij+*ui+Aa{Q!nQiMU;`=knKCj%4fT@D7@a)Pa%GR6EvwZCC$+M9u5+yB(=E+|iQ^`Q}bMox38^R}lT+ zRh<1euUUUckLqb!bWLE~GxV@>)rwp&FLNpWYW64<>WTuAL5+|7|BTP?uHg5H$2en~ z0WB7e{W6`oX8Yjt8@c+v*$KJ(#R+|PL>EtkI%T&9VMs^){SM2XbLR+t z5VzCGXKeB!(7MlI9}nDOpXwJ%#}7w{Fg41=YiqYy?|+jjBO^nZ^s`GbJ^^gN_=R-> z0P&m&SzQ8@l|5y;CO@$)At*^X_h<9TOj_Xh6 zZn+-w%>*Q-*!>-;tA&^^m|t9{Fzo0%a9H*Eg%~qWMbrypsiV!LNN*)C868N}SP(UExh zgz89roN*)5Tch?@{mn9k;Bc=}y>?FMYi*Uk`O|(rgQb>L z;RqFjQ4Wc$I|i-i$hfCue6_lh6iLJ#+%PIwk!Y906oPF1cw zTE{OO&^rTf0n1AR1043ZdM*H_5D~cm!3T*Rg7GD5IEcLoqbP-P9B;QB0FAhn_$biv z%H~rVJUYOV+VzDX@AxtKnO&KWp0$fhl=@lYdS#gVDhJ^6+45?K(PqD=5Hs`K%1S5k zKVgKlAO~$Bc~8)z0%QFbntY&d1aRI}fF=w3_wwdU(dAysRIa-fO6|_6!Qq^XaZrP9 z#;cQ91Xx(#n4ao?@6N9t)qCg*@ zdSXRerH(CYfeKtiD9o9kH-`%Cb^^btRYF!!pH%O6lIQSe4VXW7rjVE@dr^-hKH|#^ z;T!`XSbTFaP$1tw6s7k5`X9Bo%|2+NWmbs{EdL?#m{Zvg5wL;6jr|*RPfT<}6mXMv6xu*rD69ENj W&HCv~Dcp6kouJMeznb#hC6QjKvQ9s1p%v={ufg z`Qs}GLOjZZ+r%DG26^!WdHe1{JS^Nyy@M}i1fpoBwl!9$^>z<0PAx+v8mGyfjS+VE zXi(IP6*L!$&m;zuDAg8=Pxp8xdGBT;JqUzTTqGGy@%1+`oS=M~CWFH!@^4G&Uoenq z=o0tqP|@$att2)Y@gNo7)D<%QkVwpFmS}_kPXJG^c;}RDe-1kow}nRo=l=A-n-nZd zH=E$6rQ#d;R<`>cJ=AC==)jmy8K8i$vJh0i*J79f6@0($%$W6 zP598WC{FV-ZDZJfl$Y{&eGj`^{gS ze2E{SE_tkrcua|%bcjeMavnhgwP%vCa}qh_*?<1pil7OWQH+x(4n#Hls^sA6-&8fb zyo+HrBeObZjh!G6vQVXuI{x&c9y9Hbw&y7B3OSeV3u4f6Pdl`N#6!=<;i3<3#jqg? z{sx0SW`g2#;XFT5(sS>*Gm@*)l6lJVeF@eZN~>RIPS6o?UmJz)XFe_U5W+|SGI<`b zjCEbp+VNMcZ1Hd4mr9oJQKhIdBt1Xi?!G3Uybi16g3!6!HWAx@D7vDEk^rk`aY^{J z$X_2>hjc!p+>7J?BMR#sOen({G0M^rvmi4^2bAT#VK>$SkT-a3G`)Fl8Q4_k#;vVE zIRH;T0=2e4&@)GL5s-kt;Rt?|9AN#Q1q+3Eby5dpv6M3Lt$vdI(V#SX~uG)Gji;hp^K`-;uCpRDpr|zA%2{#S)i$+W-PFa=j_zy~ zy1nGJ$kL&2tFsvQFWLMkl!!6qaOp4nn0LO9#3UK#OK{Z8ALK+LkB4G{m{_>4!L`@B z3l=KM(aMk(Rv+2MhS&3oJYV2>(!F2@x5Qv~ z165PwCj7q$b%r({Qq*}HxZakRp0G4SzWe7OkJY=k%&gKj7NP&k&4|ZRKX+V3GbynD zRMbJw)c-XRj3G=jEYm_Jm#ByJnmK!IP3&BKDmmCa<@HPKf=G^|gXhhx_1R4C`n6q; z($?4$!p{3Co{KLOUtM2al?K`Qy_}t78?SHfa#hGFw}W~M;y3S%OxoW|z9npISs&`cYY%%{u~yI01Uxecg~aO`g+ezU{?dcSsHV>X4p$}rhf{?=Z!X1m zi6?NWcJ3Eu4(y&?4XhiqpFU?7xb#szzxgMaHF(W^bldd`wd={wrnJSCJjzlH<-yIuTw-E_VfDhu!?Ox=(xwbJ{!ocz};8; zAx+dFXF?OaG~3=pR797@Bks$d3tcAx&S0Rw#36_|h?6mJn4 z3&;?E35WMXOCJH`JG=p@d}s z4~XD5843rfY8crj3Xcoin91%=I*S|fIQ3A!G3h=ydnfgrh#J@YkMewA8dg#R`>r$o zFc(v{eF|3&(0+BYCy%X!c-gYQio!4*givZvP(ji(ZdgbMOPj=h?r`}ORw`Kj5Y0lA$qkFlK^21Nty>O3|+-o6UwFyM`9^yMx3WM{+^~NC%=}dR*@Y3bp@944Rv6aOtEU}B0Z;>7 zj0yw)ZzILI8;tV@;}*opeiYN_z)l%AEqOkW^s|@5P=@iFvfWt$hv`8( zj|AS={rUN&%+wyECN!i!lcouwY@wEyKV1T62=b= zRSexV^Y~`K77=<>2Y@~WX2tbX&jeD;tzEh6nQwk8IzJ;*rt4Lsmtq5e(}o+O$CpXC zFIdJYwD5}B{zM)dAlKn?vPlz5MUNh%QxNa&3dv`R~8uP+)s?}Qd#2Wj&%cM1i0LO9QR1O$v28UzIBhCsF@YKexsc+8!cvNHe zWNSEvv~{#WXSSJd*yXI|qVCc@#`iCv5v|+ENxY5Vlnh4{W!x{!&OFS)9WCQE7t^H3 z08+h{-uvu8560*-Rq<1xr6QBpfeiD}dj;*pWVH~f+Ppy%oV+=+WmajHCj~$(UKBxd z9=S-eG%4N3bXpJaU*T)}K0}J%I=nl1glc)s8&$GBJVJuf=0jvm(qIrkQhvUWLK94u ztXN*veL`rU^bGPwPh#ZfABZV;WJ)wHLPXGOBixh!FL&Q==BloN!^O{t`(kLjf^eNUc6KX$FUX0KAB_}cUVD5I=PS^LgcPQ(=< zj(72CLW?I1mHO$!L$dRueepxn4YUm(Mat1$G20mJ|`reYw$B5qF3pVm;UFfxl z)DgFR9c-~3ZZxT?V!(*c!L7xM35cM+T$uzf930MCq;?}v@EF^jz&8D z#TBJ>2%%BfH}e}9-o(*8cRJ&G{6fYy-g6+_LBYOtIQ2ef;550Lk5z^`Kc`O6Z|_7} zI=I;*v#+J@SB4o0$D*LlYc0I;K%Y83RN6|>Fk+0@fuPX_6-DWf&U^$(G2;V0vpdwZ8Q zM%TKz7IAX=EUk;kzNlzMx0Xzrz@`e?xuLR{qoM?5zH4Uv!shazmq|fJhOwnDjBgO} z45+fXJ}mTNK!w=9X|UMb_s!&|nlAsxJFI1JQlY#pO#3d#Jg8qGXuWG!2drRtNf+}L zkjIq!uoSs(OTx~O@MRQkXw|9p!7H5yh& z`Y8B5i^)aRjlKxUumQ_f8`xJFMTFraw*GZvAJq^(R2Q+!{k!k~C_-vIr`oSSQpQn_ z2^t&t4o>y-EW|@F-d|7r-*+rN^F;izbTV+|&MB%GXHKS*KJzZe?84y$NoLe@9LrxSgHZ{dJ-pZm8;!OvWGQ0{)(z-J)DhY*S90Iz3& z%YR_VNR%#q8Hfxv21G1$+;~rune$P>EGk~5q#Sv3b4AUlX}U&D%WUh`V?AL7CMOU# zi>-!}U#}4soV=c>-pS2cnb%sLobW8%YJhslHQ8w}&iUlU{X9+5I|=QnYn{DBG^M6e;GWcmlqMrIs^~nrdU;Y@XHQ6uoANb~jebN#&`^9YD-3isk*d=LrlVkr%Ddmem zs;^(BM6ylueJ3>mEeM2t2p~8=gWTC9L2ac#2vO4m6PcI$$Kp;E348sS;Nr0WAD@h) z*K|vXV>{#aY`nabT?Y#aZ-z?G-mW!~)Tds|{wcs>)^W}no-2M_o zJZ%=0sPesUq0+LixCXGa8Da(=GLuFFHND7`JJH8e`g8(9*hL}`2R4bBIZ}~4b3bp-xJ!f`mkhu z^&{s7imWmL>?k$`&-?%TV4|Kkr$eoKEwdqh?@f^J8O>3} z2BVwzM%WsUzgKsFf$B@=^qIgTlqx8PkbPp`1a;}R&$_0xK#ELJHV5P@u;_mNAGKC9J1n*6*(c@Mv3|5KxfVrhcY-Y^8ZDre6Hekbe0=lndr^WZJ$Z zBRj~xE6J$bEBW@A_ceU0L9>+(an$#~D`UB9jYehCxnsMZWt0(}dN=5~V@kcMY(DX* zJEcWGrd~$H`At%Mv$+VNzQM}hx7bmQO(#gC^?I`-U{_eC2w->g%rT&Xqz7B)=gWSU zLl%)j;bkS2Qbjg(v%HyC;9d-f9f$TFx%Ot=(d={hDQ`mq9d?;7Pt}L4jt6>@RUis( zsmi->l=3>wE=mk=uNd2{H8e<3HaOK;s^LV*VIKhr5>;r2gEd&309d`*Zlj;8F}UZ8X}JEB zqq?W#l@PolH~64iJN}okG6K+1H{Z8mhLgKGsI|JZBqhcWhO-cU3B=svH|xMG^8Ylj zO1>u=a!(PnkI0%bk3Im_AD?`Mc8q0F^5i_%t}R;p+F5k9$F{@9FR^ab^4fP5kUEX$ zwMmM-K*R+iU!D>*?IL!8jKhg0&)MG37jKMydwhVHK^NNPMRHPkx5a2|K1LDhy~sZi z_UO33cso*sh9FMt;b91_8qG=GME`}?NFe{^q~}usCdc^PKGBm*BTc9c+1d1{SH-oi zVib;bZAIz8uXFB#XNk5~kmv-F9k^JO3pRQQ>=|3cz}t%A+K~@oMBV6Yx!7)s}I?n{L1%l z{aK$H#3G`UM&di~`xHl+xi70W11si8jgZ4t#s85d{uRiVTkL}^_Fsl03bx3>SS#l! zQ$m&5en?gRfA-L2zRN@u^8wTjk>hJr4EQ38;sQHO$WIKyCE~RaY2gTY=xVb7-(~4X znpGs3IR_s*Zz2W&B>?hrpSm0!LQNfgTz?^E!v^8bgywK)Q;!jR2LeP;UGF9p(lE8*$oe+LRX+S+ZM0az%}TI2J9hu{6SFewglu&39V4m6U{y52Qq;u=B(0utv9UZlz4hz3=3Qk(Z&jB z?^`xP=89?@Pn_}tr^zE%;Ia-vb{ogA!I~G=&l;mFf&DaR)UvQXC0GKM77%nCFtj)f zGk925igH6gJE0pb^5&DCs!?WbYb(bl75p5NIY4GiUT5=^TV!N1P{1J^r4=z{BS1f+ zH>dqlFJ9MS%2h;{5(O7yG5()owTKN+i1+zzP&nf0F1BxWTBh@<){4=*YyjsKY$~6X zf7=_eu=&FgMcXr%_(150I0l;#f{Kb9cRr1 z(#(T^0P^G!XYs`tNP-Tp!PP6GZOw1K8+ROLq2$*xT(%ZKJ`OW(dfVq3a9>Bl^IK-d zf_?eNYa)%JKl5=!os~S)#O+N{Dj+-kJrLz~^g10^9dp>^3yMY0jRn6Hx#E_+9#n{_ z-)+WM?;Wd}*wnYNgS+?j9_I?DG&1yyQR;URzD&w0{z@}s%ciz51V<=zb)}Vt5F} zQ5=7mr>X-<(=?Q;IbhZteCaSNQ_}MT~CZu43Etxrw|;wfO7U2X@|x3 z%u_R~)}Yt*oY7OT?fUap6j8*GnkA=1;Z#rupYKG4a~n;t0VutF`E_~Ia`2nOeiv5l zuG!jv-@W^Fe}BJDL={}I^L$1R=L?&wO?Cpn{U_m~1}uev;eG8y`OcF%?ws`-;6VUy zhkB0SS-Di*Cj}GDy+-u#SEsnDQ8BuM8Jbx(Gu5sHbj?3b(7P=L0ZBW8nrApeMY=-R z3U_4>hi2dK`R7wPwIybfLIEAY>sa{wUcMzUe4QXXZF+c*y0R^4Y~}Fs>8u9xaIPii zI%HE2b@g4#$6+nn_xmBCb&L5myfkiV?4zR3yUBN_W~$#aIgXUt=MU8IMNH`Bx%K)= zrg1rCT})ZAT5P{OAO8JZk6(O+8ehqoQF~VR@cfs^0>} ztKM7aG;OeLw)vGz^i)?*z?#|g@Ey^TCsE+&7Rkhj0^qLkujf9?DRIQ-<|+?`ooLg@ zHIX<&TM@B%)4kjGy}B)=8;BFpF`Z-`RNKhlKhuW)-=6n~V;<7kH>=b=`;=3~a_omu z_RmodMKcM^A5*u*1fw)|mW&ZAM7UqzkEQdcM??!G>`I0@qs}sLk8Tt$(GA&KyvJ_EnYW3Ed6B38P|4-5R4Gqbk91)s9ZdU0K zi!-h!hr7M54)S-pky`B(qWm8*%yZvK*T6MpyLJ9LDZUOBBxA{|;Hx2cvP2#2mk+o3 zVs?%MBKiXrB!0GiPqqfD%o3F1tN2q+mVd+@{giPr2cYDH@I`z99xM0o?&pMK7`Lm_ zsT3DPf9q;XKZan!JKYR)YvJYHG`&V6Wi*}BmAT2_yv6q-!`72}U!HaEJHOKBmDW2y zu1mwg_Hu0HfQD)bfOusVO+{u=ByM8n61gx-HO(E>j>-Bre?5Imb-DB}=s~2~d21N= zgh00i#z#eg=xFJ1ghPfiemC1Nhf4&Ic7NEg^yk=zFRKbrZa0l;hfh#aM202jIoWey z2{1+99~*eF(SP2ur4h>)rYY;!Q0vEQR( zO4^0k#nat!Bj{6|YVmkItvt!zsrSvT)l_5k&mf+=y_6R=N+%mVz0zV`Xa%S0kS)X0 zk~l)weAZEWnNkmD6mrDl+{Kr@^x@{h=td#%{IkRs{EF+bGvh4WRTW2A=AdMA^CVm~ zY${F12K*Sd(;pbggie`K@Vsc}(uPl-21K*eq-uYg`+yh^La2}^r zWV|DQBK}^(MI*AF3OeENFO&XBJ}0*%#?sD`HfliKa*xTEA3j!M*#_yKKN zzG&;Bx-NxURTiH30sm?v9Z0LNa^CLaT=#sF9P2cqycEf)Kn%HasYOhCN4Ef#oBqO->@5QPrJ1f$-+w*3NWk6Oe2 zBj|MTK-Dc7S2NUQJ5fH{{M}rXGy-58pw8PR%UBwbm`F7*&)_^&V_I+U2UX`mje!*q z%>=A*7_gBQ25N**lp8-kY+9?Jo;#Kj)Vxrh zi@3s{mHwM<$(xg&Zky;oP07@HL0dWN+zUf5{_@J#$3W?ug*Lagl?XI-Wg{y_v&;t? zb){7KVs#asd!<`dLbppmsgkz3XkeTbWc^_(e#wb*!pE=v&eT+bY1F5g`BtqH*+D8D zU)oCz$x0RRHNUxx|Nhm}A*-zhH*M8?7b*X0*2U2R$j{XIcLBe-wX?RH){mcoJt}DY z9JgdB%lD2OWfkk;Q*Yc_Ph1T?fAe%v-7uX0^73L-a;{PWd_4Ao0Vjsm1Jx!77atc% zJKUaRE)B!it(;fY`-V}3KVhqK|9Nyu=a*j5>zt@|;YU(~tPO$;tMz17g4>P4;TA@- z!H+!aoG(@Ynlqp&Mc3nB>BO_v<%#dwT^y9g_8NJ$|MZC4>(WTQHkFFrR(5IWgVLz< zmG@R@W~hAuu0cg?k~!1*GPYs>8f;{ZF0m9rrodz}y8v3VpihhWGl|68K{uz-1zx`Q zQ9L63g4nQ-L ztik@qrp@Tb2%dVng_iixdR9qCbyiBk@2M%GzmBfqU)jjWbO|E@E9kMRR zIiz#NCwSjO@#`CI0WhUesoBXi)q8fn{>d~HiH;xq0Bfsnk069y|GV+w>4mHZ4ZB4& zlsJ7t?gj+M?>{RA;=-=($;3oU2xNCk)|Bm^A0RUv2(CWsNS68^uB!h3uXOVvqnEov z1tC&=dTE(=D?8^H-4JYzpq+4T*VF3k!Ce%IN}~c2W&x;_eOisZ>Og5H#j*w{3of=s zmZ@XZ)x$yVl?kfLYso{6b*lo!Ah`sPXZV{^WGoF0!cjI`M?^_!UwMy*u6mv*(u=m& zfD`7}7zL!noxoZCa@T8lGk3dl^~s3)jLRm0_&A}=Wfuo}A#nHV z)cm0_clw)qoKR%1X||bRORuFtPW@F!NJgW;RKrZXY)k2k4{;s=NJB^Kr3U4P)D#=0 z0M4!QG6*MqO_6F7H8HeT_i5@>FbnU6lBjB~@4e;;i(T%?9|=wELWP#UEB`t*XnQMK z#>Sd|{gT$ebvwy{?KpZ95DgUX1M{;FPg`MmE9KcKh_;;J^%x|n%id>nkefSw;;EnF zB86&NY3bzJW`E|tI)HhK{ZA^OgVFy=M-Si+2Od(*-dPkLO9!ulaoUcYcOYIE48_H9!mdBIdC-v6z ziSnH%caiTV0vzRqd21&i%y>uQMS0oT%lKdaV0=X@8P#nRukMB`i_J)F|s z*)e;XO}!_A?$*+s%Y-__Y2zNGF8tzgrh}xu{FK`tV?XwXVo%V#B7K5dB5};*Z&Zif zLj7KW7{-LPyb{BTeOP63f_u`VVMZiT4a~OU3k^E#g+fpwYJJ8VOzS0&;{KX49QOR; z^8h`bLX_!EtdLZ{4ab-lby zaKrsEwF+|M2aFfJEB#ezaCBO>gmc*D-P-1+-Fj#pG6J1>!+uapV=POjXrusYCvM%gIPv6 z6)pt`y`txzCAKKz^rYrxS{Z4IPAkvD#d7$hY$fo#Z0)(s${;WO*W)>l3ahc1`fSa) z62{9471@2=#E{1uLCC)Rzn5~I+B{|1m>RHFi0JLI)kJ0YE*jXVZT2|l=B88CVqd>? zRwXd-dVMosQshb|Refsk`of!Om2(;{#hkIY9S4 z$U<1QGI@cDdbQBWvPK}T%<4x#BQH6s#wI!-nvpl^`*|-p9F$S>!3+oH&SVa*o~_;k z^|Sk?DXS~bN=||oF2aGZ3y7u#q{&7RG5;3+N(}iuucv0WTvi>BnC=hDz7Ya=sgV~9 zs^y*IxIrsD{gTksq0jSj|%idZ`_*<03!DIncX{pFUX&N`nRS4=(TS z3r00Ar&t#J^vWJk{|){NT2=DY8A}WBB`MFaehl^d5$iH3xGoZEq?^#NG;Qk`Wpf-Vehr7{3wC`MmL*_NTBIn5 zkumzrr=l?_0@03#XDejaVQ0QW{5BC;9y45O)jQEm+OgCJr>2^aX3__>vp!;c1W0~W4MabjcWM;QQAY?>#>T2G%GFi#ia{MLe!CN19MovJ}-QUY`7Qv4}UGev*x=&sjtg6z0pPrX?dw0|I{<)=E^z zKAwqW7~FIhi3yF!{vL1nk)rvFpP|-}gc+YscPw6!1NQJDWJ0@otlK%LrBRkHk`<2M z`VJof+~@YBHY*g{NNG~U22J67t6`~N_$^%}N7>S?-82MxvnwU_$Xr zU4?{`B_n0l;oh^gX%0Cfs!XhC(-9WAy|dfg>FgiFwXt}MHgi#fix@>`{Wg#r!S_^y z%h)>qgd87e6dOr0n5O4tyB;x?5X5DHs%N>g7-uSR%eKlIo}a8ej~qFH zK#Qeh+Yf5W{?F|B&u)e+-Q0hlT`kE(vK5GDs0YbdAdwlUn$0Jm$-a1(sKljYP@rTc z%7IXWq45Z(&4ezTgTANzfCGX883is&B~i}%o*U0dAB^16S@tkrz!zip@hO;8Iiekb>>q~^f`_`yb zRNDrWdfyF;U42%ix{!X7$p2z_?~SJy>>yGOpKt_MPmiy^p<*c0N|aG`$?A)Lwh9qb zeW)Fg)R++CNSgXb1FR2Lg|}=ry24zW1b&nhVDG6nVgtgL6ca^ipG|#L6_|domW!0d z=1X|5(-Q0xIe=|sZNJDa^^E2X&Sdi`Q!@nxG9dFERoapd*SSi=(~)5Pn0M(M?UX&|FJ-e2`x!UI!fd%fVaHJ$>ycj?E3XMd>-dyI z80Pq6E&MvAO5-eG_-vvAn!nS|-@Nn0-53jep1c#FS_1WHrxcN@~*Bp z?C2;|H>=)RxMH>}=;zPVSd;U=BS-OWE`r5Gk`L-P8k#@uU!z0t8#sd-WCAx-I`1Ne zx5VY5#wGo(QgHaKQpTMmQ9Sf*$y2 z$CG=c??@+j=@`_vOax#3J__DVvo6+mps2_*bv`YV%@6Z_jaGz z%rG;rpa83Vt31aI6fd%C9%T?0=RwqXrn#@5mv$twA^*50QTbzthPb8eIGd(`iw80J z$KDD_I|zObs3e$zJ|v}()Y+&V1~_X(`j0HkO6s*xx${x$vS2mNC1V>haOEuh+*y__ zGiEs9Bzb%sny&bJ_sikG=bry8>JfOuB>Hd8VxM(=x8UMbZxjB3C=LGSo`)Q&CE+%pkNFKKPtKDv6hJO_CY2w+0cEa{MA&iN}PshEhz#qG~ zaJeKPEHLm`zAt49MCxo-3|frMX&#FYpgcC4-4`7bPVC>XuZi;=i715YTFU* zmNUAKzh0|Yh@b#?sZM3}WSakp6NiL{`w!FqZQ+ zFE3IwYLb5mI@{u!mNe$r1f&|tfw~LDEjKE@>j&>8<>sR&bCnb3=hg&m<|MtG=o8reGXRFX@Zt2=AojJSZ$tJz$LYu$00zYHn zpKK8+)f7kj8=c9fG`_79|IWM$uoj8b8d|r?M!eT&cPJ=(kN0)@85+~$Y;TMYo$4^& zwDMQPruDq0U~58_E(9h>lIyTvaYP_v+xn*vg;p=;=Y3_01u@q3asKLLuhJ9|D739m z-=i&;c*gegD?yzI?_rpc4_Bq`f$Fn5_v(K3#i`MkhQV*a$0EN>o)FG{jJ`mzy-0c+ zw+05a0lx>D(nz4L2N@WvoNhv5t|1y;KTfj7q_B6V=&CdYP%$&T_!je^fSFV9QW)C$ zPBmF^AZ^&mFZ6p|eS25G2JZ&9UzJD*3a#{X}X^naM3l}`XZ4wmNzK2^mdCTzev z+xOkhNQBk?LD}%GvH%v-Y9a=BqAnCct;e)F*iEqo!Y}g=5y+$i*6!*LaH`GFC@DnV~>OIWt#6gNbLS7wLwI!k$9*} zJrFB%L^Dv0UT-|7Ef(%j0V&ID>&(-Hp+U;>0ftu^uqWT z=ebPQQ(I2_KZHOk`vI*2QEJ-zL)I%Jw0vlSJOJ@fpq{2kn`jlm_&Rd&BAumSInVdv zPZqtC-=goV`?8R0*ulp~WiCPIp79VX3~lTl=4;78aD`Tm5-L%%ZvUtMna4~Q;l|aU zGu0?Mf|WOloYbT<{d&%#(O}kK==|6sg*Xqm6a0=zOzxCoTMf(g_xJA>*fH33{&F1J zx+0X%L_a2}H~NGsHj;xH8yaZJS#qrS{JoXKk-?>^Q>xf+989vsm4DQDSqIClj0N>5QU1n#O^^| ze|!`x6d{W(bgIMQGHj-lg{9}fIU^yj70=9 zdNAxA47eWR*ZcgX>PwUkKAkEK__=10n`;xae1Nme<^VH?CBN7TN{1921p9Ho_`#{m z2^HrAGIOEPABTCDNXxzvv;EZ6`ppS~pS3G}uK*t%@$n7xclUO4yWB^ue^^DcN+Y4J3r$1Rau{f3(YXNu~$Uyz#Lv`~L!BmQ9uGsj&9R*#UZ zL#WL}(B@DFg2-O2c)wECBR@k9^rF>M-5- zcx>w8Pa`*a=IKh?xlkYg66f8$JU_Lxv_vd0hsp!Jd%!RH;~vqg)O(8iOa)O-^0WrG zRHawuqy3%mGdgp7_($9j#RaM}=Nr8lA`Kf`VL7F%b4bR#ch@3rR`p*m&LH4~WdMq9 z8*gp>$eJ~+6)3|>Fy0>-@H3wllZU8RAHC&7`%`fa^XYfz2=DAxJ-!hkV`VR@7x-v4 z^yvW7y!?E(b$aT6jKb5TA4%Oq>z1pBcITz7(_h(F(CUcK5nFk$nn|jflf5JX=_|} z&t3`@ig9t$T~-S)hGd`yX{>V8IUy2i%&mXO4HIJe`#>*uQCIc=<^zdl-?6Lc(BfTE zu$+aK4vZ~}3z7=%xs&oo{RkGqtFRNgii%2dRHiI$;RWttE>g4ZFCy-n1L>iAZPje6fFP=;Q7-6@* ztNHF0>dtMW@%VE%4UAabr3G`}K6nejhT-`CZFcZb?oh;WmpzlY;H^wW+Vv^AhMx6= z>-DLZE+1+;)3llp^?<9w$ufZ)om-m`CcyUUR1*N~lon=OYyuRX*nV;B=(r&aXmo+> z3(Nx@8fN!yZ|5#6bDCXqB`6ou@;;J6jCkMz`(2b8k4Ifk{HL=4Rr;tt#T9))h%lSi ziyY(#9JF>@8E%3PTQ(qNge}a@dHtJM?i_@y#8t)eJHWZp>ZC4H1^%|`j8K4uVwHaV zCT5=gi|sh_O><)0<~QThumu$fsr(7I88oTKOA;a4s3-By28%!qJ4L7@U$~+=hC|!* zL`DB_+^#lg#>s7|J%P)?v7&=&vd-u0l9oPgla%~wX4>^jsm|K&d}Oj z^0Gw%0a!iwB=&Qoh$aS1D{{Sl&AkVP4weQ8 z#X{yGp5)HQEz$V*@Brt@7HX1sA<9I-f|o_pvAna?8X4KMq1G+qcNt(89EE4g#Z|u`7 z;Lt1EC0_wKK0e;m)Ra#3``q%l{HL7vO)IR1Kh2oUZnSA5=@%2;{L2g3q$JI?FVPhz z$-JXqg%%^vzHfo@l`bg+t=Se-{yYjT7fu4JzqU;ghWZ}y`r^}G#?&+!P#ss;hQC4{ zyBFobk7|BZliq&tBSIH0!SGZ5#F+&OO!il~LR;!(XDY!-kQ}Nsh;t16ZlILbG2tnl# zDccwlU#Kb|J-jH<0_llZk?Xi>>&h&+j9NB1)*_jq3u9Mt(R4C5GfVMljQZ!2eV;f5 zYWshf`pT##;5J?XK}rm|OJXA>rKM}sHbA<&q(Qo+Yoj{`BScE2yGsP5L%Lyf2;RN- zo^#)K=j_wI?VRU4|L2#&Iyfvg`-MwsN6&RK9nS{q6bDv~g7p4p_)bt0n2>+B`S}DS|g3u0VJm3rs=%F#iKd=K6A;W#iy9w5Cj+fvG z1`L-j3M9-x>`ECN<8T8*-CEhqu5@(Hi^{cI%6y|H1yO^pOwD z@oA#z^IZqo!k^RdcS*`t+g-@G;5_{ZTm-(LKVv$O0cp_chYUVRW0m|*epn59Q2VC0 z8k^259QXNHa@>J(grr36ALiafh`P*i;1;j>OigK-jB6qToT?ydu;RkpF)k4Olh}3P z2bg{R#8coG7mo5*8aBa;W=SD+>q!by6(t{36$xIuyJg&jE4opPw_0e}O3C5GV!x8@ zVhGyW22^!3FAqU}QGK}ia`U6fgkKQCMb@`eI7U0!4bE8d2I_L$i1 z-oXdrlO}#@_hzvE#4J|G>7?||$`+n~os=A#l@aMAvI(6_V$fO+-*tF+_S%jNv^Q=0 zl6#D@(7bwuQ*Wv&hQ?Z4UFG1)bTT#eWbgQ0G}X zcR@a$17cj9ob2p;_lm2ltLy9e!4-D}Lxm|LwEhoJFftBbM-G#tUt_2tKje1%sE6O` zAE&AZzA>?A`@TTaQbS_ z6cqw}aMbb?cM975UNSVi7V0rHkXL|nhCEg4lO7#;q2CK~x(Vz$`@)V?$<&oIxd+vN zG2qP*E%7K}-dkRHOp;PHQQ-gO;u(Sf%G$JahlUUYlPk%HQ(ZJu8HDu1Mph7+hvjxs=2h5Kw2p zyTeSP2lHsoTwwU{5(re~vdj6!Y$&JOD89V~*Y+i5kCg#0RTW`4VK~}&~uf)wV~>Ue4X)0{}k26d2^%BPjBLf0fL)Pw76hF(15m4 zjHx~QGYBtAe%lv@LTe$*I(j0bC-^3W+oE4&?nIfb697Fu+`PP8eFM%}%b|3hfd<>R z_tuWUn$3}4C3>s~`lutt&-g>3~)ePGBEl^EojRxe~F zy@WuCsJYe5T0~%Z+BJqfiXwVaV=?cAECqHiZ1}PuRi(a6NpVt8Sb`!mbMvJbZC06V zfGi2;&{KQ6d2pAokdW_Xz{!+o+A}W?*kg#o)Q8v`w~n{nvNZ^##C*WohdX zpg;E%$#ZF^qF256#P2DXHWtz_3_dIG{$k23EQ#W@8YP8nO2oA&3vrheKVyvn3!y#j zy0kq>W2aWLrD=9)#P-nbu~CuWI&pXJ7!1+*VSk#`RMzs$%PKp}mrK(i=%E_(Y0l&p zF)<>E>KsQR>xLngDq_W4;Je}TmQmy=f<`JL+U1=E#4vRyN;77s_sB0R6{Au~`b2ea zy)D^yWonTlJ@n;57$R=iZA60A==X_RH7pE3&GlB_V39EkU(qD!-;=!j%CF*^Il|*? zRuTa}cv8y0Mx2?A;E7C>dYmt9C+WtAKjZC2ZlXq16?74=tC4_p03V0X6E)}X@&+6e zwcqEixuoHn{54h5f=0{@?vX;iBm2VPa|+J(q()Dujh%-6sQK$HhFX;t0R~>8>swn*q2!r(dRHP;8n)5?tRGX{84#j`jXM|?hvoHW z4{T#0Wv43q;W1-nZ*-r1VTOu=_GO2fvdbdUsCh0 z6hMWjSh2RZ@uFytSa?0%7$7mRmFNUMmz8!7yHb3m{Q$S4EjOgK<1p5Q)Eiz>8DzFK zokYW7vYg%Widqh9bazTUQhf98{vBK~mw!T>T+Ya^*EvRbV%>{JRkEFbJ11LnI6H;c zqK?yq;8MamUo?GCCJ`4fVl6E&BH7$2P`Na2mUAO%mNJ@|Vc;CSd#}ak>0=AzOob+^ z6w0Z}W^-MV$Hfv+wRzVc)8_j8{QB2~ds*&UR9hRSK4j8lQfxqC_=hpV>cu0u;2Cec zBI}uBf-LO%X)g}5$B|w{+ia&iOsyZ0VFg>8NunOKlvJX#6d8^52lr}rvi@Q}t3?7h z+pQUx$={7d5DmM`yO4)zhVJ+#P0|3btl3aLN_6ZajBa(*nt}2{f_<^MyP!-J{0cZK zM@^cIj8X+7nUBt@95^f2M=_K{0tvH?hy{P!TqST{)szVm$p*40ZfWhfi4N$TdaxwT z%+L3kw|mjk($YFnaB-nS?B8VVvxfp!tbg3f2+y2E1a~2C;>rs)6!M;)!c>2-*8jB1 z9*NzmH6r#u+Pz6VNai#-en?N zK+7vw8aao#X?ga$hkA6yqR#45E#;O~a=L=Cgl}!0d#euyuhqIRHq^=Kck|qKjZYNK zwCLsyOSY~tYm=+9*9Y3!9};7dWv|CJ_@A&S6z4O94vbbh+wZ{jZi&kc3yGu}kd>^008E)AF}Lom|OYtDZ?)wv>$l!KVzTTh~Qa=#QrrXdh5#dp}hF51Pn1kQ;(DvD`R8 zZgLPH0xv6-Bx}%;k}ruTsy8>9gR=sr6>|gWmxZ@)v|Y=c`Sql#$53gyG5 zQ4-)DSk2$xSa%FMQxRRml&){gX_?27u`stVA8d#Z9R~R)snVV>8|}YGJi!&$1@QBdo3zlp6evFihAcG4uEDaqV)cCZ$na$CDyGt_-N7G08~`Oe96 zQ&)abX}(3VkR)w)P3&^@Ip<%);k1ySuFU4$dH} zsr{D%;;B&>YVJQR2#F@?1)iuySkJ!Kd~4eO_FYG3k$|V3o^*-5*ta^;$VhPkWiujA zMTO9~cOub6r*_r~j~jjbNn@ZooY;fKRXZt*EQVOekZ?fExl(zkVQp62EY@>n(uzig0lL!!F3C3)zthgCEsYB^&1-- zD}eQwu|G(kuzd#=7l}*xo{@N=)=*=5qw2T9NLvl6MG(X~^wkskQCpF_T zkV;BYC=!o40IBAYUL>7koIxb~iYaB7se;JR1l?pS``S~a_JD3ksb!tWX|~a_Rpk5S zkvy(8!b*@5p7SA!U){I@+qQgL@WyCGoVsp1FIGQ!yNpCNwW4MnDc)bhc&Qav6Xh`OouGAQlxYXlrKTVIoZ58TrS9lH4bI;BF}O7DZu z#SVFJ%j3HK|Kq*T(vQHvjePVjBgnYxGTrA-nULZz1!6(;=uNOeR!uu-Uz`2!forvy zf!U`Z!B~l)PuYp+395Js0>Jm5!d2YR^<>x?cZ_a;a}<0NJXLT1i~$ZDEY+Ds|5TkT zF9MXJPn7b zMCL7A>_jGvq_XeUY5CY*#y>7<~WxD=-Un~>#N5Iq_YRg{u{vEbb5wmeD84O^YQorD>AYq9N{;X1BFG-dgq{j!F(0`MS*L8*A?YPN!5c&w?p1S)Gg+9A;yZocvJyA*%?K-VcVmbCM1 z??nY^9s-Ij1dh9=c8UPoYK&>a9*~z(7Cbm141M~|#HmJ^-!ex#C&X=P50g}f{_V^d zH!I2X4SGEC9|ks8k>J8Py&snUXJ?J}Cl-P+5RaJ{5N&!BZQjeEEF6$_*R%^I?`6yC zGCtyQ({%rvWP6Rv-bRarDX=dO9bix|*-p-L=7FB6EmJf^nR_abuIhW}iwQCAR|IOO zsm7CTf(zmJP1E8X#bkUFv$}%BGiv@~1z@vvEHvORDk3f-(e|VDQ$Q*OG(xTI-n8-4 zR)c$DY8?wd3N7a-nB}vAWnXsJU9%F1yr_l>>Q(@gn?pH)iK)X~Pz(jqo?`B-=;F^A zrt9^l#JHv737E>Xw2FfwUC=7BSU4y*SFsm=Mu+ec9+Z`WFN5i|$=G!bBa+4~2gydH zv>$!F8T5}wwvwp50{toT@6)MVi27o-#j zj}Bpbg+u?8$WdKSvxXvaR9-1e!h|z3Pgti)Q(>!XS09pu)ql#>rWy)!`gj=$ZhUzC z&fkA~FdH))pNJKf zUBBxEN{f|^=gB-t7U+2bisvM>U25NpH_Sxti0Yo$X7}ELlpK;uvu7RCIXCoySGjqXiuheE=M9L5 z0O~{ACs32$BrQiy_+rJp<|fzbi*?T}vFDQvx!jI~CMgR?A_c`XnN@^5*MT}a(1+pJ>1m4^nM;Y!*HzrPWPH(WfA<5x$=M{$NxzIh{H~^HX zZq@E!g<;WSKp4}11tSgA&~L_CzfYb+Ab*w8&3oZ3@Jg?@CLijEJ~t=F1XfhKvI6c@ z6oUJ}YLOkJ<|}dpjJgh)4gTi)6<|OMse6~%)Lq=RA=f#Ffe%(O&AW3&X$XQa||6tQasI zv*<)I(S2?eGe#u#cqg^~F&J-$q=;8b5uusJBKVHoeUi@Mq>cd~GCwu7SnA@pMa28j z({C+F5qND-kpw_QrW$@`t15e88ncG$C6cOz+>CZr#{=#4a*KP{Wtj-bA3^w*x)_B1 zpyV31Bjx~{J{~Km1fK)qkA7NA@=eh30uVvp0H_cu|6K5pwegn-b6SLCx8_#iJE`ts zLmgO3&lpSQI9oOoU|2DP?YSj$OJlGqKEm+vX_t-Jt}1Sf9A{cB^3l)?n?47>*eB5x zl7-|pP{dFIv%e*8liD;+{@hnKLG@gu0{iSATyv2vqdOEqYPaQXexxZ@=x`MGyCT%D(^1eu@r(uFU!Uq%9IEmE(u*#a zeY+;k*NXIaC==B`W! z5M*9fw#y*3%9U{gzeNb{$2s#~QGeIeWwzQo24(WCnx|XuP~<*k7g)b8gq1DoYasYa z&r0~x^P^4LDm2uqe#Gs6>FE0X|CPk~V>c*tZZH8TAWKD13#5&OaIV?pc#m8Ik6|Gm zVJQ>JrMnxIZ}O?(e7vL>kn4_-0Dso>yASlM^-mxZ5PB1I7q2QNgry03hC(k&=pWvn z|1u>dKmSwX7M#yf8ROxU=9a&Fyc=HVukZ&fFZ{MeQw3hx**6Iq6B9f&=*BaHZq4tt z$dZiVvk6teZl15RX~oMo+IVrFo{L{Lzji#{18;F6W5P}vbx$yqjr78yEJDEK^7GiQ zYq|N|bT{T9- zVw8#Fx!h##SC>=6n#%=up9{&J$>DlFxsj)Q@AI(vk2(W{9chk_zpNlyJ;k|$Q;G>{ z#RK-4d-Mi4INc=)9z4gUrx2Fp?@O}DHBwg}5|!As?a6M9Wn&Ndvz|qbKK~8ElYP6~ z#z=lnYx32_TfbE;#`uhzk7h?-&_pDF|(49M0Dlg(p{0ZKKq^b3DK8B($(WGhgr7g&<#x?bOmsc8p zXJ3kR8l#rxrC9BJ!`&?h?V2(rIr`qZT>;lJ~uONu5J)_)f39~|Ao}b31)Ke^|hjQ-jY>C ziN${GU{3#5cbM4Xs(|E|%q8p4O!~x0=BcT0csunZcRc2j;>p%-oR_@uMA4zJkku+M zeW-`p%b~vPs1}8xcq_e+ev?ztQro-~rS(ga*)y4O$n5h0&cUp~fWHDUqy*Le)0$kL z_+~0Ruc}kkst2c#5&{23|LOSyyG_wcro&NZ$mSOO9ePGe3W3YCFQ!h!Vn7PeKDV*^ z8xjyH7J|sp+Yxk?X@~Kh`%9#wg~Y4Q0w`K4c-`pvRQ<@o!K}+lt7^!Onlh9UgrOWE3FMs? z+eJ1+CMN9%oT1R2L(RBZZc5s?;yetTdgyvc-I`d_{e4lFB@SfCTuu6pw5!=S5hFj` zU5WF+HVCUqQ`>lG;kz-j5|Qz@P|w{vc5*)7Cp_xBnDS)f8FN3`W*59~NvgaSVUVxy z2uqEq`C8%}G6(V7rJ530i*{@Ni8d{lY`sVZ+FK3I7p>K#5J{LMku;SJOqs-I;pr*_WR63765vSS~&4$0m?TP z%>{+07a|kV+D5j?{jvna!=)dOv^2Cq6;w7CQ{@oM@h*V>@J5~+4_&Zqk+OO}E3$9h zK6AU*xn^xr_FL2S`g3B`TR+2Zt}-%tUwdzVXb}zQ{8@0fpC)u!4uR$v*}n8%ppHzP{mm5aEuVt_|0C=z=304gSu3uX*m%Ca?8+Hv>4myGB~A^ zFiF-xK=!q&+J(KGdY%FBVyefII908bB;a$+=9eukRKL|Vm!I!^J%=}@LyFNYzbQwQ zm}z9$B@Pc|E& zc>=3R1Fs36BeZ%P_Om>E2EVJ7rSuc|{@Loh-rR%GQ05PM$;J=1JxikDK&P`^L^#^` z(B0xRimC^=B)()}d~avJH1%bZ^l)$QIc45oY2J343(MG{?JQZ%Ii{n2c40aD-{MD} zS=emkL;Wc`>|#R}Wg6|PlAiP%R+jEZi&&2m|Gd3ySQ(^6(sxnrH4#pq%n?}EEIeCv=D8~o- zyP3kuSpTq(Rt2%vWrd{YH`wb;wWZna8ie;HHsDtPmqV3Eq2g$9m&N~Z2c}EUGwx{U zP2S}HJ0p(w|IV6EoqgwIJe0nr`oKsILgOd(l()lfNOT8Snq<35C+rf1Ogy>QxWCEk z8MrRWOsr``f5keX!k7rotEElw*4%lQIpwOR9=CP@cvL(eHR>*>%EiS%;|Y*gbqZCn zBhI(VJ7H-eX#g+udZWc%z7P9jE!QC>Rnawi_bjSdau%B(}^2kNB4e_>b51~>Pw^c`MKk%u1_XA?VVZ^m_x1VO1n7XhiR(z zZsKE{Xj$BFN_b&o0WjEids_2th)v|=7C%3q227bLIamRNC7f(iZXe1=(P-;AxiS-y z!JzYX@?wUFSK7^rsGZ@>hh{(g`JFcIJwUI!pSbEF_I2t5Id>~=z}YB!&vRGFc@ikNr;1{eRwSEBg)j!EIfv+W z52FqcbZ3}<$U@^AnT?;U(I%p~j$p+*yxJ`rUs8&Ws|m~oT&EY6f8sCi<1I(K%b95F z07QH&>qrJIUu6?N)*p4eOeLS)O&wj{;?oqrRcRuQppJi!_lk*h64IKlm*#jZ1rJLvC6>@TDshLh%D#>&R&VRc zDT#zf-9S3r>fkMQ?1x`Wzcn|M1YtV&f3PB^1&PqXb^)E1Pm5nw4&TPc#&V~t=tzc| z_m?OxOyhWn(KzHGjyY<$6(!--j>b|hw~IyQz?7LxHN`o3F#{|dQ5~#sm9f^;o}LS% zVFNa|(oOi(PkBNSk72Wmm4|xOB>z-1NZ_0Ja{cD#d4o?cxaRRx%I zYXpF9Ib^1h&hbU>ODy&fk=Jg^Dq6F@3k&tvm>Z(dJyJkWiWRAu9&4`5Dak1b`CrzV z+587qL5f=FXkJ!s?nbKqMw^2GnOt>}1<-QO^o?zh;}n_xmTmWINpAA0sGsI5!R-4Hb#lnV zzu|?Bz7xdsE89ampOZd$y1O5d`YEIV_W_ZL^CD;zOu`P>08S_|mM@>Sstv9|qciKR z1T%`cxw(0%D!JW_>1m+no=S_fE!`NOP1k!g&Joq3B6!s#?|w;=A!M8ks0azY8~h6R z63McUNYyw^3IydgVC3X>OR`6|bP-^HDv(1W-9YcxYH#{r-R@d3h~Q7#0ik9ZlBdc~ zRaAAd>8l&?_B)k50?{g?8in4SDRYUP>~b=DnrtMCKR?~)1hWfhX44(|k@Pn-ha*xQ z@$c|+rYO0kvhFd)Km`q`z6uf{jKlC*e?BYT^=n{nya9EIkEVOpiR@=GAQHceIGU>|tsy@%A3;ruHaDYj#DZ!O@~0Yh z9==RpWIGKAIi#AN-ufw!>r0}yexj^OgpW_hrM#EurT7wOFL}}_C10seVxhL1gBy8W zS>Pd^gup=C8_Hs@gS~p2i(>h2*ZhY|x9Q0${-Zp`FWv-E6A+~3ZQ66#lJ8*XPnUcn>FH9HLu8kY%1#1G^(R^bE60(b#jpdB&%XpJ zo_918AjR|XTNqflsIyV;kcaDKF(LoLL(UN3&r#RGS163Fp>HX&C60T~Ugiy-zGCOdOZoKh%Ii^5kfdZpL5g;`*u*>v9bmSP@S&@j$U51 z_w_}x1n}@f0w|Yb4-UiU%=uckoG10-mv4+;eW2Cns(7GCrfztV@mXEHv9Ybbwn-k; z+s3iww6yK7)bMN4Sa}To*FB+sC_36~_owN>`Gn_irU3REE2xjl5JnJqg)5c{vt!&| z)(54NoK};BzBjEM{X+$VbWWeuXDAuQ!L#c9iO+pQF(<5Kug4CgIIXAlT}FxZc~y^zT<)5#E5n!3<%;srZ@x!WEFaM zbG$rpf79+j#|!VAo;pSOcB0jrlLNCl7?51_;7W5_q045Ppuy+>Ch>Gtc}n^&C~*^% z59QR^YqJL?S`lcg#{#XiO%zz(PD;->Q0AUnq z$^>2(j4wpZsO?igW;8T3OKp_wjIrr)@QKZV6O2`3fuM)(al?*>XSiSrIh!y;tG#Qs7u#vxg7 z@?4mPNKz`<;*0bS#U?Zo&6v)f6e>SB$9o7&JLqXJ$eg85`I60FT7t{xx}%9ox5c`d z?rm6|>QrynaW2;F-0FVBzRqAW#1ArAa?wQm&@oIlgSg5YM}(G|>b)U-hVQG*xx2NlFc*M@J4Uvl*2*ilY^=F& zF!f|nutA@u*x}Sg(?^5e-<=zV32%Ixsh+P>X5;&9a0e01H3Z6TX;;Yg@jTa5qfJ$# zhF zNe@-w{`Gs{Vcf;{u)WOw?)8N`9Os`m6ht(!Q>Ku#VoB??ARy9525$zM@wh#RwEkMq zsVfNee#rgyUn@^`!hfJtQq%o(7J3s#(~2bjM*uJUS-!BUBsyN1HD8v86z(51lrk}5 z3e=F~xkgD0`}?Q)8}DxT1)|Mz#~b`juxFr4n7@C%dOFqkCKzocS2Um4Nj0>05-BPb z`aUy2&f5MEw)`+CF0~*vZHr7jAE}%bc3k%}z=jxilIsJ~l~`op<((WJLPU8Eo?RNS)&t;0B9!FLqO=v%OZGE&j zeyr#=5h3V^|4mE`QhY1gj8y=QYI)(ORW125yOwy4R(u$VP!Nw$%F&ukGiMweWMnhR zQv9WKbuU#Wav~lJLNLkg4i-eo=gPJeDMBCOJmL|8J(dUCKq2egsL1UGz3S{Ul@l{jt%6syq&}`b=@oZXV(@Re2I;+&wvIH<&-yDEw#d zdV?(5#nJxLr^uCG%Jjs?K-v+*(&RrH+ONj~J^s~pyU=-jnwN)QWR}Ot)GXtN)MsBh zR|>5fQwM&Tnjed~1dUmYDXlI)4KDS`c_-7wt9{X*9iuz-1I z6tB!L#amq(=dA+2e~%9*f?(r-WH(3c>(z&QH%1bj)gk$_(7|JQ<51_F84uUtZ=nFS z2r%$^VMX#ihRO7MUNHi#Q|d}*>jop1qp2@^TN?N+r;5WAkdtZIn4b;07ioa(LK%bYLWB5fjQx?gS!XmV|m7I8Osvxf$mQ&4Ny?mpE> zjEh6*a!EwlbYoTnw1FjH{sP30jr%Y(v)K4Q11Xk3&y#-F(mB0Tk4y|jRwO2>Dx(cl zz|aX&)d$q?O?NCv&?APa3Mu3TKHMJ%O^``AuW$IJ`Ts}%9ERMMY)7v@j*SEA!7g+Y z?$1HfG;UH!$uyK*KM5v_BoX3g@AukowT)V5s8T*jeiUtPg`tX?f1e>TN3D%O$jTJR z#nMOe`&P3E{O8bO`}RQCg-IO9=@+fGb=<0pEl4sCO{j1yoVM!gBA@YdTpiKK`IG|_ z_fwb1@Kpy!?6;k6QDzjSs>>E#ycPFV|xd)bF>1 zP{T}XrYKp+G9la!3)OhQ4=UqL%xq$3>722-XE{;B@x^M!sTxlj)2bp})Y+yFzs@Rr zy~Rn5vQifp5UASwU9Rfj;iU*J0M~bmXL+9PuqL3tz}L`sgFLj}y;(#oC;HJf zsro|CD7H{I8?-XEDG{3+5T0y^CnS+>sPMvo#z|2AaYbS`twZ|n^tA>?jb$S+(I8JjKp>Mq;O?K)z#`4)~N)dkcv0#;Hy7*Mh2SyAi$nU zQz_g0ZN0P2Hq%n(6GJ4~s}Wy6ksc6KtaL&3?IX_?)Yo4W3*-1M+v&el<9F(RB)pe< zD(w>^8Nizxd_2fMw4s5e?>{EGY%sHlJP-QSIYI~u0GbY`Oq@$f>Vh&8Pt1M~%o2jo zE(hdq^wqfu7Rji%LS5?oDqR||K~w)o_6?5P8%)sNMD7zvCb~J~)gG9`f!bmC?YB4; z(g1(6b^fO5%2}(X>8McG8gNhgPJT=F3yPS84)5*z`y@2wh^8y^IJ9>+S^|wEjnopF ze>4|K0)>x_O3Kewx%G-jNFY@!s=tuu{1fo?(a=KhQ#D1lKWp_l<%7Jd@^W}K!pAr7 zB!AsTWQa0-bOMeB9*@6CsFSH-SUANBY(xRK& zd-BuC*O9omOz8#PZYGa6tMlbGSt1O)$?(&jX>0fCACa-A zRr%lEIa3@ar#4)+h3D*H%MQY$GcCSQi_+L1nNrq&*IUo`Q3CnzU&rxLEFD{v@K#~D`N`De_f*_&k^66=ORw+8)35j zT)>b14K!X}SE_<&cycNlI-t!$CKY`n_E8}Slscy)O<1|wa9vD@Lje{5t&x#Kx@JJm1 zoA69GcM~ZZr zkC8xC#*|0pIYqDcyM(W~spZkl;Q!0i9^3lSBG3x+eZ^2D6TBi6xmx0nM59Leu*F2CXsIx~ zOtp!%;%BdoBTx=fV~ias+QErP_Y0qP;>EuJh}R z_bpGYDL=fV2%R5eBskL?^*+qqxYMX~Uzp!Y+!!SO?ds?AEJNQfaBRxUPgM}!N=9_L z;c&bktoNd&V1zq#Iq|_tHZX{#i1d|m-%q#ha&{OrDu{d&B(JwHKhgd1u(s~YdZ z-fXwU@S#0XNoC zf?B0NJqeQ=0$?6det(u?0_bAcDRQ=#Z_Mh|kpnw8I3%~Xx0=TR#e+GYZf3cWHd!sa z+OVr|cGBF~g(ERF-ns!r?+Yv+v&^?^3a#4{(H4VEx1`c)zMkr@UKOQK6KqYfW#@*q zu>#qoMV&l^xP$NX8H2aCHyrzjelB#SO_t~D=eBFQAlJFZHc`k;#!IVezl$xWQU-vY zjZ08I<(^ih$|S6!;^WVz_j!Nz=I4{`ZMB{JECngA>ifRg=LqdJC8XguLFT7MQmOl$ zRlGu$A62E(AHGJ!4I6JjzuvqmVg8oTVH`h99FxVAN8u+pw8RuoBt5pN;!G$#%s)v`t;_tSJOg3Z4lD+(1SLW>8_=KTZzV1o%_JRZM}25+-^^d`;6jz>Se|sBypdNB>Ws0(~Fu)CNnd zB2NPBxBSv)&P(Nxe}8?>ubbK$b=RYadW?JvSsCySAjrlSHW?Zquhp{Yqd3n|)UF$w z03-~PZ|6+44EV5@f$ay*%gcL=rg{II7(ZQcJ}>jgKhad)N~th1a9RwcRAjstZ7$N8 z){epifB_k^=n=r173r+p)ZG9*j9or5iEi9leCMII6mpo=VEQNf_Fo>RldSkQVsCcj& z_DG|UzD$QPckkYnxuk;rB3$2y)u7Z67^A>vXeDdh&1R@RK!2I_? z)h|o5P9cLLJatGQT7u-BsS~0}`VOpUgXbP`iWG~2-X3HwLvMv1T=r0!Uq~jB4{;lv zHJE(<0;US`#LWyvR*mZZS-H}^g1jj|`0Ze4=f07bBMYHhHHs{IulA}gw@udoTx!}b zal~lmnWjgh@t1{YY*q7p>CVBc+x9AE9!cho^#@h$tZ1ecz2uK~yy z_&`Qi{{&FUYK)#gq1shFn&qZfehG8p+?n@Svlxz9HHn5%=@w>&RDgcijiVhk_gx zg;^P`2Q@$bXW*>eIo2PqiO404z&9MHwXYk>vQqJ=nH)MS* z{}%WJv_`TA_QhEB8_+DwbK5WuS8U^GJZTHK?iaf$Ko=ofkxL8o@wHbu)Rbp;rx;wt z)M}LmO3X^ScJy(D~MKX5tf;g>*gRg1zKTEF2t_oHY4) zdC7LnwWQBEFTyx|DMY(tbbZ4{I5_zJ$Z1ZL4=l#{xVtup8Q$s@$Z25GFab;(Eh=zFf{*3pEkg`g<0_$NOdu|6)e*gk>Zzd%Eo

luH;UdmGj@HZ@FcW?0=9{^g5I zp;=3`Ke{D^$w&NLF;e5TuZdNxaU>RTcFb2)%EXr`Qs7gS!q~d>iXUF-82!#)(y||K zT1DG1c|T|enq1vb25ybU`|M}FnBN)Z&Zu^(BM*!lWoiJ6Bdim9hA)$x9y!lO%~p$- zYdJ<7*|OJLV6~5CQG{?)W2(8#y(ypUR_OSqfspQ!7VfM8A&A<;i)v_R@+VtRW;z{F zmmPgq==5o&8xoL$-z44Sc||lB6%`&M%CTQFS0R#uyxjc4#>%#(KqxDH*sJM*P=6ck z?3z59(_rWn?B<8^u@?8sNsyYql;fdunAqfmH(Y00Cb)@WOT7A$%8I2UFb?TM(fkLHb1=# zQc^v)`!Zlj^N$~`me(ACPt61h^GvJzLoTg$!^}_i`?u4?U(S~hr$Xw4lf6^@-FYub z9uX-ft5#PF>G%&LUp;P_y4Zm_q|ODiaH)d9SMuXId71DUV&=o>;0633F3wyZv~F$d zzq+-cSXW`wee!%f1o+Gsoz0MsFs;bqg^S*z0YmfuiQ^5Y`9;F+8Pj6Rc92#NGJC z)V>Yo>+FV<1q1YmG{)5@cubaCeJ#dYa#W=0wUgu@s?B%#-)Mh4h0nnr1Fo;o1gx%0 zosOjbl?*XF|8uyz8mt)@k!iB+2rOhvm(hAY6E0Wi{h~t;OF1{kXIv!c{dX!!g2hs7Ln+-yEL$tVLzZuL^NT7iZ*(^K?jyD(WZfTUObJVT&x&wyE)1jIN`@phXk zupJMA2l*-cOn!N~dwreC+5qM}ByLO0&-zLB_n$_yhg7R-<~jor)bkFxwn^dg{CaRL=$jJoa(iu6*Yi(J}BWz*>%ZY?H1=8Szdkq%%hvmTB6&K=o0e37P)KcB>k zsU^&k|IR+sEk!n3D_?gKpq7<^>pOFJNCT<6*IJl+K2I&>9WyA?(x=%tsa0|IsjXd; zE^Y~VXlXjI_@RshGIB4V5HP7orq#%P{Z3F&zHxSXTEL=)eXFP^ac}Pc!M;$kticU; zh_FmvsKrnyz8BN`R)M1-;d9DG)U%4IG32^PH1kerv`h(|G*JfpsmGIgh)iS27C(V~D-GK^Lz|9^S^g{%^OklN1WLZiR-o z3yZUF{Z9Sm1!m2JF1WzRHya}SKnKKcOXnzD<>4$0HNwrV1Z=jz9Qhck-2-g3oy3_| z4}ybQ?yleCB=ZA|q$JpGrWfiaTG>R4|FcHh%(qx*?hbEoJ%_%?P*B6oeC+_W-;B&V3Nwt?zSkob9~2{#|JtBB zUw|s3_I?{GUtv6~dNPIKftcxxoXIlDzPf%Z+esInz|WOEl@03Qu5p1-tt8yJX5!Y_ zD#ThIP^Q=1%p^Ms))zXTs@OhhU;Arz_CrTjG(x>fXEAKxnf|1xh&Y!6tso6`a@%Ju zZ`)Lzf7u4Rj|;q5C@V`BE>z&8d~OT_B`rnTz5MO&l3$wwnX}fuco1di-s52Cl2Yi; z89cuQZmqv`h!ch7VWCzfX55rJ5cj-+bJXLglDAUSQ4mbAJ-Vh>{ajYgpF)Ya?2F3hm3k(c~z07@^H1hAFv%eUwLWO5%TUH`IStQVRCVNdGNvIivXkZ4_fWwDmGuNEtL!J6uc5{O$)%eFHw> z*%6C_#zTQnS8}GzFJ6q=`lAzMc04ikm(Yh0WHH3mn@lvcK{G4(Vq+t{leDQJE$+{9 zh0dSDo##`ln!1IZ;(?;F%kcY(f9bx3_PL7h;$^$tU09soxOUQKZ?K+L#J*I$Il`Kt zsak~nuNwQW2La>z{X{5zwo`4kF!&yj{Ohp`E)zd99`y*P1k%@CgO#rHs^ ztxw0FRqYwMtwb;f`=#MuJY?ox01yNRtu~EaMZ@-OF_}Rp0R))p7e?_W3L7|HFOA&cvWk_!u{WTx}3lRH1n`{*u0+BYFF!f?VV z1xaVb;S}C>j46oPk^II_EuaJ&*lmem88yU1mnjr!8IbiUL+2DInR$$f98&`~-wVcz z@96WVqaD_YrPbensCa*WyEQY@H~sR5Wj{&HCxGszg?pWr`Q=cKaqQ;=ZN$P^M7$uC z9(D?|1A0I?;br;j4@-Ecb0>?yog2-XN6;ERzKKsdc~xa_{w}Sy4F%M9jc8H=LjVOhsNmzUlu8Rz$n?sg9|Hj70(Fn}z z>Va*B7YG99%IIEb(!0^%N75WI4mUi5du~GK9|NztMXVdi!0_rGyuz+`i+M}c&KAuy zQ={Cv;i6cP7Wts0^ekb|q-Ldk1)9BDJm^!s13J~y1#T5Nm+M3$(z!%90yizO>1-{z z`Q={{p+CGkXS*Lfv#)h*8EX0#R>X!f)Lqn3)Wze4n#B8@N$Xr>o}P7;d9TEzhb|vo zr7kDy?*yv)K)q;QuYP^@rCauyAv!DG+W+%At(=*8H-#jO>tH49F5qn_p*D0=eK7L# z_WG*!%i;g#)56nM0zre56N8F$0_1})bO82DFar>=fp5@OaNq{d%~cqBV`smKnXPb? z6por8&JL(py_UH#LjefPfYj6pXwS?@CKmF~`db1fO9x6V{~nlS@8G=A?s};i7ze7B zRr#$zTrvjgagAxs+B zLC^ej7?p9DbdBjHk74}xaKdyME{NzbN@v)<5?~pMiwcQp&OJWezeAsQ?v@~7*#mQ`Z8f{NmP^7s*%)e2!#fYtC9GE z7sUY>VwApv`-eT8s}eP-IGGVOa9BOT8zH0WVLboDQ(H!vplb%kX6Z_YA9M@otOSL| zXPxPtz9y=~u6nptO2&!qr-F<&(h=qD!BqAd{TVJph_9T9T#8ZItd?z0bir>*V9}#PNXO$BDyM_l5WJWQy1DhcvpYFpc3) z$$8k#-D1x;(KTrg!z!5$;8z)cgXve-Lvwv`4a>A4M_*2C-exh9NK)t3WJMTEv7-3e)L6FS~7^O0xfVsvM2dd6*aC$;SOtkU@`Hf3u zkZX_=Fb`uwJ& zOA$#@n#bLWdQoMh8m`3msHezW#fK)BZ!%FIr{_Msm8;_^gKKeV$C^$u{W9Q)4#hAu zXGE-^1sgmz~AJ0@@bTb+b;wki5tAqStpoxfGIX1XLp#nnMuM3KTl z+wT_r6tFpo(uqohb0&N*WAhXTmtw4cC(o)@WMd2dGwXEb=p2*RsG%cMS=7HAzZ%SU11tG9Ug|xo}-G`k8s{|F4>auBw;$& zr>-=vCBKxB8K*>4&%Q{PpzA4hV%C$|OQi$yrK6A{E7iFpFVlpftt(_~i;?(9X5U9V zvK|piE3HfWe}SHr@|q$MP@(qorYrw0mbD6BruwBXym35OuPkvpoZ)x$yqw3sZ#~J6 zA4986AeU)JrA!SJaI(?LO=8(x?d;>v1fB{fpv*Q3j;M)^4-Nmx;-BW58pLc%A|xt` zu#4!9@o-z(75IJ6n1>}f&K=%tt!xU=aW`|tKV;KCtXOPZ2 zxs`q*M`)cVtH#D51!8zfAy zS+2~w5UO(e87i<)Rxx)vp?%(8c9!;9DPQVq3DNhtxPdp+weB142DiErQ||hs2%5Nt z)P{zGgW1{7H~#lgkNpn>Y5DcASypM^0BU}fF6=yp^O5%v!3$~O`%f0;i|*B@91;Cnh1TixRycbK;8XM!Q01+F!Y{kRBd>5$PnYKzwe)GiUJ7@CR{qul0<5DJ2}Nh`8fTi$&`%{nasmQEZd~updsZ|<#(>^g(I7^drb|y#H3?! zHq+!>ZoEzo!7E^o60xUv%Aqj|<=&KZLmyp-6~||pG25PD8PQF)#yq9ama=?h>44q2 zq**#SM4>lxOz5mdAjtz0RC54X1<3`-G)*vlKFvPT_fYj*`7kZ`M2% zcE^m%fl%hSFZsI_td)hH)#mu8A0-A&Qlgm6axZ4BqaEr=TzgLV2YdTg5_g(e z;oApTTB-2(Cn1F&E4(*_FEhR;M4IUUl4t#1>P>gF{tN2rDjdEPU*VYC=L96A z2cQYaLu@S{msU3){mDl2z^nHmpK&aPTH7;EG#)H=l0>t%v$8zmqy=R?-XlglVLVqe z&w0$^YJjD#>i1qrLJk9g1%}rsW-bN=k#F1sFwWoK#M6pd)C@M?;=PzP4?X&y;#;ow zBoZ}~ABmE_>4Xg%VFMm}pieFhX7$Wu(PX1Bk=;6vp-+&kH}?;|(How+B*VQFcOQ+1 zub%%WlKH$byuG#l_U+W5(SPVeSm^M7CPv!fO&|;Fz_T*ZO-zM{ zQ8!2Z6HqtV+g*zHy`a*%>O3RnZR+5{QbvB$A1&E-ZxAD#j>o5J|&0ESoCYG|Uk#~ljB21KSL_>|?5Z==(zbTwPsrL68C zq{Ip4q|S#n6_?;78w$x_>)%IvLr+Zf#_K%N)04(EbS-BOv&d_v_{u&UJ?S|<*{tM~ zEuc@|T#-bFVCZiC-d^p96VM}@BxfQO4J^LRfNqP8PcfFk1D1L=*f%^lf{Y6x+o7RZB=pCA!nS>E-H7C7pvCh@F^5-OEP_IOW9faD9Rw zF69?KXJ=)k$;d9m-KCjD$|$n1)mbA!HLw}0`op5pDE zBN4X#i5aM!a)Nz8B?pZ0P0Z#W3Jj-yeD@?azPzJm`bK~D_qd}cfHMnU5P=|LBvU)z zP^e&dgus-bIQGRdw|)&3o5U!XC&WS#J-@B7i5ctYL0z=cti)v00Ah5Ueu! zy#FBqT(G;oQe8K%LBlNoCAXA|GH7_wNgEZW@g-;J!f5q>J}4-i?<1saM$p5^#3LwW z8%#r1K&en16FNo#wX_E~y};E`+e#z!bUbz9h^iNcrG?lyWB*S;YSRO|0}>l-Cho|x zcg1-uIkSKmhhlpxe3x;-6Ya65S_V@H!%Ra%P?o7G&Fa>rtKqk-4M>9?zxUtU4?r@Q zQddZ1gS4fq1GIf(yOZz76#yUhG7Np)LlGR*CVw;<2R+=9vU9HXq3`|UYaz6U@H?Bn zXYHcM2=b7%8LfF9X9|)_v%=RQIy)Y5tNn(n zE1(Yq3zSR{n{rah^7SpZSf4;+trrDDS5NWH13f6U(gnGG%+Q$_8-G+Wt%Fy4@rr=* z&EDd966NrrX@$kvSK^LsABYT~YhKe3zql8mkFkJr+iiXS=4Z(%MWpo8Nc~8izr?|q zw2P2oWos9XG{SFtB3W8L;M}N(#{=B<{1F8XiJiwE*7vEeU(xS{d^o8x7W5-*(hNPL zgMgGFAruLbYfSKMJ%@qU>`c^WQ=7j4@s-;K_l-k6$Q6e(Td1&-$yz%tEzQ)byn%HD z#}fF6Rtfjqt))H-X6*-&JxmAE^~cqPkj&&MS-=eB2TK)wr4}UK#q^j}NA&ZYBD4Qs zze3QL7P5LK=>KCW!VhK;PzcHH&hPmh6FZcQ6cq@B`SU-{uhy9T=6e6Vo*;MzT=`_S zrDEO`>WAI2!e7hU!c12-`KIEvy9Y!QRy?GzlDUPbE1viovuity+IU86PMBeUE;ubL z(sJo69T_^CWjpG899WVIZW@4vCZ2UTQoLIQ0K}7pi|?B0;+ThWx`7ycl63 zMlxrCd637^(z@Bg12aqjQc(H7f=jx&mgTy+cLxrQqD+Oi*p-i={{Oi!fQ`u}pc%C} zZ3|jddKcF_4c#5eBg{DEM{W8!qI6^ovMlAF zX4J){s7B*>57#*4XQ*9%*SnDD;K4-*-x%ujXdHtN#Z|R>U-==2`-CM7p_vBsZLw7o zzjTp~!q@AM$|*fPDB-q~kQ!xl`Z|i(Z;zEp%E%z2cI7Z-$9zDen>u{lkII0;aMqIa zT%Scn)fy+@WR22mAnWFu)e&CL8l$F_51&qv$sn(Mkq^9F6U^5>Y)?WuQEDb6Bv$;b z@N7;FJqqUDQL3h0%||@n6r(HRa75un8(#G18*Y!a0I`34hWXXi;_vT|XQ+-JL2?l^ zJ7HGtHLL#)eF1Tc^+@CTE9HV*8Eok{{tCLxxv5#)EA8jM(K!C}(u1_m1i6tVsTw}A zr<44_I(OfpG)y-k`{}^khMZk3kEk-4k?hfxR&P=^u@iV2(BX5rv!|n5c*p%^6Ytxy zs_nDJ#mJfy?bG8)wmpY?9Sc!&s4H}Oa>vXt==qomo?o>Q^`gVq8E=9loA7}rUaABH z@ggE39_ELbc1fUrWv3c7K@B_wZlmMlETxV?K{gS))lWk7iwfWdu}ZHPo4OAULb!md zn%tL1Ns@A+rR@SkI$3OqoHT3K5vwnn*+${n8llMI?W6m(uOE-L2Rr$9v9B)q^2~LH z)6!Mhbd~!0+XENsz*5TlWyTxj6i$ym;&1KAl7W5hhjW0GqSpUeo4mg1l4>D-8}G(& zBV{4OM$feL0gE6S2yWLAyr{rH0tfxgjk7t8Q-6RYRkgdmXMNgcbeaLs64Nw+Ma@~G zXR;>XWSch-5buPh?+}9~zOa z8eGpQ%U<}Z0#+P1(HSU_2MH~-scq5!=6hf$JCbTcwE8)}^knOBXru|U4TAvTmnrFi zk0xG^k@KuesdP=IOtX`#w#7{(Q~bl5O$+g!S2?@m%CJx96&KATulQ%S(%u+4t-#2@BZDTVPaI5DYUGYqZ zyWAFolZR}XkcjxhdW29E*I9dZPU5ktbLRHw__=<8;B=13fyVn*GTdD>dJj{-Z3bOn zdPuN$+Ulkh)Uy8iM***WYjkP=m#c_7HFD1O`*2tSm!GeHwYFKj1GXi;C`{Iq#6X=! z)A};Y4a>i$63OG@f<(-G*o6 z60azHbiIn=Suski$M778EM|QFkG%{o|J0gho!XY-w+$Np`BpI1GKA#};{8(I)OSvI9z?cYM9m^@>U zLFM`4fC{5jX{~~<>;XDsh#T7$rMuj3TjOqZBS|LR=wTa z{Jdz>yHGg=r0pc8Nj+#RPZFa|GSTUaOn<%Gq-N}XuQqop_j$=o=Aj$1G4K4XZm5es ziZaRY4#&eUZFXZP(UJFea*%SI0N=xGwEeCuI|ZvQqosNE1IfgB?HA1X|FNQmuCpRh zmiKFoJv0Bt!8fuvTK*iC9Cw|&8$5r2lEEL|wxmj%_;MpHcoD22TNj3M(ETr*4=C7_ zpn^!$gAIq}`N^ggpjBrBE@3->!rOW>D2NAi8I*4qBzQuqe!xioY!k9gHP4x)@t?B- zoL#bj>OrQOfw%R=n;tf4phu^aD<1hq;`{3zEZM?s6i(OtqWo+*cMVZzBJWE&MvkNh zwDK27(9hh)V~MA=^M$P7L$UO61s%!K9Mp)!gk^>aL5Be{cwgW2Cru?gbM1-)MQE#f z4TcurJG=;5fg);x?sM|I15H21q?6?AaOattox;29D6UZ#k<%Z%M};fOZ3IWy6^b@g zp6YyN_vAsBynp|E$}DvHs#a#f=}ExHsPC-vF~aVRKO{s__f&$!73~+S0oZKeh(w{n z?TH`=%jk7yLg!omc;WfHFqjpV@#sGDkd{46nC1sAx-Fp53|Jj2Nqod3x9m1Gvh&K# z9#ncM{hPN|<`;yeZRkWz4{5eTVaq#C*sIr0LPaXdA=ZXj`%`g}L6I`GS{RjK(I_6* z-$|QHdT4I$;^Km(jeu3)l1xAgSgCR^-i3#?hDdLzy#p(&pB09e{|M?|-b`&gv>CIE zEs}I4(J43QX(eZR^+17v!5PJ0S(fi@ zv(vRu6b7$O)w=H+j;TYgqyT4<*PF#OZE&9E1IWml>(`mX#G9ZrUCRPI;frMpwck8@#OjW#*znFm zwi$DtS|Z=w9ZsgWvce`U_>_C3q(MY?a@D>6xwizX5Jx4-{mSE^U zNHGzVyP4RRMbCdhmGc+V+@S^!>-r*BZ^S(*%t zfWXr-6MZerWT}F1U0DK5@dwhGSN}0XIcjFK*`eWj2rTc8Ay>W3z4lYosfpB5pYN?Pa70Z7 z;r7?*PKxpPe8KZJ^5gG6a^E#8)VRC~4GxZ!*nW5HB5b5#|L#XVmnVHre(|l7herI! zWNqy++z$@H+B#)jv5niSQpR$2QYjaCdzx&!CO@nFMe?*7&wNXYt+W&~bEza2PR7}< zLXv;pVc$)cf+Ev?E{ut=ji4>pw^v~?#A57X$q{Le6g}(#6)0#=0^0aMRgx(k4-y~CSfDW0cK~Hd{fQAKl4~hlpeeuo*4&SL&fVQn zK9Zp?LtKsjax^$1zvUx0D$XNd`c)H0YVa_0RG+#oC(6Ji*YHJNQ_=)mF?T3_S>K>u z!&b`AW3YjdITvzvG?#OC7|&pKE-U_fB?_7kgz+RoWGwBQ2oDSktSRr4j}#OC6?R=Y zC$e>9eqLW{~cPkbMQW?v>F6e@r`Y{9x*0uwx0eoxivnb7`#zm4PS%JWKm-h_Z zcM1Dh-LYqMTIdxq83VTryj@ox#dR{hF>8hmr*GqA%_aPAu-7xM%X1>W6r9#OC=8Xv zqMAyA)rbVIOvGKyWkt4`Y^9YWwx3LFPaOPoTLpRCd0igYmHd-F(0WsDM)CtAuYrr# zO|{;hYt0=-t+fhyU{;!B*ppcKwEBrWP|B=!C>PrwP(?2?Ha~sU>Mbxw!+`qzO_hH( zCZOTzqYmqd^>Y4qQd{W*Qq_CbH*ydVvf<~Xmm~kVm8T~VcBx+ET^926%7)&yrg~vZ z$OC`C;J|A`RG{a$qvPGTql2op`}gnFD~gI~E4-ivRi?9*hMz0{=C%C0<_kmpd!?3r z`=yxE(p+7ZhIY5E_Xr0{f{SE))&pa?x!1kQ+BkbUo0_CMyo~|<0L;6FVW5Oi4UQYQ zAyC|>c}ago1x1hbnJk|`dk44SsKDJ5#DXUd^l<&v-!L=yB!osQpRwR009w5jg^nq1 z`D^oE+#V7!T`pM!{F|PT`zyhMD%=m>_SgmB#ctNqBTAao8WSc76O7%NKVMOhwPQzO zylrn!<=mZ$KS8|k3S?FWBXS+SSfEoShk=wr{qj^zkRx1xA^#&iBU|CpS!oHUlUtyJ zczKE&S6DymFRgxTyC1{Y*>7Tte!<6acS@x*u{O}8hLzp@scS!3j)MZn2;%EVwZ_J$ zMz{G>XJ*JNZqP z?YqWe#b7?$`ug+iclZ}Nve-^wq`p3NGQOic=jJEcsA?B~V`?zz#Gt}NsT6+>hz$PGDlK!Yv#AM2-m+jJ|{L%a1 z9IGK@-60arLvv+&!gErGs~dosc9ZO?K{v{=`c`Mg>oJ1S|512(fafC$B5f?re$b5k zi8FhylEQ3SFyKsfe1GUHy+3|&y>S}d>A6id$85tMdM5R$>qG06;s zK+BwP?VSU${I)-nP|i}CJZ8#Q)q`B72u?CPZ3<1DmlyFXEWifBa*@E&UI#G)@`l?$ z31632$K%1YEL(D1*bb;QB;VjH5$7M^PCgUAmVeXC{S%ruDEp#->H25+Q+ms15+m7k`7eU!rm)-ay0>BY34=3AVfvzrBjial|`dqHxlDkTSYXZkFs=~ zz@k=Cn!8GxuBmWC6qM9!`(Iq1Vlon~fqL3wKErBNo3oENDg$$6ZSMFNuO@t^n{8Q0 z8C!|Vk^9x+VzT^{+!qL;prmQf+B-oQ1caKfFBlTXmR=;;dDXlzJ8N)Gi8|n9k~s9Q z7iJQkK#}{v?7CJ?KE;&8Sb5%!1hRH|rUcXmbwvH8&FB%!@7=E${{43bjoxkIde6~O zvOt0OwH)PEpfEc@ajsNxeD7&VVpQYw|5oV4LI_^=t>wSHb>*9f2Oz^D!m5%{YjzkR zt1SdrJsNEQBS$w+#>QQ7QTFYlY;eZLTY#OozYc6ldttqUOItcr1hi&S>ZnJoqRjYk}Al!l;J(x9(&`H!8=dX2jJzQzk1G21@1uxo( zwS>ai16vIH+%|Ne4x<012l?jJfRD=wS{VDVWr#$l2@(`@)Ou|&@s zvbT5m@XEq{kLihOvx=c$%ML+&{N;eL*}0Mpt@Sr9&OZf_zuoMEme|TI)()lLJk_5~ zMvtB_zKDLDaDd>2-#a~pb7q-+NF*jCCIg*gzdt4`!aM8~Vy)&#;Lah_B2&(wYBb?) zD8Wfq6rp2+bPN%v>>iHh#WoCC3%TnPb#B`oX7(q zvLVK6A_)hFskYxi1dwkZw45tz__nn1j3tVl948-ZIRsd71nP(>CoPc36Aj#vnNfTQ z5!0Vk`Gi|k5bp{?=JAV|++Qo@XH;Iq=>?lRYbCOpv1*VF!OyZ*u4C@Mxd~&vK4V6? zeSyMXXyQOD?C2ctVmHnX3!IOemRm}#-Oi`N<>K^~4J+b}<7hvp5QNa<+H*NoQ0a z-hl&$4bPuiD7``1GJD5Ir9>3ewiM%9p)4QEC^n%Z_Ak9KipsZ2Kw zEGoh6;`Z?iHc_7W;|ejGnT*ND!^;zr;-Pxmm)xONmxX*Ea0a_0n~5w;BNX()KrI)& zi>egLSxnefV&vp^*I1NHAAb{;ot8eBx1`asN9Sr%UVZxkc3hW`I+r-3b@j)ED$Tl5+TQiQI~06;0B3zsL*RZSsa zC4`F%(fV&N_GF5FF4~_O#COG6s46%+tDmmv2| z6R>4k-KCvEh|RY&i#3a6|G>$XOvu^his3q3e=Q`dhblZg9FeBVXxKRlxdlmHulzmt zgnvL=Z#_R;wyQ}eDCt3Blm(>K&;C?G@Yi)6uFQTutJwI_Vc(uEH(|9)hPTZ~=1nM2 z5b@p9rTYhYVMwNQur2h&8fu(9F>M1%{AyWW%CN$@a(p+E*Xcr7y>Yhj#)J#%b*3(9 zcl7n*z9A;5Xl-S!1Sj?9nRhz&)uXcmmvnNuUp?VOpLUt8vIn0KR^ckE{c>h|-_k=5$4hKZg>)a=wc7vj%lr88)MistQ!F}_{RP&tV*~~Hwp{%>5zkSq zRppn^u&Ck@O?RTn2=OOHN=GZ2W$9^j=f6MDr@J4EMhgcSPo|S_liD~>xV-QF=%hno z{cq#@><_Gn&^AT-z#mi2W=QIHoOtCnK8quU;GTKQ`BXws8tY^k_hd@1HoPeDqdN>P zqc$Xqj^v6p2|-sR`P;Yvd}T@-;k}3 zt%5BEzuW(s)bq*+)^fC$9zr>n1U~UJe|Z;s@N)4R6n8+S4Wv^t{alo7lf=Raj`-!; zOiusy`GUZsc@hR`%>E^bJh|IyF6Q*ljNo1rjPEiz7=O0y;|7PFIbmm?p1|G@L&N#% zf5z_`%S6D>XxPIV9wa<)vnw>-!{%woQfICN6>$NSDCP(Uj%rN@CcNRc6Wr$ zZb52Ll0hnf-Uv*cm_9h%79D_nVrK&GDX+odAUzZnzy=V`n+Zp)bPH$Gc2a2pv{fvm z8Na9r22?Anau{J~m}N9?G%udaZ*a8!djBTQW@4hY)@`*@6SnIjacpJ^8b&-7+%%LG z=)sAmj2I&TgJfM#0A$34a2~kr=FL)HDG*1eYreXm*<)BB?wyIP-=krr{f=J{H~&xE z@h)q5>GT*79kBMD6rDm=fs1^nOT+GzH_+4K>*GGM@Ve+DX-&;yhTI2|N;L3e#+hC2 zGZzl&ou7*GvkSvZe_^O1Pa+FruzTJwecKJF{mb|spHP3S0a%&~iL%v(6rE)K>q z*+9+gspfvBisZgr&)3b+xKqBK1NeGiiR&Z)Uok?-QvRo6UN z2&ypc@ZQ=89(E)~mO-Vxgs(vQyEM3Dj#E%CoH>&3y)Ip078wltjQ72^`7)7($$$83Me5Z(7&g=YrCwXv1d-nBbUV1>a4UEQdmCK*sXp7pQG z;sp{P#$w$|%+Hoh!L=^mwHIAIr2eI6A#2u7+m_v{3YY_zx~Zi}78d)uS%* zj>aYX__^q;fuzD~H=EnrHG;IwH{bZsB$e0~dd?&gH}rQVtv(^V;6_hTfCoMV;c~4r z^~}AxFN*)z zsqV}e#yE=o{GhPYT`+lKxU{rx-&R6Oyd}26fA781W%nqO*koZn`{oa0AP^%d@EmrW z;pX_;yM_m<4oKk!hThj&vi}}s-&(25 zaumviKBI(ULA3`q&Vcb(T^52$!qSQk2r6c`JU$7=()xg}rL84w<>cY?jbEqSVM{n0 zvVXIS{?T5p>Ei0Zv|3;@apke!CIh%F6DRmSkivK*Pz&H5}oLb>igg{9mc{aQ-MNk|MbQ8Asd>scN00y?r<{3&cXahGxmGuMJ-(!0ZqTWfKme~i-2l`)ya>F~1qy2^DA zPJ6m1i3=M)n>c*)`)ZpnrRQ>dKdHaal#ksN(Xlu#c?suNTKJ;hrgX_3_bm?~-TH571oY56J(7+?3EUO79RJaVAC#D9Cj8cIzI9I;}fkYH2w?7s8eK zah~dhFSv{KqdX1jRKm}%FbV^Y`j#+zQH)4wT%7K&E!B=P;MlP%A2Dif$@6axpm*LH zYl>&I(0F&plqgrQe~#v;?_AN*Kq{yV;`>d0{aPZEnQ8W5>lQt1L!v0%P~9Y{Q9v!B ziFju8C)Rmv#OJ3KkUzhXzeZmdC!hfs1)CjDZdr!rxoDIvDYrqJeOv`)(e}P+) zhvBQ?42PFK<(sXMKG1X4iT>U0G2XnO3Aw;pW54$h*axHD`)RRXt^JZjrg%y~aE9HC zne-Vcm1<08*dK9-WrR^Cb{3JZ&Sp;Mlr`F9lfmmgtGV`ndsMELsnJ=>)7KSS8T)~q zJ)T$t!YL*}zG*z;Rm%_WjoP=tGEC2OWDMsGn6_;ocLxrr&Mfr-#OoHPw?YZUaT;cnkY|#&U$2GbRmH$Fp-;0aIe4?; zB=~W!@C+u|XwH!PNuwFPQYO>d04{$isJXm(q^r%g?dlZs)UqRC{5UClUbvYN8i-jHYYO+Ds_6r`5{eF3h}&DhzzweI>UXr#ks4+fLsWitU_{GPCzQDcmAP1>b4X-(d9EeAWV50nM&*%m4m6-4!-=}h73_bzv|srL@cu)T_nRhCrTod03jnfLqR z?0}HHn;Vn228y3C73u87hE4po6uM)pNqzcwAeriUjOc`7Ve%hMC);TQD&3szbWu`# zeY~E>_GlyB+Gj?@3twE6A@d7&W!&$gumu=VSuPSWXJ2_mXQ6WoUO-BR$<0Rd9)D^D zH_@$HdJ8oyJlJk+Cj9FYNiTgxgVZN@inHsefSU9Ne91Uk#PcKR1%YVLKv(iY+&efm z*P$cK;x`||rr)ul@_R0Ih@v7Ud5q*Qrm`Fz2uJ0(WIW{~IUshJun9a48Zs;lRcC&wmNOn`)*9>A<$cbJG;T} zAwPVGKTSvEd+v|Ew6*dCot~CViVZjn zMK4I%14BZtc#x92y|DSeR=a(Vp~;%T{exM%C)%n^t0jX4Y*tP=7r=Z2K8i< zK1tDN3)bbRX9-2iLmnz-_c043<#aD)%5s@ltoqb}RASWM0l6f{wZ^K8{N=6#n3r2x z$~sTg+jj>pvtNP1-mDEvo$?$;Aw1dJlE@8KVCS{{0IABzn9ax#T?(@(XZmiDi~)DS zOyH>tb}Mw)ZV7oR@w75g@Qmi<^X@O$F-62ri-QBe~!68VCTOdGjx8hpd-Jy7KZ+D(E zd(ZpL`Nc39@`IUs)>@ZRY6JknYZ%m)x~EyczALI|*?+&GfG!oUrb+P_&Gt{9(BI!r zv869YR)#`v4r@CxNtOr$?^JWMT0ielOsz8n)QX%Hn6h^{kpb;+XnL81Y5aR1}CeD4tdn4-izv__5Rx!FC@CVh40DY=C8+wQQZ% zIc3Vtl4s(ZA0`P~JmbzzXg7)Jnsgj*Wn(^eCvr~h>kIb1 zL>jo-MhJtr)wum1YWpdh(8rI*S}(#&0R!zRI2U$qhFv;-yGc8yUKw{aWRzDz>+k%Hkl+t7 zN0DRT*Y)b>3)-}{)=pMn3Mag<5VJzawou|1Wc78U(;9ug{Z}INC99@%=6v{ZSxk)QV~dELIV*#50m~-ISAwx)8dp0ppC?}W9_SIbMskE)GeH`a~ zzLv+Kd|NlBSHGDA@QmvH?09xX5IVWhLt;r%B9Xc(pj5Ey36TL+@Z+>b!DoNNZlxHgt)0m`r6L3O|FAZiMm$lD)9Y%3Jm zNJYvsQZM^bGFd)W+^O}~u)d_%Pk?iej0Skdc z4{YCw7!ouJ+a2OqentJhq9Da1Dyj4lL8va@SCFO}DC*G*XTkfGujt@nv{ytAtqbd> z%fB{-aafaHts1K#Mz~Y{-1MS-hniamo%_3-fbPfC;21-4y|}giqJfyU*^&7z$52N{ z$0{VCuB@6+>#RHdJjsqa`uO49>n=Wu<|^~Y_Glr>Pa6o^xai;;OSF=cB8Lj2)**Md z_XB1$)mKJVY?~C9YL#6Gg9R0Od7f|co@rbEKVYT&Rq!ki=fB>JS41v2a)OxoREQ1j z;+WryWqACUS*|GZk3UmGz6%|i$qhfeT8ua!A66v0A^*t&vbPVFL^uJ^Py?_C{QeUw zNlC0mg^FzL#=5~8aqcf^?u5tS>O8k@%@oD;PIc}sy*5oTjm2u`M>!Krjk3>5LfQuc zv)wfA-joJmu3QrrkNhVylhaRpo8tOE)c7YXw7ugS&~{-FPU^)Vn{<0S4| z;YaWq2Fh(p>!fn<8x^o1Q!atRPG2AF3&m&de`{goYYT_?`}Os?Ywgi;H~RtRD^*8l zQs?W$g7-r4J~ua(#Hn;B0R0w?1Ti|p>CCZCrl}E&L0*;|qyZ!) z-EDFqwY1z_CtSU>yInH^2fLAo!zt8=JcmBbWaVm^S>0ZIAE_H6@{=z7Kj_E|E2-v? zXpmXHAJG1oSr50!rd+D**chx?O0>F>minvl^~~kWmQHcBY;P88df!aVQF_-%Q`J@l zNZLeD^ufX;A?b@Dt>R^wj7b^NygJW`^jbghWlvpF?q+B)LpV(6l=F2M=pJ!6UI1C-^31gboF@_e$d7nTSw9JTF z*=N)5P?Um+zPNfCbd8&rqOS@CRW@NYHA?AV*VM%qI*j;v>yq{zcUd0w>D<(48mak! zVW5T6_kDMhcXF0mU8Vw}a0>}}ZmADK+dq@nXVla2jAQ)>q)TiCu2mnB(kX##CPc=G zo~yMnY7IO{Nu{aj^BVFaS%lXm>vmpy;Nj}Z=`XWS{)PjOzCVdWpBaB=rt6$cRrDjO zQc_S*Pzq!UhI))5&D`Gsep|ZYoOm0AT2hkuaaUtw*=Fa=xEfLK$K#!3%9RWbF>O6i z!T;v?x~?X0Pd(^$Hmm$L@cd-&{~T-$n^c+Q&6n#~&@Sc>SoN5}ai0lTtKc7Err-PS zxq8}6JGQTY$Ah8H%Y-rnuAHTaum2Oe~8+S}0u-Z!sE?#LaUS8m?8%(!)NVb*e z_|mdfvwR3{qq;=^$(B-adfwlyujU0snw68VOLH;M6H`|^uLlo(4Dd#=oSVD|W)a@# z3a0J|a>i0WZ2p^%b#Z+Bw8D5`sojjwUxQ zmd^^lG&EEf+aK$o$*Pm4L41V-`^qkLV%L0nXuO}m1r?wdWj+_*xUHO+^sSn7wF3G6 zu)KjtvXE@mD|*)y5#d<|=K$bX*u=8+9y8c8;S})V9gCsG&auoYG8tF;9I9+eW8Z*K zwJgfSR65wvzp+-1Rr|$3KuT-&)2F_gHVZ|_SoQ~vs~!2?rGPfl=K4C;^^8Tsj!FJ2CzmyLA*DrQ0ev$G= z4;zDXBH!YCLLW~vAtj4oPerB8_-;}rO`VEU;@GKx%arYM!iJ%Wd!LY046KP($}?&x z5j@?m^VaoI`#?MwBklf8qJ%aRyjN~SJ?~jP&R!2gcWDDRq5$#<_zC1_ymm+y9#l}j zoE3b}^@@*%GA!1|YO*Md=}8{9WX7daRIC7Y^{%A`z7JC|$!KXwX)rJllSQMaxh>KO z#-{g`9il*~Fn!E#oqJfcT8saxm=E^)h+>ZR#= zvUIWl@mwxf9l`aX=78C=bEiPu44O54Vq zUJo-N$Bqc4j#6R~9jiq@z#10+<}_3W{BlXxxA<5>cn7S5q2`h!Wq~(lzCgZEQ0KWE z!5b)O1@TY(;KH8iMuFTF(Xt~bZc5ZyL;Jg8WNa=i+}TRu)r{_lUE~|6dmH%(&}yp<6Ss3;x~zScM+DhS`rx{<`30 z`aN(D%mGIZMTKEsVbmB<;l~$U0NhGd4nv2Y!>enU|C?tQXo%3rV??OT`Q;_Pl5%=r z02pWu?3y=7bhh{R&Z<3xgD2f{N82OIBaZ{OXOu;S$k3E9&M+7&>4)`|zC4R{O^#m~ zL?GwQPH%$S>%7f>dw7h6?H>DMXQwg`(($t!U#z(0+)xmhJ z)796W%I!q=-9_X~Ai6q;QT9aMwTSrzu~90PpYA2e3Q-Eo*0fh!fl#;mq)v zv?jN!LX5F%NxT4hr$uG#zc_x0(~7;})Q9rg%sLLe`R{~Da^jCD=Kgmtt+&Z>ngri4 zq7U#&o+W40U}lsw*y5>Mcyv>i%gu*;wI!LIs+e}qWNX#z|4YehshiBZ8`ZRe`l^;!|y;W5mpN};`__uZ1UQ85-Ry=t$ z(?HFw6#DstS8n3R`gngK?cJ!wZrNutP8?gVKjSVV_d5}!H05SCCtY7oj#g{8G>43$^b;rmcC+$;kA2+ z9${)K96uR^bc*o8Q;9QZz!U@L!ke&a=Was+ATW^TCZ?xeN{s9N77vHX-bj05LFHif zwEcLHpyRI)BfiG1)ubWL2a7)hD4((=lnSm;Rb zsL4%M`8(1&Xdz8Zl!b%cO+Q)R?F+iE@GUY>Lf)y2{3A|{U6CyFaWE9XR%qQUnIEYk z+1H=0COtf2_FLQWTKUotDF>(Vn5FE8{Rr}6Fe`>*SHf_(+{&4Gz=$*e2y*{0_l>X{ zK~Ek*N_k8V__)qzjUER6Q@W>1XlTp9HxkuAw-S-?7KPJ=^s%@>hf-}ShQp2gI8ol8 z+rkKK?I7-o=_9pcM}Csd+aK;v)&Y$S`ixoN_+r*72}{hPf3-B3xBMj{_MO~Ar6<-5 zX6BQtZi8Lj`8%T+MK;iS8F5IZqb4TYqhO)PcDR_}=i9__;^AmTa`3!<5hS|~`B6fs zvfVRvYHhFITeQve&BVabSrzDv7M?s#whtULNI(-e)?Q$Q*kC>yPliNvv=4m&CdZX` zxzHSu1o~L$DtuvTz1l@eElNmKcm^ujW+WCFPUkN9+wTY#BlCRVh-)OS9XsRf%^1&B z!>M>9hVpv(BJ-VTYZB6l#P8-aDp%nR1ytnZ_uYQZyB?wKWC7Uo;hk&8tg24;sgGjb-m0=1 z;kR#V0?)Ay{0jp1gJt#;^5t{<~tQw zIqB(c;+>xDy`>7^eEBD4e|TgrVvRgvcD z{tr$nMVhnx3!*~2ypHvqA#(_Hq$ELC%TEaTHZtynC}!jC%a;jO{N5JB1l=R)^|{fm z-DDK9wFv?Y`ay)$iuSVas^de#)ylkTs6nhR-Z?dYV;o#4lygw0b!W^>e_4(-=QQ>) zP#1P;tIwRX``uNdNUG3a{TM)X!gjcbQd8z=n=*FR_8o}^pn)^8a<8rh zNF8gDYV^IGaf6tA+_1i0{SRJ+tR1VNIY427o^B^?>&&mqJbZ3fRdRQMpXqHrRlhO! zWJ%JraSF;m5DOJ*y##V&faT3TUdjuWP-WZ!PZ9yDg_A070Q&{W`u3)-rku;L?x3G6RCYfDpUsvcb@Lp99V7pCi3nZX5M%LQp)pJ6iTLH3M)x=h z2#c&KTZ>NS>Mn8&+M|syj{TP98=$Y?Qk6V%0e-#b0*?|26PrT|V-ja7WtEI46}XIS zmo`gv7-MvhQZ`0hPwfXU;!f0E3(d7+FAZ=fC!WxYj~kqkNEYT~jMg_cqLG|Pg*L_M zt;kRR4jovX;2U+mzYel7MR=WHb1!79%*%4KO}mv_c!j&%F3!$Y`-Dbw46}NXrQ0Sl zw7;Cb^7*s$Z#(C~ch^7lpRb^md1j8fS*8{ibAB`=Y)y#?4NvaIpZ+KD4pw_!L;(GK zUI&^S!}m+77h)55nvH_Vu`McS@`MPatjjIUHShN`t-1)Bi3$Hq^a8$!hQQQPI8l`_ zl$Hl}iV>j)L|lz^I#ol>?Tz)?V4ydb=U(lhb;f@YHYjROk7v($n`%6_6W5c*o1L9q zo$c_iKiCrYdyTNw*t>U%2r@>CMIiqx1V zKj72YX-Kk{t$O3EHG?O#!w&bVJOV}aF<)&otkmkz=ST#D;#17bDyMN*!`Dc|zSXH; zSeNiBQyPJ_z7gQJ7veR7Y6sdVL-`m;SiVW+9~Xkrk|#GQqTNx#sqT;_GL^!Ew<3M6 z9LtJKA4gIXhNA>*#r8`2WHpXl^hJ{8>{DPK;O2&uv%N-_-#Pq9ku$}FEX68sWmRbv zpQoP(4U;Cz0E_=-{GSOHSXPmQ2tJs-_4(+6LD5K>6t)I%A^;K z8k*KuX$zA>Suv#*Li64M=Tfe^jHITDDTzX3`(uJ{?-nS885XAXu*(S&!BWz{*{J3T z5>qtUz(uql+enqtq(BV#$;eC^)UM_`_w?tQF~g0E%XqiK^HG)6Iw3M%E^0$Fb3xNmy7ier^ zLpvUgaxO##sbQSU_gDU8dJ=S@X)?F3W+dMnj$n4-^+&wiV>&= z))fGlHknMy)Wl&{HfUfRGNQBDS7>v>;MQD}Y#Z=|T8BP>j+j#^TSLg)l|(rK4Qb7! z7zQbTLcigt<_brgpZK#3ohm@_u)bwxW+EnD>2sx?CO|7w>x>)%0|Wj2{jn0q$CXdc zb!rl4Opd>v<&@!_c+VQq=Dn>2QN^EU#`=uzYnfAtMyq)U^~`SGw{m9vkHr%$e4RH@ za5&DxQX;N}gaK9_!6qzb05p)-Srk^Es+Q8e#oSX$0D{u=5Yqr0`CN-S;lp;&zIp^Q zJnrqrlEK{+X7VDVB}TOW#lO{RT(ypsxOKyW-rhh%6P^1416GCZpB{+(gM0(857wW( z&wsjerCF$aQ(j-|9MK%5nR%R_N1+|M{@%-BU{lA{5;Ia zwLAaPo=R9MKQzR1(|UOR5?XtBSXSrl>N^q#>nkcc%P}OG&^O-9w;6p*$!Omgcd!el zj`_{j5EbluH+MOL!2>et#T#4xN|#7{-=ym?S)#^P(wwYt^rN!sqgI&fZz{gV9qld9 z6p!zpmeN6vKQY#_>}(oF5j*})!6tTXoH)|==rEsYC&m0k=l7(4Qs1gE?5D-nyhJt{ zHmtT(R#%H^Rh}G?b#sl6`!Ty&!^!tRhk!L=@jnuOdUI#!$kDOGj+2yEQlSYlp?t30dm8@6F>H^?SGez{60HS3;?dcN85IM|!J$>xL5eL1Itw;~TH;HCg`d z9=fd&tb_#pPprSYC!;>45WC!1pES;QQczJf_ALJX9gQP5?eN&7MNzX#xVi~XFBU<} z|7>!yZz3$%y2M}TFj=ceO8^;ine*jju^nGlNU@NDX^r44zCVr6X3o-SK$W>w(f`7M z5hwK#YG{MSeUP$mgY?irH`LK=^;G&t*%*%!H66(POOHT?-F=Az89LEN#zX zg^RMAR9ccDubITWQO^xCH7Vg8q(z}v17BW#e87C^{Y#`^6Xk#hY~eJA4MCDy?7T9c zL>}?yk|WKT0&Ug7*5^5brIyR&57GpdvGLeR6*d^(G>f&^3#3sQfch`PJE&5;83~T` z{sALxgU*uXX8g;sPbLGb+;ZTc&l3)Y4oE!l>`69y+V=J8e;oqbI%B^n&e=5f+C;jW zP)mm;D=d>@xcuE`rFva6OL%)!Djj|q+n!wzl68!(#fKM zS9<~?xK*T&>cKM!guB8hyjPulxF5%ILR3sxNOvW9Mc%+fNwS=BlINx|&;{@5x;_Qv zXCnQhtSi&(<@7VJ@2<|`up;>pLJv!P$k;^iuZDy_l>5KS5A5wXmP+s<-t${rSm0nA zt!PO|OzaxH>$t=?DJCH${j7!--YD>;Q*N{FR+lhUp86KkzBGD_{g6{uZEpS&;t4Fn z7Qz+d{giOtmo6G-a}Q_WMrXDEU!rj3r`dCf$+4u)aUPn|dQs+6TQ~dx+97~C0AxLL z&7NR5gcHOT0)XsYb0f%#!;eh0GknD>cn1}nu=nqQ>}eo_`Y@Dm04B$9GF~tY=8Ko9 zC)Q20r*Trz=ofGw26%dKa=O^~dvo2M_wR*+>@p}FE726h*SCKg4}vL{YB)89#i&|7 zKv;=cFFUUpI#Lr=^#C#XD(iNKrfPThQ%yrh)3!V6q#0EB`?~uW@;M=l)BVlx_H>MQ z`$v^d`|gvJ#j5a$?hx$&6dUhCk}DM!IR5?n9me4^cA}o~ri(zTWbu63ycXW5-0j8N z5(LdgRA@t8Xx+-#7)+3g2t*_#j@;NwAk943{Hrc7UO-Pu^ z;n_Pca;~B}*?SL9Ft^b@z3UZYF|-agKtsk+SAL)uND7=a`TzlBxSpWMT} z#g)s?eGrf2QNl+=c+-PU6Z@Km9dld2d_}|h8+&`6T{o7tK55(}YgFuALZF|&{~3EI zhB`NGP50ql{jN)UV;YN;zGtY30cE@o&jqtI=A~|!FwvX`Zv=${K)?8zmSp6hO>a$2 zmU|5*1rArC1xm`r|9id6w(QmUg5e-U)mu!Pg9?NX1+~tfg>WcSzrC}7WE%X^N8Qys__BRc9V?)km`T0QRPy5L zl5sSAt&9VYPFLRMZwG$>`iC|a(_arIQqvl+o+;Wi4Zb5%ZPiqkOKZ^VvgIZfR6aSzLHsD3R)WO5}u!iHLqXv zaz)vNf9WqMm<+u9A3guK>&#e#`*t7-9tyVzfMS|pY933Plvn=8(WB?V*^RPHH)`st zXM6Yu@Rpp@-4o3#UsZv}fczwG&+5dBeK{2o>M;ZmnUeBc@!u6J+C+2R__nt+rQWEh2;NS~}oBX=f)=rWu3C`}++VM4+@v zjB?MAcB&$c`ti#S!5#2Wy0=kE9B%rs+MF+>`xH99w=@7lrrev`XljmknfyDqxWzfd0V zj>HP+{kUD*mX2uRSU#lYi#spaH~AW0U#}^--C33LJ!)?Bg0t_GOGIR1%R{;L=kA}A z#}Hbf3sh88fXs2}*f_Bo6}?%QKeh5AL@cLY2dTAIf}l0N!<_R$dfZ10WA2RXGw&h# zNi@1%{dN_luAp*6iqUwnPL)MSU969S=Y9vSiAo?~8t*cmdHQG=Lj}0L-r4O)uP)_| z>_U|Y4?o8Zen>eJ8qy{D)*0JUx0MU~%On{p;t?JHGG9`Co|9w+X<2C)}0t;xVhQKi7z`RH=xai{-6IPTs9h6R_u*o%Htp9Q&#*dhp^EX`DQGt%E;1 zU3~_IB@kgngD6hen~t<2XC1Vabp}3+XH%(afUm>yRvky+X%M@+xzxOg?d&JyRSZoV zj-H;L=H`7*+jJLeiIx6Fx`vJC^HwG8Qy0A*@6CNh7A~&Q&U0H(@8(%+D%7859j^|% zg8t`X3Ld)C2PwVY8<%FXgaYKDe{;bwL9Y3-5C8zGCn?`moZ0r1o|+gG2xke=|5L?y zb7uPS%CtgKCgEY=Ut!Y7O6+4p&5?cqo(S;$RRh>ne?69^|L_phm7(0}|L;=|QOHcA zXntm!xNB!Ww0GCBYAQox>T)gJ`IGTxM;APdSm-DJ9i$XwC8o~2uK=rek1nE+H#9Po z*YXT@>yPAoS!*MUNzLF&6J>5ZmkG)Uk4JDhxJK{s7cstT0wE`JRKc3K8+me za3*rdJ;zpFeh41b-M`BRIWv}uE{k@S^Q{Nxt7ebymLwsZeAN^%WZ|@kAxwKJ=tqPw+=02<<#GR^$kexyxsjEHR!c-aGNdkJE-j=oP#6uyke)dY}{-_n5l=)kpC^;wT zU+NoWSQ9s{g^bmsa~fF3$^7MgeBhe#X*Ht^f?gB|LHTMM=u*;$&SiFP9?nN5Nx-v$FIJ#}T0uN$J?F~8OquMlj3$7tx|GNo1Z+}bqf zP-6a}>;Bd{GYMCB9eHUfl7LaUHxlogx}urKF0?*rD_*cqmq!~YM0OFxPm>p!v53Uv z#p3e+8@%U>7{o~uPQpw@&%ePbaI5C_xt9vMiP$?|{PY<}nlh6PA}ir3*U8{I_XL&A zk}hi+D1vG}%X~|}(Z0e13&HSJr^iUbW|wVzQ)Pzz%!i~=tc zeZA9n3m@d8x9T<;Mr15M9NBeuW$!Ef_CAuYY8KN z-gOYp{B==RL1IuYJkOM3=p*WKzl^e_bGsZfeixcYmkNC=Fja6Z>4kWAklhgeV?`ac z1`BMEJNax7&1;b}2gmnrby=CU>>c}FFDi)C;K9)Pn-1$$tB0zSm5H0n%Z&+XpKU7f zaiEdhIN^sY&+129?5CNWr zv08Brrwena@(lSi!1U$)&<+3Ou0?O>lr%g9kWmU;rOnph{d{o7{>#tXd1J#e7_M%i zopO9?w6EfroR~~ZP<{JmAI};zrO@iid0j>k6cpwGtN0|PlGB3(iRLhFZW{5h2vh-I^$a#MM5K_?7$wtX?+u5^YJXFz;#Ai-co{p9kAao@Wn0asD z??u_Q#apLq>Aa9$)6s^Bw1vrf&fYrU9Mc1eH8B9q&Q=c!<1LtfHc6mX&eVSgU=EE}9?msA9_(il+-Cpdu=Bo0v@*+RcUPPx*^|P3=MdH?C&z zUFv(iRFq`q!FTB@!_lPTe?8?{YJ)iuwGM&t`9@cj3_mfV#A>#anwEJs=^ZelvPHP0 z)W4=@qxYMNJcdQS=vmc0;9$oI{?4MHrfv@A>!Zs2-0~$`#RojtR;5N+T`a<){+<#{ zv@FF!Ec42)yGLlrvL**rY(%kyr;V#e6MKVM30Q0=zwm3V*<*cYp60@*V$f|otaMJU z^5KE!0@@XJvSNPaKQ7e_0|3W+cA@4K$mKJTyL>^ygrvVLDb4=Z(C~T>pZyR}hXyhy zqVBk~WS)=Snmq!;)yT}@l7Y2XtWITX+5N7UMgZ*;Q7c(uxrlh6ONlwvPZrl|fCbn= z;g~Uyc1N3`&ji^ozMwmMi6}xzxkvBang1TuW$O~8i@1DWmO`qq_j_RNGLadr6HB`> zCD}8&QK(8yiBC~&EzwE*Cz=YH;dO_94dxToWsYI&QC@smLwD-sOy7~S>Xo%*qyatO z-P`m)UO%r$w-s^ynJzQgYr4O?mHXoI1tZrs*_Tiqw3~N4<)?u66a+LGgiF42^n)@F z$tAe%X+9FI@9TH`yvyMmWV{;7_a|xUo6P2Unphz%#5qLUI52tlLE5G-npU$1JxV<= zutVEyk@fDlzdzhlD^9h6Dv2zvL%h%b6V*h^ci~GkG_=yvQYuE@fR6h5dhxK1@s0)_ zAP^`blDrU|7~_f0e7WC=st9^ix9w-21MC71}H>rd_@L(MG) zWpM7IvEDl=FaTg;_wV=KpS{zUHO!|d#wOVhtuXTtl}N5gh8MHUzA~rB&6|;`v!$l@Htwznq7+Ltc%)9SI*AQ zN3407*%oin`mBD$$Hn13-yLb&VA!o%Ky z2k_O(+cS{-W7Nt93NaP`g!9($qo<{a7w{lS7of0uB^!78T+$xf(LO~R2~UTlzd_TJ zJoPQaEP$BKY=@h;P-SPk8_jao;_D=ftXBZatTaW-$#t})%GzO(+o<~#fUp?#|4I9Jn9Y# z0Ww=<>_dNL@wN5g?GSye#UMnX=pER&Iofd)b9=7DQiPPfyBu`HtmH z_AFcfA*!q_D(S|ChPVVbtM}`9o<&XgO;vyYel^;hu+VO1e_bP;`TsJaw9cHJ|6Rr| z&xvxv)uHJDf77Z~6|^3O`)F99R5AmQijxZzI5iJ^+#Z?5V}-h0ZV)M6p>V;6-+Vy8 z8_>F^NqL@0`6fr3h-ONniCx3iu0L@=05a$k+lV$AbZa-v%+C4e!S2||p=_x&Tpnt; z0wE}Y1F+TwvRnfp0RKhhAOlI@KFH~!te`vwT9)Q_^09oe*&FVzXDY>odfnqSdEYmA zd3oR6-QnWmCM3N38WiL@5*m0H{9I~XuzFMfskh90%^iqRTu8`eUnM-ZmOC|G`ruxWU}ol!?HOtXh=r$i+2(Z51rR83YlC6$ z!?jb(Djch6eeL3pG?;5YpTXst&J3#&pX+&(O1TxDc!Y#bLMy(JMJo8}p25q2`Hj0R zUyFYZU=feZn;B=G=jKjSM$=w)FLK&iosP+B5fFoN(NfH!-v^Z~Jh+`NFI!bGL;aiu;()n1teqOn&cx>WwQ1~bEGIitCzRZ8!=#{;6bEGlG5v2Xz?{{EmRAvN0U!B|^l>R!j6lLJAo z^AU4smMiqhp~=cE!{05YnsZ8?SGa()H4O)sVT$USG0K6`!qR*t(LNlh_C2fi5T&nr z!2u?UKHZ4Hn}<3qtKzG=ewXmWXVRBmAi`nPk6Oq^&_7jKSJZMS2!0#d+uK`PA9nk1 z?IMK>u6(NYY47YzI4Fp1q3mO+k45*)4wG8WmDFl%I;E}PSr?oY@MzDK=M@m(=imFR z>~c^{bLnoZ_M@TY6+=K5LI=V9q!*#Srxti3&UtfFW)b^R5| z+7dmoa6aMG=3=W`U~c)*mZRGnnSuDzjOrTN78&Sn4Z7><7O-_}D?$A(Stly7qV0p=@x>&=w`|7*>~0QgI;zx751KpAyt~t=&~*FQ{j`gwC#$7jcTP%>El34IG};d%y=aS`j&|bK|98tH)6#_ z{dw-aLnOnznsCSu&mTZI)Yx9!026q4yW2H{GpjNH4J+z&now8N;E=x5z>vh>f-u@) z++{;+JSLGKkzygm72Ng}g@0h-6uV}-hb3@ALjkqHBDQ4o5JM?BW%>9ayi?b_YIh;m z{YrYH|M$&6LIh%r*|3IG-i>MgA|RA*?d1+!uA9 zaxc_j|Ebw=l~77?nN*fVnV6^8LOUF+2^JpR?LbAH+P%Ro)+0v}Zq}DI%gHH~)Ac^R zkHpov^s-;YIygV|xo>Z5j3;PN`S$MJz-Wz2$*S}?Yb0wMC@5h-j6zjeb<*c)XZZKl zR?RK_!dQMolx)!QxBtIKSo_KXh8Ytop$yES^~}iO7IFM0!Q6Gc(NS%ggd47cUxDLQSdq$ zG&vb_0Go{VO`dhOKcmTgxL9G#~ADR0J)KB3@oeMJKDSO@@gOVb)Xx<w%`=(Jp_&)Fv{+d{&;wnzsVO z8pa9nZbuO1?RBpSF-lTTHHroG?>jn3ZOPQ!`A%jZiBVHDfjFi#uR8em+zj1eevjqJ zbxuFX$bM1`q_VhRkDcwg%pWx0uKb=1db|s-DDtY{UPLq>=uH2BO}K2s_EbPGgb%Qj z_|9_@d&#a41^pCV$mvut$KQ)p%b^eS2FFRfr*b0)RBKwPWQ~hA*CqBZueddNDK_!L zFmn4nTw#gFw(?308gD%9bE@RglN-YG)OjRi$aA0#Rsk%B=Ex!VJNQ(5kyl>H3cRF0 z-0@kHHDt!Mq*Md^K?!b8+fmdH>P;4pWX;CZw8;_lG9Mi=aHRLOUXP_lc1r0!z#bbf z;ss0;-Y9T^gMUtr^TD`dk&YG|eyNC+NME*>?h-B&u{#hvP7P^a-Q!OuDK8(x)jn>y z#bU)gsv~jG&*i}fle2fz8}_q5W``QPFDet8GkpFQw52e0suOvTPc8*h!2-SR^8ciW zy06L!Vmb;m@wE3pP*!oAa;8?FGWeS<;;gW&su&q987;|sl0Y5wVUBOO`NhA)eO8^n z0cR`tu~_DxXcd%ujHE0>G)kj~X{S;tVkuMwdF-0Easu95J|J29{o%LX^swu|H(Bpt z9g<4zaJ(ewjPzeESlkzAB4itrEQ>V0f;e&N{%ozSZ9TaUxjUWYdrxsb##&L)zR`Da zaeAtgC@*0-griiQ0noTpUuLnQkJJZ z+4kpKrNC&VSI}3O$^LVnED@-cd9%}`Je~WtuhV2SHiK7~F4Ha!Zcr=ER4^&;gd3#{ zQZB+wSRNiCjk+oUQ2LBfcs8<$odyEPz5W_AQ}1h{a}ENia;Ukp8J=j~dAchEZ+{C4 zyib4Jd#ey3OQvM_vkTbXA}k;zDl8&U(@ah2Z}wwpj z{*D6VxfZp`ED;7Cb$}rdU)nP0=EheTLS4q2R3ZRXR8~^y^yB5*dB>I3;H5SDfZUsB zbvn9S)rfy^Jj%)fB}q5%8ZfwlnH-Wnz+E(dHq2mGEy5EtHA=!M^lv*Q!EZh4K4b zkTFVkOIukMi*j58lT&>{aKBWzEzyy*xH^OwW2=AdQ%r28An|8;Db_mJL4GMgVH~w< zzix77OpGm(*%JtW3Kk-0?&z0p%+hP22<->0@a|apy_)?^nMp;i)?8BI;Nu%i5yds5 zv8_7A=!tbpuMD%6N&_}4+eP7m@PET9nacR%`-GjBL>+@4#EU(@ZY=GG85*laz%_VC zK5hB1PeG71VSN~|IV~k-gvw@U=zh$LjNs!hRbM_+$V?ulvL9ey1E|mstBizapOvMJ zl71%Bf8~Dv`jFC+-l;GlV_Z5RiY+kNbfPj3^w^{trMyzX$w^63l)vrwqu?7?nOJyb z=j1HV4ilD!I3lG zpmh)PKrwD<7UCZPbiPns5>m@jZc$GE*Z zEU-A^f{m zL9Ex;Sa80+sK`8AT`Bmz_`B2aRQi6!@d=Jc-n)aly97gbXNL!Zg*Po7H&cUy-#78^ zJ_ZNb;&9LJ?G@vs8ttU4ZcGet#gC>tXs>vUIIF(1I^T~vy&|W_%p8zKzB3|OKRG%Y z|Ed@!rm@aaGPk}?hrX+c>7a0%R)+gN^h-GQO@Y=J5oX) zrrDrhMbWM(!a!Vb3)75#9jTH*AwKb{?xwP?M$=0`_VYt)1F7Pb?HC;xFy9KYN{&l{ zV8~AtoANT4CKE~X&w}GTt|W0)N(#V_(jMm01M2Px(smQH73rs(u>>EreC?SdOFr*q z2C{Rp^dB!nqEm4ticQruN!A1O9DtE_*nZ`Mh5l8wI)_#CBpM?EmnA9CXoo1NXvjhP znjD`TxTRjWNtvdJ6?0qax-8Ppp>l-uW*3Yi#2n()?TS zjeL$Y_q$+&J*uavMugrk5KVPShMzP{8g>k7l284`0RLWakcF%lyGbwx%%;DncQhRk zY)1D+^Vh?UFNPMAuyx`l$5Q_bk*Q+70yu-<&MS-BR<8bTPr7RL0g>UKLoJcP@~@@{ zKIvsYcAEEw1J7p5U2p;5rO>TDe zd{%|Zl-)Y0eHk91prcL$@|6yfq?VaXgsw_u2?4c2Uf6Wk#< z1Zy0E26xwP+}$;}26uP&#$AGI@Zj$565JuTzd3j2{D{5lt$M1~dYf|pqU0&kbw;!= z$Q!!)gEl9rY@;hUwB>sFI-3qbUFvE($3VYiq$nKKkd2|hfy3~dGt{sW%Ok>;KJ&hbtsj8Z7{Mpul)zPmLyMb*Bd#q0!I>LM zc9c9Mw1y(b>C$Cxq>qR@59Y)e#0^zZV;@DgS0&ytSoczXvqe*sQ9F*Zl}+thCTt{( zN0NlrPsHn{cQ-N#Z<^g4tZ;mo+g{S&6!2}{HQM1;Ku*9_yyT)*7Vx<0ZTCET_LS&l zfE~+r47d{VvA><38R}3o)^f`+oUa1 zxy}~B_S7UOGb0ic9{Y>Js)xVRsm<~m)YgAuD5%i(vOxNMVikV~FEF@XO1!p3ldr<9 z_3-eJtE^zvT(5fr(n~=Qx-M{D!ua6JQ zKT#RMfO6grXPET=oN-!fnj6bFkVAXt|B(L(QnbUR_}sr7K+zDw+m$rvbfV)CgHMkv zC%av646i{+)upcSS5H?*$3bE-$ygp&&hm1|(dNg_%;?Iq1bw}`tDBqO;g>^;uwhy> zaD)5QCN#=Hcc&d)`A_hJ)mD*09Ecu|!m~cF*|n^$H$gdX zl{xyPM~v&4-9>?6Bt6sOq$^`Zi@ofQs#Kqmk$F{{%hRYUM^+Gm#zQj1H|hwvh*3vEML){c?1x}?UU-=ye_D}My?op*X;Gyi zUPNcff*#|Ic1z+t<^D~RpeW6cwNQA0bY4JhuOxhZ4yGeDP~XrDDVh>`_jst8yH|vH zYJ~KABvRR^l|*+;G;1)cU6oC!6N4vC3Mg51S$Y_6e8<$HS`o-{FFnx)CN(2fX!}F< zm;hzK#5)ZLAbdp?OY6sBj1}nkS?nwbM1Vq6A^0WabxbJsr8ymcgCH_<(1_=A5C=Vo zVFj9Zzw{wODyv0&1w}_}62hgA)Q-P$HJ!)af9p4Y?sm+cGKO;LOn~_k>M7P z&sZ%x4!7dzS>|TVj z_Ys1e`?mF=wmZ>uRRD_ufz+eE&O6 z>1^1b1B+R}3;dWz8TzA^qPRwmV0rF{7)XdYHGXd+-{A*Pkbht(1PE*DocYKNDG;sn_?0=T)N#i`u4g zud)Xknf-kmpk&#H%j$=P<@FNz-jDqtyfKe)-2diZX z)rza(ahfa&S}&E+p*cj(vY99aT>I)4xOQ~&f+CHE*xrZsBvIK{W=Ey+d>aXofzeT! zzdlBOd122R<;h#My-XDA?)iYkW}NE3A!wcvC1M^)2#sy_kw%d%T6wRt?f*;LXukLb z4W>+c$?C;9Q1$<#30agIE1#!j09*fe>}U<32MeNsz0R?i;pFdwWKq|FiM0fNA0n)r z1N%SV`tR)xwx6-wfo8J!Lpls~dAyHf3st=XoWM-N8>Pk$TDx|Na zH{Ya4bVet~QMR!;gEYp-!3qqOa^nohbo>GiOHDR5h6Xxi6Gsm2135vA=(LaI$lCz( z6xyn$#JXAIb`O0+85^Cn>Q$~E4h~zX&Gq$GbF?(2#SxjAxrcug+s%)3@$M6A5I)hw zW4@kchq-T&NS3ey)}cwIM@bz$W_rw7`s-LnvIbP|KaIO!CQkoMy^5U@TjvxTo`92Za`M`nf)q5exqyZBtI)E7 zji;Y#C9zMTPkem^vAK|$ZY)n$MY~W{RY2kbh*KSL#DP=oa~*?9fl*bT&QB)9bE1Fe zDS#euu^Ku=EL78#x*9nxX(@Wh836FxvbCCWHup1OW0kepcV}#;$%?v1*wZLuJD!$S zX~NgFmEoWs1Buba3$3`^Ao0qtVQi>lDO|^}L3f$5C8a|iwUf;dEOEHU43pPOD~59l zfwq0j^e8i3Z~Lyy`>N>jeZxlRl?CF9J= z|Gqypn*Tl7tjr&Q4@^v#cPh3aY>pX0H;d0|VXcm$%JURXbX+O{l}|uG!4vo5v)lFg z((D&HC?(WeK?fnxQLVp!OAHozilYJ!c~0Hnf7~#deKQp4dirS11a$mah|F~;aYu`lKBfivQA!@Ov zD47a5)sku#PZ&

Meg3u+*;y_hMYD0eUn@ylo9c;TCYSvg|-aTjni(5NItnsFXu zx0rHyCjkczE5drTnn@!(s*L_LGdJwKi0nszXn8uK&hO^d!c^mDA+|3f#o*~(de|S7 z`E!D&5wUhMPj{U)ojJ?N;2#v)-Q8BY&_c3p4^L*wsC>Tu!3E;`yLgdCLmO5|Dz_@7 z_;8@_KNA$LElTvlU;S8EQog3FDLnziSCaSU#r1G(Yjjo5U7JO`WBTF&__&ty zLb7zbN_25L(oOrY;s--+wZ-#FB9^}v#77jg=(#kvfgc{z{z@< zW%P{|YSwHN(h&~(Tq2+U@27Zju>_&-Kj-%yziAPx*p&i2$BVEWB2(Pjf>&tCODyDd=r8L=h>!1_DSe?4$o^ z^&?LyAIJvN_QM7uHXs&+N`E74JYj(smvZT~CF?686N}2N9m;;9n!!o>GwNt64Ly{_(8I=<`2F4o?{@k zHfC|+7~Km-b9|zG44LsfnpM&r73p&+1z9;&`EE9w3_w*%Aue0$FP6cqlSvYOba+EK z!E8$=EfGcp*nUY%`_j*Q{Oi0M#<` z4H@WS(J7MtgyQEN>|KC9w74S`*WfsE$Nuy|*iSW(%wQ$DAZ=FUhsc_=4!|ji&=VAG zq;U%v$=c;#A34u>mF*Y`X3OoSOo`M|C!SJLhfH$Td>&=F1qbSW zn(TJg)XqcMW4s@Z_IjQA04%J;0i5$7_`wV_hDO2V?^`J;YG-FckDPA*7u2oxdiO8| zxrGwS!k7fxgQj-Pv`CD1CizC-)Sk+$3~Ax9-cxBtvxgayLYs2+JNPW#uYfM zYB0d8yXy<^{*S=&0a)-uoTB0s3*>s3DXIt&{JVU!3qPyf`}P5n9Zo$aeD8*!_nZD! z2Pst7I55`MJe!!gTA8`pnV2|0Xd-XBFU=aqCV1ah<{_`sof#)t9wDAjx~r;JI1<2T zwY&g-^ed(Le|*jV@=L$F5#?7_bET!GStOX+$7N)!M9A2T5F_wp!qsJ#DxnvE7^Fpy zh>~2aeK#h2<>ZKnh|2DMiBW}&EfI0`Ffksa_V|3J=VaSCOMl2N4}sH}VE{!X$v{r` zqZevOBm;n`C}`}a@{V9^XK?cH+ML+5xDsrF;xB_8_gN2#(7CjldmFp(I^-6SRhZWd z)K~=)A~N?+A@#qbN#fghB@^bH`}c3HIM!&r`4&Wwkj(qrs&i7RZJoGW40(7lp$f#E zyP$+Ib5=CAxU#;g4-#J=dUNAwT~-81hX%;uShxmLWB4Rk0yf9M47)PFBRn~YA66Zg zH;rHI44~HxF9W;ATaswL?%(+h@bVV^I#_-VOkh`1p^I5X&rENH`eUEC5GCdsdR1Ka zxVRXaZB*jaPM?qfFTP6^B2PRoR4xaVNLU&i?Z-$H$$-I^`tTL}#D=h;982l6Iv4+k zF`Qx*I6JHChv&Yd#fJT=e@=s$&^tM&ToJtBfx6C-+-Ep%|W5 zw$^b&IrFLR+Cav=k}s^PzQpq23T5@~QUBi8*gFm??x9CjpZAN^d2R|dv%o@- zu`!l_%f3W&4cXKMbinTj4LoCDCuxK%y`HT&6z&4hty(10lwlTrp0bo30o#4|M+OqF z(meU-=Q1zD7MqSr>_&2PL-zXB|WSk-t z^^Zxd5MToTe+uEn!35!_nnXsrw9pkoZATDA`A_ zr?sxND$%DV9V>lxtu_Mu34HG4<^OpQY3^vx|73!t8R-OkT;XPBTma5C`b74zM zOZ*8e3Z$2`9XsUzF1WL|e>YExfFRXDD%5PpVA7kcmoqszvDTN7olS_qo0*#-V{`~o zFd}u|6cLp`#iguR@BYNYmc|I&O)D};#)ye?Db3L^};%O)1w=s$?zXxDqvQPt75 z_}Fo^VcVE%ef?9!TL?8dBZxr2_B2>obJ0|4@8)@jrU{j)nEqHLf@0ZKv zeu|IWs#&_R87`s7ChV$(F$>{H;IeQ_mpswe3XG(QrxNf|XOXgq-UZ{+@aCWT8@CB} zFh5gzpaW2V>*~p2*PpeN%Sp+Uf>zIj;Q#G)MMv%&&1wn!NkI+CDwIDHI|WQwrAdBN z4_MVTjx(F6rbr68e!bZ+Z@ew`4H-$Zq*{89_4_O06;R$_iN}pk7h9N}vdcgv<>}5F z&>^#^wPtXp|Ai`qi1YHkF=Ek5%VJDBVBXjhfRViBnC5eE^8fox)h@WF{QwXXV&+R! zWO)xF_+x4dSKjye#PC!F9vCN-$(C}7w^f^NZOQnv+;|A2#kR1rprleiH zBsEOip&v0-KF@^<%=#=pI(($wt)@P#BU0Vje36q=l$3NkE~nE^eR@ZIGJkP#w#Fw~ zk+oD?>tK&j@7FJUuZLa+xs`+kN(~P`C}r(j9TT8;w)>MaY^}Cii1jre4c>q)%-5&G zhS%5m8P2L5Y#nb2KxmPiQrcz?TbrAk8yg!dD|!Z7={Z^coLuJk?HpSabYp@s8YX*t zz*h4I6o&Kd*~C{^yYCE_)NXK|iF))wJSBu~U%&bx6L2<^Za)!SZ(r(0>qMw>G}l9u zAV0WLZikOVo{tPYE2u{A3)^;pXiE!0q3(quqmrf5wqGy$w5h9K6n{M#f82cjnc}ocM=A(>;WdI_W9h z?vV@|EB;xWmLr%}D8l4fx=dV7TJ$%==`}QdAzeY49>vto5Cn}&nL_BC1d?G@z#^pJ zISn)pPR>samSL;mZvX@eKHpQidSbEvI(hTTv{^aZ7T=xM)bOrpQY%za(UdrU7KjY_ zydC~08BM$Rhp{rXv$~J@7J4#G@iAj>=Kq}ngAq!^6xDQZNXc& z%8SZwgU6^i`B5$1$C>j`jMv{UzUEPVv%MbJrM)*{qgq4@-(Ue3X#v;? z+9^S<)$FD!pgiecGl}QpG{j;Az|fnEjXu-)-2J5KqV#R>U+6EnK}MIm27dXjQZocV zcdWra-lMrjJi9fUCuP=Co`t@rnXN{^;nxudeND6FpwyyT>+IgeRZT;yWn7(HLMFA*Oiq0=0VfGs z=D<>`&+YN`3H2n z=jPE628PV~zvSJI18%FcsVz+`m`HE`aZB9!XQYzRIn)BSohcg zBp>oOJ}I&sHr;C#8my1n3Hkc5Y8?nXHY?I!=KIS9{UXgq|x@16H9QA>+gu{!8}e}|D!9>xF`(327SV91i>W#?L# z^Z-3ar86|a`5zYrH{P{lVui?gq!6B1W# zKa}|u5Cf8{pgy9-hXnAs>{FghHD4Z-g7l)gJ~So|hw|y?VSgtH1*@{E8|pNzx13a& zx*q4vD#H(zXpRnfXy70qQceRU;}dKP7!5+rI(?dojnKnFuMo%N{C4c{B#v~TsR}zE5`RH0RTdL+m@bqd zLRG}V{>K^cyE2?Q8w0!XpE#0Zxxp`%6ou;kqD&5`dy>X5&di*MZ^c_F$os6{>feX>WAR^2FoheCiIvnD zZewl`t(7q5(c-{#@?G%t)L|6?}j zYut+GF6+6FfiK054>|1LJq!Ufid&cQT}1DS!-%9b2~VLt!>hI35sWjot&a!>pmgjJ zI@**V%cp;pv~r!nt!2TIXd3KzlQ5H_esAk4!h^rc0F=d)xso0eyjS|3wP^O)~tv4 zhwS9!q*~W$>4|U&D9e6~k|ONV z=39SYc?HLW8iPTWIMRwj`0LOg6Z1?WBo{cEaE;o~XkeEY<{uX^W@%kJG~i1~W7Elr z6_u6*8_>igU$p@#3ib=vPU>YE%1>E|z`OvcrI;-YGRx?(w=9GQWeJwnqNQ3FjT}Wr(#QbAq z>Frs`KXY$(?}+`@uAo=H_OLizR2 zDcq`m==RtXnaUGq!jj5kS@hU5ed6G=QU80GZ!kuPB*<1sAea1`?%>bL_eVN?SXTVE zEd9iNRQC@{WkD$ge1B>ps`lcPsUToJy{Lo(zbTPptc2)%FerNM#B<)TbGjg{#M2YE zD?nU{+}lzU&gKD1Ex>?H@ht!u^mxc8C^8L3fF3|Bzw)`pCgV077F%6_!B>pMVPyO= zs#5(S7+m&^2ePQCS<4SL?EOX!S!1jSUcf~4X{^oZ!;d((k;Cj~X% z;5RDMRaI5>hIQLA3q6}K`Md3GlX5EM$+tB%WltTMK|k*?$Dt0>(r&$a^4VEIKFR+o zqA%E&D810~G!GVNP&V=Cpf2zFeGs(tivgTzcQ?jPi-8?7yoGR-~)K=jxB4zqa{w%M6mtSZ(Ljn_ayhbGYcq2$z^bJ2=lU?8f zH^&|+s1!zfCx(^&veZKGaBdF|XM7zx0SXki*)-kGgYrHLs3eW$xG(YC&27zH9lsnB zOXrg28j~8oZ3BD(Htjro{-r)AcOaVhys$7S!g~G6QL)31KB#kV_Kto)#x=-%DUC_N zoR@drJ?>!ma&vRht(vf}K5}vUTUy>*FS3^EpenC{W?JbAuPjJ&>UU#CsiE=O2FaE5K8)3`3@LiTBcsA2&k3F?Khc4OCUV8(CWevO319gu zB|aZe$tod8jH)y$xead@NEZFn8m$=h+@_svI9E?Y>JcptuxB@u&gDhXex}EPwXKZ4 zS^YM7`~|W8vzcC6IW8 zS4Zzv*+NEn;6n`}{ppHCZzGh*nNal7;A8g#u=d6 z6!I9IU!nu=nx5)s%loDnpSrQ$YYooNNwY1$%Qx5G#5AeMYsqxiN65I|Dh%O54l4?% zwsfng^5g^!7OGY~G2jAYVtPET zv8)rJN*ltx!YQ;f#<1_W%_60^eDmZ2Qk`zGNzpFe_} zRF{w;0aMHfp$+yD@zzK4SIrc0V1uMBZy%-%8Uj~M&&ZRd92=PSl zAf#n!b3SAWBHoeSP&=^yy{GpVH&{S=xYMua0CuRTe*N5$p z51zbpaov@pF%qm*L(|$60F~Kpvj9eR`ezvMupsdsu9?e~5wpIu-|jH8dd`q=9k*@Bo7(tHO&oB|8kNLi(KM3m1a^uSYhm8`6r#YewW z#s4XjkjBw&?H`LFy(E}F{pA{O5CkpHDK{>@bCjnd@45vIcHXK<_ky&3gzXY+2Z>Wz zk>#J$d<0MWAaUd&K8K;Tlc$r_N-wB@DSfqK!R9{aWm2Et@DvdWxI`w%wO9Ocy_FE8 zWbp3^hu9}r1v4F~mgw6Z1U}yP!`;QXy|E)~+i9dw_MuVq9;9{)z6rTs@bPnHV)+Vz ztjc4%VrASgGb?AI(*vHZJ|C&Hv@!au-Q>rIbpQJ0;QE{_MS(_wBbVyt;$xg|tJFig zv6-5tQlD9>%E#9cT79~vEuhSe4hOz{4m`-KFc9efmG@R@j4riuF4Qei+SP=DgOAZBkhbnMU2V}4XpO+q$UO3AlcG4KxkCS zH&%3Mbq<9hl>nt+jEmNns<)kY5qurnQbDw zk?i)WZzJbvmsc{0TEg+H0l_7_ns z91Oe%Lfhc}ZyujNGfy{OHaa@Y3L*K?!QWEmi96&FO@9yF4~7x!jv(=||3rXuZ>#Ti zfXiqqQjGeWk(A|%AFFkA)<+m4jsP6Mfw+XeL#n6Ot!&aSoQ5o;mFwZbt8BoEg2k-j z3=`N_f|-y|^Tb9Pw6B|rV=`SQ^~e53s<#oKz2*_@gbGA_q!Tw3aK?O0mJmQHc_eLv zW%bdNM#i>H{h3^fA}75~quA@-g<(IP!GUcU`D5psqUpYb*=Ni&gFrGG`MsH|@4sy8 z@^3=t4hU0RVY5I=J4{nPS2)5(SlhU$PE8dQ(;YEHlZ6A*bQVC^SwA&>v9af=TQaKLJ{=k8BnZBek_6MMR~xqO>=@F9NW z=fU|PuE=r-$yl0$^9s=y86BMKqs|s`^}};amL4p*iKf#@+dF^EWEeSm1P?xhPM4+0 ztHoVJ9-Q?8$O_il+uPX^rCa~*ONNubAR*4_?r42}0$7%0)++hONyvG!!kx^=yxy-C z18-C$^JDe(~ z1YY!p4B`21j}I+2V+o8|x!u&5z+o;}^#-~)Q9}V4@$@I- z7?;}IOcB)UC2qIS7v=S)2FkeZOp21Z~6>-ZSECd1(ZXw&!LwHh3tvBfHIyC+kBHKE(&et5KIopfaqky*&@)$hZ3{zmru zI5v57A91^QZ)BT!LQcCztSxG6i{<&2-d{T{E$x7duY%e#%yBMgd(0U>Ed6Gwc5>aK z^-)xx+W!NO!`r&cRsm0~TK%Bbw?KJ%*LTWbWFd4-Cod!UAa487@8N$7UBm-X-~2_$ zb2r5KrqSR_3YpX38dgx7j4?pie&s9xF#D<)8*54w19;aE2|lM5Bp;yg-}5sw?k^WB z=LSd~j==y$zWNaP`4iZucV4|~1{U}#!q!}Cc>2D;d3r6vkW$q>{O6V@vHkh#`ei`s zSw<-@w(Z%`)7AIka^rHdJ9Qt}wK#O>W@q8<;QlXP-2t?~pfOsDzl3y_8D3)F+N|2P zy1W9H1)ZLlCms7e(iCKI!xEYC{rl=%)&0=Wp}9)bF@PpI4nD*Z@T%xK5T8s*gDZ^NY@XK?8EP;(WP|4=XrQUDrPXpH#2)h>5Rj9^P&P}x zC=n9JwzYZg7b+1j%{qIBvYT^&e5{9DfUh_uQbzZ*u{WRmzd-Jq3&CD1{N9yy)70vxyz)Y4L_bWI&)D%7~U4X-67ujKBU3Y z)cC!|g~UoS54q0R3)kM0929|MiJ@$Cfs#?0K6d7B$xVbcpr#ow7}km>U`F%DBvCl!9OSM-OY$`qFQ%F?A_p^OE6Wm&%E zr-y3L?gO}6^d6Xb3XA063jXx_Oq#~|@1&;Zz`5_atnQwnGz@Cj235kJ{CjGo~m(D2X>weo=;*_s0uWJ6~kj>FEXaY9< zCRdQlVfxHbmcI7>=H!@-#=P;93 z^S$J0Gj8ku&Sy%PX8f?zUvhAO{}|KRx$Zf?0NqXEta{*?KDg<@#OZ;?*7?=Or;R&D z3WM{G!2c`&l5Cs{>TG6)V>m$Mi9{byIN+JQpaz*i3KWo3o}_oo-NVtx%hMNz^`L0d zBzq?9&aRcd&E#dwzL& z`FCK|-5Bv~8oJb!g1u(b($>yyoPmA{VKhnW9z&10+8ChOs}7N2ZtCi5W#r7^+zk$v zlpL64{9&J!bG#@|aWInrYiVkxXQ=!R)+{|ST!svGyPB9rt+cfzGx(eLGH_)5v_Ixp zmFLTLaDE$)h=Li}eZM!A)3N!&!$lNAmFUb-D7YaZG8B(ii2PMZmLM8bV>>Hq`##<# z+Uo8=ml;ZzAyt6?ynG6=wh~~p%~LQCvU-Uj7^L~8nto!Hf|45v5|vUF6uwD}!)hpX zX2vJX0oDOdqW49azKx-?GLmU$NW9RDI1f(-rUw*I6e3l@w}0hry(th^ibo88_jU0u z*$eUt#4#JyUvCz@I!+FV>ocV#BJUX+`sC{pHez7w7N!=N)`1e`mXMeKi26IA3qArm zH&7V4>!xblaj0|O&vGC17NHB6GDTcT*HN^`8oV*r0uIHfWbx z9qSIAQ&^0#1fho_*EK%#as>yb0WrC=VvM%;mZ(eoc4S;IJvH`n87H^myX|O0e4gKn z4B70}%e539S*OVYinly5@;Q2C5u5;wj-vY~z?5cf+z>J;W zKZ6q^%K;iGQ(BNwYO|rC^%q0yi6B6A;IGmB+Z=5ZZg4s~+1AX-3hL=~U-xj+59w0n zpXiYQ7$7&3;pyq&fSR!CjVkxn!u|Ehid&b;#yp{qPV?&KN8iVeO7-US^6mZZn6`e4 zdW#mf&Y-l-ptEO({+19AKd*p{lm%O*Z0RI3Nd2V5|AWRt#x7brLn1r zzmnqi$GBu3MsRE=fN5=5`u4iEL5@0@a-@J=K7VxYkxw9VbQzfAGqK%o}FvR2V*<3vuRpy^29E>dXiv|LJBK>Tjy!&3S`mkl?dHccW_GhLC zK0n@F1sR>Zj0NOb$v}k?G^jG1qMY8#7}Os!A6L&qlBv`nTMU!%=7EZfhWWkm zhMAm7au+mPG@Ruig%~(=ZF(BJ9;G!l9Ymr_ienDzB;j89X|xF50b>u7rh~lUDuzGu zZWIPJ5Wtc`k=Cn2D*0^584332wlpSml(>_Yely3`p~jIlRrsROjBykKCG|U^Ro$$0 zsl?m~=0&fs54QDI)2dfZk81kN-TeEANc=|s%cU)5FD}zuNy0NyL4ftr+u3L&KwJ>-^5UTpIhc%R^X3yLrygFj zaq3%J8?R3qg?~rX;OwIxw9@|@)Y$fv8lN)UPW8ZoKh}}JqGKQ;R$M9IH4A~k>F9#0*<}j>K zjp_X_grsC0O!TS$S#B=St&~tu+m$k9s!|bsLv{KR)L%AUY2&-{lOC)HVpH2#UteBb zt>JbvE9vki%F>Ze({=+vhCrTHW)P{ySVxDqcWCkC!4X8r*g3f+)4?O;AC_L8lmwhV ztXw#Agfk8>1P-ctnwT_hT9QNi{@WH_Tw9*m{}C+pC565!Q+1quTqEJ03MLc7%uv>E z!7L+DHZ)CbIwkG%;Y1*<(BY99afr6}+}t-4BYNqMiBAJX6fd1 zcRI`sX}1ygUB6+Rs7SMi6~bpr9S-Wti+(a+NZ39J+7Hd)e0CW@fY&p;7|RfWA*Uk} z4Q)2b9p!gCc$Q|OT*Pd*I?in@jq9bpO6|tT75f~|@kMOnQ#V`M0%Yt6J(Qpn$WJ%1 z)Bq18jYUaixgDFJP!W<#MepXoKzg7sBe6+FjW-Fr(<|F9E}FMsdBmQE=pN3m zYMMTlQc;Fh@+21jB5%;C@+g`c)HZE23>WP#Qi6p{Yj)FL0ULho)C?`~a`nS(?^;VM zZSFvZki}yc2O3)oc_E1BMk~!HWtq!Sf|Ofnr`6N&#AVCpX*YSDaiN2jeU-%D~2?|LHF=+ z#akjhK7@}WIUc?@6_;pQXUZ~|YCDi=Wsi5wKG`#R0?wccl}5yVS-KNT^g(C0Xxg96`dqsI;+WR0FBO!G7Z_94cRVFS|jCzP;ZZpNKlT*-4ZIPCYx z{dQl|LwjZSHiX#KCDep&cNfs*Y3tr-^Q?nb;1iB{^*P++hDlVJ*S$4jT9W*~hYPw{ z=mYe#`FWg*Sa5s!|5?L<#2X*O5TO=?ZY6+pyOHXn$a;UYMI_H_^jaNRK3P+EKb3&n+(dCtjd;TCwdzR?sV(=qjO+kksQLL@Sl`$uWPsALq= z_su&bmadXj^7_+k03>ZqU0r>6Cg8$iVnorEZ#`xCOnn08paMbA%W6I)T`$5jb{R4( zh~P6j3>r)&+A>=1vO$lZSWK#X&@|PEErC_6c)3V8j2;bd3FmR(%vvD2tb=riF9xw) zFiNtUOV|fz`{<{y?|p=!1~c3upK$gO*hzUoU8#Yuzc(q{5+}mfe=L#>4<|-2-!NOI zFk*WkR7z^#*diIMSDqD@BDf%ip&48P*Bog<*Dw)*WC(Qd>VjH4z=OWzcG1}el&^7w zBXky{pa$gQ=th?4cL@YMK?tj#E_wR{=FB9IL@pG7H4B{~=a=$@!YXKW>`V-iZiHDF z+3Ejd>Mw)hV4E&n6n6r_Ex5Zw2yQ_Joxvrz2X_X7TW}rR2L{*R7TiK`2<`-TO~{$2 z&VIkWDT-fE#SfakyL+u`Wp}~Q|7v=&xXrFyBzSr%259D%Bi7}llo6Blb-V5 zN7zW@Y8n=s>8moz+zrl+20DHX6eSf3_}jm5L<%W1T`^+>V6=+P?y_kJKg+Ev*M=^M z-{eJqs36$GypFE^5Uyld`jOjMb})Qk*tL6&v1_4{pT1)(BHG>mq|4<;=W*BF^j9bW z;SF>qTVj9nIzxJkfyytmF!#3rjCT-%5^}4;>yS%;ph+T&NbJ{EuudaVi%Ph~ew~ws zePsc%@+*2LEg{2E15U%_AJp|-MJna~ zzZWE?-vLNCMKu6d$77qHIs3Zyk6kP@wD2#BE4yS}g!zk(ZCYNew41btzT|DtPsy46 zch=|RAtRZjRu|sp;yX_Y-eM?yJe;~$3rXVOZW-ldgTLM2g5^+;h(Ln z@cRY{Y1|nnCB%@U`fy40q)a6Z+|%COZX&|lGLZsqzUG4`c3?dnq5x?o`$@If(l(G& zu!><-CwQ59B8A$%CSARQC#UN}+cOOZG7FSBt1XShyAzJ&ABaV{R*P$2VdUHOYZ4SmeJwJhXVl3g;k9lI9ep3NR{1 z&T%;!A-wPP#1qJFve#&FhA#6=&lIw>O}t%6UvciE4u=KJPD6F@KS@s@@GtKpQU}^< zQrPg9AWt~k3&*|$IZr>jnAP39n+_s-sLsjqY8i`uCx#q%+>*xPjn_oyj($_@vi!TU zd~7f}7im4zG9k~ukaES%sjCZH06X3AeHB>5F6+z+)qrDxbiY79+L@d26QYpWdso0~2$;Q==6DwXc(W>`BMe8&qTy>B$DsFNf-Y< z?|&DmBsjhHocqKlQ-P3Hk2PN4JM}o+PB4;X8eTdHGZnAj z@g=!aRVfOEU@7Vy!_GTm17h^qr}Mx>Ivm#Y7st^eVy=HVsjar@05+YZry-?AJ$`kY zcwe3-G@$vR!vxFmU-yrtU(bS8ac`F_Q5pJ{&uU-ED%l4$io^%MlJX?OWu_Ll9B9Pj zimet$v2T;|rw_G8F9M`u|8JoDCiV9N{0$3Nr&FN=$I@W;X6)1gcdBV$sPpqI%&=y# zKMzb3nvLfl1U~w0lJ?JA2E)py%~(Q9j&ymgx8cU+neioRK>xU{lLH$3@(;$o!8S~B zu_q@eB;jpYAOXnmd3pM}`+MEYjN~&I9;g1rVq9PZ+3epK!bW>YO-r@;t1nD9y8^!W zf&IV1Tck-qcJuqjDP;c*qQK{Uxp6{sKT;8muduF_Jf^C#`YSTcVa5tAC5 zJwLC)7aI1fF-EjnT`qLhJDuxVoQk1of&wQ=N=yG5KjQkSFn)WI=iA#h>%`r?Vm9Yc z>G3_CqA4{)kk(+~7LK5|mDjzXQ|vgaCUZTTD_w>EWA~+i>&)S3!mLZy=25yZPAln} zdGv4TTm0orPAp{^-V5mrV~0;W?>mzFQW^Hs+h35@P)6xC*J;+#DQK78Cx`Cl-@nypuLSvKg6G z^7?sm+$wDb;TvP^;Hp>hmj6Lpi$z~oU6rJ?EV~iC!ENFaOc0l4@hQi|NtPX-tS;p{ zpKU?MDj)$TfUf4hR&@>DLc{q~{2QlgBD^tp9#!l80beF*pcdt>0i4q1fv6S~mw5!o zq$w4HOzkmc7k-IPs9fT{#+IO)F9(0kx}Iz1PW{QyZ;sKXWa)3hso&bfaeZXIkek`X z+7D$d9BF7vQorisj*>%cp|2^cMd&?qPXe=rR^MB>n&f3*#yHe~{& zQEM|TYsro%s7E9c^EmY)k{|wNz#kYiH5yX8K1}NjKG_tI!@+O$muOA=JrILjeusnA z4zL0~uDQ`7W{O*@DA5Ft`h|XEN`ZD&vdeUcN)s?469o#XzIu87v3Qs*nA~U4aI1gp zUx|7_BW&gUP_UC^hn`sgNW$JQCut(nlxkdK6v|6fuqR$xEyv05$O62we!r>JK2%QY z*LeZMKq*lu_M0#E;{OxeNcp}LphI6>1gwt#eM<)f3P3snupwB1mEN&1_?a^7GcgbW zSO=HmxQN4hFHBK!wG*>BUwiAT$Hm#$TD zApB`oI;g}NTn7C1?b`OIr&Lr9-tQT;NBN}0gxRgH%j2iivT%5~if!FF_f3B30>YU- z7VE>t5i5i!C_+0>?mLj`Ze99*iw!fJld z0zXUwR5kS`K_h9oYmU&;ilQBn(d;{iVAX6+k`TQllQ9$=Um3HveVJXT`OMge-z*Y2 zkMCZ7xV!L#YghAao^0V|#fV72gJqEB&SKkb<<|KoKbX}@obvy1n_V5^4AkYI@@F@+ zjIQkJL7jUMC2c3vWF0zZ7ppYUrAtr-lHWY{PtU%!2-=qny9Se|N^P6Um1)*x6OT z+64!(M5?K)mLSuhV4`Mc==6%BoE(E$MR0A?wdfvI&bpO@Da(Uj{Jb%y9rfHI(&AP+(kGwQ8wmdyUq5z;E%rq77aNe=ysZlKMrUEEw8*_-$?%Fd-6>X0s z6KnJQz?uKf9cUojmy-=P5t5c1{Ocql*gF}Z`$Y7Dtu$m*%lT2An`)))v+U=`QTC5V z18MffR{H9=3GDZ>XnRQ$@yOVBTI& z@G|0xcp@;X+$}%?7EKqKRq~)gPgh9IRA^k$iy;29>U;|*KsiJ}x6I?y<>;#Zqu&Q! zAvbJDcHSoh2>;OhuVX{=8iN#(ipwm|d)I(!Y452JRFcyO@-YBojvM3HSrnDc&Ob4o`@eTkMOKz6eAcT8|J0yA`yI?&2mhj2 zc5rYgQ!FUuK$mum+@$TeQ4A}O(}mf)7%;%&D-F`|=Jd1RJXV3xbPAe+;4mJgg88&1 zd95Z75}Vp46!x<8YkXekmdI0fzjyobQi;tPJbZssAMinA*qVlq`D<)wLWO^TCvdlC^lefqhIL-93PEpv z(mbx=Z+!#`QDc6BTzr3am8IYh`U-Dx1Ntj$Z}l6R^OGjj zaCXW(kJ?i$wkr#pV=&5eoCX#z8r!;WnJ6>ik+@5?jAHrnOrvtbwJF7B!%Z-NYw_D^ zKU7l6rHOT03t>JANs6p3#8a&J^3GN3G^TmowW~PnrekbB-I~rYL|I}$(pM2`KY~hK zgmgPer%E2vQas8z(&^soagiNb>Vd(!zg!`D#yy$A^cvHvHtz$4M|1u2P&f{$vc+p& zf1P03n~~f8n?wT&@R0Eo(o4J{D}VB$xRBb~pqg`NV}MwU<}ArP`AO6l3thaqo?Jhh z;eZCYarHy>%M;TXT=lHJzyEfhpq4Ru6y~pTo+1@RKGs6piKL#19Q<4BJ<_J`XpG!q zac(E#1l0*Pw+(CR{>4R($UsFJ-N#2$Ru?*S*&m^Q-hl${$i~wXqy=!K9v_03|F`ly z!&~hsw_qQGzA~8|JLdxa+VG~oz(w0mD*f|KhZ?;IP~%|`5wDQgF%eL)3{9j}*cvf2fPNknR3_+2q7QG}+r5-fQ` z#Y4_B2X2nLotUWdA-$O1=>8z~9^R95D=8f#yf}u-#jyxr3aSx?n)J=lnIsKHhCfIb z9q)!;`_0o>Bb?a6K>Vz#a!Bc2R{B?I-0m^T_|qKQGZWi;KP}4i9VA zYY0TlKM^BY_Ltzxg>&Z__bL^p*rQF3Sp$1QJ^@OaKBqzit29o>Nzi^upnSWYjn0iJ zk)3W^H8o+4-yodV9KE}{WGBV4EV?)?dmH#egHi7O$)EG&q*XHDQ$-1jswEHJx){hG zX(5>_lL6-?A4hI=z>`6#=qEX%VLw5IbdotQYc)5PlL(&4@c2T*KUM)*ACxwhxiEvV zTTKsT8i&3VKdS)1QY$Bmx_YWHCI<(c`Fi6XF>1sqqojr^R+@%ek44vtl0lM%y50~I zgNd?^j5Sk|h7E6`)trRgvZL&*(@Fc%{3A!a*NE=K)FE*T=2qw#>Am$W`qifqoZ+bW z_Su#}q<$2xB#ipLts3hhOXcebhExNP5 zXe~aNF(7O?5g|5P(4u>z&3YD@J28@A&NmM-q8n6eye5|En5+~6{*JbM!C65~^|bP0 zgwzJKR>riJXK=+eDkV8v0wEus$SXvU(i%kLD;{o8`MV+ z7SlHurbcI{n|sYW`2E~8epn4BMR7IFTRs6+`=w$Z;? zx|gb>yrCud@EUlocTL4=xz{yn@=i-@8~fdUtk!ZNof}v!O!M~8`(N^iz>~CDmOIIw zoNLxt^v5c3FW3D);OItbb7wTE#OA=c?tm-mwL`*2D0kM|!2P%I;2OWxUaF zC9sC#5XLKh@sBNjwG9TJP-Bz?#A%&W;Q~H z=8$*W9KMXf{T8r%HMxi)&Rs_2*_pB816&n^J{ni*KAO$cAq0KnA6OY$tBa(@;afIs zPJ2kQ8dPJ#qPixv<~~+*8UyXah*UW7e?2RR%!I96r^0^X^C0(=6{7zRXF))aH1(UM zQIQB0+kvl$^w~G(9=KdodE{ha@#y$yI)PIB|0nxcYOsY6UWt-ftb>T^zL0 z6qQ#|6dg`P!&8^F+|9fYiEL!8O`v^yW{b)Y!6CQ#;zT=7bXO$13~j(}P=~Hvq-qBYTd2X>mX$19=qt8AnfJlQw8 zTx@5ms+={G9#Y(%sLk;XV^U?~fMh(ygnEEy(CsaEQ_f_fZjdbX!yYT0_+|Rvh?KeT z59Mn+Xz=HlhO>WGgp`AHvIamR;sz<1tMTV{O^}T*J1eNO=fTqNe;(d1llM7&^IUev zIo06S5SUae$^MH!FLB*R%V}M>64dILqc82m=7^B5Am$x}qB#!sb5(?wcmm=O3bPrW z&)N3Y?ZFRv!z(m{1#MoV9GE6O#DwbRkONP&hCwJ$hr4(G1%QXy9Y5awQPG;+R4%jl zPhJ{Xs+nHLmRbDi;z04!k_cS5Ev*r;#Ws=Cfsi96A+@=Hih}yx?$noT}%MxY$dUv27qB2{$!|CX#VRuirNvb`WlPPEV{7+lV z!zWo8G!?_o*k@CbIjIf=?zS?XDy%M zefy#{g$3WAm%of-&t?F=gVS!aUbW&ui~pz~@pUBeC3G^(A}s%B;=RC|a7J5iRT&$w zGp6o%5S2CZPwXNs9z;IOI2Y4O`R34kNjH28*p^r_oAtxhx`Z@gLTT=Yl@Cs6%?|uL z&SH!LtjAF$@ji&jRumn3tkOuR$9Bq$P!DwC^HHiozY<4GRpk0m{5NjejoP``i=P-e z2Hhfa(AaqrC4Ji}U@+ zrTTIsD;Z2wkns8X?tPNsUasq?#zBO{TFJRDI|XiBjih9;fCbIC3&AA&;rCXznm6HV zUhd`8dVdm(BV>;L$OlM=$3L{ec=CBQZU^hxik%wWzPxAJYA@HwcQ!Z0%M?G`W4jbV zj7{@B867+;W&|ZxE3$-xHJ`V~S*A6Vn*Ox!rYE_Lfea2|jHNqcL!-5trHSPbF=u{L z{hOnq5?F>v*~=7qHgvl6vwPaV;slZSK|LQIlbg7&*f`>q11Tlv3P%8E|LqxU5}U+I zUNqcnZYLJzHcFN2koyw?E0UXsbxcayRC_w93DrznIdPP6f>XPX6sqq(y03;Widg!q z>lm#_5N>|k3dkrgvOzy@sE#iB^5rh^)bY=Ldeu&VRM!6%lK1FN{|#=pHDlPktW=FtE{#K00uI?H2h`0g^uS+}P} z)@q+a=N-i1bRK@z0|N4LyE|VmXRMW5SfOS+*i27d7Al`2i$L_&bKsRKVjUB&1<6b;@OzDanozvh9X7AfaWj(MtA#$^vD)za>lB-fBwg zc)Cghh@FT?4#w=D_NhwuLL)EW3CWJwl-T1rJx+~yaY;{Cufz_9@s%9XSnSVQ8a*Iz*VKMh(&G?F(I6j=# zmuaPM3B6R{l^czcm203A(`@b~LC`9&kM-YOXOg9?C`bET7!!9|Wqx1IPxo^y3>v2( zxO-xwgm7hc(V08H;Jc4DX?TlhEypD3Jr1di7b0@jC%gf!XubHT)a^m&m*ab5vaY2AdEVVaZU;W*i1rj z@&9tRdmxJVjVCw!@>@1rVYgd;u9l~rbYsnl-o?{Gw<&5({?02uHF}SLXx@EYRgG

eMh6909Y{dwToJJDCRN}1#i$=G2e_?gRu0-5*(s-4fJDozTbeyAo&f_4`XKLk! zmcUFS1@m-0@24qRgb)($?N7Tu+!dYQmjS6e*S*cUnJcGJ72k3{<)HoXq?MvJXEF}z zGXRu)m-e*9nB{y%Bs}FKZS~%1+t$A#OS#w%d*UT}4kt+#*x}x8$$Y)_TZYiaZ_xiD z-s$}VJALy_x4{GPSx~*y?rvfyH%v$p`=NRg#eL?E{9=TrLD~-?4PDMpHVs`?9BX*t+5s;P zXMT9n0~(sjz{MiZP1)WQuis45ONL}PvNA%$35awtw+g-Z>ze=nnBiAxYX1MGTN2)d zNVUKk3wA{4j@>c(N2nw^)Ufh8;xxQY8vy?n3g10`XpbTv9AJMUg2`*`#Qp}#{40bl zvY^UBMF2{Yo>nc!s{?OoP;0=#F#_-fKCAU_KfO%kBo_Qa%Wp*miqJ^<3!?_6by;O= z&@pt|Uv+i_eept-_44-)@&q?_wtiX%%@Fm?i|;@R)3qOraR6g=aFXxIkVU)k%JOox zvs2-%sh6dPW2bJ_0*CG=jXSNAY^xsj7w5Y4^o9L&;`ya8GiAkt8`K50bZh^dGLUwx z^`CJNfOlm|i#r0t6DZClgII>4g1nkp7&aU2T|F9{-d**hZ$ZdpYj2(iX*&7!cJY|Y zVr!v_4jatRY(JxYa840QJ(e`Ds+evh{z`c_XV4ce)RAoayW%1;*ECGsv^z;5 zag5t=h@vQV({dtR7FY6~uX~vG_#}%0--I_b^!#THvZKG16UtZA8l>Fc9$EvZVL%y~ zCZpkqT4~=f6FE@8o<+bd>+zkDPol}Xq-q;#lFVj?meM-ir7bNeTka6)?&T->BpNyK z6^0VF7;~Hb7Iq+HT}cnFqx8z3xicaWLq#y<>Z>Jx4tz()G@Mx{TU^J9Yw%Q`fgm#G zyW(q1_mjUt1Bp- zHzW053i%6usd<)b)V5|JX-qz>E5Z?hfqYLPIlcNX%ZbfSa3RYwp$dAjM|@5E{F~a< zS6ca&fO_e!BusAb%ossY0a`Es6|1Cz-m z7o2pMCmwH990tTO_ag7!2Qo;0k6Yat$LHs$qYr%ZlatgqOI%Xa zVntIJ^ewekgq{|fygL)}YLKYhlv3Z5@Zz)>&G*c=C zY5C=^t!*E2<1&nRO0IG76ye;1LA^8!_hFO^`uy*Ixwd}~)FcW^fKjC%1bxV(KxkH3 zy6qP%ey6F2Qd?{Wte(JYN5{2}nx$*l`T9xApm=*mU*4X3#vG$wf_OOY>L)83ym6b+ zVKW+QX`9jn(0S12%hUh6`v<*9^v~-Z6ntTVxLX}Z-CrGkCIW8fv_}Kz{&W!oTC@PD z5rG{4&0owA3OhIy7zB_&g!mVmjW2@;0o_jQ&`5awwx9!3Kf!4ghonNX;4u_g_|F=1 z>M`)@R2lTms|VUnM-^Pqyo0B#8T5g^#w1GiToUR^MnfNwijZnjGRt+ydb)aozWDhC zUA^9({@J^A`giH-*!j(rbIjXe>uF~v7Zcw6B)-?KIHJA4DR3apbog-`KxN%S>@W=|TWYUnpbJf9quePxaO?lqoJlx?fr>5lEagOK{xj# z`a2EKQn95{kj2MBZn=M?5+~|QKjpe;TtGw!iDp)rWsF*e-`k404&6kEt1jm#^u zpFP`k#!{?JJu@p*Wqfop{s>$BDuG!3T#~qGO7gfD%i7ulhOTTq(2XbgS$j2q`Hsvw zf?|uC$3y;4ejtRwBnm(~XDN_Wwt2`O;XAd3HD+)t5wO@eYpVB&htj8Z?10YmUANiK zL_l=iLnFSRESdLMH#qtz(l=_dTqOTG?Gmi@e)pYDmTzhMQlIba4(fZj#xg&aa*IjX zbSK@-nWvcU8cUm5o7TbUkK(i9U0S(=ys|;&XH<&;R2!2)66TW`F}vRHEm-}G#$|tt zG%a_6TT{fSlX52n9;l`@V)&3Jdpvw9gGe0?I|sWI3v^@-OC;~`D2?v zDUx^iyyutfy;7XW55)B>U;Te#90Lf6cSb5Ex3%GY$kE zIOl=_?A7!;FX%c)eUfI(^2e9x9fVh#{hdH88%cq;&J(o=obwBZG3oK~-gRI?6?-TE zYH%PE1!GTh<9H?bgbAK&c)aM10L%bW_oa2+ze(8mB=GcS(E=PNp;x}KsY8DE@a2yP zXMnu+b!=CF-cq(8@nj%>|Iq&a*viVxRZQ1CUgB|lo_kqGN5&_RYqKaRe3=FHL@&ua zJ-t0$TN^)i@Ukq?b+Nna#x2v%ArWtBXpb=WYt?5z#6EF+q76l2%g$*FNQHTe`X|qE&86RLUBiq}z>68vyK22K7{4*LBswiWj^)p83g>>HgWo*+oT&#L(}`OWU}mEjggh+qoT1{WPe;cc6WV}-W!%D^+cAr ztar^tdVG|gwF=wk=0-lX0JeQ^LXP=0plS0~SALf4B4DR~diW-f^|!erlhXX#5FFp$ z{D(%Z$B$$wN>s&J$tiU1WH=rsD8L|vbvnfS6l%O3RwTxg%gcDdu?x=a^nWYlD(0cb zW?Z7L>)fBm1cn1hMwxeIghB+nGr6{@_C{7*@TAuB)slIh2R{a(^=Q)}D|<2hOJ{hRwp-1^!y zk3(q5KdgMUD`yvJfB^&B5V>lGa{95Q!3EU|tV;?DOc7SbzK$sVj&hSkLZIB`5skll z6a^Pb>kXfMds45uk_p!CR?yG%szjbArllsX2G@-eFdY(Y@bm86tz(*hGWAQfNahoUqKW>TD)KH_03X zYAwh>JaGt|RoXL;Qw*C9W1|UrZG%DhIX1D&A#m2244=@SgN#b>CrtoqlMx}{JqJx6 z2&P@*WMCt? zl*#&JJW6M+xSHNe> zJ|t-6zC#O$yUx)Dq*Vqav7yHC_n31ZOe0nxegJ>-gU17R%%xSDnY>S7BLjgA&fD-w+yIkIVOha&sAeY*%ayXRDhS&zfPg)hUuL~(i*~7> zWxkx{iUDAFq+#89lWMaoE9wN6OG@`qgKy`SJKuOzWwGC{qUX+9qqbE+*3al80UPK zzaLuIou-z?z_Fy+>lfdUhmh_bbG!2J=38vR*jmK^7=QLsjB5%{N2(Yk@!}YrJR0z4 zL*w`V1ebqhe!&-)a4qR8>^u11-BTQ__q9a=(lIsRQ%(%%pIXx8Ti~4Z!G^>xU^y5* zS(sIt{I{AkMdKBkZ-$dz^Z;sueIQ0Axc#pd6WZLBx0AAvzVOE(Xgv&u3j};#plErA z3=F{fFZtf*9xq|~M_uvWO@<1%hkBFC3CkBtTt%+T*}2w5a`aj<=-GA;mGka;bgG$&>j4Mpzu02 zfuSukS5SSq31^SK`IWn{B!Cf-dlUVUOVJv!<~AR|D^-`Jm29BV4ub1#Lf&H+rNpPj za7{aS@s+Ai@o)ktpR_|3Z*Ri|k%4AFm(7F}`FQw8LV_#}DmqPyo)AbpRyvW`8E9&? zUG+94Hef$L${&2oEZ$Hssr1F!pB=;9%HN>6+U@(|8y^TKR)bPZP=P&}|4d6tkXGhN zXv3WRcsMcLmzIVKqkrNni8$F$%@V! zpOS$CRgzw=FgZSykf*c=g@ZC&%+y8Nh{hH7plmtrUa>+FgYUef^2Bg$ZC=K`DJAEv zpdq3So~&Gi81OYRa?s3E&pO22_N7WkX++ivyImiE|@^(U#-vJzatJb1r6*z32iaVi`=&S`vjwTZH}1Q;XZ_em_!&p$Xjf^Ndda7h$84{`+UY<@ibzjy}+Pu z4SekW8!{3FR3hO4XZbIV32xtdE(MozsVM$?4?GO}Dt|Zdj{mPl-~PI&f;=DI zOuMvP2NFYKtpV`KZt8jb6Ed_>Mt1g49$0`3ghKomQGh(A4ZNRFpt6roN=8HTZ6Po> zWFTSxh=^B?g@d)1HLh7@vuSM_J0%*_0h5D<2-t}pWqZNxEE(ib2a!E^Du?DIW^}K* z|JY}7FO#eYo3;WiEnRSfxV^yc{;r;2`1UrroKN^Jh|3>y@qcCsc)Ms} z_f}bykZhMmws)OG#0O2Jsnb(C=LS+veZwacWs4szEKKZ13AC zsD=3X#l*yHk{1aH39mO@rFAI8t(or4@{moEe{Z+O&g*7GCun-^`4YYs_TpL6=K4rW z7fMU(1E8@xLb;K#$EfYK0!60jUWe9Jd*u^tmA7`$A+v>Er6nI+-iXB^d^|EkS~pV! z8~+UWywGYDX2Doghp_Jdxf7=`q^G=#DIm%cI~)B?iQlzNVVGge0jU8qFR8U2IMXmY z9E8TukA+~m#eDK6L@J2;$hJ{EI9!s#nfG)&xh!d-h>&Xn-9IIV^7&IEz_Y;`LE-~B z!p~HbKEJ3wxr7)hs%3#ySwSLN^s>XD;v~M$ zdqk-jqrqRq%WDW5hX-!40(>B;C}9GOD~M0LIBEPAxx{FyXkbO`*2py45amUG%yk;Gl`&YSEir%_pS(8rE! za54E%;@7OW1i_g2lkv9MSfV07YZGSC*ACfl-$r}}oi|Dk=CZ_*=y{Ia$gS78)hh+^ zqwaa-7hfn7q~@2|gLXuvQI3bqOf3!@a`Xfd;{rCY=co!2D-1eLQbaJJU;?5t;OFFd z6TPkJ4=-I5<4tU9(X`n+O{<%~T2OL2b}JFxk=8uSM48lv0*N2=$&tHL*M7OO^d2Ul zA-tm@BbJExUfsL)d+UlWC*qq5^W(Hvs#0Zg zc7DQ6wT&&@?uUIdW>s>(F+VtHMdV())20>go}y}gB$Vel=@LSqocuMiA`vG7D{we_ z($987dKqgHnT!ekKc$cLfzz%`Gy5#rjqw;Cazdb7dTQ|l6_nECN+;jI3n?>*muNdo z>P)EgJF>g_5XfUjn@)j2ndFv!QY4A=`?$p_CqJnh=PQjlQG15%+uJKGw-616@6f$q zT6{LjxBvsa>Fx;~zmmw(C1T^SHB?U2Vp0rtaH|%@i(O-d=~vhC5;Yq{+_3q>kO}!> z2qHVf%2hxH`i~EkT|q}?#kMRbDQAeSgTFJXkf6OmRd~@@{;ZN1RN?!;````MXSX(i zansR*F&#lZK13E6C-57|IHETWe2d;r36%p6_HQ`9alKzTY67Akd>bZDPg*yWA+1gAp*580s&HlOAwY1?^he9@ z==-vL@(oqV2r9mxKZz?v+JjaamQbQ9 zVtzu2yN+xOkb=Jg;aH9c@w4CG?$93}{KLEXE2krjnat8gQcy%+^`tBp6=bd9tl*K{ zWR*f~1o>C|r;Fdu*$O2gS6D*kk9AS1f<^FRZ0rIgi4Qe7c)2ZW8}fLH|3w|7>>r zrRi@K+?$sl^r~aV&W?UV&aoM&0)=yYhvcAW&WOPNDLAouqRoOmyr35|7WNhh=fGFo4{5pWA^#ej{F06&Z^)BD zo9*rnH^k2gz%vLbDRU?f9#hwIHBSYa+L}R0e(-uX{KTWnzED$hX4q}&BKXZwh+HwR z2aYR*i=k`n5qq8@P)k*(jKqnK2r<(CP_vcrI`N%0A?k+!vN#=tF^UC02Cn7$UsEh4 z{8=_il^Memt%R1BTN@r1Y}tSJT!NrWE=imiF?p&!wLV(S^ez0mD6G4q>H7##$MbisxrAw%4 zC5gXNqq?^vHpFf@=y;Pp8NQv;Y+nO%y|qc-@S-S`n6=%1}k zYR4%fX%zi9-ws{x;O+=zz0<>ggN;x1eRdyZtXQ9;en2I-i10bJQ!DJdRz@G#l0EI` z(yLIut9ra<)mBvectO6eRjMA%QzzJV6wC4#4w8ef8O^XGD)X8t=0_b{r3e)z18TGg z)8Q6pTW^N+Yn&;Y ztoN{5kNBf$`JiL^@;Jw$s5P^Es-IN$pV(#ipk8uVB`IXg_>U|?->dXCp5K{J) z-A&4+Ey;LpRINJA4AY$@rsAHE(<_x%d&ZVl4B@fJK#7*RMuh@4b|nG!gQR4_Vbm{l<(Bc{AS?^@x^nn$ETZ`gaMgK0o3m^EYQR7`^s(zh z_^=$V*NAC!+lb7tt-(cylw!7aHEIEm!-uOgWOjp6C-(o9+!yPY_*mE`)4#5Fkmr<4 zo;T1SrxJ+DV8JF75}V8>{?9uQ4ZtJ^wfL_CMEtVUfHMX)As1!dIbjwKqDa7jH-LDd z{&`5#_0aceA#$#?D?$t(3XfZc)dN{<_E)9E7U9!i3YZ3?B-_P4 z?!CjM$(Lw{GZO`OnCcUZxd$)XFDS5t?dXDsXVauh>cbZwcYkmA$ z5N1@f9WkYX=uiW-EUN+ZE%jzkms&ydv1m&0#3v);`P=J=A%!FkyNW#)C;vGmi_9>o z_o!%h_h(0skB@0(N@^5Ep)wjl5qv+5)2kw6Wg?y43+zUI1hH8cvpszhavxxzRj>9z zOEH6z;)GGg$iK?mNwOkJG-dpT)JE z9v8j##X%xaeHfLzZ{R0h83%ge-$%yaJ>HQp3t|MOjJJcst~dEc1|qKQ<=?oS7%T6z zRwA59pLeA-mW9dt%#*DTI0vXA&XR5;;+zY)G$r9wEBq@34Gh_bcghY`7!JYdVscbs z!A2N4U*ZBEwy+VRW>J%}3gjv#!ZgLP|Gq0IoVDB#GbpU4cmlOujOF2q@URxT{u}5{ zLX*H5os}-zGn4g?>hRUn8M7&AMHOYsp;H}jx8ia?Oz*65veo1DmcTLO59Tyz12E5x z8aGCaa;FaMKt}77X3#5Tm&ig1v)<-Jh4o2t3W07l_}pXHFV#u$(~=4`3Fh8$8m?b0 z{_e`kqx;moI>fr|euni;=v!1jQ>I(K+76pDyGYvyD_lS3gQrAW-Sr=m8Jc2#xOkgo zSbT(yKVkeTN%++C)%5)(uEL1iVqxj&QO`vJyaZvs>a)bBAtwEGvEl{B(UarN5T>W? zDbc!O78mkNiG6EOP-v8{1;KZ&PzD~ZUAF;a)7sw)7WrXUO&1ZSuQlAZV~oN6WE$_v zEzZm_Qm*0hhcX4PVO)Pqe`RuFOgLlP{*^ae%};v#QRp9cvi%MDNV4nnS8?NFD^{6! zaXDv>>Yd`pjMi(WW}UW~rz8)~6%UqRHk6&Q7pWDw^~7@%jc*?SrR?bOUxNRvL#Q|6 zP>U=VNOozupAJp=BEEz9IB2kLS}>&& z<$-5?aOLL|B7lpFg$Ow0US_;rp8|H{C9Z~VOUpBtL~4F($BF$r!XWNT(}HOrXd(cs z2S-pU`=DtCGVq6~zrQcItM$vz<(2hcwK^ig$=Yxona;1$VpuwS${WlVs4(7GUrEn; zgZJjYOUIo>atEwzf8U}Z9OJg;>@4!s5CJ&jXxU^8Bg-+2vU6~AQ%1Wj8@dH4!x_6) zbl2mD*utjBFt{zfj;zwqu)dy+2t9mCb5TN4@<~@cDW92^c?t!YlFw6c48t=k2>xLp zS4%IjH91+W4h1I2eHN|;p3019>I4_!%GzQGsM3u4TDX4T5ceX zMCmSj&Xpe!vx4hj5a@)=&~6s}^CZAkliNdHtHq&AsQ|*dZz9kVpv7C0R2Ogbd>=;|P{{ToO{6{*<}XQF}8a*iSSL6fcb^W%?q989<;-eoIW zKSPdp%`woTI8f#Y<)yVl*`4xgwW)ie|1mM%K08a|uz~nTd0z~UG{(pv2BkdAJ{(la zqgk}j?-B$l?BEw3!b0zSV^w#WoL}0{M4LX(sFaugdU~Waz7?uV6Ml+uvgc zXMgWo-aQowrx@(ri0ncbxn6kk1R`^pZtO3vPeQaIMUPp>u48+D?rN)qkHU&vZ6p$} z->aMIDAevB-aWI{L3XBU2C`7P6%q_pLfL{D0ECwTl)@4FqxGEa0?V=FF40o-aleo^ zZjFC@@$n-iw>aNjA-)X&E2i;b{W-&?Zf6=NTg&ZzkPG;q0`wp3Y!mL%o0dX`8g_$c zL>!-+L-i=(sPLjxvvJ~s6DPwbS<)g2h7PUs&tPprusZW*)-X*OoM_joQ`Mt;r@uNmrl5Y zPqh*bN6XLa{U9c}va-5byHJ^vvw#~Iky|nA4`Y;Cf;X_TG6S{j?EauJ^_trK*4C4k z7xWkOsDKyr7Q^oP9!aTQUhDS7sg5?#!wM2Q6VUE*I3ty)X8t!S4x{4t6 zZWyWl_WS&+ywzn>T}{p4w8KV+E4y7oB6xQ~Y5He(D zv9WBWyyGX#VM1}YP;sSv>JBBU+Z`H$AK@3zU8io?2yF);_d#ITKq+1aI>FzEm zL57wZ7(zn2yF?l!q*J6DB;I+>`Ml5hZT^6{zkBa>uXQb*>B$b|S=>t2{pCU(j5L-e zbxWp9GcWqgQ@4guR`!g~IYLzElDyi042*K>O`pOO{_j7gZS~%Kt;DM#k+py|YGu(9 zWWoX^qO7MJasCzjPO=NO8$t2TV?NXM5#8x?pi0?dn;WGwWismp0O?8}lNP}|*U-~3oik|Lo<+xN!9-^GK zQ+bX@l^*lb7LAe4*4%jF=*Wtl)*6<=d=31ZJwSaOBm2tcmQMhO!E0YNXQFP^}N z*^Q~Q@m2Gx)rEzn)rF-x7dPG%VB`fAGg_;X{kAJvsrMgp@-({T^OKhmyL zY~Fc$dw&dmUUzxtt@GB@*!auK3^TqjqdrZw-yzjv2Lz9tNIw13$U3r8!t~qr1tz(? zJYGXx+^;2Ly2U@|-)s1O1_VnOKUqXaIapZ<0`^k>aKdNsw;{!dao z=7t!(asrrC-VSDEAA8 zg0?~muH<+bZw%`s5O+OlA!l~~x-@h>z0Y#ooj*XN3d(>j0}j#ds>8er zb5$LB_1yMIn;)0#jz`kmW6``l(=L@Ri*kyX=@}DW{ zTw{J>{MFB)D|F4Y>}!867PZo}r^qqoQbLqrP0Um*z6+A3>Pr0m=Vy}8uX=M^SOk6)zg`kmLHd}j{X-{b~Y(=U|^CJ5b7vh`gqKrS9 zF@|MdG)9kXz}RC{qkpswlCK^e`lOZE<$OqD0sN*RvD5wmW3kMjcs3-!oz1 zJaClcM15+O66q(ijeEoOcK2TitL;JFzsAW0 z=%p?d1SGQZpG#%AS3?LV#qI|#IOrAm00_C$P#6RD%-WNIv`9f(D#+q`2|{?XU_%yv zC3zeiR{ljyv;wKZ9_%j5zW$DUEy@fW`ClFzEs1;Tim_$1qIm<<4mymkx9#E(I_GO` z@i&ww{2Pa#>Gw_waW4IkWfmsr6Jm|C4u(ifl0H|6UIie0USC?DC!Krl$T-lyjnC$b zp@GJZTb238R7BC%inI;n#qau>FZ{DKpNh7&`ihE-kz~V#->ct_4iAs%X@@mK^=;m{ zyK8>wsH|Q#5ez5_+qrXmX+DuHb z-;CzUH4+!7*HH^mP7;%lc^XA<)e##pT&F1{V)x9VpXtw!ir2my;=gevweu7rfLh76 z#X)hmg!#VD zBqLsL%wCkA2ENOY3CRPlv5l3Hf4tEJJf%3-i@%b~uy)m6uIUQbD*G`gcE zyYRxyp#4L3OH`}=F1}(s-X+;z@q~+Qxb?t4=$~Xbgr70yfY88*_MHn0xH_6oCmTwv znjpC|AO(vOh%*-tnkO|EUo>txcU6sil_F~Xn@^7P7(2dD6`Y55hrSb-)ek8K`-lm~ z@A+i<0LeL7&nRV?arG#Aplr7ouJrpJkuM)3LrXldSm|yA7-sQ2emlAj~9n^7m zidu+3wx;#<6(K`RtlGx3HMM5dA04x@t4;YTDSw?~`c_eDl7C8=CiOorvehUBx3pI^ zwnz0KI>N&h1voMTtXy4P-@os8lZLx3{SyX`DEWMJbaZlb@?&!T`g(8>3tU`iifG@} zFmk?E87P~*zn2i2)>3Z>t2|#^6pxqqWj+m4&+3M6ccB!{28)S^lz`bk+*d^E79e*b zyMO#k8h;wP?e>IWX}J~;wk8K8GF<9a4w9DH{y7I=-l`}N-)9@blTxGPxXj#i6-fl7 z-F+eaS;eD;WuVRTh+|pd`#XR))C3jWQx|Q|siaWLMeo<6tA6L`zRp?0NfA)$9OuSE zPzCVgis}y8v(zNL=iX#~Ya&Pru+lxmFZ>mfNOfdpFa1R&Qa|EV6?=kL=@dG5WNo~( z{cL5%2*c0TzYYs`I6VAODHbH2VPo8vF11X%hKh6HPgBxAlFwH3`3bEi{;C>UnyHXt ze*K4KfBix21$(-JBk&Y>G3`s4p285cKPXef!nf$tBFi{OOTC+rc(+(rW&8e|o9k>t zXur0Si$^!ApgDXDf0cTYE=c;cLNi+B8o0_dzn*#IHn(q&p@{wPD_MN-_N9k#%d55T z@cZ~wni?T0mX4SK%>s`4bzF@%Uwo!HV_Nr&!xVI9HU}(Y8@wel=m&(K&QI$~EEKJM z-<1LO24w5ANL@&>QZlTCrJOY$1pB9Buv>B;?mkF09HYdA9g-MmT_A$U1I*C>7lX}}c_WCzz z+O?x}2$DHn)A(QZzUh*Sz|}&I*)3#?a{6#@uOedv$W1cr`^1`#OA~5=wZ86e+3aDy zH$Z~5m940irjPX9(|5poN`ILhEhOK!zDlz_S1NRFhWC z%o}#}=oPzx7h@kcGxt(V56%xZ&q?q0zDUp68W{fimGSGB;eBh1&-2smw#V~&4ar7P zRC}XC1JbK%&O;ujY+nKd>5F|$DtC57(|2-o9)bBOq8FXck00kfaDDvwLFi5jJSiqB zwzIM#t*<|lw6fBXyRwqCQLRSY(Ail&?EG^Utc(e9V6TJ)R#QiJ7RQ2BO2#TFt(XQN zWLy0@Gc#}Zva|3zW$th-S<%0L|6ZqF-fnCjh34QGK>OxTgB{rD_>p_zD}L|(j%DN> zvgUBPsdZA_ES|@AY@Y&$T!516tV1B{m2Dib`7U6fqZCUq4;hxMVVgu&Yk(`+8M6To zjMf&7PFyZREwf}0Zo#mq-%(z&3hacs)I07|%y8TM7YT=W`7b{%{&l0sR+1&@Fka-h zk0Zt(&yz_PIF#=r7&^I`!j2GC|MGRjY$DH&$C%bknWHk#B<#zOeGRpOU~gwZJ1Y%J zDD^ew0dTOi=!DsX>7x}3p@I$vE0Hqsb#AAqM)9Qb{aip~bC-vS0l7phi@;&q2A|gu zTEt?t?J=1%Y+o$p!xZxt4IHENpx%XC{KW+CCjL9XGPA55no-toSPLkIRd-e=X!Kgn zF-j=LtS3FnU4tO~)#X!274bnBjljS26~5qD&>&v4ntxF3Xw?3QUk?_4R2ySNW~OMG z!(^Ch3sCH~0I%-)o)wL@7nLifJ$A%xlE$u36()TO z>YS#Zw>X=n7KDOnhsO<_7Z*#U6o&D|`$BMVuJV6FFv;?>_%eg$Q~O!6oQ!Pc6$j?# zG()W+=W}=}+7joN3QE$p()nMG#*SOyh zw5{Ai?JHca?2E)sYaM?s2jYza77~95QBm@JZ;lB1OLJS7Ugc=VZL;_z))0&VdK5+$ zT2#Ug#$=yKVdpf!hI8^d3CV-=|Md7i=ZIA)3m~U=qU+(|-+x$6l>+o?sC^Tv-;xrW zJrRn6o^3Ouzpx<5nn+#Nof>9rY94Csuu>IZB8dT+z=4||9>466JuXa*8^UHl%0}C& zzHZRvp*^-vU{FxN!&4vjuGXUL_jLqI^*zc|8oQG8^6KKE-{pQv)kINl1IruZJ{wOb zC#OK0KpWxo1^=vi9Z_U+ujhwnY@Pwh!*>A{JABCRaIQZt!P;} zTj=1_9*EFiolU`3h>TnqyH+s?^T$#RfvkTkA_S!0s!Z2Zu)u)SA#9{x(I3}6VjwC8hmCf@OT&QG@sq0|vU( zQIH~wH~H&q-e?etjY$}%@yMGnr`KbFKg-ri+k3x6338UDX~E2L(jreH5Q-$;8uutS^s6$Cim38Rnno!WOF@||+Dx-SeTMgj12?52#oPdxmWrg;%4M%}h<+SQWMDWe2S`^_ zMXCrav}Bkt1<|DaZhzZfeP+)ikl%`grreeasILS7W#*VA%_85lcYz_i8Bus7-(({P zKiB3>6dXL5=4A(%PipBEMY7i{IA4Q+vihPWOmh%+ou%)7 zb!MeNoCk@o{iKwAhtViq3riOt1Bome|93){pR=xqx}k&cCtQImanY-lcQ)|WNRTHg zWDc2vJiD$z2N495!@_L0e^*<8L7rgq9G6EDpwCDox1KrfmUn2;V+`6=_$}l_sw?ecAyIcuBjKRL;texxt zV*!~LE(D}i!MEZj`lw#_eZkS8qC4s^!hlcej|HQQV%VKDtrb|TOy-_!o$HjXgxO#1@!+yiEJgGjobOetULALa z-D%Gh4ughmv%uLPi-F;+Wi^tOuRfb0ArgN8>Qf=N1Xrw^@o1bch%_Af zh>z$-jJRjMIqD(YqI!X86QKt5Ac$2?Nzhd6gY7E)0VX+M3RNYdxPV`z8=Zd#>ZE9G zyxJq9FtzMnqK=j0uPohU8?WZkoP%&-yd?d>C~0(}TvhgncSi51_=84>`ece$pStPqF9;VY>)+Smg&5p)Vd(j6O2LH!L6J|A?><7uAGvG269 z)^C^ey52?Tl10<=oi|S|YKI;J=`rT}<*xeY@9!PSKXd{f&3}m;#Vp|cIbaVx?I>|B z|DW@3)Sxj~>tD5OKRifB@G5BtgiI5k^yf>$4*uwZ^xaYsSU?DM_5nL=bQt;@hj1%V zhzLFo1YDqk9)Dv&_JE*VB7t;6kndnxI47mnr^EzO&`N|gS1lsU`oMX4)LS+bflCBC zAcRwVA%!6?xyuNa{BXp(7eSr>{GK19lW-M1IpDg;aw0H(w)KE?Y^H{ejO_uUuc!(8 zsfL{qu2GL<15f02sr>=d3EL%Iefl}qfRxHan;IJ%>78VkeACcM@|JA;C2=c~eVm^c zmsk34X3bSrr2X@9{Kj(~-$rOG`in|S0V1EjWEkF}BpAN|E$&^zaTaeWYrH}3A(O*@=q+DM*q?g;VtF!@U~Y{%+&pr-^H#LwoH@r@8& zTp={`7ZD1eK>rtn?jLzfgM|F&$E~`GDq>=fxr^nVe&>iRJgfD}A#An6^xInR4Sxk=kw6967LnSXH43 zRS(Wcr*c!Sb+&YY4crvwthn4XyB?xpx5DyrCTxSTfj;z#S$*Gu$cl!VNtaI&b5-&p z8sZ#!vE(I039NW%v!N_&$b}T3hB7@Kz0SPII2y!_Rb za)J%bu+bx4K3+RZ2P+ct8#-+rbd^P$>DDP$@U=JBQaFM$gcG={s4kP%cd_C@=Bo2e zs}-@Z>tLXC0$3nnAO*Rf{wy%2mI}Oncwv32sOUMeF|C}$(X@x_uqaiVoFIc))oa4{ znksa-oYyN3bk6gUtKYEkl|QADq!D4u!WrKd*>|<;S?9IRBXJY2-=F$2UvK2y{;X++V zu2p^I0|0PK?L*2JAhm4)-NIk^vd5I=7O3X(C$^NF{*)`Pw#6@R7VT!A-hZs0LwOs4 z4pha#!&yRe(r#XbIbgE%l1P6bvHqnPqfE)T4It*~-p9zLqGC%3r8PTeo{WBjgCBl< zWVr@>Ag$d~^B8KgRGu|9OOw5dP9kbcO^DpOH0W3T8)KesOe^`FlbNXr>IJog@J?x^ z$nJAZ*=ndjlf}trb;H3*)fF}6465(d@&D<{Z z;~X#EZl?ycp%0>rqCHWh?IY0fjLgg&R0H`Ou^(Rb3UE}0ad1QOzg|&Iba#Sfn|0DbS zgy@OM+E~W_zWPS5yS_fUa<6sqKR^7_7P>ML(1(Hsc=3b0D&p%iYisP2c6QSBlcX(Neyoli=19Li;!jRfWEcDUsSlAMA$+Ol^R=H23T|Xh1#+4C zr~}9uwGowc8V4(#(z|!t!{S|Z#Rn=ZN_HeVO?6S*Wf3jEoy0aTab03#!t2TyWHU&d z`g7c00so-~w(cW#T}lMca8aSUVvL`2?zV~T%({YJ##Og@pWMTf!l!!n>?fRBtB!Id zy_4?~rz0wj7yjrg>84Zsnn?{{(98Y9$0hrk*Y|b#Z>j`<-GiA4D=k$#5+&ae$8n3{ zgN;t#`Y|S3P-=+FRqBT;H!l7)VJk3Gd>wt5x7KhYwU0t?W+2kCeI^Ej4(Cg+q-|1+sovQS&(W<}_PYMPBrx=cgAieZTHy=g6qQ9dcDofi5_ z3SK*g7m3B+$?d5^qectU3`nj#ocWDt3$RDtSY2HfUAf05LFH#tr`>#FeYF@OG_C+EUjy#xPd-~CrbIXI$6g*>Oi5Y^}qqhaW~F=$(mOSB~twKf|PhTua| zd|?`2ioX-Wr+1=1lPRFD}`6;&zeqyw!Sp+Lxp;A}{0vh*@8T=cUw*TW9V&E5m1;bm>}| ziNe8^YB5o-A7@hp1`X(GY7OM7DvlW|EuSqDJEm4irgm)T_C0R2)v6rzx?hVaMq!Ai z%guk%<5{DS*+eV<@#l35s7JpL%$HWzC9r~e%aPanT;u#|A5}Wndjbf3Q&4=*TQ8{I z9C?WNXAUNIs5SbCB*El$irDeX6TDsa8H&eOXvXBjCZ_;5)_huc#Zvz+CL#TnW^%rGuR zjH~vT=ZjX5)nS~(;?icnv_nkU2!AtzrQjC+vy>$y@?rSV=ohkzrD-XyJ9s8f~zJT=ruHYHImEX&qCE zL~WG?Z@&fFEqmuYl4bmTa#=bLaE$tsB%4uZF#b|2LF{~vT+9{+SW;hk6@Pp!<< zhYN)AeVv|@N+>(IV`MO1@D3c zIg@bMXzv7jDV@xI*(g#B^hdIhW@q;JlU6&Pi8;YeV)-;TudW|HV}RuOu8wbSkN(;8 za$x0=yaPfgH%w~tLbab$|pF3V$5tt|r=Czq0{1G0~nxH$9 zT3uaq1zbI3mTHzPxMwrNrL+dSp`{b6ZT0O^!jfWLH8t&Zn+OQEk9E?(0PFlxHVh>- ztJ(V`NQ2+|*aHuf_;U{DSrNVpEB6jBdxTA5swd*NjtR$z-zO8JS(78Z6}m0^O3C_xToq_4Af?9H%YXh{n7uj|dnq_8tX z^E4Kb?p5)eZCD0rVvrz({CYpD++9c$QL7>0SOhUvcl11CSzuHlm~KGfn!7xB`eT7 z_a*M-Jj6~Yb!wvvz z;@ly`L*uf0sihun=%$=J@UxV$f=^Im8yAE5Q;i8>OE&qCu%XTCd{{&}^+AmUVcg{h zwK&U7T0N6BA~0Juv4XPpfHqq@m(;JOhvW(4cQp9C)I_))45uH>NVnCdK9KfK+>n}a zIkFENWI*|jf1>_+#^2TyJ0G4+*X#e4T2^l$BV9?M?(BD5^MY-q`S(>0eFhG(O`aq{ zt>6J>w2Y|-p~#nZ93Tr=WJGf>$8i*{wuFlCDSH2`!YeEH{x88ltoGn%nc%OrCn9aH zFC;MoV`hkl*bnCt>J=LEszH7Me@*WHd-$~;Sx^gKO@ttRR~sn{c$OClS+He+h0=90 z9e~}?2iq!HwmoaOo8Q3vXnx*-k}xQPaSS0AI2-c2DGFcF1a5azVk-AJ<;`d`rVCOH5+Mkw#in zvfaL2{W(2armQwU>R9y_z1m&8pyZf%7d-PBTFegt9r-lhZL#YdSzNnt(_2sEOD!#` z3qrN4^JFw#_1}+Uz*EyddO45NaaS}>(Nt7?Fj~JmKmYyEzM`L)q|>Ze#hcc8G_@0< z9sA5a$p zReIP4_PQn|TfgRHhGlx+$wwnerl4+|$Sx1V4mS$y@DO29_Qvrq;pA`8$hRY0UZAP# zNh>$t+iJ?Hr1RlWMHQ0LbKkr#!^6g-B6^}qf2s_fLNy6B&?B=Z(;J=Kl^<>)3@alp z)7)BLT1|B7v39CD)iD9KuE@+%EZ{V~v`i!P|0n&Wom_)=EMd_xb6VwKs4O^?F zlN0WKH+}nSOG7Ol44MlQW+Tk)MgwsjnvTN5cdz$=MDdOF{jj@uZuw z+=Kw)T;Mo7bp1yS#yp4SAE`bXT4DRdy?s4uSq?h{_5iP2E>DBUX*C*##KK-;6bi}Q z1}sN4`ZUyPqpilVfnBOtr0q!~+9H^RHNUpb1^*#as^!f98p<8*bNo z(4SL2xVpJbclPrSGzolr%bPJQ)LHo_QT7`5wd}8FleM}3KIwirJqu0EX7nKSOVAE0 z9XaHs zWn3I*^Id8>zY+ukLY60Zwf^0bO9)Py$3|eNF7>4tEzKf`91%9$`)&@w&+^Y5`;)5L-wndn$Lyyq;@ z{5iod74X{WB_@^Ugx|#d>9O=W8%riSZK!gnO38DM+#>S;?iE7@SaW$EOs>hWF%^F7HJtH9jSnvU^(_>xF63`2?}P5YZMr%dshRPvQTG%E>?! zUt|>n2q*6?Qdwcd0bwvgrgg=;6eNgUh*k8xx|cT|E4Z@+vih(W@qr`I^Au*P;bov3 zjbx-_<{pz7fIEERUVN?2;fr<|N=i(U+?P|$%db%ImH@FZii?%f*SJIjv48kbl`=#$ zgjSwuLB)edj(CNeR{BaUm(!nlQ?=$_ND_?CF1RN~+doWVW+j@b4#xfQ!cs2I&donN zB@AW-H}9;ddoGg=aAnEu&-f78yzp!Lqf>=mh$f}wC7lU;%y6(#RBxH z3gY5F3;8w<#)K(UNgJY36)u~=ZeU)~OjK{6)BqmDQxYtgu(x}rsF-1_;68o|X{W%T6^A3hOiI?i<<)sp2TBttq??irAd7<~r z>h|}Ozjl#dMqhz))6*#P^)s8^aPqZB1{&Y~ka>6FS{vCR3e!2>4AqEIxg_{gge+7o z97ZGS9T_T51)F#4N`0p~k8&r&GWYQmDT(W%y?qc-fClS#bA38joBFVAPTf%Ha_U3*gpxnW#|t}C;^|F3NZPhBI$%V(%n z=R_DMBP9QSz z&RxwoPHc$!op6CAK>rT@Zf_R{K0kkfY#D^r4aKi?6nUQ*r4sqXS&l}6aglJSC8Xmt z$d5jbb2o>b*WggfTH)edBjb=}ZLiuCGn$7=B1!Q2HUKRxoM`MVBFAU#h` zF#X`{=+IGCV`K05$e(avRy*ry;lquz7wVji7`k)iw<`YX;+zZHH50S%d-0k^R~>&c zGh;`TN-W{wRmbBiUY9dJYb*Qdczv|dPHgRNh1ltS``pwJ|I7ZV{x7?z3YtA}MkYsT zpDrERMzB3vFe!ooLl;A}Gi{l^K2~;|Y8VR>6S7uKd8rrkzPBfxgpQvE+d1S+hESuM zINNP*&ADmvp6`BlJ)=lCvhNia1{O)yti5Hxv^ak443;rlg1%tl4Nq?xOmC33vw3KpoAwDal_Qjc@@D zXJ0!BQkHD&dtpBmMl}ZdE%v1c(G^iZE>Q=y2>v7Ki@x-ssAXBf`p}?QYkXz*zLZ`i z_V~9omj2k%MlV;@3#*KQl3O0=j6(Y zaZ;krd)f24(#$wNa20DKhBd?+$1Ut1>;faY>dI!;H_zzxAv*t4NHNN?-XXf|8i%N@ z_hL{}br(`n(*}VS9=n@5Yxzz7chHWi7oJE2uCDI(kbY05=ZCgxEC|n7^qEpCZmeX4 zu@}v1e-R$+#TYUvA)EC?T;ea$4K)$G60zj6!$nvhc=tfJ^W&`#IyvBM9b9XDe=y*0 z_b4gKU>dmEX5F)&-|^>lEd}0e6mh^YKrP-$g2*~EqjTSA)3~eKui4gPzFM*$X>bT45;<5SBiJ0@hPKP_#aN}%amWkvzh*he26Xz^l6|l9d*b6tAoZZv8PCJ`3ihy=_Zp>()Z028ZVMvPv^;cV+&Qk7r;+#}~T@EaMJldwTRxP+PZ zZZm(De4X8~tkgKqI-=lHAV+UqG8{7{s){H?afLa-5uhQ`bN}w7ZelV-5X5ii`3`<^uZGZ^x?= ziCL~C13uJ6?+*YW9xnQD5SkeQ6w_Qu$dVg{5o4G+=f++a;YkD!h0 zWjtp(etodG;G_17H7O>ZYn?|~KX+L_UCklgjX=#leOkB{$9}!}%SgpwbF=sTk5s?|328K+Stw>%;?=CCQmDb7 zT;?8;Z$uBe^C73?YE%1!nobr(ThroH3(a|5;KGoyrdb}8h|404~&ub(C*oVlTbvvwF4Lk`F;^^wc|c8YtWQ{j5K*!oOA^~ z7v%cp>11$8y-7`qLnsdE;>*gW2KV;goXxOrYZb7pJ!OYKihZ2Me+oFc`kT?#rjswL z>W3tPyo`a1ib@j(GRG_4Fa_#J6H4#o%&cLrq;=Q@1|scZyzvqiX3F)m552vIrd$(Z z|0#U9B923N1xll_HeU<5&N{Juj@}`Bzh`r#dj7c5A5X08s%K;LdX9?6zpOf1j@>?= zFIqC`>U>;NS^5ncO14mV_l`%s>3BjuiSW)xwCrA!^(VzY(z={)zI8Vr7D2v#hOj|D zhgJOj)n3cDI8<0niES@h%1etGi@bQrk&<_x-uUHMekwcv5~SbsdF*cyIhM!d>&1JE zR4hwOS6~e}rddD4VQlI*%s`d7;6+-91>o~*jJ`5rVcnyUNSn!b^Z=XO`zV3?Zk_FG z(nv)Cslt862=#EibI^)lgpY2+`vXZ2>uatUViglp-^#At3(HI{x2?AZCG+T*P!_0$ zCk|f>5bC7=Ilv~2@?kDC+rfClSH4iPtf(seCy`DLFPR`jG^vwh_=gPPFLxgW##GeD zrcXz)qk#uR2T)Yk%1>u9+Y~Wzg`(l=uW2{RZ6nJQ{8+|j1|utZ!IEW4G0rbYT8hNS zZnF?74{4-S*8xb*al!IovM}evlyr$wm~`J(e%3emYzs47w@x*a0@auqX!I#r98n%8 zsjz4mOoigf$Q2Jx?j_nWLU>eAOx@3M94^przDlJvPXk!9-x2cHA*>Kaa^1^!6JdZ4 zY8b}0S{SCrD@ojwqlPYjP0y3@2ocP^ji+FD<8t=><(7Y0FSF|X?3L~UkX!>}UtzW$ zJ?T*lmkdr$R)P=PKVj`<){F~U9&BEK3Jwh(lm&-0(K4lB6XogEGRNZjI>=W4MdFXC zy>|SAkuY*T3~*2P545lCTg4${l*B(p-|#M^e3TT5c)rhtA^2nAPbZYhko=0VQm;fN*ul}?x!!;yi}QnAYDlKN2GVc& zmTMS@cah5*hR8?afbqKU;NRX^a&eCtVnA$~fFNb7&NH6p045^%TT?-iuIBdU_SW{+ zMz%OaE^^9luCj0FWhjz?o5gWHfH=;kb9n;R7O*;M2^63XiIJ8a-$f?!ksE@P0Ay># zelpjNR)^0Wm!qFflN8q|-QT}7*EQ_saDLJfB#BbAhj|8~)+#MuKRaEgS$rtlbiVk! zw?_ukfF5l0#m1hVt#qO{nNi$t+d3Q?q-`Tb)h&3oO*e#7n6`xUkzi7WQTaf{R%Hca z_{EPJ^01$0-nQGVG-uxw8`DsrJ~t@v^x4B#hox0WxbgcPWtRv$ zf*xBv*_7=n-J^GwX?#=Ooyla!)Y7#kG5}3xGud#K(8USTZDvd7%zPs`xB^~b4PT;= zHn?(^P435PgrVQn)P1=R}WIju%LXeAE&=a}C9O>N6zAjJNVr+M$&|G1a`<12Y=SfVckTaao!lHKjCJyuC(+$Urr zpJJrK>F5v33m-4Sl z=sL0)i|d}(np1YROW)e)^*1%uuCVVUO2c42~0+Oh744 z2MK^kN_?LIySw#v1iDp9y8Ki`mxJ^cvCdC>k5T;Sfh2V9(Fpqz#)w)SRLQ!a8Z#&9 z5FOQ9(u8P`gTztFpPE~FlSq5E#CUA!Ou%3K2H4Ler|le1%2k(2C0x|gl%Gix%F&AN z1{S8|JR^BFVGRl%Wg@nK;l4B{0US;TwQYOd;Z zbj`1ck3?DQ;&IBlkzO#Mv@4)Q!>@rFfXd>%=F*8c(b@Xfj271(Gc(mB#YTh59(#}X zH-WvB)#M`sJ*hI*9I(rFL(Q^@n~P_1T$@V&(;N2DI`uC$SM;^nIx)mtqf}bR>yJ@ zulrY>qh*fg&hYq$b$i&!NCZ)T(g#o3zyL*Q2lr8~j>6S*2&Viwk?v{`c zX^`%eZt(p6=ef>(J@bCv&7Qr#d$09bsl8;FMvDIqzIg1*jKhF+}qcrpD0o@fd zKkt*7D2A=Pr$EjW-}13u+AgB>AO*VmHA)M=%T_kF^)+?9)qYthG1+AEd(uKAD+?pjQ~z6t6s# zfSVRIS4Ig9M)+?uPp@J=y4Kv(V1WjWn9`Oex3aVK!$53nCJS(Au?gM1&JS-L!ILw7&D-5?{~$ zvpnaV#ojScqjbb)5vA;A8JRF3jZd@gQmUHfVc(<|Ld-Mw{+}oglpWCaHz8z>$$|yK z)PP&sD#`zBI^%ytduO-C94f|0bh}THpn2$-eh-fmeI464a@A=YFz;R<(dYt2gBu0d z+bf@R1v=uSt@wZR@o_^k1il`XNS6MHG?X@R<@XPZ=60&<kXv2<3odG)E$F|vsI1)g_EG~BZv~bH-@C#YvT~yLx3!`?sZ0f3w zVxp+|k$iBi_3_8B{0~`)_z_DIr@17QfpDg!@z=?CgThRojC?LM6FFcp&v1w>eV!w+ zy-09S&G!dY;e5F_UxT_obtaiU?q=i{(Nm-UDD`Ufeov;(VcN*7uXN0u-E%1PyEPw0 zS9=KZHm{zC^Luf+#G<_|+nW^IRU2lUaCpj-V7WzM+FZ1D+H4w6>}*$8#(elT%N-GG z2}%lW-N8ks_~r7FegdDRH%v^CpaY1@V!IS^L~IDIvQ%dHWJ`o3>&$VVvcubczHkQd z@*&)3angtLU$RTkB^Anie2v3s{MPGYh zE9TsZ-!qfGE$$$sN*dkpaQrEyoO#0-oIQb=P8eE(K1Swbm5)+l^(%@BKD)3BkHpV^ z6q=+A2)9<1?%%wNJln;kem5zOx{iBE~Q`b!wj<;OD5=&b6mv_!~f z57D?NDs(*wM+{fY{lUI#8!<6_1VYnN9j^86U-`P@*L11m*%|CcvcW|ER%gq-{{00u z+bnA^M;(Yg{3EdsiJYTgl4O|9gS_3+NSW6r6Z(qef>2kwK0e;@~@#)~(W z{Wm-H3nMM+YjfRw=;uQm386K#2FNTzE74yxb4Wh+WYF!bCQEFb%g9?3~=O*Ei<0OiB;1)2W`)Axc z>pCvc!x-^UQ^08^ZaW5~`W0rPb9zybfld0-qVgp)Ir&;}H}}ahE$@BdRjH^yKSLD7 zae#ZAExOyGJ|X!0qRp7qMqVgg+2@G17t*iY+?c3d&uyMgS0!7o9nqa8e6w>n^JStM z>+ZCgnP&aR@?*RIy>>XHqBR4pJjHHIODD_M%8CFgfusuX;>X7)ml+I5yBOC)Z+f4f zfuNRw!^4=-(Tua0%er>0L(kJ?z7;imoY#ia-3A2N&iGXW zMVZORqp`If4{rddk`C+i@0=x47yN_nuSxqba`|(yj-) z*_Wh{Wg|iR1G@_F_z-PFo2mJPE5_ZJxP;8+FWd7(z*`|fYbyR~H|fg<)JB4I&DHCu z&uTnHMnOgi*|$(eJ}&NZh5i61^mc4p;d|WV5u^%vVM5{B{KCxsrD%e5L#oGD+MYf# z=Z}_X*YjGNlJ*3PczlXo$&!;6w2aytj7ev_OnM(AFC*@sg47&JEtod7ktiu}hmFB0 zH9}d?rV`ehJwv=AaZ;t}9W=_8Eoqduk-XLFLkShAim~KH6-DlEwsm!A7YUv4HZT=F zp6k0Kjg9GU@bG~)BHl;TBNtE8O}!#q9HTW*uc-v$kz+gQQ{ko59?r;6vtR{8)d%#| zfl2+f9i?;N^9 zLF7fhrY)W~pwCA0u>Ew19*-1eSw)hg%#9*o-V#E2ZQny*&q~3Znki#ddfj17a{{5T zU8D6Gs(kOs`c0^fwR7r$WRP}-i#u8^%|2+ln}JM3d{vNU3Ch&goku039@#hV#$1O&f#dL z)J;JihlS(U(yLE(qslR77j@+DVQVIXB{CEseBbAN-L1;gpjF$aNH=40N^?H-{k!BM z?PpwIdt~*z!G$PijP8U}9pg3kLbfHy|C=4n7GCkDXCS71S)J*@ zI#N`C%49>6+&!g$1qp>o$k`yeW(0xuwx>7kh3>Axa!J2s;rl9-yp zs#M;*da=)Uuj?!wE8o(?o?)2tO-*QDQOMr3^CYC0Yb;#;%LV3<8;K;glE6Vk=^G>LJyOg|6Jx5+ctQVh^R5(fy-*6 zakOPnY;OK*<{K%$9Axx!Q4|QmAdE=vp!kO5F|`-nv8Ir>B!IMLS#(h~{;2><#zr#U zT1Xt3n>-$u_1alRm2Dy*NK5UH_gp}*s@PFgVMb&Tsqk=$*WJ37U^qOLMcNxBu7^${ zcVSi+WLbpPhU$hy+d9s!qMZI<^6Z%e;^C1DMXGQ3>uIh28ElxvuG3a&(2cg&R3LTh zcdWJB^bpj%gr2`Q57jh`S%nO53GY)Bf&jW!-KS{EUB`+EsHYg{bA@~WaT$pnVu*&x zj(lLs>uee+Ju-$qbaH$kh9&VCivv&JUFX5n#zrkB^l!#vpt8afy_Ry55$j}?;*ip5 zi@LlX30dM%F(Ffk8dfyCW?Kyc@Aupw_lJwqT)&Eb?onv;Srq-Pu?2|*p(Hg!ATbhTt`n&S)Ggr^`%&j#7IBL49WLUNPCp+(an@+=nOJ@wo{te6R|aBn<4n8n|l(Q4Q?#~ z<6TWGbD-KunA7@JC0z&U<8Zpue;&75yMNN0H>JQbKlSsP_m$UAiK$&x3r&!O8i^J3 znV+Zjo5SvmHb8*Gap|7g&Ci#46TT99wX zV`PwuzKq^k>5B1|)>d8tfy8(i@QH~*3(seG5Zz5Gt13(0(4v+-Thg+(EYD>3Y4-{K zVaBtfpLs}|@tuJVA~4{cw%BKhqE4(42`kh1cd)acalTHMGUnYFco2a>G8KWBNd0Tw zm?lE@>LVRZY)<*dI&{shCnW66jPE<#`ou9Fk#ISy z81Wn2@jZk|$y1v)oCj}1>$F%RzKyahm#CxHZtJKI#;BnYsQOa&4@8HU{JPchbCv0` zCD^>#7TzwFit0@ZzJYx2H+5*$!ZyYTo?eSv`%%Gt6R3z^>X6JkltdQ5a*H<{tgP<& zJej^Zl8k2&sO^)xg=NHTN8wg<36G4d8mL7C|HCnfYZ1kwsgS7`(_9yk-Kk-1K(mHk zUATtgoN&$NU*o{&BNoaV8?OT{Bk~Y@{v1T#A>|{r?Zq|%PZq|$REM;N4>=IN{4d5| zdMUpnAE~0}gfGHhL5B3p9`n`hG~@idb?mLdxgHFq`b1iT(+3cOII!8;R}9fOJv9Cc z&}^O-i2|59>f!l+c@&(V!A_r$p?y|W#KaBCc3tS9#ChO$I!1F7BJo*TzM+Bz^tkmT z!j}>cZ9H5$oOM3h3os(p4>4|bBIQkl#rR%d;{>-+gbA1E&zd2b>`}t(rK+Mqo)*QXikdAd)~E5| z5ngS{|KvQ>5I1`)!pBLqIASufi z-nT~Ur~kd-m|g$fpsWUberJ1h+&jB2jstDi*^BEBAXoYI9^hApCIK=JF1~YQ&U8ZX zhb!|V5@hgxPzxvElGLjSZ04ltot-dh8AeiFJ*&v1&&;~52tWdxrn`#i?D{u0UHSMk zN92d8i3Pr1ZX7r-oL^ZDYmQ_)guxQ?w?-90VJ&~b9suTVMF1tLCQR6`tH)JiT_{tz zyC+TQX7lC3z4hN3fJT^H?OFg}dROD+3M+};aL|oIqp*)tVI};VmscYoQ8QqDVydJB z0r@+4O>CEZ-PrU{R?!)Ftt-jysq2(f%p0jyO(mktZu!>38qb z*oBg(Q-O>FAK%ve0S4yHO(hwdrx#4^#1uzF9GVoQZ1NH89RBRk<~L)d>)aQ=r$__g z;DPs&&nX58hw$8Zqs#`K!8l})Z8{mnp4g*?Q*>BGU7Dj|mI?tFS8+1a475R~N7}^K zfum)KMH$*hkctU~YV02dUsyK3@L+Fa$5Rz}_1!n(H?64qy7{rutZ?H#sGo~KO!g52 zGpbqRJ$#7%yg9}>F&9B#vk#1T!6!2ynI1SmH)qqmvl12vs*o2blBa$XmI-eJA1pr% z;2#cDk@WePsH3hl!GoJbQB$qAy!1$|0%NXy>HHhqbVNsxqIsi`x9&T01oo_w^yajh zMw>vgy)hOj4LkqB>IDR!Oj&Q{c;%d`}AmU;5t=%YW3Bgqfnj3 zQ?o>AF8br}ZL?_S(Bt}iND8A7*)qR7YceiEf!4F8{z^Y>yTH5HKj^3wjRbzBiy?FXC=W(zBSXu{i5?B{Q3khTi_&V$mAT@mNu6#2^iyBK3hO&g#t3=W zJ|2YK2?lV1`;n@be}Zxe6|{tad})N zUJbY$Fjwayva7(z90Tk;nINw#FVOhDi}-{@PbSBB#vfEI=j!$<5zUC{Pxx*onil~jE@aLdyAQ*!MT67`(C_cAZ@$bm zH32Ycz}O~mCAO>x%$_6}U!97&04Odo@&4Z4hY$OI#szwk3@30#usm-Z0z|Vf1MwSbPi!o`ncVR(- z3<%k*l1-6M?TF3ZKBGz$9Lt310j_19)qO7@^?L4^XeoJWc}2! zAe`v$rGLvQ*;`jce1-#ul&vl)6%g{|3&*Yrx_0X+i-VI&;+Arg%lskA?(}oXPG4!c z!{^P4SwQ$30{1A(G!$3buaS8lUR6!LgE@QQ^Q4gizXq_$_`FuR{zay=LXoC|_tjDR zKB4o_3oocO7d)7*$7Gg;q$HBxUZC8~LO~v>NU1>ths}qBoNA~eYDqM$Rwy92QLSi5 zsLFo8hIxm+4dyo@dm^su5yR_@@9Q{4^)aj-hI?@mS}Y_T@W4!ff0wjZkakye6vmxx zi1d-~a+0IUV)H57Kcx2y8b4*M_JD5kmS>=4nB@%UCcx?rUx&y}2Rv5pP932>2D@fU zn$e+@3`uW-cYpT!4wH6_y)}$bt;R;l=bwb(zhx!bTs(~_ zC<{{BbqLR_0KFOq@an;`G*-(9zlh*v%S4wo9Kshbd@*D>lWbX}7=vCbON)9*SG4|i zPzX{FPMiauK(EtDn5czh3&yHgqGlMt?sl%$+MC8_&l9QmV+cJd`ZKrw?sNTttU(;T zlUudax2x7>(Ayygvx_A3g-+hEE|QiGACmbaqxGx*n&JnS&y=b!*+7iZzwT7kQNSi@ z%jy!=@B~HyH?=BFtVY?I$F?M$vWg5uOS*=^0$$q;AJB_nn5wxbneB^cP+6{Y6fm-Y zSvM!ZPl$QiCUEAI8-gH!K~@en&SLpoI-06oPv?h!Q6>KUGD!UU_uuK^?zb46Z(6sE zGs+>#R5reQKHu;B{_R!*u&)J_s3_{sXSBxyC>(vCuFqclTi}=dQ{i#p!E_nQ5C<>k z)l$t3EjGotEHlM=t7t$uisJ135mdWe-qc0UWj91 zgqvQ7;bVEmG*nb%ZD&O=#|(Beb!jN)S>L;_2MLv{qHHIk+$yWTu4iyQ1gYwf&uqHA zDLr%A`lfn+ohnntBjM*Px>uBsW`g2_ioOrewY2HMU*#+DRQ6AL?&}P5bi4V-?Z=Sx zzJyN`7t^jTykUIPucmHsWVRZ?Lo&-VRF@A|J@S;o*M=Xu^0KI4hhOw+^R8w==ET_^ zcW0{?7Z>&QTq5D_=!=EU4Xf9AgRx8YsoLDnji)!{&ZH-^475~MvAVO9k?%3+$r1|O zr7c_GedAvugv-fylNzDalg8O7*dpjZf*T5i&1GYL#D@i1G)kvq3>OARLA<5f%~xEG z5nXBJ>{QDX3{mBMX(6Z!Tftq_QXQ1l46UPIHJT9%tm6>8!{+ezWCaDLfq?8qd`^@1 zvDGY=3DuG)_!e3}g6oNz(914&e+m`NGE+{_8I%tHEG`x>7p+ow^kaZnO9mKk65!)R zB-^^`|GWPEg^drTt`2^Ad{N)?oeFRNN_5bk{-repuFAJY9AP5U5o^E}%$?7cY$zjS z0FI5;xs<#6+FI*G`0RG2|Y939x-Tr}#(D;#-{XZ zpXkC?m&qh{Hgu|u(nxGXsIG&^_i!Jd#v=8>eQb$bOB8#&PJq5vV|QTeC>i3deA&%v z`D>dgbVW{Feo@X;i{OUjg3us`zSvfQQ*c-H;KKynLUyFQX=aH}1%Y>n*S7Smj?o;) zyeK;vCr#E|?5x`f4hfwtxc>(cOBF?a(((l@ozTw3ujt1T9j@}DO|7KTxver3`hvC2 zhzY2m3?Ref^7%!-L61q(6?Q3PNqHkiMLcw=W7gKd5kuQ;lhZYyKT)J#}>hi1;I zv9IW+O(BQbuGD84uz#g$54%4j@V^f&YQ))*{h5W6xVft9TqQ)68VS( zNneEU?=JE{lh~2lAj%2Ce#bdScECY>=;vxit@qtJrH@7T&fZ54ulvWF?y2V9Wh>6xI8@_`R<_Y)qWbvKoV%<}Tuk5=4D-FIftJ!)(O6{b7vj)xhZOV(=jWUTG;cI~a0y(&6pQD5uh3c{;PinGj-PYjKE{^2|wykjEp@Y&90-y#?RT zNx3J!f#*i#kF5<4nk}8&i{-$r#!ym7OW?Gop$nzBSnjpF)v)Vj!IX)9Y;s)qp-s9_ z{vHR4m_yf$06-o_ZF@Dk_=nmt@JvW@7HP>3O4e6a+M=(}U1?mtNOk}0sx#_c8;xv6b@+IdMx3M2-Zw=*}UZk9;xYOiijZ8a7 zz(spgWh+?z&>sK*vy`y&|; z^mQXpjZ16(E^z!WInsdc=h}QAqgf zqs*P0MOzu|Bes&MtPkcNJy@W z&W$)Cq^lijLD1T$I$FNE=9t3C20qLNcFq!{Q?hB(N*=PiY!IGocCd{(#-8{~>HMZ9)6!E;^GXVC!fzMJHXKRj#|WZt{`AtH&A4@l20-*3C;Cye$`O@Wk`|Rtn@9a`jRl_t!_*gzv zx*I{O4n!fL3A|@-vvhFuwV8vi5Kal2)l0yx*RIEBfwP4wXL?=wifKU`_cFG=@Eg%E3b z-<;&*WIJ3d7#{^LqA*=4y0oas80Us1Hrnxo#ds)uTo>}Ih%~EgEAyLOM}i*%jfOpM z13e7NGXQdRB_&#)^i zVnHyLi%`;((fZ(_eN@|*6-DTdiF8ymBrQx3DJLn}tVIi9*;MEzq5eZdM^7G2Xqod| zJ>s)T+ep^7JF5<1Sc+L79m%P4r&p8BZ8IuqD3aF(=jG53c;86=)cg)(xI`1Zj65S zX^qy#jsv`40(_%OB(>>~wO8WCGu}tV;t@M!``xnh6)^ z8r8)|64}~NO)B4) zM+eh$YA;pcGyBzO`nX+?Pum{%{Q9v~neee=Y||*^hPSd}*y4{e?kl0T6Bc}s4?|ZZ z*t$jp&if6$jZtJkX?Cobp-~40R}7v1_qG*dh3jQ z2y*mZBrt02x-eRQ_-_E-clswk1S!k@TX{Lv^A`b%?gXq4F0$=Qt24)3Xn8nwJg=IT zxxi%KfNV19@wC>5W%DsP@Q4H;gZRn6*E36`3LG|oD(wL1D<0;o=zteijTKnK7Nxs7 ze{{4u)&kJgy@Z6|kdo!M-6wtA0m%UgD9R`Gj6l%*pgdLQvVT`cOAjyspO3ulx$C{+ z4P0-SzL58~0J0Pim4_Zep@nV*`{N3n53~+{(kT5^scsQl9@Bz z8Zsi(QU;{yDuMXLQd6LNd*@TYZPEX(I__+>%l~dNSGLq;@NpY|r| zfhVt4(wX$ve$Q89;z`fELv{Y4fvJm;Uc%S~8-xm4NKL%(&vy*;AlYL7@M)YRX(_Y; zZZ|~s$mui_78y#sMg_4$(p!J?VDf%;(lc(U1&$u>Z)3U(ct+e2A=NfnVzW`6zC^u* zGUaf^PFm;GMc7oxiljYZ1Ck&5DQ=WYj)O5Q0#DH7RijIE5hU#p@l<-so-75!pv7f= zB{%dQIRh3{JKFC;X4dmCeW=8o-i7`u)aiv5{sWni9*i*UZD4n#gvloOK_p~g<7gUz z!#81w0@!+7-NoPVXvV55+x{i&BEZABYxPH3RZ?u?Z3CqPrt)>j>1+Bf(D|P64Hg>V zmY?>u&Y|rqLgyB0Ml5P6SJ{s6xL1LVhI@Ey9B2Q~k5Kdq!9szfi~4*opUUMo@^tQ+ z#-DBoV{ogr3F~<;3zcLwNFP!@;A==xNr^8}6ds6eO&=egAA^J})^EKX1+%lXt`cyA zWr8Zg(m?eV3+IHDu@2F>FweM?dipH3(~lE1wXq#__{4Id2vrgth6_1A8Q)gOE^%|S z^rPS-ihcEgrhb`~O(j>b$Q z?IZbZNFFz-4}_npN|uA_zwxiKzhz)xAb`F7X`;VzN^!K-<&UF%())4@Lmy>&W4NrB z?)<%auBH3xKg*ED;%iqC%yMKl!x9<|ZC8Q{-rBQ4cc_~JQI<=&&8Ste8b2=}rC&yc z!f1*)X{Zgx302wv=fV&M3A>GX1%vI8A>ht~043)Y3=?Sqb}S$N-u2G@>HpLJd+WC{ z3lt9O-O0K>Gpqp~pKZvfO<3zHOHWih(l>`xR4u%Pu3 zrzvXxvt^Oj^S(739!g5;ZXrQYH->zI>QA>*z$k09l1QBK75c#z08r!vaHjKHSpLpa zof;pXn3|d_%_;vD&15m%G@qlKb(&Xld-a~TrxP5sNuZa* z46`7tkLwy*tbd(aA5H|xFk6uSe!GydqZIt$oCgnM%}d~BHgv0O8d7W$MnR@TecGtZ z{mF|&a@;i)bF>ps2mfoVp{{797VsrbK5=8ri z2g-7u?_yCaEOsj+j;`34&zk+a?Jt67#w2QKVgN2HiR~KBjx*#PH~!h; zw?;P-Gm-FPseDA+?@dr;01*ZqWFPtKZ&03Yr{9K-$va6Grjy3!gLZ3GBJ%R*q1`JeryduCjrmP6N@RW^r=13*QDQ*KrEms5WoPa zNBgqFWb{sVidZ6s7;!3!8JE7= zUjb|lbt;Z_L(jLwsU=8?;%cPy5%rFCi?Jk-KMia(k^+Ku$8=U0V#wO3FGCl4ewG6s zVe>CNzCUI;6s`M3an)XSVrfN4Pey|OAj>_vt-w$;bVpq6eBA6Z7g>2Mf2lYyM8A;* zxuC%=m=Beq|KgJEHy7M6^PO+lTRCu&(BE_+Nq0%H+kk6KI=p9o5-#VSkBmgCHTGDo zoljxT_!1Ib!m_mXx`(fl3l>8CDkR2!7j_FRU`gzLbefCb@{86A)d3<|#5+RDgVt!^ z_c9mbSzU!O_XY7#<94s!loDrGGxLXYB%^%Cq*2KIQpdv2z!2E$nA}p5B!=SR17q%V z!hJh8KoE5!HBO>x9ZZ3!^{4afk&DU@|Jq_^L$J6jIUmErL)o%G(5)u62(uITSq|c* zYi58FwVPx#O5PX71uFx|V^^SQq*3hSBks@{^1UxZrm$saPLj%5g1ZO>6(wc?~ zq!QX^= z*SkL#?Wb7uV5lmyhnZ?xs%H8aO;(k^(cj@^OL7?T{T;C)(LpNE5|wF{jh5|~jFd;t ztx!{srfWQJQ6SeV7C5TP9V`2)!-P@ZfWzjil|=0t&aX4AhR1sduS7qb0WqB;a-O@2 zl+xjaQPpk`59+#gv?2vqf`6C#1m7rV3-2Z%?cD^J2Zao6c9*{;uQQA)SDkY2>OAk% zJWUclLGSnZt=I(mDkkLV3ZHQ@6HC2?C-uIC){qlv!Fwbxgm8aw>` zIZV5Ox%DsdeFC0;Ufo<@NSDLa$yrxWQ-@yy-{6!civ0&24S1C%m}J;muPe`Uj&7FzkIsvz`~{% zqhRNsziIH2XK!CUUh_8pG?ndj6^4RSHB;qUBg+i;LF$7I0SCRyam%_>wgcW)$W`ss zKmdzzy_bsqNk1}VMud!Rj!3I#Q54ha!&v2n!Hsgj{O~P_6}l5@T(|qU(WemNK(=bs zCR>SZ7aA8-!MdYON$Y#ggCu1P9~(O#Xp1EoE#EoQ88-I8!D5B1G7n~a^sgwV@vpk6 zImG9}ej0A$<{w)xo44J3;3h&glAW#<&P8Y~diGgmtmSTproVOJ9i^FaWJa$IB&9NF zDhn=7>EM)YA%M;u73KIXaV15yNi3CKQ@>L>z4a!zHdj2LPYt;(p#S}DS58=ZcoM-U zoQg;SL2`0|LWnb%T2<9j=hGXOTvS)u7eS&JD|$g;I(cbIIMxGgMQI{klQcOb?uijz znG=Zv7jRJ*YIpe|eJgm>K&Zg$ zPJWmCgK!a&f4_|W3r27_TXHCCqtGcqM@wJV-!^U))0ni5J!r;TQ_+lmg`;TSWB8mP zxjglLi1kA9H$_=i=F>eMqyJ8-Q^fYyj>GW5;luZoI9}AYffnLAPt3n?&q#F~YzbH%rTe8grBEsusO#dK6*b`?o%=^-GF-ybyKpx6ls*w~5M7Tv|~Tcho}z_^jS8}}JYCKA4gnHCGe)V)8f8cFvYJ1f zszKt)fD39e4K?N4LRQ=|OnJaIYWoPMWc$Q28oLzl#_A_ z6X({!M1UX*kjZj1Ss(wjl+VI*64^ju+2OstD{J^5*7`y(e~=-{gUHJa!S0?a zRdn*J!N}~GT()>X(AKqWCj>GQsT`V56C~LrrI{?hszabPGCq$agDJ8~N~!jM{^Bk? zzpe4?HKovRkM$#z?(+~&IiAF1p;&|x<=~ujKZL|xeS(OOmNmV6FuV|p6dMoB=lTGP zTC*4AbyZ~Pmqhe0)02kyiH+}sXS^RcsM?Apr=|U&B!y#36FZH5V%QX&V>t*|n9mKg zaeqZVqUfd}dW1{hjj>pFHk8m}i{jEzY0XQ+q}PkcNx5)_b-VD!CPLmfNB9$qg>Cj= z8!ok&d*brB(=qZ$el~Bw0u4l&{E0`fPMgAWy9qbPTt~b$IDnT&!I6Iv#|+m{TvRDz zAraCO^EDz%{I*u-oT6sW{gnl=M9SCf;^A#ofsn#h`whSw-g$}*UUN& zCmO#EZ$G>0lVc!IvsZAqhL^A;3swrK!pz>N4KC+2NOnQCXCJ&Hv}SePZPghos&`9u zk$rS<&E~F--afwC-ECjCy+476tEs8f!#bogr588`_L+$#MW7J}6#cG+@X;tZe+Axchd;)x;c?KZC27f8aFys>g@lVji%I3?HTF+&r)T!Ue}}Y zGe&c%5pZwCh^%&K3=!r8yP&E%TUz2Tj(y#W(N=or_0h>`b}0=-)mLJ@)j}XdNsNzs z>nB@>@6dUE$qTDOa9Zso*C7~iX`895EVX{d~ zi+8MAF;9?+r}@UjU^ZOy!FGgVNL5en$9UyPcbvM)!}Mvv*ulkLXDb#X-=`c}Un&%w z#7PS!@xx9_xsnF7vFj`GO0nzSu=K6}(Sb)G)coS-OPVXyi}8&h<}h? zNFg67k1AZxWC=f(6@(5LB?w%Y^bs;(+k@%_iO7_jlJx9Zux_!Fsb<>hG2Gk`a*2ei z>sYGz=aHi0L64#!b>(l;HgD5Mw&@8fRc3K?Sdb?;*ME``&L)AqY>dn3-&gA))Vp_8 z>~0T(*y;D^cMeC(nm#h28L=jRclqd`PVP;Bhjbst+Ug_Ec6|H?NMM?L=wj4k%e35w z&^yORS!ytjUOltc!9stP_ZIt*2VpydDt^c0>chV3jn7MS%_TX+jAa~ITvWz%BweLO zS@|FTzF%8Ahl0l5J{5Jx8R_*JBNYnE^rm%icAiOjQ;JU zrqN($YV5)Wviy=j z&^@s9{bg(@NdKXkM#A@+G#0ix(DE03=w3Y1_(%{DV2dgz67qOGZyua>gbgrg#3@sE zEx?Y}w6-9(I|m1={@J_5FD?0i%2+(;a%bskpFg|n_2eNAU|u`BxG=TyirkrxrA{$x zW${Vm)!Z^odFrT;yHQEScawsON)!fA32+njxOEHt6+!HrgG4tM=o z3@)?X{|- z5n1Z99VQJOPW}kUs%(R`uz!<3!aLURNmGJ#Fu_Y2oA$Cfz85UhA=Vg+Nb{oD?VD-? z<@=C9+67|}Qo5el7^?+xZw7sgBdQ<*H#0e0b(F>3HqH!XWW#V>uX3x&y;0la$hpRk zLYYYGz=&&~U=hr(LgGglSA>!66`-xe%P+Wz?i-kbh}gC&-GJqu%2u&kjydVKd0u-7 zL@IaG+#9v%#H4i$b`)crO`^fq%2W0b+vw-B|;YV_HtH`jxpBOyCT*aBMsRB9mWl+R-CTbSFPnAe21eL zKgz!y;>}ThVo!8fjRk8-rgmhTK=5Q}M99j5O^Ke`ALuI|JUQrTV-o~%ED8|HvlbC= z&}v(RP2|MULyrn2N|+4j()-yb%}AoEejMX*!BAt5HCU=!tJq<>#$=&y1J*4bt|{i_ zw&a55(ssNj2Xwz!SEp)ylAKd!P3!-res1KGzIlW^Eyh8z+?|T_N}wG$NB&pE{q5!X zfLHfctbqx_oGxo{IAZdro=&#r!+EsZRdgeoqy3`D=s>Y0=NPr;dBl+a`X=Tn;LLx$ za;iA6yC>)0m3fVpq+$OKG(a1tqm!kn{rr5_2H4b~YEvI18Y=oP$DGwo4FO=&w@c*x z0VJ|G+?;&5m;EHfz~)p}H)CO5D^sHvg0CiaR}mnGlE0V#d88h6f1kL+~{!2!O(rD6F`yrW^Lu!lSctZBgvZHOGy7~c$h9jIzrrN?+b;%Do7}+ z4sx`(bJF3`l`9-Tm<%3~R#3~iLITrr(j~_>*3P{JvV${3RbgnZC%!pJx*`~BHOmBB14f)yxh_00q?E9^z4A_C zbb$cMa3)eWi-{oQbclsYjzZGwlm}*D* zi9x9_WorSvEws`2-(sOH9|uHY4nRulM?iJO%)kQZB)a7iW7S_s^)g>1`=L42^sn61 zh|4%cG07hmE{?R~2;cI{X)mXNVM$7TB>Cr>bUwo&Wq*GUu~s-JpWq8w)Dl|E;#BNK zXgs?VJ=EuANW%;=50uc1ctj6hvOK6w{2vNq;)w zDA6rH$O!m6Gov-_y38}jT#$KrUGdc7B9eI-{vZqetx&QYu#l@@@)0qgnZt$*oJ3^P zx0grEmnMJLm$E!ZHbd$ui0STrvaw;$H5dk)zHOYFtfk(=e7PWz2GY+QX)<3^x$NG= z+m@IP7;HV_es=uP-;n*e=d{HN@4|p(;KRx{MjiI^gTzZ;Qpd$UXOwa^6ovjTp0y|^ zvz_u3;;Uc3*;DtgLoiTKf|XonLs2Y4+tCEBye*f}8R{^S51(TmAV@>J^xF|(3fyew zEZ9d}jdYm^b`C(eJXF#W$un%@-AaH{Xl$+%|BCR+_B^7dYRE=k1I#A`aY~o4%R!cs zOCX0g9(J<0(AZ-B97^SoZ$lFz#fHtO6MAvycTJ65?_li~QW26HswTBBUrKC8jVziw zV1&s?ffuX_QT!GjifzdftA7rPMQEL59$<~wWY(93H_An?B~IWqG~wK;lqJPm8%f?6 zjmFr9FHXb%xW%?DyGV4bHH<6svwNg>(+xk)!Pi9PSc6mY;2?NJF~;}%La{VW8`37@ zB4Gjzxt0)QxZYFxG6$oG$_5V$ZLlV?wMOA2|3v-_HT{EIb7*KZ82!2AoRtEEg>&y9 z&KxURCh3^&v7zKT=mz?+gDI;oI2!_Ot8IH5CEAYkPqPQi?4&$?k3=sX5oHNr}Cd_7Raa}Q_LL(OJfKy_WL|-%M zZ|;Hs89pF;`Z?G9X-OgAxL)%AxgXa%Ul@vDQ+CkT7*x-j*Z_c0FI(`b{Xr2*4hN>s z0z8rA*rO0URo}_9SSWxl9FypQ<1r)VDK%%^%_mUxYJE5h&#tB7Nxz%|lypGDYpKiZ zoxO|=hAE(_o-(ol4Ro!`abKCv5Xf%H(~z3#pOOd=^caE=+jjSScJui^Ouc1Sn{Bi% z3KS^r?ocQsc%itv1Pv5gw79#wdvPtrArM@PySr0dOL2EUdDl8;@AC&T^5MD1ob%HA z({`oTA^r_&YHBJ@899!@^jC&O)WW_fc4Le^IWHu zU#g%V4<8O7>bp&_=L}LBADaj=@??9YM^vL?|D3=8Ss757ytj$;QZm1JRksyU`H9B6 zvHwF&6NH+s01wXQgh_U4PYN^!uq@Tg4M)hyNFwll!YzKFiiDV5&f@A}LMliD;T6tPes;FZtN);&mva*Z3r$&? zk{jz6zw*}9O6pY1^1iG5_HORv!iE6+F47S##w=LK*;D{*6wg<0G6bd@ELev3{<%~B zE!l8KF8)D-qD);*tcK|F=eLB~${?bbh$xRBj#4CK%a)8vB3cdtS_0%mG-0oz@@7AZ zf!{*F0M+_Nez-kVwSMJdy7UtEo{It#| zxJ$k-!af?i4ChkC;qlqW(A`U*>r!^f}%!QL`(3bNd(h|BQc@60bhvysqZ54ZO$cuuH?8u z#SkI=q|65&V9LiY+j}IJV^od-L~fiJ^fhs0kFP}X;6$U>x4Ej~lG3X$V0(@O%;(HP z#VySjufxb0)L+Vue}?T|jc5QqYy@CAsW+WIyls+ylafL}tJgZ*FFQKe@BiOsG1I5t zC!$CYfmI*9<9}9Ye{SpPJ+rNC{X_qhBAx3V0EI>Hu8iM}s`RHr$Hw3HYfyoT ztQ@xffjQ<$xnR&{HLTDG)?zygE3no6#`a%Z*NSo!l*PDIJ8?2ajbAb+T*;IZEYjP$ zvx5j(?+`rq@{uQkec3z3Qk99NBmX@8f7MRG+ACpUpayL|rvBgeS6p~Ej#r<@R#(T4 zk71m|?^l>Z!`9huL!J~&nsN!M5OhClp|`@TIki37xNmCzyE-yE$u+JqqmGpIvvH4y zmGD>*z0>{aHmjya=j&zjXc6qe3!qiN@;eBtM$&wIvVE{<6=tL`-+@9G0Ndv}919N| z9Y{F{F1U^~TgXC5(w`lv*Om8%kda=e$o-~RHbYymiV(LWS=>T6d~s>B|nz z>-fH##6eMYiI(z~{n@~Zwm>26UoIauUt;NT;J!qEGn&y5d<(VX)`8hv zus**qb!>|Sy~B<5xLs1A#GR|Kb1ln1t?nh1I!OM1ZL*nQn&M1>f()>EcS{0EVuUqve_ zGBd-0yNzM$PZS8%syAG}#@IjaOP8D7vI_SzP0kx{0x4Xv8jg*p`v9YnS4?CuOq_SN z9*XBJ&P}LrY1`f?eeAqdcbhO1Xl46ylgV2KBNshLsbGnso!)1!CxY(w8|~zyhZQs@ zb|PNs;h3nedv()F%*&wW+17T~3w5T3#_A@5=u^EgShr=fvm=!BDR&lX$m6`(6-+lqS_9@*9vkY!XWMw9=3by*|NaL&Ma*I02#BUI@ki)uMpYuPfAb6v?!p`u1!OI^vkhU>{S zm$v=gdbGT!Y9S4N^$A1sN)0zT2YLW@$Dlr<>@sQD*_M;{H;k-N)MhIvy62C?@kb*Va3H7uDH#PlxIYjhh+#a$F3L;*jC z(2p&2kHpIv(kV3!Apez(q*z4BDgyv_#N%Sh*bmgiOt^6}@urtU?my%y);thc8a@K* zY5(f5yB|_J?=-eA0+M3^k#OoCT~@SxU0BDpQe_b-xv6l;WFqQl!ehB)7r{M zXsw_%0Ir{}Ds)qBLa{3LhBu9nC&g76(f0qbaB<`X+T;OdA{b8FQMl`Y4K%d9l6&zT zB9*P;v*AlHgnvXQ3HdupIMJ3-0D?Wx;BGu`omVct>#6KYcu0JmZnD^eFq=N5s}~On zC}T+L{2D+@Z8mB$&CP_ADGButWAlV&;tG+#PVI68(o;M9{N6%0$F{`o;<{*O4D0^j zPA5iv0pK=UVGDI7Po~k2%5XB_iT!B^tKY#dv$eUs3Rb8;YnrK9cx|d;aWz?eMs3{6 z^ub<^e^^-nB_pHJCA)viS*?lp1^7ME|2(}fjV-=Cx7e`IQJTyuUZG5w2P1NPuJXhd z((yQhIfb7I4Saj(NK}FcG4OyH(j{y=$#sQNZ9k7Pbj;hBiASj8LV7{OzL9-=FSW%dRTb6^QisZ zfeV8CUYDM9*5R8w_HHMtSHJbRIlQ@=Cx#IX-p_vzdS&BI*E{`Byh@;rPB(|!GftMM z4NcslqSQ+o9Kg7Is59pe_Wiv4yoCUzypWB43lA#57hM~-RBVFHx{1IK0v)qd;`)Sy z;GxYr?1{0lzcz>WksoB^sG`0><%;}*m_PgUD;DQks9_PVZOVhj@zY7`9&`iVbL{d~ ze=x=KolEw}f+-L$gl0|NBU3JQ-rp-XpXuU-t+f^l&zRex=Nx5EUwraxT?LWrqI2Gu z5PbSRa2B<$)Ra1~KFmkCC8_u<;PH9gHRn5ohSo`TAly#G5Z%7v!-&No3vv_`vL;CO z=kGmDMrK&MFt6g^r$z1+Q%gL%NvL-oLZG~Mp-)lo;va*gv17-ibv=CyVf0;YawKb! z-Dbtv(fh zisK9z0X4eT&zM31iabQ+3AkfFCP<&$tkJ7F`g2h)F2*_*)uGjq>2N^I#QZ*OvxYJI zYW3{Vh;MR!7O8fH6AhBAs`)+ocTCrHIKvFE<)EcML*{~1>_|f>*DD*lD03J(vDE*N z@k5Pw{M@QoMl2m}Ux!MWk@?#vX;6|;-9j2U{0n#8=Xbsc~SujNnB>3T*jWlsdkxZW1oBqgPmNZ;SmXs0e%=j0A>2h9b<>$PeD%*jNf zWNj{DNmpYi!CI6yIqV4qrbqqTnS0rlafJ{+Qq z>C1}>LJ(v_E2hlHb8^@K>%eq^2ITp@t-TVDLwFk3+Z(l1Bkhf^P7b5fV3b~m`&-}( ztj)GA9Ge;@#Xh^uYQ2qmao#M+LT=Kd+=t0vIor#4(cmsipXE64P2yVZ|Dt{gM0wO}|+8dfUPRX?0U1m?ekV9Wc z=I4ZJODaT3WW!$_Y1eeGl3xaV}hjKl)x4*j6i-YAu(@!T2HxeMNpUTH&^(+`!v$uUk297% zKw)4Gfz!K)=>Y}HscdY+>N{whY4E%Lf#0U&@fQRL|2URc+aj3|QmhW|UtodnvbCuT zV43?TKg2oCd_^mP>kCSrNI|M$m8D09 zaAj9NwC#22B^TGyz2!VHylo_$j#?}^rLyld+~-vKm6tWblLB!O;yVm&rSW~$tZ>Ca z-j#G4bdUuVS0ODmOL9)*KmCTbRRyv>eOa*tvDW<+qjLb=@NAL^@K-71qLmcee;$X= zRo+pT88&}Z?ULHnO~F3Qy{hvCQHk8I3nAu2&QV6To+!%)&GUvkzMY($w6!Yj*geCM z_Wvdwkz5+Q^L36Q$>Mz#bt8MT*4JnN`73zj!dV*kA>w~WnEu!nry7M8E*}7b+n6QQ z$D`Z@aGAfT$5H)SS<;7~F+U?ZU01Wt=>s>n6UUB?wHE&@)1Gz(zH{q=W%n7VUN)Q| zC{jG10I$G<|98G6-o6o~k2nj3Y5g`^qZ)ej{1Y0i~e|KCQKOD9{VcTuAdp}LAg~w6# zYQc6>!A81YEuKdUGnXSh+ldt?yAKbe+9#o^c4s~P(RFpszg>r>(Z4~P0&%;?_1atj zUv_l@EDoO^(0_xpIcfp9#TGe!AAiba{ZKEvGW16kF~&O94C2%Cjl`xCy_XhWYpx}MX^9;RH#}G&OsE`p9 z8^%J1mS3nb(frn`g1P=AwE6b9M6S%A^0F06Nt(Gxe#H|^v-p|!nZG4k?u-9CEXXd@ zRU>QEDP6;5TjI?X9rh>j!@JDAyeDVsW2jp``AGL|H1#;r zBhnk^!cqm)8QGI8a$x?zJQ5){(=^cn`V;COqSlgl0Bsw6m`!mJ&4-I&Hz$zI+e4@W zW**9w(!|x^TPhn=B?=C7oU~T6>WGC0z$thGj(lF4{fbO~ap>@QtA~E;1AB$^kp^C+ z-k_i)BwHN(?SnV?{7vA+MVs)CYSU0dKP6@l^|5crUp-z#^20qbD4xAONG=Z(q5gtf zI{8V>fKNzgly$0ZR53-)lmwWh>{@8Zbe4E7SGiH85j6^?Ur6~oE1|n|;zjaj^0x9v zn%=L)VT4`&j;B*WqT7a~p!Qd&WN^#;|K4mO@=q2VH;pD&nD4;UTmBtC#^BzQm)#G~zKCE|$@U*0Gz}n|rF|%I za1_u2g3#~vVs^4sK$F(;wz*Zns6r*``M7_P1j9?#T735&Z^&U1%~rh2dxVr07k`r}HT8SI6pq`wWXP=y|M}Xb|s)j1g3llqaHAqJQp%DU6m5n-V zOdE)D_Vdk9LU1_N62}Wk)m{8yQR*~9n3H*4tzkx5O!1Gn!xI9{=BngR#fcW3-M>7GOlDD9}R7LYfL z{+RV7Z`n!xlw?=g0d8}9vb(T7g6q7ioyv3OH}e*s3Z*GIJ5`yd73&Mv;!tlb`bqT% z(TF_L=E>Mo>N)iV#|hb%G@i)^RVE(30S^^zFQB@GZM56!>@vv9@JqGR_AiRKTlOyT z9d)>xoS$19GBS;`P_v$_Pz~$8*enM@qZs1Z1#X)`ip*OU=^ytryfaISxScebBK502 ze1e?Z;L&S8hQ{b=&JPA*?SHXJ#)s4Sdb?8pMv+Tb4@@=eNy9PrCr2^`d*mH`^#*5q zd}gQ}`0deYeY{#JHzB9z#b%lT!iUyw>;e;>U1kg0fJu21g?cqnhfy|R zxs}L%S?}rG$OKcjd6CaX-~~?E`%nu|=<%2H+{-r3)#^A3<@&bia=Z+KwcB%E@Qi{@fZB?AR!*SqkhfrgbNBG_l z<|c_t^TD-}w$fr&`kPF>DE4W}Hs)7LU(Us|qUKbv5z>My$|T$F675RA#!ewlIqMfS zfmPNTnMvIRuIG6o+&`+wp^!aQmH_=A7c}DO+wJ;Rq-D*2Rh_S1$BQ-Ev%B1{FLQa~ z|GP$3*uD8Y6-$BrO}OS2>Kv zNV7}hJpGZ^5NLMw0-xR@VCh%-csw`=~5hGCY0AcTgcaK?{v*NL4lQxRW?#% zQ>`XdKeEusZGHEiemTXU$w6c}Z?ZqpXG?E#lRP~mN07Krxu(@{n6UO1VZ0VAGAApu zH!0C&e5~i~*`!_oJI!IC43^9IcSwyq(-7ETZy=_=;rkw)6Aq2sBNNUW4q`Oj?qt@d zAwsLxnt>SwC`@*yNgG*8HvR#fdGJXy#FwQMOo}99;N`(2j1dcerz;Z&>DXXs6m@*C zu0gaQ*Azp+_b_NZ`%2P;@ZKu-8bx31_cs$MVfpTWiEs&GG!hi&YH6=oQj(AicZ?cT z6DClPYzrF!{2vLLus9Vj^~t7IJSp^<3ut{^22QWSh$}E=GxmRGHNK;sTG&1_Oh3bx@@I49LQN^fS zNp<#yo9RgnWcbS6Z;Z37HWcCzXI%uJhHOMRyi{1n8;D#4&h<&pNjhb=Q#6W8PjzW_ z)O!5xc2xe{xZF^dNzlWnb|y-zs8Inxj0>M5x4^=$Gvf_wp&nSl(WQpA<^bhR%>axJ)QP+0npeg@!X9TeIGAJPT^VR(06SV=F1uK~x{pJJVH_hp3>c*hNp% z5(U(CDF%Ec$9O-{?jDcQLf|Tgx$g7efZpQ_o>oqea}|N4<1EUQz)JdCwX;BeAzcp{ z@dx%$`}x;tN_u0kCP$GL<66DxAR>h;Kjz0G3#2@S;zZFQkw2JQM}@hD3c87i7=vg; ziTkaU_C1O~Lq3mH5*4M&$86LHV?KAb70TmMY-j_YxQq1ioI9~NFhb6CSQUCQIZIx4*3)r#on0S}0EXUK)!@d<5U9}Slxw+V& z14bp(zFbX;=I}e4Sy~<}H(2w+T;Q%p3&pWm|8u6n#@JK%iUD-|&OI2q`qq}8F*2m# znF3Lbx_IU8-BkE*?E}8t(|UZ075)Q9JOMvp zu6I*ItM8Vcp1TTg;6L_Zr9QzL9WdxIwA4qO^Ty3OzAvo~>R%(21G)4?!Gmtlr9T>I zE5mEHd%sb^(he6|d9AHs;9}hVQU4LIy?&d|&HiwbPUD$wyW83V8mUhpyZHOvGE5#< zz}zhQ?LXp?L21>GVnFLIu&U-)(O-O?mlpdRPj68CX-<)nVxxwRy1askrQ)8;J@&D& zu^zRN)Or;PVJ~hoP_~fcc8KqKSeMLT7|XIQw$-_B1=I($x`I#D>UPG4S>$%M^c8{0 z#O!1lu+1oQQO=^Gr__`mn^8E&bG!^dHn(#qWPnLtd8~5aC=h^=P5_?|4U&Db5kDD) z#*1}uB|u&;f_xIQaPI^6G(azPrVf-7f}I$(A9oN`&j_}Q10DQ&jsy-g+t=m)paexm zsjAc3i0=ykz6izm5b`ml^l-vW)=awVL3*abB3TV5>#vM{uQh3*7FG%7^W)V0){5(? zvfxN`gzMmALlsvTlS6NW`&z5niGRRF!tq!9f5bH?_FiGDD1Md1hUTaN3d(}+dl}DLDGje zWi7pW+hwMSI?=c?E`{uxd^5jo?+e*P>XjBWWrP#@@WSw2n&6TX*G-N6l5c^C8eMV zI27PMiUKLiYZTL2KIra2U4O*O< zy$Mo3R*PqJ|6~u1)%JdC+>SR84&I+H;$cu;LbTu~Vb|SAL9HR+HQkR~S#g3gcGhJn z6i<10V#LQjvACJ?^YXqI(yW92?*_Q?Ho0s75B6uxtV*bbB7%HUCvpLw@W^~ zF!T^$3&DH4I#cA(jDi?)-CWURo&~IcFacwOHXZl`N|?`+#@{=(4AEZq7}CG#>VIpl zb-MWm2j;ae0B)?k$37GGaiKOmyqGPv^AmaAiUPR)1k%picWymAVdue7D_r{CS8%5< zd)-awd%!lp`AlAGSR;`Ktiuv^XjN`B0StjdMF@5+4i`qbYH94LAwWausHyUX^nL+N zZi~YfozwL(IB|s6`Em}xG_H&c13emvFDR`}maO;8%n&YHJRHr;7S?M+V{?R11p!ZY z7RL@pFEnY72aM!A@4*|=D_3|bOA&(@Jgi;BRILh18gmLMlgKjwP_d<~jQ-RKIw6AP zNOn-UaBtMb!KbmFcQrx3kWt;6ma*l19F-I(6T$=aE-JSOKYu{deOPHkDpCcVR-^jqYmq zVG)deXJHc2Fw0Mu#wOMiU!qKNhU43BI#M2~+I_8bmXuxSKqGz^;=QJ!D)qaoYJQ{Q zmIoWFqMqiPBFtdzCpcfDK|F+_F33taxKU9HpbGsolq&DuVtG^~Rl``3xh>A1rq`IJ zB~tK-c3$wH9j=E#pTcqkI00j}flf&l*OO&?^g3?AomzvR?(IEebVM(A( zjz_mj0njHb$R=k4837n}L;ayvh0Ykl?xqH@w{sn)$vZFG6W2|ZOt~}fH(G)N9UX&4 z;@+}MdtRQ64xgLH*WhriD!oppo8^&|O*TT`q98Kh6r+|*w*)XA8j4g6z4YXeGYH5A z-YfN+9)EEDZ^$6WLF3;%u1OlyyFUq&$)|LH>r8nzmg>xHGgRHr_SKHAg5iS2Ys@CG zmlqce`L&)!^p9ljINT}F(DKt~2p_uAT1Q*Fz1=+VHrUwjki|?VA)&C?Wc+ERsPyg6 zoo@$ZfR4`x^933a(t~l9cSV63P-@#rZ=*kBnL}+C!fXdXO7>T25sp(_^lfxL@KR?k z&H`Zotz6I!l8;JhjG94Te5yz3$zxQuT=O@-s;_s(m>1k^r$uCO9p-YJ$bSr3gIOc$ zAZz_;Q(>R7hv%-zb%(r=>*3#XP$bl%q@{F-=XlKZL<{v@8AEB+1uQe~dkcJ|W2zIPPYUFQ2@lS1w_(By+rAo7Ezfvk; zay&5R8I3xA?c6>IZZ=WjCb0Dm`>2HuTVCc}gI@NrISVg6SU&oLj?#rB$g56Y# z72U_X1EXJrLZzT)H1`?w=V?QQ&WgQDjjWSn=0iLv+}|w?ccy-eV-Q6x++Xn>$Ao{p zzQ~ci6bkD&TU|9}b)V-o2E1Mzl@KZW??3|34w^Clrnw;@XGbSE7^BU@ta%t+vC%1X60|jg~ah0hE8}OK-4p#Xz4)~3f*%vGb1A-^VV8b8z`@P?x*V= z-q?mC!Vm?H&l+sIq&}x?gz_3N48p(j=G3=739ZVe&G%`0w`>o_54Zc(-LOSKj@NE} zjHgxUi+Wzp>Hk+NWU!&_doe=@p1$?*T>3KAt$`z@7n6)S1&DzB+f%E+))?V2b#xr& zIk?>Q)G_+_nDHUS-i#+AH#UdQk^AFSH)4BvXSjf`+ILgzqk7{(iH>a7=9}lPe@BM* zvtj+#tIs$>kf1BiVTg@IXFt9!sw@wZHK2>>cc2Wzt6C7$(i~h=puyjt-dF7D33klL z8oqp2q46j;j7;m?+@% ztT>l*C0u7-xUu;k64!^I4yK>gS8hUStgS`sM7Zd;`p-*|sUk`0I6qjVjoV}8usr0e zE+}u{e5<@ByK?BQzM)M8-)>U9NV)jre~IF~Yqd+APi7Haqq`&xI~U4MFe0?O2%*}H z;{2m-{P4S&r3SmzXs35KVgJ3l)MZ!(7p>hQ##HTQRyWy@_CX2zEQWJpa_+84;-b|| z#XyVQ7i?T$=6SsoLD5) zg@Eo?3Pf(JR{C*T6}BZdlbW@BF9$6NUYuLY%7djT zKOM@RzwAv4Cu6@#)3p$x6rnyN|F?6jMP1R{Mu_5^fecXNf?=b$UzX*;J4Bl&AiW;BWeNat@WfC#J zgH@co?qQz_%c(ys@P-2*$WG9}6Mm{poin5L>~^BAxqk}_qp%1{5&zfiU1o1mWUzID zR30!#*b@dt_}uiv6c+_Xhle96Ws0~UHEtv==gki)8?6`|4b@E+E1cAy@QL9eHsq3k z_PXC|@B&$x8T`KgFr-uyK>aQqT_ zP`kQvks+GWrKcaAkKT2{bRY3cc7^5-Ur{avh-GSov3l~@`@<3 zr(D*DUTo3ac>Gh{0tl5PeOUfjc4kcF2MqdFqraI*Lro~}efA@X1r|bTG)2cx4M!IUhf%P)(#p53L^>bl@hhCNLxI|;EHr+Y9R16tI@H^%uePT-ar zR%6?=SO`t$can&AsV`7?y+38t>eyUVgx0?&NczfKNr0c2z(!N}p&&+0J5U6nv(CM? zfl$jyK7^usMde$F9$0lS#6C%VmVl(^q;E*g+_9gj6A zW*mi)511;J8{YH1)Gi8T9zKR*3`~==CXibe|7aP-kz+}%*>n3YMo71m92@F})ySOL zl{FVq49NJRT?1sYK>s=0F4hbdB>W0c9wvh6@lsm97d~n}awc1w{#AMsdb+GcK`BE7 zJ(wF~kAS?QfH2cQm{sGvatF?c=W0tnI7&r4 z;El8;pZbhP%T52+x#fa-D| zAD1KK`)afXe!$zi(oQ@J4gd)JT7lW7t*=hLI0*XRQR%Dy7Xo-=hS>!Sg5JQA4@CT) z|91DvCVXx8dHy^6BeM}^dPz&wqDw)Gu#E2}b_LVMok_?S9G(VR+{omr$IFa%#f-MT$e)S>pn{^Eh1bW`mbzS7zS8psZ? zh|*Xse7n`Y92=3${nL=-^C{MrFL5JxpTW->)Phn!D>w;^{;rU~-?g}ylMi2I%5C#x zl1_j2NO(uM>~n^)HZ(dksF=;;;-UwS9~0vOav8ZIao@3-ip2aAfSSF7d!Ili$$vCZ zW!!5>+Zr!^7eX-lj-y@+XVhhNEDBXH$%uK5FwWvfu*dV?R$E7A^&zvW9dyQ3&vL?k zY!K3jiQcN)b=zZoW6?RagN5Rp#m}c;h+1YgcI_@YC)22y?5OVy0gDL@o%cGZV!$FI zq%vS1i%g;@mUU9&FcSJxoqeDfv&t@Gm)?j701`6?s&8Ty&8mB6*KkOB)Ixij=`ueJ zSIU)^sx^0H0!HL?zlZfYx3djAe<7^1oJ>Nx0F$cG+Kr!UEc8+=EmR}KqCvu9{RSZS zFBQoLj)_`;`0WI@(%BuA`p_baGO7)){J4=Wf(w{*LMp4pdel^1qOvJ~=Vz%>6RYNy zI?OwNFAm!5&{0;?FKYbe5vHy*7xG7HsDwCaytqh;X5oD&0*z$cr`@CzG*KH(7p1JZ zB#xtu$`W~3GT1&BRq9ea`Z1EnPjd^)iO>2@STxI^pJByswAZVPP5IdCYH+c~bnI?p zu1ty0-cBki6Ik*c<;DQa|7B%{lHS4%2OfpdLCtP2 zkC>XEl+XuQH_6JP&sh|7<89AhQAjfgI&=Qq9u4WrIzRijQgQR+2MkrH((n8VTj5?C zh%XiqE57OZK3meHvAm=I`NKS02;_x02-j#glu>zOyY{jbY zJD054u%KYzCVxL_Vbh;UCJkG^orT4>3vY(QRdHB(#dYA=MxvpT(c-x z1PdvbR(dr;64<$lq=&ylmBf$cooJ=pWK@~@Hmts29CG1wpQs~h6@DYDG$Hb<Uim;WY7_7%sS+UH$?21x4@W^A-o{g4jIuQC&D+;E9FmL@hS-9pFu z9{D1o(7#8HoC8nBcKp(FJRcXVmWH#83w31iG^H*~WRKm+PFDt|P57#kI+MPDrtIwb z+eQYYQMGkU40V&}QpO3O^dSCs?)l24?a&?^q%WZ;PA)^GRZJXE-BS#=8oN^IzP>5@ z{pj2T6~3dE%A7(e^ASBnXmEeTW@GZ@LH$7!5=94Tcx{&5@Q@&j7wF64(D%^SL998i zvEyd$X*W83eI9Vd9Cd({>6g{#n2C!Cge^~GXleL3hP-27%vV$P%N2*j9x@z#_jf_(rJ~*cmsLt)R9R+-(+gPUtrzl~B6^zZ{=f6-67EK)yrM&S9Wsk?FpKrL7ab?*Q6E9Qd2gPaMhD5(%npJ1#l z%s_@LT3KhVk}cr6-8Z~57?&eJ8Fif{>^{M^f(47QMzZHDS>0CcV zBl(2(^Fcd3&TfzUL-aSO9uq91fP2@$YWc`6t;rH->6KE6>g%QAIiu%0lH5MTeS5rq zWlHdX!L7ljJA5rc*2Ian8P}t{z=MB#FowcZWjQ!-teE~WjH&4eS#|LZr}%?}`PATj z3!(6j41+28D?4sHSr@QW4nvfToYOZu21GB()49|bejm}~Z=2pGV0t+?SrmU9TiTDy z2fGg_1s@BuDZStXm`@g2Fpitf1VSBJN-5JCHlJ|!r{~Z~qunUPWk?oqjK@PpI;`iYes=?1qdFv2PD?78=u)SH1+ zrT3#6(IzSATUAMdL^S*oX>pM&(t)gu#x1TwA0!C2uspoEBWpiMP)Y=s_i`;JZs9t` z{I(#_VT+|RK8T2;@Dj^Q>VYrksjHll-hVc;Liplwig&|*ucyz!@jl)ex%Dt)W!q69 zUXw?f7P1I52D5&5AAz+c7j%_onE4)}xJgyc5^$ymC19A=GqbMX-{3K3*3Sp4yW*_m zw~b&Kj6eipDF8%8x^ABq#5XT+%2!@ZvEAtf;~GgG^(DnsJg1h zRV{~wQIbii8k{LCdsA}^?N+Nd6Yo}zbO!a-!3&^JZZ{V zuf07I$X4pH{&z=r_{#&E2MCE_{!s=FY`?GogEFpsTyNHc!~axnXlv`XaKmbbLZgdx ztxlgkU%jbr)qi&tdC~xIN+0fVz1`jHPJ2S51C2tBe4KHVvO00Hb<(62uiiaXX!-N2 zdW}*GdGIL|movtF6-`~(&+ASdA*!PdEF7oe(cTygd}5nd;B-D@w!fYG2!A}@A77rV z+-+zc?kFf54-dw33>3RYgc`zi`y=7s|o9#J>cWYy!JhDLJ*WfJcT)@qctB$ zid|+vm|Zw4@xEBwk52z#-S4=CsAgfL{>f$OZXQ zNL;nR3TI8c`bVhtMN-iw>Q}T5>b=im>B<`H+G)%0H9PZ`S?xRqKN}+!&vT^eM#BZ> z7lg@WP6eQi&QK&2foY2QB;2`AU*DE!plxR7W1^r__A}}D z7oA_e*X1qJ$qgz``HGRGoUpsy=%TPc!aKVl2c|4*f@TQBG=%u@fXm8`qe3Uk5G4h5 z@0wzq2%rOy6S7Vlv<4(z0GEBMK*Yv|Ymt%H{G4XVJZ`Hi#ne=zDkqEyIzY|-%Tv@m zZ%b@_z#5j#NT8KTHJFagcZwCLp)LMtqy_Hxa5_e=dXzsQ=fShNy}J}szq_Z{zIhov|##4a>h0<4y^LI{U*xh={`ip@Oj2IT!~MrZ@cV zxOr`~;QH+F^D$Rr1pHvg0ZVp7_qS`qgtPKBcIN89E4yr$jM_MoEBXSv$S$uBPF5OW z*;VI4kYi~MSCMl5wtQG?b;aaXsNaE8uDbYl!cX{nHA0IT4!JO`(qZv&mgm#?a8j|6 zWBWUpn^J7L_a#81d+)i+Z%>1Buu97Rw$p;EL6io%Xhho4zTv0Ele+cP0@`>w94!nL zwe&mvRIGQ+$n1RmOCFG!Uqz4?qI02g9?K!^(}X2!L>z+CIx^O+2M6B8w7$DwGxtCl zM0PLn-ky_+#(v^i0cFO*(Ja`U1}V7qa})}*d>7|W)aP>VFDzl6KhfOi;mA87)!EU< z#jZi-mcWQ;IaSHWqSuor+n(6Cm~m}Uc*c7oxR0@gVm6*6{C?no$^`U+WCVJRDUXR! zkrOP3Sb8GI#>c4u{qNYv`bE?8kv$#f*zga?3 z)RkhrS3X-NP4BayKYl{#TDTlB@SSvG$TT9qvx-X>ig`L-H7OSOl{X}LPV`!M{642B zEWTK9;yn(1$RbA9VE;en-Vag~XwFPdvy`dlr1<26m@zE;>N<;hpFyXE@{(xZJuYpV zMS$pw7YUVfB5*ysOFCcau+jUPHF9f=GxHOyTMA3#HN-K;ZWc6U43o2*yh;?%DiS{8 z#d`k!==!B)ITT&1HcySJ$eFL#?%8m`+e>MdXt6Tdv;gA4O3ruMMzN$^TD@I4{!4I; z-Nj!^VHOvlp<+e4$!A%tEI6>tIk?^*vd*gFwL zey#kHE!&RI^+fuJh#aY;Sos&9BP=23swPX=dx4GjB>fyJ8TNl*L+_IhU30ObFeHO_ z$p?@=vZUdLnWoDjx0oFS=nEA?0Hix99<7;x{gcOer$8q~M*pdpGM0Sggg>MUT;uY9 z_qrfqfiO`M`}?;m?ew#O@%RzquDN#jbg$>@rBPmMoiot@5zLV*%@P8IOEtEJo71({ zyJ-|*0VNpdZg%E(PpKG2{AZyz8s^gSxxOFHYR#kCfVo5vmC}L_p|C~Kfrrp%B(Qih z6zf{blkhkCnQ?|5FcvRLnlGt4uqRonR;0 zEYI|&9i?DZ?NEnYZ=^^y3YX(jQ9HNQHy*ONbe-YE#iXm|z0jMike6O9#xtMx=+*aS zgn7i|{bXU+GmAajidOTM`T!10RF{#A?ey709s@~h!+MsBuq>;TrP}B(VHAp3z8pP? zs1=5`MhL!`Oo;Mg$?zOHbL&pk-9>mUfJY(Hg4VPEqkzLC2&9lD$ON?s%*n^>7>8RR z{pH~O(4lkZFk4N#*rJ?_%K0$y%1Vz~LSBSq76FmLHErvV$I#n z>YaVJ(aAmuwgNwuZ@obFS11h=ej+YfgOOeNHra9E+V?~8o-qvF`VcPXheO`|Rn@-m z=DeMJ=3#>~Z#+6z%Fs*=Nizt?d;6N48-c)DZb~D!ppKqZv8)We3$Ru5aQciW+pyA< z+K_fC9pqT~Yr#wj*?6B8>D+eTKVIh;g3SF06B6JG_BNG7MH{ETsAQR*1ZxV$-3{wVMxs2habHEfNdzX?iZ+rUMS5Fg*wJZW(cX z7R(HQ&b;}Ez-Z$h9}Uo&|MmTJQZc(hRlD!qmfp~uGtX{Z;7K!Ij$pbM^=FN#^RhA+@zv_}@;Gye_E$a4D2S>gx#Ilzc-4kLY3VV%jG-0) z<9)Y%RJE6SxVY*(ax_Ld#yj?om+EBWC?$c^LIsPx7oHy4jXH1dy`6>p?m1%=`@)KJ zfn?b$Bz`*`>Qg<^vQTwq!Wkaner$kYJsNBwy|+1B#0a`;YLQcFsYn`Ygw8CZs18Xh zy(p9&LLr4BxJ?Vm$-_rYI!*s#VTKL+HaD1j%{zSD&myY)9nP6MJ!`CL(XQWI8}-@+ zC?jm|=(99m2xaO8`d4t(Hv1e=Bau3 z6V~)18rD#xC$|=UPlH;NEg$LgpaSg2cmo!<@pDiIRffXG@A6RcZ+7*Jn#jxiV(y;OUJ^v*NOY*F@`GI1t! z6YYfysISiF51+WtTmZe&{Lm2C<7^ceQ7v||%*kNR-LieXI{dX;aR7pLk+&UxF`2FL zVjY24k^wA8R;uwQ@NyWoI}~15mKG$9u__t>YiIAPgvT8#<6qqG?z25BmfvN7#WgiA z(8N2xtVDQh04BS+X$oiFkrAtI_I9ZM`&#H!d&r<5d0Joz``PF&1@|I4!dFupg$!2Q z|A(lz42r7(wzY8x5Zqk@gF6Iw_d!E&cMAj!?(P_@DSV~INyHn{q8w` zp(v=S-E{BnwVowMI~A%@8;|r4`%7ed#bd6tnhjIx99m^n@r?`T_5$ZgWGjDq+b}uu z)rIF#{ItQltxulw4d&!pRRRb4jbg5$Lv~vP3WI3;2iW3jQYR3ripSk;lu>00qRP*$ z%HocT zf0?cF{|nS#&s!4Uz(S&nZ+=3v^MJE>oy)Y%#?GwBEJ##^C+#8soH!6Pv;S0aGyKZ; zAwb&^dIzhl-SBYt*W@TM1ca^fzAx44I+r+kDkB7RpU=(?uWZ=qdOcDt1ZZhH-Ooi) zum3Bs?Ud5WS|jJK->W`v{S@b-&jic!&aevams8ctrw+VT`79HFi|~^3B42BZ!`SBA zt=QeYx=#tR{SClB-TY6Y9+v~yl^I6}H6PdvJGLnHVU?%0VH?ZQ*s?o9hpFN_uySXt z9k{LGIvWU;&dZgyZ+}@&17g0(nr88$pWS!PU$WVg@F*BNtZ8vhOYVl(yU*1nu@(I2 z({SuTKOl^WXi{Xgi7(j?X!RnkdV(cau=cA`^8%)doSZ>SBFH-6qr&+ZOg=7Hqt=9s z+j}U8ZO4py`QNdpNn&OK$v53|xki-Lw$$`pNKZ!<@(wi&f*_e!)Xlm=xP^GJBm$yJ zE!mJ)H7>6%9vbJ@Vs?*F9wAK_%U1_35yCMi9n zg=@zxrGR={m1mdT0G5MB{s-f&g!3};8s|cc1U&-0Z&4kNn6;P+=Cv!xK1@CG4s?J&exw0am)L0yj~j(@}gZM5xLxoygADMcl43ai!- zHXzt-9fm901u=E={7Wo>vo}~^YLcD_{OX~SZR<&DJhpQgD|W!&Dic>=`fUX30$2Ea z%TI=GSXWC>rfDE=Oh@y)&gLlYOkml)AIivF!Nv9*#h6CIO)e)BrvJ4W+-iNQH;2Qv ziK88xr@lsWZmW$aWbSlcOeX#ih*Qm}u=uOcRxwD%Nk{^CF5)v=WhAvD*?G!SQEPr? zebIj_Q_`$;mOGs_$E~P~l3h z3HP};@c#>{@iy&229Sz<^D!vU;L3;2e?~$$tti?RUxUkrPO9SxP?&ZAy6yypzqtjKSC>r#t`BhVpWN> zyi`j#9i^pN;J~#&M>2I0DyK~%O0JfIOpx3!k!26LQTKIhq`(0mJ0ntJ+6vTo-#HpG z$N^2*H=9w?OZ4q5hPfn%7-gcLcziP7mlLw^+I}ZAOX`B9<>r1Aqrc2(8-x)DJNB>l z!M*6&jJ1$^ISw4_m0RQaCJ%hPq9GUku%uNV4j0`+bbA3NdA$9-WVm3tjIf}O@8m24 z`lQ4)>{X&$BIQ}g*)|Y#@}&=@K4+hjGj+df=UrHDC5k-IQOM93dFK{>8QVe;w?1h` z0j{`!>AVmg&n{8&rNRy_J&NMmawwhZIx?v(czhOTW1?nSnvf)xxp1znQ~vb8;~o$3 zz^IDaFDY3nzWA=u2@QJ)L!oSvjpC*#_=>Mn4_0RWPzyzkH0=@bvF56Y2BP-}%I%iP ze#!8NylaO;xYJy8?oc|4KBUknfnhb*`JVqhWg%^^v;p3M@2sQvG75(jH3D_!Vi@)( z#=z`lLCG<>?p_5<`Ek0U0OGZH+!F?*WaUqRJU&7x;_TG2*3z#tue;fgBdQ1T9|ta@ zU$l@48m5WIbG<@mp}E|t_S%PL+p79xzrqQLgHQ<>J98zi&ft8u29)hbNRdzO)X0VY zXTtl}+6w~}RRneseOgI?hJuHeB_}}w_XnOMw25ysP}!D`atyEGfo7J-;`&s@{`#d1 zc(nMyz0x`5@SGX!CD-pV&G_zp~t_|X#cW1?lTjM^ThHdpji?%_P^X&IR38@ z1>9eZR2%$PIY#{nIv&iQAQDaL!rDEpyK=_z=;kMaeE^=rZQ8O1V+PZobbiaRQgY68^_;B%#FbQ4p}PG zvnf~%n7=OcBtFq@%M))=sFo=kM|2hCP=CDD`WqLc~__C3joG0dC&E=i+d%93p9a+AGV0_z68XfKZcNfdU~21aMO3Nm0S(e z_56U|(I&88rYZi>yo8O?0_8N!!g8!r9_p|xx6a6>5cUxPdO`_Ke9BI9w|-SkP$Gzx zRhkdN#gtJ?=T?rct}Ops&=TAwiSbLYheA}+*KV{X@uQ0L?s2+>#lg6`q!d#a!B%*u z9{(>IxmdiL@hlZu!n48>Q`UCm-}q12R;#G(mXjtyPYtL+Hcas^$rUA42p^Ts`<2L= zmiJ+dLes!&&6*_P2T7%o{N+hla`jmoMl)yO?#&)9otj(k;8>CN4QKih1|;7xK@C$6 zvo1@61|n66Qp}pYmAV-`hhhgBu(X3@4K(F%KH6$m0(!F)NkeJnP>syJc{2|trZ!3R zv3H}d~pRpk1?w zuZHo<*eZBxF0`6I5?sucQ-z5mG$MnXZK7VQ|9Cr|@Hgbf+VY4*DZ?B5;gimOuW@2w zZCb?eJl5SzOL3?&hQ8n(`DeDCT%+BhP|#P;l>8~;hw2I*n+lKQrUs|3E+axBq#*f1 zyT4$vq+Gj)6b+F_+$f8|DA%<(wKo+ z?q!BH(}$>ke%HE^eTi?w$qA98x#z)?_LDr~&zq-Sc?eEUd8roK)It^FoU zERFT;4_6D7qiT7=K4d@VV=`* zM4FRBeOyb;i-aVKl^ANRsqm{UUVC|Bk^^ zzboEru{dS_9@Qv4}G2xKFWA_f7k9^y$d&7W1GzoFllI{p7)u( zfPso)?n*kIrAvmc1f2~pNcdZNim73*ys27<1^P`s6G8|#6eyXKidD-dvm4U$P z5v2ok-TG*4(h9Zt;jW% zh~Rn-;~)FJ7YCQW{#H6K^1p-jK@)%KB7!-@j5kr-%A0TBGeS>>ze-r(%A`R1R$u@G68QQ@HLk_1(4k{ac87qoA zh04ouOsS6UWGWHw7VTa0U1y6p*v)jgPKPS}OXQIk33<Ge``n z>u8@2y)3O+fb;_Jp-B;h?FyaQ-%auS`ydWeS44oa!n^P&V^><(u>sZ2RP2BizJQrZCo3Zo!`?dq-qto-DmO{l#o|?f2@3n7m<&SHtLf zu5v%?2QzSGUF&Wh6%)|I)-isL&AjSvaqnkp{ELZw;*~Kf3yl8~xggkgp>UL{a+){? zzwCZ$|IY1nGhNEVQblEKYd5K#zJg99RBw^zN43y7=;=iWkXwGeM=h!V3)`Otj{f1RlR=4~ZE>bl1 zu+|`%??1S|26#h+z3)!?2Me-%u5R=%GJP(#fE6CZ3|0Gqt$}INdpR#ct7psm+u@vL z)#coPS)ZnolEztcgV`Gkdo2qa>u@VvV?%(BP7MnS%k)%kepc2;*Q=6Sqmya)A6tWi z9iR3z#S#^PEM6q$=-=vzf)+O`%Vd!cX?y~KpPtsgjgMTdosa*i4*Is$K&;?LrI8X6 z?VB=L4WC<3uW!X9vxn!BT9#X=qLt)>l#_Joj$?A%`g5#2vhsCPk?*GQJKH$+MA7B2S59R_LTNI_?XUd}t*$?2Mx%b8 zn=S)}K16VDW}$iKF@nAFv``A4y*3I zRnFmlJ^zf-)W8oLvM}1BW?`bfYC+eld?3sqkxLP|Xv5 zKCZpUEK&#l2#IsNLaHP!zfg$>Cw4`Rh~?|b+FnrHR4>|~B_%>yFf0B~9reza`;@rt z*3Hu}@w3V@UQ`o19|m+N3UmiATXX)Mf)NVq#HU1>05@bNwH>q+H!ekWPoKdPcjw01 z^;0JG7!eAAf8-JuXB=k8I~Y7i-XBWD`83ecD;}&q7&Zd?BIp-MJwJAj)|LmLtFA8HMQuV2G#!2*?0k?4YyxT)yM(PMdwV`6I zi<1;Z3FyF$Q%__?(a)ViI`%_JuRDz-U)8k5u>HzN64piJ1-Z~f)s*U0!x{=%_O^pL|gbN`mla*XIfRj75p;Z#W z%5g@=ylMIFvt*S8_19|;rvuL3Z5lQexaxuQ0U5+EiN1O(Z+nt}i5*;4q8xoyw+&M)&UUzw`ES-gg9d z}%-k4oYuW z{RbrGZHw8D*0)fs5cCq}RJJ$nRsYmrI?Wc{fvNe9?V zkpu@qpS72wUu`Shn3`y+X#<;O zYWYf>WbXdzG4X1JLI4O9o-Yz|cTK640j6KY{r?tNr$0~T;}Z~nU}8r)t7S|A(=QDq z{rE$ZSN(i(IBp^H`%j)ZtA3OjQ-J&dxa>+e_WZJj%Mr|(-~Z(RY_YcjdJx)D@b{Tt zW+=t{Uws@!;KBA1sQ6V-c?h0z{~MXsk>gDXT;``u6p{*{PxTod0af+icCV8X58MI= zyce~ImW^5`v|s;q)IR0p)@=Z_DIvm_4-XH+l)wcH>^=g^bD*po>oUxBcH#_Lod7qn zJK#_!>4ld<#Pnx z4HJ;nOU~`6{rLPuvkxt|OtG4~Y+?BzTI7&3x|`>V|20FR1QXBvy<(18Ca;s{*G#kv zrBCI4Va5Y(&7hGFpT|y;jRI;2{ikj5@gr(W+?7XZeP|Y?YRH-iZv5wBhtugY@HI`b z!~}_1M+*Z7oG>pn`FY_-OA9Ea&bLd~YR-$WbyEL^rL``I6TwB{S!iSuvD`*7?4_%B zy4qBnAgZ;|F@BzCoFNMKfSl!xe11PRWb5^cQV81#`J=s1CPjs+UMId7%1)<7<;pZv zsyl|Wt3C`qIZ{qqAka5S`ar`gV>3$iNgIL0hj6EL-JSccr3?Y&VIKu1kUR{3y0BR< zofUbN);*C&8$88YqRrc{;7XpMZ&jN4Ud$G_jRE;ykp%VO9cHP~NV>5gqm^PLDQrB% zJQN@(2WT3sQatamXF0R?U*%CttzXfHfe(l6H;9Ia;jh+(a2)4x31pwtN^QaEfm4xNN<{@oFTfYHcr+jGqa47jcY^J=Hy1^g?& zRPg`0Sx|*E4{vqL^NyTqomBiCMbEA`NBjEE4zl813|HJ%%PUj0K)zp|rb3YmFYLBj zD(Xt~zhmF8S8R^kQoHN+OI0MO+t@sea{Ex2g5EE!D!LUv?Hmv?5QVTxpbVS&O!mGb z#Hs?g);{E01B-JLrkQ=*98fTbee&xm@Lc~Vi=7(q!-Rzzb?cLsTva=F85smL_SA2i z9Q}^KM1=-Fc>ATA*xB2wSFn4j$?O7eQ^3{M2#}}WthhfRKK)5!)&(}+u+S~WFyWq+ z_PT+3I%8?u3@HrbFBzZWE6M=duwk#Kh_KUom-nBe1**IbpVR#*10Y+h`ORT>pmfGq z!2Pc3*62X(YsM-i?jsF6I+2TURqbefq{Wu6UUmpwx$nrj5>_;m5_6cFQQ&g8a1)T zr9bqp;x&9d9nOs9i(5yYda&y>qja8CV*1=L@=}UUF-j7<}* zki(T=DlZNVxpc~5EerO0)fxsAoC2&8X|IWRsurD8FPSakytNi8!N&6@%vG*CwkurD z0xSzjbfoRX7u)kyWJl(aAyQ(o(6$h2Oa%<*gAngI#L8n;{bdW@Y}tD$Z%w|)?+io9 z%Ps@TBXZ>Yx2)1arP%3a?|G`w5xnr+7!AiT{#9%;4prq*TYR{%iL6A|>7iXTnw**~ z7ush6K{DRYkdnCD6Jo$lyDEyEs6DH5?-TofDCEiW+i!{vdcYu@V|@I1kjGO1+8HdY zqo++2pytzL2gO}#g9~X0G@*s1`x?|TE3c3U6!K$qUY;<+1SpK$*SXnf!e5bPc}?y& znuS=*<#xVsp&6e?I1yKKK-ax+;vCEC{(3BfJ(Ge?vh&6*%&f_2GKlmd8-a?eGH| zE2>~pO-oT)Pzo772PEP}61DVbBcmQP?P3VaGSi*hJ*rmdd%JVx{tq&mZGm>+@K@MY zuxAnPW0m7t^|bf;#0B1&V$tgFGTJFl1#g`hk-R9c$$45MZGOl*o0e|ng-8F>Z zz_+DxN)G;}pbIt!@b2YJwQkCQRiTMf46lFX5_B3Kg5TP$uX8{8{%2G4Iy8F+O;1mU z&#VBvA3*cs4lJKy4K8n9DqP+$*gLq~jxJADbad!JObA}VW4Zy*>UD(1fXp1gV*d91 z2f(6Rns6K@*=I7M%VSk!c(j?I!A49C<%tc1ob$Ip>8_(E05*`%ot`3G6+lPM+nA92u_tuCf`ucZK^iA3vTH0-n z$%NMe9{!9T{EAO@e4>Rm{w))as06cMR=V@DvKP2f)3_8$5+v&mu31&E+eKfLV`W9# zRpLom3Nh4nJRD;Q%)Sx)?0cj;i|sT)8cq&wi){@!WxXKlvYg;xz&I08R3*wgm@>l> zHuz?ILuUR?c(uZYp~);x($AVdeGPm_B86XtL{dhQ7b3uk$7*JkU(E_2`|^Tfsh=>T zqFXQujEFnNXt*E*pJ(FRa$$x!Qj#W73-EPJRAzAZT8`IE&=Ez)=s{vzej~~w&XzDK zRhqO;Lt6rh;8W=Hd}JpJ2F;fJH3dyLMu{qpWi}*1>2%{EvU(?;XCXuS(Gv~DI%_f|jtY5pQGL$J znuD_83SaPGH6jMT)dW{nQF6I7(WdcfvwJlhN|f>9te6Z|kKl>;r$cd%-~?sI>6?@y z*f^3ko3W|2WGYIu`G%{12ufoU_ha{@@IXO_R{7p@_KTQ;2yt2l0y{WdXDl}3NnR%X zsNfi(v$F%oCFQ%}L@YTOrVI{d)N+DCYn}x;Ua)&_tfJ+2#WY>w{T)K4puYm~?LLYL zb8Rc8gsg2U#oq&(2B4{8=3!!{RR7zkW?xY=Nfe>7t+vG3z!n@e8p>p2m-wG{Xlg&F zVtyY!do^u-U#a1ti*K`4GY9jXf8u&-Q8{epqc;q+XwB1>oA*Mj6=`esz+Q|?TZeZJ|z_bZHC|(Q} zwR@kC*wgw5oOSuB)6N$vb)6+8jphGzetlcLJuYn9*qIv`*nucPY{qkEWb2>cMUfaJsaMdjWC*GuDxoTt$fEkE7Q(fDidICEL zke$AkcmIe*i+R0@c|k^j;k&i0TD5xnhO4FURMe~Gl7Y%p?yShqR0r~fo0f`jug@A+ zJWN{!5p2cicKJ`rbZxrle7MXxx-8C2%Z9cFYO+vUJQO^6Z*?PulZSn=sybFF| zyio|%>V3XKOL?_fn|2F&nS<@bFPztFQHvXUxzT8!*+?9!l+?T)S-*u~6{8C~>!Q~Z z#aa*^b$H0zHl@i?3maJ1k=(%dMt6$DB~ZmQB*1LyhXml!qOB8K56!x}yM563giH|y zxCc-Zw+~nyHp1A4eD$4sXusm@o8TE^yHrZx79;sORR$#mpSG}u)YPR7{Y>1A>ojoQ z=D$&Z_d=n=(I6Psh}>DZ!^ zaQLxp?xkIV%2uN$R~3RbCj3V~gm(GPPx*%9>XxWg)3#ue0j;%Pq>g_j1$%6o*(~qF zPnz7j7)4L&U3$Yn(QScVmj>4&zF)qaVRQ$)kjIc@W{PJ6+kX84HW3zPSXzA+KQnnYp={3 zmreZ}2Dp7C*8s+qCMz0b9zc^*dn2Zs0~F>HuE`Nu-#p-5L<68q>92pUf%Fi_+ebWb z*4snKsG3oiPxqy#z56kF#Z@;jF5W(>{8SFJ=$SVMx)YH5C=S^%tKI1G?ryPqtLgE2 z@ViA^hXCFXisMU>uCMTkTM&G`{X{aL>h(9a+C!uW z%Z{3rJ3>Bw2HcH#Iayg*xkCQ?lS#C4nZlO4(S^-_COBi@=meu=o^HCSM~^1hzYeFC z%_-Z7Lq2c|l`C^(;eUE)N(wsr zHB_T$KYN~qnlCKPE@zok|3xfLOEj6OkhPYPp_Cz#;e#-SxCHhlC%qqe{R}IORYfp_ zL7ebSB^C{Z$K?-Z349BT-_i}8#Qr)6ELnw0Q+T)E0;Ul4yI-z12Mlr|Uk(yap<*Me z@zO~!K9jfbJj_gH9Qz>!YlVxA68%(W+H1*15ur)-^VD7P*FQ+|5%3}v9{kw?K&{fX*&o?_ff z+Vp-@#xHXcx@OS()ZQ@GBSnwu0W=cHFS^pmS2MrckOt@7TD==+qoEfxYA!ON5t&H4 zPM?Mo-9OuXSyT5iS|y%%KVIX3d?8~tbIKg=&#i@UpA4|@NtZn*cC{77sOSJ)A?TSfx`saLD!{-q=hL1nFXY^ zX|=|uq|j8(ntqN~@pZ7_e}zpRCs=cmu5gHckqs{v(|8#^W$Ugm=vUkJpdVCO%0BuC z*|ns{r}Y1z4RcXKJX{Y9;e18hEO%LZm#)<}ZYfk@)|3$D@%Yuj?=$!ly9%By3$zui zeOJX{ZF``Sxx-KL{fp^)(%1L;-GiEKwOY5V8}Cgqe3hDl$+9K)3Jy$32|JIPl$4&9 zRQa(=Eq{^v$9qqA@Ba$J`Jc1#U&jOd#gdV%8~6$g7*MsxWUzUe_E1Thnf3rtBZDS@#$xPf zLKhWk!wq!5uSUt335?lH-1kPch_vNp37;AR@~dn9tF|j`EJYCjZn0fF3e1GNIxEa;l7?SuG27SSbk(fOKmT-Q)IW4x;4l?#|t~ zxL*|m*py!%tW#&qaf|_*Gu7z(A`mII@51A6pZmRX@ZXvIUOe5ClNI;HwYw;B2bu*} zzFSsQ=2fvxS)$u1{>|`OI3Rqe$BX=|(K6L#MRFC+~|dD>mBB( zTR2^XwlUTTbRD6y)HtK7J001I?_^L>h>83;Hi%P3?%_uE`BLky8*(o$wg-`mtTP4} znLgBWxX}eQCeB7tE)=8YnX8(tYX~OZ-Y%Pyv!lo-d@x){iWUsp_M?WQ_ya?$DG{q2 zu0dBe(Y9vFDW|M3TxRda0i?)B-D-pt4LF)UYO-OW zfm8af;VzQ~LZLrMQ8n}m)#L@DDo!5C%H&SeN=D7%lNy`N79{&1oR=&O+&g8R-Xw2l1x>hm|l+myvi0=(&1=81>Ex&m8*+!4cj7DN9OE9yGe9`2E zOw)G8lS|fIWo1%}4;4iK=Yl;L zWO4mc0uYyMxbY34SF3&!JV2`4-Wa&_^?hdaieLYmpQ$TsEFj4MfabHif7y*{oO@XN zwMsN=H>$ez*TmaJ#v$^MEl!zP;4;f@T;1apHQM;M@~#eOBBGt{|2C@ET5Exw-~UYl znSfO`>~Xo=dH4a{58i!%L{<#+%KtIYLpQN|XTmi9r_<+_iCE|lL|1kkc()m;7!p6 z*TMzH8ao9dvF3P&gc*eR_`2q@MxOMQe}4%}lU)xLvtZBn<@_f*8MZxRD-GSIxK`mw z-XZ(3BPyfKO4#Btr`7K{KVOK9qFec!cb}MZy(qn8h7onQypXzO?OtFQCsn~Br#Syl zHZ2*2`!;clJ>7WLy<_YZ5h!4PTTB7&TQ~hHw-j9=W&i&Cwl(S@(8h3e4|P$N1Lr5I9P*zh zawXA%(&naXYw%kl*PW&PR$ZSRA`@QZkIbRn(tL=BQ~_v)rN__u4{GxpkR^-d=qZHk>+&Y(3SF0x43;lI(NrXr}89N)X-6ViPqwaiA2S0sg(A6~ll zA<5Cc{MNQo$w{MTR?M}I<$Xh@p=-esLqU)E@znn#R9{==fNS=Dg6C;wO~c{gB~#{f zsZA_5O)dwde}L+b7kDX4bP#RMdaRiwL3{n{3v3R7QX^}8_(pM`{|1)>q|MQr0M15W zz1RR+Rh}xJ($dUiM+E;PQ~p!#=e&4g8o-nmUG4|@Tyc{bT~tn38{Db&;B~pPa&(kZ z3ahdbfJq@5Obo;^4(!n2frC^G89l&+#Z|{<7B;|IzQ5ex+tQmp60jI&)FOQM6v-|y zZj2DAXAiPn+}W91Uw`;z?a>>G5`{I8lE1+k3VH3vl*0p)`0iz}cBh!0X~Z3Ku}l zeE;ZvH#C+a7f%)yuZ-*{Y(jUd-IT@T0ltiS&sKFB1npt2yh2p6%R&7`&z&Wy(4G0n za~2&Qq*%d_GWB}AjjyY`&7|?WD`{wHK~j>SPU(ZBw?FgZ&OAz7r=tLPj4FFTO+06o zh>kxj;cM5c;i!87SDajUMW$Rq^){PAY}$QE63GA{p^rIDSLfA)b3mMzUR?V!T7(*N zADopSKV^QSF^q}s7BsQJ?M)&6VhOe4Fg@PNEDH9TfQzHbi>zFe46V}}z< zRiM2V4-R@KY7z(NrE9rt8K!=ZTUXb?B>U~*-F!K z?xhQ4+I&)%BJ&6Yxu6u?C`G}}j_NUK&VdTAO%JlNf9za0UG6S~$%U$%V)YD>n`(s` z2qBCg=I28^&{wi(K}$O`mW?EGe8~Zm8{rJr_?mwt0_2}8B9>hfN@(iC@t#O=W3xO? ztTEJX+`{&Pd@F1GWP`Xe2aRo4d5@sS^}aNU$+k8^B4 z(I=!66Yg-v3CXZ8k}iizUj3_?w(KdFD&a6mNR3OFJTd6;RK>O@atJ_QR>KbT0vCkW~aELNcJy!>2 z;YCc0gJV(xc*6g;huOcWE$vGMzvh=s@$>30DBC*rI5s@=C;-N)^fBNL4oq4s4B)Vr z2Y1f@nUG-RrF=)SJP$ww`z@JJN`e)~jr8^OnjmaOU3j2H%cqOU$ykp8fO-a8kUcIg zOpldK%C0V@9!hw`FgHXk6-0e6e3b9XgE&wH7ex=kAYnQs{7o~Sf< zuLt=m{PNV72hs`bCOlZGYXmAhyR%A|mV41HuP#V~CLVNQDaC=7RV%HwU0MDC3?x3g zO4(=OJWLykvHqf8DT;E!jU+R{X-AyXnwll#8;P;PM+#nT`9WzdiDpKTh&G*24O$(M=fI*iHV>0_dzZ6sJ? z%yBO(V+;8@-;!Yw!fw_K;1l^SdRtR6A>vk4^mN`SHc z{oq57ONrz5mX7VjN3b;x(mUFi@{eXNhQD07%dkA@b}&7SaPWS4_au{J#qyxI&G zOnG_aD=dd+3kU6X!X<4Y_$`wo#7p`nEK|@i@Q8XB93CS^s>vq7Flm$RR8Fc#ui+pA zDYM@mYd3dWlPrZz_~?VRrOj+=ILIt&(Hh#eYHrKb!1goULJ#pt#x7JQGMewhNv(1k(R|xAISJ`Hlaxg-|9yG)Ik{w-p&oAqnW3)MvGjppVf|DAI~w zpC(XXTsgG}1XWWRme<;VNJE;>xK4a?#0mg5l}@KR*tJci67CnjJxl>XA7hPwsh!VX zBBrXpI(_T0N@%`~YsFT!bg;8O{%uvB`6+<>_!5ZP0lHQrW2(>9$;zNy!ujt2m*czK z9N-$<siq-kutXv zlXpM1IIN)RG)XIJ(cqUUb0TY$lzmS*b>I941P-5`NfK6eayCu-|9iZz4l^<*8KC-d zj?q_BZb<4}Dni*W{n?C4i?YBXHZu@62tE~_J5jy1XXxt@B58ElBXFo{TN zk}_^o+sX!2j7p;V3$3(i;9K}+b9?Zev@qFOlwpKM(Ge1p`4p-IjNoC~GmY4Xs3Ig9 zY^aHrvD;obt~BjQ9PSals4u-jTi|3Yf{Z0Tjp{S6I&rVflMFRcCU-MMTpV(O_qa8H9JJ?~EyTBf-rH_iU? zu>j{LM?Ryb5?&)?PWQ7@f&y_|aUn9!5Pza^Qd@pZi0G(Cjx*;e$M}e0Y9$&>P1xkv#iAuboR%gCyo(p%VR7K^^^w> zT0-sK-4tWnj&nm*&!n$En%EUhPw^LWfq6MRrjL~u`sN|jeZalzr&upOkU?%`XMVkX zw_94f+4FY4c1|h!a(DNF%mv->dTWLTX~{l=&&JzjF2yeE0I>7nAVyuATE^rdz1^NR`j z&OnZ?@tBa6y?L3`vfWChh{jj82Zp(=r-9@vUCi5e&PS1@O60OS(y7LiXP$dmz<0c- zYA!Ebx!+(TR2KAbje-KuCH%(o+%$Z9mR6pGgnBov&3D%_Ic4Uw;H2o2d|ua3GFNFU zehZap31sM2!oRHRdr;xr=8Vv-Cpb@wn}7Fgonb|JPwz8Y5De2#gxh^!^y6G=yg#p? zz2sM{^N&Xo<)OgdwRoglJ1ylXw$PS9C;i*I2sjT{Wih(LC#I5*gK9?{LiGhf&oG9= z2n-$%oREcI8d`E+$JPFT7D^~HS$#v`SYN*pe;M{o=1&~;!yc-!MU}~)w;dB=Fe}5&B$0& z7>a@Ad$XSvAK8j7Uiin zirvndkP=(e;Itr@GFpil?LYvnkk`Nl%WKtMt&z9bRsN^<{tLUx zE4Z3Ta9V#uwv;GMrzk~7B6f|y<^ujrVhUKB!iP82{82jg+OY$)2(1pGG zW#3O=eSVOUkB#|)sds!*+1nTJKlK#Q@q8#W>*OpKH#3FgV5e(x)SHxZURi5qV&~=5 zBanSQ3dG7&%3LEl9M#EQztGJ3i3;VzLp_TgRB5x-%S1pq8< zxB?56e)B`l{A6snskiC1RaZV$U41$V?Czg#o+v5BUS98BB9=tOG5hc&A4L5gr&=~1 z==|Sq173RrUY6cmg}SjGb6TDAd%Zw?^Vfh-QPk(z!uM%*Fk;OBlX7EoS+6so_k+sR zN2JtI=$T$~O{dA=Cub%U<&Q+;7&(m<)9h4Lm_?d*3&6SiGf7X@ag721JZ$s6K3cE` zgMR@ztAYU=QR(@)!q(y3F%%-6v0dfHexf~69*mHQM4LN)cr{g3qc)fA?b;BSTc$l~ z-xJWJKRlF^q$2Gm^6)ssJ1DA`Oa7XGq(UT4Fu5Z46G-FJao_Q+6Vpk`_p2X7sXBF> z3zXc(L8g>`F`iE+tL|aM(0@<;RqW!Vb{rQ+9y3HN@-YEnHEqLZt69#)ve^+o#A975 zqneT@X@rgn5=~5HNX@q=w1U9bh{qS{lY~HHQ}k`br)YF3qm4DJ>;AqD_x~g69i!`N zoVd~8#A%$yw%ORWPMV~#jmEZZ+iuXLv7I!w)mV+4-u=Ayz5lz;m%aAKv)1gH`Dvo5 zVdaHs(N_}&oE-FQ%_~EMAs%zyLkpFZ6O_m!zH5k?o%PmIvt>H zQXuWC1eOrbTPQlS>_3+*jft&jQQ0A(GJuLs5TC1PoL1MQa(TKk%G2MHk4`NYvS`u< z!-#%ygK%gj7wD3au>}?Q+1Oaz(;O2>FLj1g!@okL)WfrWc4eHAj?6zMRF28%k+#;s z!lH*kqn2jFYxznzKSBb2I$fDQexxAF(<8ep(Yd`I`<#jg|1B(H0u)vSf&+8b;H)U> zR>ER<dozPoRGsJ8S%_0vSW=nVxH{Or8Bi)-mq7p`{HN2BZK2cm$=5#@Zbe}pcT z;ixSn_QH(-6USr-mY-mNKkjgLe^|O$=XTf%+Dh@YU%~*AvjgzI2w#;>rTg4%+mb3y zY7-FZjaQef(>(yRS)0>A)j*j~8vt_xuqFDubSWLjJsFLVvO1!Fd`x`2LA#5Uwbx63 zD3bZN*Ya;4tarad$?uCtD!Z#8M@g_!Z*<$Tm_zGEkDiCAVvoaUox_Lb`-rqzE4u zJ7}bPdJ+=~!C9fVd*tT?5fE%dDWV!>{KU0u=d|AR>%@*f@tu$q)vVFBhY2*p{nM;p z;}a*GYSj1z*&v)fE~0TqKy5>pX<2MkQKBBA$SRJ$aw|qDR$izf8>w~|n)V`67Hcq? zdcTLlyIwaId2A4@%kO5&4~NU}Dw4stV$^D(W+9wAeQiv>C$rxo#pMDRmNI5&2_qLy zJ~7~v30AY3Y!Lw!G;t=8E8If2HB$)pF9gd+>A!icI2|%~T_p=3s3<;fANHz3@l-&1 zlbH}5sw%@vp8lYY;Iv64d3!F9wt&|zwM6bQKDzlft-2PQSZc&VqKA%84^0qGg_o}_ zUKAwBIGm@RjYGKfMy?TYiny18g`!Ech|rpt!9YR`3Z*AQp~51v(=?%}GP)hp30=|o zQmm0(Jdws|*yhvv-PqXDaqm{DCjM6!MiK^zbCmCi@U_fhxz-01Z_>4&^ghT_K>uIm zdq0k<@3#xtN>D=iS5G38!$4N~WV27{illcX&+U08ZPY)$!ta%ofIn!#h{j{YyYO^W zF-bZw`sORflC@5W-> zhH}xf`oE3RMx@ARjit-wmm^dzZlFH=pT`r6{r>F_ly8%A+`mkAv|I`E7>=8$Fyn29 zqq^R7yI&Q?*b~(0chvX*Jb>@pA36^(K+SG#cvyW9gs=w?pIqi%jN9{s5gd-Id%qJd>miw zhQLE*wI|Fhg?LE4Sd1|$LhuTZsZPBMEIk>qEN!%-^5zz2kZ0&;#Aht=Obfj!XKQHl z7MpgPmw4dUnRhM}iNI6180fe8eOLp3ymb8RD0gdtwRBOxs6-+BnMX4;`xo**onhZ& zt1e@rjOh))$>}TT=!!6VqW!~`)KY=Z!Lq~omM0ns%YFHIvi*G_^VDd3&|F{egWxiw zX9%A8&1pdNFli|MKg~Cf&jV0Ge$s08<9vv!Y)N@P$}|eEo3tZP0=Sc=XIm2pchI;r2*I69M{1KZz)95mAH<3~J$_7uRLL`R6wGHlhmuBZ z%SJxSzlyMAR#-1)j3su)LsC><2tJA7#BZ=(ZcrE>QWW`?Kr5*B`TaI73eSUJIo*wm zlwoICNtfvb0p2Hl#Ow-;-YSwLgt#c$cH($%DrQgYk{!0+UXY34jG+zBl$1&P4PnDT}lnSbVgqJSY1S})Bxl)=@+K>O5@P){qWXB8^9eUu0HEK zH6N?v;Ts{IMv{sz6l`=#qS(#fX})LTJCtW2k4R-kX5z5%%hcth5A(SgzcJNSxk)$b znbIoKlok0Z^~q3Z1XCSPp!HV<*IrAR#aOt3{3mD}pr&GE*im$5e3aJnuXV(4!~>=* z`@ik@e`fPfy)FH%reJJDf?lNBz4k{wTx^@rgzrS< z^@zMb7C$GAxCAMBwpfP);TtpR@I6sZw_hY~eQ9zkX|q_;M7ARjofmSY3{SNp4x?qk zifzws0hOeIN`}_fIGL5}?iM!hw?nyuK86Z{9IR_&_BIH=wHB@VZvQWdi{=**d6p``yLnb~Qh0 zS?X#S8JQ+0S$=P2-*#5=12dr`6c{C|{miJsn~Z9^Q~2U=+{8%=t zCvG2H4kCzat_$r<8paAH8*+1n?uj?=6JEp}W-BvS=;Y3WyTd2}55D}wP5K#qTw#GP zJp$+q4$pf0YvNa!6;|HF3iuZy#Y-3>CrP4OCN7o9_+T#n-WHbNcK!}zm^Zdo?+WAu zh6CgoWy+)Q6tZ_;T|Ev-lbKW(Wgg-eGKp(>k~3-WeAO5#lqpL^IT&$Ku4_l1v{n^5 zYDHZ+0%WG3Dih|#Vxn-ruayDRHZw<+xD$@6U#&(e>fZhUk}`kwLq+=h^PEi(6>fwO zI=^F%x@J)t7XK;eph$|b$hK&Pa+%TCG;+)4l6w9;q`XOvb}-1pxLETCQDJZ57Te?X z{g;B9dIF1tEkVdnNzpFs$JA_$-c`t^Ng%)7Ycqwxah8m82Z2_!gm4F*d}m{dkguFZ z;9T6-afWXmTBtl+bln9irIS4VqFh27-3*eVR8i-sXelxG!p~_FO1Jz z_kxQkulieHP?bHmjEj_tq$J^;`TgH}v zU0AeaT{hEGydZk;}9uSCpLf5$2M-C0dC*tZtxV z;Rvl6-j#ej;S@b@0V&omlj|)Qb6g~vE1!aV8 zEX)BzFZCayZ;&y?J#^gKl~_d)?UEqa5eed)9fUyk!Gnubb(fGZw0Y^C8k##UPPix? zVz&2HSOgQwll0iAAU?*h>I(#nNA<{m?4yJi2yzCv<{|c2kULJ=QE4|?34hd%Wc-y$ z(Aj>>YQ>adKxGH{mA;|n*B$Ypz>!OAPh3$(AP$=j4tXA;2iKbeO`HMk|>I@7+y~_+%jx{j9j%oj(Sy4CPt|YqQO)>;a z!m7KOKsNjcF}lIl(ERy_H?WL00`-qM4eJt#yE~S%+5q$2e;(@P6>7` z8uYPwB&l(*wYRkw^nA$a#d5mk66m2dTa?{2m1g9YCyk!K2^HCQ0zNO$# z`n|NK8j4cVvy!A|`(z0}&uL{r*uB2;YAg>CVZR~@ISt8@qt`}VIBF1A##1NtTte#B zvEmZJdc9<1hoQSHZt$vRwcbG{XXM?eae>Xi#4)b3yQG>pL@P#6wCS_MM+UD8XYXQQ z(4!?h!a|EK%y$o*At|kOLH&P-OX9TwFc;|PR$OF(6!5_iRmRGN%fF|H8H6AvOGOnd zPKSI5x+`>|Y2iYmSwk?NP+w4TxSNp57oeWV%+aQxB6K2#2qMlGMP$rc;R|RwP{==8>kwf;>bQzj{-sXvt4%~Zc(5YQub zox%5QAs^N{Rz65TuUk!K45vu)(0f&?OSmgT{vZ-zr;F-{3u`44C>+lyN$F*mg#BW9 z8;z@VJV?GSpvP@l@kdoVEP&`D^p8ZZ$~)RwiKVhIB?`dXj*52U?$CAx(&8iQP0Y*!^>I|%wkE(l*5|ofeS*HE$}v^CsPDQ zJ)(8UGI9i$c*R_$;%DF?HFFKJ3;->T^S6;-j+~L?k>nZV8Jd4DybK2eXo9qIUbpYR zT>y7Ln)SI7@@evi${;rx7lJ?Ve!cAS70LDbxH^(=pKL zx!S3GeSEhVxH8bw*AGN{>EFY6Qgy%Lb4tNX&TmJq&h>lBRfWYVR|ZOV%DJIv7yN8gDJzCk-T?-B~u8qS7JdLD!O)+`JO;IQoa6l_)lh4 zq)j3;d#Rstjc+nxm<8CHajhj|betQ`iTNlgfn{=BL?T z96Rr!hZ>f#UNqrB>K=#j57eJM8M(jNheE|OU}V!oMEb8^+Ry z=;g7Vj?Xt=G7JCnB)0^V9uL4mVN-y&rAz2g6(T`iM3Zo)a>dV--1$->m?(2?>O`z$@sL{l*HY1SeOg3i$X#13AM&+qhn{AdyWkeo}I=l%D$ zL8?^31hFC|{@(lcX7LQrB<|gww+)p2BDSw{u&t@xHqbFJ(9?nAYW@``h?3pdGr>>| zgwZ@)qkAI#)L+>^Qke8Yv!3Fp^uZS*Idgy9>Iw}VTKvMlsJ8?I&CIx_$+28#;EEo- z{6n{mOVIauE(Odke1&nD2w49^98Y2ohU{# z*~o7}!RMbsGyy~abvJ@zp4+ecr#^gI9(dZ{4TS=fVm{+Y3Z7kbER`Xx!cRRW4d=XH zsgJ*m2tYpe)f2};KfbU9$`!wHswWuGsajCREl`w{1?^IhVUp14Lz9`^?-_VB8-LBg zj(dVIzU&=drQi*gYQ$xOg`ft}7a`v11eOQBROHE1L`=?zsU*#0Gq=xMz&4>sS(1^` zH72c?xgqh-Nt%5;QGh()0yjZUDaML|V^;9+C{7H;4Le`w3f&UXly%{v=%>uR>mLA= zIfO*mZ-X9r1q~inifL-ngzTg+r9VQ2J3NE(x|-fpR{XKyY*D_JotE8k5~GIH;H|AU zet7&1QSF52gn&9e1{7%wjbM)kPld&`x6jNw_mp!ogs&L6Jsw6$5ZVjlA``vx=-{L8 zmL0(?5eth!8T}S7K#CS>^X_B04Vh`%3MmDHyT8>URQp92m!x}+QVm4J_Y`9XEnCy7# zZA;S`2UZy;Ey~C&shHE6;Xwz-!Ya3$r_1)iQVT1m;BlpHH%0KO>mf`XD7K;8?&#~n z7J*ix!Hsc)Ika2VF~R=wklk|6g=7s73~&AiwEtUxG*kAj$OE@R{%a_{cn62k#m^s% z+y>5^2C)icS*S5|sv_~l&q`sILY4*jTZx%fvfwXViy~QBPRK3&Ydus7R68%Gb zQ@nKucbMQ_KKxC@zt7<725hm{sA*MlyQrC-`eauav0liu()FT4>ifmML zFP}6pYCm0nhplVy!E03P`)cIt(zcWRK>F9;gAz&sjU?RDr}xOZDLYPPK?_f8T?I1? zQA{KE-S~b4yCCJpY!r7WYsbwNsVEbRzVMv)Sr4L-RM8w;JcY!N8|^P{m!&3bni(7f z+|OvVwf-)MN-_wrXjPudLW;1)P!3h-PcL$~g^7Nx1-&YE<5cD=3N~k1xOn=1!O&cD zSZ|X4Rqz`zeqcNVwbKeNK*XZ%Y$#n{GIYAnvvzZ=(kCFqSigy)ZMQH`bc2-y z*NinG2gcweY+j^h=-_3BTms#&4D6_sL8CAwWj&flIR@7nv%LqD@M&uDtmbuXmc7!P&PO9zF$ z?Lb8;?47v<)Jh-`y0Nq?jliI`XnH9$M3fS+rvF|7DR#Xorr{b8#kXRyh9N238LG0$i$P*EFnp4H9@o<*fKejc z7R}F?hEpdtoSC2gs6*{={#}v9cEJAm{n+cGJb(9z!Yt2~s{-7tNh09~q1pb=J1ACf z=F-yFa{(H>GZJWSq8Xf!B3A&NeUmVSB5ld3lFAuT_fVWE&1gvScUL+zC!e%o<4}?Z zK?Uv;#s;Q(iBxA8YKA}!$Et=Y=ck|;UPtJmarm!PoJ_y4To@tb0`N)qK83(-5Qo$n zZ3Uu(exn6ku{4LRC_%!)TM&Xh8D;2=94japjXD1)(+EUF@Sd^gMyaVIOqz3+$TdZ+ z8jW=FFhhQ(H~0c}H~mgHeu8^^*Z+Hn36-`F=3JZAv1Z=$TH zpglkdX7>`^G7oXo_h;UrpKA;aLSmv;lsgj>HZ4`&%4o!5eh?Vfj3;#2tN&41Ksp<) zP*q#uD{5?yzyzX%&8Z~7aiK1Or`NNt^b&Sfq_!1#v~RcLzGD)y(#m-F8Ps11;Yxl~ zcooO~aNqNr%QpGCIK%+$54||^*_Fek0&PhGdz2DBRV`>cqJ;Duu_%M*L^jvcjH-na z)!LU_Gf0d6v_J09aK^v!b>WC<|L@#J?iFHMX?Gj`w~k>m{9Szi@Cn{iC^*3MD8b09n#v3$+db1hB6jAkWb-D&0>i;Q*0)39{wCrvdhPaXBA zN>eb5ee0GKptBrP^CQJY*SJt>ZD(AT6C856lv|Td8d<>^u&wxK`u>`!o1HghM}*3! zjD2LqDaJiq)+%iw$_-wcla)3_oiLo!fA0z);KN^y*9-Lbv{#EQ8Y=t0`_Mns6g_?G zECZ(xg0^QNj;yPnlry_pAN&}{Li`3|S%|Yfz$1U#Gn5tm)Fe)QB`L=NFQ7{z!J3)Q z=byF|D)-Nmxb=L$Jp(qNTAh}l-ziYwJkA5tGQa@&e%-Q-pwJd?2#z@PzP)_6iC1h> z>27f_=mOLW&A$4t)7ik0VL`tams?;*$<_gYI6!km!~x)D#M#=Atssx_2ai}fIN8l= z*V5BY?-?;TnXk+4j#frSMt**~hm+aqxlJ7m%XQoJb@tocz6YmYTSmg~^}5{b#!ddS zUJ3JiPB9(>0J{1q>9LxS*Yv)s@al+>^24$b(M%&sp$Z%dv6z>{8QfWMRwlFnV!neQ z>%j_t+{{fg2>};w4cOPAO-rmmZK8vOW=s=n8ayvv@JzZB3hM4^Qj62s7lxVb|97Lz>iieDf4P+>qC=R3ygfF@9xv^fQ zE+G?;X^<@NUKHlvmvRWuV)~6DoQ6#^RS(Bu%#k-mSv zc~rH{A*8{O-?>@;)`~+)VW~j&fQkJ&hFVM69u=LThu41?uu~J;8f_Qwsad$-;Vlf! zAIR$YN|>VwxUBwIZjG!>eKrPz2XHGnp^VsJR5G<%a8gYy6 zW*JSA-m6(t^z)DN`KHVQ$`=xqVHNhkG~GVv^K&bl7ttU>TH_o!RN(KgOF}Qw`+at+ zh6tC+#+tOy*6?eMe?ZDGF3QEYS6XKoKITt3<@(z%f}aa=eQJDS#Par!aWr^}Odb4j;d$^S0jaI3_v~cEQF3kOZSb|Ra-mSc*!PlQ^W>kS?VGv+h zP6P754@n9u`a*?wU>8!!BDXj#mw?Kh^$8D?x`mlj|D?b>x8Q*>$$b)7$(My%QW=eB zbt;zt=oy~vMnr-7nHPpL8BZ?b$`|r~z6O6%cz+ln`NDOuO9uhI685{9Q*+ox%l6u@ zuUrl&f7=EGMV<&Q;fkBvD-aOPO--HczYa}aG!j!CRzHqRUJBR_CN}g)Cb?}0+%5Dr z3a6JW^1XrL($a1E6mtG;psY;qwZ;rByU}ia7r_|t5O?u?`QkbS2~Gy&dw@d{B+-RJ z%tu&X3B81;bV2Bt=2sks-f7+C8o#<-yiIS)ai`?RG*xGlV4_;k2l=Zlp} zKuv5^Z{M<&osm(`?98Xx^A>~>-pYrDOknH{ZHBmyHWPa>@)wjh@YF5J6#=b_R$ulJ z7XTw*6X)-gA41YS-^0Blr3fra-axvo$kPl=S;S!@ z@6`o4|E`iTu}C-57v}rPGxQ_aB|N2wJY3p{56X9kh^#T5xSDTNi*F&sG$mH^DA_Rjq%|UF0&lf;1aR22@~zM9V^lv=8}E-LdaJBOh2!Q0yNRCdd4$uQNzQ z5Z-4(HBe{>0$SIez>7Q=ow;O1WJJ_D#{5d&y8IAE_a^VLu|#Q*TTAD`L^v%WsF`gG z!s;c}jbx8OS}bT(kbG?FHExjnxzi!Yz-k(WGC4P^Ydk`2pwrd9`f+(|VX7@x1Z@nQ zyskGkxf~h1## zXO&)Oz5Z|xemTd|6U*F8`(*VLBJHZXV`ZkzK=KxiPY8x9j zU^8N3X6lIF7iC&Nx~-)=I8aavOet} ziU#gY{`A*YhRCiG|1HolYy#f)IWP*Z6GIsx@q6m?T73CE)i@>I&Pf2HuwhPM5VjwT z6&Bl}U69T8t+yjZRh|4w=V^F*GVTATP@S{{z9q82CUG8O6!Gf(Sy~=hCL6F}AgANr9x~HEQvcE-rG& zp0B@M7w*Y=vbJPKEbxk(B{3r-Y6=G#H*rOlys6+Qy)mLsRu1zBBdSB}2gmxo(%3#{ zwdnEl_0%cllx#P|ww0~$LuYzlv+zWEe)GJ*pGu)eGrPE60Mv8;r_UTXXn$ZBo&p<> zEax@~XLB^ji<~1>rr@6y=k^ED+(O(FS70S$*45y345y^wxHQmY7TTPX^)1E|%a}dp z)QKmLdb99O^S9fbm)R1sOv{L027Q`;r@Vg>JBBDL@Sm#jS%EMar&H{5%D0#{5CD8o zyAKqGU_fo47uMZ;k4@v+-PzfAdOy9a(fRb;KQ|Y&*e6>sz1`(rH(Yjzb2-_T;uFVm z07=Kf3Sio{w}6Na#k-x$#Gl2$k?E)1`rnH@CxxnNO+6C}b6~5|tqr;~zDDU7^f7qafv|*$A~Ntj=Z0V-QyPA@Zr2se zpkCJy;wKnS=@KhZI|NlLnKSc&ls-odivU)LI*3NHKe5+dB^-3@y(hfz-`+;u@savZ zRI-d8#0djlR0^y(Da|OBBuYwYILRbwW|}})auA4ET|^N&OCsyA>5(~v8R#P-P)Hd` z{VZebshx92AF~yjD&ZQuSXGm2T{f#GEc+9~a{^)*pyO z;mh?L99OvwVJAYFRE0bp=WARoVZ-5bjf$a9l5dFQsOz};?~cZBwfTAf@Ph@ z6Z#-~s0}N}&T8zeng|$@WAuq2ByqWPIe7|M-&%Ds8J4=|`-(Rc7XpdWW5!D4Bx`)W z4i?A>mD~yyK_+jp?DcOg^i?j6YPN})Th4voVg`HwW^0bm8-LDc1a%okMZ$=rD3x+h zu{89nM@my$hG!bhDDVG&f~O+|7|I3+YEy(^%ATC~WybAieI|kSA+X)TW>pn;C@%}{ z&s@s~sGU(jBzHaQBOUK)OCNQ}k6>8En{}m&F3euQ!0&kc+a2h5jN`mNz0Xds%lUY|#bL=8@>Uwg5@HtL9v;3K zAMa{=ZhMBI3G6;3e*y~VrhjkmE$CH6Z#-Dlew~XnP>A~o1Z1G4k7WRv3c|}j40?n( zoHr#O6ct}rgp^C$yUuKwd`q0lx8EmX@f=AZ9e4idbPO0f2wp|3#;?l+w2gxMU)H^_(Dj#|TX6)0UU9UX z9xlP|# zHD{kU0y0q;CPuSYWU(93zkQ@g=1ie3*aOF2QrbfTv{~H3rC6M#SEQTYUotkuxpo=^tWoWsK{au96?L^8;{z2H3!kV z#pY%&m;WElHqdo?M4#iOZvpX*8p2(|>ghDV=I|RJDgd1YH5TI-E*R7@QcE zi6WYFSohQOmfi5#PQB_8haHX-qY9H#Q(v#@n+U#koFW9ew+0;S9}+^^j+xBB-n&DSF% zIm|uR9o}yy5-CRFNLuo6Nl01-YTRq!$Z&^t4fmljj+d?nxluwO#0oxzcO44`z2f3p z`il;d%R@py6=0hV&Xc6Ty`b~Kk)q^?r8?czovQHvb3ale&k@2`FNbIg=rOfxSR-d3 z)C!PcltB$zz#os-ff30KTEKYl!6e6A+?Iy68($f^7&lc|^=p+0F{p?M>A5q-#-E)8#xnUUk`j(_bHXH=QHGnZnz72K;k#H+ z>bXAr*+5l9Ua1p~9`28^zxIEp_0isBz2v&8en{M2lXIf@_Z>Y+Y@ZO_4-T$b)1qV? z%aW~NU46kf-9p%I=y3FTr<~B88jNOSS169~wa}(;ly62jy>#qAZ2TJu9TANzCMKo( z*+(G8VyE|5l=QcW=!WfJ_!fl1uM2xZGYw8MWHV%+K8aF8`z|tT-ZzV_75m?(v*4tT z+l)V-M7=4mDm&RbdHO!>Axk2YS#R=X#^?8{Jof@{9Mf~^$p;OzZ1pUB@E@jwK3gpx@EU{1GpsTt1keVwdVPbe9c**9XyjZQQs&q}1>TN3xOFvdGbaieUZj25n>=eN z(QbGHzNON7tX|*7*roj1gX#{8<+IbceO6W`;KGzZdg)l%b3cBEEABJhWEpn+CLND6 zw9jeN9lmdyPsY{v#a>RFM*wI0j+p)YUsZj>d#JIe9kWSIBTTJgpHs(V{jw72kB>3g z0t|H`yyAaN#`)wH*yNBRz8YZK?M-|YVy?^NBBq@tO15owA$lvF`m+x>%Wxx%b=kw?P z3`na-*U9DU>+xLNEg5-Nm*-tTK;}xWp1}6n%ibLO%{A}BSn0)pg_)mGpL6Nys1U!Q zqt)1TX(!|2d6)MRM1{;I;67@XF0Bz zmFo_~J{*E?0cdISu@g%`TKAL4Bu)_Z;t#LUNp2t*IdHo3@P4r;AdSa(QYMM)MSDQ* z@ccCq6^;-N&8D$^wZ6H*N|7tLpz2Bf0~?Wyt|U3wTyyg&AZ?{Zy%;JOiIR#ixW>p( z8FGz06A|T$rKE(?Uk-P=q7fJ6bJmcdUDlNlgx7+MS}aB{1Fu*pik5o%jMg@bhPZ}loa7s=zuzyjmYqtNUF4h|AgSBc5y&wRn+GC3 zC9mrg>h(ot0~>T;EMh%K1_@oS=do^#@}HW^BBX)`M^tVoZG7^mCeKY*u!!w^BZCMN zDP2yl?>4O|Rm~)Z8<}`G%E5oY{$+!X{pJZSBREd;NnJ-nH>BLtY*!M{I;5Z^-wd z#Qa_q0aek+KdgfK>!qJ&Rm;;A6Jj@}B8_f4G#g0Ou&akpo@AMSR4B2GX79H^*W7aX zSvG+}=)`|;$DuU~R0lQ};oOZNqVwj6Zqw&#$AHvpG5E>Q%;ST)seh)<-UjPbIkw#mh44Kk*yC zUlDAXQV^#rP;ri&Bvdouz~NtZFt@`(FIMrhM!M#*CZKHd%B%!3n0=n^box`PxO+2R z{$25_D@><&!IyA z;|g50YI_DW2vj&579{C~4lqez{eN%F#xLi%1!@ls0}k75CODY@yZZ8JI-}il{+I4c zH@|yV(}L^YGGKAqlbj~!_rKm78XI#Si6;?0_mE>IAu)aoz|?MO-MZE@q3-#9 zN3I+2_YT7v;t>eMr2hOAZ+6k*Mf@0mON!+b`v6jpGI1j<^m*3OunlR&wB+y(`Fs%e zkZ$02fe;vTV`52A^lWRXEk6nWOA$Z*>lmyc5JJDR#ukTssEQ8M+#?K6-bDj+0ffWR zni*u_3f)L&C?xD&<3bCW*~F#TA^>fUp>EK6a1&pjtXE8xkPgVGfGuQ5E95eILoBN@ z7EE99Of3ZAJ)*+!vGKmc@ZCt#Mbgc4zvZEtK*Cj$G@`|MUDI~%J__WXL~DJvrL6F; z@4veVz+8KRB@um@=+{9xP| zq7fW+8Xe+oQ1Sx{q9HagBK|r{Hl7x?w44S-d$0JKEzLVc57OC*lY-97Fog}`CynPI z21tZu{rDcIKcnBQFQ({?$kMzkX1QtNmPa%&YDJjI1VS;__YNISi>kA(Xe@Gy=t64Z z445>xO+H0(-5IaRI#nv2*ABEP)mJt~G7s@nt0-jdI*iqityjC3J32Ly1tKL?yR!RG z8~wK{1(OvZ(G>b~5mjxfjM!C9%GWzAMyLRa4=`hbm-(_Gl>!8gYVjnuXd^ zz7|Q0{5p;{HgMT#eobN?4ObCjSWJ38ySn_ha9_nzI^HT9+H2;ydcb^+uV?LYF-LHM zDH{8G*opEFv}{N5{Qsx?*{*&YDSn3a2T*GXsP}4zCO~g6qB6H21h^k^Ds`dWRiv`` z+QqZ@P;BV|;VBVdutm5FP-NrYE|pj6cxA7zlrcwqIr^#p)yL7waR|6Q@Q6NngmK&D zo(cFR=;Eb!G3QHxPmITD^Tg!ip&8-Ke)XRqqzB-2lmBalU_wuh?oteNg>ISXtBy_K zG!K)D&FjKKQzk^k!qZc0=H$8O=uk0H11%cxt{=7mT8&DH7M!32a^5804Ok&NE@diH83$DDs87vuCK?Ok8I0b$%A&{ycS>xi6wl+ zis&W&`d(e<=Lg6`l{7ICuydWKkPo5r)6d8exnW8D)zaus*qQ*#U^)#f7b`5ZkxL_S zG8It4H;XqBQHlnPtq9kS9f|RtMaMG>TKG>wk+JQy9zEuUrYeQ8Upg!FTRz~}jTor# z`z*gfxM2<;W4|9GQWX;j>IF$NyGq%N1I_H=3<{=8W3N$Gq~N~8|i1zv5`t3eDYOPD;e zrM<{Hb%Ex(>TY)a*t)W~T;Is)JKn&zcDTn2m}}-ZLEjZ@HkX3sc;X6-4vBLVMp5`x zGErz5I$2B}C$Iib^4)XxNfiZ zc(j}1!(469;~Ufr(HIpY2o}TYuSRWP{7QW_2f+mlv$=Zc1XtsrqtnEVxMDN3n+9?( zK8Hl@FKym){MJ%yWSRBP-(;65YpadX+dx6{2b@=XZ;b+KHfrP3h=N9TUxbFnd2&8e zv9ZwT6%+lBDe_Kv!#20H@(>^2(jy3{oCdU|2Z!r=P=aA)w4C>-)&=DlK$!f!IE9s5 z%70-G6#ONXCL@5x@;@hR0p}OTLtCjV>!eJll1dv*2nEO)N4zUSGXU+YWvs0Me#?>1 zfcN|52zlEEs%#4~^#vZ`4nNQ9sJ^m=r3>@|C{FVPe1E-|c|9J%e)VUWR%(Wb=yfl){?9*{|Xe zky<{4Li!G(C$U2&Kb$Dkowe8d7RjHTfJ`Fm8kQd-&+Qe(DqK9f&bh z#^%$SM;ekC3R{9*aFLXLp|9}Uw+*8E!a++ zeG@)3bA8tFVJV|Giuavpiwa8)oR9t{KCtxJ(i3tHQUy8zZVC$mG9s++R*eQ}<`av| z6Vlga{b0h(TzeeT5KV4Fd=T7B@KTz-3IwxQ0Pg)o>ZGIuQehdcW<9hFd>84!Tr{*S zYYu#FV*PUZG1HPk&*`v{*Xc(J`Fc@w8(-u&+!@>$-9{J5A7lDD9h7A12!p-4lVF-_ zyyuXUVFSI0ahJ zhC}CaTt+MFv|$2CsmIl4B2mB9V7zO+^~`=^VbAAdQ(^(}TH8gh3@oC^*@w&`31pgt z4Md7-o>e*vxA;ik^|kjOQ_$)S_vNhx6Yl2Xdd&r|g5KrU7b6oJjG%+V77L3o$?CE- zWEHbgoZxX&bE@BwqEC*E>0sn{eHKnsLJha1XltU_lpnNd23H-uFg{O&8?!^r#+$NM zt$thVtcb+tr#8bEqsAGi%IDGK&IhGzwcLyK=Q<8nQT~m! z@b0I5=OA|D((KLG1O*oD|4oaJ^c?~o1abq;+?h_^-BPUISeyS8IFwkIT(f0NL2;_8k!dVwCdQ z{D_RdE$hh?U}iLa4%~5hZk$hrQnelzRsX?re%udJ{?%^{Z?Yx=p5KyWaVEtA^5XI3 z$SuI)RkwA=&eEM73}kc;oZGz{>+QOv6$JU6XIuyzS*ecr3{v$kDe)(q{%*B^TJ7iL|;iRdDaLq%s=1E5*_eD6df0-?ea3$^m%NkktE? zrxV4<(d|e0HT5~;vBs(*>eF3Bj71Xzv3uu);W4VS#Ydr8R{B^%_P?{i8> zm)ej==OQRg;cg&A=6=MJvhd(TFk`TiY%oc^?IQk~Y^_(NySt1=Zjjv={&D$!I{yX zwvHlx*53&WwN5_{Jcu-Jkk)o~3HGk3x!afOkq;?wzn(71@|cfu%-Yc0ecIEC6d5U& z;Q*8NLCcABBF#24v)i^33hUX~&OLi^He@#F7^fL)wM4?xE}d`~$?_$%{ru+4YV|jL z$oks4q-Viflb+F?UR;x@K6LO(*|MrbUu4**Irhlrf9_K+owC_L$6%N?T7}ndj6m=ssACS$ z42j7Av5NX#?x)8S6P&|rg%c@iB=>;5Z@j`LV*mQ-z=6_mY)6Hc<@T)qtY=~VR4U%j zzRPZRf4yNktsk^>z9j{b_uAa?v#p^cc)G7JdRYh94&DVJJppOi|Fl8ZOI3uqM0?sQ zTJ|m5yXDoooyR;pf(!QEYl77)-A*evH)g{gSI9K=iP|$^SFlAsh8Kb9Kb}UZfuQ0Z zAf_IQZcmx%*}>ZSIBIiejkDf!()k1as{q_}^z9t_mWun? z4MJ0@nvC6qATpmfCGl#%*zKSXhPX{zk{=|>5{8JOv7muKxh|SK*N!%VjzfME@v(DUhhsvi9Ae@*W)I6` zgXz%9t51Xil28FrmC54bxMe0UhOf)e z83;+oQKC}jlYE>GrNFTZgNbnOP}N0%wbb!0R4x{D)}q)sB(6P$W=5HYkkQO$(ideN ztTnno*m=N8nU_6Qz(nPC${EXO>xWLl?Cn#vMS4SrhHGctWuq`w;DG%yx$9Y_y3KrV zj8C0glD_xGVBVL4Zz7VN*OKi0N+A~2rhum4{J|ScDRNDe6OHoOm;m}rbpLmoG#;KknKUg#UpZURPbxTk{>+!oeM&K$dT$JpVq`pP%v80nPwe+ zRXEPmr8+XJI;ah&l{_1gvk^p2n&($IQI)znbTi&$;B1+~btfGPZ{lv1K)2{L#dZB} z|JR=K-ZHmfA(L;>qfRiHPN(2^?^O(V$fr-_i7|k7kCV;qsT?{~aCIzxb#w3g3n90WY?w)cjWy8W)64oCx@UqgnAeg(YT zT+WvQc5_mjSbBs4AN6BB>FI;QM<7?=?qL*@1q47H+PZa6GS=3-JpnGm@md=+XlXfJ z%Ua#q%F3(PspOaqpgb95WE->qHD_~mbseZ;z*2n-<$T;qZZ!aic+1Ih<~v9SfvWX8 zx$I6|S>_rUwTN@tgGvuVN8P^$T9@~}g1h%XPl0KYhI$=ua&FFFI`1gChQPjs2+2`B}~dlTJpD;TWJ zG=Okb$oOqmB+^S9^@)77`RLo|q=&8nvuc=BRd`zXuoi+#zDnp8nGthK8dz!RYAkeY z&5SqVu)c(VS_~TOsHG^H&(x|)>l(0ZNpOUPyu#BX@M0-x1nhM>nPysA_r(z^VFN;o z8lAWn-m<?U>~Qcv;L;d) z^PHnJ!<5~y5{1KPzx>S*Cr~2OXm8zbYN#dVSZhB49rMdMTwG;OOyd4`pgo+;F3sW> zzM(eOgd|F2zNu>s3hf{{ZHbDQr@j+cScBssJPGcRq?4Had|7!FB#TJw`F=ip!Q`7R z#mpBb4hQV7s@8OWr8*e=#R}-1*@45N!j8bX@oPC@`pZLcr)^kV#qP)e)M(W;V?AYC zALBd$&ZVbf*I3o$mq*CIQp8j_|Mj{unWalz&cIvhJHt0U2^ca&?-SZUfY?gFG=|6P z)9J$RR#H%}!o&bINc=j8<2E`0B+5Zr2S%F&rkzN3H;%1LpjG=-T37_*jV!OXIs5T` z*0-K1YnmMds8@>~xpD;q{ut6JWg)FBl-`rXKru+9VF^i3+z(mFcY0lJm(VJ7dR_sG zykSN2<3Ig&)7jn+hAt<)pwy~oLPDF9lL{L}C_ghZw^bvx@s~g*U|8}v&wXE6dg)m7 z*ne`93T@jafXs1uMrBDcQD{XI98PLGt^<#!GwZBR`#`0<`}|1}OCw?l`{b>a8?T5i56v*c%!h}ZQ-fb$fWcYk|sF^^6RlQ10VWpsP$kd;9?KHvRJhu=^ zm#JNO)a7EcUXx!+U^c0k`_ui zMd-|IX_laYD{(uFs0Wi|KK+eM&VEjP4EfyZw*83~_isdWX}YYvIvkiIVRc1Svk}8H zfvHpm1hC^7lP}dzi zrfSh2l;z1qew)~Z#FB2*FQcY-7iYxi$1+)&L?BAj`?x9Q74&q2Q_um;ojgOrjkJBU zEX3&m!GHxp4Y+gYO~D<#`!liY<)6a2-j+$!Xk^IDY@nW3W!n-R#9aTGFS z4Acu{a~0%LoHNz2a8G^Zt6>zz#w3X-tli%LVXDAxW9D-~j6~2Cx1^OPGJ3ObU*Bu@ z&sy79K`C8g1uAZ4_$b3A!BKont`+BmYUKAs=ZyB2j6f?6NO8=2sw=MlhS6NB2~BBc zf!Cm}4&4N|4S|YgEV>J0_Z-uUmZk=c zLk?fr40fI`h;)6Z9UWn>s`iMz`?3WJN)C3>F_yvHQLkdS)E~x-e@@1#{^cotTo1y8{?y@yz0(=? zNl+u);oQEY*n8A-L}%G@?#24C7;i}=hX&dAKKk%bp*nMmace&H{=Rs>eWUKbm)7zZ zkHW{d=DL52HW8@9YiTu5djeXfdmt*S`$lv_c3ba8R0%o8<1v`5?si%XPRDkG0@c{GBBcvBttp9`>2*y>) z`x5Z7J9<|n)dR>E9E5yZI$QBa<-Jy~|DAj!NXMEFh4dl)yu8d{S5kmCkkjcm49?%` z@cJFz zS3vOXe*!6%a>m@khO8LW$qpcRM(M?Q^0@jMdH@GdcB?o*eNr||BLK{cvSsUu+m+(j#~Uvc{I z3iK7dzcR-e>^v2dDeX~?Ls%sjBtATE<~#N!(A~<&^`=|mkRT5u%?5b$Z7S933cvoW z9zHh4sZ|@PFJ!vRn6|Ps&csp}naDHxZTsMO@kTYZN8#x+B4KQt3wj8|O40hQSasw#1I!-STn^pvp0eIe2uLt_Tt+ck*&Dz*J) zuX-lGwC?MDX52tQvbae;qwH_YcD1#jl=q*_gs)_27XmDfVu!ZLsmvj zD1jptLJi#tsc#r1gD*+)x&-4880hf;mk)L8W4QRWUOUu3)hWOvUV>C}`4Ig<&W$6_ z?@VaL_wu+gITK?D>qzxn08hdesb?Wti^*L{aQd_c9+WHS{Wk?jBlK=))PujV6Y%^k z`shm|IGq8k&>#R=DUL4M)=S5$+vsyz8UQDWKXPF>R7BXcD%fh#w%E&V_1{zhRX^YO z=8BpH_zi4x)&%<_WvV0kHPS6bn7abxsGuMd`E2 zhL}$tNL}O`@e{1d8MWny3QjEcFpta-ek0})n1rd;Q4qL+n=s@al?=7+U8Z$Y?jn|w z1?|@%z21fFu-I4wss-5`(WIx5Pb-o66ObulEFj6<*f8YZffT2z8Z(fTNa;Q3l|W*t zzO0X_c<3r)Z}ef47I~rCvK`+}SfJ2`rU05=0%3O)WdDW)gJ_DG(l%o>9_^9L_5+)_ z5@(wp-8Y@h(eJq23^I)2y=m(0F}M1jd-^}TkzvuOhpK*+r1WI|lsTdA#%&+64^0h? z9wpP{XNH9s%{eTj2Z596p{V^fBUCJNFrT@9F$t+S6ceZ4_+uNtS{f;qRp)C^DOe36 z8OhHUo5fV(^hd9i6JC+il)B7u5*QsUGKeWOCK36!4ILLx6~J{mJEs>SBGYd-b5@n# z8PZ=={$jlj4u|;4P^=b|Ur8Tpbyh?r?EeE@cj%OvtwJ z=TY*o9T7L`2p(DTZBBh$S?TtIP0CrjZJV0emq2UTG5xOwTj*Q(m&a^5tu420RZi>@ zd}LS<#@xagV2vvVJ6xdK9&e=yJJ2XR{NVl5=Q~)fU#@~-WYE)m9a3>Gut~a|} zPMT8rJp|mwnt&}?))%))scXGX?@6G>bp2(&(aX(p|Klgv{j22qfceK4pQTY@uXPfB z{|?DJ#k|~%44!{(?!&QEM!-UM?@lZPWKXXWw(Tu3c6%z6CwG07`kGGk#T)CJhW^nD zUf(NJs^z=LbQLg0m8VjQ`#qnc2344dSt`v08e@^bWkC~(f&}RJVL#35%};HfcnRuj zkNg<$SK5t0Z-mc)T2teUITjmDIABrqQoF(1x?nU?ZFj6__940*vGUOY+ zn}asIp;|)a_rIxpf--iqd?OJB**%u3s3;fcEixKCpua3o1ji#c+Zj@g(BDK(T|wRr zvAI<8%i$|Rb^7V}Z$`%&SxE{(t2G0Oj{yZYRX4 zIjLLcI9gd%HQlz^vI}lX{UZ@a5{RONKJpU+L=BX>(vMUb&BnB!h&iZx-a_j|y zO~@3ys=&##0Od`s8{i*+4qX2D0)jZPtSsw@eV5ip`_1r)g-(PFXN<#mKv;eMhcXD9 z)6PcGjzgc-RHW`o33t@r{1#H^kANF)~ny2S}Mz87U zI|0_A(Fb1`(t&9U0BGOpvdj=2{~c60v3BQXV87AA3W%=P+^wt`Aeo&4?5Sn^-`ur>T zC)BkO*4e2g-R}vAKBy?{tlwF1S!gt2dNWyuQc$+^(A+Ys3IoDCUve3Db&kO8-I7PvfemF3qLzcqO8O3UnhEhKve$*QiO|Hr`WJ z82(ELYa%L%{kIcX{zAybTXgr(^hSf5#8Ry@)7lvCh!SDnV-*I%DomeV0Uog3wnBO^ zb$L}34Qc}+boir==#J4^lqrEbY;b?8wPPF|$}(GS4p!y7!lQ5inFc{}s?vsyGCI zMzfm%&9oQ5j|9^99+@J6bdxPye~`_M+gKr)^UC{X z&2&01v|e5!)~`4jOhlNg*8hIIKA2Wii~}U2{2o(r&DXZmnd~S~Y|qavLf`oxBfik4 z`45y_K&PLU$(GgRq$(*~eF=sN?7JuIIWrxc4Lgs>Pq(~$%6r2bWre&o7mmLc|Ss3*lcZf%auT}%6qUas|{-#El7*g$h2 z&K2R`C@X?r%g{&jys>7O}B}31<#zgx&hrsSbnFKZ-PT( zcv&XI4dF6URB80=JzO|T^I2@eqi$uZ~S-J)J>00$N(bunTo3P5< zzn=fsGMb+9(%P)EIywJ@+dEU2&N{0@Fuyv&WOajzi#GOa0@WuD$ z;q)05h;>lBbg2m-Nd)CH?U94Em<>9cV*kMke9l};GGgL&>4#I+{2Ll?9Zhz6hoJAZ zySx7=gA-Dx1%*rKxXd`Sva{i-U<*?gv53n5o$uS+2%*%LFw)B%;Eq+bsxq01ehtb! z_>9&Kf_&+=fW+phAAEjKK(Mj75qm}SKL6hKgQCyw!Qb8D%<&2HbztuQ$+QA6euX-f zn{LO@^9HA9%Q}9yLL=ogq?{0)AhoachQN=0f~s{{_--URN90p^;1r`b4~Iy>)44tG zf3l64JM8x287mmP6vh$k&Q~~1#I^kgeOmhoN9%2f@dJ2)SEQg*KXi;-Pyc!&42{o< zo`1(CG$b}O5KD4JWX{@vZe~yvi;&_OZRUFpg0sqW93FziGQN&@87*YA>(qYB7#Wp2 zEyaMR7(;@VeoiE7WJp3!TyIEcf`8nlf@~atC;ewjZt_t0>$C@X`VJ_*)EQ$@a&oD7 z`H8}fNJTYU6fI7^cslpOSe%FnHA8{RD{m2mh#5@kz8McB)bgh`@3_F<(m~^XXe(%R z_`)o9H1P#?N1xrHP+^)wj#zTx$=@k$G=_XbC=3;>UtnOQf0(66mg=wuF$`f}OHI_4 z#^(|-BEqiNHMKRO|~eupr7p^cyTm@$#K+a*KlmW5Lx8Dd#PFj>f{ z!tcs1{n_B=>Q72@MT82ao!;urh-HJ$&SxGcf_U5iZyja+Gzf@UWa-rMKQ^DHt00Ir#Dm+v9dPao>(QGOGy`Yn3(jy zpY@G1bG@eVlori`Vri_adwiPAMg@+Jc!#Re6Q#xf0fV}W_&Na0kK1jt*MGRF`u_;d za9m4t0r*<4#k=or$O8$$Z1W(Emu;QSdTvqf+QT;8)6v(jd*9zbum}=?HMG9_)d`FG zRXeQeY}wqrTCd%G(@2fI>GbLb7+!cIWEGT@loTGPZ*Iaq;7$^lQ?f6y=8>Iepzeur zkUA4kxa8Sov&Q?l(VrBO3Pf41r{s7f%wA%;qbud}9gV6FSFu<2SAMvECh}bhTUuVa z^gj^!EgCW6l2V!%Ac;nbHWu(;3{R%>!$gUg-+iUum@7%x5o$bQ*0ComA?zch#{(_Y zJ)Te0vvDzRfpebl%+Ovg1j3DRqYe)WS8-5*h(Xv-^}FQ~+?xreXBM7Cy-2&6T!Mv@M6am>3t#Q`u}DrTlYz{v2LqJELY}!>r0%`DJ!TXa5p<#gpS_n8!XohZmQ$X zRQf0e3r(5ur5ox!YO|D!cDM-5QaVQ=?7`Wg0vGC)A#(NvMp4e7klzXKKEFEyR>_Y@ zLcKf&FF6D+Cqq8Ld~v6G|l`<7l1 zWB_iIGa|c?~b=I1KmT-K~7kZC@)5$4{H zp(Yf_h(;DJrEvMN*oQ1xv28gox^ckq46{0kJBU9yPI1VTwb<3zFluRPU1w+| zB`d;D%qFllzKEmcWh3Ecf$U6%=(~M&>CM*N_JE{ zv$=VMCda>oF!tkrr~QC#WS?$Jrbo;)Gj2nMeo$5l$URkfIt9eRYXIVCwBgu_|M(xD z4m$8eG67vnUNUHk1~{kiFQjCn0yJGB7Jz`WkAnj#|G9=Q6P#YN<@@k(v{Skj%6g0V z3Cs=f+1}g~(!Eb3Row);fb)rv*FMnjA@7No0Ir-S+mqQMsd(a`dLn-S`3=g5c(Q!b`5m++WStt z(4zw@51P(>&iC5C8_WV3feyX8KPyDSiOHz9;ZZ%I=I;f2i3(vMDOMxhJN#sd=Z|rm zM?W6ErEmXThY7^us%5h-4skQls&`+_IUUnv{f%*Kna+wXu_cX}o*)pU>L0u;BP%>) zPCig6jRUn3ytRj4HbN#op;^IBXU+3L5X*>3IGF0?aPzTRKZ*>a`!w1&O*N@9oJEjD zxVUY{50epGQ09^I5M#>^LCunH$PqTa5_yb$6*ut92rVMUC^P}VVtt{)f?7@lg&)5t zTu|_xVX>6)+t@J%4iw6bxJFDRhOuQJ<|xySLh>IK^L*J`5!P`kC7y*Fl@`mJdH;wvF-jC z+;;Ipjm*3eJ2kiCvy|w~#FzA4A9!B*E(?y;qe z#!P@l**^8*QvnN)O$M?e-(MMp2Enz~R@^NsDATW}6#aB<_#0U!uxq#i&iC9ErW{;r z^$`c4yASKZ!4;RE+@+j3PqWx0J;xyWj}vofHo}_};8IbbzsOlc5hSxyYbzyHFF+Ga z=6Z-2|IpJ<LZX#enra(`3JJ~G5V-TvK0`)qK@DDA8Xcg6yGCiT?0xILU zWt3JcRa#^?#Ej$Iqn?4b8iQ0z5x(zPa81gd9+fBO-r9KC=-Un!zy9KPxBWV-guGXA zq)I9%tc8^K57Tz@^I%%Pqjp*icUY@JE{LMBwei+)UPKMGxta8_#`YS3wn3ue(|I!?)Lebg^N>AhJ|HK-_Gw z9`U&P{ek@3Sl1@-tlXXAb8}u7Bb!NK`9DCzIG=DKu=)m3LPqD$w0-38xOC_Oy8xOl z#y1J-q~Da}tfY;_5N0cIBU;Lh#?r()BM;Et`0vWUz6wwN9JE1E0N*Hb(Wos*Q!4WQGJ~FUhq88s#+z7+URj~+Xl^EY78VE&@}xV0benc z;ZKxr5>KZ)Tha5pqO`JePP8CV*Z;x-YhE_?Y+~0N^I+gyM zWQG|Wq}eZ+AN@NWK~josjdA!Zf@WY@cqu|S>0u%Si<6mvLs|W#Vz2IgNB&X6DPnw> z0+aYN0(OYmUx#0Js)FPtT!nFiMM%=+K3A?qr#=dhpm+baUX|5gB7iyb4T>i zAy@_G+;*uVl-a_Q+ie*6pdK7inO8pY>LeL z*)8+YquGU4jAs2`PUOGP9~-$#hg2p5sh`H@AKpJ39$!<0w^b3Zom#26VdAU=IAnV9wh^*7+jxh;m1K5NdLT03+_1oP<XB1SCyC(e@i!;hk+l& zyEyE?xTRYJR002&mS+pPiB*fOHHgQlxv1vD86^LNh){p!Cj@Le{Vv+eD5u|5&CG8-6wao(UV;^sB#1+wa5w_4)dl#e*I_9H7a zi`Bp=l>84Ljgs^w3_|iQlr)sM(vE6z)Iwnn8QD~M%M(PTJ4-WvsNtC85lLA`#d;}N z(aFyIP(f>-qHokr=35p}bsr@Z9f{6i9gIoxa$h6zHrpLoSf#Q|`Rq%fWX(nPbxViX zH5z{2qamcYwcOqIu9E33@_h6OVMft@ym|3LP5a=|Q(r~5rGSORB#qN-|L12f{v&A9 zn7)eKz26Fb(Rsmw)VPe7%Xgd$%dVUKtb@=TUydp!4W4gv@J$m$;DArJ(hKzChdES* z*T{VOnL$K*1rg31iwjX~pZt2N0Q3juB4`66bpiKx+M z#|ML;xZKWsO|y^??bD6@bznf%dfiPD?2Yn1*J1hK@9}vsZ`UyLelcYW@VeLMB`J1nCx%Bj5Ezfct!6!m*?y?Gq2p5?;3q(n zpS@IF2|3@NWYns0cTxsIoWH@#>$Q_8gDbRp1L9sE5|+LzJc*OjD&@vxZ{+Z?^Wvwt zZ;S8lW&Oy_6(lSyFjveGBvuBimF@}AJKh}5wlM#iZMimjI6AB|`A&Jj>sTcmMAAB@ z4>dY&g5lLvK*bl!@iA8_o zK+u``*I5MZr?f^mQ8g5<%9wv-a4rm)i#dyx8oKnY9&m18(MXTDMd?B|}E{(^*+iih;QF4Q0A#Ur{=6 z9!N!2Y|MAj(ruL{u957(P<}=ny=x>Tfpm8`>puiG1e{i#J;%O@^1BVK-rq0@OlPU& z94}F#?jugwcjf+hoa<3EJcn@LjaO2k>FkV&_!~WJ|C{VIS4vMkbI5+x))7w2$m&ph zhe1uqlmd3-^6y2Z#uxv#OsMKmEsm3c4%{Q%ht*1qi$c~y0Zu;2nneb9Q-ZN!BI-j2 z9aPLN(ju_ha{g2>)L@Iwb~WR0+eN2+taF3UV*2l#HK&?7Ru+iE?=_su#a@=Ce zs}ZrMW`K~H_VU3(!yJtP(NM25zzIoudn6>=cqz2W5*Bn+*it;&mp zrMO5bK-HTqk+y=U@|!w30k`|7r0<9vYVSw2;Dq7(KPC?y?-!Sw_a427x?AT;jV z8*M3;TRKDKcrGqdTU&d3LC*`a+I*qDG~X+2oh<~ND;b@j)c)-zl0%!xWeG)N6`T+ypmmAfiuz4sp+Yyi3xcH1z1OVxD4`N z^r5_iF&%h%IQbpPrHZgjH)XxawEe6N#Qi0p-Q7zd%7&Km-D~7F`3N%4Yhs5#`1G3Z zLj;Ec+ex?7ui7t(J_6wbr_ch87WejOVn)kCEQRnJCiiD(?$~9^9+4`6x_Z?ZVjoB} z8}#aC987{y=T3_8lK!H#QBn+NQHP@Cpv6GyMza-5Vzm}S1tP451&%{R{}J%DkZ{1# zeM;k+nvdb_5sCO@ydhbX?fPX5AB-=Z1LE;Zc99W2eI4=p)2_ovZgXG7d zoow{lP(QgEr=g>UzlG4$Bw+F!@ODrs3tbErS2VOQ$6TzJXX0{!NyV`za7K>%WcCCF zH*x{H1-CfK(N(O-$|i{pruLq>;M(xgp%}B*Yl%bLu|gEd%6H_)Y%Hv*w{Jvr>(rQj zgPY0^O>@9_Od{yvjtm@kHKCYJH1&+Cis+>Xp(?{re`tl?qZ`LxN(^U%GB>p?E@{DC zgceE___QQ>f%NC=Hxh)@Z|M}(pN%4CEcSFo&;2!d%~<)ny{l$rQroK=i~OxOyP`M; zy! zs^`Og|Gw5IgTIb>Y{LesmAwXi!vd+Cy&k#&$vcaK_Mq7@0ls#@|qgc+e6` z4E%e440pbW4(0ly+ay@Qc2Ql^*T3k5CPCQSroNwY=gUL<+^smPp@sL^HV=?~Lo)qc z$6{F4BaVd`*5h8i@wBO;W>sW#bW|u03}l zdZ#RWyge~x)g03i{HUcez0@&!_)%#3VI&kYCd@b%T3#la8{^Os|tGp`)O>Ylh}O|7prZ;2yhE zw%J`{VuAo^XJeScUXOa5!m4c-8;1r$ma6Ts#WY7F`-iM2SggbD(>1#g(A_B|&P^Qj zYfo=gKD{kmdLX@HzQ?MsQ#3DxTC#+pZ2hA#!^UC;67IvagS*f5XSbe(945=-qibAJ z!GNJ(zIn!6q~GN_V|y0lb$RFuDx8H(|oy#@pKn zjjHcE5el2_0nbx8sf+6sm-QInk~A&Ngu~{R1}yNDm<2SK+fKM|UuMN}H3d1V?F6p- zo>~^T$ASc^1hj{#&WexF3@R;^_)r+DmPpP3;RTt5B#m{0z<1L_jV+Plx4k>s6X$=n zv9N&U{3=Sa^{4+k3UL&s)6MVR5HmZz2GvW*WUbuMLGj)(v@6yICXWAwN%YOPI~T^wC^V$e}7=*jSv?l)BN_E zKZugmvxL3uMjL5Zr0%bzom|6(r5+^dS@ADgLZr|@i1Xk^h+DWKL1#olq}Yu7uaq&c z+yXZW(ezF8pszo(L=Eyy!|JnMNLx<)qkgaPE^`(Lzf^dqTa&O*eT+69&y*%)hDtES z3O>y%H54~8>GDy?%?)=e7%+oVE|(h+`An_F(8EdMFe?$%3)Q)i=5Fqyc@EkEW$?Ve?I-kLyjwN#+Tu9!j( zr0Fe&t6HRaxLSMMw~NxB_eoK-M<27aLX{<)!1xW;Pe^1`U^fd#F|Y97 zYy-Td-2k$;ThkvLCJEpgge-z=0E%F4~k&CNY(Iyf2MZzr(=*-w7X=zKieFz|V~S$&QN;s7-uK!LKI zUeUr}G{)O)2@1fJmT?a7c~1z*1+7i4MUejabJm{tj7!djY`di0x`L<2#>!vxzUfPv zZ%yhnQ``V=<=;zr!ePMP2ANW673#)1A6@Oa988-)3(oee;(d~2i~jOZ`_TX)m~SmC zKN6>I(@6QgKWB>z%k4 z()9FC&4i~RRy>5<#LhbHP*7-%ULpZ8Ix|bIBM~GHeTb@Sg8%#BC%J#bKtSioW+DOfuT+M`*r}SzD{!z>vzFrOt!Vp-xV7nukVoJdkvieUoXN$n91psbVM7RV1HHhrz-H_mB*9826~2g4P2wt$<;w;*!A z?7QBZ@z89O)N;ipbUT7}x6jlYjiKQMBzm8ULi3M38{zI=@yA%2qgCiFqsWPcDBr#W z4wn_C@g5t&nam0*6@S4gkU7inYGlFbYY9b3pAr zra}&lmHSxhhkO2{K_)Vt%3eb7(gsi2_w?E$h^2JnD+R<4r9~>NU%&{H50xH+$4}{zQ#F`JnNeO%EU7;qDP+_(R+&t%H(T6JmIQu2Hr?&F zyPUrbg?tCtqUvwgN&zqM69*3+&liv|YQ!w5#wAb;*xbM6bgsgtpN7m4Qr1=?JQo1a zn#~m_^`#r(1%UJT3}^eP_;PeBVGQ^Bfyn^nMJ4D^Kv)$rwavXstOP<{FRpB1FH~Ny z%lGkbt4m?fe2|2-`CT9EBjDkbb0*6J3^uu6d{9``S9F<0WxrDpdygFP1A8?29*4y9 z!;3%tSGU6AKLUxzOkq6B#Sp}92rfiJRRGneY7pC@;SUCSqUJk(yoXVKxYE2pY-x>J zXnCQlCaAFnhpk*`ZmM8O>^2x7>^>{BDXN1KAGZ0qh94V}mHbh%L0rcMiI?HQAW7?M zVf8>Pa%CiLICFNOI$!}oQ}$wU!F z4&CqR5ZrtsU?p4UA}p9NM}B0HSG6IuiBHX;HRXQCrbm=`jB-9FBG7^}Y;LIfFkcR3 z^nTkyR4RSapZvn{#ljBH=eKuDM)geAi;cd>+B!o#9EUa0o-%E=s{}vQ@zt`Idh(J) z@i7}MV=&a$O!Hvt?+lIyUZB4pbmQWk#2&a2Bw#t?>Znzn?CpJZ8pRS`YAQ#&*xEQ+ zdNL&VBx%28^PV4QeN4sPTU?>l*Ww|W7jv0A44p31xS;m;x++`87%}+Km1WKk_Y=zrpFJDvfu19j~Sg7;2d~gFdX)vhGwo9135g`i-Oln9hFpUK%Ghm zzI|bQnKhN!QQpnVH|YI^^*6Z3%fH(sr7hr~8i8x4z1{m61>+tE2Y0W&1&eNa519wF z%g!wnKyBab!8s&H9tr#v7;q{Qk6)}Oet#gHDHz|nKCm!baXKV7WEhIj6AXBJX>~aW zk~I<%eALE*hbl{^Rf-~rhhe*>6b==C?8!+;`7T`w?Zn>2WPBVkrjm)5Nh+Um)}81{*B=CX(=_?9nF1wA8*tDaq4pO_De0V_EoBLgq+g<*&SM2Rbl|ER%` z-aUsSYHZlFJ}-Dn-t_;7`pT#%*RWkWrCS;#mG16lB!&{C8|f4nN;(Az327J@8j;RT zgET`(N|#8-kmuds`Sv;gSPOp4Vm;Bb5In^c%w~1+kQEPe)piMy_sx z`LqfLq_?j%n+Svcn}0be4(j{x$nY43Rog%Gh$pLrD43y1Sx2`^?29;o^p@0>J?x^B z`7ao%VQjcam{jhI&#p`^&e4jd5gG^O>C>v<8eTI*qYQ}-Enk2cv^s?wEOK3UUE z1@YI}hpsT9R^7guBakanHIYWDMPBwnw4C;^mmT@TvLsJS;6u8~P#&qs0x?aA7D28b zUZd64<(-XwPD+Kr)scwfiC9pwrEtpFhbUpDJZ|)HQXBz70}aL$5>lgm`WY9x=wh$x z^jjyDAJwu7G4C~c;vLHwOLVR*c2#N3-0X~RsW%VT^Mr|}pdgXMZT!!=x8PLSx(ru! zyDrVWN4eFldqb9BE;kHlUlmO?c<84cn8iT@v~c-r#p&f&LBkLsW8L&Gd@B7}(7NsG zVcD3F^i$(ItM~!L=D;mJy(9QXr|S=ZC)!Dkuv94*A;de`%*xXTD8j(1|F zJh3@ecEIKBM)44J4#D5r>eWsP-}QLv(^U|rU)m|e!^6=`oN$BVVC21IM)!i-N=rcF zmKf%cUXg6~yqqp=Bb@Bdyx+#=z%N`1o3vC*wk|?GpI~2u3G;-0Fq5bIMz4|>P`(7T zF_$r?`0H(qr0SYo2JkZJwELZ46ue@(QxP@6ip25Wi?(95wYdHAOpE_}&NAyozk$-= zT_`9ljwXfkw<@M*WDnWuFT7Jy-*XgBViBu*of`D7q}doZ@S02-%wgQB13va6zt(N~ z*k&3iCK8&(Oa61gS(lPP7~72JqM!v19LbgGs(6kXQWwu9qg>{Nv|*m83%;!5pCc+WGxTS{s+oHr~DP zF%b;A@Xy$Hg`o?F)6{un^YVOT@>=1L|8##zQs}sjl-$z@s+xG0p2Brxd=c zT?iZ3%D}I#%?!~I5cy_B)zF_!W9&TJO}ign5Q8}7(<*=Wrcq!b<2S2;n}(%v71}fF z((YnG7DaUvN0>F#r+B2z2Fb@Yc=tmpo8-Bo;aiAX{3hGa@@CG}q>3jbuJuHnB;p)L z{?6m0SNI<{Zkzt!d&01luVc{kK*Co1g|gZ2&8%Kg_8qPqI0NPJC=-gLc|2DDTW@#n zLj83OiH>zV6#b5POUO&sfT)uKUKBefVX~Xu93|oPfwXbI$H8%Gkv-S(@kyRHT*}$7 z2+%4}SADR2L*E9l(@z%%7xeTpAy22V4p6Hp_>qX4SttI(-eg|)zEx?SB!Kd?n0Xsx zjeuDn&v`J~9hTWeky!#%SvUNTZ(6XMkO5}m=WztK#&= z5V&l+OqH@xD;UoLK3%NK$^>Rh0yt{f$Y_GC4oz*O`0JDPc6+VNS*bu@l`4f@zSBw# zMCK;jcZotxE6g5W*(1Crr|lRuDn86sgFh(jB)Zb|0;WafOYsR}e80IBIRpMt{qrf; zXIf&jD>4)3Ot6_liqt9tDU-nxkC2o27b|h;_4SX2%m5}(gklLJ$V4fw=={w_?I${{ zZKU6QxXD3M8E&3Qo3Z^bP(^W#NQAjt-}d3+1hpw= zI=H8pMIv*)$ykj!-)A72=FB_}Gm487L=a8OG5nOrie5u*6z*8O=$VVH^kNvkCH3K$ zu}i~DI9Nz2cAjCNK}ROV;A@z_ycpBl4y}uKTCw+HWX2E|C)Ez=m>4l>;mjiv7O0M+ zb=tb8WL}UKEMGJEEGTpw&AfsjG3HJ`X0${ZSp>N+R(vf2>+7Qj|t3Zmn9qk+O4Ihm*;KrBhc z0QRE91fg3T>W%IS$bq9!q?U8s@CCspzaY&gYbNWE)4SvL&qSGbq`C+u-t^na^^Txu z0w$=e@YVmcP%HG4vQN=V$Dx6d6M$go?k+0A>m+zFipTCWa=R0t#m-Y|&s{7%&gNHE z5_3eZyl8cFWlP1gVbqIdJZQRMj)$ZAe}?>meXsxg@|v9$0L$4-+1uOm49lVp={-2w z+1Yt|>cUBhU<_Cg9P9wVO&3=;^G~KMMNAnJoQ*|k+5-bW4*HJ*nH|F*Xu!L>k29pj@>Ck*@A}Ell2Ym(Yl{{7>j+&)} z-xH|^TfH)2$;nzL^@s;f5K;ijU5U4D3)*k8+j<@1ji9#9)uw*JQXQ$osJ^YiU`yFx z?Q|o_I|3-H4|R%6OD@((J+KVa>qO59+0B#bTR) zqs~8eRRU|Sl(}6h&mczPU7b8EgedVj%TK}u8gHzmyCPR6|->ly}Wp& zdJY!uDlxZ}T!rvttG12>!zIyX=lDQ@N?9;I4Yl}#b*DGNJD9_roQD<1$kh5>%K2uc z=HH5~viR(~zB79L=DGaYU2f!+TBROeTJ-ye_#_YA|0?;R`pRvwAji zGGPU<)G*}EKB%~b6DJB-K;YjRSwCqDFo#3Mat;p$D6$ig3>2C}|AwMGt}PAzTyT>P zenKSz=hus@mrcIpBV&Mxxb?E3fG5p6l0UOvN28ltOG`^p!@GmKyGwWf zmYSgwH@2XO!|IUNXZRhUB@{DM2gwj5HMJAPw&(RW9}@E|57`eRM0df^00B5uY(37k#Sh)fB&9zN9%l=!5aatzt2r5@5W zpXPK8lIW=458VDNRwYQnKjMxUESv4p_t(a|2Ool{^E)R@c|#qaHH#J*idyw1=??gt z+jWYLG{<`qGu$z=&l$o+e8{2E|G=Rd#bz8*F;X`B z^3qrsBQGe}K{#UX_O0in38rA9nCm>@VGNnnh83&6AU(-vOY{*cAueP2REavLHfMsW z$w6cTNp`y1%-%J5BeC6tY2RaaB_fIuiZ2s!f( zWtNl##ON^EqnqT&NsxWVWuLv|k_8pacY6-wg2EJ5F@mHt!N{57)tX?&T9-D}u;88Z zxgR0`Rm+&;#s{##0Ivn40;C~#FLu2kD8h5onw=pR*HX8WeKioCzCj3s%vY_^t-v~> z;u2u$7oGYc>o)`FbuzJyJ`)$aOrjsxNt;ErdDP zXG>Wnj*fBycmpQ#5+Nt&&tAx(?cUg}!Ti6y!i*39z~N~QI9bU>RU;#?%vp+}G86&cGjDLxUcfQ|4mAo+S7|$k%Dg*2D9`V#+Ub zSqm7wIa#rTd7zb81fCekE(do0FPZBTeP_2cvxMupUkhIa^|zFmQc)DJ!L(Cx>N7|) znmlvV8cIA1p9Fq3or2exiU|Tk zHj9l@H$RA0)+PxXs6Mv=ZhW?X1Z|u48h$}m*B~4@CvB@aJV@YkAie(!prvGjpNg4f zKIan(UY&u*b^|}_bs=f`l*7I1G{T&5$^oro@Uih~*gyDY?eYGI`rOCm>iRgcv~+;Q zkqZrE>DJYX@JFD1hqd~@`pdzKZUlH*XkW2(V*tvaFxfD4b3U*kOzrg-M@AFA`rOHh zF*H>tPbZvT{zbKv++=#*oX!p(4?k{);t+w^wBEjb8;7D)S!6aHjAa*3NMg0P&76t^ z8Sw<_9Jd#dx+I&Q=RV*RVru~C=gDRJc z^ThB&ZFXOqjtFcaG1T-v*GHuiBP2~;cbViuY-ULG0qIC}A!Zj%sMT3Ra(g&)w))YX zkqwD|EV4F^*TG=vTD7*HoAUl8-tqGqD_p6)gkp0cHf?lIz;6+ChQH&Q43os=XI1Q= zs9@!|4oB3)EjL_OJ8R8E@LFp=g^|_Fh^qKJY?X10 z+@kC*@VQp$P*lQ6g~4J)Q=)&B(}y@S4dPaTB8!(!=JatD!on8L`dk^f)D3#nbSw-@ znGyLsuJIJ{B5X1eYwG%3aWUtT%74L7qHQD~?cj5b{D^Yw^ ztnK3N-&H4in(ayog{%|5<{Tmwww~@fE4a&OZ1%Tar@rWju|n z_B{JUg5Al4N5t)Cm3RhJMUyQ)NO;z;6^q-gPq|Wj8e+In5!Xihzo4dD?IGOzoA=~! z)0@s7_=3&FGyrGEGEd8-nx*+0ClQSUsxJ; z#Q+6mi3mDr$iwfAVp6`wU=dx75w=k9hYy}euhgGV(&M)GE()Z+S|@`z+Vzm2Rt0I7 zB!T~yQ*aUHO`3_yP=_|*QgHWkA?*G+qXUzHtAJgGVDM}a?zD=91OXy|4JDXD$XoKe zDsBA3UJ=-NhHZT-&+oooh>lemssLqlUT(J6`u!Bgz_`os1wEi^lTqHXzMgr*P_JnolrleN&6(r+SY;Ug*DT>t#tcIGQ-*+)iI0Y8b5DaTsjqTcq zXG%>tmw|pMb5qBp5C#W26NC7AYkK?#0=Gfiiocjua;pWkV@PJT>DLX?%~YtC`7CsD zA(OF+I=$>5g}+Vj?mIkkHtjqy78x)GreD5bIXM1A^y*=>ER#~~_^KcVKS|ouigYS=PRG4Bes0tL;Ue$>^p>xmlb@MCZqBt% zeH>+@+b;Os@|venGpM`4oW>`2=vdIZz0xZ|{)2X|VC%h1aNPKJ{_DQkg>CJMtazfx ze1zPUnkiuW_kMQU=QiF$Q{3&%cGb44t4eLkCr_wuGa6iYe=~GV$#T1P4U4h=Me*8f zzkQ*FZ7W6?ayc&4N@*=D@Mair*Y3o1b*QOm|9eF^>Q{sPh-Z z(XA_a-0uUv9C+~!!7qs4No^;jkdlnJ{Ewb$6DT=t}GUZP!vzH;U8PhKQEO@kNmzR zOoO|LYvEb|?F&Zq%ZFzGVXz$VtsZ1rCAroOh4pzBGK$IXNUn+spF$h5(wejuxD;2pjC6i6(Ym} z%8JtdPNbwdZzC_6zMF9N=?M7$^1-1ZIJu-XE)VV>8LS6&B?7HW{VVMRGq0TS$4Dt9 z&Za0p_M3Ub-p&fI)O~8D+}i!6chEKK zD__4;mUjy}T}v3JeSkD99;LD-m3;jv{A0&7M-N z#i%|N*O=li>PfcHh!u02ckxRES^_MLu?_3+He8S9h%|HUUw+24?M=vJt_06sl2X(~ zc~(KbYGSaovQe%~?)Pi_fzE3}S(Y~Zz(ZQ`S3^a+sU8B-5yrG)o{GDS%ChKDea)GjXVBlac~VmgjM9ash<6A}^0^`$dxH8{ zv2K!Bc=i$OuJhxp;t`=_t)_W+7KN~>jL;xrC*VQvB`z!g%c}+Teb;!n`=yPC-H{}J znU=M9EQl^=4^y8+)}DMiGcTug_RJ|#62jH<>~8S_TIe%0>++(ss4EFg?81Z<(pzb4o4hw9BWnL!*GwZxAWPM7I&;E+g1 z&LL=wV_Y2vUiO{P?u82<2;Bid;G>`NRHq2g_P2f;Oz91U1;0TDl}2=h_Vn*Fpn(w1 zU4(kTjn3^Myq?%1VqPL^j`s^floN2deQ^IdKh5;8uS_fU;h`_b)w(NG9XS(a7QQtM zp$mnnXaP^c?$VNYCbah&aunv~WNGOUZ0TXk5@E|#TgAYCxI1ogalu%~1N{>Tx&i8h z7=v)zF$X9ArC-cjJrU<*p>O$_7K0#X_sEVfBCjJc$OV+f9R9233M z`vK3LioJ^{7EKk;-)mT5yGmi_o$gc>=$(9^4KkY>9`H_Fk#Rzu|1I$6*IaAu(wBvmw4$Yi*?$)Gb|_8t9Nz~sl_l9n$3Nb1 z-jKK2>_7&^S#o$Y96A=x((8WyVtfDHH&{@s1`%rl^J@P3dLj5)>b=Q1)zONHAh%cU zpP@{V3@wnfU5<*mgZ_&DU(0$o=O1lQPEQ?>8d%@McdQ>_+j}u!uSsx!cTzSoDb1s6 z))X)j<2l>m=-9p+T$)aS7rUOu*%n4Rv{^O+uZo%`zT`{sm76OaYL3hvi*@noxTJc{ z{4l5YFe6~>qRyw&XwuzC()BG-(JevwdCedwH!;4NUxrM=5jy5=bX4U9nW1n!Uv4B9 z7TAe4kgOGlITAJEdk95U+>i@Xa{Us~1&{pyZ$$oLXOY$+KmV1v0Lb440OXU`kTJn4 zFZ$UuE3kIKN#DV>WxSEWv@RVeR|& zV6Im`0SO8bSvpXfUYfrAv$EOHZT;6G>ZSpl#aX+W=wL8XXcntN?n1ECP zQG-t$V#)mciT6wr0ZdBkVeZADef^?E=1g{T$Ne{tH)kQw#MHR?X)A23Ec4Nd0x-FX z-rWG4=us*`+L$j^4`dLu#_Qu!($6#jHP6eT)J5@L7WMcu?oq5Nrq}d(OZ{WFS}oU81%Av^|9HJt*;};sZ(PSd zbK7#Z5SMfaX1KcJ_(1)sX|Abfj5OVtX}&3E)KyC>t6yIw4Y;>a+)RMkXQ@2NFe2-{ zmu_G=j$km0%;87vAaTCOv#&Q~ybaE2Fxw@XVhb-9FD#vVF?AjPmk}_9d7XvUWh03V z>A;Q3j_ZmQnd88)-@gQ%5Tol#Ckv%4d9z`sco}R*cqS z)f%abt~Mh(VWrtMs?Wf_M3iPdtIcNQsgkNVPjK~gvbJdaw)Q_x=0@#tp^oEO8J2pBG??7n}i_hcTcniAu zVi1peo_TlhPQ|7At6trWXp{4lt=EQac(*nTrfX}hgfuMl{h*PN2K&j;g@%-i2RLjN zi-y=ISJVTAeRX>~?LiA)>zgFUVTx19Vj(3TS?1(tIubmEhR{NHv6;()z#ap>ghMRP z8{dh+ariK%=Zn`f7Wk(Fj> zlQvyH7)jsV>}}DT+c9LSFhli&1lAa891nwn*KV|Duvllub9jQz3o3bH8d=>)O+?4o)1W?-&&Q(t$wY2l2nCp|ub5W*56ifQdvwup0W{dZxmS{(6DpsGV!|L z%i;Mm-rNzecbyyfZ-4dk1{f<_od{eYwf?DOh7BNe;^e@S04x8QUIysI`ll~ChXCmB zaa(Ei^7Fa6o;g3?oY5^YGEezTqZ-bbezJ5m{0eYk*8rHwioB?`?Sj$a@ZY(Y8`$q{ zHW+He@n@7RWLvvy2+Td|iuW6#H?Bq)RTheJeyGc0Zf|XC( zB14P1!KbN=3qg3wMk{OZvbU{dZ}f_*n=U~%-$5Az9fyN#mML6miBGA9l?H)OoM@cr z#Y*=-t|h^3J9PT=g-VD?m4}8Xg|vcpM^5_V*EQw)rPp_udN@cgW#w&e_<4@G7$Xw! z4!NpXG1c2kEUihzXi3`L@WMEisqqR$mbfMG|5P1NDSx{Z9@n44R@ePl!PpZgQEYD< z=gr?I((Jdj^aH;hh8=SHL=*R(gvL*yY%|hc`fms)642yTF>H@{3WW2gY+!Y+Bs?J-_kkf zcAk$&ox~mTAI-W3k#2Vd?6Pvgt!8&QVVGKNJl7qZzb^j6HaGmc*hUc6!w=P8`Fh~b zF^*2S*}71UXh4UG(*$?BAOo4Ur3S!4?Vm!BtxJAsojpYn19hGP)L1)UCisr1@da!M zbs~U~4M6b65&-v(3@|#AA>KsblP2HI!0SyGZP*@<`6oM0=gAwOXtxLQ#OtZ4lnuK| zY`>AmSU(>fedr~|f*KgQ@c@qMH{26EZ{8CKf)`S{$~JT@QM+E#){+)f#Hf#ts5ycn z-9jspXv8wzImHlxSV=f%I``t(klpU5I}=%=t-pbo%&IITO|K_PHLEoRe#7dh%)j}u z2ocNC&^9@uE)$>MZognkvEZ}V!`IP82I}I%NR43p{Qt-!hdMA2en$y=$@fnhwl?z1 z;#=h=!S}rBG^m8B9$`zS7~H{w^}wD^?Z_#gsfEZQ})L3u=C)MG{O3?M0b6 z#;TtZOeZLI;IJNk<6i?|atU@Zi`{wkX|%v(HK10_`RyHw^IDBcS}#-#XlFePGMl4r z*(?=XAr>5t(;>~p&5XcMJUa?XFN^!(uerd!mv9~&W+pUhovi$0$2|AGZdZ7jSS8Iip`5JqtOMtp6PX= zgYSLd<}Te#xG2Z1bwF5*cerDY>26lSL&p;*c)oG2@_CzGuD^k}>4>>H>@G<6353rH z>F(W-8z>!**5FxX)f*yG$^5Y58X7yuzQZcz_Yb0DG%OVbAst%S`(gMggc zCn$i~XLN^~a5cdnj&f?(yY4T6h-b(Hn-w?=@qVHMQXR3!6RI+TEX`+iIMS!`d0s>q zWk_!bLgz4<(nUczu}6_%?L==?4*25$l(V(ecw}M$PoH|d{TKZYM=02E8>w6`w9L-B zPVYhOshv=VgDUx3dcI8p|BC9PbP)F!ZGfa=@Z8&G82pk;?(>^6OgDOK5TZJc`!aER zPjyAYyF5NezCTSfbZlTvR6>IJF5BVE=W$H_y=_UIQ@>K8NqXj$AX9? zTB^u*A4jYi25moBy`{Ov>?a*ITv2dmbVYw5vEN?PhSa0*@xHfh=&WkQR-ul3N$Ifk zeB=Y)SR}tXXxm%OIQ<`~+ot(#!icUB>c<~q2D7ZbH+*Jv6t12>B7*pQQf_;TOv-ZY z@dEo5*nX6LWFz;{Uy_W9s}yprt&I+p-aRW`y%w+Xy6NDu1Vi2IbRQZeV=>&P-d@j* zT{XD;P&A!r^!J%-mH8>Y@yp)!oZSfp*{HIDB&3zEl{Fg2pRsQ6@Jq4rH|bg`=7%H2 zB^^CCQM-&*(}riWdSh&{ zZj)92v5$Rz(1-lBNc@l5XC>P2MPr@i+*!@tO)viws@@%Thk_7>psNpq7GU#9LECVs zx+eG;i2PHLd&js=QWQf0hh`XTHSn6DjK}tZ#raScu%cOkhi0!Kw8B2>;ZT%%T>!t3 z?lb=0e~832{r9A|bt0J1@6K`lrRh6wHg_t4XJDuRHc2lX9B{MI_itD;k_&+XBTZ(9 z0LyWsx`8OO|K;r&(5V3&`W>$jm&dio#=slYS@_I3@Eln6LrV%HcgV#2*t82U$vK=m z{jNOsb#Gd|5$BQde7u|}+C8~;%(ZEkPo98hld3?UAv62iH)6aP{vI#xeAzf@5~cwp zGu zU89ntn(^o*98c(B`t8g&q`Wi;4odW%N=kcl*9$k2pUsrHMkM8>b@t}b*4mJm>>3PO zAf@WJj*K}wzNTUEAHV2A*l{FVX~n*@(W#a^ z6#X|0A2)ErQjDE~1Z9NKCUPJ$^Yv7jwH!waX0rObvc+OR{Ho8R(s3p`VI6G7ttlLx zr5}5YSkLc_w}IeYm61XPGQ-z~LM!UG22T)w_C3beShho2ug&rT@E+#YjT;X*Z(=Vc z+m)195@IAPmTSPlYduS^4~h!?&9PJN@mGmUlYH<1o6=oWDSX%+bVAizN%P>zbrmI ztX_5E&**a!@v=!9yeJnD$4~i`!2TgKHTI5N!f)_JU2Q0zFxV_HdT4FCP^corjMYp4 z+PYM&7&E`sZXY0I=bae-&NzDSW9mMbm16f@jYg_#+d|ruuzoQh_0BAfr?hIg7n><5 z8x9a2;m37R#iww)soMG+)TBp~RwFlyEP$(Qy;4*Q z`Okrg%OSlpIf@rPsv;VD;~STyZw7%}x$z(DJh60|x&IX5GWy0W3|^7ViU3&Aaxv0uC{b zzU(ZqK-TXXMB;ugX~2aqEWt(P%weXSR=Rw&{GOV$ik$1ygtBC}#VDLUrwm_iZE%u@ z{TOuLJ`!UW+eGnN@{634>=OLgs|)?{xLF(Mdm>GUZe!3^yIxC6pkE+j2q>#vsP9qV zzABA#0((*o30XFXebmw=X2rBC(_tbQs<$iRtJI?BvYMLNu+~weR+a4M z4vh0-BvzaFS=&?9A8ecOoi!~Bhao2_&hovHo{>Tejint{i~K7xw?oXa!@XCx`YNN3 zwO(b#6P-=aORY9gLK-g?lFAjF^jjbI=YME8ar_*;R$?o6G;XEs%qGS`W9=4_Iup0#5nLvY8mL1hOhO!OTmhSasG3$38xO<)p`&HdIWjk{2pAa68MjT<`svlSJC zM4RoagqxlVCx_Eo%!#tjq$IjoRt2W1gYpQT*g<21S)P?OhO(HF*Cyk~^g|n}prq-- ztbo5r&s=f%4TnVFkafj6ySRamI0^XodWV5lhxD^1!p;rOl{70CUnww)xbEHwqmPYj zQiZII8JgRF#DcO_>_O>&a|w^`J)*%J##a3ld73ZMbs(( zb5@$gO}0q$x#cJiB7s9tXVY-Azc1?X%<7Q~mJaJt2sUE&=*4A=yUT_{nRtCltmU-i zz>a}kT+VUfP$=NH=g#3l0}XVvRxZd3o4?35MnVr*$ve5e+YJ|STMvra-UDEYH4=2K zLtzCTuln)nc4U_ARx;>XlJy1%;Q!g^QvpIO^Yf^$SVB%#&D*_h)<#DUH)p;>GBPqw zRywKs%6p_5-M4nfd)(=YONcprIBfO?1UrEYqz?_4Bl?6%nxY*w?ZqOz^&%AvW-A_U zQ9@tza0>`vWi%8h!bcpy4`zYee7{NPg$Gy#z|(fq+%4NTC+oGp(y%<^^!DxvSAVcg zOw@KiwTUoABU#oZGEHT2GjM)U89_rWM`q$MM>Y$?GF5zmZijAzJ;J;i>=Ns(+7+Ai zcDrPKJ^45Bqgn+@v_4uv6LOR8E)yCO?@gMeeeYrNPl?pT6w}{6Dx-|l!SFLs@?;GNeP04)Q zIuqE}XW=8LJa-k!(eGy*ibcr<2IIa{JWky%ooOYrelF!(x+ZJFAHR^c$S3{?mmB~F zQ=H=jKAq#b={hls)!;M#(NrUv`26@Hs(VM5i&JXXqH;C5w1YybiA>x^cR-;sYqhr6 zh>EB^1nV5Ta)|yC@0s225XAu!F7ul#iMY$N^R1O@tkj=g2Mx72@<888yOCGHhQ96X z#u+%hJ?wDDvlaxj+I;$Ko!YFOt}u7x2D3%svE)wH`0!(}k_WdD*8m4Ett*YO?Zm!E z>P0V^#1>nrTV%F$W$;VC99tic$=0T#DA3M-9HfZaI&&MtgZQ0L51i7uB5nNUGYbE} z6kHSv%cq%zPozx^z1e>^1(Z#c{%Z{e0$JkTEx6g@p0AWZv zT##j~BD|gpOsx?3=%FV=4)6%9c6YPd@9yrpt!Bsn zf-E3w4#>jLM8?hbu_l?@^gBt5}|RkntsRg*f>^2@3G_v*p1kp(WHG)$&x<*IETP=c(z82rc}Ro7_oYxKoWvV z$;=~DBnoOWO~v{$Jo_;em78d@s84l^V;HvdB9R}C|IP%|v?#HKFVBQ*_bhFzoBtpSH^_6)RK010Vp_SkL@#d)yC=inGhu;&ptpjf0 zzov_MC*#yeV1Ry~H$~(PRp0%K%o7n-!t3JS5r2UjJm?-j6jqu%)l4}uDaT7@+#UQl zn4URKu~}?|VZLa^V*x@ALXj{KrQd?dDzU7i*v_|l5v6A=irZH5@b$7R7>+se$3P!?Hu%vb?X(`B}>&jKH&~adW^`Q_s_qP@bcV|PCf{g@3 z5|;U0tARFuZK8;HUNyX4cp?|LCsdAPV3JjSPQYMh@l&qhM7$RG+}{ki{0q}9{HK@F zglQZDu+MR-3@pr0_P!KV4*T5;*F!5$D+}aVSfA9n=vcYZ3-Z;E(2&$ISU?VobL_Sk z$dF}a2_(;*rTG~CbY;c6l97b{*o;e_y@#Zw?W)}wWYbkj3x(%HW3e)m^|dQg6Mz(FejFN*TYBBb5tSs*7Ye+}$5rnHDdP0HMPzYbqX_Y*B zg~Sx(VpTL7!0JFC%IzHBkkG_!*{a{GrK$A*xpHh|{pOOkw|F<-I{A>=TIqgd{pLMD zPS_emX2FW&$n85s2?ZKBcj;<|R@!t>w4xnjctl=qg|{iz{7v5y+PxZ#Y%P>d6vA)5 zjM}qL{d?5$m; ztF+C9lCzV)?bScULqO2!;c2VvhF-cWkqBJN{EVnvIQOR&J_sZeIS3>Y-UZx>TJ+KZ z9jyopYcH=L>#e6H~HQ3V`Rxj#dSR+0-SNd5{M;oaYCNE($1RufQ8uTe^|bTg6SSN-PCIo~UzBrM(5 zxW$G+6eX_RoL6s5zt@BeT2$0ony)kvxZ|BK^}x}j-9t@7!vzm_mmM-*Hlg7f)Tz>v z8?`TWkC-Sm(sZ$~mFiHvIn}0Wzf8`8Dkss|rwJ1())bwqhwb46p^Bx?C?i)6wAf^d za$q9OFD}mzGIyf7(>uurvU+lRbXmi>N(x@uv2?wNK zs|SiQ8MD=7bXK#rUeF}kC6nW8y!QRhErwskz6B8)`D~yBnsWUNP0#4X;M}vJ+OAlX zI*tnAbtmv=T0+ZCbdVU<$%`<8)MUP67e3T4VYwIlGxvess5O&6Na330itTTBMVn88 zeU}WR(D*BTJNfBuwNOJ*TpO2qssbz#H7OyH>T!PoiZ&w5LfBY%gFZ{s$3O7o<$|Z< z=<%__31kgw7%fkp3a+{@p0 zk7L>ML6KE_0tfnC5m&F8H%}^+LBf7YeH$zaCt!`14d=4Obe)Akj{=aDQe>PwfgRhks%AjT z=pbDLW2{>MtA&9*3Qrq5ZW~ZH^6^E1c+eaEd}|76i(pI4&eisM)3ut+0?Z_ysleEC zW^zhWd~R<9SCrv#Qs6Z$5<=`$vB$s?w>#w71piv){31MT(uv*yYJoF)&czB;u)1|W z+H20EHpRY?;S(H)QBI2)vV@EdpuI=m(A*Hs=I#29D?BRlXO>2`l*%y5D@KqpD8n-D zr7f0cLNe!DS%Hy&B`uf=_cLSMC%c%R#I#5&s7UO0XrD02y%E@QA3R@t@p_Sbx|t*q z-|6OyP2Kz5{VVTZ|MV~2CDv^O1I#4I5(`5Qw; z$opZtgVi~{x$J1d${#07o5hv2)orf^{Y8WlvP8KL0?qXJMHUPTsTlk;Ki?Z~=oc4C z*x5Z&A~Y4Kr7nFA;@zq&3<$(otlr;SoFMr_X_pkj`0T>}ho`shi?R*3zX|D(6eI=d z?oKJ`7`jX8?r!M@fuU<)Xhgb^knZm8?)16t{oDKb=XwKk%=tNDt?x35z2(77Fz2+q z{>wP`gPgv6l2zc0BH$KsCFK|Q(YQ87bkOXu^>oJm^ucShH3*t~Y!%rZ6Fbd{Wu&*B zP)~ey(%(ru^c+IJ^3$2~{|=tx@|PwHj4yW&w1L3oCnFD%+YC}T$oq|{$p!R6BR}ndIzHxYxui%MsOi55)5Q4Ta@)R#sGs01Tg75 z?omGa)&-XAI3UM?(I<#&AcKP}jz_jw^a1YQze_72T$KWWy^b`f@Z-&NXU4R!9ACJ= zrGiQWtS}09QrdFrtpC#J6L4hW$>2MvlHr&ToK$=$=>;euTTF;g(13wzwY^XIEMHMV znIj^L0t?QuXs9e|@Us{2nG{ZBN6;)$3dInMH<3#nD66*Ui}>uL(h!-9m<{iT;n6;z zYcwt=a}IIY_qb{Q_9-Rd|IyZ$gZ_a(eqm9?tHu9s+Izl*Ny^~Xnmev5xlE9QeaheJ zClarY=D*5clO^%86bjH)xVp%kcDEE3Ol;}82Ug-K2gw=sy^j4= zB>3r!9&Rs^vV;QosS@G-YVG0*7W>jDkzi;YWktN+&3GV#N4IqpmnA3x<>!yfNU#uU zU;Nm3%4H1rx7FwJ-+VS5;}v>^7&(@2P089LwT(;=)}zuPjJsh)$C2^xcfe;WWn;6LtjR&b<6D|3WwkEG1YyjgZGq+ zEhW=A{u)Q;_y7O0!&vm-$%NKP{-$GlG>qbBWC~{Zl}8JKihOVt17({(`ld`YD(g%D z5P?ph`$$Jrq@SL#0^aM4tSQ@$$~@>WDMHKHC~sp;Y1d34t@3~DjbD!8je<8{wAAym3mW-lEp0m#dbw~ zWOAAg3Zsl*E-T8py8cy&nw&p9D+^U8nxh|RGu+sRpb;uk-z#DI2FWL-mwr@FrygK@ z^rb{j>j|PGc}zt%PS$~8i1=H22AH5t*4*E4Xf1i2FWvh$N^`fzT)XPKSi+cJb{L>4 z(|omwB<^Xr(+?u1DnV;6&*vs6QG+nW*vX5R*W;p+nAEW`Pd|9(r^Vo`Q{&6<~L zacmf4rXj0OcpN=s!Jj&lYUTgIcF?0e@hs7gH<=wNa8IVmC|_tvhpNI~EoE?!V_W^m zzU8`9Nh{Hb*Y=nDQzdRHpcb~>0Q#K{XW73yKq@ix^*EjABaOSfAf0blrUOqYb0r#}m|J=j?F!-Ubm`rs7qdjAFCCN&Y`1O@Kzf(0zq%`<5>^&n%L{E%nV~4U`=)Qz(F< z6s<(a0SVSp{W8@J@Y}q-T7`GS{l`N4uV5qo+fE~c!C6sE2h;4C=UISAJ<}l?PI!E8 z8BiDkpa5hAKjfGF^Yzbu=d;K2)c`Bt`tI~NVe$T`Zx~rY*#GKca{G34v_2N2+41w~ zsK@!+D}V@qfqVessPO6@KRAqz%4SY^=e3~bgS2qG)PWQHj9MK)eX>;;h~80s=&hbk z<|yC{niBdY6(&w;$zUr(2QRwV7d`msX$Mm+_6OfT7C|h5EMw;nQnM$LDcwvptO{y! z5DaYw+9&zHtjXkXIQSAdj(a79+o7vZfwnOHssi+QAZdC;NN-ZY5G@V-Gs?*pHXIxq zLK1Z^fnV<3l3B9)OkX%{zS%#8ODXF%-$=E*!Y@(@fdp2B5m!ZK_ zy&G}G!z=j@w%g&{<}t6dUR&89(f6xN_&2U>9`xr#ue>(qkJ9Fzhx}C{KjN3)p%U<#DN(z;WAy@1ek8nn|e*b%M z=}taXA}FR_J$5keU#H?cHIzb-iw^+PkoH7t9#nWY5BdryX-N^D zHb1l59%+wp;lmK4f{z;Z3Mzk`r+|0 zlXv6Gdke!(|GSsRZCYgj)UUt3($?9~(a_P+f&DN(5A@>19_Ooi`hbMvN=IA&9Z&u5 zHX&Z#fYT*6s!M}rZw-;4%@@-LOCEB<0www$cf{vo1h%8zNc;3F`JD;W(0#!EpqiU> z?X=&HYq90;OW|~Wpi2Kf3se7~;FknxtZ&*7?Ge7zzySoH0fukmO@0W1JisUyShPJ+&(2nqeR&2^^H4C_49_DyU!_Q(X3otZCtRp?$AART-WZfyojN>{3r@+MOss%*NH#(i`*)O>9G?Ndq|@Zh|?OZ zelCzRleeMERxuN&jo?&ScYjG3g=K{;Y!t{%VJ&Na#Gx19J+k4{JjGc1IvsDxjahel zy^C+^YDy!;Jt*JLS}Iapn|)ArcpNjI&T88`k~Wz-A9-kK^eR;OrZp{Tz>x&OqvPH~ zkMEm57o3;^z(f)3zcQK&1j7U2T0s!}iyk$Lq%P_0IT3UuP_n zQr@n@3$JUQEU(L}-Q*HwUZ7g_j5<3Ta%!Mr{wxC?=fF0v87S(;p1FYQYanwRHeFXo zClyz#$`EZ~Vb(^gIt<>nk>J!45VisWZF~PAap&gz8xQGD01#R*jvWwMVX# zPO)9#g9=R`8Ha@$nS~=d3pCpajNKOciH_vo#AN2bQWQ(9TBc95a>itsfeTc>-{oPv z!4)5}p&HZI;?yg=gJYNH&!bH-IY4p5*jC4lBqGh%@0xD8sG<5Q_0A+ELcQP(k3}K$ z!Usb%)g)SN2jfznL<*4&^;k>mDB_pdO}2~VM~hO_Cv_pYZn{sNsOAXn)sj9{&^Q5l zwI8HW0?lh?LU}YE|H_k))c30-SL--an(M4E6vsu==7s&+*OX(|e8W1Fwh^DMQ(XoY zlx?r^I9*)!;ipYHhMEA6LCC$}QD~(VUew*FF~}R@WSMg)d#cZ-k$s+i3HH11c=&z& zhh4Nb$?v%AW1$A{8d5D7tNXYOV$W^5MB5TBwNu_q?i^G#=p{QGrykZ16i&;UtU#!# zDoY&$oJUR`=1gq8<+Zp5wa)UXG=dKU6nPs3PU-XZ-D1F}<&Au=7HFb%Qsoo&zxk0z z5GO1OI{X7tt6da!D_jEfTQlR?tz04>p<{MUe4V~OYN6mcsqEz%_A#DtB%Q&}1j9qT zE#GYq@H|Ft)|EruZy5)MhqxNMO+SKCb3qPdkVXh?8{6|xI?C?j!25wXabyy2!Ijp zx3JMdW_6($a4ZC*9!QGJm9|2jgufoYkQsg5l}MQ>XHhv)r2G;P`=5=?yRG)o*v?Pb zp9he2>};I1`!t@f=;#_|WE!Ps=5})PdNBT~KytL^r@Ai&RN`@i0h@ekdATxV>mxC) z2K|(uQQ2lPI1@XB9rKYo=o1vfwiC{1|D1d&9TTGg79|0a>;+_xiXB6{1xTv%Z(>$t zDUnT_jtcZrUNLINjtnQ&NV33zMcO~s$`6YlwtyjJK%HXpd_9QL8mY7s+vXiIaw#?& zZmcFMm)yGFeSDKJxj!nw+jZ{xm7x!c%#?9iWq>&WaU25rO96#4AFfxqdlz~la|B0? z(J5i+&!V=4Qo@XdWOS^XjfjvW6EY!Btk#cF(mUlb24y|gNoai!yR>+LEnOQ$p{H%= zseJPOUyxL!;fogth_MUffMK-ZxB* zT|?>1%8qkLf0bsfxx_1<=siGF`|?)rRHW8#VA`qHy6^YS1#&n5IU)=Hl38lN zlYD9Z=)BGFE5;d-tq@i89Y{G9$?75LB=PZ)+frc?u}vwaTKM}zJ!cN9=2jwCwmwoPmCsOe(S@yQKk2{Lo0&gy2dZo7918q9e$z7B4X_pX>P<`d z-%n5-u>Y(GL>yO5{!;ev?MH~M41IS(xK3J^m}b~~9Xq-xLPgY8HO4B$cURGWy*&GY zo(HNw@=CA#!!|888e=78?<^~9#6b6hSZ4#v));#3^9J`g=NUVl z8Cxo+e>I(hlwX~(lBPMEuTk0R$lRDDW25272+`}XmKO^2|CD>x@|Tx-KTp_S{xe_t zZ2k+hVz3bZw^*C!gX8)gyi_O-!cJE+w+@Izem z1tnS?tvoJX6C{kLAt*tOviNaYYg;} zSCmBFs?7n|bJDMwF6)Cou6m-X&-Q2*_$IG$e;X}Cs9m7{9 zC(abT<~`^lzCL|7kI7x&d#e)QwPhYzvvI#^r0ZHnP7B zgPDjr*%=z%iI|OL!by$#un#fm*7FYv-$(bL=U3~#9cdMxiy8EMSA0L(^~hNLDiTI0 z!7(%`Kk|jJS})+2a(kcAz_@`?_Fmb~w+txF=Nlq3tE*+LTCwf3(Eq!K@9##xZ($x> zv+N9&0~AC3?22|Kp!H^qrw&R>YsO+$Aai6S1d`&cTMLLdfUv76Oh2GIF~I;I;XL8+ zxDj>DWTf9g#6gMQ8NOXxP0Xyk=%a#l+x_-|U>+8IC#11i5pi_RZImJZ9Sh)|4_1Oj?w4chQ7Yv~gI zy(Ia5w_yEBD^3>H+YVySbg(W9nfu<8yN0*7TX598!%oUp3g$|LWmmms!$_zTU`(#)yfA@sY0%kHgS| z-H~FXz%Z0WiC>n@^lAj5di-e#akPJsX8BJ(V10O4hBcA(;>U^(?N1>hrT3?_qU|RA zYV}U3uUpklP6&3g<#*Mk0q*a})E28fmW^}dCyi{5-4ZqBO2yw=bX|dDDjcrMC+MY% z>=PI7shp*SkE2$y1OiU?*BZPwLJeoJShQ}?UdkT`&i(6MjGHO87xAAfhPW^xm-aEk zh2NsUQ2Csck6QABnh^XH^YB%%cl!9Pp>{cn+r#tCPCgwn@wsjO z*F2%}edEWC4ykuSa3BZ3pj!=`yDtI7os5%12XHqz2e`T&E*9V105grf5#*Wr(90l2^O*%?3Q!T3F$CQON(moVBR6c zpqZ!|e@0TL))>r_gqEZY#g$JTWhw5EmK5Lv6VQavuV zL=HL9!+%lriuFjy@ti?3#kBuS@3QPi4NW0zRn++NbIG7mSr#iOjYLhFf++a&2BbE6 z-=;j9`0uJ&wmLtAOD=Rr;|57l*1kvdyRKX&gZDvUuYRx3^+&ou!Nq%Y&i!&SI0<4*)EJyDT4|~#Q5>U9!cE&sJz}AA};KjDLTy^s$_ZWWC7KjtHchu zex|4donY}=YRjN4Yv!@~#sV-5?z*sxbY(%ot=j!^Qu7>dK1gM9w5~Lvz&`r)E_-v6 zmwID{;M%5y??S+cz-|1Abb7p_8bY={2;TGlzh*n>Vc(^i>x4nu_^8tqytGElHCrcY z6oeoQyxjmZn%18dNG$+!47dXxg0(Cwh93%~UBI~zG@%}@(0BS6M-T$}@)sLH(LfFL z#)j7(oCm!fMFL`?4g;a@WP{95m#^J?LDdNp_kb48=9qYRm=QKmS6kaqM+XRk(lyl4 z*Tr0z>G`rFYLsFG&*1jj^3v{oy43gA3)5WgEh{%01M0g!HlBr%;r&VIed)~2?;E4d z`oNmeEDQuVAvfuaDJj@+abmZNJWGjwhHW(B_lOyp+1dEikyVnUYNG&9TFOSOSaP|* zcLdq3GqenhAg&f-{PEN*NZ!j<^3A%bK4$ml z`~4x$Te0!1CQV&<*U0c5f6}y&$_fZPXWxfc5ZYa9-=v2JN?*E$xj8a<_BrabY|O{ahBswZDb)JDac5V)QBDRc}mjw;kPCJ5Z0j9f(XMY8iFviK@D zU4N&HacaO5`mS#6tNht6l4I2s`X06X`s02g&)Bg!2H|LVdIXbMv0?a2J%w-6`(LGp zYsF}=9;u1)9oN^hd)+*373uSSlEjikf3}Ik4A*vGZEZsJA(rK_&eZ}U8S zdHn0>f5+rGRst~%oLQ^`!OBD->rwIK=AbaCal~Y#UlJ^qehDV~5pcCLNVvf1w>y+N ztMPGYH7qPFv(et5(@CNVKa4cGTV0K&hE|HLM7~&E-;vk($zPlb2)=|Dr4qNai$YNN!)guy!rg%2|34fN((R=Rh75?MkoC@HdnYA!u(8vR=$yTqdZagDs1 zXl9F0%7eWL$u`JRJA0se#`J940+ilUa?cgjz%AsKe;{aP!L%Yu<-^7ll7X^xlb zQ~Xpc!s5Q#NJ()_5<}II>PTmZQcZtNLEeWDn+yVj>p6qu=~}n*JYH*D*Y13RqryXF z5?}5_o_Fe&XxK(E@)tgCyV|TV$3y<%mjq=iCQujh(DCPa{}+LNjEd~#Z(I}e`kCjn zyV==G{30E>-gy*u^)4=`9{*UId4!$~9fVjKG8*0;JiEg8M3F($!Dnq0AW;n~5Y_T- z7axt+OUcG5Ow&Ay-n(qUVRW0W zcvUMDVmO?>fF`4kR{Wo06#Epy`3DI;lwS>pGEW~2ysvYPu6?L4CAS}@%j*1vkxmq4 zwj(gG65aNtOn*fGA$P=cRMutRL3E$YN!d$ z4Ps_Xj}j;yp&jMGCJ*W=l5s=wXJ!xy6fC!~86MQI@iPnY2e>L&c+wLh~Udr8XbH>pvwW9NM}9Vs$LhJeA$ zh`z&tVK+VMaop;L>kasiP7Gu$E~ciYKHr~<`oBDMhlFDT!BP+wtDSB3i1WKxV%`TK zkvP+Bbk!4AS9SpzDch(z`AN{vj;^o@3>*<|XJ#)2c4w)u@d52lPFheIT|Z<&fG`yY zv}q|K=|&aq#Z{QX%pf2xRdkF;jy~`~5g=W?ua}M|q-_1L`p14syTE65FxecEj+#k< zH%8rul9xW~X}^)dc_P+_OxWrciH3Vm*+v>9amMzdD1;GL1b@!ApqPM^5xv#TjTmV< z!`0VgX4jSS*CL@+yR_Z$TVTqBJu`xwDUBBy=MlA7@<~1ua(^2NPS~f+7EK#t+p=Jd z-@1*T$F0pGszn#4V;|tqYkIVB7*pSe?Fz_Eb;QZXK-o<Q9y=tc^kduZ zYwzXPsqI0e1%!nA$+bLwAN5jtE^9us6Zgfp)WkFWbMK5%aLy2q3vT(+^=z#>>&TF6 zs&Ht4q4^!ewnTuEmzxM>eCVEvd$CU3% z8nbwt!UG2$MMbp)jB7;N6mfRu%AXQuPbJ7oot3AzelKxUu6gVl5<;=zF(xvL5w zAWEae_JeC6MAx<~cCVGr5I7z3q;e=a{em)0&nUWs<*X+7-8_3BOLzyboM!=Xt$%I;`cR{O=_>yHKs? z`gC-(GCTV@o=g~$>-ly4Pq=G)@M3mG&#U zWMxkl_5`=DLs@YM3Yc@KM;KP$gumqp_`K=6gx5jjKa>1$r=j^OO5KHrbdy+FbBkP% z5tvAlF2{$0w37HuPmczvyNWML(uVs-;_g9j$0lJPyssem9HF%fNrh+=V&jpRyQ5S9=jy|0Smz zYX7U6A! zs%6EM$rsQwy6;%3-BlWyYF*BH8SVH{aE)JJ#e}RdkTiVszA|D78fxt=e6@2_sxak_ zxWXR!c{=yBoF_d2vvS^g#@b876Mr^sZ2JlCN-W>OgXNfYQXGzS{Xv|T_(DlrujOzo5*n%-z zLm3$V3r!`%Wumv4c80N06$DP3NLNV~y8+F%#ODiCTJB|=^ii!`Z$`a6+nj0PZ|!zoVbMPV_da1t4e4N1LH+ z8@G7H+y5!$8|BiQ+g<;{S5`C7`U%&rF(^VIBd`Nmk$WM<3EVRC9c*1g{{yn50OGY@ zYstuh@Z~x9zSz5hTLdQs6cuSppo`6qVUIKsEX86*@sqw;aDMyU5>H-Fw)flntS9V! zgfnTbLgWKClcPM~^Xu;akz_CXyzccyrz!vQy#s)rDSJYDs_To3i)(9;_b0q=|HKvi zJDQuRl|a}S%S(nv>)Jr0udf@`^ z>(nwUt*H>HUyAu5NwzG3Y%X@bHKw=x1d@d8O=s2>&6$9uf$OaSoFSiS+|!o&e%1-{ zH1F#K8R5X-pN~$I1y`=4feYi6jUR~V2VQH#XD5QywmgX7K3ff_C6%Mu^)s~m=}Iv_ z*%wlGb|vj0ZPHJPE#b34K@HW(30_R4Q(KD>;@05X(WcPFdTs4JM?*7PsWR65+t5>C z{wQFXtRm~4hRPFJm5a`j^o?M`ty?=zD5efHEHUFn0vZhU0n1r6D zP^oyBZ%&I{S-!?2SH%^UXoYD#3HpV`k$kOcCU4|Q<6Yj7ZpO?-V_*=h?XIxON5S8y zW!H^1vL$kVyE9o=O;r&j_oA*7GJi7)GYT*TGL)ka%}>S=rTk*=Q;=0DYe@>!h-x7W zQ)jJmtT>W*91)p~u+!%%2wnW2=NF{B{$-Q67TWS=(KTbDGl9#-JrXP;2cbU??J)Up zGc8d4HH zhPJj!q`b&CfS}{@YO3($Z2>({)$|M6vGgn+@M&f+=+j zV#ZVnbXsnXeFZ|#)Lk&iUITshJ{i71tieZvWM|Ki?E;FNVrrPp&rXS1%I)PMrTL)bCYS%Lv@r8#7)G9 zk$~zbMTDI}po34VY7y~6`OK`7sZ5^Si#2i$lY2w;goVyt9+%mZ7UUeL^~7YXY(^(4BFYG@-^Pd`utZB0{-4((*29maz%js3>Ro@^!M@8 zy@m<_EYG3!unt4@4kV?VOKpioM;uyW<`_!utsGf;Omc=SjXmej7CN}&Y;G}T&&sefseaOMdfI}DTe{DT!L3)^wit}cjiz6 zv(+fHFzRo!HSO2IE2)P&VU?pvR2_}p`%F_PnO9vrWfGzdys{2{(-fU>efAF_H!mnR zxAd&1WeG!vXR6o?iK+wV?CPiY%Xk@PAJZ^=sYZ;?<-Tc4qf|=kudTz~j~B^uEXQbM@Vwd#-4}o$dX&MJwP}Uu+Ht z@H0#HcXvN4LGF;bCl>+|BL)FeO@oK~R3U~)y7HGt!0Bivau=#NN^@Z4Px0MSnNJP% zEHm?S184~9O1G}C4VZOWX^o@$WyzsyS3{`vA7LAw@8{>{`NajEbtm74UnN?8wWpfD zW`2^HCz#6jDMFT295<$b=R-f7knyInRL<;wa}`Qr<(EtRsZ1s166M^0!hz&|Wiq^3 zc*X~gKb0L}q6v}vO5-DF^5oR-#n+(JRzmoO^N;aJ(NTHpX9z~5i&6pg{w2V=^q!%y z`WLy$q{J`P|94DPQaw;whIg>%fF2{^k~)JvkkG6^o{Rl z_{=6;Qm$#;Lf)!M>GPc_j3HKpD?1t88pzoQk+Q~wjhJqw@#ox8(~L(nLY)yy``L`{ zYLZ`uJ6c%?<4!M!=B`!04eqO!m(RyuNXk3O!|s#YGT-E_D9hgJgrLhewWQi9zME(0 zSjc=Y)t4%Ic7sDW`5*cq3SN}ul!!02M{#JhX*l$8<$A6ZTJJEUs=x7ZR8JCMBMJU( zFHwP8WvKCB8khT_Sya{nMlLMXON{YOpv`wa{`qizKoqtz`Q1_id*F(%SIvWh*Hf!! z0ej7w{nlVi2MNR30Lsa?fw ze#E7an!r>sjXdL%xzr*?;l@|BkYZEKvQpM&$Sq21@N|KctTJ~M5j{p*Nsjk_6X1|} zXG#>8K9Rp5&#eJ3&n+dBUyj4S4c-c2`IPI_Z2|Q0^Y8*4xh%>=a<3h zlKyDZbD5qGha@orxRH)Y(rueNg zVqi|gK2N4o`Aoe(t#uusEW73uJjwg^YZ?z8bTZsK9}_#_aFjBgUpGz~n`j%X5agfS z&ZZ=VKD_8<`Di;isHChiYPW9P3urRM?w2GT7Fu9|CI{IBnkjb5Ik|08;#h`w^IB8!hCTyD zyb=aPhy8E7ZFGZbQXYIq*kC%jK?Erc54ST^{2}jJ9Esx3$x)9s@ z^Q^IogXFq(tG3GYBT=ha5`U=)=C_Fce5b|`NObZ+>KjcH>33PUZcYchinaku{N56D z#tiK$Yl&j^yZ<-SCCh~S(+V0*6vBhdXaKVd>Vcpp`oVC|qY^C7tbk(nXb|-JWE3|D zYSi~16zxx-$e1rim--O5TXbDsqY{W77Bs?zAOBlk2~@{<@-vivB6)g7Qy|AdQ0lr} z*z=!R91GdV(ZF05@Nq0uF?R=F4E@9Amu!)wu&^EWFjsU37I2$TgdRg_Wtd zt2b8Cj_lTph&?iBM?zGcPx_9Tg+pD+^d&VrZ^>AAQZgEk=OM+M+u@f|F;dcXmT=WW zmY`GIwwS0jb=dYdq1gk-GKn~QrGWpvWWS63gHGg;>=QlsdB8EqGs z_4q8RsO^V?VB4UW4c(!eu@PL+m>4LR+*Sxx&exmF1&9d;$pCghQhOH5f=%>3jKM^3 z!s?*s!%ZSKTNu;kmI^Z((gqhbNQ3h5#C!S7(mcp|{$j;5FkAQU{kMmo*b%Y_m$hkl zxa19VmK5@-#p1j+=Nq*5r{;YHgf6>3mVN6d|7lthf)wekkrtT$E&kxn581073>_AqM>_$m3K1Q)sa3EFhTJ+K$IZd}k-Y(2{ zR!rje@j(-F~NZzY0w?ps^d7a=)D={wI)k*Bgi7Z5Lc7GMqEahx)Y7pk zjRXO5tKdNYxX`>e13NyT4%R{s*xlZGuri;RUBE+id6^185qI=kG3+7&gWLTXw-U%@ z&4-J11LJdupww^~^GQfQm4!gcC`Rkm{FyIiP$#VBKHTaNAt zrLK;T>FRsMIM=uzf(!@Ki9AtC=m<@1Ks&3#VBix z4hQQ`gF&0D9h7wwIi>+T6Eq5jc#p3+}uyNDOG&i%KCLccn!2XqoCLok<)(aI8j4QZ1^Q zWs!CMn310xUX@qryu9pT!{`+0PO}8JJu_abX(1O~qrxB$Rxl%mqIv0%@g~uQA=Dmt96$V7GO1 zIQEKkOq^M6b3B9fDw#t6+6&Rr;^pDtCk7yGRlL()zUAdM`o)*&a$V{pf!w?Um%cZg z{M_7YR7owI{9e`k8LZz2P0yfm=$nOc2NwSRIYSdo)ly%Nh(5be5#gZ3<`jLQ{4D-U z{bN$k%AOta8j37tzrX#>xo5C`+!rGDIqKK%BjGs_4Ub?l_Od_zim_7MwLYVp_QBXv z#$}4HlB>=uStmw(_L$?pzmU^jo?;(UBUTx-N^kF)?+FRGn+Qyi=?=_WTlAXv!I=O& z;KT0Ow+Pv`W~!$5(~--?w|N*V#DOwF#ws!!=pwK;6MfOm_+Kl3qhWrRARQSqP56gF z#Jlag|JC0y{jb~_{?!^*XaX_zqFkrjB1V_J$rlq`EpL3yn)EbN_maSJ59*J;7E5c` z!#xzn9~-0N?weXZ=s*qJ?MTpjf1iApJ8McxoU6F0IAFSVJ0r{cu|cH4Cit0=z1&EP zyWy2#-JHTq&PMaWGee_I9~!41S&*B{lHhZm+4OIusSf{Un^OGos@mXE8{_Kh&gu|1!ZquyXwXhM02sKBysxra z7Re?&^a7#%HVlsnP7pxmjNl5^b;yFaFIXLQZx1-!zwdavycD1|u_ExvL z&t9!QV%?EQ`9Mi1)tQDXRNwSlva-6W3IYWD99m?O7W44%&d<#ed@wsPe917{h;Dv7 zVBzjNEHZ7mvNC-bTW#gSddjC@yJt^1Uz^#XdJbI8{3@w@a1R_QstnuZOew4;HlW%g z)!gjtoSYJrpEhd?)ko;u&Q=cbT0L5XW0c2M1%LVz%Ek-Y18sx~SO?4)*#TE7tv%sy9 zU&X%+00q+2_enf{un~+QU$&XXNL4PZ?lKDK=+vNjNH~)Rg)I$Z3&X5aMQWt5N!XiL z2*Wy}bAV>|SR0z~(%k6R)Xg>#Pooieza8m%6J$l9#fbNtnJDn&xbIfnS<+o>*qzlZ zPH~VCEK{u0A=IIXv6n&QrV@^_(cb5ih%wvk^&s(i$04kJk_GY+>o-ZItzQSbhg zEDNRamQf1MAgY=;X<~BF^ro&|KH~FGx#G*T4GFp1LFR{1Hx!>UQ>=~RT|MQwD=;KQ zJph?$O)-9~N&WFm=h;AtIw8Xb>hfbCU*%Xm0!h??F?Kzozl|_gEUCH|%!GQB`9ex{ zJqJ<=hk$Osyo<)p#{E-+H&R&e=^~^hbJxLlb}t`a@JB_?)PmJ(zx|H3+U2_N!vCAT zyy2WXUwxByw<5Yy+`vaeT(_d*!TvZ(2R2!dCEO=qA8@_FRSf^cVqnjqSik9;jsRFq z4qE+e4!GR3;`Zfr{w$u;6U$+i@aBIcT=Q8t5Ry+J?zk7GOMN7*ULMD@`z&mjg2MeARp_W8IN6H2;9CHYIH<2W!(r#A;Vj zldhIU8qvyL>tJXr$6X56m_3!2sMpzjgXez0H#SKuQ&$y2j|oxCE>U=Yar%jrUZl3$ z_)exr*$zgJ`z3*VM%%|L|CCVPb|X7Z_pe2x8k}}^3q3hwT?lddJDD=l6rnPd-94}h zOtNP3SVMf-Z*TsYoYb3?mdZS))SH6dVq^`MqS!-Cvh)*KjU?-DdvVq)?##TEkIhq< z{bV&o?V3zFumz4P-{dsyneP*cz~5l1Q-#0AFF?4dz7=Se$u;n`w7eSrf%}{4>)Lll zlr!7<^o3ql4W(P8tnFh^eMN^lKDDr(sz#$rxTcP8a7|K3O9N$D`#rIov}cp!<`)66 z1CGk+mD=*-|1H_0qKkk~#n>$%LJY9^vF#1Jfu~^o(7nuQZ?Xj~;Gg`7O+g9PM`gX& z+!TJ37G-YW7K9AQ64Sv37e1#VH~qw<6%b4xpWAQQQ62Dazk1H>XnLRZCDVVc!|&eq z{!s}IG9~MKNZYqteEp_LWE`azAAU(K1HE+{qwCZD;5L?kXThDTBs-owtuEvp-$ecM z^Za3fY)YzUZhHF0g9s4;#&v%z@jNbokO<@b^-nvcFP50gm*}#mhY}-IBw2{M9`9KW zqfXvQ8j9PAUJEVay-VMES@Yd9K#dcWqE^o0TinZuy7XA#pcPW?QaAfx%5KX@Uv!Sd zzYv#PP)DueHs+!{GU?YKZ5<>5M;-E1y94F!&Hhx1!Q7^l>7-w$Q@78P!LBqC$M*G< z|Ifxq&n_>eDvP%Iz9SY7H%uC{YjjVs$XriVqKTDc`T&DQ9L`L_&JZb4m0RmNo7p3F zD6&NJsaf5E!M8gCw>TSU)M^{Ig91pkHh;*Y-FGx@YKVbQ45d76;g2aQld}%~V5l!3 zc@K~M`mr_?rm28IKgl{AGNWy~I^{39wi z#Yso42wlPL2>i_>M3cta^$J_H7gJacR?w>wmBHbcar{vwHT%5G$l?3?#l6-g$=Vsm z5&geLa%Bkg)dCu39^`izx|Lyk;Qv1)@7i;S^hKTW7-{wl5Ez?T)&yBvjS zI{m)+#W|_*?SK1EH#Nd+^M4!wAMPC#Et5lMBH$_kSWEF+O}LcM_d?k6s%1l10Eq(P z>yd^~eta!7lXua|Ivv4p#RV(}1t-N%FFh@J!$Fp|AIXHGCVh>-mLiVer>ooTlJWn% zrdK!03{o1Jdht+TDYd)9g^w%Umn$_!UJuTreDDz+5Q^zmZt~5uC+acrQKb{u`elg^n-Cgt_A>PZDn?Ykrtmu< zr{+>f$-c@e`A2+h75t`@OXF9kCVM+WA;|5tR&o%QN<{U?6f5Q&{ojmzR`$D1RbpxV zH4vel z3r59C-2b4vD4TATMPdG}T25#FZRG#s>8%2y?B4HhT0uctKoIE|S{kHtNSUEQ8tE=2 z1?lc?7#O-!Qd&T|h7RfOlK1xieSYtO9C)B7n|)vVT5Ek)7@uZ|x}B%nsw*;@7>=Zf zHPoFa$G5P>LRbS_0ky83Y`l8+IuDNJHZqXq?P(||wEw!K!1RmEa)Lige3%12*RIt@ zcEDckwJa6rQz2fjjNg~NQTl^6$pAWf_17gFpBS;3l?j7g|E@bBdRiuIIN}Rw+ZH_I zHT!7w4ozGUO}cZ5x#}5d?uFgzVSn;3iCCqfFAAgl`7#wu`lIturgVbI|KGwC_@QXz z(v7~>XbcH{cJavF1FM^y3Sqb)En@0~rRA^SrVUlYFSZLo5lX;I!I9Xw5?K60u>#&a zvjAtnNHDB2VKaO)d<|okdw{IUxpun({7LTkYYq+j09&RY7k)g~MuVySaUL~o|B*3~ z#m>&o%34II79OEgUdD~=#o5CSlTndHt|*^;|Htobx%6;}cwHP~dg9^XL2+M_hoDxO zr}=jgtjLlugD1RCO0qClHo1C#*0Phyi`^ga2?qTh_vOAy!F-rCAU&WN#NwdCgvq_g zP$(H>n}$h>&h+iaqM&!@F&7X`AX^61^_yJXNIC#i z7WP7Mzfo_a8gsd2Iih@EBA4gYOEJ*Li~G*#z*Qca7Cuxy3oN8Tv!tg@6ilwyJ!mZ6 z%uMx`Wm)i9JnJj2UuA=9O)NiYaL|sM2!`4=>@s3OjiwwkBt!9X)lgL4Kt4R#I2gtu zCD~><==S;`hUkeR52x7(G_8eCZ~ZE}?1%8OhU}Gc@FFx3r*DeJQYo_KY+~b?eczg# zekmh1*7%uS&0c2|n5KpQ~J;VGVBHI=Gq0X|9Dt67$hKgSe<<`IQLx)02 z^wPW1qcyrUF8^B{LEqgM>J;c`4CWg_XoQqfS$0T%&w5KxexA0g$=OzhFwajllc(Js z@&V%Ng{NSa3i?IpBsAS}$UP0*e_rU&&WrxlC2au-SRQ4{s$>BKiP-pTU!~5eqTdEU zBl*MHMo~b(b?a|~gT)S&K)|KKAH|-l1`5YaG&W=|)QVPx?93AA$P@ z`m-*bD;bP_z+1q)skAp2?cy?ZT9F)$Men)~W<^$%z+sUi`T{jB8#*lUABh5W+7USQ z7YB{8a{o#sY6V##=*dz_#lLGUeJapqv0sxCLhFrdA(no%n$R+~r;sZ-=bveIm7f5; zpOj1_if|HIV2AT>#y_`j$xq@s>+WI4yWI~^Z(JlL5#?kNW^95cVyJD$m?R>o$l~^X z5k1#=msauBRhKl0*52T2#X~EP`nT%&8Gowl_DmW^NsyrKux(NPq8Qb<_j!&zP=dalTd9$g$Z3J)&8n*ZL z>05o%$x6?DZDZwX8yWDIpMl7gU$g`F)v9#>mZpY=n$88usVq^bxN*D(1!c!C`O(m$ zh-khq;}Ay5BAFs1AejI7YP9CEpOX8}_wLAkJzYLKRo1UyYN2%U!aN5EmWxQ@al*sq z9AT-vPt>WSr)>1!DduYr!Qf~jzMe{*kRaP{@4=358EVpxA)lDK9CrAo!Gmz)QP9Lm zZ}@BZksh=UgpdMbuVu<~%GCIrPcP{lF)lGe!Nt#)jDF%XF!sgr3&&KmSOwp2vFwMu zTbm-OYc4Sr45`#qyv>rMMvmSj{b)sS8vIt9Sw#Bi)#|Hje(UCx1!SrN+_OXhV&~+1 z)D7yurTIkG_ODGZlltElGC3Y$v1X`$xu>zw{>I?;XwOM{omqUuSSW`)?SuWUfZKD& zoKm~jXFtOxJ?wy2^)z%kQ8|&8=nWU6yJ%o0##jzT{bDs2rI~K|UW<~t`LQ{AVVU%N zN1S@F>7r3foa{YZ7pkESwaG~;*U^XTWDc?EYVT_K)MXHPnmzwg`%gf%#cUL#+im zs>J)e%U$@qr9IQ*l|1Q4It}WJl`lamh}io(wE*?Z1(+V<&wkt%sJi&RYq(5pwjqzA zhAfR)Y#&?stJr>?+I_=oglBM*oKW2jERp9@qLe~2?!PM&jqoor@0K_u*a(6P1U`r_ ze7{OiN>byccAG*DF}<<5UBxqCJ^{eH+Z3$4^Tu5KcP7A%C$+B$afZPGb1Dy_G)w6VJG{ROy9ydpoJ_io(o-2Lp2es(N+K>5QL=zs!94;y$sLPGnTIh7w$?3w5z z(hNd8ro4J!>*&|G6nQgz_&0U(nRFen)DWe@l?;1kGb5n;QJe1X9MztT=g!+A?xJr} zb$dtpElty=BKD)yn^X{@IF$bR>av|Q)7gR#Dt|3#jYqMFOzuWAz6IQp@imb2Fj$!w zhB+1$%x;QZz85v#F6={_Ku4f^uPdr%915@N3^pt4mE6#Cis^hvuYqNUe*D%^1)3s} z+N{PLWbz^J>3=KrlG{5wO=2fhWa1uk@R?ac4;n3zlgqxmYF8cad z&&vZBXQI#dz4yi+QGa*fe35*q_jrq>y%nb}f_H=0;fv9ijLAS#6XwqH)1&rh*ce97 z*Hg1Rsn<^Nwe}>vB{3;zR!XT54uaf(FTLs0P1X`6W~N9*MgEum)$-FeNa>Xyn$#XG zWw2+6*qzp+UK`w0bb)^U#F$=mlx4V19DVQw$iDipH0QNe$xww4}9F#hl(8)7sS>mTu z-+vBN*08ZvvQ*OBlwj{57MH)A?3}g+Tpw^>Zdtpe;oIyTwmyDt{e3Lz(bQI3+gwkC zdWX+Z-$V$J9^pGuJ9l>8WpJ&oX=$l$Zf>t0wEGB+Xo)@{dCW?KysHnbvK%QP#6$-gQFH;#)>9&>rJg{&(^is+a}byh79v0aYcQTB%DW|N18T%3HB-;(<=5>t{75!!lW0F5<9uIz_QTO1uStklGxVsQ zqB1VMo^L!nhQi-d-?P)7NK<}l!e2}hjFQ*|tI~kWwqjzVC+1d^GrbjL1L0~)CF%C? zDlBN)l-^tY*vsol-skcWQ#30_e`ya*>P$XwMc6qKLszGZY@kA-x z%0vv=1Ysfj((c61VH$cf=4HdTQ4h`KQ|AA@#*v#>mPH0zj?%xu-Bcbwj9F-pbsT@|;sW3IM6&W;GLnCnZ zF7HNwiL>47G29pMINbqbXNvjWV{mfi)jw>5^HbNKnVGvj88B6SO;bYDW_Zzov>dQ5 zte@SC)6vN@*40(IpmZhmF3dyBkUwTAYR@-23={Bla0m$j9g?K)8=d{jdYrybm~Ye5 zGuX>O_x?mC#feT+;w6D)&w2~gm=L$P5#Z}lQ&96+?1gPt4wO6n9)&|YHYn|P(_qRPzcJaa8+tFd#+wjJ1<4@_kK@_6p>OQT$-oDVtKDiUNQX6L`V&H*q*S_y;_K{z~2u;tS&nrf?;JF~GO;&-XFAL=Ev*dJLLN2!xT@?8$V)?3SAb zQ(<|t(0CgwluXzk>X&G#FyJ}9Tf6is8&Jy65Eal85x07Htj`gywFVowAb3Z~EufCB3kad^n+n9A9X2 z3e>9R3)j+SZ(7kl$yPs=&&w_VjEdpIdZ)4U945Q#XsFh&8*$3@x_@H?Vpv)_dYB9Gk9?j8xn zizw62mvmHe=OjuPwQx~+6nP4qN)W|-QGfE8Q5vc$30-@X_14?z-a;}$Gg;$kiBPE^ z5o`1GH=I~uG}v^5)1A(eWMV%sfAa@Ld(6lU=LGt4qN%``la2UTvuqZH&Lh}9u}~gp zB8yuom>J;sE5RREk%Zefh07-V=e^HYH3BQ6Q%qJ)(E}B>VveH@Y1~I5+Dh+3LI;uX zbay;TOEPnoSQG*Zv0N94nLv8TQh^u#Wy(x~$+DdD0aZ@#AO5bW@7PBR2C&|s% zCPtUi*vzY2WJ2I8I9Cqd{w<|WShi@{cO*_kKsUKK)0WP+ur{-@k9Yf&T+&cOR!urp)#JLy%e74P$A?b*8UBo{p=e^yN$v!ua zaLVz|;K#>+B3}{Dn;kqNld{mgSJ9ga4wJ(N9w5xV9t2b=4#mN z;kxR4()W$9iai&?vJYb_>itw&PO@uJzY>iSTQ9!rjZ=)Y9Jc#*xDrV*}UzvsHjQ=}orUQ@k7npn^!6*=u+f%-$EtZ{IOz#WOUr{Mo4Z$71G@v-K zna)8`mGrH0;UGy1tePAJv6XU!mxO^7a3NX&4h^g5ZQZEUe``tIA~+CJ0{SIA9b z4Q@Qz1Fk7Q0gF=HNk!>sc!CLYivpdERV-PCQmz+M?9|Ivp^@QH<=?|KsOnD1Y0Z2@ zAM%S4y}gCax6dUTCpE-^q3Z8vru0Ox}oZ!C9r+>WeI_TqAqXL{?__jb-Y+iIFLQ+88s0JOlLp>^nKz%2Zo60*=1~47aiMP9eAcb<6m(r#f=>&WZ!tdy z=~!3KnFB)$f*q`e**q1(qtmDjD(>&Yfn^|8L7QO6F=chThss|kMu~} z*m~H^D>}Ls6UT5SanA8;rt-%dtq&mi-iGJ>4d$f$38nwj2LE0X{spub`w{=YN(>jA z9EH_z;uJDtNQ9#PaQ7{cu^aIRL>kQ07RUH+On?*K)7_X0W}5~W*b*$6(JuhoMfqW7 zze?8IA5Xa7;2nSe4l6^lMJ9jWM^geCP5?NBsoEeO`WkS8n>BD9n>^tx7|kiR|GneZnhua!4V#VNpfhzY|1EjsSy_Dep_ zf}b!kic@*7gRd?u0ubq8W_ob<i?QOL?VdFrqkYZ`tME(RxAg8*_v{R#SiCpGGkz?Nx@fEzr%9sR>@owd+U%hc)G(Jfw|1y< zWMNG-%{yxU3E)Hptxd?OTT_rRaoWpZr)LsOHU|7)iX(f?uUd`Vj#KyKx+IUi zW}GMNc^E75Bhhx?dCmETgjiK->#R%J$WD$J^ycjPnD0x@E4;azkH_}f)_(IQ!JZ?!1?>+q4kX9|LQN1DvP>=g9Ep-MVGzFsnC=l3szBRZwH z|J)zLaj~zg!c1vta&jr`RjxOTO|LRs!!qkhn(^~tGs+AW;deC^LT*G1rHj?Pd_taq zn4i9ne+gk-4IE~kttXWC>|sz)FR z)>V*wyn6B@=MB!$<#z&>chnShJ`nZxWercs>CF41_@aQtEu_W=ezi61_XhAtBcAR) zS#^N~n-|^FNKOPyF6jMHaqu=(b~?cX`GI=-#<01v#Bw38Mp-;N2 zkC2z89|tI=YYwXm9MxqG^l&kSc&eDHIc>0}gUMUe)Pz@)n^+C-+igoW@`+qIoQH^# zK_6_84K&pHqQ;q(L#s_z8<;*4h}6W%Ucmj6J2H3Y5>gBjbwgTI!Hw@fY|a!GEKymx zuQn)V#v^L1dTKQHxW)RU-JO~v=8f4Dh9+&FHkh{?E1!QBk~Vg$3NCS0E|6 z(xsD)Tb68mZ>Q!pgD7EYOng=1i5@_Hn#Sa<&_W~3>dMo z-lspD)2kmbQA~E2kTq%#O6ybdp5j`k6ua|7VD$9#w=5!kqj4+Hm%Kp8!ux!td>_*~ ze`VG<@A{3GxMW9$T9-5T$}Mp;AX(GD5X|?omAR<>tnzQ6qtf{7JX3hSrB>W@<&?LE zeeGkJ!j=2_548v}BU8#1(?-VKb<>LoLHaQb$n_lO1ov*j6vb((Nxw48bff3(Zd{$5 zVAS?C-MZe2anwcZ+gJeyW>>51afZIA;^(Bo0dh8x{#P;TwUdOOGrPxx^*|*bLUI_H zf7q2NrP0n0nBg-$MUp+#^jL%I}VlV zlN?<#JI}QdI?oOsN$7AS#Z+Ed6BOos*V{s1w}vIjS}jGfzX$sm9>(k-=ZCe_KaL^ za$oKYPCf!dq^R$o&Fu)VV;a0|*8T|CIX2fz2Wo0)Cev{A-u{N@eHzB%0r{v73Rv^f zNk`A;?FcS~6rqe3Zf^GsZEk*8w-TOMLNJ*|YZVG{e)Nn$$|$^phSw@AwRqou6-@{SMlTv4>6h zJiE4TdPA|rs?p^mRUi5nvkQR?cVr5(h1f-RH@D@NM4Wwcdy(+z2+Xu6q5hc_G2@Uj z=PyCV8tit!uclr&#jcFI|M#PstnF1gKiaP%f8Fw!Y9%vir`!Tf_Z5LCp4nLD6M7f@nK9&0K$sULd0PmeiS< zXie%OHx^%F#6$IR9iSZ)vt1BtIC|r2kbH7>+zwbccu{%kg{r>$OYKW(>j23Yt+j(( z|Cb*YD?FBb0@bhyDkbLM3InJ;=`Fu@N#z|$3&324VqvwzjehC{WU+}hG zjuMVk-M?&b*!*oI*TXn91aBIbvA@faoH=AHep4bjZao0nXk|Dxfl`0O>4z0j{pM6G9vwA|`=fBy_lu<3y7dkAp_|NMPbv#9&%pcA z2=Nk7eVYUmrZH?;xg_Oz^U%{<)+OwBVI?LMY==|JS!A~fVfDyVTQIZwd|6!vfV8#(3s}JY343A)W(p(tzE`aArXZZ(}%DwW@VGVy8d|b$(-as^o{(oug~#E z;1BAMizRp2_*X>t4{~ly%0#_$gfy%kZ?kQ)P7V;TbUxh^c*2ij?^YoK<_T^gdRB?prBF zYJz&xBXeS)KSw}g^?Fg_JgqTuSuww3qMhuTZz*!nyS9WXxEkqZzfL%_UpJImEui~K z;j9e77e|%=k`W^AB1kxru%oh?U^3Sea+J2ceMK|OWL@|iZbW3W$hD!&-5ZUc2JPx2 z@?-=2b5fB@;Gb#1!y$&ls4sL`2F}cnL9Oa}kZzY>t;40)iNB&Vx$HO<^2F=pn|Ga} zxS(Oqy=urZI$sNm_gs;k+zV;-4c#dq7^Mhnx}P}Xi5C(pp&d_uh00BL`SeYq>0BAR z!f>HWNOvtM#3NJatgjY1TV^ZL{&T5te(;gV=l@Z3lVJX#{mC(}^&g zBBX48O;NhTbV{&R)0YlfSMJ##+4(S?!OSR7vm;QOsg@%P4GS8&t=|dOAfqJ(*hjLY zTpWccccVz0!ihM4Ol09Nqpeio7nAhX;3zfQv-9VE%gkO_&4uf@`p0D z%;}yc*6rH@g4|8I-F~f@i*)F98ypAm(pD@RhT=4BA*Ru!d^4DAK9m>Fg zR~pbLtuFpSC`MxU*-?hX@H73ysU9gm#`N+mp|FMcl95ao+Nu<8JBIp@WGbQg`e}1S z_{)LPe(z^g!Fyz-12lv;NO}fU1s73rnO3|hhe%h;kIQ9|0pgZ~6EsJDC5!OYv37s$ zhgJ$#=*uq-g$NstH*|HT_a7sb-^$Cnu{GK1q!x=u-tYuPPWcHnLy%-Y;`@Vi&4!aW zO<&ontCvx!#}YP}^vuLmFN8m+2__zy#+Aq>Rmc1`aQD*?nhOEZA#x%l7- z=EdbsryWXkDe>b9so+UMHtb)J4W054~*V)>WZcB7~bNk$jBO3|A zWM$7)SeIugej6C*(jia|lni+i5D-Kp@^mmzD-%%^+VvNIaJz1KFQOb-P`7hU zo#AR9_CDJ{VU935wFfu;TYv2>o1E0j7y0j5T-n){-$n$D3HR6?5lM|C{!)Wsnh$V7UZUYX>}zdg4(xCoxbxjy zKb%m;y}&^tV}Y#r?Y?kMCoAPyB$2;4iczi!QKhE3yH%r_YekDR|5-KHi`5v}_JL1G z`^IYvHrb%sa#eJw(fx7{=S=f2rGZ8Ua2BItsejblfX30r%CjTB)&zHfo|zMrXLRlk zzbly6AI0Bp@^FY?y0(+{TbmuyMb3RImF4e@ORx#3SZ@(_q-lv@YF?3j}rQe2gjZt=6hRYxHSi+XTlQjlV) zBdG*Db^;e?i-6MASqLmtNQHLX=2+}7##|5^^Tt&EhT{5*w_U1BFXBJS#tNEZ;9~E( zs^MOGCaeYJPNokqlDU>3E03b^_71|>>Y8C>mGGUoNfbzk(ypI~IE>7KIahd+{5KzE zCQwLQKZNWJ%zyj4*}nmct;2$|Te7j?-d5>{uNOCi@#Q<*^1s2sfKN=lM9}M(3 z94w6|ylBIwwpM(%#Vbl7^uaq#Wn^RLz4Dxr{uqsjM)ag2r&tfNh3o?A0c~Vl%EIZU z79CT0&)=xJ)Ze5_aRCq1o0pR+FF%h5=4c(*s@J!^`eue(8AGSd;i;yM&&Li#2|cN^ z5-6?X^JoO2jmml+QaS$3J^S)4k|`jP_jrp5Oiry3p{5x2zlq=X zg`aA<_wCxjm7^r3;xJ{7S4<&ufF=yUKEEUJh;QH7uNk{q5mBHgyVPP?H+SUtU2{|UAHT9+>bB%#xhFHJ z!-XStc^74`gz~s_cB*u*MOZN`Qb$7drf2sVH~uj(zV7X=fQ?-8DqqiAMgfvCuzN6s z^jVjnrVlN_oNR!(53rqT3g-a(7^`ngQFh^DQ~!`g-(hOPD`@vzJpF%IS!yPyh87mA z($T$vHwVyD51`jzEFxsQ#En&KKkb%t#uB(NgLD5eMn>vmxCiOAGX&pCcuBVsvFgutJ-WAZa z-l|E~dNR6F_F9xClfi$~w}D8L3k78#nByhDEaI0Iz5br^$=C^r=rww&n$4mz1Mb%i zNg(V-B(R!muASRlL%r9JPV6#PLmuP#KA6Lit~ySqk{n@h+jA^iI+nv%o!TfX%*8zQ zsMuNZO<}d2XSp=43Qil1OMPogQ&bGW4SD)uVD>3L{z&BKvFQ9YXq@2Jcv9gBH%4rV$-hS z%^Q0p3%M^{B7SM~7?lu1}6S9ihGKvDvJj$le_W#x{FS0sjWT$k{1uWoDoE5)gnl z6ru?H%?n`1D3HZ&E^e^0xVZ3#a3}6b_={p2Ky@>}?hR+~{d)_X!Dp{1%k6Dc%L8Xj z!X_0R&w%R@Fg7TEWDgHl00u&U#S+eW!M>(BIoZ?cq8RT3Q03S-U%$@=`XoMNHp%ul z=xjdxVP%$dg&T+cZB=+>3bDE7HxYnwUGbxEYwyql~Ce%fq7D`Rq;uqn4+maJ~kl@O4%M-g4qlA4* zh9onvGbcvkVkMl}bA^9&VS)mi^H!*0l7D2S@|@y1m;4YVK3d4h|GSh|SzNdkTzY|2 z>Mi9|#gi(Y(M<7J&mr|Oi+bq$w6;qe%L@h;4M)BkD^k)S-IsdndEB`Eo!H5TatoA& zka|cdRx6Sx#C6-Mgj-BAx3KMVD46b$#L>ihWuao7`PGYVrNa9?P5e$}{TM2j76o`W z*uwP)0h`(c|FjiOvCU`o!&l||*j*8G+D_JF{JWmKH{$+n%vlJf@o`DA;aR{u8)5c9 z6?5lntT~p@*~B3H*29Gc%U*T0IvxzoUaJU-=rSwt1HworRX0n&dTy{73fX>cYc^$j zS&UJ9q(y|L!b2BO7ul+&j-F7nsiQ5ii&tan>2hgzxTZ?fq_UJ=A=mms3lo$IMStV` zW_J~WIbsIqrq;n5-;0_-wSzQ-Ps9+#yZ&XMqSbMo`>2qJU-~~u`7wOZN5~bA{Vm{@ zb=|@AenPd`OHK$B63RUW@&jSjaOZ7BF#}Yk$I-b2)3g@hi!?B@w=cK$n0?i3f*52l z9qyPGHU{++2BekxO8~#tczi{dcD(u+41`eaft26r*>rYmYb*OF)o*~_x5-_vXgj8& z_?}2*#oAeMsg*C4Ja6Z#o12}bpVI69{3o@}Ul(F1RgFX+7oQ=^sC<0Q5vOz&)NPEC(TtK}<0~De({Dg!fUzI*r+DA#q zCZq6Z2wSWj-tf0iK8oLSwzH=YEotU@)xeE@Gp5=Rci{J>d_lurycDib2xuH(iiDOc?=N;q zwi$sBH;%NX)dsRktUX`R#{)YRdg$`sZb6PFI)%vOf})}1AU#smZYK*-H(%t{F$Wj* z&+klS@11Jx+GKGDu+80RP(BK2(0z|u{TWo{BdzWt`3eof3HAlhxB`M{lStUpQ)j%;--l9z7GtF{}ub5^gRU>X8(mdf< ztep0q40)AKIvV4R&0nq959$YMuY`j`cS^H~UCBSm{tAsFU%dCIWiIYx4MlO39bc0B zpULnETw{{J(MoghEPqwV0D>u)QAPds#;} zce0gZZ2cBFQO>2AUf!oK8(K1=v}{*=1cqU!jBzybF+TBr>6_bM+AHbN?@oF9q4zXY zo~*oy)PFXMc#wDl6Fk6UMaQ(e1do4Y)*p#mZaJHE9myCS>GDKEu-C(mYqy+SWh{3n zWiP6=x&G3myxNd%I(btk+c79x0rI>hiwhg*=adr-6nc)HpBq3R>43X7_fqz(MZsk` zM=43fPwqocQ-Qdp9!8-B(lbP$7s6PxdoOU6cVKHe>dl*KAxNWlb5#@_QJLqn!;j)e zprNgmr7d*(>BwPC^J@Js`-fxAoFA=SH5b4rN$QQ>=-O5(>OQ zjO5)U85vr83l#7L3*Ax(K3k|JkA+Z;k~S3@yNqI5y?_10Pi8vOjTBgo+HYk9>3e-5!q$hpueQ%7p)vQqglkWg(sqOUgmPlgyKZ9Rqy^`%f`mqg!bFwrOrLaE zrNVLFf8X6DLYbnqBu{Rez4UmcTZW4@Jnsd|A)x}53|N{T;I+>Dy>T0)3`q_`_Qp#` z0p79`{R|hFT!{|Zsc1^9EK-$B4ru_?8gLKp`bfZx84XZi#{WbQ-~fJY0Qe@QnytUH z?GF#iD#}@5ggX&np1CO(@Oz%YIp{F8G==nqwPmW$1e1^Ru3jg}jI2$>O56Q2RLE?+ zBy{uf)q3m=^;`Ruc1e{T^Pv+TI_VRAt6*gl^I3Q}E$&q!zOg&gsIN~0IxK`OW_2Rh zgO%el98JSG3Qi?_dCocD@RtUb1mqL@#O0jCs#Ty5@*ywN@QX6mn>wD06(&HOoG3xr zbNRAPPUJr!2QE^!a$}Uo$-6pgFogqM4qev8swt+A0!Q!k-l4mb9?|O*fNWK z1G{>gq=s6VXZ%svIL=6%_p_2Pp6_=$qmDl`#NARfSSoVLIHX0AZ++@yB}|M={LJ5+KrLe zan!$4v?FZfyDv0y%@|o_Ea^--#%*3tLec=%6NYr%J8^Q1U#JUgB_I~w ziLTcC=V8^US((u9DGkK?2DiuDc|Qot5Z*Df0dJ=X9*RLI=BDVnU~0rJZs~Uc)o@WD z2TkLi)`AdJlKxz@^S)OZvg^_As{HNm-3VYC6!Ezs0ivWw#~t2{Pk#0E&KF-5liI~Z4~&R>*TsF_Up!nLB6{d) zEO&d_O8M-U!v^LT$xpp5_jp8{Pr%)a#tY}al6_V3&5rHxze%0*+^&iKopo*FW8eeUPc+ zKNsLsp^1yXr!5o^q=1|G%Dp`%KkHi>bdw}Dp<3B$ZrwF}hr*<>%`uMjkg((bjmhnl z%t{3$^L?wcnRX2aS z+HAMVhqrdMvLcqe6X8XL?s_zCMp1tPi%O5|op>UPBz3`r{Uu=%|(&R>3dx|RwXVc429cC*0} zm0&-9)5}&aaa)Q7CQM4w7iJJlnU158qizk=t^k#Q&n;K*!`Y!2%b3q|wbaUPjA7m(Z+KnBtt*)c`{yC6ssFeld<+$e3|(P`QK>w1-RSpI@~3) zF<^qIcU+B3sEQP`$`C)L%n#vngn!c3{n}S>)8h#4@Ph(Qy>?St|9o!;^nM{F>6JoY zPWwTvJqFOqf$A3kt?%Xav?dAIVV?dh{Vi>qb;kyGhm|27KGRTb&O0&E(tR**h@yrFu8a zhurG!^GuN;#DYo*<>cbM#bKD_iO*2L(hmKzQ%;saKcemObyFpLD#lUiCVYa{`g9F< zhH&>W0x@*9`9t0fg`HI?JxBhvch}uy1wSu6T)4(@KRCPR98q`JwdH=VQp}XpMP;|f z?nbA0qh60&-gPQJ)O1WykDaim)!X|lMU{Obf4!NOv_2j5L0uxI`$nUuWvNo<8Yc{vS6WwS)Mzi3rl zU_SHT!;P|#Dsg#lgE<}-)0%4J4i0jHcz>Q}K8n##ZK?;8RbMA=Q3_tEr5Cmwi4|CT zO^45vVJHwZOqql}Q|}{^gU`pI#UNT9{oQ&?rN+BV8$E6-Jtz+6c&qDU(j$e~?&K6? zuhzEP|4*7=xZl#IUG(<`0E(iWu(DaG!2FcOKW6|ZE)B4m6R-KV*zfqqc-}Ql1GwN1 z!h%ZWzz!IAbGCiCKl<7KT#@3(Q!AVrqZScT-by`vJPxQmbrvWqCPZM&+c~=F2v|GrmoUw=%Ag=S>7C_=G#07bka- z>3AtEQ>MR-hneq`3dJY1EDvadoH^^KZVhy8tUP!PhB%47F*!&G#f#Jw6L1ju8Y@x; z0GTCbCeWW}3a{h%;I0XGcYU}>~xaE&(J*&XAgsT zkxW);6r@``K2J2Y%wXd5II}|}e7Uuy9}V;JQCbJcQXff8|LY?r z(~8hmXl8sJlO9~Xl-gz}kFmr+w~cuf)5E}{A$^BgHnoIUO$<-Icj!K!RRnAK&&N}C zou5Jjwa;_8!aq;Pg2*pXh|I7RcQQbVWm@<*x$Jhm5r?x^pSE>*5pW7aTizlK9Pn4h z>TiQ48a0K6ab}4<7F(;`13WjJL3*Jj*Kx#C5Hkr46f3eMo4$qSU+L5ExF8DY0c;P$ zyltrTuKoeBESZx~qp+6rTo_|%%j#S}J|i~qiza=owbtlGs)4yBfkG0o_YUxTI3mZv zx*C483)89P$Y=JG;ab-cY^hzZmvBR0U;c<)(rvfFUlHeUlZOEFf7M%vrRu74>8NUC>F33YLC^QB`IvNXyasF#dr+Zb zJ%Gddzh;LE`@$0?TF=NQ5#GStvJTR8uF$db5D`CEk2Uj8fPH@qz{2&LzaH)Z*^VHz z3!X86v7}>L1s^Ft1W1X%E>7k4_sV2%>*FJz{rbFDE9c16^78&Hzzv^USpKA~AIUVb zz5N;B(n;RJCPO{ruW8fljh&o)e2iGPG>d$SgkQk3LlI?D z`U8F&n0^ABnv(zrwj~YxbZWlgGV{4--5-=tEg5Je8O2g^nal8ZWsX9V*qZ2kx)&W6 zgz1ok%tU5hohydXtdUBT&%Fw=Z!vMIqS~ks{v0r25lQ6w$lGaD)r@}XV*zKFW6y&) z`1>6`z7Ri6#Iri@mkeE^8*iS`BC}dCc(-@jPJ9*{pd97s`H z@y*B73eg!F?~k!xovMl#r?3qJegKx;l%{IJ_9Ik=PlMcK-0GS3Azk{CyJxIj%`<<`%xMtJfVtf>-WiW)5Yfm zwvVU?k}B8goryVN$F!yIu|gmdeQ}%B?&c3RB$mrv9Ci=siP(YF9JZOsq7zb85fW6I zcgrwaF{BzC1KcL*4{dHRln3s!|C!yLx?#501h@Y_d($bZ{HZ8c9`sTYzf2$-`?L!) zKH*>&1ROPM(;T9c#k#K(@d+YO)%Xe0sBdm71$5bLd$*^i&Js^FHq_h!BB{nRQ{1a< zu50m}Q6fklkl1mk+*WF3z-ly9>>27vM`B+qKikgIGbPdF&>M z?81g19FrclfgyFOvL9G_uj1C*{H**%EmW*N*lhxb+z8(jol)5l0GQ}a2<-_WL2!bV zLT$osvj+MZ`tf7VR)m;Gg22jvl8>6C|524ub%7j`WTTYVQwaEz?Vu0hPclfx_J+*lm)sJy+#OP-h6BwsLB{@Ayd-lcaxobju zPn~a-#LK#d-m_Ed1bp!~*kL|l()eRv{;_KgRjtaE2}|Lbv6 zsK85Qwgj5JNeR^7!jQ5W%qCmcV)es$ZX*&QGiaLTaDyXC7V{|gY?FmxMwFAhl`~$P~x~2R1J)oVTWNhN^15cq? z(D{XyYgWPE#)byCw%^K{eP{;YO|q>$&&bLsIxQW!mn*8Tzy3EHDK)it$Kv@H&+VzI z%8E&qhT(mHfC(hFcvVSg%7&L$iPRx>X{)mhzh7P|YSXwBNF5%_A@fzqiSI5fp(DUW zeiJR8WUn}NOz$Du4_mN_4gqPC7_t1jjo04}g_MPt;L_0xz9o6P{8sF~2F%7chd@_1 z88dv(Ty)w*2#pDr2%FneTFJZ>Cn|h!wWp<#$NAQNB6Nd+7a4 zRU_HrohI)u&vs3){N=((U)c=9p65{tuTqa|$)jaTq}}l3f$&_;Kbn<#go)1eL!a3o z_VgeO;W-~i0k6^U$P2+K?sr(GMN?7=F;gy9|T26-& zwzhlfo?B_4SGl6&5S0x6m*S9(vn1z=idQ3`8#p~ZjhB9N+j9I2M1$6IFvyVRS-&)JQXhcL5b;x&Z_oirWYhH$Ke{1M^v3MJ;R6 zbi%3>Nw4@Zd;uB^1~(}K0u$d@Cd{o z`F;QMsRQ^`4kniXd9Io|!ElCtO>7kxjq;tH)HrYf+kG1l?~Z67r1$|yMbpyZ53jB0 z8CjS~YAU>ojAVX9>TPB;F+AI-ICNh!s=J_L;3@H0Ie5 zY8g#RCtFfT$bs7!8wQXfwq6qv1E6ndh~AX#TZwZ&93&zmhCVnl)|UJ$InWl-3weH1 z^l_3Ocaf+Y8uT451Vk!HodV!#imvhf=$Dv-VzL#U)A|x_u6P+nWV$0etvzar5fnvBk{A`8fl}=cZXc^x5Yzn@@4N}gE)FVC zix;q)6`95i7ZIq(+))dfscH+(8JQriw9=k84aOuJrWE$%LrJ)B+c~9{8L40i65Z>3 zhmCLzZTM5tguTyf4E;j`=uKr0ar}JcPCU&vXT8Y#3a#`SP{k&p8=#ipAk8I!k%l@{ z7ShD`TD;(Rt|9!;%0$?U^h8MHt6#aOuXI6?&C-DOWE1e;ca#smJ<2>p7@ZTS%?~#E7Q9O3uRtXXj(f`k9vvGSwE{AXR3L8w zkNCss#=BjKpue8qLf~G2xbs+?(N~fP2)+J$cf9y#OjQ)>E{t zvPDu^^st9J-UN_1*?g-)jj{OM-5z@U2MdaB*%;H^W0-rWj$Rs_D(NKif#&dK6K22> z*_`9uPN2;^iEC$9w2or!P-93LxMfdEO4}KEF11^CI89x+3_I)<>wZ2%B&mq4wqhTF zv4slP54V04VngxD&ehZE!YLS~2OYh7lz0C{q4{z^KX#nW#vPaGnKp&>AI||>ccl^n zVkkFfx%*?Oqi3>+hKO+bY|?hIioASxby6#{(|2VsO5rOloi)SaIfJ`W_@R>Ys=J57 zdO39?Im@3RC=NyTC0}4Bv#f4&b6k2)j77@k40JlaprVt`(03KYuIos%?V&GMiD;q+l-_wSTiML5QtHFY z5{ge6xG9HAhCdB7zG;B?t@DQpLRtQ?hit=9O_zxpPCWZ|rrGjl?!g78r3F{IhXoIo z@D^r)N?|lQmTDH(1KWQ7Bj(-Q;k#2LvL^)BWRcG8gWe? zY>f0t(M)21#ekI^$q^dOWk1TMy~#;@a)|<{L=R)KX9^q@3|yj{wA{{0hh zsF?~#LI8Fv_vF;k-cchb<&{`*W^}cNlCd~R4M;pAVOmao848MbVhg`uV`J;r=b5yM zc~%cOKW_ozT31E9`po_Ta1Xv*;x?blT`lpXvzzrrfmoNOeH_AslbA0zH97>TcWgr1 z!23o-M~SP5xzjSUoq<~dXMi~o4|%mpe$%%{_h4GUry9QrC_Mf~*OU;WE>grbg#`}@ zLxa+p!Xdsx2SY-QZ&Miqy;*x03GmJsYJ~rUb$9%DyF@G;zP2$G=T+jH?qcMw?W6U*lDym-vnpqk|N{$P! z`7ORXY-wRL=@D0k7T4pp|KRao&m^e5ROJoq^+=dF8|)x)LdrcNxzReaZ3UDdi*Jz zsq{=j<%?xmSVF&#YNNR;T$Ss(T|7*Nnc|vUPaR)=Tk`yT%&TsX%#&&#c7fW*0U6G> zl_Uu|$u}<(eQqA2z;1YNw754#b-T~9Yyp$bXy6lJ(!Z;o7h%h09#5;FGo)?`il{a$ zH2<2++-No2e4=USg;Dn(i4cU>ydEdpjnWASf(00%%*GH2THfMTSRha*0V%=mf)Quk z$JON_@q66W3WDnwW;{LvD)qAStgLU}j8uSDlsqR7hXB95=QU{K0~*)#3;>M)KhR^~ zsk3!D1L~&6J-v)tWA!G0BKy1FlZC0<4?UCqljop_i<|d8P08q*&G8BDwzMeWS9=ftkjGCekl5OxqNn z-69H$FdrZ|>X0IG%b1*|427T>kQOydez*J6Q8wxA1E|7FJ^qVKukWx_zu-*7#SY&&u8ig9B4N;p%%+(?w?{ zW!d$;Cls|4r9!M!pRZ@&H-*G5y>npbsy+|h9~snejN z?^(lEk4u&xxyUJ7!?f4<-Ra-IAR;qw)J)tRvGuwUC6u9(79 z26UHa_}HDXj%-cHP0Cu-)WN*93KpNHve60brFllMzP;kNKrZbx5*oagXRV;hZ!x@H z4TSQb5V|>(V`Q{%&+$bY6S&Ka$!NjG_q%#@#rvyI3u2f$)En$|=M88v@UsS*k(#y8 zsb_k7xT`Q1KHnM2wX+Y0?zA(wdQSgrVc&9nM2bRh0z_i?)2fypvPT>7X|IF)B zM$IkMKe_^+O)1m}K>DKBO#A~HFWq=Xefjlo{Qm!-6wL5*AT{tghy?n|Sc(5C=Pgu& z?4H!z)?3ENO%C8Blmz=%Tcqs)gAN@I!WdYa5O5hhvt%5xcd0lrqlCwsTASCO2Tz`^ zllXf#?#*dL#(RD8Kn29Phzp55-JVa+JFU~IdiXZf)hQEL2&_Lonl269WHntzh)0x^ zcHZCnie@+kgz-SQIAwSCARG9DTsND&)2~&)CCI1AbZk*d7kyzU({eJt!aR65{HSnK zV`3t33n2+~^Dn*kAy-Lp7Eovblzs!P+>48P-1sG#h^3|Gmq0>gG!IxY9)x$?*KT%Z zpmLX|4@eL2&@KqR1e2V2W zyG;{P(yc;{d4F~Ww;_VBn>6e3gv7983fCgK{nJZ2u4iAby zstEKGHEDKTa0iUW(T1taOmvDI$-8;>CMSeBZhS6}3<+~RGG)^Wf!4f17uw&=z}4Qo zPgGFo%8;XLXZmhb{eDN*vzb6WL!UZYD3Q6oR1zFs$&zciKj*saf$^nkdh)evrN;;t zFHzNY6;vga`!BjLfa1+`w{G0m2B-ijwe_Khp%ApqSHz*Z-{omxNxNsKQNN!b ztuMf0KZ}QJSa8#(I+TY`3b=Gm)=qi}jA~e~0gY+$_{+1{qs7aqYny=y+avLEX>cjk z0Jb{f30;kH*m9Xk`?k{T|Fp!>D`zy{Y%`^DsG#>g$ow9XNnk_k5cuSRCZqLX8Fm%| zP;%060;*zj>2*UZ>Gi_h&*IowSy{QZU*W_&sRb~EB*aye3JvVwcydDJ|L`o2412zl z0Fo*nr~nB0U~%z4Z)N=E$xk%*?Duabig6+!QLQ8r*v)6X!|AOe91RzT*WH^mH6^G( zkL3K^rip)yGERoRfk6Q?E3(r*?Hk20V!~O+SpcnDfwbyKgJ^x}G|o(xHq&2~G6=cb zmcenqC1FL9)n9u$ICy%d#rBn4@V$X8IfEL+pU%7dEd{6^%I_8&=V-;V%d^!Mw<KK0xO{UxoV6gdfc%4MA4ZWT2ASOyovNvX)j`C*h?BQ%LL*x>$`tl)fY^dLhufC z#bA<9Oxp>{UyL2N+O|{WM(9uMndwR!+&1N>&%%0L?uotAPHBW>B{4!%Ebknsr1g#2 zIx~zzb73?pCcABXGS-@RHXY4#j%CKt&@KCH8X{6}m-$JiFnqH2O*wzyHCB#aXDubA zu01+>J&--$UcNS@pt)fLWgHS=HWMgqpF`H2Z!Lq1@Dmqi$FSG=qDqB#m_U7^|OAy)djDwbr~4 z=bZ5-)va0K}pd2O0q?& zC$k;GqawlU5xnED#T*u%T5ik#j~J)@CM%Q~rLnTNKQth_x2JI@3+7Sb=R@VE9{@DQ z;3~MK#5X!q+XC2PKY))0{fC<#%^DyAneL5DeEx z8DDH|Kqq7daV58-9Ib)L)`8C!cskb+N=cgId%$K@)mbaWxuKO?JfIre9Wzl+b{KQh z7AjkM1p$G4G4cKW9Fx?Pz@pelm>qW@BDV{>vGO%U#9=glt7GVJgbTHfWvV>5P7b#G zcU8_++K8PAEV04o8KKvz(>%=b`3g)T)^P8HWkQFdzpf0~`Dc5GgSPsgpMULY!tiGSac;IRtXy!w z(2DtIkJLG?boW(U0=Y^FcX-^jLE=j81|msBu9$EMmQ3um5vr{3&Su8$dXaH7bcBHI z5gFvgG-KJstuU7whe$C{qLLtJNIX#gf$!r+N3&NU6w+%d16z<<9S25rE8b~gy?&3? z^m1vaX|O)yS1{7+vJchymKq*rPQ1xVZLEDRrh}3K3*7I6q$B#Ch1B_2end1UAN@X6 zj$`i>&qEtr5qPb1RJOGSZ*y5@i=7*QZ_K%Vq*{!geEmJ~?WnnRZAk7=Jrm)C7P>30 zTb5paiGl3b6>X{IxE&A}n~JfZIn(Z+)+khvZqt9~VFzBgTjGdt-%HpS;3C7z_o@a7 zEaF?ecd7=VfHScIXshACpEnCDfQ`5J;Z9>><`pWq(y4V_RQUOy@vR47-p(cdUhYXe zlf2zkwt>Y<_zQ}OJX~BK0lQT^;CUnymX!y0=QkShd1gihkB+uw_?;Jsp*ZJ4RC|*j zrY8L!-5niIeeR)9vR8VKH=nj(H8I7HcUfP{`V)lYVrTppx*_MnHe)7cMMChQ z7YkQcyo*uxecqF)X@KbEjvGzM##Z3UaOOEWSE-)8n9c9_laN`w2$D#yz`sx5RpN88 z+@P2m?uJ~FL5JtbO;3nG)8Lf~O`>-^ueBtSUcq4$IivqXfG$V8lvkm)qiyAptI3n_ z;HGLBw6`$x$2^-oePr@)$rsEwN?ED#fzmF;Fc#9;5j*j*8J+c+`m&L10|~x&WZGOj zw!aEFq`bNc^lUIc#3o>&1XKL@9@dygRyvv?ba@!vJUK@Zx#}@A5VBmK%5E>5(NJ`r zb*J-DS_v^Mogy#6hiT{`LkVGV_lvJdXwW^Su@Xp^Bb-A8F%_R2U&vz+gGa+%42tjn zDl{++=CxQ&|K|P9LpWS-nn4USNLc>hy}@$Z+R64lWr_0qN4zw=IV`JSt}oUib<`tR zw<(*$^@(~fa^j@GIyrl*N3dCYg%G2nI+!={$XG5Skt2MUbKj9#puVhi>$m=;49cpu z%tkjS!K~m2xJm#`b|ykc5x+%;C6TwPKQ z(N@B|oE^T3qiqRs+={+d<0WwI=o6c$SUHE!FgNL@@u%Afo3VgwZu2&mUg!rg_Mq#Muqq$6vjR zXA6BxmTu!nBf-z+Np>JPPqZ7)OKl{Vdf0|?UC((+%PX5%N%(!lfarCmqY)Bvj-6`9 zb=Dhxy3^!e3h7+N;df7^8fhE@VU*w7INn_fAIY<;RcdyXEcrGIM2b)Or!biDViem% z)x5>7W@Q!5oCtG2av8} zZ^eoDQ93m#p`jL&p<&^T>_O^7F_My!99SpxO+Hz{{R9i>LVqS zEf2L~qik#7&5Qi+qMvi(N@whqYOi=-g0Tz;UCM|@u8(Drz->Mxcv@`=T1I1IV-0sO z8W}#o3_ESKGJ12%_2ml}XRl4)B6`ssFqS|n`I?jC*f_@r!!cqtwS#pi8^1@hP|_K< zAGM^$PjZNg!|^hJD5uix*(Mx0cB1WN2I6kPOq0s(dN}(ei%H5p>CLZBywkH7I99$d zayQf)$dLWIKDZ1bSKW3mBCLv)vYga}3xL(Oq`j1EiYVOcG@C;Y7V`qyRVbO3U6>uJ4J_o%hLL!D$2_j9b(}+ z5;m_>^VW_GF`DYZOJFz#^F5Vyi~9=cnPE$2dE>facVjq)vxIg==C~uEa0;bol;Fb% z^7;JTUvh&>8KLFc$K|@|ySN|8-J)^eY1n{Ry(Bd$n)5g5WUmahD^R+23n*dD@Hvd9 zyYD6dmAq@nt!w3PqWn07b-=7^JP{WR*jYcN5AyX2&bnE;3~$H6V$KIS_+HHG7j95D z?hd~WPZ!}$C^&#DzUql%u;=Y}Q{Gik_c1Itj?R9u6Y-x^>HZ<{;VF||k0JJr3PCk| zg(QF!+Km;k>JHICUzmwgrMW@|W7U9CU#}WNTs>FuQc(jkkSRi8YrT2!)wZYaz@4>4 z_4iR8J?s8n>=mTMifUZEj}>Cn(f7FL?&0c-Xl(3gCP)SYsGHmKWeO*Ah&l%iF(1_P z2&f%gtV34meGf{qgi z7`7^;`?D}W5zfETKZEOE&wh6e{e%pkGFny(+!5WALaL7&djXjevU}6&^b@J55PE^o zIdW!ghIds>RN?WR($Ps`=o)s|aAQ=qbQ~Y))M$4Zqi&&pA}vi^h-^1=pQl>2K;h;! z>wocwCt5>S{q&uc&au8M-?rse*4_(Gvu2I*ib_DoA7Gi!Jj91&HvU_kN$eorb~l7jirTKQjLw&ron zgJ6>r6ep{M#mdm{)kDJ(UrrEXvPY>oq54hj6LF?G-&-_2lb_MY_(H^tFl;b!jT>F# z>sC0f{t8p|(b60=c2csK#?k7)!B)!lTxhwq&VvfmD7Z*@iar%p+nBwK zl5uBIy7ya{Xy5DCKZ)8^P3s|jjam{R%h=cZrY@gyE z#ORytLHkfJy=Gam&EZW9QP9~`xXHezs8gcYFy*$){=Q#)?vzidh8)~vkVymS3ZrE>e8gcaJWt6p5llfy4Hj?YP-! zeyu+IL(&-i@}q%|N?{eO%D9vk@y zmb6to;`6Z93h9m# z((>RK5Mbg`^AfiCsg+@L#y&b?^T`*JXi{R@zx@-Yzin_W-Q=a!RXX ze8Sb)XWdV-R|4W!d+_~ImFm8fR`K-)`bajSa;Sj_8 zE+{>9cx9G-9?hL=8m%W|DMCNcYT~;>Ob;8G~+j@J@-^U&0ZkV{+3jULy ztFQ0lub;mrC%bSyl>Er&KoJ-7%j$+M z1()Khq!z&Gu*>ozmB7gwMeojrfn-H$v3O^lm=8GWB(;*YJxJUbdQnPi2%nhIzB%Q7 z(lzSoRR#HLfZ4YdFhbA5bv}?f;zcAs;%!xARX}vA3=#$ls}5I#+`k#f+b_E52(ce+ z%KFN!enwz=kR39%a{bm=5*qmU81Yq;L9xkwpiJavzmMy{h=RvUtbYb+PuED9%JuDs z2tb|o)4yfzuFre2+bp#WJ49d?$(&;&Vgrd721oC*56m~5Sg zr2m6?2TjD$dS8h%E`t;iEA4V%-e+M@6lvn-Zve$KUJgGZVhdVDQ4Z7ZIq>+r8!SeS zwRspB8h)xV`TF26hFkNlopfW>i{h95Y%wCnp6n;WbWb-wO2wxk_IVzkKXPACbf>+2 zfZ(+u2Na>(dqR8)27MQab3KSEo)n~?1SO=W+XGY?H+FcLgv$pA-)ri=~#|P3wN5Op&n(Ajl zXOE&1|5{2b`Em8&GXvV9n&4q-uR3EEwz76P+5t#b$E0Yo7l!FC<~W-zfz|&=^aRyk z2E5r6&%+D&j{A7lhaAQbOcmMBv?dylUSVqcN2mKOg|vZul(qFjc==b!WN8}Wy|e8Qo}O1UvUFfaZ6Lv{hTRh@Pad^izoz!|11-o+*h$( z=#FdD)1Eu>yHD&seWX)e35KRIuy08#q_lbYvc~A5QSx-M(buBGqYty~=n$@0-;WpD9Wqbbu+Mx2n z2{nON;3}oTEk8qdu->ie&FV|$**!jinfV!R6!cdLHA8;1)i2uhO6y~me(mR%Z@-#9ZC25J9p(q`gl`0&Vpb)n0^tkTNmRz|&aAQiCR#iC=FBr=g~^2d2cZ5^k0?9h_$9agz-ySVh!3V*jqVdHl_kk2c!M-LeQPd; zZO&bm$$ZNetdF)Y;Y~%62zgm!%q+bKQrnGC=8May7MI!IM2z=&JMhFcJ(I@gL&Tk5fBgn zikeLcujZXT{T}o^a26Z$5l`kn=PR8VfjryMK>NRH!arwC3 z>v@(dp8vhsSU&M=VAw`rUG@(#t@_MAXUByiv9V$*cMEsC@9)#I-FbSg-+0T?N6pGW zi4B~3AeRMMd%{!dD9|!QOn+I6YKjPg=O~IW`MnDHQ17IHjJpZLwnvM6ut@s=`OL~} zg}Fs8p>eYnL$oBDvP&@`cX`4K4CI?94ovj>=K&XFAqA2O?%+75tyt|%J{?ZlK?QLX z=}Zwh%`IOY${r;?aF%J)v2^~h1TxtollMpQdR&clkw`*rOUW!E>(SoSK4B1BsAp)VvhdHR(H ziH%80iSda`v<=r)zrKmDb#W*m0bM3hru>|Tm~0(UmgD3~6a%NDVY*f350C<1)~m_Z zNK5SfS2tu5^Gy0p&JsEmtPR5rd4+z|GRb1k=PA2i!ae`DKqudHyimTP`UzuavOjFZ z<@Xruf<;III!8oe*S|!NSk7z1YB-$1HacO?kDp}#-%4^X56D8jzwdh}+3{`3 zGbg9mj(O%Zs?~GnFx7m+deIJ)rZ~Ox8GPUmAs3S!yRQWEq&8eU^(~}q=hB!gY`aTR zMG;ul7eLLubJL2Zkag~Ou?riKy~4rB~*tq)%q<}fBJynM`C_($aaDJ2(wm95yn=hiFnpv2bU!Z z%PXFunauT+Yk7lh1X89k4#7xfJ!do2n#Szc(sC9~@C2xtA=bg|b(C_IovS4;Qd0&7 z$>CV$Ws~EuwF4%LzwKK;lUrr&Jj+zTlD87)HPJv_$I5r6-c@$r9+cMg24r&?lLHkJxOiD16OSby)Q1xS7U<2?%n3xLe(r8_v`jq_BWQzEj}2nN zyDiD*Wa_%e_vimxoa<35XJX&7&h&{g@8^@j)cmuizzfS912$|)%Y)PK&q_fYXs*yg z!GjUv@tM9!V|y_N-B1+>mvz}-XnQR)*}bRd4S=y<06P@aKQj*;`QLH_R7z(Kz9bW~ zc(}W({LRhH$;r*7B&T#dJGOUpYzw$?3^WM|0m&5;XKcEKx=3gcs;0yUKDn=*&1FxgR~>}5{#?Ls4$bE@RVB(!&NX2|`~;2bp&~Y) zy9VKc>nWd-Fah^!cAeH5gSZ%Is!jNPpM5~b=_{OwO7}nz&%Wc%Pc7XKET`Y_5587U z7*3<`G4_+#JJyyAZyc&LrE;Y)^X$olwV+(p>(%afBfK!twq!K_*)q?-w6t*VvM`R1 zbt|qW{8?YJn}8l~6BkPRwT}H@D1v2kh}H{kIx|j^uhO@h#n>()8Dc2pmxdKT{L#OR ze%!{~UuS~o#2{n~y^qAFB=k1hl_h_9wq7gl)2aOQ*X076)l|t58qE+b^`loobX%iR zH7*sOEd@5CNDQB6ncOMXd$^YQv{pKaBLAhu$OFErb8&e77* zeX;f5>A>E_dKM7&-4dOIVG;DOq;tuYioV_bF=j}1b}5ew4Ju{jluwOYXm;GP<=S^7 z_>V9=I8*us+*l;mWs%^g$IIqw__~}iB>i$hQwFyAtrxbGE$2`L8sqO>0PH8TJt`hI zmu-%9c^n+yWq^9GCE!xOzJXGys~4F>JzOkGTOr?8xT(Xy zDD|YSvyu@SBd=k8%KM&VIya&1SqX%LhG!{pgoxob@_hDtT2xTn&q{4ShlvD4Yg8Ee zUHF?ahH}g4kX6$QbTTU&uNG>t1)o^AIPZNCkkctK%DKl_rkDTJNrAmk#16X)`x`^M zrU0no)?YbHdtbWCvLi_c69-!{^c}el{a@p>tD5j!azwzgmW*TOa@57R(1_$C#H% zF#IdX=7{c7{2UML4@sQ`&7}#ilcoB}g_%`qevkE^FmH)(_Iok?i}mV|Y+GA;$Ni6r zj8`WoXFz$<_3*sY)y?_zUX$I~t@q!J;M3`j2edDM-=v>PJUb^qR7~vQ_pj~!eQz%> zCqND>h%>#|lzMhoM+o(uV#vs{4F(OeUpEc&S<=#SEK@~x`u)@4po)>)?^e{ z9sgV@)`H%ALr}Qnqy0N(IfLZcf3geniS447ucoLLZ#AMbl7gAm!o8$%`aje^M}`O4 zB{H#(Y!Iy4XD~9jSQ(+8M?W`tB@`i2rW6OUn6LpLyR*wsZ?WQ>Jby6lkdO5!i-=Aje1OpG)shi7S>tBQ~ z(-{BgLI`anh;zXH!_?oy-61#oQHa_@v5kXpngjvUHXE4?M4&S!|XRrwuN;ybgFMY&y@JoS+b4BH?BwG;y@^q2T zR!+8U*AY_Hj-ekS!ox0q$Bhkv6*rF8(fT1UJxH>vR-w5>3Tff_fM4AaJI1B}gtbSX z=M%qQT8=#az~sE+6Y^ZFh<{lEPq%v{KX}#bdF@4bUZQOsuj1BhV5sSwo!~9;^OKOKnyM}uPv@F zuS*Dti3tnu<^-UjeE~GI<>gLBZN6gZt}5!Z=j)4lw$8$`D(cIz;B)PEcVa*U7SWqI zzV-Au7hL?CJxRzR+)hK8?}g@4J5#6T4|zKjRnf6hO*=Sr9&e~eact+z)GuqzY3LaT zityptsYED063?6dgm^G_=03Hd6nYC#8M*}%8eY9Sc4zaJBgnRJM0=#|Qj&XGe}wbZW_~vN z_|kGikT9j>d>5v!Co%O0G;Szuxnr$A>A!*^$Zy`0Z0CTE^}+fX5tTTBOj>DxG3rP+ zL;42KjMqG#n|L_V4z-X*_%|qRhM#o+c0HwrR%rU;syrk|Z>w$LD~2htRVH_7;A&ie zE8E80sEs*g^D2Xto0;@Y;4IcZuJwey>KL>tSX>HB`Q?R_`zzYp*xd)#?3(=mEe8(b zq(PY#xC(G+45hmdR9MG8jTHMZ39(3zdhz}1o$jmNXg6I|>UuB1@bL!w0wt%#YbCWeJ`tm?JC}!iKr+sCQk$2PfU+WB;aSx#| zzdidZLk6r#|0qifzQ@wfqs{9H78Jvx{l}&M%cyF??<*O*zccEC9a9IGnL=9g)l49@ zg=b}`C9MBmQ$NK57_89?VN;&%fG4T$8xVjN)PidUo4fh*R?zxzdXIzA%Ib@Je~aIP zNK4DdWs#3>vX_9lT9=44(F8)Jes63TySW{$wp;^cMnoK+M#jX|7G`*!b%0L*fB(!D z9NwQm%P)IT6Pt}|XRD-o5)+~g6n2s4_Is5NmV10x6!nOi*@OI{BX~SXF?+NP17QI+ zJ=ymzP52~Nu27G|8&Bw`+Q0N=k_@plV&3mzv4pBMHZ!QHjAu1giyqtkMpJxNWsIn? z;7PQ#Ir*fb0DlSSTG;DUfN)?|g&*jiP`=;fz|o#!B&p=4R>V7j`)J+dafvZvt{P}? zM{(nIgrGN(x+i!EC{y#`{S=tcoZQyt@+zV>I7(gS(Rj%@O#E0A=yo^LT6DIFEedDt4+{^!6Wy~Tg%y}+N zzRiG7K1;JD@54NOW3zCFz(2F(5c^Bb8{Nk^=_;1DtV8GX7S+8<9+sExDq$^$#=R>o z@3sTQ^0QIYR?Zf`IyrB<&(NsN3H1p#wc$)(8U6tnURYIC4KlR9tYmR zK6o$;g#r0rilJWSI!1N*YMbHu_RPIttj4QFtbimtC2sIwV7m$7Ree2RB(F>O*6ts- zcb+3>%q*wkP!joXh0#gQZDWi4kB;X0`Z_YnvdYTJ`g*Tn7M32Tv@qDMefy7u1ht*Q zJ|KgD8AY-8Sc8tjN+f8){Jm2_iGm8kvH}#U+UUfC+J8Sup`9~+Kszebsw7n;*pl)A zj~6J0F&&r&LOMi^%w0F-xK)bj4&kYmMAVtzE+x4VMHYv%U8Bd3&4PeL6x(<83Mjb8 zKZ6c}(4pLI7%x~tN&>mxzMx8f zcQ3Z@cFn`v*>Y2ZZj&I`I4#TcXUaU+YNYn#=H7I5&iN`%E^PvWiHrNf<^d9L5aw#) zOT$7JUP#yrSJqg~(XY zwZrO~ZxpV99+?r90+VB+<4?hx)f{>+bxucD7rNkmn){>B3B$ z6r;L=Gz2{6N!=R^ieo&5*%t7xSqx>v*zWt?+iC6T8d-r1UT8$VsQ?`UJuPSLDi1A4>him*l;wUj(d`!q#b1sNaWr*@!WgX!p;SM_7|XSQ#su`O{>4uIkhD zSZIU^KRMGKQ@(s;86vblA}kLMJ=CEE>W^;RMs@v&XF7-XzGD@41pi3nyR4;G7fFG1 z5Z#8FNyGeuz34hyc9(pLIuXs;7_RoK52k-Y?GaJgIKPb?crQJUl`NPKUsZ)o1fz^q zX-V&*vP-eg5n|38|}!<+5*Z{w;)t+s0Ks#Vn96h&>ZV((R(TCw-uTalnYP44Ie7@(`Cx3uAC-=F>^}epx1;)ia77@8RMqi6Bm~4{nHhE5IpPnh< z!Bp_z)H?Agn@kSA9~o~YW0eVyn&z292#ul8;HRypLKdXfF0`D3aphPk$c*C3rH41J z=`OX+ia!UF0&4K6(j7Inzzy1=AYz8}1bG(aia1~n^ylHwxDLBV-0j%jbX{pz*xR3! z3PbBs-B@ZsHw@&NSVgiju9QQevX4SRw_B^tV~^>AXjo~#3fz6~8kvAkS!T^h$PvCc z|K{+!!23)Yt(8`GFT0@j_-n0Xn5wQ1$4iC=Jb{kRJ^B7VzcA z4Ife!FSY~muy=V;3|D=Lf}xS5Bke0Cn_c8B?&T8bM8LpQ?m9!*hpdk-s!t3qjhSAG5IvVa>LytsBza!(5p-xvjjrewf*&W?WXejj%H1{^K_ zO^Vm{zJ1A<%W-gg9}?o@lXAZcz4!L^UVHCaTlc=YuCA^-sH3qF$Tj@^`I9zARZHS8 z#l;C9hme@O)oXZ2xz#kOHJF)RncaLyB2c#!<7V(^?u2Pk1 zNsTolKqjrjJBc7Q1hVakWc}!wz;~jPZPUfOYZKT=LYa5}==C7Q$_Xp7oKf|CW-L2* zC}-VDr~cd73_(+r+7w*T8*?;Z z7Q38f1hL&n=Zp@Vmmx5se3b$!QBuGFV-w)I#SpK$D5;j|w?(tX=X-{+$B86Sj8++? znPkh9m!yhC&|HuO(#5OtT91cECH>k)`>~q={9uRih4# z|AiNi6)%HyUl`K*^=3wZZqG@gL0b(7f}J6_P9p+Sc)|8TPt9qefbf>;I?K*i+&0$i~BegD5V`D=@ z7S=kmuK13tg2!P9HUai~Kj2kw1wN_!3}0sq0`AlcKV<`bMO+S;*0I3s9rKbnb?Xz6 zm}Ps@n?HZPYA8DZ+U|QMN2cbax^ZAHnuN;F%Od_-ai3$U5#N4z%KYao%$cKLIvca$ z$b*9i3HMfJt>ol$&2xyqE9+xEv02Jc8XV@NMGYAL(OJ8^LYW6|?T6Fl77PW|b!{6O z+7X-jktl5!Hn2yiKeAvEndmd;9_I(sJDj+s(IBs=#*NDtGW&|VNd>kDj)8g+8H@2@ ztzJT0cxK5>tgD&7*65I7Fc`6muTQalV@hjB_k2F#8{UQQbqX4$xsVpDrO;B&}iN zn|7nwCWrKF0cQV+q1P-Syl*hvOSfcM9r&`fN6aqksIH-rQNyw$c7eA?-Jo*% z8nwEKBHB)5$Z;S(C0oP5O{FRAR^QrxEk1yZZ z#Oy#7Cf7x<;sLj>3aJw9dK`5DlukL_MM7LTFLppSx<2f7`1(A~!$OaONjGRDc65dv zbo^|7ZjcMS`$aaqP}xymzo%~hp-)k;jk8zugN)c1f7@}%7%#?F;@&DM$?5?*&GFI7 zYzkq9M?!58{(4qI`@RmEyL2oQyZSD zG`U)Y#HoaRsUL`>w#X#r#r<^fyE&|ARyMKd=qn|XqTbgcWp(toFYSu+u8js~H{=EpZoZT8nfL8h002cd*J9AxTK zk1*zN-ZyKKtQ9Lt>4$53oM3?@or>63r^*`;0J7!+2(s>#PkodQz6)mL}dj0O@!+fiODl&R)x5z4sGV!T5E~_&KZ@*Sxro^bN$%VCK&k*;08+Kl0@BemL z*8An9lX$Nvxm=Cs(14x?4xZ_8hi<)9EnagpCx+QDVoxH7EFE+kP!GhbC}Bv5Q!EI5 z#44*Xt+O1eMuc2os&7X>x<3v^Gmq_cyjVaLHBJ$ zL_~i-(8-RD1r0vD`HETt9%|fm06m(ExV62#J@e|X@_0bOs=h#0Q4 zOsziLC)T5IQrfH+@FT%Rod68;(U8gZ)nj!K2!Kyl*VIUc+`S$Y9V7~3XF!n&gJ?t` zQB9cw&SX;?8-<8JZ@NfDgqk}uOYix!iHr3X19EBRXIAM6ag9}ak zL19}}N6mjsc-(5`NqJrd%E64BoeIfpxEWfon-%;iW$3W=`PPXP4vqK+FYh8%VCG>V z@`l+>T5l8b&%z(@O^YI>DK06)PJ*+JRbyYZr_{6U@-N1d<8_%Mf=ZBXep^nWI_S5` z$audwp{$xP>aAg=EGHJP8@WUII`}S7(g8*?(500XamkzEjw|)4Nh!d4A}SUq17@f2 zUm5oC^78c}ZBjoxba4fU4ufSZz{dPE0$v~;Lho~iCoFVp!;wFMD$Vu(duh2e;B$Z1 ze{-^iyC+URr5NsUr>y<_g(heh)s^YYvCX`b0(_T&xp_I9f}Fg9%RkdYS*SryL+0`iT+zi&m6yh&+=DSETAZbi43FJq%PQ8RNV$Kj zo?cF&+YrKml_X^)8&JXpE)SvIXsuj!F!tGDr9@f=hrtk5@GgOa>L{T_K(@&Sf$%QQ zbE+^1R|I2@ym)sj90Dd_`HWX1T=-z6Ioy7KI)B1ZtffN1+**0U8zaU{dG1K_ofqGu zXfHAsmYV0>qtpDmR;c=Dqyg{cRzu2NOV5md9)-^UUdhvJwC_B<0kYJS#;h)0-u~_W8 zkA~k>0E4!dMcVx&Sb(QEXT5_m&1z2!Pwe1X1Hua=5_bs1Rg`}&EG+2PnVm5D+hFo5 zsX>C{GXLq@O7sif{egfegzVMRdGUr*?~^vi^+s-+ zdPL=N{MwH#8m9m4g)S$Ys;EdN|4it@M!9a>T@bjDGyx zLjloz8-+IkT~8@+;rGst=q4%r0zJmQSbAr`3O$}NahH9!ZpGh2^DluQQnEtY%XnRz zK{cNv15}?=2Pv(IZNRxD7Ig^J(HPGApN8O+x#Zb= zaI49#DerF{HO$t6BT97-9mtHjCC^*G&uF97_#IkQ$t)exncY~j=EPgoK}(@PtyRKV zRW(oUFv;G!+cS13C6!!&%zFWcx*>8*fpDKjEPjUah%fUFu<-0`Z7cAQh#&>E3Q+Ro zi?#ZMZ!vk+@w6HtL>xfT)k8Acg`cNmSSkxH@2iX};(c)T{pt$FVTP`|lNq2C5ft*H zKJVBp!vXhzmY;xl5JQ7}xuG@$J9G($qB#ImG-s;f+qs1e;~tzoranK0fYT9LzIY8W!7* z)<9!t|601llqRpvB$@Kk@%$1SUrV)@KwWI(u1Uwfti)tb7jYrnE~oO@>vC`t-y)|C zHDpEBMixVWdUf4>bBJJ3v?F64C>ITEKP@CMVR8afHtlXZ^1S+1zwVQ2%S!u>^tM^0y}*bh~X0&IU@%T0%kJtgoY|bvlZGsoF=qn=7-v=V7RSayB_Q?a?Y4eh z`q*MSrkcAqySL;QkOOcpicZdwwNMc^154d5aAeAsNVWwMINrXz;A`&J#Gd=40$My5 z*O8WeyloVjr%8p9cjl^h(7&VwZw9k1DehRSB4)e_ZZ(cWYp9#&y_?XsvrcpwJG#MX8^Y379-YUAj_6#GsVkKiI# zjo~Zxf@vzlK{3&na+9n)KTqoRA-sJ$KDktfVSBceA*$Y%-{%!&h(A`Fn_4xtQi4V6 zb4Rh$<+W%J?RF0FX!L5V?AGPc`!d zkfe&k^xT6WJ_6($Fo2#4q!9u5?~TazmLS0PeSNaA_e~K8zW%2x2lLi~$7NqaTpTWq zTwGcTzVWUB0DTm31SgEHz_U#Q_iXSh99}MFwXby@u;RQMFx;S>SCucrc0KGjqijKL z@`o9p7sB=coJXC1GzGk;Up=gQV?ana^_AiCu1i&uB-x$t~(Z4mDt9#jOXU& zG(Jk@=jAcG>Lk*h14)O)jLiyz?4#CDvViJu17B`l19b*PU?O4co%IE@L|dD{uBjc@0)ugNx4Yk!~XF!`vCE%Hy+Q9K*jmypj% z#9k%saJ0e%XhPBWNfo8T4C$SPo**`IXe&kAvZF|%>`NIgwXjc!8pMPZ&SvqzCfuqm zhzwLdW}(bf?#?G1v%gcF>G}3ss2J5WsR3n_d-ex0vbUh7UctUZFB3x$Siu!(4V~wI zNB}L~w~Z0NHnB9h*%{X5u(^hPN_V2wnl=cqNvO4eTm(uw`_q<9mep0YIO$&5uj)Bd zT;RQ`H9EEgZ0VGFh}*>jfdA(^YeK&G9e^w6S%?5IxxcNk!ac>VqH zYxnYd>h4Qh=#r`ySW&Tq{r+lyxpgcK09u3t2uE`B9>0uw1RIesz(Y*kPK{h+1u}viC-|g1Yt`~wD5Klzl5>#YTmd!Y?BhP#rF)1 z--Iq@eO)jb*G+klLn(EXpVmm_6kD#T?rvUV6{LljKFk%%e1lBNM16h4JFhbmM6y4i zjq%nhCJf+qKWp82Lhu*BYStp`}F@N^gN~ab$|#x*an2W zN3?=m_`M=PX!?TLFT{#?uymrJ{)gAwfVFf8P7e4Kfyu`9*U6EQy}i9}hJ;XY(Bk~e z-JQ&+U`uOLQ%6TDMHs;R1VF|M3$Y-s6IZGAGuvQyhd5uUfIqJ+!E=B|r~nwQGH2^_ zIK6))*|Jwo4G2p#FCjO7Ouw>6siJM2OSO$AZ*=ibRCEPn5%^R=q#Z1xCF|_I z>0uC3ZBfg8(cp^h3Gpd=g*hL3*ydE5=bNup&AIvJmjCFQy6!g!_31^;QLp`j{sFJj zyx-^feN4AHq9yoZ@+s3uG7dRdR2HU=!?Hmn~0!Dntd;yMRlf3 zv$m&f7%Xr-MNSHRT0o8wXjA$n>PD@cVq+&6dh|b!AEg)?6!R>~GO?z%T;ULtF4h$? z&i4FV;L8A;-i@Jup_W@2tGG2VJW>tg4JO{$MYdcM0Xvhm!$-n1_e_tQ6k~mTuZ1uB zNM6u;dP#plF|m=W1Wj|W)=}*73WpIk)MDBsfmP{ceU<#@zH5hFZS1b$r|LMBt|D$U zgWJ1MczDXQnb!>~RHGW`2V#jQ3inZ;{yox*_Cj!le|LO_bDND1fK0(V=cez&fL92S z$T`|6L$qZY2#=s>r!P2McCDQq-5vZkZnsZjGUn!*NChEKAlcRxz&I=Q;~XY%na z@GN(6?lcd$I67Qz$;1pgnShCOinuxWF&+q`M!HG$l znrK;wEDc7Eu?FBO#Z>iD(IWb*sjof!sFl@>hX)L3IH{AGPg-QAHL=-VoSlqe9fLl9 zTH%wq8?;ZtYz+sjAOhHe{nMDQ)*mJPJs>b0s`w}nr8P<^v*z=~5#@RvE?Tb6e+i?`x^Fux(fvMoga2zb+hsE$97s!!>Kt z@ZIaDH8x%nMIzNd^J|ATkfH2xzXvap9urDX2t%SoDuLP>AOiCBGu##O>6}k^ft4~O zQ#FECC(dr1m{Q9B+{G93G@IO>J|M|#PlY8fHCP3HAi@x_q=#H(e zt*a|PtG6Kp1V8}j=h+S)_Vv6@hABt>e$}271CoLf@JKqAf&3=tR=Xl)(pYIyZ>9=3NC2SOkxz_m_1o86u;T{Dta;V z538M~oyC5+Hv>?f?Q(baW8AwKlq!`bU8(^(5!Y!k-W=D9npV*GZwle6ScfEjK8t`f z$oO!A(6_&-#$t{-^{L75*mSsGvH!%Uov&mR(I7x)W#3fd)EVkLqY9^3p3l( z23Q1{RzJ7u5~Mc8N#t~lLT`Y$uJh4ig4JfVQN6+>f!N*fKu}SsQ_*kyzP9xd#pG|^ z@7!|d>HD_DGvl_k1YyO7+iwm%2BVw1Su3B$P^U4A3{Z7M3A>>#u_1yK*t2rn!W_;H z$%<#nP}+TFtq0eBnn9F7Kd#@6-~2ndB<(jTvTw<&4(@RmGtqOvFoF|UOSTON7(T2q zZd&XcVC?|HxUfUlU8f9CO_#CsYjG*%j;r0ZKhE9#ZAI_jhh#^Uj7$NQg?DS0S_S**^E{OER24!|UX&4v3)Gm!lZM~A*}6VW<~@ki`#*+t{K%3FN(+5-#i#vvT!)0Cb%qWzfiey zU`RG!uRLhx@xatyeJxyp&F)xJmUS2HoHS}H6Sf7JtEDsHi3t=D-j<~)ela}2WoR)N zIfObboM>^;diJw-==afWo{R~9m)CUCylen9msi;JYfE}DiRah`*F{tWWJ!Rmi@_s5 z>A%ENwA{)`w!h&h*}bUXgpOB@7IS3VtUa3Pi>`4>YIJnx7>~&9nhaU=`v)SSEOTORfWal3Cri0-vph+1?z_VkfegI+Up#9Z<3m?mMZw zex-VjHekBo^ODs4WH21Dxl1}%LMVrXf1~@7IKw;_S+-|I-NHGJJALB;BDs%w!Z2%s zu37x&01Ex(RQZb}kbEKY}v01bk7JQn9$8i0A#v%vBHJopqBXDu|>zzPt^sjIF% zIy}tJE13P5H_;m6R^JnndY4oL2GWGvHy6jPpIU(`2NCPt`5|B)dO#X1PeG87FjX+2 zt|6VP26S0{yYV?Ld%qk5dTKu?JM`~*2{y&iGk;?Gqn zTLYBG@gI$KctkxB1~3rWv-Dl80Go}ODae_hqnCU~?v}d(KqiTvu-#h!xe%h)V4*5_ z_T2%)?(jzxR0`NPACO@F<)*R_j?G`L>7#h4^x=gDMDxQP40Q5|b3dZ&%t_Iv_M`qT1S*!s7H-K@>T)00Xsvxuei-*^s>z-vG#!G@x^jP8Ej zO11`vf0uCFKfcOJ{5U+kW0env=4m5B7yTgi+HkTmwup2b`ZntUANEi zD%UISZvR_gG`I(wy2 z=OcmS4^Pekj%yZDv9)#n7frFDVdP&@6#Hw(I7YHG%dH7#Ig#7O?)TKQ*fw#NMuKW? zExW6Aoql`6`lxz3!^YmV76CnxG1{6ACuF5W5kzR#7SHk85#OE&Dnnj*HaUu1);1*xoNP&C ziN15w>;6x-o~(Y&()3Dl;xh?#!fQ}To)SGrRko>N{hD!$VVz$lEeKz~0>yv)+#1(4uWhW&s;nIg-&vzwiik4Jy;46i z*4Cf;%v3?3hvGs$)EZ9x!OL1?Il*+RrSRnO;Ex|;orc=8okB;yk`=xRP(h{K#oetJ z3OnIF5{Z<$tpSB!Pt#bf`BeM2#@aEXV6}XT{4$?CK8W}`Xi(MtV5*e$Pb;T{IwTBq%e^>%%;LQ7NDfmG>nC{)F^&RB)=$s>db~WlcDhToS z_xAAc56sgpWT3|rZfR}(*r-}l*AsFd?CI$Q$i+U{+RaUMdFZusdyQY}@4l|HZV;LSy_^76&>7@@()mpE@Z^P1svs-PwW zi?pGwf2CRgPA*ym`Pv-yH0F7Zfvc3B57>xm`!p?kAIV7UJbi~r-^spPNRwv){YtdJ zq5Xob9_Qkmzv$OCDwGIWB1hB{*RkCvQIUPX!`@5xW_dvO)2LcbM0{vv=ju9lK2Gj; zBKDF)gxEY91GYqf;!{i1C2E}xw>?@i9EB+^x}u4?HVCM>>092`8E9f;nkf0D8T!uV z^oEKOy*gc@Hr{%rocV`B zXZT5U)^t!Mk!=qt&}0Uym)tS9`;3obm^RYVc%#~_Bfoq#jYd|b2zCqVa4LQNop4i2 zq%)w3O{dX4DJXYFXP0R1voTj6qd#rDk|rY{7!`r4^8Da#T9V|jPmW{96>&i4jO92-F1b>0uA5oBqHL+OI}h_1)<>%c2Ig!x869o}xfzQ8)0#R8QzU1>uR zSZaqZF0C?PJXn0lvB+ANvAKznzW_rRqO9zlmAHVwoE0E8`bU=21Bq5TieX+-Ia@+C zp<=iJd-QzzU(h7N_)t$OIZg$-x>+Kg%D_ND6&42@*0sZArLb$2|;>&ulzc#SA&9M2pDaCS|j zZWK5`6^(jCLb8*K*P^Q;3Kl&bUGpwlp1jn#pEZw$-8LUvA!i<7EHR$p03@tK90j9x z!-v9K*Tv6amdR55E>xV#esg#b&TZAVO0WjZ^M#iM87k5qK}BPm<5mOSJ=%)U3!YTY zPr;ii6$^N)8c(hR-iq=*uj@JWn&P8PB&;Rae0);mo@HwyXlMPCKyhrE4gfC+gE|x{ z3hkbinF}$@xb1tmaXECyMVgp99hz`?&}Ff1*x=sgSFHgJg4ykYS`Z0gm4BY;Cu%?P z2G&6L3eKYu<)@1}u;+0Az75#8*j)Gh6F`s%xcKzEoO*<-2!JGU1caVS}6g>FPSUyHzNT)daluH8nkeNzv5Q)WpQZ$jJZZ&*9&{f9J|I%7G71 z(a4Ex{uK>F;wy2Nz$8QuVV!^*c zKZHBu^OG2=f5{&y%L^OE>B+2TH^aM2|8sJS$vzFK^gI{5FMF*ceYRqJJ^prENlKvM z3z=e3$thS;BV+r#x`mf)Ksl|zyogX&!hQDO@x#zv7}>ak=f#P-W|IupNDeFYoPUvo z=g?On2L0jbiSL3Q6*AFBvro3>BZq%r(fU+~J^$F3PWxM^I`M^AQ(ND6LWXu-^d*tm z19yILGdrrJW=;rdf~&2*cz9b1(zVAgIHCL0ikSaEkxr<*9o^<`?cs6iK00Z)dXB-P z^!cYRE;$X6-V*re3$uSgbq-hu#gtzE2#-rhr6MxOig0c<89WdrlAY$4}#COvD_p= z38rR2&=3!}SA$$F9+>XdsvhC)^>46_`{J)2gUmgh^F9hNT5(x{vvpSH$pAu|?(qC? z8kcSaEEI6@T#Gt7a>#@D1cffv%Phd}wr?I|YZEv%#W$rkvlrxw8flWgUzlzw02meQ5=s;(#|gJN#Z()#LzMnWXd`T3 z&w$`3++sOM<2r5>j8i(vzs|yQj5hI6zA#0{fnvN-(ODuBU%{-Vwircm`}WG#mNgEp?T1hT8i?V7X@v~uv-x;3u03i^9%cNYv~fn-lPhks&C*JSX#Y#PbYaK(D2oztO3uH*dT2Q@1V2KM7Clq7~L4 zk^Z)15}*~R8=a_#{|;YPrNdT9&~ck|fYsjU>gDa~s7yONeumS_2lwD3Pg2h){C{Nx zd$?t8X6Y?M=Kb)Y<*(&oh_zrETLtQ){Rn^*Nn;<+R9%T^UmkHKEF!#mwgwC_R8>`V zoZQ{{wxrF?jLd?6U;iE-pWAls{*p0oe;u$$I}X@<^1VgOmqxRnRsy+I(1TI{O)FEm zJb@R~&%7%l_Jqt%hV8fCjymitZ)(ly2k>vcf9A{b3@`z`bUpSkV?TUOAcFY2lWw8% ztkl!bfA-S!aB|L5zUk4zTsl(Ke`|NLgd>MUk9Wt*PIR$>4LOpGgC6E2dY9AUP1Hae zZF3@}*>LnyVGA%~a_BqO?xq{kZ7i(_YEd!`Pz+&1?PSvP%-Y-((h|4OeGgl9w8ogy zOFmcq{cO1{UZKqIs8z+KZa+S4`gJQYg~A}sj4xR7fY5i>A5_^fT;z0yfi}j<34OJz z3n!tzuq5d-=gDZ0#@hW;w0xG-Vmdb?M5OXyRiZilM+9gLWJ0sAHP-U*lNI?pxEPjt z%k{O96EGFqg79`v6S%d${>mY!59vzGJZo%d@2=}15ae`T>WY|5$7G6ey&wP>W06Cl zM~k|Un+UxLUcs+!rW^64L6JmBv_!I~ncC3@I1H$WZS~1vDBgsb?+*0Ak0eJNdnk|a)|-bDfnMgZ3$SEXU}lGy#e74R?ii<9s=kxMPNB+mG3ZEe<4DmzXG9{ zk&)5(F{R``h_-&6c~5T0jrZaA@0y{A+X&#&b9e}t1^+Gsx#yK7f8aUR-Q568Q`_2_ z>+9Q|mH=lH0%&R(pPbZwcyc^4zA>T`zl-OfjDj~A+0NcpaF zI&>;A;s}!|`fxbgP-?weNMG_o(5oE2G+!)Bq(!2@-oKK+maH?^#>z(HU)kH0<2jk`A9^k4~x>(~+C3vjjcRWunQ$V$L+X-9NLHi&~~#CN)HI zt$MX${an5HIvoZA2myPI&r)sp-o|gmS_ps$>}c`0E9YXx4Wv+atm~5zQ$vAH_4mzi z%$G&F!k>iT0^72RIX7_mG|d!!gYg!#Npox%&5w7P88?DlKis3?;(~gc`_bb+2*j-Q zOz&sUqoc8@Gn;t?vDg6@LuDMIjtAfp|&_f5|a zCMzf9P1$ud91eEZqnbG*CSkHpvb>pMlkc6ShsU*sYRXskHsl{i!2&yiD>zRF!*mdD zun#ja5`?&1cDe1w8~MC0s3}p8#N+WDl?B^}5b@IC)(N%7AiLojYA;i2KEJcNJP%iV zRbvlumD&Q8{*JT$kRsX75Mr_%F#QVX`j&iQp z8dN@Q`70F`tJIl99pwB2Mzy_gO6sQ*Wj)nNziO$3jOXsrGpt_bPm7H5{fz9fO$*zp z&<96T4Dfp4Y-748)Tm>5NySj;b(RQ^?85K-K(SLgIvr;-?{)_>PMcaZF|tnin>o@{ zusg8&2W*UTB9X>kmvp47pCZxPGt~Zs_86FBm=s(^Be z9z)}R*4EY#FRwt~MGSDj4N!wJIm!JHyzJG|(b3e@1O%Z!efreci0tg_tZ!3-Sl?o) zo!s?ivlBW2X){NEaaNeN4A_Cw922gsHb3D_@v$^xy$u25nqevT?@3R6sjXXBK8BZS z)iIr+I?9UzFOm_PwvykP0#o|o9&Z^Ak0cxD{`Fxt`G0>0w0-8qH-iP*Q!loY;s5Qy zSFuu!2rrdG-i$^C@2flXRrr+*m3Ro~av5vR4ToK1R2h>0c%^0B-)XP#>6DqvmtZ`P z*hIENdCoRWxDlWF+pw*g*49qLFu2KM=gL3Mj+FGyx5$v{n3Rw#)3`zFoS-ZHynF8X zn|nuBF@{{9&nAT}Gt}DAdY0+?HZ~HFOP@&CGZem71C zLcD0Fwl_9+CR~9GkTrzn8uNLIL`(~g2iziT6&<*l2qCd{URh`dr1 z;8Ss!6g?4m-(m=%7V{*qBjQ?*pW1z9As?~jWH5^p#iipY5JkwOK-}I7`DjMwXix0& zG78r%b-ninoAx&LF@I3qD2Z`g2nrsuhpuKUCOk|eMMjEnE{HUf+t5A^B{gkUXrZ7S zV%XZEdm|X$?L8r+>DOB-K$!~)Ek1YLV+>@p)Tg~DTYK(vLLbklb|h;|06*r{d!H9I zRCh+H6iQ~2yosQ1af7g4KSt)>mq~XJh+9tfpB55r3l?zc3`iLH=;#dtw?T_=hrW6I zRVM?PkK+r2MzxN*wpIDO<0G06T}$fPKN5sw4j8b0F>%s)7Y?14fNaNL%vt|#Y2NLA zRZ&Ok86yOqA)W5;UJhy2c|9c)2Kqf6^%V4gHr9hnkHhq;@P_0WR1zhSG~+Qe19*Om zF+4;jfT=$|Xmf=S=vJTyEc^YFO*%>8Q* zlKJ7=wpSibx!oYtdF>hfDu&H!T^e=VVDpw|pOe&QPcPSrV&jUW!Hd ztC-n>qebr&4&rpg%qeqEh-CQ`q}HAMc;2d~$)x-_>WG7XedZW+vQ%NhTbBkhFJwW( zE|mx(d^|u{lqSpt&tnaiP6GTQKLFbiM7xO7tr9(rV$P#x1z1JmR6ReUcYvHyshdE?&t_ucDPyn&jXNsr^|_X{p9aVe48Bo|ob*4VqU{0=ksek5yK zq=JJTm%9&fK@O@~g9rq>_6N~~AG_xHka#BeA`PL0gY&436sne%Ty-%sRP$kr+O||b zo!liM(()NU+I>gsv+<)G{+<14q(O4IWz?B*wQg%UBa=v1Gy9`z!@Y8&N(?7%{jHU} zK($x0A}*IDU)xzQjCy(JRh?@JyUjT(9H)t%P_lPApcagn5zDcUd?2Bf4qzI~X^Pt3 zXd0t&rEu73_|EfES!3G=NB%W>n)Jf^r}Mi>PR29p#&yy4Sm+i_LsX*J?<-E(#~Gu3 zjJ|ipTG`#A!>59OsGUb4VPh*nXnZT0=xy1&s9y{+m)&pZIqA~?&`_CRj}P% zLJ){=eo#S8G7%-JC_bSZ8Aq;GIgkDY3r`)=(+OoW+U-s=&) zPsy{v1dTpf-N(OX@)YqW4wEvfthev-oXZHfy3ZvVnukyNK9N*?m>4bpm_>$o6)Q(x{+g*2tRRGV2?#kKB zn^QXkX1PNVSKh$bR%EqjO{uxN`{W4iuO`rfL^gMhyMqb-i=<^`WktPJRrRv_0aPvl zKC>Wxk|%p5@+>27LVT7;cR^4DtaYg?X3s)uWPR1fBc*-;(*2RQiZx+A31=|9Ca}jR z?&s4cBXo!2A4U>0=l+S^dmD{U0(MZ9+RH4aLP0#}K!dh4XX^fr`hZS`0|$;eLaHzz zYN&0~?v^&PxWg73OaZQTlk`Anchgt6ShZ)D?{n{(=*9MKn)Tra=T}?U9zgp{2RnxN zo*}IY$>F~X$rYpErk{pYS}Sf8G!L>dzR7#YQa9y1C;9mdhkcOMW8CwdhtnI>tH2s_ ztm@&5y{)or(`Vd_a;Wd^1-!{$u)+MJ+pnG@hdIGMCG9xq|0C)xqoNA9?_mq1QM#4x z8X5!yq?@6;yI}xHB?gf021j6E=thQ;?rs4A31R3KB;Nb{o@c%PZ}+Zs*Zp+XiM{vP zhfKPm>0kFZ8)KuE>|r#{BtPZ1xNUM{xvHb`t9)K?9+eAf;}rB=H4(E+?4EfYDXyC4 zsHeD9#pPS?e`4KM($GM>gquh!w0&OOelu^+O~TgoJWK~0&^S=yfuzzFm3FU8?-lU< z!(5-_X!GC2<=O@cA~Q@3YBHT%tZ*~Z*e!6AWCvmBzyG~EeNX>2e&;2g3yF8_opK@j zqYvv|Zyb4CsR;OMHk`BLYZj$|ycd{WeeTfqC?LB~l#t~}NsMXYNzpw4(j+ejZonAV zT=et9PLV88j_naYtP-h4#cK4w7MyBhVH_h_r@u2^b$c2{FL)_t4i@xOvH(*V^RLVb zjfT;rs5084PG@IldFE2h!Q7@DS!RBnEg~=A1Z<6j_&dw-Vt)k%=jnMG9{}|cumlUl z&NhY$r^gD>rsnGcLqkK;=q_#E{n>IoFE8FD;6L8LwZbFuIZ4R6Je6D@uf-i>aBEkit5WZ*Tbu_);uj7nbl?UB&M-V?VUM0NZ(_sA-zA4oh9sd>o-d{fxzTlf)U|7SehL;@;<79+q* zjrD1f2xZg2cUQbg{?QZIk~BhJmc@>3C~GPLcvc1*(t`cqVhyx~{H}c-6@Ds3{){Qc zQerx;(+|`%6@T@)&WE=u4!OuQJ=-e^yCR{g6g&>4-iL|j*_w~WP+Z3}LqUnMtT3?# zEm-Tk&&zV@NX*IFVq%}%8V~`ppBLwJY`R0HI*k*NgMEW0CTM4$t6L*NFPP5zJo}^Q z^bWDNh>+!n3>*`%6W$p*`2+GY*H5H+`=Fp6lY~on(44hYAoz1O(@9}R^cuHL^Zu}E z^vLhFK#|MsY`IELjl}ZTgauSeAHaIe??20^%@`B6MWY#$dvg9xRkWV$e33Sngw6Kx z_?Nf@vjVAmC&~ZwG2WJ&48h2u=mwjvXur%rF3PDPjCa|9@vSH)nc4$KRe$h?mI?Gv@V;2Zl!F>z~csR2WKXv=dZjzguyNC$PzPmG3g;c!;k9&(Ua?l{%huYwxCEi)b#D%WJw1rq@>N=cPJl4Nk~&Lv8O1nRPx~4TL=WD|o!SPLO;!uMWBYcfIz=D+&+3zx%kC zdHeTt)17B6K$-7yXZuO@)|C!K#X;+Ww)}P^!|hi`S`4uM0T?;hV_oDSqt%_mZ_7+qFQDIuPoS%l9&T#*bNz+tKsY3|wHM5OSCEKvbg^ZzzeKX<~WDeZu zwhE=zK62U60Sn#1N@21JdLe*=9g~a=`#=q*Acf_bTEjzehD<;v2WLwaCf~C@&aX6b zx~FCuk)HfE#BBxao&t{HgnUKyliD-CIQGSjBdY?7Wq3qMXZTr1)mphza(bxhdYo?1 zKl;DsI>D7pu_IugX?!oAmAfjub8@c5Th5XG)@@BQLgMVBrQ-LRxi{Meq(NIEIC@L5 z?+TmLo6<`I!;=f-6Jhl`eA`+6i|848JEIwwT z3Tw=uPW)ekbsJF{%aVxnQjTV>kH`9z@oeB;C4<^D=%>r&rVV>+`5KUT{^*8~gL(8! zQZU_EXI!>yoreb2zhQ>aZi_9JISr4ac>#xAZTqI8ZIGc4_`Z(EpvA%_MUixm*Sa(E z?GLUub&0W{#v8QUElYyLsdd26I5INQ$I`r?6pPbZ(%EJ~e_VhMhdp43&8g|*sAH5r zZ+snZO^kEhb6FOeKMEQ0s6r>Bbs+A5;FClTH_IfsXbOK|4+IArnZ===4hDf!!olt; zYasGlzfqGhq2eJp^ee)qiWQ=|hZz*+<|qt5zB%_jUVA(@djt-Lp)zkT7pe;YY23xl zIk!waLj8?oaK+7pQ#=BIDB5WP!GHd6o3&Hm?TJZBhR{Bmwvol(mA}m_E_lhz3?Q+s zt*y${vsVPO;*e%r;Wr5zl<^eW=+18n7$uu444dU@z9Xiv`7sXYmT%O7+*r_$!GEcm zbt1s@<*dNW*o^j*%zag6aGuFvVZo0Go60g$Cr?+sfS@>AWc*=MOTW3@24!iueFJN3JQg+)*sq2U$zE`rT zuwfjueW{Bog{ZYXOZx2GPJ3E`mu@tl$T~2E9>>>1cs01F&tVbd``J2^ERQmLzj?`< zKm0fD+@I3JuIgX1Pa|1A*R(pD%l8|^att*&*6CWHwN7edS>DCd?9lb>DJ{xql{ry> zPi%f{^2JO|tt+iGUXokgfIE)BJyBh4w7O0A z05`#^;Zg;E;m|p1Dd+i?7Ac;37JuBAu_F&QX<{ZDpcUUx^S4Bo!e%TU~QRHxun*y*%2cFx9{i!E^bJ1uw@e`t5s zsM#FnW0!9kElVIf_So(#BNiQ|Pt}wlc{@Bkb1dpI2-6iVq=x-RADK7!-e)GI4Qn(Y z@1&MgH=V4e%^P{ygEHU39Fcmn^w4;J9~8&Oe=oS$YibM&{hD?v1x>nApHRcj%1v^< z%MxS2BtBG%-O+&RAKgNpc{n-F$HWFBvF1N$v3M;AY7>SUMZhLMn4R^#7HI`9v`!K6 z3DN%}*Po3rEtpI(S22LK?*5=q9j_wxjl;6puwGc5mCsJQwqkH$ad*y9Ot7+&uD4JW zO+M)xh#w`AG0D6jnUY%v2?UUEQ^NLFd4wA_q7G4ScY;wn-M^BO1d}-WrK@>Nt)ESJ zYkoT|q5p^ZhPSh+Tun}Una61GU4;Zzp~pn3br6lfL(1Q zXw>`joN;vi=S5XcYnuexw>dC#Yy&u+QIj3QlrkQxt}5 zl_!z!Rnuma`4r;zgh_^Du=Bgpa!i{9QRvW6>Ik85K7Y&evaz3=0Sf(7y$LS^ddEt(44u zy(R8t98Q*d;qM;3{*ummjm#{vwTViJznhYgh0b;HDBg&do;DSM+0tYYtr^oE`CL!I zQK2NjQ1_|s2v_cK_kQA&`v8Ygy8PGBv5yxi*V5?XV|H`QT-WGgcRg5FyAMc5`_bD{ zUPlX~ePm*PEj*AO4-fBXtuujjiSlxZpl(^^=l)yPXth=ZiqellJ&W}p(+~q`Vbw&tXfwS-jf9vew z6s7M#uBYKQowp^ME0lA3m`AAV-bPS`dOgQHZN#aQH2W~@kC$9?fv%cPo z^(n1q7Y!T+=)=vS@;GvtCj1JV5TiHD;&^Dg-kf1I$;?jf&EjQJ7BZwZqNyUZg(T8H z4?+#bO%>(e%ZSm69VKn{rL{^;I20*=Re9N-cpZyl%QhR4(ne`WonJ9fA)#DBuZ+Ps zxkF_3;@Z?21NXax4_m!ZR+>W_p;G_rFcM;@>+l8BU2qygC(@e)6id?-d_AMyl7h}& z`e|UuBr;F1#sDfxp55KmR3LX6(H=fobD|+^;nnJTu_()AXg@0TgOucSu!w&}PW(UJ zHBZkPY2C3tR(qw^gVtK=gQTY_V+X=$J%^&5?^c~q2&iMtwmG80Na1g8i<5R8h!XXJ zcK`dG=C$C*%>)}bV#BY4g1^`SF7a?S0+23d^9qP&0ehu;?QC;Y3p~Z&o$gU>K!f9^ zz}8SwEWnhovOp0KcH>`PUq`U4K)!!e4+4*@?3^{*<{@Kfm@OO@d*u;L7v0awFS@7I zaqX_=WXqw-4$sbQLJ_BQ7pev{WzpD9vH8<4_K;1+Dj_7t19w#;-Hy2Tvfdv=Ut^W9 zSH&Co5@nay!z`WUvebk<9#YzgHv*=+s4`39m&$Df1YUGQHWJS(Iv7}EltI^m5c9V$ zdt;Uix;Ds@95k8pGocU zmD$ccB`Xk?k4&G$#)uYFbz(WbG7@3n>ubol5~V(@6tK?n7L#&W4sae(_<^$AZG2(4 zHa}KYSGPAuWEf&6rPPna4i!jqu8-Fi;v!)znT=Kb>4R(!ySux8|LQjrrX!wK8v}MJ z-y<9sU$_Oh@56p~ca?qc$vj;osWVcF1PvsGn@t>Ki`DVY*NAL{4`bC@2+&kefpJ@S z1xZ+)#)e=F)tJgw#T|(?TrUSCuDE6}gQ&OSHb1@Zo#@e2-~&fRz;dF{j<6_I^_A4R zBVq-KJmF?Z39$-)>+I?{3$Jb6+$OZ@?1Iu*;`xavHa*&EIBAb*p(;dogF!9=BW8=% z|Eo`|scsQ5vd0Cds!0K58#%YEK$~MIYVQhj!>Whj#}{nJOT=cERk8lb5fuwK-Pq(# zN4tOXc=u;v4Y-M0AQ5u+cLWe(I5wT1cd=hyRohf(wwiSwQZ~lAVgrKNW z9xd%nqmy3YS47NxkhXMwPqCGw0!tGaHJJV@WiQT;gI?9oe)&DbN)nyFv0~HnF!i(c zy~i-E<)%ZE3A}n-MRQ!v_wzxx@0dqlOy~Ouez(d>MLZ5z=tuh$+d-rM?D)8x4W;+v zo_;eYo=>uazRQh^oOUOPQtwn`8W)^T4TPrT6q-{`?-G(0ONa^!YcR(?EavfcZ|myk zoj)IB4z=0F*e}#5i0x9b^j{XrduJbjYXK!l=>(A-9~?yKuXK#WiXABvrrP`!12xqR zKeV-^t?$+T95c6r5(4?8f0hMuu_pQ(H(^Pbx zE)UxKT-K|}c<_$U)>BLAll^{OpVa&w&O5HL{Fl#}w#%P3g@kJ>o1NSPmoHgEs%ik5 zxSU&6L7%KGUoh(5>ZZA?1n-Eh8P%q6$>M3!Z<%wr7fKTPZ~AzgfCaKIa)@861^Esm zhSED?+IAN*o*W^JFn05@w{prXz;gnPDuTs!7kTdjFHWX5ivv&>Ln9g0!T%1gLmvMn zJU(29Jlqew@dT`=&44QM#;lVjPy-l>@Tw5L%8C0HGHWq_)r;9XF)>1Gfu7s-9Dgk- zjgiCC(^`(1D=0r$3}~8-jHEL)e5;W~&{-`jA6AQXACnBs`w?9KxhekqUf**%+Pg|4 zw!|EP=eJr^g-%Z7ayog2bf8PItX$b2?m@VOMP`&jrzX^V-}ZMTRAd`x-E?ZV1)KF* zUwG@!IrLi(f8N>JQNHK@8JXcwr5K>ORI~ByykDA~<0{y?-8>rRm}v5CE|EUgW^Vgj zoHHuh^3!^Ucxt0ct#vM$@ANK6l-g`JW^IozO90L0FPw& zZQ)Ry%_0#FF2wt5kX}h;M53Rdt)57O4`;Kt&Wad&t&~v~g`F_e8YAy3R;;<;+sH}~ z_SF6rc%L^F=X}r;tGTu!EUDDI~VrGz+`CJ7|Yf(k|;g{@uJch|u zTD{7G-k`Z|R~ox*7XF|ynpa(A?{Q-IV9&A!wgD~HfKEDjlIYM<?0jg~U zJdvLl^!M*6fb%Q>Cz1bjKAuYgkDUNh0>s9fkeh8_cKXkZ-R5_SYDB_+jf5ckj_|!BT3RU2w?!>UuwrvQY&@aMI5GjN z()Xt|S!2weM2GZ@)rV_vcH2U%Fdmf;cQ`B1KkMQk)S#oj!k~+ zVGRQ)%6&VA=y&6}pgpYZ4Cy7MOHN)N5!(WzaH13ystI+Xd!DKpswNqzLz?=Rk?3zI z=y_zFO-lNP!hokZX057Zb@!HTqz3sdN#edRkuwWRdII>VZel{r7iCeP{889pY`+rZ zPMS*ZU8ux`@O`Id--Aj729eAxDnt&8cZ6su|$Rm6T0b_sJ5M_ zh?yd{Ow6;y?qDaC7PK*(GZoQl&@7Ulqv`g&>78dD%{+rVzp9mUkqTt3LIxg3q6dTG zF8r_SAg@vo8Bn#x;td*++W;&=h$yPx#P94IB+1QD^+zvE{VnC*#CoZ% z(h!D=EzF89Pcwrn=%cdzg?m-Sr&DgnC(IshFZU%MFRMcyPb2T{ZjYZ_(REFn*C@r+{A)kGV$I{^K*3PDGpX?#Tq!y(dP@BAY(r&F$42LllZVuW3F~k5 z$7nf-KK3arF88=Q_@iF=Y{6Yvdk$$o?opOO=eX8qpUQJ3IMbmdw2E?(739 z^o-MbiWMwH8qWISb4}K!Ey&)qq@k`kJBV~K>}b*b%O?RB_jjcUhWus467?Q7;YS#aiPuah&M_NSQgk2%)(sA6BDn;i z!b@)3!6b0_=G3IEOc0ZiUdiX)vf2Q8y`Pr~ zCB*~41M#xA&_7gfcN;v~H_an3Jd`G7Klu>ox?A&g>XsS^$-wpBW;iMdQI7IO+k91A zg*5CbkkUr14VXZgwf&=Qu~()o**5yl&^ro8~5j;mcpBeuJYFgVfhLg0BA^1Eaa*BhWE- z+}-Z4r`=vCQiG2r1O4uAFK=#ul_s-<*I+l(4u65aWu_goGq*s>d$D%^Z$JR#q+fJ! zbfnlkeW@#+Tus2Ym8P|(z1k~8gdcF-KjuqvZ6h+_7N=Ou)m>a=wlEe%hovgQxOjDS zbrgq~mE|At-klRFeyy9XjOCTTEERnA0jtew*au}1iipS?`J;0zT{5beW)N>c^N+l) z1aC5LI%OehEPHI#qNijdW@-jbAcWn{&m`i@L1c(ehaFd3yHDr+$y~-cl-O8?UFzv? zQK8;9(o7Z$npvUcVb<3(gD-8%CeLQfdEtuOGl;svd9I>|jSU#rGGyS36&qppEuHsJ z|1)dcI=Sz;mDrk%jh~2bQSpheO#%jTSEm9@IjnyUO@RSK=%rr?sJEBUa`;hPglJm3 zKYcEp#Wdq$zkt5B$kWoKK2e6NKf~6v6n!FU5Fyax>AO*dR{wE%3)_--GKO+kNowN5 z^4i*;IseZVl?AuYlkVd=CS8}gndrQSJ%y=*NuJH@C>aylZE?`)ekfc^G>>1jcKG@} zmWM=hF@hdC7G~h2@1Vc-6hHrO_GY5ax06aa?w|&#<V{_AbXVNLsyrCPd7;Ya0d9tOAmSYA5UWAT;lZy30fY}QfBijD zZT5JY5OVkM54c#17mt{*`aT<(@Mf*^k>_BwoF{iwPklGw<}7VTa^dU`x9Pi}tAo?c z8Gt`p?O@I;Q&$OzZ54W<>N3~x=Xq?v^~D+#>d$$uGzYjae(EN~lpmOV#bxvIWVM5@ zS639{sWG>NAN}` zETv0gf=`1z5zk|$_QqF{1nD79D_fF5T<0=!-|6|^9ffvXvd9H{doyseB0Z$#a;aQ( z@oS=q`bOT_GOeQP^41+JHtU|*?jt`DRtmS!Cc$*{si{Z*AzIVgbw)G9aWnL&4V?Y< z!}r1`Pg3RR7eu^edzHL(Zeete6^m19 zVCQVoAO+vzX2O2+5ub7XZL8+=Cn%e0a?n;v@9jp8rEOROmFEsWL+ntGG^OD(Q5Ai9 zMJV`7;jl@ePB_O`ZR{XCW5qCMJ&QbD%V~d=PlwUiOPHJ_aVZYA@6_^(Z{gNEOkj{p z$ES1E;Zh~0oR8M+!q0N&BBq_N`BF_clP>7!Gk8SmE{`6O8h@^0#X?t=A079or{+T0(_*~sB)z^~} z16H%aK0a4ldtj-Kc0Ru^-pm`WhkowrhX)En?qp`TsnhpRR6a5)tqca<&Ft1kBza)a zluNL8(c^B*@eBu=`}!V__fuaQE2dc(t<{Lz?Lq4*15u}~hAB!G-CoKx0yH^(+tZ$J z*0z!5Zpm81s+VKr5w7J`?BmFlY0QyBL1WX(217mj1y^Z%n1CUy0Nszr@JfV?t^61z zY%2VzDCSNUPtx*-(L(rkw5R)Ao!))U@amnU_RC*f$?b`P-oh4V-6;VcF+@k9Ip47b zc{*feg|}F=TKnH(1#?qiIX<}_G<=_gvc)3zv&P|%q#Pbg%4VgAoBw5B*rGy8)bGp` z7#uBqW2e%BmRGo9Vok6kAO9p!p8q}r`S(MSKH)&SMia+pn%tZCwW|Cz=GCEBd50Ks zzbIpuPxkYXGzP{Nszkx19JYK!+@w|7FH*8!&olm@PGk5x*04T#6>SvV_nZGW)XA9= zBqwDq8V6(Sd!q}L@LZGB8JEbmxT$*zuE54kOS zbenLjXFLy55o~#lHNDd0w*E;^-2(!Q>>BhgS3eOUF<{iQUFZcZE@jQM8 z62%vG5aiqj>+V2*GSZCMZbzGtMMXhm+wJV7IhZfAwenhz2QwU_Ub-D3VbuCVJ(~Di zY1X=iJ=zaqDCq_>2gja5^xq>pQ17iJ&gJ@Mfj|N|Ar-;I+dMo2JUTP~mxh~Db2>f; z))zd-)T%gC`4xp4tSj7-0{xWyVj!G(JuqT`-(K4t>OxIjxwTMB{@b}>Oi4QKKRhWw z()YZ-YIpoxsq^T#HY+>NdYprdV)~{Uw39<|uA1ehBrz$Fv3at*QhNi3o?p;(2H)>2 z00jN*W%=FxosB|pRR;q9jbul_qv-=?TfnuN`nHjr3Q*+^mgtgF=(}FD; zPpEfF;;GY#ueU#JVNpj^iFu6+v+|xQpr>CvF_2ezUfpF9Wxtz) zg6l@wuFShV*B9I6ay4h4DJ}pvfPFIxs>TgjtWO3_q7S+h4hQlC7T;~9%722qn3HwO z-7o)8olu?&8!L;r7*t>nYl0$y-n;>=|4o%K9Nl?A%j`J{Sftn*N!)v#_RVCMOEZox zrAZA<#ZKn+iaRxH8e)@$s_UnMbQ!4KNKsft#6yI5v5_xqbXr;wBo=pzSC?TT6h7QW zXC-nFF;e@%9R;<|GFc?+ZujEGg&*_{WD9>4sgrTYU}?3Iam72)JS(aLP#+z^e5Jhjj6(L@{_iC}d{vQy?ZUVIA z2!5g6E>S#}mrNUE-lN%0{QE5X6!(;W2U(SsNotmW)o2?=uwj*A2|ga)cf-#D@lG*Z z9CEE%P0pp`{yj}Ad4!rQPZyM+SmI3{(V!wX5xt%dV^G5*g@bt>bYU?<1$j|{`_y*cq!>HOD72I0HCmToKcrYDP|QF}~3czL&J z5|QK1Q{WMh_nxsPRjr-WCn6cBs}S)eL?E3$ao*uxxoc@TDiaAJejvUVVuDHIn$ont zx1o5Y1y2#>i*uj;&BS034TGH1HHqWUxMNf*%BTF02CE*mE89BV&lb;@9@Dh^GTENQ zf7MounSciOiYlwsA7t9tNS?WQO6G18SLYcMk;ouV_A_li!oU@yjQ()bWiWu$;fos| z@t{~K_WKJ}n`ahV=w~~qjhyVgL5K^fYY}AH=XN_@-)2;EQ}+=oi6WLQ1hPcQ_AMuy zP$F$=2v0m!YHX?{%Ck#E4(VZ(i_-?0rtpmz6($l+&rFJ(wtss7hca02n=;dmf~HB& zhCvm9A(ZUK4AmtX{6P$1ZGpDNf|oc(GD-)k5J$^eekC%$Eei@`Oz=paXNnu6z=!11 zBMMuE-2Q;GfuYHfU?e1>5I^8aNxIn|f=cpGF(8(tFx`40}QnrC+$y z>8RZL!6W*Ah$7Dkb0B!FwGw|7ytbZ$RA}VK%|!~sC&qUv&m@4cN@j6N$ghMZ_g#R` z)oF&ABOI}|YYYyu+mG+l$w|o0o3?kvUM>W+Ip8bB& zZRAzH*DM$E0t%>pi1^HUdMUY+f;$U;hr2Q9G+G_uH&FK$XA?EoO7Cg@6gT(x@n753 zZD%l3>Duo)oXT&l*?{R|en?)QW}LR&cj7mkj1QZW0keP$zITwR_JJj2PKYtA6{nLW zi=dr!iK3HIM-DhWJDQ31JZVT%)#E#$UebEzvn)S==eeM7XJsX${Z`i(VVlM}qjSYL zxUtFAZEEbBm0F`CSE)m?{7Nh-Ax6>9hC80YZh1*RLvil)P*@tKWZ-O~PV}z~LEkDv zmd9AX>!6Jt96#)C$D4_I$PJF)Q5EkaKh); z4tT6~S&{AadS7(rblIwvqPn*fh`rb)kCHEOmr8$?*TE5m|sjZ767z}svmShE5armyf*OzektqTEUg z3mq)N0LOdftlWf}%5vHRGtE>hjeEkA>Dyi^^9 zN;((i;XkH6tz(&%&gfspP6z3RQwPuXwT@@jaOdA!={>xN#P znm>Fk*HfJDbaswRJC=&e6qN|B!O0L6)#@FIUR@NUYQ}2WaqOE zL`>{%Q<~e#Sc!)H;Cn*Zc1J}0#n2%$QI;^#6OSBAnorZqN=m=VW zud~gF)x%3*_x^^*?oL`!$5mGvJNOLU;M=8`GSfbLiiJ^=vv#p7-TVm+gPUsnt9m$i z-8Y@RdE2VHMVk-PJ29MX-$aT7FkyIaZypXSHStOcTWpGblCI|>B{H{6CaU3@qssTL zjpQk6+&-Vvx)fvys((!*`+;n9NtU_0qSpWeq_#kd|GG&e@4rZn{IiFj73e;?fsp|y zC2x&4|KNfB2z$M?X(1h<3xHH2gmDLfQMvvn>o+l^|528vQGo$*;EB>)P+&E`@qfa> zQ$;*bcy&yuh;Yg(RbV+f@bo1hA_agIIf&w(ByL9C6NHgf;Owjzr2H1{x{^yXU2>|q zY1>}F5v#(6ADw}ZAK@{^Yon=^&4;q=w02gN zFGiJoq)5@b)Uth+u*9|4Om~5+C9vL~+w*RcmjJ%)NC*j9Hszs57jfZ8QaTIeL1!k{c4GRhwPtCO zD~eB>vY>uHy2fDSQWd#9SE?7XCCWGWN>}dAl>-Gg`czxzs0y{j4c%tpCJDv>=CO?d zG-lC-GM5IVCuw3eTivl~oM6&XoKH|KX2hIv5Fsex9j+AZ*b?}_Qc8Xh(!#*kaK|#s zosJQl^<-CyZ6A;T7TB&-hQ4jEUNyL|ijJKZPt&~q9@^qlDG@Lz;{uJP4|ld~+35hQ zi|Gwk;cl7C?0|F{+@6LEEHgl&HJ3O|g>$KK?e_zvKu@80j!0%P_Y?zcdA3?{$ULpM zXwdIpN#;}}#%4$L)8>;Jm8n1eTd6|C*4>UBYnIl{e&=NSl~kF`gzV;MU2CIqDEMIb z9f(7hF@eT+g~#^f^lu*l8|{m$!&b8pll-xgctrC^6f1T%MbnvyFkDUj4X*qdXAq!J zb?fY|DL>w|7lyU=s{)I!`>qnOzN=G*$<)x6{6x%=qoX@FpLYdvDtldl{(|ZG7)NTv*vLiLHk5w06|P81 z>1A3C3I7yPMo%6*#ydAJ+sf^!me1(K`))$QZoEF3F@ia+v3`;^~&xdOp@9e|SkSMHEVkc@Uq{*+!2Scc9UqDBn_f}~{7?ZM^% z(EHvr?nplNQGo&8)8HZC{FJa4QCv!TA)kN3neTQulQh}ye ztqhq^4OKD;*Id#aR=%BZ9jFYv_a0d;-8D_yo|nJx<35wANh7B4o{3H`uknpzVMx4HQv>CPwq0xS7^;X^gQaG z^JX;ex(wyuq2VbSvcw`?h^2zmc6M@e!`q@QAE{hI`FZjx&{AnB`0Dpmrj)uxBS?(n zlLRe{OS!f+=;H|5<*uDyVtGca&bGznp&jmSG2)-?^2co3I36zMYF>g97=5=s)$;z- zkgzEmex*UtBXQK~Ycpv}s)27RurLoPV+2j34B|k8`?NMHIxKQ8$8mT2UwriU6Ao+- z_q>@DhMhhcF9kW&obc_n80lu+iW70bM4g5m>ZkNrYSEhn>91yWj6N)P)r30m;M{l- zBz}y@)Xh}SA7X!{7}XOGHq*<)PX~IbRUsXgp-6fw9=?8)9S9jpmM3 ztHs=9(b3p43%6wn|;DTCWgBIMz2Z^rI&ZDydP1pke==*Pb& zT|?2LaPOA|DtnQo2vk~G>ka?R?D)>kPX7~M0gN?I6$4X_b0q^u)|J*j&1Z3+wa%{P zAUc@iz{<+zOZ=^BrehuMbl2N@3>M;I?9{qgtsa-SOduu~mizcwhP~~+G!f*^U4S#5 zRohG|aH(*z8Q7tBd$Bo3tZS|r`ZPcxx4R@0g6iDtwy4R#s+?;4nC7g z)V*f2XQQm@udp!|a;)>CG^t@gvwksu4}0c{IfTCcVp-!0J=Dnu!cyU}#SYb2k2rui#F*}LOCteJ!1>xACD#WLvr zMU=}f``ZJfpoERRiZWIX2W51pVak%v*6dTZZ53OZiOb4e zs`}&qo6OCBys4TqSB^ctQWd$@2I|$HSq#!6R-7Ee{AnSY>E_l}BNO?TBY|KD?e*5) z41f>^1B((feo1n8uc_#K+RcM zG|e&50rh1&P1<33&Qr$hQpqHHNAlQ#uwbTfro$w%KFS#lIUX*_uN0W7vu~fDl{BU4 znt~(p3yButF`Q;15Ij7XwRG_FcDsaS1De1^2+>WR!)LWtlfi#4U+&<%7*_I{v7ki& zi6FqPAT&X%auc3=$f9oh;Y9iTvRX9Wdc8KNP7NAyM?el1MqWJ$HQVgeedh9d2!o#TIR7Sw4FXM+b z0v)nz*}zgv?OdLA9y0X>vYrf|b z>uI$irWp=p2+X?w&M&q^+Vwe52O>(lW>6J-u~~UD-A8s(B<&Qj29Gsk{=)^@jCIyq z>z`0*gCzz;Y2M-Slw-V1mn%<{3jAr?q+-X!VMpTpJZwMS!Hbmqr^;09*yljii??dy z|7Km6cX-QBNTuaqrcRbVAGt3GNeFD2E;^O|{I^&=nnj#Zn-eDJu4^CVgM^fN#EV&f z$owIqnJF3Q#fiMY-GetdEzWwXuWi682qTMEZbmZ9g70-6f^N0L-~gTZ&u1@(LT$S| z9#Ic4PWiZ5@O+6Ne}7Scha$X1>2?%EZrhX(Dgy;(W)D%^M(C;= zcoKLSb?=V*zq;6Hi|o#HRYNwR>ltcj_3(6pcdf)nD=qZR-#zg8zNz=Rh)fUM{ZV86 z-nK2vs}`5uY%SxgQg7j%iClkQ}WO}19rK+4^k zY@%X^da0))D*gwnJ@vKhV8DE@=J*SDc8(!7;jG=3Dr|+K zeovzz2)X+7tf=lT6}18bC7UiGHp$|Cv*VV+JHWkqA z?yvR$|CMMLHUKq@j5UHOc9eU7r(5lNaecG6DtH>inY8+!PBn@<2I?Ek(ry}a&O(^n zd%wo}XGOP+h2d^xy}#X+kE^l3=j{O;*;XxVrvA;(r|WA%$7na=b8kUY5!+{Y$n|d; z_O#)uAdIx+rvb^QbSa-!zbJ58o=^MH$SVwq)@S^;T0OugABKx-;=RfabH3#Tb$t#} zE*VpoG@%R<0f=#o96(2-Dk$K(w>;zGi^})E*q!=^|E44O{_vcP|I&4o9|EME7*ark z+9n+Euo4QNWxw2=+Drim^v^Uh^ilkOTE4EWu2KVa+$$DeG?kEQ@QGn)Yo zxc(syk-0uHp%kIk`l|Po14 zQdD=N{$21Od#2M>wA`Xvd2y2M{H`P+7zNQL7hBAGre>ccCC^+1eMOm3vs=TRYNTkJ zT&0u6RE4>48C6-?Dh)RNGi#_KG$SG<5>#84=&Vap_UT^R=QS#n)s7-pYj_rSS{9G| zV-Ejd*SL&t5%gP+n!u#AUd)R7whC~vFWvOH&Z66Md@ZMhbUTGu`FfjVd=ZzEC^G-E zHW3n~3sYfJ3M~P>jj5@mn6D!&1Knsg+takQT_%IaN;YZ8kCAK7baOW;rcjm8as>HE z$>&I$g;)Q&Y0Ik}(8)u{Bj1jlm6F#O6j8TdGS-PR{{l7Q_H4#3K_diIq5H(*lrXxBc6NMTG+i>HmDanoQZrJoXscdD*Q>64m`sF@aZ7M~w z9j_IaAk(a$?*B*AS%x+FK5pLvX{B4Fy9OgA1ZhT%?i$_QDvfkXhrnQT$0+IU(IwIY zL0Z6g?%(nMJ}-FBacsNq>pJ6eS`M_O5U66+I&Tu)9P(9JE3gEP^>qc_W_A+cA5r3F z$!tJb{ZARv@=f$*tBAWL6CUZ&Gm$!T1%;!vMzDf zH(bpmU;g6RDdMO_(sLuzb?oNKxzN?Y_Iu7;b+CHAw7`n7nHoUNldZD@ruKEiOuhwsG( zlMW^I{QXT7lqHuv-R^r-;tUBcw~sM!*iouF?%Uo~%04drP%tKXtBKnLMx8P|uVjf~KI%UbLKLDeVjmcb!r0CBTAk`-GB z@8+w6OWhB6hVIbkL44Zf*r3;3g(Ke!mA{;75YVm|v9MJ#YE`Vzwt|Th=3P5@GxUpx z$9{UUs6@1vAOnUNXFqV88 zxJNr-PXoq;g6s^cIEpbh_YF$vThfNTqhp}s!zNaSvktK;a8)A{W47jLz2-M&%1JRq zml+0Bn%fqLwmoay$0YoPuu;&%Ms#Z1A=6*LaQ~KL7xI=y{Ro5^qj+DNaZV*yVT-|K ztPF=&8(5e<@V)O?65{Zd7Vnb9F225Q@y_UCzD;abh}Y%9AC`Fy zOCu6!c!6D~BTN3QqW?OSy!>s|{vu(`y8CW9%nFNH152hmb8@IS&TLVJpXI+J|(h=epg7+48Es z8bZ0;&i8rY)D$o85y$Bfi90Np}8JgE>9&NYAr|aT}H>d;@upIF`8px4RAiv zfqtK8rOt7$#w56#?;O+;$8_BlwL|m|rjg5_v~l%`%#`68_QU`hX@Jr3(g#(&`cqH* zZM|c;k+)5GJjJQwcfPf2hQw5^`Sy2|5N+v*m=t5EW!Ab(yxU%#+vKZ$UM}53v=Og> z1>|FTye7UDsjf0u7W{w3h{R{iSs$t*dj^C_S>>XfgQtYOgR?w~KJ*`KhsiEDgM0XOV2pISVa5*Opvs@b!+1n`7ged|$KT2tK=S zMptO97!07&XYu#6)VQy<$_cI@=|`(u)xY5L=|x``D?|#iD4>E}y?sQ3Ds5vY+eeEz z$KU5=h_#z^6^L|?;i(JxA%FK-{El@!*Vnt=#*Jxi-te{6tX&+iY_V#|>npBu+RNXC z8#fvi7f;4HD_3DpMd8}H@o(tvkL;w(*dN&u$g*h6UNDTieXLZ`-V*yH+uf&ouZWqX zGXHEt4a>MM&4{hgs10_)*t|`Z^uRqy&Q09hHImiV_NIg{sHa5Z{pt)vA`3_VMAe7I z^HzHZ9k&7k|CMq5MC|&}8+nXW-QxQFj4xTAo{@c?#P^3^D^COY7&h7v@|BI30QYe+ zUk@gOh5t2`>pP=;Npq!)(2I6PJ%6!Fv21fK~9P!l!TTFt=;+ zZo1x8w0%5PXLVx>fW6en(HxHTv>^x99i8(VqvPn(%v}61eSL9*jfpCM1|Y z1H^eMey|9fW4-6Saifa!g0=3N?6Nj++u2xOZ|m?<#V3S%UvB&eu%Nz2al-DV6<8Nu z@`L$=A{Db*(MaHxR4^)qpFCHh6+l#=ozV@{PQx+nj~i4>gvfPB;iJCwap}nAueP47 z&jQnGrFoT+N65ArYf$dH6(^=#jPxUhSZXmVXCpWA$uycB7qVRz%^|C`RGVeI1)rcDjEb8ae zBEIFwgw52C4uqo^94}Z5zfh~b0%4d z=_q#BmP}7lmGRRpt&5$qH{k=($G~1%XPkYI$1m|GE}O5NV1Gc(IJ?3@(3dd+)J}7) zA;E`Nf!1k)R}=(bwd&&!)X#Er`+0IHItG*+MIQJkhNcpB(@spR=~W|N*B9iH%{#-2 zev6BNq-(&BPJaFRb$G~@h7AoxyFjUxd5J^H*Hx!}*VLQlZbw}4DSOnlO`b_RA3 z3~XyvQ?2xO&d-vdrP)Y0vuZ0)w?Q)hzq72**Mi>WZ{IsMeblN`z0rLV-lUCcCIb-B ztu&h)q)9L|KzZvhckUZvW1}lIHOh6XtFaIP=)m);K>9BDUiB~jqmH`?{_9`o2*Itj zwWS|{YilZ7+LQdH35a;{Fe`_hn>=x0$10M5(kmy)@q|+B>F2{J!2gDyn~$NI`Sa3F zXDd$;7Fn-x^~VL7{jOA{Egr^_{{0?f9`SK;L!9ngMHSL^L?JyLJdR(R?i99%kIUO? z886S4EWLuo#>Pd?gsw$ystebJUp400o_OteefB?rLk(JUcTMZM3GJN)l94GXs*cn_ z^@mi6R3^f!kyqp+kKoL)0Zpl;67EDcMKODh4zvbKd|_%Q%gy+PEI&Xx8j;-A74-Nt zwBv0zOZ_{$UGj8#(bf>icD3nY;xDApa9(Qq5nIU?`f9g>lkY=a(@O9#EvesG6)6X^ zS6yAUOsD}1{^EMlaygyy*P1ND8^`wa4duJ2Ia#gdbg$isws(;zIoPh6)H7YpY`vWxeA3%4k`JG>%w; z?*iLjwPo3lZSu}L$ztIbi4uZ$DHliIjTvGAwC6UN<>YycRKuaG)i1^Z9E+i;vihtK z)!Za3ISNW2I$UB)d*S&^oOOkMvzV)OpXK{CmexNp(|FVqoF#0XnLGT~$D~b@I?KOL z?PhmVH}UR;>Xo_V#>PRxhDyQETb6DF>=z1fpQUh6jdz=ijd!Mtg3t^@^eB+YjLbw> zcotwlB&s^@c4yDepS~3d=)$C6fJasbQD<0HAj=|&?@`n+@n5?#x8LIv5U_TP5AmbZ zydJ6+6U!d+X4Qy25Be_ST7__1ZE85%MqfC*ie>qz(qW z#&+S?9R$hS&hkRv@dBO3C(A8|yBCrj?@TkJeiG3H4pZ?$!+cLfN^=HI3?=b1s8p=5 zvi9T1mm)eNWjoJjfi>A~M1Rnk2&&OR_tORwJj-7j^l3dfv#(_cR8eTrL{H=tO(A2x z`(^lEeEHEY2J)Xx#ocbN4YAcyN+W?ys`?nbU?U?VhS9LFr!_ByupgRnhZ_P~+G%2} ze~*B26c#HW`Kfry`BFh9)|v^AZYQ~m-7oY$U{B#;roUQzVPK@da-m2Iy%>c~R~+*= zvbi<^OB^Zo%S;!W=5rh=XUP6?9g6qAxxKD^tuji z%0CWWB#(wWwE{vntFvt!Mg)P4%6KX^ptfK_7Yy}Q*nIgMJn7lpxtLjgUWImiM7*Uf zF{N&f6-zazWYPr^D{)dU*iQ$ER-}$)Kw|AxNh+pENGeDVhDt>xaOog%TEj?z8IdcD=;tOHf zyjUGGsw@1!z|vf);^9BoCr2D0m)k}o)M2VIV?G*R(pzhC`|Zp!T@*yK>OCg#1oVpf zTA(R{OO#O(rTN&lO*hH$S{i2rXWUH;0_z-k$vWw6lu_M+gTVG)nn~7~%COJ+{R7GR zRad4+zgg>eeTg|hr{6ImjbRuWQB}9R8E4dHX8(d7I^6K# z)!w41nXfrhRkBZFO-u*d=&uinG_Od~9&oO@{!N*FvD(p1iNE&O_gO-|)z{|D*x&6Z zOV4^cQaj;^3V^NlKZ{}#O`X!;kFAotJQeZK>MQ$o{4|vi-KF}z)3c-n<8a_~#s_Sv zo0#duH@>9*wmS|qPWncFQ$cETrFn?dG2o`ImS@f>jEGg3n#T>#x~Sdg_ItRu4E=uz z->}E;LzXZeII1ty{BKDf;1d$0zu+jSY&SyOisveD-0BK*d1E6uDBvDoE&=(=Oe^%> z_~*k+vFd-3$M@>!0^ru-=k_HFzME4MrMu=LDUqrE(B#IxF=_k!@{bqcI{4+?{Lfps ze^!PIn_~EBUuoKH{TNYXilJEvA6&Sns;Atvg299(y<)1IvsiD;0ZG@gj_QNE9TuU> zESSVp*aY?5FO%FpEer7i`n?4?F3u3vQe9i8cUQ+=S>;PLv$gpXf_Jlt?ig&s!N|fN z6a==BTi8Wk(bGyG;;K~VWlc8eH2u+o@&xS=L%RzzIQ+ZKk!6qNzo~a7f8^50?P!lg zold_{FM;51{U@&v>{C_g+LsnB+L`XEUN)vm5pS9Ek)+LcGx9R6`MnE~RTfNs*x!fK zzAT8rpvz*j?hW+wV|(wclIA#A{Lv&fx%>rG&!{RbrB;cwF^_Y0*7fSgZC9+<0fTMd z{&iV6C!0gmWX$K<^HR4jKC(3|Uq(&+wU4v8jC}w6uV-=$H#C=~!Yfl^q4}LhDPr~2 zh{in7@UOT(Qeo=jL}%jw&R(9Z(}>5KkPM+ku-@sr>L(>7lX5o*iBU>$kyX98K%(BEP5*2-`q6WxA zUGU92JyLzr0jRxlskNgPya@?fO^2` z)9g0h#Yo|-FB+DveO?VY+Xx-BaS7hd!RfFGQQ2j);zv_PNl`rMb~AMn2ADF2rlP1`Md7){>{s5jjp6| zhJh@lVpTI5n!7#MKd()Bl5Nx5&F{nw>ceG2s>Mr~jyX|S0^@4b3Q9%fy~!mXq-6M) z)KcvDiqPPH(rb!+Wt3G;ea7M!KQ+n!>}tdNn{`r?jhFdF+tk{JRbA+N-&`I^zcq=p@>};JN+&<9`oVdwk;cSXjP76?Jd&c#w+Y_@@8qXZ70;!O&me-?+ih zEZ?5>TrlT?ObY%aN&t?780_5^MLXb2{D_pmMV%vpcZE z1QWbxu#(gM2s)=wmtKqRH z+f^VY`C5LL=LaD|!U75f5@TeY1Yw%vm60vw)aYNjun4B>rY0{hp@G3ak?MKfi}rI+ zJW>wBS4U*5lms+FC_jpunWe2Z{)o2OAqj@wtUn^A`XKzFz4Xt$3X$0wB+jI5OSyR= z(a-bbHta^Z#K5kUx7K{9KZ7;c)T-oz%nTla9tyA4=skzeL~trp0T&h^R=1u0?lzv+ z5N|*46C&|uPhFsEJaGUy*HouArWYsGv&{9Qkf(J7DjiR$4|}`j)n%pYsTkZP#-3}o zlA&$7Cf?;mgWQV>bFY95R&z0MuAugYh)mJb;d}~w=lNZCN{A-8MzqyKsOmkKJn554 z7(jk5(qo~ir9%4z97NI@;5rV(Y#2oMuj}z9by~*JA6J@8nuy~x`aZ|yk1slo*xCva z({#scpb&4MW1{9XaxzkMaM_;(qfUE$JW&y6hHEzc@MByJ`NvL>Oi|2Z*?Y25H-Sy5j zTf5@)sN>TbMd|h=@_fJtYtaje9?Z7+T=B)2<;{|U9?z3Xx8RTSI~aR4T=Rp`ITfVY z?&o+j9Bwg2j%jukl$)SuH&l?H$RL+Rb-lKPS3x8x^@Z;^S?cQ~=flzp8DkOOVF|^2 zC!9=@X?RNtDIk6uJfGw|l5C5}w9j@Mwv+YiH73unB-8tV(D*f92hC9p+~`=8X}zQj z?9?W01YMnF}wZ z_9EX-=(JXknyHNRNJ`WgE~`YBz10%V|6F8`S8pgHE!ww?PmRO6Q~J&|DMzNzKitD@ zZywC1=q7@IjbEZIxY848sHQ$EeoASxU2W*XQX5QUsiq5y(Jt`PzUaW#(H-` zbIJ2O)ex@e8&I~rtb{gbIOOl|!T-%bbOi(hwlS~?F&LZutzeN%*Y&Yh{vqX!8vE%5ewJr=Ilr9NXa|((&BfTG6Om(hrq!oF z-oS#0<4xQ&^AAu|`j|66l7g%-HYC8r4(5#86;t^PFI4Zl4}X18(0=6NcbtC5#_}8E z2tpyG53@`62Dr=?hJ52?C(H1IQ2peZTYCCYOW&)&dy^2_`ns1$#Z|7KNvj&O21Q|Y zl4Au62iZ9TxrAcB@AaO4bfZ73gQ097af<%3u%PAjbz=qGA{v?%V*~vp9>JBsNac^@ zBD(naLx!VR#r4k`8roFLmVKKBX+5bz`sIie);m({V1e0*fBwxX`{TDrb$D^kXE40R#vU_x#I z&QQ{wq@U0L0*n)+zE5mOBKLyvJBaWu44h_?fnrc75$=2#3M)?dEVF|fGK1X2;)1`73#FU`tQWS*jsP~ z2@VTH8~NP$-=>vP59b9JhoKWD4(Q(a{k+(#+>`7k=iM#%dPxP$)7}Gx4+U1%7Yo9$ z1ok{Q!NFBtE)5OMi7rr0*aWV@r|T;evZXFtRAJeX&^wo3`s~cr`}xR_WJB~=gcVMg z)<_{d3n_#w0dT{AD}sK$=^kv0Ih&*4Z;s2SDy=X@sJwRYQa7QxyuDbRME@j_$SG*D zeY+LTlv^suf;Lz(Ab08d#+P<<^@2R$uztHRc`nz1Dh0zS>8%q!FEM(MO03%5%$dIK z5iM^`lDM;%rkxno+y`}Xl24K4>x@@bWF89P+6Is=xz*JQJaR%DAE8CyA0H$ABHN}F zXIwOCzRZL|NTl;aU);>SrW{I?bRa2QsU{}47*Wp~I{z}GJkQe>QcQZx-+8LYOM6n} zxj5KIVleuxr@o%PATu&l#@xL=h>GfD^fr^;zOeb0xe@>FbmX(+p7`GC1?L$Ll@mxU z`6pmu{ni=hf(FX&;xny4OWsP(h?4@n0{r~=$lvX0qaQlofvA3xY3fFq7XGHqd(&e3 z;mSPGk9#iFKh~w)K}2XxnSGu=BiIo?e49Jf;dP5GtDl2Qd7N6*I>g49R}~xAtk!!b z)jo3$*mZlw|;hK$ZC0c#5yB5d6*)EuW!Vb^5Zc8|&BGZRUSrA4^K!-FE&B zzPLI9-ZkoKuO$66x}ZSUgN6pmssIKVNZTkpe;y?+-f^!keC3R1d$}>oBY1ar%|9yI zR$OD2J5xqbdAu~NeL!BXMe{sDjbrVpKFmYTM1TB5>m^SFQPcZ<-#!4~fomX}6UNPU zOftm`+R_%`#sBlv(J)i?70;y!OsF02z2f^Amipyqd*;mh12eH0Cm5bsDh<|bUR2s6 z7@K0bhcsC2K5+uf2C3;(6G2eQ7BIjPJ7ark`=V%l@f_Cx;yZ5Ql}uTef#D^=*-t?H z&FesH5_N!QUV61k+UMYuN?-AW2g=kz=ld4l3@|3;v592wz4+|* zHvJbI|IwdK;%GQobM(#A$Yp&60}FE6z*%^bs7J<8(~ji4qAI0uI6Cs}#!K`Bqd?h= z`Ag7SSX>n%IO{i7bKBk2wzb-%5OTL}L!)HEn=&e`=C3)u)x*$`{4Wd3EU#oCTm!B} zvrFO?8!5*@t|&{*veLC1z{ks}RieO!sLnDk^UiOTQT_j}VX@3zkM?5 zmwmx~MytA^=PRgqxW>3VeAtbz1ZH z6B3w!1^4ZD1yTdawUy;I@H-X!gY$)a7aj>sFvx+34TJiA_a6YlW1`+GvQl250YMgA zTQj2dBXjwR50nR+zD6TrW5@S1K}+eA2_mZl#`-G3+_k)9McZk`MP60LcBcoAY%4?p z-!jGP1O+0AwD$bo?y{s}I>sB3O<5wLc>IleNzD830TaP(JpT!F9Z%-I%;hxRi?Bw@ zKa~g@neC2{<{#++L}KGBN3c@Pn8`@JXupnVEj3Xm#h4BotZ|ijr&VX!qX-Dd*=Dyr zdkAck=5bZ|KF8nUP;nzcvCH{En9tR;qt^Sws9l^leIjK=9ixpw#Es_o_x$)`-Xso>eD+_Ru#X$dXIcq)omtQEB+m)(-}p;w z>du)<<;tY#&=D@m{KC?-h|w9r>zgj%t;kYOmS!Ote7?8N0XYzA6DoR;tb2*&fJ(vbtD$_#C%2;2} zy`rNt%81!Z4tjX_A7%MMyW9TaQk;qt{JX>d5|9rR-lHM}fT&pwcVnShiLCJFG}CZ* z=-5)`UC>cIXw-N_0h(8NQ1Q1T$e>GW95?wMb}jx_usc~wT$I#OiOBmYkC;|zQhy44GP3fIkx z`5a-e_{u_N7D%|$_xvq&dEDrwQ*jVXf%=FHGlseFzopP z2SMK{-xoVS9Tfv7cO>QU#5~@4;TVSTYHZQk^FJ>Qd(3Pv-*8&|+T;`wI{@9ML243{ zoJj(p0YHG_otiFK+C5M&kO&kj$r4*I*4od}5)lzurnaz+%S4uKYk`N;e(ZF(KNfb4 z>$u@Vq`hJg`P(s+&*rIRLXh~{*anWYeE7xF?;kXtdjNJ(#_%ANZf;X#U070uN|YDU zJ*5}PA6{gyU~lJ`O>^RowO11v_i`B$5g^9V#nLY^XRSt<-0reYh&fj&BoX!6j9YjLMqE)h2WX`W&ZZ7SEZ4_O3d&1uDkSgs~0i7QCgVd%%YP?na~gzo(bsO=H+?Ed-1DxIyM!40%DfwxYb#)GPx+UatSJQ{APN_R@(hy%RIZN(0|xBre#i2$9c3wx zK|2`_85w73K07(i!c#8zXuSI@GTJArh&HHl!%emchih7w&ZI%eej@f|LmL-Me^%u& zLuX4%k>g0UzpQ^`u9#CN2}lRDcSCeNZ^v^w62qLvs($8AKfR<2Sp;7!Rv8Z$v5&<@ z<_yX-!5s9s!d2@i3PY;2MRc8Jr)|!&LK=5ZJc>uOd4tYj5Hi2}J^)fUt#$7qm`Tt_JMb#lnkb zFt;*qs!@xMnzb}4TaSxN!NVxRf1SsC+Y5qXTtvE`!5lss_)b(wroYItf!f*#^yL;s zGFnJ^OA3Tk^0wF#&bDy!(TK_t^83=_U(>D#9Jj`8MXPF9C`8YMV#3rcA${jkOrsm1 zx@XVQJ6l%IrltsDT_D=0$;2kq%GR#5@tF8jRHXXjYH?~K>&890UkFuDW(>tREA=w` zD*S3|S_e&JI6<0?<_HU;ZWh^1jU)jg1=X+<@3g_|EI*bPx4KN$cR+{i07!Z%KfH=NV-ed_ZpTy%PGPaXh)-Z!d$8DwKw?mz% zeZnK1_ndD?cdG%uZ2D;DU#wWK3!+43r`G*jN8WiE`jJC=*;qVw&`5Z-Og$e$KGU0? zx2?)0d>C_OS;z=1B3f9U_thkIMx;@bfh5}z7O`Tq!z0spHiGuD>w2b8TFdCboviC^ zbn8s{)8GlE*@R7j>nHb_c^lahg;BS!0Zoy|!wT$mlOhcdLAWWE8I(qf^6FB_)^%DZ zp$eM;kn-;K_7yn}=*0;Y?SuZ~QO__;BQD$?)G}*^v`}Q*sWm3U)%YWZ#n>?!>@@4$ zf%`1(_WOXMEc}vrNe^7xq$5;#i^r~YL%oK)Xpu4rvblM10$F3?xxZQ?K9~2vBT`{4 zIFtG;g6NGBAJb4XIMq?*b+ImTzW6EZnfa>BN0IOmtAc^&HcZWrl_oJqRbdG-q_uxr z_7wkX+(ku69p`ZHiQdHm5_MEXK)Cgj%iYn`#zy*HRMNko<+0n{*TN2jHxjq;yE+-okq7>LA zRFHnDkhS}RaPcVhD+g59Dnskyi1|2=(_CT8CW7!=aaC=d483~V@!-OVT>_e82TGD) z5G)nX=T4!kTui@~)X{>uCeadOu#(}-$hDiG!Q%2*zv8)#2wP)*b~vuHUiD0ap{Y*1 zSkh8^@*j8(I${<{y7(oFqna^n7TkcxbrIU3kR_ejhxc9~a?I%hnjs~?!S@Q2&*bln8JY z34SrB1VC;M-PJho^7_i;8=Dr2|77ejLO*j$I-oO&G(-)EIQ}NAfrlX6@P`LCp_;~L z!o+UGF}PtPwq;nGaTgvw7<~D77K%C@&L6?CmGkn;vv0;`4bUW1*!nYM)KT=tV%~&l z2v1(8%@2`G9dMu3Yw9mk=y1{*OgHTL1+4e}#d~?_w~eZ{6@G+1th}+EI~QcdQY|0q z>w{zn>8D=FT;OD7%*STn9XQFLGIV@!oX2S%Q;P|(IjZkBhLDCKuP5mH8OFTgK?5>D zV)}Awi-vl@kuz4 z+5Z>1ScDQ%_ibn*GTx&7@}Lfxhet^ILfp77PpBM+eF7(Iq$P~=-NGROC+>cHJpSg> z4kFgE$GnRLn%qKyqwr==*a;DQJPyJHAVcCv?2VxQaxi zD)N2mi8d+e=}w2>tNvEi5Yv@`ri0k*%OL&@huwAZ8*TL^4`p{855tGk_Q&dq>m{YC zte^Dfn;kNXIh}alB-bXul@i`WWsvjg)BU@MSbU+!@S|PqsrqW3lb+0ox9rFY=%az1 zY)gn28HMg*FwI52X^m)cT_|IB*`&fmUa_)@S8Yuo6_GJfAQr4|QZ{@7i}5+75Tt z#<&n~wtVcWT)8!bt6i&YVAgo3v{fQSeJ)SjSA^Fc4o_N9#h@?WwjW~*=A_P)RbJfy zH+@z24(Xjrnqkt2TnAvwXC&EPhu-el-qzx!Ry}_CHp`!2gOP+dGhpGy+0R!1@*Iff z_P^^mk{3F~jhc@e(a5Jf_v0LJa&d9^(w^T^XR#Mamf3=-!&yo$9IQx*~5rxlbzFm+NH1&VR<5TH7DL3`URdll6zzA60#s)CwR7R>+X@v%! zktsG1L*B8#Acbx>!DwGwDJ zCzIY}JFTDQ^kpjO`coSZmE-&TJN=l^XLJ@ALaQ#hTYx4aFc7w++OBg*tYAE1lBKq> z!GIcVVYE{$PBMzg@tyA!j<8Am9V@!z{>3U_hA)>8T`V_QZgbV9o3)tfs~i5IGYmws z98MGC-pMx^&AnS$l%Qc;go9*?67bB^oJ$=iaNQW=ENN#wd(MeVc=HY0_6UYsqXAoH z9Et`hFdNQVk8~iO!|^Gb=_iZCb{!eEXz{l_!4D&}v%Mo>>+a+xmU_{m+U_wEN*&({ zBUCjeYPSt`A58T!IEhpU$ZjZn#wsifz?iBvTg+BYi*Eu4BH)u4&RRC4zRBA~W5zIk z0sMQS)SVV*rzykCi?}zA(OU{p1I@5LV`6|1FrLrh)iTnKK`k) zCC9O#Z(?5};nIMTjL`5%fZp=z>Rep(NyL668x17%BW=VwjPBT_;+R*2VsByf^pik2OuXw!L4EaWnG$m4XVk5%9! z$jjk98(x{NVVuCxF}WB+&(X^Dy=7-D%&LYArOr^aAl;`v9%?qW_gAxpmyK?Y8qG{{URQOb%2dbWdP zxAY$>foGCxVHbPJo0RgT+j7nU;L~-MR*56ufw}j0ji*c|GjqW1t7smH!=Wa zoN8cEIS87K&^OUSr+akV;av%B4hXZPBi~5mycp+Abk{h{X)x9qIshr-lza<!NlaEu%+2YN%9V`SG=CocD26)pA+_rQ8ch5tkxMWYLZWKQ@cLlUH|F&S(R2m zi<%sU^ekhP%e;|&wUq4NCT(TU#im~xhLFT#;nQiGzg#}wVYb4 zrk_0a8h|A2%Sk|0Jx|O{voR|Y;w&J2i%yn%!6cPoiJ-$FMHMHzoSYT$1((hpqEKfNwTg%FD#OzV6-%9#yC}1z%~FugCBV^5@O;!q z$*8C5m>_{5t>^PFcR4M4E5vP?78)Tq{sBJBVk6`PrXJW~Bs=*(r&nNCLw7Q6G1S#l z4I-iKJe>B5?ESsZDfcsv-Q`ycInxg%TPN@8zTG|(Tm*D2ut_=4jHNI ze|2JGsPYpsGqQ~zrKjwt?zD^R-bKWFCo*9~*M+JoYnuxG{Zx^f=9!kIjp%C%@Z-C~ zaa)O|R8=#|)uesZ*LMFzoW56n+R04b)n-Y347t|D(kC&oesp^LE!vvD1|^yCO|M~w zroRgWEQ5&0M*P4rurZ~foRU38wg82qTRkDIh%`vR<-u1+iZXsX&L^9oX{Ok`>-dq zglhmh19C-a-ajGEE@P{<01;F8cB3n>6>#iL7~w8JfuVVpKZ3n1Xr09AI5l*1`(tsS zGJ7l01UvyeD-2t^A_GhofPN;~Za_))9XfBWfXm!bx9=im{RoB)70`d2!i{^%_6L_ZJT^L}ZnFf47a6Lo82V8llF8#A`}%O2cpg+vQY1uxZw$G4zEFLmhCazPLZOvxZ21c z=NJv6&h_j0pD6ZVY3hkafnx0uCcaP%1lc>#AFoN59+z+}oQ}hh=Y7|E$8b$mwTi0l zI!9J!R!U(u$_v2p9YDol)QSvxrohdghQx9+O#LEp79}#O|^wrw{Sc?SOF5)a-zS*moGZ zJlkW>M9|0_50BE3K8#+i3?oC`ii-GVJP#yZ6iV|riw94pZ;^2I|9<9DOuxb1h)`g% zEHNKv0}5K%Tv_q|{p>Z)$7-XIWz!9XT^vM{z{ z83!li-O2LX9BWa>7)*r2NUGIh{n=jzj`$p;?^%Ak!m3Z->%BQ$6WPzlO34XRkyT@; zH|tQExh%|1UEX@JV=jhd@bb6u?7F8MC^;MLxD|c3&hRmqXq1(>Kj$dF?F2s$+5$LEoeg%g(=oeO29yObXX&BJs#} z$N)O(o?C+$a(B=@6pc=#&GfELLbOGyvI-wD7&*H|smrz8$CgxvWkSFGknsnToBpDiQs>Fol!K(HjFQGDR4-M%xlB&>|65?uhRV~@5x@5uh#-}9a)tu~E}s^6Vg zyM%oZ3rdz3ds-LTX~r#q(f+T``2g3ZQ~ zzH;k|05;WJj#`D$!k<+RWbNmgQ2U5FaBz+0K8$-`<%I#hDE|g#ZJg+cB;!K+5I)A? zq*tHPNF!GjpKfMbEi_w_=@neCdcNaxX<`QYK3RTwPnB%6JlLEJ@|*~Y`CSQ9M0pQ$BB^H7PW9} zL2Pmrv*eU@M&Ou}T>bm|(DOekghYyK%y2IU#$Z16J;f7~_0j<$?_kf%+Vf107WR4# zlfUP2_m|U7Ta7FgrOfd)x;^ZjLF^fvE9bs<;t6}Mo+Q{akG$)V1V5g4Mf2!%X_3I% zeF>eftSbE_?p!-+$SjN`8vbQo1viDxy!n-b#3}$;^ByKw{uGpjOs`W0Q;`u~Fv{Il zqAiDdigv~)D`TF zoVbQOmJCt%QJ5eMQ%|Scp;!(VJn54$A(+HZa%HotEjT$H8H9IWu_@$g`XqLt|Djr`V+*s^A1h{<;Xh+7Xt7=_9f5Qj7 zm8r9NKA+D-$gUt1^f-`ef8u#czh)l1uSrdZo67Ozw)RKhe5&z^+xmB8(5;u9qWgyI z)H4YFCEWPB@{^<0IV?Jpxkb(D*ST=N7IHzc0%^=X_;R+wUN->VN_{W$*6|zVzxao3 zj(!!@{xZ}GWK*LhTl?3DC$-GyXuY^tNM{&8=IU=+wY;M($at)7>`UG6#wJF8d~MC$ z^imAM7F1wLd}{zIig3yl#3i4b++Dbs$d-S>V(LXv!<6JlCkmz93`$?q`T4`HAGwll?)oJ$XFQTCP{6=2pLs)Y&)z3o=P5z29g0 zlcQke5O7S;z+rJY&A@p`JQJm7g_p&H7Tbl0aL6^|+&6EZkyqZ_$iuMb{Tp14#EW<= zo4D^6M3Emgl>e$N^ZZ4$Z~1M3+v;O^1O?r#ufby_HTH@IiT|=k2P@)DSP8OFz7tqS zd#|}*pWZFr8*o!4%IAQb≧^)0iJyvr$_?eyk2)Pl#s;8y0D>k>C*g$<%7ZjFYd= z4|aHDQxBBp0buX3s~2LcTg$8`$lrP7ygoTK(7s%dr-G<%&BaCH{JWhUZ@Q_!qM05hexLswh8kT^wMLeOq1s7e#Whjut zebafZ;C}Evltn2Dq&f+??bBB(19u!Op|7p_@5r zsa{^~iWx;4^kG?9()1J<$wKtWZd>x6Vu(tf$gJF=FnMCjtZEgnpQv#)V&vHx3pH69 zGp^EkXbz%i)?J{Py|OnFE>QaVE(;=T(f-$VNWEv3mdlzSPl_<0Eh0z&Snm1ysvh7KjV_4Z4V;rw)HdM*pH|E(iWy5*sBa&>ZlRsV1`EX3j>jtNGn>lOn zX2h9iZq_YzoLbnSN#n_F{vS!#;mG#;b-Sn)Y713G&Dyi}j+Ib?+8R4%Yj3R)wQ4q2 zZ4zqlO)DsBr*=_$)v8so-u%ArpO8GC=iYnHbI!R&l!BGjtU>oEmAU=1^R6?a4)_Ea zgh=jl5`Gn)HV+A;i9p?WM&ceaA3NV(#CLKZum^sQ$cLmCpy(D?RVr1 z1;#^;B7TQdft7hk&~bf!-fT;jzAPt%_2{KY_O2eMc6d#kpX2ip)SbJ!WG8(EdKYnv zCy-gxuSW)ct`mODeBf1fV5bY5%Fzkf+bqqi?00AURl`P-vUIM+{%E1H_`O6R}14;mLcrsJsL zPW~UB?CEWM{4;%=G%A?JI(#bHf=u5`3oR_Xm3SK+9Q{$fPcKFf{qMNjby;{f_`MM; zPNU-p8UG38?UUtVlCLcsxswZRGk`Krko{W;3P^}`+*AX7gRW-3{50sa(*iK`%I@q4 za(4L1oX1as@wp6XngfzCTa~)-u%6SGq#+1>KgT(}lnb`Ky|8G$GP?{`|}G=aN;>xnv?nk{v2tOVv3G^sA%mmJZM z@Sl&U9Eca3&DnI#-3n`M9p&>s^jwe@jLZJeEo2lANGtu_>!j$yeis^ZFUwqEdmh+Ycd%bo zVZx%f9Ct*0ZC*fV*CVO~u{CoPFlZ+qMJJ(KSV+d&DRcaD?(~M&1c9J2N$8S69Gsgi zMUN}o#qQzfGZ7LyTKT{0S`YjxMHt1Ms^y9&$sz@2RkwK(8nw+FO#(cv5@I?Br85Ky zI`T+Kcc|V1^CP!0GNvy~0t7P<#@*_R6wn7$6Yyge>*XMt^-j2!g|Fz=GV{0HftNeD zJI&)0=r>!tVL-ZLDfI8^(Y2i@Zh~%b7ULTi8N;}@%U}e-H5Q!*SH+s9d?g)u_Y6120UQ1C66;dElZ8rX z)sp;->p4=7CU)wM7-VfV*0SV)J||VM zDI4YLv~M1oXx3hbrV#FajPj@j)h(l>wCR4t)l8RAL^(U$dha4==L*z{hch5oa z3J1KZ?b(kfk(|5zMkDCsNJip_$BoaooVBDsD;@>xlz72#<$QvVv!|`VNxJ?2 z-$8A*xXP_IpVq$wveVj6j8af|Wm;FyE~)>OlMOPJhD5`5jCvK)sy8DVA)4(x2V$qz z@aSaB-CT9_dJ88AG~|F6FuyCb4ycHfH; z6F!nvaT>%E!%`N1q7&SaPs$sQ%PdLu2w+CsZ0V@uyg}AoD?Hv>ynsvAp8SXgKRh6zcHqqR@%(}9-O2f0 zUW;R7Bk}!`DPsYZFQMlo*ox_#YGnhk<;;(p`sGbWzvnJjV>u1=#2#bs*o_<;(~pGu zNzaiv_}1D3IIQr~ZDhCYpF!ElC_3JCwbO%YhKrlkho_3c&z2525F+4ce-cI_k7yXl z7xtT-L?}KFbE1#CBjJGM^g#EJ+b+Mrb;lasNR`ITSetmGEF)Xm3a){i>ZF`R!_$+` zw)%!d{?@;eR#f$g%;aM5B6^5VfRN{DyWco|8p*^bvja zX6cI(pn~V7_bL;o?=ucQO9}6qZ95-{$NedGz86a)$4O_axfDu8#pb3Hoybf&c0KfY3U%U;)@vKjCsE<_bw}U0 zT|{yfm)!ppOJDW!+9nkvY7A z2o~m+nMs2hw*`o1Hk)je+hzS_8{8>zw>RQR(OzorXD`Vb49F3OFwghIR$4WXG2~!Y z=F*dgB(dBC?N9M;N_SE#hfQ7X!(UVd?C^*yu^5TH%CxAQsIkxeu3gj9)6zJkKz9~% zH)xz5Ahkt5%Xhzy1X0$Ts7uZJ{W$soKBfJUOyRy?ZMICTQ2nWQrMsiPJ@i@Y!_0r( z%pbPvcI`U*ztp@Re>vu_(kIId6}Ng&NM>PSF@RLGa!gNBU_uIGRaEZ*%9M>(OrJM^ z9F9{lbn0)(f;s6Hcw8J*Og2?vR1vn9-^{}`AIoJJeF&lLWSf29H0Y$=XZEzA_-)Nj z6rW3k*N}I=CU*(A-&H=CQ8Oc614ieG5ANeM?7LrdFHi75p~4ZyIY&^e*1>Qp@>wKf9=cJJPY=qwuHsefb1J!X07O% zSEY~lf7HU8nS58R*Kr2M_k!?CIo-Dc^I$tzGzF$JZoaK8Yu!lRw0MifTfABOnw($! zDzKwo>qvh8%F>F@0xgiX5A`5ia(e1DSKge3CmXtM0mxE?`A7cFt*&2~*+6CApS!(s zYn3Fa8>z%+t+s9-{21ly(4j*XAJ~3k=14bWHCw$@OYx@>nGy$3?vaMpc?Otrw)%L- zflsw5|8tCTpcs=IbArrnIgPTgVo5^buzS`a?k3YAFZlG1qFp66`p}o z=yG-376-|Xi3DXSuQEtg+96CU)U)P9upm|s$>AbCtjM_uzGqS)H=LLX-zxw3OUXU# zpWT(CR6=8C7mI$MOIgCAjmX00<>X!S(K?HXt-U@#U>fU_jhzLjxsx~96P^X@zn2_S zrrX7V^H&3)2)3f8jZ;1M+zF?6kXXz^z>Bdlh7w+9YpdbJX2hcA0w;GQqSyhzPaiw^ z^|XD|wUNwXF(+@nJ#u<43s|bxR#QY4sKE~0`QY=jr*6A%O|2@NP-oMXU-5c6?MK&% zrrE2a|1n0~WLxL2b9O$N_E%ZdL$2Ru;;t@qzdoY9eH`%T^86qveF{A-T}gA()=DKa z$>Ka&{g5{<%uOhaw7!30HR9IG9|a}+EKM* zG|M@6;(6w~(l|scVLA$wxw}hosi2(@8B#?t3gM)ddl_lazI@Yd(+1KL!mDJBCQ@(fBw71de zBFTNXxt||CAU*A?A(v~9$nMJ)*b#z(tf0ZJYhd$cYFeh@wRoKcr`*&BAfjwf#2TbM zxfVk|m!y-oOV8=w6dLNieGFoZO5Muc zM=`2zw@>>1iSmLxMZwV_&jYzQ=#1!3EteEM8rcnw1QbR_u}Od|st4u&7l{`fMVP_@o9NM?QLyn*PVb5LFAG6B`cC*s>@+VsE~tBKf5Cjpot+PMjb&=sH4=p1 z0he~Jsj1r)kyCGV{&#NT;|JemBTYPJ#?GfD2tEZ0XzQWHu zA;%kgcpP+deeN{V%r&AXm}ZQSyIpDq`)G;It z7OjI+$X_4(Ce|798)0-SB!<4klxQDNHK^XY@;walxfL~!u_vvm{!lqvW-8|)Zj$S0 zXRjq!&pa6Qs9W|Z14-f^6^J2hQ`ppfiYTZivoq7JP-ALFP{v*rz*%MZ4j_Ne=+&T&22a*gsq&nAi3V9r=id2d*ANRKl z=9pq?DLwYrXGf@F#D-`W;Y?}W0Rs@P5U_DN+UpmSV5qKBfw*zwlt`;iU$kJipxUJ^ zu#y!@h_VMyrGNDPx+786`7z%mxXpGiGDNM4b)S#PPUZHGq55$1>C`ioZ}m1ag>&}? zzQA9&5IJb^EJIazQ>*Pc!DAJ?REY8r8WK@H?$vg8Cwh}bKD(|jU;niSyHSdJIMXB< zKBHMpwHG&Ccf^72kump)p%wJRYoSSQ&-xE>r_PS|YNP!K|Erxe$gQ@8EOhm+%fIVC zuy>yLhlYmg+R*IjJ*Zs53xaW{S>GIXPUr7-g<4v4Jhslc)io*U5h{LMaHFiIcpFH_ z!WnWyIt=~mYMT0>hDcM(J$QogW6?RXOrh3?^Qm0cxj$KPV@0Va?wuw|GtytqCVzdH zsa&iH=x)LTPl($B=O4H`O-i#{=P*j83ysSw_3=wvvZulL)}A?YVif^Sh$ccM_C&to ztDegN_j12%OnQCiNuM?A8ds3hjL_XaCZcKiOiqmFIL*_enmWYcG-vV0YW@MQus3!; zE6W9(g;ftllPUaJIBxr%H{Z|Q_HSQhNykn1E?X0o1aG=o&4SWj?)uNytT5bQ|MI(sn zoUidGfi^zS{o0E+Jne_JX)lcN5iDfcbDLku_-W#!XK#Armp6A`RaIJc261%i_Z)oP zC_Ce(W#8#ubm0EG&TGkqZRxLQ)Edy8U7xN3H69s-*%hbJYhP4q1WARTmoe%{)J5rw z6W5wAq%Rh@pJ_=^#+fRdWRDTySg`(FYQ4gIrSiZb-;A}+ih-PlSPDLkoJHsQ7++w@+DDC zAHDFwQ`5%MGpGf7FeP%n#Dc{;hc5$`C%54>Y(#nxm%I~Y@yd~?UR(vl#41*MxtmxV zr(*Nmk!Y|#RI9^pxL;QK$zSeQ@q;8>fO!MZH!~|H0yy%J?)b`T&u2X_?Z9ur*!?K_ zn!P&SHzhxifkggUWzsB4IR_GbLkY>`mJY; z+Rbd7P5*0`;>7D)=$AmiZZ;>3PoeF*zXUi22Gx$Q`!~%s|Aji3i&uUWD_(q&hdtM` zT5)zxKbr0k$?|iubW?P^LuU3pQ6xbq=k?ctsgWGNsYmr+!-b!Gdg3vmc+eVi!NZkz z^p$5cYqX#k%@izc1N#KP!00T)H}MQ>xS5ooNRbP^1#KzF(u6PjGWL2`Qq*7ewYt(6 z`B;l!9|7;PMoFi2k&~LHsiZWsW-P+Q-dFu~^emqjNPhLJQiwci0$cUYflTFndw|{yaQNm8z zJ_wuTH%=CoxX8S@o1<#mk<=eFd5< zz=F_!C#N4^Z1-aMwEyGP=fCOn`{Zr4%~`@{FkJm46+P?*9T$cW7^-_-;G> zkDcBiR{~Vs*XtU2=v%Lqawul2n1y3VV${0{UDSbY|WhWREaY z3+gtYYLHCrf@QIDGxSAJ1R=8eg;hjXRaJ4Vz@2QJlboE#-a|2>4MIh=2RA2dtIC?O(=!cM-t-NHzuqSb z$EE*fKuLGv^4|n~Vw!LhyUWr6{Ies{Sgx&lJH$weDKe0yNpn}S5Cpin+C{o~Vn)h#Cn$a>(r;c5vwpx7c;`0M2fcB69ZMc9w^=_5Q;l!m@D^ zT+g0NEUc+?M26S%_~#*u{ZMT`gbYoUHX#|TFf5_An%tOsl63y6f01pDVt>8{^4<1C zHR$wi3HW7wWmQ#!VMT)Fa`jV8LgyVw48h4T>a-JnBoWT48W0*f>g%8MfP_dYwJXEU zrQR}|I_=}?f_)!#Qj9a)OS8;B+BY|%Nf7iekBRbnmy^@!&`z7=xP zqFgT_q_Ftwm*W4TyM8CF*K5HON)?PszX@@GzPu8&TH&G(u+Cb!8{}1pV|H;m44P>B z8&|PyEgpB#%X;o3q6Q;j}r6IA}w_tV3_NL=!QX-@2_@Mt5hKso}Sc5xy0d@`=G z&OGCSEj9YeMfOzuR2L8x()$IPIob@)%QD8o%U^=~;)+AWt&>A|74NkZ;MER2v3Wqp zS3$ymXx>f4o(t?2z}{whs=P#+0-4#(EZ+pOi-mT)5=a5fG#Bb(&Q48~iN*H+tuU5_ zCpP&6qo0X(Z&RNW1DjDaw$G-xvbFZdU<2v8;x;Becl$iaF1tosUd}HCnUJpM!uQX^ zCHwKg_LdQe8V8n5A+$j;?Vsftvsud`tL!;7J-@%10PLOm-$5x?It3rwCHnKODq)uw zb+39OcFXcOQZ#L1z+QC1s;ky9*DY`Bt~FxMR}PYzw;ywTvUuS>n%F_8pzk3EfCS!}S6OP$&m(7`@Lxtv6kA{~Z~QK377K4sT^Yo>hTCEA!Go0$F? z2@|p?DHgQrZT=1}VLO`=A%$cS;~i1$1YsX01VHW1BT?SE8E zdgNX@8c!lK(9nc(^wHSlP+XoZjy+ME|5;`zbdMGTzJ8n9+TLT;()j&Qjfh{bAaxMh zVncPJ6F5B`^x~P>6(y3g02(1+q-&AeDUj%#yZHP*Vz09FFk;plfVMpXs`H$eWrF*@ zw2;FGBdwY>?+K2^8Y(1?XinU^q`wRjhkR1UMh)yA90149m0S4X^BNj}10s7+xcRE8HL3|XwTZ~8Y=>4vx&^cS3h)z?LNullkRN2`Cm=}DhSWgX4wH?8IUuQc92S+J+$ zeZoWFh~{Cwx;mwb^B15jelwiq5%p33B)veBWUP@#SQ4(w`)mxwRgu7->OgbgD9u@H zZbcT*S-F~vrh!5;V<$VjJ3PG;ZI=rM%+uAo!CmGb2H47K*d!E&he44;0kD8RdA;Q; zX7+-_NuAP$VCyUr|1-LT$Xbv+fj_y5J!pDk!71EnNmh5bU;W=7>b97csf8KOT81lP zOsk*U@X{M`R<(#ma?L`Pfh-0Tg&A+rww+x-;kN09v`W9{{fzoRyHdw~xG5=523{9roUoyX15s$Os-ytB?!bubE&Clf& z&U#FNYMauoDsHg8$YXL6;2D8G+@YYqh?$D`Qi3ZWDV>F>!yvx7dk#(PzGNc$ zIMQ4A9KtdJBGe>f)(p$YVhHAR?+fBCIYc|m9HUYquO;~AppI|m%jjK~%QG{dib>C= zWYK_cU`4emjhT%0des94g zpXGNBXL;Mk=S7V$m%EEcY7uOw{wk~qY(vT7Ko-~{eO(+mAF{!_YSGB5vJ?M7KFSmp zoE4>vq{2?mNlenk%C0mv;G+T*O+*MXF3J|TS(|37e>tXtD4k)c^U;!RB?^Aa^*msh zVN<7|a9Ps8)&Wzd$#!}k6O#vlz3DPRDjtr>=d+9RrZ22Dn&*_x_0e5|{yQJ%f`h51 zm%<29l+@K^BacmT0Wb#19VQ8nE^yWQu1t@YIC(NgGL+(qH=`TP;nax6pONn7_TNcmhu#w8*XX_$Q`QOpkF`0=p?Y^if!>?Pz{x~HQM5=!- z1a;~ID{A_D;yn{$%ob9nj&SVi`FM%X5i zSdG%>KGdtvfs^}MRQvM)tF|ofo{#0Ne#E_HU4IsQr5k;%r6}{UrYe)tROXe6R(jEk zT#wOL$e~}O0&_vujU62wYQDoGJudUJwVXdD!fC$r6=F}eDJUUq)vbj$hO#+($H$aF5T%4{bqkCzueENv32HV5L>K%*bb_dsz~=+a8bKP8B*X zn^icxwuP2K6kAG?SXGWb80aOw$!P3hwvhnUW)}-;35N(r1Nd2+UK-Y9=VgUd9*v z?M zx%9i+0{g~wM%88rP`<Wk}Q;yZod5~CF)|v*k_u2D*ddjqhlRdD*O58NhJbY>o2uS zwwH?w)6Lf!7$@`^6loxLUei8@`;Fgx>26{F;p{ikn&>8T)9&cDc1}xN8aeb&y^ud$ zj@fQ#NlBL+plY)1@&02}G^fm{LCmq-gXFb~d~1MnlkyD9R7J>tcP=ac0F{9js!>+C zJlReW1`E&7#OwV$gcR}2wtes4q_T)f8f|cOTD}K{d#3oL;?Z?1QFmjfB_h%Abba#g zRE&9MW9F%I$zunP;PmbR0%$RHqmHq z*W1vh)HN6XElwgi%C;`+TIf4$#@#)V$j7UdN+4p|UUHf33)P$47m+{2Z=Vcvl z*~G_dpVnT zgKju=%vEPS1aQ0C+GSKKKS4~~5x2uRx(dkt#%Bp`$skFBljdh83ES*P@X%{dlV(rw z`8Cu7AXYM*$l}CN>mKK+iapb;#xeSCq2PUO7Eeg5U*tynvh| z>EFHM%Wp89KlgRy*H6sb?^`Sgo`W+-G+(&zwAjA}?su*Fh^jzRPIWOS7Hn75ALWZT zknC|)$|^5`JXY6n_Mo0FnT~mRK40+j2-~)GD#WU-k)WXev12~pt)+bY7w^i+x$V;* zEAa-1kDZ15T(QKLhN2rx-H$6uOO++tr)vu+fJD1&URR2lHO#d;$4;fV+S>63s|En=3B=akqW4?MYTxEzF$yvglP{?MleSHkQkZM;BVz%c~6OOaCh}5U7Kaom6%+ z7(*X*lePR++fB_U-J;pRth5&KbR;qrd`-Q+IChxrmngPGh=j{rxO1@HcAhQ)`b8RN ziI(KCA6c1mUpPBLkq+!ZNund7xc`prF->q9Q|Tg}MS{KiJob^oLG8~^SRdUqT6b&p}LeY8GgpcPm-g66Ms_1;*qvP-A z*RSd{D4sk(cW`5$m9i}x<*)X$esDr~)ZKA%8!}18ByUsLavE9X%>rbo3vqk_pUG3! zsjW~b>jPn87Ngc1RXQZi1) zs{GjQ_(nEmQ1Ez#&wqMC4Q3QQZZrevN@1*1g*N5WpU`S0)8{IL_Bmoy?x<%>)BDA; z0{Rf9+V@bk^0RE`-W2e&i|4PCBkdwda=t!?yCVMsT`wNpFuFe&!{Rq4>SBJn&;MM= zo*m;#8a*|VS3Wx$h*TVcwj&!1=Orf9jd)z^Jd8668w|g&KzB~qTSV;$CB1s^eWQF$ z+CUtWmAQEc?@Jii$~cO~aKH-75%J1sEATPd0Phpd!_&#@r-5HCb&V=%V(6Fg5ncGG z*}0}cQPhu5@vMFcJ?>gfE;Emx#5c5TObH5!MnvxHr1#*IxkzJ=&F%D^H1c3={UlCA zLS+^zL?)KmybpdX$8+5YpB1&l0Sc{9#Y*KRVcd%#7V za?!KM^Mgy`b3H#ra+w^T3jx^{mxI{WMDT%AO7erNEg+|{c6(<^Q|alCf6M>MY;YO! zdC|Ulf=;R8#WIj>vUt;7eMZrHqi2&(q7nc0ap3}t`pdU)UYPK+Z{{2ovz4~>^*O{Ul%d6v2>q%J-`?B68jp{jxhTqTl zwG^wIPSFUrCsw7m6DZrMp9Q-*RyVO>G?ka_@4MHWxD7aG9dU#y!N)RxXdr(4e%eWu zfqg}M+#)s~Mt8eraCjd~$Vn=I5*w;)AEz|=RZ?zWkw0yW8>g4chY4mG4io2P?%%8@Z?$5}EE*O&cmN1dHe7d;Um@OLB5ya<{O2_u3G{Lg(wZCB^XN$H zqHzk#S^!RfjcQ93-DEfIh3Vb35dk_bT=`kch_@qZujYI>0+q zJ?#kLm&6J{K_2;q7t_GHarWJe_$M-R8Q$LunYf07VQG(?tWjH^f7S9?{LHh?y~1Om zRuBdDVbEKP8|iwukEX(qOU10>mpaG6_zCq{(c{QF2T$vH_T@>#EgZbXrt0`=%pG{< z4T(H2vKStHRgex(_--dX!OcYt%u23FK>dh*z=X7Xzi$yg^7&|rt~V}5H1>QnRdTwW z$VL1&K2?%c{6NtR|4I|tP5Jx$4{^oz&CLNqet#qIa-SIhec%e66OBQZkaoOvhiBnz z5T@dq1Lp1%R~Ko$Sz4b_H&>7O^t!6NgV|JG=9W|~4-37ms#mHr7tv*^CC>oDpG1xG zxk^Kw#!+-r+^Jt3ee$0YYA>Eh8yDhcgR!ZIfjC{PYk)&!x&~I|V+zI$IjKWJ@+$H= zLO`szDP7uL3^V8ik9Z)OgEn5AOV81kjM*3?niZ?b7bJ^v(FWc0-1)H1w8txZsGZEu zme5(PAB$3lOgY#_tZgt0XzuUtcTZrPGG$Ec)C03O`L#bA9$UXK8vP!T+fDn0V!)>H zZ{v~##$w_~ys-si9{_{izVk?)<_^u=hc#?v>KIu? z*xvs5mWK3oceeO8)ALkC$!qW4CEZ=9P3m+#a6K<>lx?fAoYVP5;VGPc zKBzCDt_xhlfQTPPQ9d~9HT!g`d`77lsyT$HLQ{SJ5A$d1n*Z0;-oA^G zEq!iSvB6^krQusKf}Y`wP`{<(sdwi_Ka^*1Z{x zP9x;j>F_uog^06TtvM9_@J<`L1bBCE-Oq+9cN4UQIHl_9Dwwkh7}&H;h6JqnJ*XuY&H|n+Hm-Skt)4lQ{2{o>p?>?1 zy6#Wxl7SVkG?qvs;3CgEwwo*_KFC+qIA8d7Sp`EGCm&bjEhPXsNBVLTQ7nC;{#v-` z)e1qm)F<2KNWQvh*$XC%er6=!!-UWrnlvFM^JZsP`rQ{^q@EX|ikM~Jyx z-d<}Yyoa?Ew$uIx$wFV>tibkteZ{~QU4iE}c;7Li$YmxYsT6O&Zib^hqDUg3DTDI;n= z;&iYt9@O-Q+QxLVwakAF+PEu|>6bK*61k`^Q^{LWrXAPoZjWFR!xW&a$93TQS;Upu zeii8dANn43IV|H%E5{zPOY=pj1TJjXaqsuM$t{*E`nU>^U_`@Hj@4tq;qz z5Mcy~p$(3_3X^;D(c~=ilC#6APApw`J<}ZFcW_b@XKKV;r4{MR7{qAL7zTJR|MW87 zuf&V+1Euy8P6^hxQ(snT;88_Ev3~jdM!{c$aETn(^(;PfD;2g+p-bG0hm#c~T~-bA zzvJy^sQcq{q47p6wdla+G|_rr7Gj4%lIPU-UOn*O^E*J2<-@t3-}@;aaz(W0^+|}N(+mHynt@B;LFnpV;aOeEW zO~Z+X--@eLn3fo&lzOM+^qvk2#0-scG~GaHGm`T+r>>o=T(bS-|*>X#_& z7S`e+ejC~nqMF3x{n1_9?GGHWZRN)am2^t)4GB|Z%iCkk-N5OTXWy(qImCOXhooX#vi66I zT`STyzx46f=Rln2M^nPMF)yFc?7Qp?vtQF+uWhgY20BvH+g4=I(inxNcBit*LPDWS z#19iCqJR`+ln9emyvPWs4V%xm_;;$F8!K5H<%MaIk|Nflpp54w#j{h&H>Cf&ZZ9Mh z7rMa#l6NwT$VGd*x-j65fA^yw+nE>j#P3+s&b=Re0RcKsE`8MpIT)2A20><{86_n4 znYw*r4aoctWdqq2jhDdb*B-^QQgI^Kcba`qV%=tce}OhK zn>$LIVBfhiKFG<*sg`$@G~y1u-$i%=&b*Z7u%V2ibd+Njyo+&=EO!e^EVJ~^D(?iD z!z=>U-#_{?n6rGyMPWT=!A%p$X*f*LCtNQ0v`Lz3TWd7lF7A$1QnO5qLrN88DL9Li9`s({yLVth#( z<~a}2KBcekA*&AC?wY*Kcylt^u$ZRD$-4Pw&E?I9oW8f1AQ5Mke(QqG^eR9?d`yDY zOx=#){{t-L*SzhWot;3%c^ZhmF`bg$cLEzQ9Fsbe9apL~U${00QhJqZKHRA=l-7}@ z*r7F66;cW4YT50%X*JuSaviXZF?xZQUaLu(0E9@2W*4_e0VX>s{P$5fRs~?7>-unN z!^^A|k$HpFvLn^>lMQXJ10zo|nQ-|(T}4qn@GNDz_Iofd!RwTdVIZP>JKf_A;F#}; z%u32>*)?yua@$*s{BM~!w_oKw)qz_JV!?RZD%~ik$%P0SU~Hbt@EnW;|H&~`Y0M~> z&9X8=ESBBEJZ+0U^Gm(*+d&E#s!MOj$b=sjNjiy$x zEU?Z?U&U#chLB0DJxL&_U;Zp_|02I*#5|(maQ!bOfG_v~`-AZ68b%S9rnF@%`sFgh z^|g7bdW(~B6Ryk~>q%$&J&oAA+VuPZxchv&_om4_+K=mk3Z+{SS6MR8>&Tho$p`opIlxH#fR+_rH_dsOld`^AtsF zlQnV1Z7GO+&RqBw=&B{4Y!NvtSkS*|A-0!k3yK!^mqCAma|YvFPMJB$GybqgPN9b! z12i+m@ek-smf}tZUsxj^nUq!Z<|OHAVCzi_%OWJ@s%P?-MsW;|fZ&qspA>Huln-wSKwan@V9_WCh*d6xI~mzE7G<0yP%(Rcd`c zZ7odC^R~TSklyjSFH{KatClS|rw5Qqo1CH2k7B;n19h38x`nkJyF;+daddu=^yGfL zM_nx8=v-g7vuF+jlCCW23=$9C>y|I&IIzn7gXSsFD;#s1eLduGRDiI}3v>)+6;%$v zA%qd^hYyirLPqOO;6x%yM^ zYRG(RqD7@TR=UWcSr-i4!f0Y7A@+6t^fCZDu&uNDF9y>Ztdp*XuY|lSH35UBI38%2;A5 zt@i3Wb}@kW$9CUh2i_blGv&*KqcVhlQ%87@4|Lmw(Y?lq(fGJv<3)-6^b4oD+#0sk z;Z#?TZ^iBmyApB>S9|GfAnq0kGjRvqyM}TJ?ae>ZUV4nZDzuC*>DXySVe+PA8SiI9 z&cYx`Ib5^_koWZIh~_r)gPQF0CMMgNL*%&kLDqq?afI%a;Qh$qGq8}im;#&@?f+#Q z7$k|6WU@Yy^pA=ZNz_Sqp$4ZWl%`6~<1A(}@s8$SSbx$wTV?Wt{)PvGgtp(^rXF*) zAr;eKthL9UjUpyLb5oBFss3yAqugdwhT%+C_cjb1CoT&xrvKRfVaehOXGNu<59Zag zrD#NOWQ1#cRFR`At|kma!icel4Xic)Gd|Fe6Xg_zOU2rAOG7#ye^t9n@uyI`otTwY z8Em+rQxeZda}^8|!Gdvy&R{g>EcoG%Cw46&a$G+-WCHZ*!CFM{jI@In*W zxJ=c#1|q1Bb||s1f&HY5V%iIi4p=FSiE^t`@@;s2l1g8GNW}C*Qt5IIyc@d9DPucR zf8{I+zh~hJAP$D0&Gsr0o^blHMbQlz8-mn1e)QxzC_B|612Kr~B8{R!kU~)_AM&lMxr%#-FKf z+nyQU)C2mx*sIa-O7#pSlNF!h1zwQ0SgOkSMebGXY)X`?@J{oaWFUp8efLP8Ox%Pl z?g=CUeE?U!t5}R*1A%TEg_PSEIU0#)`_|xQl^3z&%4pA=wj=dan39Q0 zPl;QL^1b&&G9x}i%Gvu8jJ^!}r?6QTyk(P1wDWI`5^;Y|MMi8B^p0rOf*SBIeH0%8I8Q&!I@TCwfiZpFF_^9 zvUY4`x8(nX`e?>_3U@zZDT%bI5c4C2Ph_aO?+Ew5XnCWTwl1hE`XCqo_L->x8dOw8 z)Bk3Wu8t%4HbN|G_Qx*?XPzGUHyT)I1pTxx%za5eJ6;@cBq(UDS zJsS*(KhYELC$j3(OV^4&dyt|%Ef&~?3(8}n#lOyxQFF(}Sxu@;e_Vm0`VqT%ErRs|gq5>DNaMy{?yAE@%wBv}NZi zp)L*?0{z@;u|n zDo&bfe*`7V^EUVGKOSKl&L!-Nea%TDRb)*yQsMR5EECjFZ`!SHBmZ6K@>W2En&|Re zQa7*TBCBKu=%VGkN$y1C>x%KtwZ47y6Uj_v!9I>4y($=RlSuUvUm&e!>Ppspd2^?K zD_pDb7**G)Qy=^!_5-GYM&(+tbs^Qq_(FbGkn*+vv@q#*7M{g-3#s_vygJhLe<^DP zw(*Fw2*N%&TS6Zn>Pr$=KfavR@p|khb0SXs?=`sfihLn6kV1d@HxSs*X(T=OAvh>h%c-Dxe(FerQSKKN-Ps;zWTG2j7s$%mw zM>b-W51Qke-$7W#8PZFmQvTEv6Hd$_rmraUvku{Iz^Ia^U@QIY6`G%!0lcq6De7Sjb!&`K zKrwf5iX5ARb5i8(@37;_`pRL7_Ch1+- zIDECzx?c@=`hmSPHKkc}uU7fp3-bA5!a|# z<8=%FKH3MzlJ^t$_X5H!b8L5=&J$JP*vk+_63NVu-BT2IAMY%8Q1;&>ZyW4iK-zbS zqqtHCcYxcfI!cNY!>g9br9Vbfz9IX`n4@^loO}FE7yJ5YhX1Kr7UbaF`(IlNWTPk`oJkMA*S?Atx$62?V8fsDqKhPo)J{+i$W`i>oV>$oIoz}P1sc*3;KO!rd<#~8{u@5fL?#>kJ-aivJ z7Ys{9DuA3I;)6}Q#07ySY3qGz{40F%Er?ZBb7Nzk$sU*AW9#*AQXy3>q6>$QK|e~z{BgfELjlEoBhhyJg7g1@%Mxk_W+9FvGLz$A4M}y z<@jiP{ei2GI$coO)!FA=2Gz1IY+mqP%|V`Rgm)kv=Ve()kD#=J@de6{tAMAw4`D+x ztf4}q+IZgJ6~P?B@kRb?NW<0CRF6-Mh+tgL{f)RtIGn_o;%ntq+EtoYs+1eqC{avF z?Vx2XH(CeRKbe=hC~^s@q+4lux27^vjfZS&#Ao5xG$?skqj57OPEJmpBlZS!IFw`e z!?WI&I$5|*MY-Cz1GCGPM>PzVBgZ5C)?gV4Q^-cXqywX;1zv zKd(oHBHRJDl05uvkRXNjz>$dorqdP0GQ1*cUgm1z0(98dFP)4mEh zQiJVSR=9IwoIGZ)D*FLX>*CU_aX#KMjDoDR?k4q1TUrSrMsO-CO${5c+bcLdoR(hY z6Ih|c`h0RmI`ywVw?7^}<%u0O)$5Lb+`WhI&EB3y_gg6RM^By3tEFNA?~hyjW~I0l z`@!fhh$L`>4d+=;$cE^;9}cp8UKr0Us=BF{5aW`v*_Z85@nJn27P-?8$z}p72LJ8m z_&K@3U;pCeE)5d{rI%6W{C|p{w~E@^+b{gsWS?aLD#+Y#cHJ3IxAF#a%3P50bgM2N zM0!jsJNCn`VDlSKYppBa2SwMEX(lM)W6_f9gu&_ z9vjI5n`Q?zgr9F$EU8p)4l7Gs5}3XC$Zn~~pL&zrp@Kt%r&B-aprNm2vhS2YVefZo zYPpXfy<;*c+w4-m`I8!&O**dUoV*CpE$i^;xZ)k`aCW#U&%?%hIN}X(vWVpeN-oKB0;ihz18sgH=a-1Lf zm1|M!AEbnJK_XRAm$|AnN=U`O(5Dw3y!qB@I~^U8!+d;voY*F-nNcCE>tSx&;qHfg zUhs?g!>pv`xN-ETe&3CuywRcx=<1~IjIRNzqjTt5AF&*FP9cjf5gv9!8RD-=VQpE@ ze*0{@>M$I43G144J5a(!Br5z_5b=Z%`jY??tAjm}V^mP@o*U19hix7O2fAE`x4gV8 zYbS9w{`38o|NXU-!5$CEap@hSqb6yEqKSaqglw>XF08vO-W^e_rsxt)RY7`f{5>QT zKw97H6U2P<^tSsWEHEBgISby%kn+JuzXO)&9DRDU(}7)Tm=GUbw(C~k|4&+1HY1PS z-Rf%wMdU*J^zmHmk%xze@M6-V(B;JSxS$1qQt_P6$~z~cSWYnzwKx$4xlXr2>#wRk z&SHW*=#Ob1vqKesREV9lz5nnbV0kF)%pBGlJjt`qc?Jkt}S#9EBUH8KG zmzprGTtob$&T@6!((|qH*D{m75Y02+y^wemK4_R($O@&m9xJ_m@ASmIelcPLw*O*zOHX+Fdbu%S>(ZQ+ZfjW;v+_brzz&Ll5LO-+O=9$fkkNn7ca}5uI5%*1>Uak8`LgXua`;vb|wsUwg|w z!ZM;3$FDW~&v9s>>S$Gm+Gu{o3;QqB1LfR2JR*|spfs*Hl9`0hF6qnA-M}t1>!bO- zf$}b=2aY($awdi+-|M_Ts1gbs(9gy&SR|EGXWmsr-@J=EhTOf&LD3_J2{)Hvw3Eu2 zy1oDJqQb9zCq_DeIgr+$=>96*^W=ADtt=WXQvKpW4HJTX`ZPmqhz}<}2Vn{;ke}VL zpKff(wJfWj`(ts_uzsvQ=zdGcz-tSKX68yy{*c z*XHJr&Qb@j{^Ho0cxU`<__N;MM;|3J&k!e-A#H4KwuLM=w-yVE}*OKzpg%w09Nn|0H6BtKC1 z5spA0cJ}D#=NDUtki$w6`O15OW!-f)xF;<8(6z^Iy85v4EC@M3O)~TDAnOYS|HpID z&)h*E1atWSW3g#tgZKXm^T6WjFn;-pAXf>+98b^dHjw4=O|8vhc-CT`md?YTb+Fs` z$=S0?)T(`=A4N2z>ft|l)@2V&B(y@;Us8cWd>nx+_7lGs9jch}$^McVA5)k zA816mV}6Y+#qr<9`kxOskJLWw5-`tqa^tTl*tF71qYJ_K4T#Rao+B?5G}M|H1j|K$ z4eLyuE)oLG4yRC5$zyO;CEy?|P#bY+;~>#>4q`R?fHhu6nOS4tD-652O-$NB^>Xfa zi>ke^yUlo_pfi^73p{3FDjjn!-7Z3+g`2HKecbpB|0_c3kgM z{K4+B^u?PK^608m89tJ<$S~t@#v=$>=~-i5@MspgYVVM}M_`KcFunaHKAo%QiJIrX zx;!M#*+RzZ{mqld#zTb&K$^45z}#~=E~e4 zw7M>@_51lq{ylX<9z@dz4F&HHDEf+XJ-dK22WY_4)1B$3GJ%VJ3w6pDSc?M{O-U@U zz91|r*E?|^!F)&Xtpm%Cb7PtP+4;GN!H%cnmJ+G`kmRGkcCJ@ig!55NtE%m-R4;)+ zKXO_x-w(PS5p23fpLc%F9tkQ-%^2T*cESua;|`~Ipfk$ zPo{&I*NKSzTtoHQf>@Qz@p4lc6JwO{(`a-p9UFv5z?|Qhn2tqm;cCEReBkv?#fNoD zy8G@3d~;`O`L3rU`+k}xl-IH@(^cm3FH_Bp_sf1E-M-;VnSLcisbn0t1*jQ!DnB@n z&5wtruJ*c{@cvMn^Z! zpL_4ZR{R43+6RL~59RAM%D60ZVRAo`&-ELAsRTPSA8$*X)x_>!Z@!$;#tDf3p!np` zfp|4{Al-Gp8$6N8CwlNw{p`!rK3%-AgqiVp2t|2WnY$%X|2}j6l`5@uTz{M^C^M6W zk8lXP?P7)LgE*f|mMpck<{|`L8fQBHl)~$g_cb(rU*Murl0@roUM9CbJ%Mip`a?dZ zQTqAA59-e07r9g>BY)#kzR!)1x9x+UQX_uaZCr#-YUF3}oHqrjWm~&(47u3Tfkq!_ zH3NA*wKesIT#iySOL4`7#~o&GyE_^iV&-LCu~NM2a0lnmG1S!4&o*lKYVa9k!6G|( z$$hF7tz=ANOd9gPjj@l@NT=7BdD`PezR8@&zq1bCGqWrosS@zX2BZ9+4{Uucl@H}WIHnzs=&g~+70uohc$F&$^#!h;8nbt2d#6D?BUu5xAYWs^gTx`a|?}v=_pASf}-d5WkMq z_@B7)OPy-=r1+J6vSa^kv26TYqDX1qR0MIN^9X=NDygH$1e0TR)9GTNSPmA+BGE!>HHamQ%Cq-6 z)D?bl(!F2w=Cgv%Q&VRpmz;@*Y-%I-A3$DJJ)_m+=|tKXWoMHkV>=1+_=X-lB&ErP z71tjU>F4jU$bT}qZYZCW1uOg3if9;o7yV~A%eM@{WTd zveGG=R(@kME7a_eUw(Uk#7^_uR_5=P0Lc6zKmUKP(>IO3hzeC9F@Y;dExiFt@33x{)h*p((^b4pc&>lob? zwI8SIMrOn+#ZquB$9w3X*&84A3(Qe@Gi*At-YS}mwpDO(dX-zrH2mmP#pGZv(Icz6IIb$is@cr-b$`spT=y_%;&$qdY07{{LbBe=Q7UG_uH zf;*0x1c%S$vX9Hld-0kf{+h`CZN|m|1i!zMQ3_5~D^F?FwXlt^<+OHseF=D9HrHg2 za~QAnlkz6OGnn3hyisgao(;d#UNkn_}ulsWuk0IVq*5v!`-#W&A`d)~rZ8FyDmI--DXZCFFHg?TLt|Dvdk^XK zNzU2%CW^NS#TWoSgEG;==yD{)$*F!5adRDlR3nNnB>k>1?x@9A;t#?V?G2%cV)b&_ zK!-=O%Q**#-Z;6Su)o^v+alKW4{NZ%7JuY8+wTp=1eyJ2?7CMn*A&);FSA(`l%JbR z|CjC)$i279?U3;a9qnM~06ya#@KS&=6o6U)(=Zslcs+QJ9^pm)LoCiaE7)0RhN&*J zr}Zi4`DJGP;(T2Jt}UEK@n2s90*}QCU<$ePxU>E>!RXvH>!O4B55(BYjiG;m zlw(SQp9xXUdx^dPU}bZGz{+5}rVD14b)P$o!5yG(r1)HBX@VoN z&0{#Id^g>#hRR`6J)}#Pp%@fX4_>rm3C`gge-d$enagelSLu&Nq$a|w%n{w8d8IxJ zkzPL%y|n%mT&ekCSHcK7DT<*ld?FKdW64NY{( z=8|O-&v$svRh)(p8S>RBd?XM0s`86pI&e(#+s`3bH5G^UIR|CSTS8WrW(*^^uV|Mp zU{KS-iHm;}Dw~xI{+68DFh*+Rb2Ji}a@N4R>uV^U2t6HL5sO>*yQsVK#DmMrzg}%s zl-v@ews2gJtOb|)S4Ai$W_3Yt3@ElK-_{Xn>FbbLBj z2u(Cwz7~1gyZu%9FB+t1d<_&K6j+|z=YC@+TyA9_M3iY@Hx$zG(CX8hz=-h|qm#6~ zb))o9b_KinZch5_Nr8-MmJCO1gP!UKuK(EbrZum&@yo_9n7?CA4Lj2#SI=^TCv|Ut zmR7)AvVlGCN5cN)Wy%h0ot;!H3II#f#@ieCPK$NA!LkM9+OgJ;H@0MAU^ z&VIssWKjLpdQv9C_acShyxLB)C_0pCQQ;RW;!!@dNB&@#p>Bk>RQZqNiCwSgq=t8$ zTm`OQk36>{UYrWvYqn5|3wJ5e>-7UGsDzKB%LYlmu1%D>;-#3DKz7H)#fv_hVZ3_e zqA$DEPHOwcvwwj$6EV(Zov#USl$-_jFrd(DD?(>c=YG?svzsjloYQ z8zApwdY>0S^2yWF^ZM~YqTtx8FXC@wOQPpaDK-TjiRk9CQP?KB_|rC>X>)jHWGj6; zLkuI1e7!{VmOJ?u<1aYJ{ft5Oaz31896aA(HMA#K+xY@8dU9cp?N4{@07rmNe(#(YlA8_Aef)P>6y(yc z9h)Kjh)=3xb}J_4@$;leqN(QI)-QE)VO_3AtYStJM>ukM%JL=s9Va|BDh3y3l4XQC zDwba%j~ZaByUFg>R&S>v9}huRF-z=ruRVt8OwS4qSig@QA-yKYLIWKm5Ro8Vo02T0fPdxO8NcLK<(FU%R#UtpI~oY3=L5 z2c&be08h`353osK+Q`S(eDJZrD$@T((;y@k@1AtTANYRKKkFv~fueVw!s(rI zk=G`srih6`sECbK`yoRaz&$9qvlYBBmLr`ewWzP8_6s-bve&_8<&!`BArOE>ru0PG zUva*78J5dLbL9&f&N46=lbv5SrZmRMp9LsMM{#OY?Ajt+IUOQ~=b9rmaWBW$=5{rQ@}abj;8fYb9Qb|FV|E?a6HFA2iklz*oQ7B=JGdbUJdXeW+4R)uW;q@&w_s3#7Khn-E zgKX7^J9|{x*~P(8)?wcrpVrq+&QV%5(UG-fsnc}9Y|fM7aERuu#4<=bVZ|OsRQO2g zS6A>`kZdLo>0&BYht5;WUt%YC8F50Lo-X~ zVO1&j8~BFyT@Uhjp!GLQ724c$T{Y6jpZI5o207A}a0a(As0V|3<{3 zjE?0g6O%s)OfT<&Gn@6PyM-v-ZFvUhwo`6+&pAPg0zX?`&eB!bRYs)^Z(|ZNNE6D1 zn?!lpl124PjS1I!$#4|eED3t{v0%T9GGN~M*dvjaOC{R%NTh7>X!pxnboIuC z6fwEB!V>CL9}*wOBIJku{(coM^F9|@YwQ}Q8yDJ)gO z`=ay1MUh{(dKGW1oNVxvsAZ8#e((As87Ag^q0Cp7v4E7dxq62nCgZZU zbM3XXCn^UQ>Igs=8kOgAmG@x68ySEG+XlqoOMEg*GAWEO{@s6NXP1=dC*m`o;q|PQ zc9RJGm6q=%gU7TxH4vpj9m4PFr(`QEC~5^NjSu+r6aVoyK#mB6u)D*7{2vDoqCLc`qMDFeCkHrPAUjy`JTB z{aBxkj9a()WZ-Jg+Pf+P=Vb+9HB`yqB}GEcfYGDLIezOKC+t zAh0u6kPJ8MzGBCD!jj?%oz{Pax=B&@qrE7SU_YqUzQH7iAfnasVlwWz6u=?cmAse>x*KqAe(LVsN7wr$txS(3^r2aJ9+uI9hGDKCVE$Ozt zb@p?W_Z05|)3Q8ranI%n`?PiteV6)}`bz>;&5lyWdf;8Ou=oo>Q0DWM-UAr45UJ=R z(Vnl8`#D)6yv6Z+d9vvRuY+tw6h)rdkob|7J4$9x-6|YG!O;JU0U~~iq!4*nKC;;b zJm2Ud!A{m7b0LZO;w{YQ?1wy))L`gK!Dgw}bg9sB=cl{lc0e5W9gMw!WX<=ZjPxO@ zCmuTguSrl2*>Ba%|J;IjX~~f=Z_`I@$%>4JsB>@%L3wG(iN*TTIMP^ept!i$%O<-n zW~4%8qNaAR)3FdqiO!6n%B$|@NV~mDBYI|i5jDZk?13oWysbWI`Y5mb?#6^A)9y3l-IW0YtLqd)!*0{X#9j`LdQ4psK#Uqbt)k?7mN* z^vmPG-ZbrFBpO;l#{Y4)Ht+}5*hKya_-F_MC}>_*$7ElbOLUO9OuCZ9x&Ih@PxF0U5pyCiH>(hbBOiU(>BFW#Dt#$ux2+@Fb$Wi=agP2Iz zBwC0+OG9nZ+mhK_Sp=>{VzF~ww~xm+R-eMS;Mx(e(pga=;(3-Ud89cm$XiduH*k}@ zQPk>CcJ@l9g_z3dZikk|v@G5;e$=T$` zhTmsRkT%5$EWC7YifDnLj%#mgf1qCx>3+wwK9UoXgM5`XStZ1a6TJd>j9KS0Bacap z*mWNkv*P*3$m7s)vTBY9SPh-(7@0yZ<-|%ZE@Buv zpRs0N2ou7HHb{iV^wX(f1-=d6No}Q#WISJ3@fvcH_wA^UNDNd&kwv`p@D8{53#{3U z4b~5UngsgxE27)TL3gZM!wq2bt*YkjtdIhnXAR7@rdDZn1W)%B7#8h!DZkruAcv1N;e zQ}K+~J<@vN=iKE~o3vNBMXL2S!I4NmL+h?^JVj17>XFT|39O)jIxZk_Ocs`O_Bx5r zfmC0Hp=bok$v{mcAFB9aIg6Y?OMRmL=fgKH%!>e!ivB++&HD?bV%wXSm+s9yl`BEQ zFzIXosmXZ6v&c*O;fVpJJH))hfyY~~g80%*nNrDU3tl2G@99qFCJ62OcsTY#%mEB% z*q`oAc$Z5bkSt|Y)lsaVAES=6Uj&m};wWpc<4BBk)%iBem-WbJa{z#%bdZCU1)UPK~$;W<^`P>}L4L7^BQK!|0(OUieb8`PyCt7c$M)l0%0 zbc;`IKnKqXjReVIuSA&|X`$5go+sV_`PAQt8VIbV?|WaInHJpx9!mh-GsLI;_k~)b zmXLJyN?2(7FX51TQ`=L0?gmr1>6h!Y;31eFFCr*Uy$rCRBL5YFB@lW6d9HB$Sv2DZ z{j+XKd-ywFm%@fFOxb2xsia;3r3p>_Ix7h{6i0oGW~u06y*px4B=(4E>3!XetBarC zh=cn@dZy6%uBWqR0E^j6?S~EH&@C2JtHyiRHy55@pW*-7mgHVykkCJpYwiG%G0X42 z^hOxn`ExW2*)lK098{b)&m&}N$@Q!DN|4LtTm0_GR51N4E*W*ce*FsY>sEL#uR%1i zx%2{}H=sk+VZWI_muNV=KrO?n!OLu@7?IR=A0x;edb|FiA5FacTS0Zd8lHaj7?evW zP^mK^Zr8XlDAj^qLhj}8iJ3%f@I-=DfW&cq1MW1f&1BIB9(l<~^H<8+ICZ?GCEW#1 z`J8W^7a7opRcmKkBOb3(8<-C}GjL@HM<(e+^7jD{BKh0RIJ z^+z<`Roc)pJV}D-WQ&2huO*-E4^5MbuLHm+@_il?-P#ZB!2dYTGfTykn-J+44<$F3 z-=B?R*h9R%bc!4H32a%*FK3m$`#n8o9D<`A)Yq$a^pHu>`U#Apx>`KiLw)HI^}WfB zTnb0U{P>@r8^&-9kmcgkTV=}g`5D_|)oY#-3JBnd@zhWamvakwnPV%jD7@wXr54yu zxZ)TGvKVLE593c+jkpL53=^Y<f^3JP)-e5F_)KbSu?7C*__q6dh;_2%U6~@;r{9N%hf`BY z^>W5k4}gjc$eK^clNu^IA1(%Ze{hz0>@mxJL73ly^Ea5bue!b35*uaOElCB zxJU1@@)oRLjm~RC>b_kmp?vrthdiRrFetY9BQt3y91r9l>Rv6}W8@SN@S*M}&cZL3 zrffzE7rsM*!1YA@?-`;NE&dNwq@lN!wk`@LbK`kw+ZXeE4O5SZ!sCnqz=&k{&KRI- zIi*czG*6060NGeFq4x1gp80(RBtR8^BOEZEGBlMf04NxroK)lx@pGF}`CT1l4NK{L zd+Xxq?cLR*Vwmi6er?#t`3xBNQALzlpGwr~aVaN%T#;H2&ex>l>Ja32oL~{WGcf2? zUZEk7!mWmvuz9-dinwjv9%cuf+K?k5s@yIfl+{mB+i?!(lucNWfbNj(oSf_W4};6% zaYkx1;Q|Gi;e6szdD)sbEZ|!@8c#2NcAAVA@xQ2=Iw217VoQyZJyCZs9;BDwd}O9l zLN40^p75-vtkC+hZxa5oFGxXYw?M4i?*DKLkg$)W9GDJBhLJk#!*dO(->9PAkP4-E z)`xgUq)@pc~riGF8PK2#$u2FEHORa?1@j}?%jZy|56rOV1mV~`jh@2#!~>= z4rxhAlW#aGocBiU>*%yc(}EIrj@&i~tX4Pv&zkSE@t=hbY?mqY7iiP58nyd#Z;019 z^n}R=W%%x(PAt&!iJq)gFneeuamP;8ryNjRbv!!rMG)U$Qxz z`N($l&Ddbpq)`C;eC*4H7?f>wKc1JW<+KUnGapb zjPAbxM{yS8^Izc?+6K({6tRfIW*duTPRcnrXEaDEf5F*A{NvqQ7|qOcg9A!2#H0hD z5q?BHwdMMy&Yzn1>%nc}G5Z6W-hbXC9OM-hkrW22d`sSUAszD%8jGJUIy;D;CK{uE z6SWzC?z6QP*CLroWW+`yjJ~4DMhf}>0V^6a<#P@l7-nXG#nXeJ@bZQ;x(ow`G36zV znA5|Jjg8&Z`w!za2l-PdVXV8dyK~bfU?s6zY<&O@$Nf!G##sYcZ6i&P++wF0Q9Wf; zltWRrBajqk0pqI{vCWNUI(Dg;fz3BoZzjp8Nu9N7-F5OG59BZV%e^fBm#Gi&ct(?r7RW0r|kG)E>5Sp^Is@wQEdyhSmro{1GM79qQ8{c?& zET{RE8Wz!q$>K!W%wneSOL9%?0~4$|zITKeAPVySySQFm0A ziW!6%*$4(x0}9KkIL-H|O2Dw{eAkP=l;Qz~I)a=fsgmma$x!4?ddTj)dj8Xl|NHO4 zTHwxS-Qi>K!yuX!e1x!1A+2t}MCx(4O?QPZxY+{A1oW4?270ASlX+CFR94rim`rtqW(urFE?pKXWy1Q)rDcJ?(CfrZw4J-gUU&xAX&cq=B}o>&%~<>ehr zbA48eH?~Ysa{_1Exx7}=Wpa%&^!*M%^k29GI6%ryNb{!HT{ZN3f-Fjv?Hj|taXgk_ z;4X#Ba~74S&gY;h9o08ERcML1x#;*6nD!zcP~RlfT{tDh~wm*D>Mv_Oq(<-NofZxlrFr% z?eGo7?+!*YqNCvY)}V=R!cI2JSh;`V;v8-@ht7Y}XMu%G-ivHA_$MzV{zzQ!Du`d# zMEQ?5mqqB^-9hl1MN`8JTCl)j*gxX;^7Zxg_7)Gv7plTq;R6VN1Y@HCb+qn}Ygb-P zL3;Ju(1N<>fEqge0?0d-s6`ir6=`d^BEoi%DYfyWrpbkalpU)@?i|5yWBpxcHnpmr zO1;+V{_K^7h=7g87R zRo7q64BwdP@x>aT(+@aJT!wAa(3CAXX@cd9YmAOkVc~2OkV00J&H(7 zg#LIo2VA&KATug|0t~m%~Ao8ncBvtrmHOV83W-EiUFB5C98;ZfflshxpCH82#yv28w=Q)#hSP=`8=O1$Ck4$a@$l*B@( z#MzvNFjBe(0#n4E?r${j6)i<(Z&YxJ9s$28caK^#@@0dPg}-O(KETJaX<4`oV!~=K zM(gGExpcsZB!2L&ePj9ST?5&|XZBwRNDK|_^!m$D3Qh>cSTEvmx5U1S&pe=0vm7*4 zzbiH7OwXfGiUu&oI!pi(`cwwYE z6r6-s#kn|}zpW7Wk^&`7UJh?Rgn^D04-p1_IcMHau_G*OvZ3>*TE|36f3)usJk8y5|5-K54Sj)+4D+T__qd;rPe^I>lc%4b-@*0OYJjxF+Db|( z(ZlBa@0xxHi@qubV-E%2jPwE2ib_zqt#+*1op%W@buY9j&$es(O7`bzHx0{kzh}3V z7iilM=c~Z4u-jXz?MjJ&z;ck$D|4e>J{YB>UVkLKMfCbS3GzodOHeW-^nC+g z5}x>)_&4~xkcaUfa*SC#m6&}Gk-z5i^V`<{O7qjqkoi{M_1ZtuOBB+3vmP$U(ri@D zjkG9jKlZNfl0xj7M>G7e7EoF7$qJio* z_hOQ!7U~f0(!-XuOqV^qX~}5P%~o2>Z!H?s-&M9~ESQ}89sM;(^a;cAs*|lmsrZ5? zx_uT0E*OH)rLvZ6gAubySFvk_l2fXKoowug^p%T{KhHp8Z+93%2~2fl_VqsrJTBhm z=#44eL+Kw(zT$i6?o^1`{G3m)imJd@D%NK@Ju%<8x6j!fGNkhhY;!SgPp0UWIK#kc zAkMiKmyj^?a{d#C6gjIUrsy&{{t`)t%8cLBDY-V4zQFM22!xvrihV3`>GIs~0l5)u z{#eq?q!6_^WnS;4`?6`%Iszmx&`GSP<$!!gO!IT^KgVAD5W~u79gE+nkv!l2=IYmL zB)Uv4e#X#Le3R_KGR%*LUjb>0y@P|=%8a-jQPIKIujDG71l)vmw{yZRIjMNg2h%9N zeS%l^px`@xMHc&!h(FHO`ZP^uiN43;W5-mK1zJ1gg<Ox{ zP&~f~6|mYO8ygfLHZrOrVh79dU>`0+Gj-ZDx8}_`UT;L7>Ssha_j z9YK%R%STfLLC#fp-?K-cfm>AGEMRMp&SDc@%7+_8RsaY*(6(guv{Y1aD#6olCraoI zv1&egTB(^Ft`G-8J;N z$dqrFmq}cHm%fPDrR*?yQo#PSKw~rd`BlL@`NToZssubBf;eZ=fwt9`CFKJB?yxkp zOJFURDOYGW5o3SZ7pyK7&sXB)msA^}BYece^&9^g>oc*bOQF{?IL};o749>&QJVrr zy>GwxiBKLnQK(+?t*EzD+{cfRaIRWm%pbbj_7^^XA8$}zcZR}g*5gOL%R0YZT!&3A zhryqz9ug5Sma++`2}*_}Fw+x`g=f}ffsok9$Otx=XY*HyvyyD#9zz4KA_`2}QRnu+ zO{DFYl;gq7oI>$!p1ux#L9546?;-D zD>At8u$L(w9M-p#4tr+x`)W~Qg$D<_X@=52otf1t%;>`hdLijyVygm3{D@gfHL6iJ zzhs+>eRekciW~+b%DPq}eh}I`+T!6QkQCqCK$WRr-lKCN&VZ{WhMQz^73H(>X-WUo ziU($Y*Oq-#DGKGPS97DfNa&=E%eHl2lShP!JiQK=&ne-3k0=IhmKFBSgG zA0W+4tq%NO#d6zYfw*FCUAO_;3|tp~f4tUvfaC&re-O~U z_$w`siQ{Ow!~yNsEx!FBy$M>34ZFV9e!VzTN;n$kiS`SDPruLJK1YoWjpakw^U@~U zXTqBnlE+vN7tsFvU zqng6R8fd+^DVYi~B40`hnXA&{O19(yHe{x&QC5Au2wJ>wMr?0suG-&3{`~x-(+@xp z*nbM|i8BFDFlgY|?uBkz`06{(A~N4J)}p-OtwcR}J^@6!e3+>RDAmGhzmsY$4jZY3XT%MDEm{@^X}Z9AN(A ziP=9a1jf6t6CL)pTJQMD8|CQC0>8%9&#@NWVK;;m2!cybYyY_FF0SY*)W0Y>+nH0H*g`q_$}bdlYk&%)WgXmJSJfd6exoOM_Xp z;1QwUMV6F7E7lx35*=8+=rT|Ddz~1=&sGYXTi_I@Z+*;zW{2M56|R#~ zB1;zDd$~jxo74}keBkJ{5~<8X9#K1wOJ|Pxxz@sE9W=+UN}ryr~m?_K~g_@j@jhL*SF5Q zi~VsStOR`m6x^*14S`$I9A!b&bi@c@Gj+bX`31lLU%joO z9YHeFyOOizsw_dU8d-E$nh4bkPMg39M+(8CaNQ+)D>KfX1f333XUEUS%gct@XKegv zr%{%Pov37PT?Zi8N{uLzD`)jX{F#^x?G)mMZKyfAiT}iWI;{?WnQLxyydZiZrx`R9 zam*a&?&nAUlNE!OmQC=OiSB4xa zVB;z4frd?qcH_9&xyMu}vH1lWvbj7jW@&-N*dsGP2AY|e*F|rteM&Wn{H;Yd4F!6H z1LQ6=E-vIS=HCssm?Dex6N+L`mlq0@_sDR)bn@{rxPAW^;bk?q?*|X z?IgA|Q1oaUsm$8Sn-I=Wxqq*lDHuUQ<3>Y9?(3)-N;_t%%Fd_*4zvZqv?}i_8R_Fd zoRQd=Sd5`o_;Cf_gkPn$zqTZwo;R$NI{Z}!u^eKL4{*35%pQEUZ z6UfJgbU96uptbZl1T=eFbl%V1D`}llxtDNC!h(|3b>>S%B_;p(O5SSwqMPgy;(ab9 zi@~KBS=ichV-wYZkIXWS;QMKs6Jw?1i?9wy`rp8 z-0jo)Y@|9*loChMYW{N|L03JL&p7X^^yAUOl9A(gGwgTo#+R_JLXd` zF%u(D4*j7fi@}K1?F?eue>S0(N+3FIi;f=|y9WrFR#sN(7E7DW&GCi5*UAYpL$3BD zkc6XXa0M?aBzQv&V|>A)b?u>S(dF-0X@a&E;r>4Tr^~O1w*{|58w=zjgVts&z!H(J zrD>R*1xtytOjz@f7cF{_l+2tS!rz3LqSIP9nBgD3M1auutfg2&3BZZJwwZ8({>R>1 zhR3yJS)yWw6k1FcGqc6aY_SCvGg{2d%uE(q%*@Qp%*<$e(zmL+Zg*Ano9XH4em|@) zzdV`B%s6p&oY-r{rs!`B2^jEpb$tc~Dz2`krvj>I#MY^2#yFQE+F_Ce@|aUy^k5BV z$2VTB<<~{UORvhXzz<}f2j~Y|8`Q^OJZSog@_0JnQM$o&HzllbQ}48Hu>(z!xU)5! zP8$}8bg1;nS=ABQ_lm&3>ZsLt9uK|c>u*M6eHt7zCEDk0Y^TKx9~fH?l4c12kf08E zU{SyZ8yHgjTF;a2|4K!wtgQ6r1~O}hhn(UDB%O2JG7`&>Qtkw`>KElfdU9>z-a|KB zT3hFjtpTxMn-j4gR9A)!^)aG7hVtW_O)EKJHe?(3lS*?NIgizTDAqs{21x{OXOd0~ zaS4LUgG|0W<~EdJrcj=y_h3}(*37-&2^-nQ#J7t30)*;hIUO1r5Mfl#fzD@OJ&)a8 z!yesJ$Zd2CQ?il*V@`hl;Q4_16S;%IQaz(QCFQgL4XrNXZuO(RhluONWklnN4NGg= zCj1y=S5n*fiZ+_^ZuDE^xpVpm4$8P*+0GZw@8bccAftr-TXYwo*5#c2dQpVI z59X7Jpl--mCutcDR6$h}E3pwR@E4?>iyb$hxG%N|I?#f58lIr=9Z{of@F zyQ*|zPxHRwbFe={eGc2uBMvAAZG`>4>_RU6xj*}Rr$xy`2U;=a8Y0&D`7$yI6fJB6 zslADA_eh}Gcobp9g-2ir=%s{R_vmBY_8J{VI&!e&9HV`l%f|yKt*gS7Ev=1dw{~Yr z1u+-pinprK&93B7|<##HY^t5q%FV(l$QDED@l8A(`? z&LjbYVmuTHZ;5K5Y@#Of57goHDn~eyi6yfDnng1FkL& z^v~cqRNAc?3KtHy?H@e4#dg)@fU@+Ke|1sAcd4IGwiKEI*|206&cf**!WvH#in33Z z#aX2{%PIood2#NQtuV=CSdNYr10HO&D;ELHlarG`J?ZN14$RBn?o2y0uXGOsx2@KH zradr?tO$B{hTQG;aly4LFod*7^lN=Ol>Pevc0_xEWuIV*;rRRsiNh*6*RtNXDew>eB-m2l+Sg2GmwC3@Fj;F z!%t7q^D;&MSlP?A5qJR@9@sq@6js1p<)`b)3fe-tM~0lkEo)w0hq}FG*!o~8wVGfY zlO=UwiABB(C=Q%mLLtqa9&UZs@&M*MUhnVk1EZoZE+!Iq_}Z2&^@#gSGnQ8(g=EmB z5N1w@YMVh-!6c);YDmr+63cDyKhXuOVoJxC`FFYvk(~2J?qF*q({HfXN+{J&73}SZz%^kqK_=EK z-=cfOo+!UjfKUbf&ejGa6&HMsj9vRGyk96+?AjMtF(b*iDP2Y2W&4zgM!SH7_EtqS zs~Fk>Kege+o4hLA-Ef#Xie^Wkz2^DZn16IMjSzlEx)qjKbLZ}Ej)b8^39_6c$KAV; zM_^DC4&DO>9y^R4gy+-IIeEh(x+@r97@^v$T=*9dbD{U7Xkrvpz~0&0aoZ^1u8e^7UFTj zo<5lCS6=92861Hj3_|=sN9*JHd1R;(URfsHNnaa-Wqna`emp60Rkpm$p@&Co1^b$~ z-UPTA{z2y zoc%R%+(naJB|G|()M1lVM@lk-L3;uVYzGu=EiDFX*r+bR9aOEY@f17#7dY>7*p4VK zg!JyS(M4GC5fe= zF$a5Q48f|sliv1_%Z<0rzPZKUBpGa6(xBHD`&NvN`J~saH(&p~ua|MQs{mb*j&PXOZrefRw8mi}@pj4A{igxVQXKW?AXYw;(d=fD~}peFEuiXM8?!d{8hhVPQS^ zz%xwGvxC;22TI&F%Hnj|T1`l1wyq2SFHGC}3sP1!@*Vm592B7tUdA$jmX5@w+e5l* z&ZSYacEemA%dl`jeZ;*0jkNnuIPA*hp_pv?o7PtKB)!s#<>V;RU{oPi|9Whh#L}=# z`_IY94^=fmyi63}f+Ni5?JZg3Aa>_V2ZZQ9-WZYCCf!&EtW{zc5zJfZfLw$kjqwS) zZ2n}4xg|BfH33_C@yl1?;H~?{0V?|eIAWo4CJ9tChno#Gm=mXvUK0k(sA-1)8+__3NOB6z45aN7UUdk95I6Hx8RSJ;I$IP+=y75X$IO6A$d{d;NAI27GFB7JbAvT|y5eOV zU4iQe1kh|rr$BFrC0h0TNmmzW+d7iX%RafjW}0Jeb>eyn1f0#&s_HHfYS~fb&!F zMLXb$P=>!NeTQChYYM`W#u$SWlLhn=a&C&$*mxVVpbVS4`mQ+w##6azAcYGZ4KjKO zA(TB%_-Ld174p3;^*;E#y_=inc4>|;(?jpR5H(ilK&A~3B~d^M09f;0gFcxt{y{Bi z-nQ#S-=y^34N=(vXku^<=s#1ia<^E$?ssdG|DM97^OHb4WScR$rtmxtpd3((Q7VOj zY1Z7)aqwO(Jf);7YId+lo514v_T$`62h0LLgjU1MAxQw>Cvrt#fGE>8=(-nzvwmrT z@cVB&TSfC=IY1ZfK0YIOdQ^!D8OGTNXXpt6@d>n$O|$mEXI()~%3G-ri5%f;a_Z*- ztG&1r(4qsND!H<+t@f4sOx$&)*miJ)wPc*J^iAL1DHc&L5+%y*Gtfjs0NgAsm^}bV zst{3M|HkLS!zrCLtyXwL}n~&%O)q*MZ*4 za^nk$|Cy9F!l8<>P_I|JJXQgRwTPqvEFZKSkz$a{vgFbapO(YJS<{d;Cn)Z(wl)xp zhtJMX`4mqLKZXE9sLBUNEb_sYah z#LUjlHY=)mR4D};Uf-<99a4me1t7hs9H>eQ?Dj=$Y<)o+U=yJ(m+-c>u}E2pcb>5m zJPWJZ1duCM%_O@?y&Owh=%e}FY9EEyrr)C8(aLas&;9&3U3}FXyK}8iU;Jxo&hGQ~I zco#drKy%g*?U~0w5zD3ntxC{z_-fvQ4(ae3Tm##wJTX8>2EJ`E0kwpjVb)*qYt3#y zQbq`(4*P&MR|*p+tr2s%-{GMNmL==_mHg8sH@@;gNxEt!b;EuE#v%oil&<2&NUH?GoC77mm57q`^2cTUsZMmNiA{>B<8fJWODjs6V zn0}-Op+*|OPW;*3E16tH$&Q~|t}Eii<=of~k4}$R)31eUd(TMOIktnUL0{5dDwS&_ z^t#@#EnX5biyRZSAscOlrn(;TVe}&KGXYnl&B@u>*&xrw?3Rn;4i8v^don(n=T{Me zHJe9+>JSE-=9ZQ`$sYvaeSfvKw6%iz@VC}Ahee&viyLdUSJS+mwJW7P(b++ zQ&*hyJXWMKe*trVDFV!JT_kiWH?D&WUU!j`UUbaW+Q0x@3-rm0S)!Y4Pq1-7`hLlm z&OYgp?=|lA0liyA_i~{nU7v}+bR%^bNzY|wn1%J?V^=SY*w`o|X^zSe-)8nA+XomC(Mt4@5%5;HTvs zgvin`GV?!kIf2?-`GML@&5*bN4%eU#t`WCYxq<)vD)%#El@<)Kh{iw)F%SD0X20in zH<0d8ol`i`3T1HR#1$sLkn9S(&23A_(vu|>rv1N#K@ZgGKix!AC?Flth*tJ?R#iX z_rT}O)r8yj#`w8K#51z8G!0!h1m2oCHbXl~wxdcmL&Y>@0&O?ycp!x$d{@KTz33So<6DkWbry@U%6Qip@A@%&lbBuPd-VzcCPtKSw7{z?_Lu-s?%{zCJ&mLpq7ty*f)P~LH~b31DIo{hiPMYvN;CZJuut_< z13%qcgO0#_4--jZISFxqgf!=5VGgmQmzS=8S}nPXz7p%hP%bVU1y`GQVC&iXOz&EI zd9b1WU4t;Afu{Orz>qMF2&#Gjm~W-0Y-Y-MOofF4fu2s4k%B7PxZa&m^B$AuI9)`# z!sIH4vjwwuNh^!bQSOtoWR?SQpG23Q&rWeSLjrX1P*w&dO?G1|Xlo!{tw%HA>bbK7 z^Aa@HSe~Kz8Mg&Z00c02D*s0kptpNukUi3>(qjgefk7M*>DYiGpcruGbF|>2o7HO_ zqC3}M&N}y_z`ojDNz~l=!*I3wu+lCSG z0fIxt@tCBG`n~HYNFP;vtYs=993EAYOjjZ`xY_|Jyn$@+ncuchYXrNs|^IARhT)k z8b>aHu3Wu?N{Oxt8pxKtez&~5T&~nA%Dz-tf2UE0pu16eQFT8u^qe0NTd{cR zhdPG(ZdVzinQrEcmzdf&G6>Z;1-SXJjaz0V*KJ=_b6GQG(ES-S{!_VbT`sbt4A6}N zEVZMl4$a;P1}X$&&>aFd_&FRK>|SJiUL9D18@LckAI#*6hEH$ZX@-{3E+3Jn3@FA- zNxs&l5>t$Cjh2a9w1m?7@LIhr3z!2g*MWRLDF+nAjl0#$f2~Y2yvOPa)>dFZVQ=EWlyX>lB2+Q!Wy|N$#1v9H;Dp zw#^tfc2G$8K5IAQ+CoB8;_WOmeG|MCoG@^%G>{Cq?_#zc;)cO&#CMwZ{iv0Sr5s$# zPE8^h1Pjn7WNYRic;W)iuYnJTw6}OVTCYhy3nekfH z;fpM&Rz8Ut&hIAow78XwHx&1Ze_VYZNsfjc7!cqxUTrk&l@U(hVG#InUuMYrRk%u0G{u{Uw;a~4 zWh7P&eYBcwF(|a;-8OHNOYT+Y;FjAc6>Regi9mER*XIDImc!+pa~{hyLL* zNH?hNp)>UsG;_Fm&K{@1mu&^Th|1bt6?1TqfR=A>XZI^2JELTxY(5P3r)tG#_|{iv zlC_~NIpb3_Bx2qx-U=TY;aeN{Jn8`SwAH_Nxjp zGO-9*)kr!Q?=WZ1jeG!LutuA{0$JETJyj^0YtkzG5pY0ZXtUukZ24k$rO=wq)u2Oq;j!AQ z7NXiZw-BHov;+}vNyixg$O8oy27$uJc2<)^1X2ux+p>vb5~y+#^+ip7I(?Q|j1hDa zDC6v+#2Cmgwr7c~x~W|V-?z)lxF59CRleUW8;4WgI=`dU!>kz}gw&+d{;57`{fXmn zPOrXFjmEVx01zbKF6U>vV`T{2wXn@4JWDW5x?rKRYamZO#1H&57LzJW{~Jq!YgL#C z%(O74DMM($=j4x3Okw;h1>1VsgS1}*lyD9i-ximBKZi6DW*^&ZTg!bV<{^i9&7j#l_QY6^FRFUf@}rJZDy%wF{RpuFdx($} zYk#dmiisVTyOU+xv=<4f?k?-gVlUy2(fSUrJNc9^n_RVeZfhjXQ| z`%q$eolmnB6Nv$l-DGmQ3Hx%9?TOgKQUyC|Rh^nV@O8k8wjwQLhjLKh1VaTA8nJ2^R5)#M-o`^N@HT43vq5}bFqV!a;m`Fvr*r~Hn{)zRP6)&^L z@2kzJo&jQhP~OJ4{=R25ljt_GEc>`iQIRh=a7^-7#)5@4IM$?>ALdL0LE%HhwVk4Q zMo(sg=cI*Z2rweQub}*hd>*mIbGW?1<6Haipj%uT7SG3;L49HJEs|21= A$hzjy2o_x#OrmBgK=47 zK3_(lm6>Z%hzQDz7rJ!{RWandn}kJv!uq6Mxj5+dWQU92EPThgE$%wVr%ZU)JGbzH z?1o7}&LRebs)kLIEDuAhLWqx?9?pzJ8E!Gtb?{M6Q?C3TPB;50Uqe;8G>W^|y$7cH zUAe6#$BM+>>yPj5JwHAYZjHVI)eOloYwXjFoIY1oa>DyhJ=(4xgq^QazExJHONLur=#F4 z^dGX|hK@3Cw+9Tdo>`%}y|e40x=0X340x`SEV`@lWL0x9^hA%;IIp0UUF0}UQKsN4 zr=e|DJGUk7GYQa{BLxlMe7=-sYL+?kGSy<{oKFF#upF5y&7}!BkM`g`1y)*-)KkDR z$vS^0ic&>RtckJw?p*)5E=s9VXDksE7|Rx)kxL0fK-rq`HO#zQ*GPP1;LMg-gnx>m z;bWqWR7m{eMYkoLIuOT&SK}~9o)1GK5DC^KhM)5Yjsn)KV!83k0)d4kjT1Erjb$Et zhsBp5DQl%+rhBd5onkH7RDDqH1GVm%pHFnwCw7zp8rf8!%Nulk5TCu1v2H0u;-_j6 zk9|3$C#;C6zust8G&~<>d$Tr@5UdTPuz5H;CvnvVZd7d_dvIlnVx~{5k-Yw5ad5;q z;LM-vH3gmbGxXB&oWbNzgUx)h@g+}4N|co6^NRY7(Scci(j8R9aXuf1Z|qMI;NXF) zv>rM9o9)S%Z7Am>+L5jFJpBxFct!|q^hX29mOyyogV257=*Cx{s+N`(93CZGZ*OG% zqtly6x+NffPE@UwFW%ldd}>hYA^otXU)l^;R*~y^eUy01AfkCCwC(xj&``j9-D&H- zoMlr<21#s|J$<|&-z*PXeO~lc88hSvl-=CeMDajd${9YoWF!Kjv+Pck7{@2@Z8ua3 z*9ydytyJJaQm+hi@Ob_>-2lr#f)8uLTVe?*`D}?|hwIzosYZQ~4FYYn4ZhPihiL-+ zv;68GV|g$q)l}3FtJ`n7R7ckcNZwG%`rhnGu~DN`sPt4dDmC3{BP6R3(#s>-U6dkZ z>LdzrRrnM*yP4)}*eP6e^UgwD!f(Jtf&G1>$>VKo#K%K*zb~k&*3Z?@(Z%%OLTk@9&S2)`L^ptg;o@XH+^Q}@WEJH_VXV78ujcl4 z)#A22{V3>gQh8i~kWX!;k+NO|TJmxcQd?(pF2f3pM$#cTT`ynDqmWlq_XZoLJy|_I zCT&RA7M)*O)87Jep|3+s>{M1kM@1rGeXn_uld5Zdri)HzG-9VhKa*2he=Id@5Nzsq z?)+*d?!n!4+rKhke~)O&_u)f(XXoJ>$GJkE0MTrYRVwu^57>P^*nY{=*WL=wGrMBS zNmKU=5Oin)Zgg>J`Y1mE)B#Iuj?LLKMP2V0oG^)#`dY4IGMtI96nB+-W)E<-K*~+#csIt3+Nm zU}YA`qlFKg2AoO8TNfgN9DG=OG;PLfI7!oWL#*t0BDlTCTR~f1Bku3}GKSXx;QY|l zx2@W(I!9nBeu$RXRnfhfGCQ&c+1N(uAtm5t#%JsF?1@!rR~->2I>9nQDLAhm&B1$~ zZ*Fc_wD6OF!EHwP#m!)%q5k{mcd-8LtD@W(A<`Vlt4Y7dNj8!kv?P zZY(~Kr>754t{rZJo)D+RTk&sqvMB97d1P2m#S3pKB=&-YkY%g(N#9tsQyi@IRJ&5- zcVIuiGJk1|M7CWln&TrzGO#;T>@WH*#e$(<_0w=KF>%N zG-rW&AmOJB5&bYH#RR)x!>clp^~kpF$J{0`*Gs)A^UpE|atN2KH}(l^CwGq?M?Im2!L)j8jC|F^z81G6kAsoa@O zRekNSS^TMp)A=mv2*h$2+FGEKJUkqJ6Xi;5x3#3EI}l)i>TyiziD^i@`W}OQmudjn z26E_`W*zowYFBM zbz8mRhx{>)K#ZF75FaUH1^mnV6SMbtgg7kNplb zCV@F%qTtV`>s}p?726A6085{N@P(RQV(&&G-8~o`QXNR`_jT;HK`_IbQp|h|1KA3T zZxyXazzfXd2F8Z&-OeprHv-w8S+|$TSpcC0YoMv4$ChUi0M~vVwi|ENEEOTY=eFMY^>* z?lRi=H7)He^ZGFU3DPR#gPGbqqNT*8gaBYD!_3$B0TKf7^i)i!b70Gwl@5I-_5Q|1 z@DY+1UvAodEC`dQqlDiN!_)4}ShjX&0{lM1xZ5Et05hA)qzHhWEixx?QPU6e3jBuf zuoy-wZiG#A5gO15c($8#_H{I1c;sF`5Q0&Juq@PH8l$`L08pk8A3yF;F4?|61R>`Y zd{b*MAWX;5B@K}6+%&Eo{y8fY@=#nL!yM4t98_kU&Jwpal)FeHmYljtTSSs|{Z8Ts z9AOe54;rdlQk5747)u6b)iBlprkDXN+O+1h_tVUh1{kH+OP#XpDXM8xEv0!`11M3z zltM5uFe5e9Y9}@7+AlYOB_&V!1V{ zb4B7iG>C5iYLIdtm*8R{tO-}L3>E~o&uNNXR*@0Cxo^LRa3EgZ)$sv8)gBx3=EqJ41utj)d;>k&7k@;1%*k1!Rj*5 zun7mIBhwDsUXB!Rz`2y`z(ACIpppX_wJsI=X%N$FCeQ`5A^ft&NGE(hC5^b8!0##{ zFeB#NS$bQo09H3peT?aLjBl3tdru@mx?4nWZ26}Uw{n>Y!EXz}RDF0=yl8AMz+jp+ zWkFHog^ry05mSpZz-5CDEoO!D`)7o5xbn!1d+h}w4{LXh7tozg!u=hhyg=h_Ie`+F ziKgCw0NQXI@tqgN^aO=Y2PG0)Rqb+@W%0auy>6vlR?Jw$&w*@{Ox9-d>p8tD&(kY> z-(e>vr-bqZ2*mVd65=Y~Y84`@H9;jhmRPtDhGLbFN;R}>k-#p-T11J7z{kS(lQ!G+ zQmAlsjtM~(v&eehEz6e7$=SBvOvht|hTGqQ%V>VIhgA2X`N8L^5-vk%p@T|?XpFFx zlf?#;oChgk;A$$@_<|jtompP46tQl|CKzlYQ1(43V=OcFpIHAe3?dvu-9%X`Er1nt16tTSc>=}w>3LTe{l$!@dt^%ij4qsy>;Nn2ULXliy9#ul#8}6Q~ zbI3m2Cjd0Jl+JayRgo`^w4_ohqdTtk2}&(idaUbta}Uff)Bjl7k|ta6?Z|ImZotD} zz2dwp_O6mYdWxf_4dnUk-~Mb|OO<{#K>vLdX%ofvra{aOMiW$k46m|Dnvf=F3|vOsK%Rg=me z?5m&2M3QoL=xW(YOesQrH&&7NfI4y9+SF8~{BpAo|HWK5>m6ThBP_;`caPdLv@9-B z>=A|&MpEi7RedQFhqY+5x8@U#cGgXquz;*F!mc>w(v5=dT|?20HMfEgWPzt%fO!*@ zCn;WiemV=@L4)i>B1J&@PjHNmy;C?N>(363_D1?vzh2oGn8UFVF%tbc^71mMxY`;K zF{sNMm>U^7!Z9d2894s&A4w~H6C*f=k7l18O^KM;I62`MB#g{VOdW}snOWK47=&#s zZS0k8^$mf)7BO-*Gc*#n*LQ_u5HfRgP%yF=wz0Ccu{N@HBm(|W%*@i!$exHn%u?Uc zNW{p{<}hL!r{6@pyX!siqf1}}VH2jT*ztQkF8vaJZ z-)Q(74S%EIZ#4XkhQHD9HyZv%!{2E58x4P>;cqnjjfTI`@V^NSp+NE+KyL<5-u=Dv zo%3(b_y5Q-&dSKf@n^?)h30A)=^%>dWo5C6zZ5nKwks%cl{48kw7(VR*<&@Gp|KV1 zPyVNjkn)R@W3y^7i|z}q#N?q6w8rw4dE>W6jJH>F{_k9+XUYe7tD}db-t->d>L+zH zZ^zr}+E1p=4?A^!yrrLi!qRUo2F4`KtrM!}^hNW3Z`zN}_HOa`o^QqforB;`g9C+) z{^4y9j^twLDKn%J+VL6L z!Yw@;SBk8&LsM}rYXp6)SHf&6McPODB&b>^FxkPE5N0vL)>~oEPC!Q}Qy5~(?xn8w zQLAXS8-!al7!h+8R+>-NPA#Jb*}o*4cd2~2lx12TxF{`%XlQ?Bjq0uB(yOoe(r;Q; zrGr);_Gu-d#-QkoS!=Zltmxghm9C}%mXCo!-Eff5OipDTt?w>w>_Lly+I?kVpw8~| zrhIRf7VRqE*^Pv3en|GO$$>{BFxvapqccb^$|!wN;9xG>Y@Fry^_zPvnDsF?4V}Kb zqV1I&MawA`+nvn%eaCd78)3Ye>|QfKvcZa)r*sm8AI@TvEUx;)ODhJ0HYQ10wPXx%x`f#`UZ9x znFE5^66A31;E0Fc88ETZLp|kn?D#(TG?1fB8=(Ak;0#76Cr@Qa;RDfIK(As@5lXiC zX1B<2H8H+g5QHEu(Q6YA$M#gRe1m|~ryMZBrcVF0`=8Q!t6hF@VMf*1z@Ac@ljm3#+D0I)0d%~fQ{FOdWbUnJtY`|Vw) ze@&%tOJfc@7{esE2$Vng4ps_N2y4K*mQYq53$7UjTjQRq5hnUHIfGhhA`HucH?eN5 zQP(Nya77qNCW)d41h~u+mWJMIu7GDN*iShUqesD_!aQ9;>47n;%GE(e?L!b09SylEfb4Hk=tT|<* zG)v`V(ac=E(quuXhgAY0VrGOR)|DKSY6|;KRM%DodCaRzJS6$RH(c8|coQ7eLYNG}kpM`l5bMUI{Y4jpiXZCK}GrGOSH71qSSnpY8m4t-DwgTS{& z>K7FNM-dUa&IrxXL%@;qbmwOJ@U>qe_(H45qKO+J)Vx3XgCf7n7+#K9_*&SC8k%tN zg<^Pd3N%&Guu{f5HPx0kc29h=pR_aqA>U*wD1*>&i<=DSEh1Ei-_%x1i(b@U9|scT zFNH{X9M#QVcr93xGYs_rJ6!Fs*4yFhRm@^NUsEz1L^(72*BZT&ehiL)#pxlPU>!ZP z)Dn~E8rqktibasJyMO+OkdYZ@#tI34O2m$$KxChNN1FyhtoPXqkM8z8O|U>4ok;T} zufCuw#EDz*45Gq&!siF|N{haeR;$3{FKeX2l-M22Z^ZnlN@Z~@i;~*~7)V@L4(Rn> z4f5(^!lFaPig1wZ{k3{xC3!TfV+c>`l~vB+b-qYJP>}0VAM6PnkM)g9*gQWB%(J$u zqdWIGmZKs=B8Ts$AQmxQ<-74RZ%f1q3Mb`J!JqcMzjGHOI*?Jhz!p*bP@dUdaR>G= zITq`LF(QGi$-GUpwnS~dEldCzn6O7jtH;(zmw(VuI#Zd7WY??qA#y5a{k{3sK7P<# zhI+D_3qra4LRgS zD%gq-@AV#Y4o%GKX)jyzDn$~%lQNkm238skL@9zY$})7h$%2dORLHb!a6y@ei4KV! zsNLO#By&lZ8xey!mc~X1!~&SmAgw~(KBgwxVv<};bmsc28s$TaKT09MGU2%ImXfkC zE___OjZj5@Tx|Y`-e76*pottYpW%L{$tsnc;yPr^Q@i3Ex2aGe%Ey;E*JUwjSi}vI zU`ei|6NE`T?^Hae=an98j|8k)!qur`<=;sMpOB8oMQ&b`%;W!Q`=hh@(QOj0Z!&Hg zvl zqp;*#voznKs!8;RZ{m80aG7n=7s<3HC_Gwya=tXgqLAnKon$MIxG!$k17(5)Da9gH zcFy1JI;q>h>!b=AEZdGkrjI#mU0AV&8pBU%O@>0q)ly*c$6#eNtcSZ$)*UW-639B} zBq<3}Rf<Z)54tOr7` z#+It{_@Pk}`<+vQ`z21;GJedDyoxle7DINxIZezJG2bA=x(vc(%b@dI%T#n?8N7Dm zMp20v!}T3^W0oD$UefPb9JQjCSy#7TU!bs3*v#AmsJ-;tSCG*$PKhlqZ6c9b2Gd^T zN6o^+>8It-&1q7?>KXPc3)x7=g3z$wsD7E}6xj7N`#hI!79jfJf+z*Ob-` zNr8Xs>14`U%!z1LWp)5GVD_VdTMCv5O7Jo~r}((4h7gvoUU}E|RnU5|iR90z;i5pm zYHrBc^Dd$n8Aofu7_nfIfpm*Ku=z1h6Qe0%Hi$`R6=>>Te0Dp7ZHUnBakIvMg!_t# zQ>sC0r^fM-Uc+&{TfxkbV&>uf^)3tMRCgkZLaZ(WhIJfR5w{-}25G@Dvk zTP199bp6WB4I9_?YOefj?ziPA3pCqT=FWkO7wJ@Y7B%n;}Zl6^>q|siR8}g(^E|m8L|CK~uU0FZ*#BBJh;zIRzuod4&nN88&G{M)L*C0f zY6NtY`Mn1Ny5v;8FcQ=gsN3{=uP?{J0=k$Vxz`v5@CB1~L^tklSTq6V6GRhJTn zP#I1xj=UgR%RaWXT?*4+YnaGlyfhh`4Cg@^-BUSbb}Kt4jYxZklumB7s;j#;b2ks6 zJz2-b+sbdfj;&aamP5y(*!RKNQk!#hXbH&H-g+J!&!KJCW!KgtOvIiA4^^yr)g;8c zf|t)PR|n*Ct`$r|w%+nv zPXNOpgtebFD*ork^V!2uj;n-+^M~W?cUUUh7Ckm5eBYgV{keC1bGYbi={r9RVMnmN z*FJaIdSsD9<|WK2FnizOqCw*clkph+-kRqdnj5b`WyH;4vB0aXfMuzO?KT z4`2Q;wC3f+m({h^_`)o{V)@C(vgDgMrSYkuJBB6UtPc`8*ZJ9({Oz}*6CXa@Nkwx}{xXAjr9<6U!6uW>zmfJmoyxZp)i!%Y=LxdTZIKa47em zdr<2h-Rk5MTA~sfnuX~u8!zx_D0{@wT=~%j3b8ZMSVpla^}UNbu<-*ju;2+o%mEYn zQZK=a=fy0Wbf~Pn(kd$U*4Sfan!_Px5(u zj*D~M>{T6H7F*JdvgO5tOZxrJI`p{0PW`DtVX_b57aYXf_=#^<0Z8(yB=^HgH>)Ns zZX^AdSvg?fUXEbni7IF+IX-!;h@%o6Vo~dUg1Ey`7)A z`IEr7&sx<ok>D*Ge6m1EZS3lAwk^hPmI((B#tk_0AkD@RJnM07wO)Yvw04s(D<*$Skgf1M~S^ zPX=@Q;3ycN^yth{U})R8g9s6tuoJx8bW?<HApLn}$H7$cRwKG>|o0 z_*p|@9xdDTSUFW&vbNAA&&%ZtufRvzA2G9()Zr%eH#^H37ze`Z7aa_ZvM?I;=3&A9 z+)bQK#+?FzFz7vyRN8Ln!|C66R9IES0~ekL-1Z;$(QJ*9!hwFRLxk~vy-`EC95bjMUnnW1S^1Em*1RShA|LQ?6)2WfW%O zMWd$cVfYu(ec>hMYSyW;S=qql#7nQAE`#s@;Ul>(d54IAe!Iaqkb3lFM0m>dHA+(k-a#?%>IF<`8D(YKk|V7`(``ifAwr2P>Xp;RsE#x@L7VVn3n05gsTMs^~ z0XFJ_66JF)3A|6?omyYzvSz5!E*Su8%@ZyuR=&68O&&fe8k)OUI7^`)<~0-|OVVpnfcl+<$ixBI72wH5Y~cQZg#I^j)&BeL(f<@8{Z$aGf688AiKcErF0Yq%9^v$e);peY@D(PFB82!tezxILYPcy=u ziO9&s(3Hr*$-wg;$erVF=lKit{wr();a67Q!QyYA{OjExm@H^%YYN=VRvefx_-mZu z7*v#qn0|HmFYx}?>_etMc|iV2(?AAeZS*Jp!u5aEnO~Fa-}Hd_mze)Y6dzDHOdLeO z#~XLmiI{%zvcFuy|7(uK%Ko?c>XN~tzzEVq^o7wV zM|9d7c z6DJoDEBk*r!fV4F38cJJWBr@2@ za%JGLz6>62jAxFQ+mm%cx~WILAn{8U?>^igK~h0(!i$F_-ki zPPNbK+sJrvawsl)uJuT2_}HFs%6V>^jD__U$IpYO!T2_Mt;=PD%e~f1xht+uUL`M} z7t*pC|6mmVf3qm~e>93re}X8N4A}@Kq#gkT2=`8dQwglsv)0;AF*rB`K13K2us@TB zs31+#QjOJivPkGGd@SIvNsuBZ4hq?u9MBm`mIxfvuZj{A=4Z9@gq?rfJaXG1(qZd2 zbxJTbO>lnJI^xAmLLNRcuEP6yD3YAXP-%$2^$+CzKS;~|t>$5724;KzBhB-lABg`m zRscNvKV${W|AV~g->y^tuO-3C^fwjqAJT%qoavwO0_MNtN&hE!{f9jN8D2C0iE{iC zy#Ckq`QK9k=D)GZzv4gh-%*SIE>!r1vVTHcpv?Xd+b{G5UgRIw2?W`HHwT!A{(!N+ zL*M`W$p1$s3f6xU^zjejH$nyozp=SM_>HkK1;ya#{e{2g0KtEtN&dvNfTpCs*pYzG z|K5m1&(6rm#lpqK^@lZy320#Y56wx;f1+dmL9@SFWnp7wWd7f4mF4e9nV_|`&7W&h z$e39JdFKD3?Hz+N`=YPG?l|dK9UC3nwr$(i6Wi(7M#r{o+qSJIPTu_9nyUXyP0duz zhq)i_J*V!Mvk%u^wa;Fn|IuB7c82{X95QL z|DOMWuuT6qDD?l?IwnSDT4px3@816(>zLUYX<0a!zuB_?AFZSNP99=HXUxvQ!OCG^ z!pLI4%ErJ#&%kP6%ED^Q%4lT7Y{0@|%*MuK%)nv5{{PSy-`m`O6ZAjS&Gdf)6#s8) zfsupb|LVeDbn3*AjK^iWZ+8<_gV$huUcw`S#)cN;{{2~i_VdzPiYZ`*=U3DxUk$Ls zG%iUa&8MwQ?mo7jtN-V!38ul-uC1-@HZXpC?n?*$ZQ4%P_A`^Ev!Y?C!|U_))Yo_K zNqg8sqO)1bLd>_+{b;=VGe+*~l27|{F#8W3#W7=>{O0>@#&Rf}Qrk_=*Eyf=JO0<} zbdJv({`g_eR}5UNB5g|T87Zz9$St4uD;*GjXv(SMfK{tAP3Verz5DL{21j>^`|J?d zZNnSW)82ZxKuc_4%iEY@A$1==JWEHdg&y5ZFNAcx)s^OGm6DyKdgX{lW%jF)HAU-sjt(kA?3H-F;z{#(3&7{@KRI3>zP_uTkfM>Xk3XYhEYL za6^m-ZpUW7*9hqtrb#-;av)h(A zP50*x{#UW@`{{hn=iMo(-uu_;%l-DhW@mo;dpC;|X3fU0Q&A*N_^-!fU8&DC(#cHP z$CiPgk{tY*m41hsILU91t$@s$MA_7us5`$&euNcRpdZ`{PgByJmbKrOAt(?%L*K3@ z>hXX6;Wl|K03kB??P{REKmEG3onKy%o~?XGr^hkwb`;U>8UnNVoA?bhrOSNRvifVC zwOszLL0vppt|e=>k+^y*vaZt-fDZEL?dnm9E7>n#%G)95T_{JmPQ>}0;;R9hTq(s> zUNb*&6Gv433b;8Ana*|1Q!{Ohe9rhJqbFu48qSQktf^HEJgdgErVa%^zwjn^YmCg>Uq{ii}}a5z`*%^ zY~rn&;V2Yt>a%_9TH!;JrD7>%y*q7=$wxpqp2Fa%H_kg(ml0PvpN-E-S8diJ5cFw2 zD}xQF*R>hLcL6coj$efzra3cyuW^`hx;0JtG+ANm(~_eimC@MtV({0J>-i%ae|YjY zp2HuFCssRk_m`7~Guv8T-tBAkiq;ncz9E2JGky!8{`F=@OW7ur5-btF_JU6c?xjEf z+QCNeK*x4ezn- zSmAnm*6?aZL4=ItPPJKe&a((-BSw)Mr4+S1jd@J@6a??BU!ah31S_5qAzmt@y1f8qh# zL~EAcBq|#<;#^0Kxu$B4+wsk$xZs;}7Ndi&SI<@9x8b`0Ag^@B$-Y^qKA9S}2+HQ~ zG0dI6F#&t$*(=S0L-@_qM&o-vxqsf@CON(^N6-7`?uSXMd6YKby1EOS=0E7OF6`Fz zgrqmGUxA;m(L5Vnb=@vaeWO{shuPgRt~XCPC^^m)eybT z?iQ6s{n(ws64!X>M?D(z*iJj`x}ADuFK|XX9at4gof#*tSfI@?>j*^kI*XPjw?fA2a^k5t=Wf*%1n%&>iXfwy{T$<$o9p)>A*(?;H~!9 zL@Qx@*k<6(!aG#8ODB=<^3S=MbV+GPC>8cGR8>b~-Y0*YgO$)`U2diImqYpa)SuQ) zVct*NYx~D9!&M)yp{1~#uf1L-ljOTiq_jUmA<&C}v_^X_ z3zZBGL%3i1(m3t-O@yIb%7kL?id6fa+$r;{XIi3_mr*T?giXNIO2^yX+^B9jt7RY; z@ZY!`KHk0#?>ZOH?*3E@joA7Y37>4_)>hjaTUS3Wa992>{^|KU3&~xKUikXtX8x;# z=3;XI6Q2CxJ}R|j)1<{U67^@3;n6f^)z*H9_V8&)2ZE@F+|0-@C?PMNZbvh&ck1W| zrEOrPXmdafdiM4@YIK(Fy+i*Z-DXU8JW0FBwUy8UKHv2AzWH+t%}-lVCxW+CCbNf71LaV$FZk#ROZ+>igoL$(8{eZ>WRn&qy_6%8m> z`{<#c^3_7G{=n_}8~^1WKRCQ8@}}X<-geI=TpS}t?DY<_8Sw|-Rl++I6-YyPQ#zKg zjpE#Rb~`!p`qcV&iO%8EYn=3}gfdZy2d6cL>+{~qT(0};24kJyA7L1@gQ@w+JMqy$ z)}uIuFI???q;&1>=~Cm%&30+nn-zb`_@f2eaGJHNpa0Q;=Hcrp{mLoiCHq^TYwFJ; z8_|}{V?^aaE6a=ZB{rArJ?Qu^uh8)KVU8l-T(paQ%qIL8)^!N1?tZ~X+j<~fLiZi( z+hfY89v?l)$^PD3=wQWl%L;F%-z(2(9v|%!fbW$J*;FW1^6(OYk4(b+Yb@q(-KR>K z(S}CGmNwdTc#GyT5d;1-@Ex842sspE+q(Vs?`iwdf8ENmU3FdSG3!)YWT}(UtgB-| zMTP4Y=>*v4h4bWqaqaU0m*+(cPmF(x73yH8`X=jX;3J1KG+FX;kf57#+6(tdvSqm0 zc}s9-0~dlY_;0Npc?>T&7~@sp1p54ln1!RvG4VLZ^{sz%$Cd9r_Dr$0o0x49NZ!fC zRvD#nH(SMrs&^@lpoLJekEFttu!QG051=q#m#&Y!!dLL-2EU|)xb-J<<@>r@$G=)W zqxcmBU8sYnw|01&l!5=*@UqJrQ{6mCwDoD9G0f&#&ec5X%2smq`xY3weeLrMQFgq% z)!uPZzHy(N@WOY%?ZfZ;?C)aPmG3bX(_ZeQZ_v~|eUN?~_W0o-qQPr>xIO+CA6>PZ z80&ODPadC5(}txO|99Mdvkd2ZOTa_rkILf?JD-fFv<3Dq8{Dab^)5p} zzXK;~>-7>_A3)3Zd}3~a{YR&EXgFTXtlOSfcHKA2_9R{#pIvBkzQ#erbPxUAcXuR;ZqLtMTNrqgF2C?6i# zy+QUnaTM#X{ zZ4T&@P<~_5NBzRa>!6Re4c@Sg70of-D6f%@su^P_0qf7N;q%;PuQRNvC*R}!yWuaf z@jkFQsj~4ANBH5l*W<~BC8|zxfCU}!AQO1AEH}zKV7^r|WsUFraz{~} zLX6AZ_$r{q6uPMFp5IME9A)ywxY97#w2jTI$n@cD&EioVki`4T&g)Y-IwcUG_h>?k zJ^ne^&SMsc;efjt%|*<-E=nA~q*#=K- zg>d~7co@!&%zg|NUC%SbR#B!H8YwEwoBe8bD_^Vlbj}R5*Anw&d`0vNWok!KSmCGi zb2v)p*_W+xr%MlW;|dqcbOAEku7QHrdb~-N$9b$r*``1ZtP1?B)~6JMYE|r%<1_uF zH>oQY^3YWy6;u~k&pC?174HtOtYb#i{)sWE5Q_6rRqGE%dZWqcTC82yORFZrMeVWV z14MMBzdR%VP~X(jCM8ZxdKcZe)IMOWF@iz4${2Yfbyhuac+)I`pm4vnNX$sajTkBv zP-Hn|W>V!$0z{Xa0)=)4g;1=E81{s~R`WDDtg;Sk~k(%7l1F_55pxdv~pxA9VFojXyu8@1GhM z55VtI4?-KWo8sJVhan!fXb6C%^E>-OlsgkX`niVujVD$|`?X80Mn`F~h*q*KFd8=J zuffH&Ny_x3HRD0fU<+T?JZoxgF@U3c;J7G@ z$2lu4P75->NL}U?r9ThW$GY2|U0X1O* z(A(qR9~NK$kmm%d^O68#&QweTY!p}V#`>y4h|E@u_Go)c#9TkA5ykAadcUx|CdV$Q zpi8=1AGRLu1i-!NkLV@Gv` z&7Q`najf~X?wq+MC|MKYaGp8IL9ws>TsFOW_I$83&z9{vL9@$=z{uH?ugBpoT;lW~ zJvJkjIX17>&L50i_4pW}cKi+1*B!X3tKnOw!n&RF=e6%n_Mj2}N~8e-Ek?Pd3H`i- zZu(T=l|enTw(4vwT}P2?yDt$lGh99gsa9=s-Gk{{ZUqvW?j^=IYnTvy>A*4yW7@my z@4cIA7}sbf2tr_62MJ7y_R77gI(i+c_O#jL;nJ$VG9;x-v%Vf;>iKMWbt22y1-h$H zv@3hCL%UwvN(}vpv+<^gi}5_`CE7lvu^sSC=d364It*MWe($r36kCHn6`CBsX7F8Y zi(f+TjD>%WYgHb(HLE7*HKyN|ExyaJbg}{Sa-bh^n#iRml>2=u<9%4cr1L8ob!lkV ziTw@Cl=S+{s?`i=x~Y`s{g1fT#Fn2t6Xt0u{h zTHk;TTHBX>*G-mIvy#I@nN4)K?H|#=+3Rngk2I8fOT>|FR_}>Wiw&54H-LU`srP4y zSu^`4mQ$~2^yYoMZL+{zB>LiInMoRFvjU>5mGslfBmPrs<-9lP$ZlY{ zNEKuYN^`zyjlOWjHlB_@+2YpRrlfYrst_!Fh`P|*kjoriN+-UwS6bOY2ok0iw^B+d z!Bxef3w6Jc-#qyJ&;Z#mE~mwFr|g4XM9y_uO&^%|D^=o)_V=1j`&y!ieqL25z^2)Y z!*8u#Z1UDRfbdROu1U|}GnQXVIau4%XbCDmDrzk ziK7(y6>I@@&%Mib&l;E_#!KFot^>#VlGx7o^n6-Na_LoseVwg|MAAm-Cjr1(qs_9- zFh*>LElgd>;(C9BH4R{Ua$^ZeQSA|}j2D2_ly*dhmC>0t!RC+MqK{qe@#X}CGXc@F zf>~q&n@DLc{^s`6mfJEF&<7EaVJH(^Vod%X)8{r`E=MS-)~l?ucdE<&Nm>8qIAraQ zYXngN5HM{nJh&z%ZPquQhzR}}nXOarJj{Ixw!|P%`i121ii62c3YYQM1R|NLI1IHD*P3z0Hm5jdJA{ z+RG^kRjv_rTY((}BaahMik?BC=#+Xo8L3TDH0%^AAs8#r{8wZ8z}?Vl@VQN&h@CvS zKYWmV%30f`i6D2eP#*gtwQsIoc-9FIpmIXB^J>j8)J(Z&VL%5`7qDZqSe}98UjMh? zf{bT7vx^HNaFS1P>^Q-7#iw3tleSr?oiIPuyV|@Y1*yma7FFlXM!G4BWLy8q!*juz z2M>WgPzg@!H!dvKMZo43&zwCUe`c( zO={b!4DJc*x)8)+b&qwpA&=?#MA1r;qLO2(Hw9Z6k6CV+s~pNSaTf-pX{){|D;1YW znge?$6DW2_XM1bsN;Ed~^S2^v6pAKX7N3^bq@pMc?AB`c=DkrR)dGush6rV=r3wsX z&P4@~8VL$sN@yQ&^_ApR(f9j|dlk=_-9x`{-AZrhUGjT-Z{P)H&g$s+*H0mND%Kmv z3|GgfSk%0p-qTUrndv}eO+(Uiam!9ZFwKge^X-H&Y8mlAUf1p`)0*tpNuo z;nHwT=sKrF2}D&V`vJI&R6<-Sxqdj9#RyyoqC9D6$10`dRL0NVI+l1x4VMKZ z!6ud#UxsimJ0B^$TWI;+duDR_Jvu=!wJZ6fOt77Zx6mY0Zf%DMhVCddQehVkUt8bGoXKOYOWqse}fg-iDAIBMFo56`0= zW7Mv1Onb?ALJz~$P^940I7Ta8_+>UIu18|7q7T0e{!I#iiQFi!wi|zWB|#-qPhyZ< zFtkE!UmTionmieEZKV15m70~}_C#~}+-XE9V`cP8ftea|;7(r>B&6hRIYRq~Z}U1e zocSkwV3d*N!#<)Jcznb&Ci49*8_oi9q zpbutJn1*dP^ix6N4!r2aT|&ufRAFopQ3%Db;2Dz3*ihKOi)V97Ri{#V?QJ+KWlYhS zq`f1SM2A_=>I6IZGS9%RYAbdseW z*s$}wR}8m{QtXZW5oW+%zdVuyv_oBT|M*qf4{RtLvTM z080!gH*RI>qs%}Vl zo6o6TE~<^#aWgh;Byd%;jZsm!T2Hdi!cd8WvAURiE)U?IDOvwi>1cQyY!E4*zTP%ky3^Jql z{19FCvZ04K+lp&A0R^b{v=_Mqt9F`zdyky;tUX$k+_vRp67b?JLN$wtDlYI!dW?49#_DGhvNbAedF{bIUPlLw&FB0pAo(z{1#W_ z@661~sRX<3JGVC#CQK15q*(U>JS+!De2?73mhiUCN(vHiD4ox4&YFUd$oT1<$cU@h zw)wA#%|^7q^aY0j8O|6NUMqxwD8@Px6M@=EPExt$cv#Ii_~=-6>&6ca>qjwQ`Tj%gqxazTvAN^~mHOUIX ze!=3a(4D)8pj_Iqr`kwj+-Akx$`k|s7uT;YCN+d+DpD<^sx^tm!~VYz|8#?vE9$}u zQuyny13~VkR(3Kk?RCJqHmtM-Srt+lY8IXNLyV|ucRJR!W3B&;%BUIl|M;;^kKt;h z-Oh3m2JEV}V;D{s8({Hg0-suI6=!ketsYn_Ji4)Ig+w_-o|$Dm=`~wtnwtexAED34 zkNVS;vh^T4u=m7{a$T`!;CK~DkSFSrjr&=l#|UE#SWK@t;xj^s&a9~A>L_|NX6$Nf z`cxa3)iCX%2a|;!Sa_?CGTi%Ypbeyp|7BPap0(8Wq*Y~hXa75IP46Ng6Ay2$hkOWY zSk$hp_@%oRS|hT2467hGm@KxP6~e{0mVkaAt>$aYK&! zFT-@K0g z$UWDeBvd&W*vc9b3O$0jbyK4MJ5|Q}l;5pU$swE#kqrw&Fs!>hUpj;sb)@^T3|MWH;{%06M6ghf#< za1GT5iaK<-kK}D9G>|2ui#7?Ha;wUJ8lZO^%AlPnvO=#Qe$8r)g$7stBCP4sj=j$A zLKr#Y0lmmfQ3!g9%Kwuw`rK^vj6l7T7y8cUePPEdsE{uPvDR1>2es%V4txv_{&icyd~xm)JFNW68FGPL?EHWMtG zH6}p=Bf;7hjjnPD<<&HL3idFvazKeh`M|c4pM{0#@{QQGsb79-b^o2^@phu;i?H zM^rt(u$qz!Fo0%N{6~6fu}OdKqiQo{3H^i{ICAjLDq;v{bz$ zUQf&K$bpwFBM96R*Gw*%U3rEgzS=3ED9$*fr-~kW1+`Z50CLPP`Lr@UURoHB6%xbg z7yZ1}qk0C5=&5ZfNXr>V1I^h@ETgu-R649Rvh4E|#fnqnk9GL-gjXc0iG;bP20oj? ziDBt0K~QVU=kUb?7aj^8mHikZ6rMLXoc+uNBB&E3O1e3WAALUp1Q2tQq@!6KJqaC1z(}!JqmH;L51Se1=yK!^-frFSvb9A`K zljj=VKeMO&;KoPgr*wN=b%6ZG(Pq~d8c|>sdbCs$in7ICtYR{jehYQO4nI2=K`Y&l zWSg?WbMbdk*OqpLHHYyiq%~U{Wc}Lww-QNFxE=YoZ0AS}lfSo9wj8$H2|4>I1O&Tg z6dhci;(8##;>SHP>t=V}v$~-YzddNJ7sNpbSkNM0GVP;#m3gvpK2NzM>n++OyG<61 zOyLQh?^uE+e>W7^zgSE?%Uog{0zaqQ@HIRtL3)E#ph2X2_?oyT$5id*OW6HFX{G-? zh5;C2?~>D>{Hk3lL++~VVv|47TH|t&viHOdx@>=yPUq#U^H`gJYew*;iR$lVH)fFO z>3hZLMy`0k6${XGA1rPQ+EGbpwpK`*y)MZAeeYv`5*w^Dx=bGPs?!o) z7>KnSl*p7>xPE3P+?%ccUe%5eZau@M``MYrCaiaFTmn7(XTMlUQUYwY%_$?pTDewY z9zk@2a|rtTkV31ClOP3_TZGSL-qz7X-LHhM&jmBJ2$V}k^ejiFyq1Tdf=APD3ZTno z&N4~@{ge{;Ea}@&Q<*e%%#E|La_6r(plD5yOg5teFk#iSx_Ncv2~*;S`e2Qw)7NOa z410WryvXA#iduO7c!a%`?z`}U)YoqOU?Y7tUxbgRmmNd(z0l{q3*U1f6GR=E=J%>O6+*gzXh&A4eW}T{!9I!d0f1H*~quHkWH34gnFV4Vr~R%gzG8p0Cf8w zZ|!iN3CBGqAO^wAC8K-f0b!2=wvnU^;EX}103jdxr`#i- zdx`7>%|1mjE@@QIBHYRcsQrew-6pA%10WIVUOX8H$*#5XgXVq0G_2 ztqOkeLAr1*)tnNYP{=MykW9Q98vqjUC;iF4hRE`ldxvl`PUd6mY2u#=m_nm!l3XUkuR4LBO-ymZ zhH?Ck`FE}%wCyNkX1)}^1X2C>xYl9eom*_^)eyKq87+ebqN>EC*KBxMqal1{Bv zzomu6vs|o#_qJo(AB`!LEPGCH-4OQelTgXh#af88u8BtpQeshB#>mu!PPH?DLftqoO4@+S1vb;zxZ_+& zH*$hIy6Ie=btm8G9la*zahVAy#dcKJ=ay-hcVTx`fY~0r+N)%8P_Yh6w5pd!&?ZcP zRebmOgN-fLT!D~|QNfhGNTx%(N-vq8lY?%#nh0VM1v-)X&%!0}voL%CkRnYZxZsRKJ%N4=mjyJ;<}%Ev z32~HQ-pizo)y1TeYC@jePEz6^z(!3Rc-}}wt6Xw~8l$41eOv5ulRsnxVs2s|*899h$te5=A9-t@8DjO&y@OA__$3 z(iy4K-uoRjIk$gONZUr?Gk<_ip)BUac|0?%eueYzHRag6Ixf4ZZq$X~B`;>LH#?mj zx!J1-E9S?COS((6i`xk%OA~Q8VidSV+wi=*xS7^4h6AF5FFrDOgt{YV(~|HBrsR-h$lD1 zrYTs*2)RFwySdW;xLZ!=P{D~T6wD;CKG*|E-lz>&$J&I6|2ehx3!X_wNduefpX|!C zc@&Gn(Hh!yp2U#sDt@O)w3q(?XX%HBkO)v_lONf)<|GP_fb?+!nJE9JxdjD4ejo%p z{WBaTP{ z_3|fSRfhl7?@;uozc;9NrJ{8XY&1xG)Gl*eSPmE8&waL@Kw)!cDja&0@di^amqi$L zuOdn0?9aN>c%5G~!>bPzjY5x1D~TIc7s}-kyBaftv1bwBnzQN)P3%*v&!n{FK03!f zYlG&oBZ!Cj38Q4EE$LL*%kKuxOg2?v{_Pyh zC0Iz0r3kH?Q8@hX-U0v{fS$;pal?;dpG2lV`zNx^ zL5l)3%1%ND4ha_HL1Hx`CCBH^$-}AVof(&FCdj>4_Y{BLVqd};2XLBh@ z#2;a!#oV}q zz!8Xy#R#!8b4K>mZpL?Mi-p&;BCzYzR0Y!Gy!3c<{Kb^`(XxN95~6(xs%BZakn9%V zfhkt8vQpRE*P+W58?`~w(sZL_PrYDeA9S%GE5_`CSSMs+O#QJ`;fRShavh1PwXe@K z5GuM5$0a|S=2$?fSdPunaB>;$zp#aQqg;M-?*4hSh)kMypr+^OiP+{c&>>K#Obgwg z9Prs5_;(8Fr~^3=IlDg7qjt8l?P!<6Ky6}StSl>ggr$;8?&@DkyYogw5CqEHU6|UoIhw+aA*zi!Mz2oIIbM{5_^B8WI;NUjBat22 zfEbZB>XpNg1DO9^G#XMZAL;3;Dp+4>(=djHHzO9nRT>a7%cYtw@l+VHs@SDvs)Ot? z1_86`VX{Yv+_kH79jTcqg(Y|^&3e5G<<)Mf{a}yByT*+LaobiM=#LWa^iN<|Czaeq zyZSc!`)hx!3ge0vGO8kg%HticM-Y#PDdLqk(d(JHN*f|`=6I$S`}X$yq8>-ewvt^} z(+}>Dbx({MDxUUnR}kiY;b1I$ltJzb!xlH##*4_rzAD1g6;ztJ$adi9cj7Q(MVjX3 zHE24bZx>7?O-HN1)uaFW+s8SfQ6IBaIF9sE{ztN7gSM~O?pz~#tj+RnmA%&GVGY~% z<+%Vl3%JEd*CR4ZnaVx-bM;pR|1t46(&qFt$3ZRGm1axkVbYJK!!o)JTV?dP+O}5D z4ki2@2th=j7{m{hkapE_*s46~EJNjV#~#NxK=5u}kvKd*81Xt99?8v7uyk$s$g?tqYAFs&z+G`BanfcPOe*=EVcXvv?o>*jEn`AwDzQS^ zm2;zPUe5+>>q5+rGw$x_vea5U@VBaa;sNM{h_1dC0?gz5sf=rq=8h=$W-Qb=nYLcN z<*13buDQuG5Qfz~Q-rG674n;%F?QGZZi{HQE1*Uy(BAqZl8~f%(`kp{m)Zd&ebf$; zSW;*_TYL*R=KIt>w3E6J17dl@J==iS^N&2__b3!FU4gLhh)Ve23kw>1xDi2a^ES2U z`U$b@GPWA-lYS-`JN;^_8<_rUy@66FOGBDk{vkEO;KV_l-*{kLt1$Mhf3TI4(XhP( z@{lD+J+V37gyxXJX`~!{#wlXFL`Y))!CEBx2|?2g-Jb1g9A(DO>Zq2D=7V2ij#&hZp-@ulT#+XkC)v0t&B^)FtZu=m#rPLl~ zT-%-~@1<0i_n#=&wCD_mz>?s;xirp_cLr4hgwOimE|LN}`l`4#l+kM|wIt2U2py&9 zuu@d+JJEC~cJtd8cM3X->ssrwJpsL;Ca_)9w3eQTU_xnsr11>YaS6sH^< zdHHth)YL>4yyfMi{@rzL-QY{OUP?bP?kzag2g}&IKSFI5Qq2`OrU*|uiK*QwT1blQ zfw70m-^Js;@97mQ^=9O|hT;V2`E5)6Lc(!Q)@1hhHxw|g2Cyrfhw9L-kr9$*9&zy? znV>2_Nc!R9eOsSNFdS*w`D=3Mmp%^ffO4>@PVOodo}s2jn<5(jX^x60D*6bc-9V8_ z_)4UF)%vCA9@{vciBq@?22QLX2#ex4{p`e2yEAxXMH!uJ-_goQ zbW>8L%;1-djeBV@n!NiVn|4N+;LgVwG?^P5L?q8OMeTb8eSs35TVEW%uCP<|JDQ{u z2mhsy-XUn#0T2_!COPSq!IwH$&p4+up5T6Jm$zYH9XdLtND4LBo%f=Ek}>H8IcL>K z-X+I(oaJdBHeMNsRnN1r>K|$v2(M&j5Xp^Id~lvoUEEK;>*nc31(z{2U!&M%T6JL_ z26apwLLf7tlO=FYS9@s3OpE91>LY=V1#z#pEdTpkO`jlA3m|pY(V;F9V_QuPtFF0q zmRhUDq47ivaX6$5pP)sBF(*ZaW@^>?Q5qae#7>=%a5lYEbajCDEyt?^I}~w60V(ra33j*ci^tic{>4sA_1on0yHN zeYbzrCUz#IWi|{wteQTHol5M2A8y*jDnK^^B>c z&F#5QYvXhNvDp>XC_xrqo(Dg)sxR)jUgn7BUMfDLXY(6 z^8VU~ns^%Ty;s`sk)iMzrtrV9?B|3slUYu0#GWitbLWX1z^1A&)w+H$nVQ+OCPm$@cU?p*6UkN8TWJieb zxxk)40OKnqgMcG2r4|Fd z*)YN1kSnUjOhp4>AFgq@48tl`25WQ5Tn~MuxMf=4(D$rO#O2UZTKmaGoRc0Yvt>1G zd>T@==ghPMpop&H8NWRcs-s*Rf>2^49-IpsJiF2<@lzY$DOOxhCnLl58bEJB>qnuK zYLww{g-csbf<0`N2AXXg#1VgX3`0*I-|;7;;f<*$hN)F{R#sN!0`bX(;<%35)6&DD zdFif|Qkg?ZUV4u@M*?=J+Tv9fQQGp6^FV9jSTt5NQ3bsc3B>2B%fVv4tYCV*_%N5o z2mmKgIO64 z{RQY2MvPO6Fe!=g0!EelKK>aUQWi@8ZjM^y(h1=*T+;E(osv0$3x{S-E{|A04@JN= zTzz?r>78`4w}m|AAKv~%SX>h9a=gb(|9EaUe33s#kLah5;}?C4FVl(lW5<%{nX5@e zgN53^6@&eMHeChObXCN$L4$yed-<$lH!Mdb=#?Sw_g;F;h3ha(qJ70xYbjfd9;(zw zcigo)Br+g{5UiM)8@2S}y{Ob6u6ng7%s~6WCm@-5W!LU$JXXjM=4d5`p{Dp#E9H@J zW^nIB-IjFz%Yd<|A6#xM9B4kv{z1AYPZ6Dah_iS(2Lr-v$tEy#ZfH_x-_0$Aov$D_ zfZP#eM*%E=C|F$8FIX$Y%P|RtLs|3wkdgZKJMwhVpr#Wokei!d%$gRffnmIv6 z^7__&ghxp*tW?0~OxYOGqEbQGCMgw^BUIwjN_tUU4cX@}izpWqNc@0U)_VBKWMpYo z!IA)kwOFL+`?fi)C$0~wO3;i1N^Mm$>ORko33sLZa*`ZlhmKSKFmdZpUQk*XWycA@ z9RWyDcpuG%ETADl$VRM~e3h>kd!Hr2KR54`D%GolkxC7Ok^`yl6`8Vz830L$)h+K- zGD;Pe6L#EMJTLL!$2PS8iLWRt9eG;$<`(MUAuLY1j+)d|sEEXi?uRBO?m%!ilvldS zBR^H>%U`}*6P3z;7N-&3f%)X?+WvwTB=S<)W5u;3c^@D$#)Y_mN{VZ7!7>!+NIjrc z!GM*gp-4al&f-md7CBi$igx9Y&l3M=yiy>MMoER)o>+-;{ckVh<{HmU>cO#`Rs)p9 zzX;ld^Wd)%?(mk*qqgz7yUU933r=Z%(G69|xkEI=y-*>s!mdoD);~w-qTod825%JR z_}`MG*m;ukMW%Y}Su)PQVZn=7bG(`+rRvn>-R5vF`nxa|)ro1Kn^8fh%++Orkt7u) zY9%A;m=6R{$0OJS+3FV#BMh0b(_({F0W7i$@@~WA<2A^I@r@J^*ud~PoPhu1fWw08I z3k-@c#ctaY0xvee8+LpmPwY`>5tSi1P#X*DeTsE{4=EhyIYR#Q{EJ3(yhbKp21S>g zedK?QX`?5H!ahrU!L1}+0+K}nKB_C-=cu-*Iq`Df3GqOq8zmOk8=w)NEr1Fa8yH|L z04o`QUWZA0_pXrE3NuWg$~uN>n&6y}EuxWOcG=(T#)7AkOll67l%ZJ{s;pui+~Z%g zNYu616xGn3x6(oB5SFpxd{ea>)&{==su~qSt0Auesn|9u)NhoNp<|$OU@J8z2FAA@ zom{#rO@_&l%R#6293V@N`|Ovz>s*bdJRl(R5BB$anWb+Nzl_}P0^?u{M>>;(yxmqR zVjL&p-Z9K+TNi~vrUtBNc2sC{&|jOecwpqD(X+fph^&b&-fWo@;P*{DmQT;Iz%e)j zW6;tXL>`OHoZLn80{K})@BtX>9K36R5V#xxuPJr0X9<*mUPn|g6`cD!7RJ|p#RPgT5f?{R$$NZ3o^ZfWhBRp7v8Jqm6WmrtwI@s zjIKWD_y(YCqN}|^j8#$9WxD3T-P`j znL}kpJNcKdjEXWtCM=l8ohz+^7vgygJ<1sFY!`wXDMra5-qegga(r@TwsVICnUPDb zxE_yXEN1Ax_z&~4aZgp`{Mme+cTl!r$)8@|djyp9@aHcaroM=iy?n|b>s&X5`nNs* zrYIWxI-_agBYwlb4g+~%PT$1%j3ql*Dy(WkeOUwTqI?iJ!oPJ-uJLG>iLi8jsnBZ( zmUj507@RtKwpC$#drJcNSpl_-I2AC_3Ptd-Fufm^YXunwP)*ERut~;fd?}a_$VNlk zJ7fcREYqkyAy0oph0!ONn*<8LX8c2LmGl0sh9GRb=am7FFo1J;Aj2Bz>~P#+)IV

c^Ex9PfU$87%k<}vTTqRYq$hSs;QfU0Zb()v)r8~vJ{&~M1nd`EXwAJU^8>+!sj!1xt|h;${Dnq?694^?PDyn8_j-S7^&(QYKOEyGtO*s{`q| z*I}P3C8tnO5*Aqg7k6I)9A}bbEoNr2m>F8k%ofWQlf}#o7PEyGTg+rJv&FKQnaN^i z{q4EC-I?{=M(oYS-NoP05mL80`g`@NGGAt?zD!`@ZBw%_$*F95F;Mw<(KGSnA8qMu zoLHTrSy-+rE7hQ$;w&?bk}o7QP2cH#`eR#LU$0kF^LOQ^E9S6X`ntM@QC zn>eP0%i9cjaHz)OvOtBo8{eX5hvP=zRhuiCYcie+lRTJ6ig%GvI^CoF7AD9v(bT?` z2;APf4qF)RAsULgb*8;f299LVB zDTGmgljAmQvG^bp+}`3jS7c>2D0nYRMT){IG1;xFdra8>eZ$zy~t zLNn-L?eU44xr2sQB2Dn@3gdldlx9Q4dQ$w<0`rl{P$D}=U^vmUZZ-0RMS~5JpSr9t zi{Qjg?l!JDh+_K``z{tXG*t~~<%z6fpO@RrAq_;MXZJn0r(JA&-}j-nkagBFWZnTi zKVt?3A}lFjNNI&9t6uaZgAz}})V*XbP#bF~PLHNN`2|y2_qw`TwtWm3;z>B*SYqzc zpIpsk$FDYji&Zlx?>4BZybIrc<{>wS_du}+gQ|^py8%6QZas@Z9bnMF&vHUnYu)#O z4&XH1X30vXnB~T^p(h#Wr`^-Pl^Ux{zoVOGE>)Ax0kMBm!mW`_DtwfFPR9CpCOta) zmX$=|Dh7SwZ4~c5FvNy6UT^M+l9@N>hJ}p%>S;>bvimlbxxOn>&2ydWV>Q$uvZZEm zW(1X)5!dyWVw;r5B4L+YB$0}6xR8)jOZ+lCC$F_ zI-;makDCphdS37bgd*6U=V#JT(j)*>F^_N zA0g8z3G>!JO8|0djKOV3L$wY;kKHemmjQebbBr5!oNwZZWNKIoHh74!17o+(1}wmC zWS05BOJl)4cskVG0wFMMd~Gfg+{(LeJh2yvK$@wR6aNSros;B2ZHwBY9`z%mT1^AT z&YxiJ$1|aIC}J`!4Hi{C*)`7FusWGIa?`e6yZwPLcaj_VxIGKST|H9lqG{U*VY{HV zk&+lmi#(14d`A#nwDI>|N~P)#h+IfZ6qD%19VR7p{X#J#;tV*6EZS2>y_p+`*_BFo z($~!;G@$H#bdq7I`h9>t1ZkTR4{Wtrye3H!TjvYeM7ppH!$7_VEbD<^;&Ci^j^aB?Ne-NbXm#z_creqSq3S(4GnbvP?OO z&2u)}$q;uq6cx+^r@;lUyTUplKkz`J#C%{J*-exvTTu0K`7F$^U_&n3T$lP>$O;Lw zhZ=;Nl;-=u^NA?UU2;G|oK*+~?-j$MVx1kkO6*5!)b3}U8QP%kawR1zw*l~_XkH!6 zD;OomR_O@~T0DuB`SDxA@nBME!*^JQ@qUej`BKUj-X+r@8Lc|s#XF81h|nIaL=0@R z^-Yo^u(9bGh8?aE9L^<$ju+M5S(xQvaG#cRyDCo9_sWGc zyecNPE+!TGWHSnGA~}Mn#nOPPJDXD`t*`*(tWKnrker}h0TLJxG1TLZgUJ-kK}ip1 zg({a%bHEh8G4<_)A`{%o%&GXFp85TYIbH>kKAsy%y& z7QRiS79(4I1L8C1QF>G-awV;#h9Vi|g;zG#W}%q`kGcK2j5)LR&1v=RR9 zZP8!-1cdP=mUxPl9a7*fE=^ci9qf5^RIwCN!|AIMwL^;21TE^fsj${=cL4{dy(!@tX^5M6)OE5Soc zl_XRs-m-Ri8*zPI2ece7pcQB;t=6_lGTm;@kt|=gh}pBs#3~aS%zBi-Vu}zT1zRke z;_D%Lb+%C_bhcKJEihAau5x0wu@v#HvMiMLMrzYH$DvytAV{#Xt4iN;a3`HO<3X_c z`*)f(L>oLGLNMzpg3ANuf@Zf%zlgn}m(23FJ)&ARHd6bDw$e{DQ@W8?7K;+5DVdym zDsPg^GJR8uAA!X@iJSW{PHP9EiBCM%n~QAL3=CdRn zgXNvcQCjp+oYHB7^H8Ps_=Z>UZVR3KFo(N_^1DtYWj#(ubJ0t6Rph>b>5+mOF$?9= zb4)Hx$_jmQ7lxe!!Ml(n{ML>4qcRFjF&crA!z=U5x?Xs9WJOPeo zk?TP6IL{@L0qXsY;3KF^Zpla*HE=7&wTMLuvKBP$`w|$f=}D)6|GP<_+ndOUS|46+ z>~!5AN`EA8Ap(2k?VY$>NYDPLVj=j=YFc9_=Bm++L6Gel)o?%E1X-gT1?M7rTv8P3 zu#cj7Tvw>}VlD%pos?RnmF4(izA=I@dQKL|v(hOQ*-c!HWn@fFgSjIw)SQB2N<@ zLWE)|G)nrmA6}+ex?A^+GOkPGj07amn>4!AK33;gzYd_ z`9ShY-|%{3st)a#UlY-!uva!};{8w~2xs^^$gKB7cpn@G;j(l*$I)90o3{LJKUJVn zemIX% zawt2o24m3tOP-r;JR5F|#kT~a%?o1G9x|x#d3SWZyzj;?xk&1@99JvfQr?`1xd&^I zQChSW=HQ1SX!W*Yr0_R=Y{SYUERgDpLrIzbQrqHE05=#wA4*QSq&?&t{2ms)rg(8wF4hpdn?&0YimF>t*eCfz*u&~{ivl@X$|45$YrbGAGu$XmFfl@QMqinm zfv`BtAnQUXMzK-9Gv&fkWzO&i>upo0TD*qr0)9AX_gCQBE!`-xhA@1vT4ES`ucP#W ztI>Z|S^QKMNt7Ych~2yL*`fSA%AT(!FD@E&+%p|dN=JCy1}Wupe3G1S4byA zh}{)})9^+*iZhOIH1a3CkU?sSK58rz53vU>)0MzyAhwty8K}@zCo2JL z#_=bzk9VJG6cHR=^hL9lyn(sClhbGXUidRFDvm*n<`l0LVxqf^8VWe=M-L5y$XV$wH znoSc>Qld&B(3(si=MtT+Wc09VMlKEBzH7EczUx_RDhqKOnQ%gN$IfcaEEjj%yntJi zBtkJAG&(PtG)Nnt`FXT;qwoGg-B`>uT_b(}y4WM^X+Tq|WJ=^ARZc@GS*>F2+_XiBFK66Gj%vDprU;YfF7K{S>4 z!gqUS)prprT%fX3p=X>LT?N#PY})D5<8 z7w06Y3w6iAR|PPMm6-zrIq7EoF}jWXJ13-~iaPoSTB3_(e7;O-h)9W;lY=96`((OA zOf&$u#5Rs#yeVm2LK#ct03O;+C*+`SX0r)JvMt5VZZHRIt*i=;!D=%M zo*5z<-)QKfi^Y27VfACZ!?rKL9F;7|$SfC<#$_$kd*78{&}S}yt1mQ;f1)<=i-6|V zF(j%(4^Kt3|Gbo7j~%8zWYz0D8-_fsU%Y{@o*H7kau%3FW#-K_)Jk9JA?;DKttn;? zR|Qh*EEqCO>yX8hw2+9Qc9di#w8rF7H>i0BQH+57;ahy7@Qg~Dry7U=!4t8g+MC#F zI&HOLTVT!LM`y%0BH9Z9P*EkZi)5VJu$l+1A36r#i@$OxG~GQ&!)63g3&8m#?)zl5 zq{?w0Hc=)vf~IQddyE2R)Gi*h6viLy1`6J{$G}@hsOm;)M~kG&sb@UV8}u*X8iSrk z4WNm*v4z(SIpQvr&Fr1|sZ}?7Y}Arh+81t?cqE{(eA#i+9>Pr&pKF;MLgiCS>VrpL zFlWX%i7Lp=#Km&A~CtG`6L(x;3f|8ZsnAMJ@*ubp3B7*pf@||8RNR)tt|D>Mb)jrEYv!%bn znaq(V3DZ!T{ib!&8h5Fw!8MpW;^XISJ8fQ^_y`12em{sc$8I&SW4o1WSaqV2yCyjI zVzX>KV>V4TW|nCTmsD=JUPWWKP9L=s8f2#LX8SSx1fpWNf}%fq)WBN#9gK_5!h(BZ z{pYpT8E9nO*TW#}Xa{oBSlj$uY4;KcC zkdc{V*iBPrA+?x^AaBfX=BFEyjlRhwXMp9?W*DeM4$!D9ROPp4vXCOWV^|p9Y7MgJ z>*(6S%nC-_>U#Kd_T`e=s0443HqG_3oyVShOcX(Hf(?=zB~_KFn7=ZPR&>+Q(;eBd zV>!c}oaayD6TycP%sq(LJVHRt7d=Wd|Gv;*iv}032H*d=5_0_W`=(4WTO#XkC;VC0 z8+b}~qTJUJtW-W&k%DNL#a{)`be^-&O+KB5Hw(B`X{N{IHPVKI%)~vqKdo(EpYI>Y ztWcHJQFgv9#4>Wf%2sO26O$*=%c*CD{5+`032McaFket6*@PAcPBg(o#0EEY#ljoE zOjnZ(cc0x+d^cq`tXr@ij{(O%l|`MC$vRZ@MkZ8`(uUmh;1iH?bo1iiQnRU4z6gIz zg-~mVv^b-EUXfy&vYe8knTNsF;;5~#?L4cQMmj>^0?(b~l7#G=zSovu87VJN$6#_w zNf(d1Fv>YmG_hCfK|VKf29^GTETE|^^2zKuSe}e_bO!?z2j{#xuc$!acywY$^f467 zu7JETT-so~pk9RBkLWv@HDT4m`)`HB;u}{a`QIxqrSlW=K#qIRYbmJa1Jm9`)*0<& zdmmm{Tf}yka&I0aSgvk5Pf$;A#(&+GQM)GFW^Od1Sj_eNnD zg-Rf_RyO^zaec0saW)5-*}&)7BQI4$5EY_gcO-ybWd)WTI%DDcoKHgtJTk-ucDVt| zJT~5(Y_7FBu*QO+I(j+5%&~D`8M?Z_4gq(FT^Y}#HoWWzbD%5{jRAuNo4{x$kmdZ5 zAJs`*7%XRR|CS~!gEmo-#YV&7ohU~GK61RFiUv-HfidJa`TW{If}?X>U7}A}Izz?7 zKeU%yq~C!N==dvN^lhzJR|UWEF)p4$(1wfY1~G9)cvBf7N_5@~_Ti}2;eE66x8P6} zw?ML zP2?n!5ms18CW|v9@k9F2N@kYGmD0UZDiVEz*{@6%AyHc^NWnGgy|16D#ARre6=A(5 zAWLm@;Cl?-#UIej*wbhxIbltH+%?Dc^yij?z{#WBff%pqSG<8PX?uX62`SFz4W{S} zM8l8{e|ne18Sj4ti+5{k2}jmPw)r)9zHBMG0Q~N~g`<`fQ{!YpbG|OM5@6T{L@q5a z9QACf`+~VRG`*D$6j^Me7<$@(x|?C44Gk(9U)%*1GiV%mJB#Qr<5N*MVcX}#FTrnW z#O`@j1lc4mD|RIbyT!k$eUDm3R9?1X8>2N=HS3Yc-o#(=Hc>D|QwK;9S)$VfCF(7Q zQntXAhURCrkYU!yXFHBxrFR?|e^s@QjR_I=&@0$|THw!MOzQjEj5aW*(JFubD6OwD z)#fucl@b_)>PZjz#+;dWGqk!`l-~h{SPS6R)QB7F*(adN?N{6=9m0iabJsmZ&P)XA zBUDZzoi?=Gsh{oNo_>0m8XXHpZNe=%$x@Q$kVmgz;s2=VoS&Dq9ShTFhO@ISIc?C? zD<^EhZo*1C&O&YsErrqS#sMKMp;=@8h>UMVo$A3+RcDs zkJat2!B>(O8xZTFYdoY;S#J;uJqvx4Sqo> zMAk#&T=ay#5ITU+L*y-lf5Oh;KodeZtgCsV8*f1P4Z||wVb+dqJ%BviT|7M`JkONY z68*e&TIp$6r3^31ih^h95@WKnuZ%&K!AsK$wG<$UA; zK5kF&4sm>e3Gy#vJ#SV|7?pCt=NDqO3LAMMt?~p0MfaEpY!XCDdLn3@v{}AqdPk_| zPQXzrg^I%_sH9Z6S(dWOb**DzRD!LVkLM_3xFokZ*I}dm@TbHp1%$MVNL zYV%b~d17{9gZ#8HBE61A<)#CJTCJ!gMkQ$+3A9&Sy8IF*XcFr|#>}m-(70t%_S<{Y zJ;x)ufH*P)j1#Pk*q`Vr4-<($d$hQx;~t1}c|fWW9Y*+juzHykGsl`o=yGJT3cwy9 z6zR0@MB;cvaCYaM$=`>ls?_gt_2lSRB3bK(C3=KW>W>|bA6>UYs7V9*N*5vqW?+OA zkgS#5sb~_Hw)KTe^?Js3JC|P$rhKbjpH3C}dj-%v)qAMNZuIBI`rax{?e6Hk_7}e1 z5HY?QDj2SgVNmcN33B>A70f#aQjqHj_x@4B4#t%ym!ON{XVX`hXG=+Oh#2Nu-x zxouf{*;05t_=Igl_j-oxd$*+kEL?2b>XX#*G*y@f>MP2`NAUT&@oDEr;ac|POAoM~ zFnm7rsozEe(aYnGE5@g3Wa`M;+tN8A%_(GYgV!HW0$`)U*~*icQwk3xf(Ws%c|>M@ z>Z)IlpEjuX@aqrXYggD#FLByX?PO+8S$@j5eYLyw26R8rWtA9RihAjn&3sR4XiZa_ zMD~67S;hE($+n^8w4sGy-^WeDmV-aoH`?lnfRzG#Q1nGc*tb;&%jji}=9IeV#a$HT zcGy8wq}WC=f93&)i7Xjd0o6!3u_*5x!>*KTcBaw)P2Ggv)Z=kHo+uM(}xJPGM=>rrb>=>a%T5vnfb}VC1LKLze|~jk>ijCknvI!9;tvUhenL?kR6C#18{h&$dMu zcSELK1@pe|-zrae?s|?r&UzNKc;u__!n%PgGB(j6= z>V9vYYnoVnPcpWG|13FBTu&+ZD&Leo)Z4hDb*iLrxhM?~e1=&l+0BeC-zOHEd_JzQ zN^&T5Pa?p+)e@$~dL67-wmv%^yK!Qws;$AehY9boj$7FJ}x`C-BPmk z8eKko9Ox2D|Em48akDi1j-sv4n^K-IRP7!O^`%xY>m)YW_niZEqvr_Z&jF$#p zaZlBbHRdBv&sopLuABOK*3bN(7Tc?yJ2MD9Z4n4LEqZ5hTBnQ}7MFpQnUP7CatrFz z-Zf|{wg}3s4XgX~@zG5TCgeAAzqZE5oXj4(yiNt%Zm*q^$2Da?9j`9udSGz-(iEl$ zcJMXQ2lO7D1o5IjwT#SaDQ)ZS_$G*F!Z7ht$vm5W6LxU!8PyeRLg*>gt#K za=a=`uHm;onmDDG4>N(Mm?!?YL@j-tZP1Lkr>eptm>hd9`)Iy*PP=83y<{e=&in_hk9w%w7onX z4(~L-u&e;W!2BN;|J6r)YI)nlacXEW#(-rFXiAXMC;1;D=4o=9Zo5Zb*jwAldMA5 zni&`mG&;Py+AyU=#XeA;fNBAU-ItO}uO97FE8TuF$F@GRK-6gFo@p*#+gb>`o-q-( zvj$&kUe!_B(sGQ~TiSO8f~#3ME8S@=d*Fi8Yime8_z{jWErC!1_Luy^*CB`{UoZJ^ zbFF<~3WwuaTx8KEPvW~iHBKojtq)yNWXGIc2lMp0lcGGjp^O?uYSjUbffdBh{afxkkMW&3OP}$5+q2_Z?n+kIs@_8!v-JH(O}7Z&R|8q39xM@Qy}0L8qNLKwxjGEL}Z zlxjE9tuJY?>PBOTHrP*U?G|ZlJ_;~nc@#<;xtJ&CQRO(!L;*T85WB?HnrIB-a~QS9 zV8?058G@JD4WSi8JT5g$(#Z#fOGJk!Axpz zRx}iNPhwmMsE-++_)AvGZpzH98<&05mst8F*BX~T0f@TGzS#XJpRUFCdfa(LUS8!{ zLS8<(zX^HSV5wg_p9<-CLiT-)Tks%adT|9kUW2UFQxNj}3Lg~^cbm|eKK?=dSp4-} z6E|yu_l+LO#$3l2gUurhWmP@6rnPBHSsq^G&bgW?p;9OqC(@+S3MG#3w4xy8FSYO4GAcoU@O`i<9HA2^OiM*2aRR zxx95ppDh+uA~lcoXiltNb4ahsXgLF!rL#|mhjV1G67dD5pg)wHW~VYtX>e0gK}dUGO=|SQyBUT4WwYsqAZQJrw& zFidgw+-T^a6@QHl>(5FG#-2Qjo;kFT?Y5gc^j7c5PPHFXD@j+wp4XF`mB@0`J!Y&rzL=F{zU7yGw1)|X3~OJIK`h+uF=am{rAUQh zZ<@kDIj-EX96;=by*p9uI(`#ITQ%882$P(Lh|XibqTIqLG?Q_+c^i8RKR0F%O+{ zp|no!kT(X;7((d&V$34cO>s;6I7+?nWzSf-qkd{YxlV&B5gnwWq5@gt4S(UT08O(L zvi5c4P(ZXpl7=20CY|5H1Q%EJ)Tm+Z(^t)RGbN)LH|-43u~ceaYQn_$hr_CmUxtE& zW}?!~YuFForBh>Zb1r_-HZzb^f*)|vv3G6X4G zF{D9bn6Hr;atWs*dKeX*5iG7YEVEQn5%DG~CQL<7d~GDPaiFTOEpE$;Mp|Rr zk*$kyqI__2w6vBrD^79#R%g5nt=_V1Sh;X$M;t&S)4No{E{r*CMZ|@_Gkj!?2QqIc zf9n1|?Qh@qhm7gKdzXI-~E z{h{;^d{%01X*p1b;xZbIVl=hl&i96pjVQWGy|9l^$2^|uu~lh zfS318%Tdy~KEi{jo90Z}JgA#Ugkl7=6LGi4ze~pyWZNS(RBu||MHoQJQ>+o_1mmu3N}k| znc>YGzl#e;NsV&}bQgT@?U6$>#Jh$>hZiXwanr*D5fm!5*S+EVQB7-ae| z(1&}HYEjY#y3Z+DL=g!*;brOVG7vQGhWQM0;ce(7ZZO(_g zoF1-2dgS2XsPn)B5?XIhUF5O>o&S*iwWlY)jLaBMj=Ra-Xx8U$KA9_KVT^j_TEXV6 zJRs2{TSWTn*2vR)8+ar8N?HLTay!G6`RY!HfOzk zsCNnkQ~^7^G1!P0j*1Z(3P~^~n)e^pQk#a645LQdt+C=*j=&VC9t&{m^H3T4_1A(L zbgWW#^1Nk+TAYj=HU`@*LxmFrZ*l=>wImz=$8^|2$+WB#N$nzJ4HGxMfD|J?KP^D=9FQ5 z^rP)0DBk(B7~Hq@i17teYE+|5w+Z#ZZ&h=iu#fOp;8u#O{YKl_#Hl8#&3Ij^PrJq^ z`&n^QN81gq_O0nAu$bm=hblJg51=1Ulr!p975Ln4?%S z`S?T`ao*7KD~TB9hp+=XL?7mN^;(NE8!2AS)N+|_X@GH2BBS?O?}%syn@7+rk)}yC z><*4ZT|pL3Q9X+&)cas$ZzRchV%`;UwT=J}VtkBImml4@yeP&=RFv0l?z}MW%wats zU6*??Tal-&ho?yPI;}zotB@YuMr}Q^#*))EBHga2gw`65a6-P2ee$Xrgy-Aj3dMk@3?tymU9BZIpz|T_lK} zgP4o6e7GuseH~Wv{LAN>_>U1*isJaM#;qwWA(Cu$s#afZJ?E;o1`xqdU*LSZa<0{h z0*LhtiJQoio?c1Ha>$i$ZjR(wJzQi1CNtCyus$ei6awh-2AaGca%c zA-ASvH<8zl_b$VHWDnBi(~?wKpoVMmgW32*&j|hwt0q!OS*#%#?WZ&gSaPD&sBVVz z68Wo7R@MqNuHt!fN9vnjASpwlP&}8fiW=B#pZ)ebi}yfle2d-eVW5 zYHBE65I`oVG0KBR_db4Hj51E>Q(Chj*QT9oACQsB@N9)^#n`XNmd6FLu#9u9?90hjcpdInK$a5aLMtp;MGtgUfN3Bw!uAh(6uE(qlU=a3hjGpOp_%II+e;8<8lvO^-QXRYyel zf_Y2bZMouj1-4~U!~jB@Iv_G;i#^1Fv^8Bn>XdRw-9Ni^^#k#xTCNP#MM;x^l{_Gl zh*Krlz)FTKQob$te5>A$ITVpGVBW7zfu{z4ZHY}inlANJwgTx>T4~CROD!=lbkeG^ z6x?&34yU1I*y#;AKbYoY&veo?bweThgm<`mGE>xN;*;BKQdnak zU#Mj=p(uPEEC_IJUjO0T%sq9+TdQh=Q$7KTWUC zK#lwLsKw+?v$L7G!LQD5|G7WtEzw)k&*(%em%Cl9j_Ehj}6RvIm1h%nr=fe-cc z9@NS3A4|Zhqg%x1Spq`B;6vJ1l$%DHjOv}PLPRUGR|=K_ z-q}BR_x(c+!V|0VU|wJ+nuKuo*|)DH`V#TZebI7^*vSTztV{w6<&Y@2tT;nOG?=5? zKR({0G_8Qm&K$?{9ktg}l_h9gc&wFxJ<68Om6cY$T1{CL*Xe$_;YsnhXij_3*8GxM zdH5-~|C?ElwIR(5C?|BOm`q#CDXWR!!G3RIY?r1tp{X4go78r|V`#Z@7q8#giFYQjixfhXc;>Fi$OEmx3cbW_$xj(`_;1|n0cmwes75Kz#Uij1z*&( z5K>VPrGlzG81>^|V9Ii4F0jLy3{EAnzFVZy4Dq%dd(T~SbT3j0{wQC%P*!f+Wi?|_ zTAzuu;S9!~uj9Ooy4_|@+kQAcw@xg!2Zc}k9lB7KaL*X#CLtw~$(OA{DgHZ5UAIa3 zETid+$-(Nwce3D2w3u|pBCy{eQiZN}chx2xS8P)14J-1@e?+mk4;eGk$V3_F!-S+w7q_XzA zdT!ar1kX5&=K5L;6jl4csT8eqD%Vx#WOH6M^orhA5y-EWmTOmn|^%s&x5Z2*Q$H%h&)EOW~w z@9NV&++)OhZ4p?4%9qSA7dCm0d1>BrhEtwhxJhx=WU-5qy zz10u``4l>zM-|_u{)r^wy<#A}L|JtN!g8rLO)y4_YJ?1%L}<)McHUBY469_?_X7PK zFtORM8v;F{JIns&sQGUDNVwq#w4xgcgYaWntf~PDRO;nL7%7^e<6sPD(egb{enD6a zF=AzJo({KcpJtpY`{^mv&}s?YJ>TR}Bq;0j634R$xHy$Tk<;fI#_!FlO0mUH7GMkr zp`Io}Ygi_Sc(99l#C6YrWFHZn5_Z}Xh1pOnx7#ePmnRqGJ{$+V@$4Bpzbes`Y`IP< zg?)2;;%TJdLr|h=0g7*>nvbQMB#H~C7fz_q(ANf!PfA6*d_u^UA-jgDM9GG^=Ml58 zsL^@1V?v$V`8{v8lyeI|aXHcnV8XUHbM*Zz#GeBiH+)&!yx7aJ8FX|v9sJu)ODd1s zYdSn~Uw~DgdId~(&6En3z4kYYaBWnKS&qU&RSc|j;9GE?Y~>hw0}w8jJxm_*RDEzV zrc^%H9;1^C<>47PddRpIhJ?NyL;h;$oho z0DI_4I@mhf{k@OwZ!dpqqpRv*VB=`_vk$J3I~Ko-x${R9w9H+Em~;1shk?+v1fU+ll&*~-x5yl#uvdYG{R9%+nq_rW8Lr3OJV-1lO=Fn%O;4k34N3YU zrG`b+C>i(7+pr_CTdpiAJcH%4(V!uA`Grh4q${4T$y^31*_6@)&qs+IBoZP~T45?1 z3PM$w{De=urVDW}L8G(N91XNOHrXudos(I2GWMTzJunl*?KBtWA51?xLHd*L3)Mfc zo17qhQ7Ue_%MQyGbU*CR{su?J1f|cgT&Y8a9!f0f%c+Li2&Jf1*wp$4upw;z2w~u7 zQAaI?CWl3eDYX>0Tqo23CVO?nwNc;vo;`Kt^RPwXM9hsyZhG^G9PM$ivHh18N|u`L zAZ8WE?I}7IoCmtw$tqTTrQ~K5}MtJsaOH86fu(Z zn0inHJ3XJi&iWB-=4g`2&5|mH3N-%&Jj(qbWj%+|4_DFnBhV$O?uxoKv(a5|6RT`` z4h<*9kHjZtSvTm9x836BAxe`0R!v*5#a+k#-cvWLog4FIQMwfC;AgS<3TJi zETcmGOhyL2LP;HwpWIX?+P-1S@4AhV-+b2g0vpzt8}|2U{EmbI(O_9G)HLhz@&4iM z3OLcCYu~eaoqX+6clR0s%TN}|DWoRE&zN0yK9Tsy8T;k z?Vq;(v%mI#tF5!J{lV7dqj-_Jg%HF%GrOJ1BRhUv!zzpRfTHAq(QLe+;pc<284C1{ zz$Nr9)AGcHL6`FI#9PoY)RK-yere=i=Kvn0ML}b7B&0xo*|hyJP2C)bzp6*v=$LWN zyacwlV0RC~Qd8uBByaU?g5mvmdI_n+6Mmv>#PbVxm+={7=`}gbpYZ=n$NT>|{{Ps0 zo{gOt_+%#jrThGU*$K-T+n73;5wo%V-QE6dybipCIj4ayttSx z+@CPS3H7nja}52uLjOx@^zTFfezz9?QzCx;;Wtwtb})uB`7=Ja z{*e!HHz!FICj%#Apd`v0I9mQ)D1W~CO(%t|?92>+TobeXWK$WANmZGc<>%7-x7q%W zZt2{A>8pSFKEThx{I5(MaHuR?#K7logOz0CA_hMH{daC+wx8n!j{F}C06_d(Q6hmz z3ZN+cY9auZ|1F;X(TTHgaT5bL{@cAcH}~(!a#rAdD=Lg|7`_ZWoe*@2Qw91W4h zl)iLY&!8`$&>5{S;ku!=pV(VhNV=`M^7#Z@2_4KUT0wao38kBJu?-WX!*dQbsZ$Aj zOrBC4rpJyqF`l>N?MI?oM+-!-~ooL@d56 z?3f;z$-l|ncp>dtuU{wVmq^Oje^kUAJ~2QCR55I)nCrPFNZ(Z z-#j_FE~mh-?Ees8&K{ruOK74<|A{C0B_*$;!sa&cY4g z1b$k~*wKlY$-x+SqScAP(b?MCzyY}Pp#t3aFmh7-xe?+-%)$(OumZ!Ie-G;bzl3%F zGCCF(ZbmL{ZdNuHVh%2LM&NC1?3}*?$idCY$jZ&a{*U;K-HeT#oy=W~{~1zXdhj1e z*?$Qb{}NIT03#a8@jUB-L2ZU@u zjsXC`F9>a2j2&Feja?ZGoIjWYSE`Y%-JhZbhQWX1^A|n-OK6!{7}+>kS=fHhCkv2c z4p!!$5$Ycd$-vIe!PdaYjKRR>1B11(lbP)YU{3lgw?L=yH?+S<5iQ$quwH zwm(qI&JCoSlbiGJVE>7^bNvq3FADWnfC0D}IXKuken02z92|_?%q%Rw7?Fv&%?ERv zpV|Dc%mE|#zcKfV&i%^(f9H?bS-BWFxY&S>^Y0Fm9l*@U!O8YBS^vW{|2seib&{T?RJt8#ENbNu4h|A3R_&u{{RnZM!u>*Dh} zIssf9jGQc79KVAJ;N}8C=laFF{{bcIpP~Gn2(kZl5&FBi063T#0YKt@Kj#2WAi=C0 z%)gKcv~8den!EiOz~5;P$6wc;-vI==MOF^hKLTWD0fOdY`DImpFn2VvGBCF`cK9=h zzY`pe-wDn?i*49A+5V7f9cycS(r!TX$<(v|0{;GU5wAW(=$!p{2#CA^vG>|6Z1@6} z{Hx&jr^zNo(_mh<3fCHqX{aOa1hH5Q+Z?B861}C&!Oc^AGD2Cqf@aNOr&qhX+mA~$ z+ZNg~_7@YB=+t`$4IM;2FD4IE9&THqUT+Z--Q42K$y5yCA_wK4ZkYt-p8IV(2v%R# z3-w+CU_(Vx9S~Ia?5Cay;>p!oGrMP7sPM|g zW!YK?qB(vrwMJR1xX;ivzwR9vGxwQVD{fe8xPNt1&YotD`fK8O1!$G8 z5W&^*=u05%LGwLX$Pg&*dRa|Avr6dJW#}(EtFc+_d^ZrGUAb6IY7vvV5qyAPWjPXhGH^8TwRttyISn#tz>YXJ%>SMx&4vZtLtEjcQ6ck}=-*e%_^9rg*Tn)_M&w zxI$H6oG~;EKII8V1(v4Wt_%?yT<;2@2?kli2isDZO~dfE2lGf653L(og$%aA85M;L z*30CA;8KX8Y@*SMmx+$|93%-B3w1EJV`L*M)snW13`g>^CS-NNR+0}Da5J#6=RmP7 z2};Vb)D+eIsfdE9nrb?gy$WNh(|VeuhO-`F(ZaaZd=Uj^3L0I|SRKDinLk0hb2^HL}Uv z$Omu^$49gda`k;4O$Im6ri#5OCFrV^vqZ${$%o9NI(1hL%yIH3G8MO5G+ z)^9{P5%#jddXA94EDw?x#&4-=u&RNvE_Hg)NuwzWw|CkRdJIjY^KyUPT{qf_xOLcw zOA-Ykbiquaz_sMEJq%!aq<#}qt56sx&aygS)#V zxO;GScXxO9;O-I#7TiK`cfL32nQyu~-TmL5+jnN_`)}2O;?$`+o4vNIb=LFj_27-& zL5gJ)Qc4M21QXX)^Iha5?}Rx9`@DQ8ghtK5rwO+5(B@hANVve+S!xp(bWkXJ;w{{H zL2J!8nzS6`9hpyXqcl2+#)tMsPRTNTgV{gMm&DJKqAuCHG=;5D(9opw(iRMlm0$`t z1`O5T>ulGSp8Z;t({k8&a86@M-0{Pg=q#O;*EnJm$P$VNiULj3si&)>f|RVUX(lsC zJ@{%eJIkR`&XVKW)KWs0akS;UKR-Lv69v{1WKJ;-B~M8#qj$4ePlBf>aAI2}5LWq2 zRooy^KcKIHEUz?E)G3~b-?BIiB$dx2MJ&q=$dD*sxcQWD#{>cy*=+otUNfs`@xhFi zdy)RH)yw#rL*Ro;(O{3Q!7)~;nCqJ>d9yuPUyaMrg)=_@_IkJYKd|w~dK5aJNczWV zyw5YF4=n0~qE*kdd=9W(4M(Cxs?5eYC(i=cGKKL&P*(ys^wPVpnUgJG%MC~spmMT$6!c8{o3}b zZv5@G{_?c{&Gkj?COy7H##;ud#iT|r_Ubf>71dIIyrM|90$XyVGS|a;9q(oYv2ISi zyl}_0s_AXeQxh_(7>>PNz#h6FmAMJh8@g@dEgpMVXU!XF8ZIrxk-N;T43o6oOCJpT zyRWg3A9OJDKIQ>Tu)dNdTw_wYMMq461R`yS!Wh5c zWr6FXxWUZU6(?d~aZNyu65kP=?@fpd6eK~?MgMxpYtg?(T=x}3_TGcYW?M`~j|W0a zQ^fT%nrj0GpRX&CUI|4lY%ZmAt1C0iyHKS%^23qaCXDj9$cspwudn zBB;k_wn|YNahneoqnS1SHdRc>B%R(6L4qI|HkY}B`X)kt2FK}zXju2K()hz0Up9th zaaX2|)3ftqN*D|e%}w4InmiV!Hy~KMlSjZ=bEk1AwA>PCjaq#)zZ%84SezE*l9%6U zyn&g;B&zdkru_UermZBH(FFbCVyXwgUb)VkUi!|&L@GB<&0=TcN>Z!DUu>AoCw^vc zKC>Qg4<;N%m5K?I@$JWnw%#hpJJ9NARL115v z$IAKzyMoOsI;3tHT`QJ0Z%BBOzyc=*_tw5~1i-e?mBw>?M$4Jxa0+1X;$5pJxY%HT zf>emCVK{P~e`RB6%=A-*)9KCQu$w69ns_;ebpmE}B(-Ha@IYuy!mDs2MsZG4!7gksQ5-6P3$}i;KDDXr4x4RlZMDq=#bEgwd|PX>w4x3K}8O z$CpIu4x$8#RtuI<;T4GurX&vozm3vLcl#N?)sM=*3_=BWd);v#z=BjdLXc1?f`bXV zM=0&ozkAJf?~+e5%aXuHWTtr$Uy%!jd+p}SnmMhW!uB%hS#C1h$%4y%AyMDTU8yD2i}z;!M~deSt;_Hqr{|IU6VfuVUO_+fik% zX)=n0sY*M;YGa8mr{N&+VjLV}dQ)n*KPshEbndwJ zsv1-2wpsl}H8lWV=LK|0=4V~l#X@lE`JP&`7yy%w)*%Lic+yJK8|Wi?J6OpaGvV=a zie(+M1lyv4v?PY{$MMVbNdfmB`kvr$0Pl&sx^h=+k0L{04-2)V>O_>^`pIy@oMK=* z#)J_#SXrDdv_rfu3tJ(^l7$zi8CgCrl4=CyDKz<;b&Ipw3DR;OR?z24J>dKmRo+cV ziCMb$NrBUOZEv_iX~-qu35lOQ*9g>U0jC4;E=6{JYoxm-M!w>a>S2v8o8zleYDXja z28x_I<~jQHwUujH^o3#G(CHV_w}z%hK4j$Z{*|v-CBV$m80%%lT&#hmp8WFMZuDj)&L~j zA%zsIp_6c?x!EYF3c*!?Ls1qF?xMgKBGuRNQqtBBAUs(KqY$>?(MdYX03AuE&j4ME zSgYbudg1WIu%;Uk^pcIM4q+#rDWLY1&8aht|Sjd%43*2e5oSJL02|%bs8TTwu!{5A-YLj$8AG(EWvAn0< z81I_xrKoi=>b-4#TuJ<5H!kt9gTbLyrDIkAtU9Za6K|0i)ePjAIDi@l8yp^b^SH*{ zpCF`E@*^DSi_oGZdIzb}dAL$|tf}UD1IAqTkGlz8aBEvvHTU3=!KNh?q&m~ZAKEAj zjg?gN8~FJg8C5TvnP^7p>WZ6k-d#ehYC(&7M!@+Wl#gZm+-#xN+mIC$4Jc<_ylk8V zr+0;Fq3z_|x{ggLWYvONC5rRc0U2NCfSDuRG|x7tU`gIAHs2gCX#ucPbp-WQn$_ff z%>q*jzAh57>j#w{C9A9^7#0M|ElKaA8t4q!o_2``od?JwTcay3>~--SGluG@mTmkFOk34g}kw@w{GlO*kcb-%)96 zoG#A07+d>zbT1*N;qI`VngRZGRQ9HPA|-XMll2Ffx~2}!tFg~-;%ChpL}>2W zFPtQ+JsC+8Ym}R9er1Qy(R6! zhKgK`Zp%-z)B{cARX1F3R5UjP($SVhxi>Ge*S=cpr#!;a7e9=C%U;<2#KHSpni}}A z{BL3l{2Imn2FLwVM2|oEC}(8`W<&maw8M-T0ck_Im-0KtF>H*K<2>3CbVp;_{YL`O z)<35mS~;aRWI$DPjN^~HU7tN%A5V@Qc_1+AHL&ln8@<@k;qYK7#`7E}+M@6M((m_T zHmonzJ}YWc1^rVfN?^p=POg^$j3cWabpf<4HIHS#dMsvGG+Iv5GQh{|Exj5bFEEOn zB8Fb?TqsLSG*^)XD@RHn+eA~u2dDrb2rHU>S){?+o#o^E=9z$&70a!1Zw2n>w~;xy zr~tY3iqd7vfLAvo^NCr2kjqP%S35FMxgYS8|qK1F%$LWH#9X#QIDf-n82jcF_v-7YkWiZ0cMDZt<22q zfpLx47;Za}jpo91Wa%Ymj-2g@0LmMW(~l7XL1UforyI3L71 zpjL^+Gn^-Tc-ar(^;5mVwfnjrJ!w6#@K5ryU4rP6M^4g3_i380!Q*Sn6CfU}QeF~3 zTYNI}vMDmb~hbz zd8K|_{9_bL`~f~}^@@&G#r5*5W9FI`r-k~b4;Kv^i!B={+)vNQD1_C2W3~T~KL2;p zy8Z`E!2h8iaYZ)PwQf&_|t%J{BnL#w2mphG^YAtJ06vQj)Dyt&l6)xvjQoH!Agh zV>KtIgdmxD1buK8phw#>^^{4606hA^;?b+e9l?Z7j87k5iTuV8`~VdE>xST${09~$ z0^s#``1)6*(0^(t{&VyPVB^0@e_;6msrc7f2$|&jBR>E;`MsY&j>E4O03*To@CW$dFB*scE>MC~idb#egLim83o==~Kb{pw}J3V~auof$a` z7`Fq#80y#v1J2HRm`(Z2pftfYs!0-aZ*G$6So8-c>Q$C@8^*nN>;963DK^_gj5mk| zF64C6$vD@e?d*>yuPTOTUFzpJZVp>eT*nf$i`}0+P)q9l#wh*_TKf00tpA5b5%5cY z{EdA0-5=|H6~Vk4+o}1vKOUffFiK7`P+CtXN~h@<&G9wm&9SYU!ZpC{6{D<&`b^qt zO!BU-lys7i!{f#!t9wf@sZ!{`Frk{ z^@mvSPrdpdeF{YL(m`YrN5>kl#6pQfoW1G$Gx>?{CgV06Mr%SO)tq<;Xph(Jmo z6AL>53;Vaf7}>w^KluJ}wuDdL&e+ld$XFntQDhrj0RYK=%%L=P z)@5M@Fw+BAbPbqU-m)<0>oe&xGrwhJWqb=@*Jb-1Tl|b4$NIC7_K&6)0~58<75y0j7d3DjNH&o3~ZUn;YB+2JFjSeYosMz0vKH7oObJ*i72Xc@E>xeXve% z0-~=eqNk*Ej2|t7uHU2i>q??x*C{3R7fka=3-9F8$WXkG!W9?Mu)n#eD9C76eGJD! z4pgnZR_b0w>y@Cfk~CAF)Z_8E)%}9+{;+j^3#ICQgTWRUTW=&DqEHpalkVOXaROP; z(PV=2c4B}~Jm01rj$pGD92x0eJ35(jyi>E@5nrm}sj>C_*=>ISPiw!sSy_ zB2|>ul_ly!)GB}K6?SOGHcBp+-(t_b@^Ec+d)Q5(Ao5a0UzPgx9F2Wgrws1%WDMJ) zp2OBieGAyfhWVs5W%WC_p7osfU-Xu3%(X}XKGt|;)CZYEMkB9tphrijFWh5Gj zYt!I`$YMK44 z)oM9>2Bl=twWj!6`=&yq_W|)vY{dhp`qW-=o3Zr-YBWNKL~*a@=r24ALHs2d5N)n> zVJU{AIvDwr%;K6KqK$!)YcQJdIQq;BuuhxyLLm@9DLKy2@;QdDoF&9rc!Pp80mW5! zxzp{bi2!r5gXxSHA>){J3*JPSjKX)pi@S}d(?RO+YI2%l`JT2);ERi~`3rWu<4_6$ zWuh|^ZayiiZIAL5Oxo(ivhV{jstA;#V_EdF+<{ElE$16A8YZ8b)fJDb>IBzuZIDfx8CKDYcM=PN2+JjNov${O zn#PlA7lM!O85Xd1?*8&I%PHGmDN*g@uew z2Jgc04oPcOt347CUtDq_8oZCohj^#vZNRy`K1N9@*^nGeL@N#w69KZZiu|_z;8$b7in@ zuNARAl^fMyzm_#A(+`R+BR67|H@*gki!aaA=P`c%iL_gdVh})~Xx6(Ssu!rVi!#LJ zv=&o#fsLP=C6;}T834yhntLx{MmIyMZZSrcx!8MxCc%l5%JAA>IZ|Fv5Nd&dr`)hi z#nKTzCWz7O7@Bdjr;8RTZiIAlez`?vm4mWMD5e}~h$vp*v`}w68;e7f@Ka=6u=(TM z%Ft3Z%nDOR0u}8^BuU(UO@+jh)9v->^B5g=mxO@S#`<}Iy_gS!iljBAwULukO$eU# z5+;dN_F*~F#*&Np&TR*SNa^Xk9r0RWIdENth8$YPhbvQLynFIP}vQ zTCoK9`XDa$RSw*tOxE1FMZ2td2lyO{m-4`s^Z@hXGSrf*rf1Q~aR*fZfIZxF^cw|* zk^Lwl5Yv`4Q-P~@(Lwg_s>Vk^@2Yg!zPk1McF-LvLyD6cLBt5I^!h-cjFNjx%h@6j zx{%vrWqHcO%L_K@0+703N8k8y>0#s(A<~3ncUnQKrqovpG0n&1zz(npkrJ$9<0)Xs zAn9ImKQ7Hg6iA~(%;c`s(*tW)jEs@kiPFEtnXJj03FXK(v!39QMSL}a6m)D?f|mn@ zN;VCScNsF=F}1!!q*zOaJ4ai;8G->0AD>8amG)xJZ^yH|8XiXz2y?dMhkI)T7!|`j zkxN9c^7e#6oW96_-!>6-fdc7#8YG~hG&uL2_5ll(eufj>_ypJoSBbMqtZqWFreUce zaN4(0M{w-Fv^ZMj%K{fjNYP<%ZJHqEdn<3OKT83+!qSE6a&nS z=2eq2$hpWjj8iOZcbN_`W+anPw+s7|l!o}~eS&$PSwXvE2Web&1A$s&_06sc@boUm#>1o>gPGiro?Ypo9V>EWrvH>VW!bKo zM0-^%C~lz7V5r-mg-ujx?sQ2AY6fOzL_$UShL@M{O?n(!=jZySB6tI;(B268cd)!r zDVF}jMR#UGoLL6*=-7IP2{Z0s193|!U|<|-Wh-=0#`mc8OVVou4fv|V&8=obO%=(P z=8_K}PPm~=9fm&E4s?Ur-OnCkrw8)avcn6HR%uamHeZNq`hbq^#WWW=Y9g!}psncm zD4(T4nX#UZ89DaSPVd%f-p{nOM4LY248g1^3%B92UnPnPYt4?qYITyT)Zt4Ag4rge zi$_(e++Ao*q?&x3iyxU4QoN!?_6@U!W-&A;R_`k0z3|4g-Q;6hZ0)t_JnS3j8^uo9 z9@0dIyA4Y;!UGV@johLW$cZ+`u?~Z6P^ULRepEf(VjZNETjqAy+NT3+*-J0Xg*vw& z8#d8vlGXegBFhD__gdX0yp;Q3NL1@_KY};Cdt$VlVL-8%82v5oi9AbZi}9%KmWh=H z-wmYIpdgQ?w#m9U9rJ}v5udF`)5rS^OXq&FLKaTGnQmAGC8l8J=W5%i7uPC@0$y~} z#~4ua%Y6E4(Zk13_GzUm?NgouQ%iyY6#<)Agp$y522}3Tti1bo&-4s?!cROdVZ^OX zR=m}p-7K!^Xd7pI+VnqUIul7lGMH6c0o)`Zd}4jyhb5W$L8n(EBFVPEc?ti;bY#qd zICXjd@mL>14qi9a=!rVMgToX2z4oZbkEsE+|Cm(F|Kgzki-Z0z4*EZfgR=b_6M;WM z4gbHyLD~L|iN;^%Vu6$4`+WEz5A{#)#D6Xo3vB#1Q?bC)sK3g>{OhvSKTgvB4j}y3 z;Gn=mn!mEgpUIYfx90C9Vu7i*|IVwwP350v&)*WUY(Jz2|5Zcxt3)i&X5Y>BEfEXs zkcXxIb_U$|HVQ7Ivf;O zzvfrV@Bgt;{13xH+5e5~fnWJvc7pGN|HIbv&tpJ;()qIgw)18GkNF<_Z(HIo!a>=8 zh?)P4`~7au-*dn0Kg5E6>eb(7^Do>l`@b!6`jz_y+U&d8zPVpuC%^aeNB7G{@ZF95 zg=^ry>wm+5IH;fB|HVQ3fHrMX%qIJ#bkffC^IAD&nf{qr5{Uchb{F>ag4ed77~`` zOu?DrBM020t8MWj^1iBh*_PA8{pkvwnIqw+>3mcKe96~7!#CG=9G*g({G{WDSj=Gq|0XaT<>_V%;kvs{ zbFd(UL|I6n?xwVg$L8c8a%Cwg|KfFoDDMxB&b%rm50#_?l(OiM)l* z+Dc>`NIgG*guhfjK&Ah&pH>z9OEA;L!1;f}qe*&q|;XM@HPMpOt=f0O56nMQl-h zHt`v>XBJf33GQEN#VKJ`C8n0yQymr$cJ+<3{uN-;Cj|wPse7q<<&-dT*q`S zZ=hH^s~ia+kD9CHmA@z{kM&QZ8EKY`d~y zIm}ZOweke#AY~d3#^lWu05X}gc%#{T85WLN`E+AdSlVWnJ_iEDN;FI8moJj7>b~;m zx}P5oC9_hz!!(yOTN{xrwhp9;_w(lw_Y?*62MJB&9L2fU8kFI;^iC3+?QB3vw#O{+ zsPR53EK?sL4hsnkD8u96yGP;FXf18^yK>eE@8}z`_j=MSKjkH4#vkz-&FAwUB!Q_4 z^V`TIeL!R*E+B(c?jB92E}azgk_$u9mE`?$MVS*7BC;wnm=*~jG<4;CO^7Im3R!O_ z2dvhC_({p%r(l=M4YQuOU-gS=>fnGfc+Y(*v(2cPJQ#{5D_LMJofo?oA2X*e%sviw znav9A9R68U#Ovfr1pNzAi;b5YO_&z5{OJiLH1Bg@t5?fDvsD(1vTWlRj3!ZCs?LLh zC8gl<%YibH6(WQQlbG15=|{mD*YzyaVz6E$W?L!g5jk{$NZi+i!`ON}jP;_rerHM>>-OO*#yg`H z+pAAwpADqzfQp~j$EN2e2_gLmQ!JIvCvHz6MVzJc75;czj6@L?!nSRGuNqDx zjyHq^YLy8GHJQy)OG@7+lv`Y%?q04HukAoqkzQ)->7UJGv%n|AsCtJx4&8e>&p7S;i}@|090 zG~!S1C&39tAQVY}Mn3*Eynpq*Yg(?CHOPz!H=O0m%7D&VzO?cpG3e8#Lm>st0 zV5`?&4>%{w(aw6nS06#ne`Rw-Gok%7cQX-U$uDu@jey2L*L@lT)m4z+3{&k=*hGhV z#DclP-dmH4HB#8=maG`aeZej3Or{SvXXByR0OZ zWYkG*zuS2DqIR;n$4#6TneHm83Fj-;HSCmm-el#}8!+>IaIGg1k_qsWPxq|?PJR_b zB!v5)$Pb~k0(e76I(GAlN#fN)1W|L z=yBEn7c0PdYiEvxikW6>4Ije`D|9@t$=@vpUtNz8ARQrHOE7?|h|3+?s=Eq%ZdEL1 zs8-e!U0a9EzQN8Fh9nh8*&Eempx^UIXA6pZnHZ8qZQ+rn;L< zz$V8^42xXfQB(|{WaX=*gMzNrlA3-9#C(v4B^BD^0T*hbC{7}YIAHC#JmesE63e^U|+tgAxRI}!!!C7p7 zCaE&_A+0oTml(9*DEX?h=%uNw@9|g-p4qm+C~4H97dx%W+D7wvId*qco))v!lEnE{ zQYU}<>yM0wc2M!xb>Q5@4@}*Lceyz+(rjwtt;-QL+b{JF7<p6?@v7mXg;?Ngd9OJ6dO9U@n9Hig|E1_mf>6zftNrqS1s%^6g5(pW>_Hi*S zY+HEqP1ShlLx-aZQI2Or1>MF3LUHWXC)7Dk&qcAT(t*fkU>&Ds)m~YQd2*~wAV9i8 z%&DhQnw0{@EUz*P-tvQ-atoEsY_(>;VPvLf=T0ftwt%Q>8 z{C)HR5%xM_dyh{Za>_MHN}X#jonPOUobNTszD8NecEb9kf@;hhuSEjWM&9kDe9Azg zEY7r=ddg=4In|w2p_G$#HJp3Ih-FNHP-j>gudg3im~yT*WmcCyj6yX8;1(OsQ3k%9 zAxK}{lp0NS^(GXyufucjbch;d7i}7?IxL2Y!$K`dx}NBsUdgzuXeBhjUmN&rjomC} zgqMNE9pEx7a^qmx2^lg;1`dyc1xkbj{AaxpDN*emoc#b z!W>AT89&$aPQ}%RqxfvfwhQK7Vby3rD~%U5$(~E3=N9uRB$Ng0%_TPXm#=QKurd_r zvCV0i8Vd?o?xgcL$~eOnbd7Nw>b;_gKEpLj7%!Mn68cXvlx-COFiKWUMr08JFxeEZ zYUk!=sNjw!zUIZXcGe3)AM=R%c2dKi!1&|3DkN_3et{6^m@PvYG#BemtENwg37IMx zjh&IGx(c$@u)r+Gxa~uB@P{itR9}FZvMtR5p0DP|7&Yzdomb6l$i+~|5$?^Av~P#L?U42z>TK7qqh!pB_BX;b;7CC zlrU0KT}J<2wH__jPU2|G!i>rc8%w3Fs?3ROr*L!ssInn}etu<=u*k2EVzREh58Vy> zrE4h`MuX|WvFA|cZc_rD`SE!B%?zitV~lP4*?_;J1FHNG8$sy3n$7Lf=@H`VbeHfW zHQ86k%eCvUcPQEc@s~H183(=5Eu4@3mj^hawyISW8yz}4^)T?Kk~g@%iwG}aKOg{B zo(yK_$|xfg?62oTl$5T%*bckmFQmSen~h{&(WT_YKR~xUnwhy(fpx zFGn_aWt}6z480Eu?Y4|~r;(S?#QmAmq3;>WcOddeI+?VZf{IrqCuAr_icYn<-E7 z?dsGFtKLdh7gL(BD|#gP7QG&QtAl2TT2Oq-_%0hpP}8P3GWS)fn3N_;F+KBzqS*Ad zQa$Bbo0%ei8>Gh*1aB%xIc2D3y9&5-O1FdXwKAEY2zhYzFY_S>JEEs{qRD+xd>w#f^X z;qpDGp0|vJVqjHT`-;rZv*pm0 z>R@%s%oNo|2W#D3=7T+p<44{rsS42)?$O0CDHbGAmwJcmDJr_>%P9C6!C1yc$HpoT z8W#(g$jR$IjDsDgazD^)PY;l;vH~H z!jKGfexla>n#NL_?YJqkywnn5sx+%3;RU`yN2^v;)TUJStLu?RsciYZlA&VREXZ1h zY~88x*4fF2?op1FW2%Ln_k6qi_Nj(c`eU4mf_iH6AtHGgF8u8VguC+EwaU!~XeG)M z!dq0K!3zQ0`R!PSR*mm0FRU~aKTH*8jmF)s%(IB8XWXth?iq}6_uHhhOp2n%yF^7W zSII)9_$u1-EQpis3RJW}Fe^W$+SeS+w^U`EbF8osgcIi=Y-LnN!L5Mwhn}8RI-}th zc*jtv88neK#uD3Pb`jTwh{SH0>4oN324UbOx3NWG5<^29VVKI66{uQ0$`AGuG!;`cjkZ{z8MCpfzVbWyJY&T~9@p0VR{pwiUA9M z%D-ZRm0IO}hc6b*7;-4jz{{knDU9wca54%G$UFi}+eRWJc#4)a*alY(Ow$=6{g|99 zAu+>fT(ra$(%S<}bE-zKdX;x&G2wkgH2HTBa42H^tObdhdV0>!daMJFUM_XTZx%ks zB#AU}Aw!)O$HaNbkC+#MVRDWqbPRa-mR!MSxZD z_M|777dFG!;0R~3ogpw2evg$q3@v>{Et@Per58y|@LR|EX{clC2b6wPv81EVkcK$^7JSr0oBQgA z8`jwrb%R)jgzRe1Y|{^YxQN3^aSyDG7efi@lM?oQMe`w)5rd*sdsHT(_;qi(66PcV zkKka#ba>T*-l?zwP^h&Rc{IH^C5ZDo5RKo=@LSQVI(!}OO5Q}$MBc3osm8^nWJ>hw zfP>x0I?0ttMPWTaByuhMgD$Z z*|CI)J!z&*h;}3gKP?xp(y^K)5b}ckMR5<69@*VzRIN@NqM&0~K|uAwkAwW=E~JqLmAvv!RG3%$I}@r?zFC7Zs6<5v-f^pl3^|ylh)0j z{G3#HU?lKPw;mlEuG0FBv|+vpy~8b5n-m*fcY&fFM?FzM35bA+_n;XADWXA&)Lgr^RX|B1DR5 zg|U*-6(9MDUmPujw5(3Z{nMddHBLubuS~t_^hFa$4AHWvU<0ZXat5zHUwjZWDUq}t z%u9(TGCGBK22tVdF5T3{fevc~P7#vyvCM~BTT2@fNzfPp_?ya@-SP4i)rdzWt^n$h zQIKGsur-}RfKsWX&N65Z#@CeCfK9Ka-CkP?g?PKO>02o|+=MXpCGy!`*&BliajA2Y z^fmzOC;7s4P}`%llnCmn17T6*$I`IT0K$|5rfVE!!?b|@D6ubS%Yx#gc_}GwzF`QS zUxFU3T#5nG87A8~+gnk_ z!I_~vu0og)u=`5PNSjcnonCF^=ceAWwtAgU`sSsL5yGrq%wx_nuDR01~n40p?2h{t#;@gJpQX0rw zuAC)t?)8LIYxec2Qo6EF5%>YY4^zc;M_~fi5 z)~>-MMJ8k7v@t=psWUbJ1p*ed6)YGo=-iIp8&VuE>LxE^UsF}8)FdaELwiP_)$h zz1OfzaD~dQ8;--9Tk)Sb1G72w4<7)N($_ zIbRr$K!F}wceA@^P&7FS*@!;x@0U@73soj<3tM;=&dzN6M&AgLt~{R{B8G0umSf0@*QeGWh-b0XoFDNgA6=mWBaScS>|utF!nBLsH>egY zIg`Bk+z3%Zolz#)LH4?NqJEop$~>9S`NOKhl(3reP9MMWUEe-aq$Ks{*xK{vUUNCT z{HCIu#pC=ci#^ROW&Xu+hhGYM z$?M&Lm+E$dsC7U_dfti0#$35X%7{M|l)OYx+`8u`4}L#85F;Txy2_a*Y9BvqEQAYS z82d+M4UyInEP{=*^NXmj54lkzQ8vr&c&(s39-LQe<5wHqZ#deYxJCj$7w@GiOuw&8 zgazHW# zl`wIuKIwdDr%`Wg-!o!oF(hGJH(7E4P-8{W?UCukd^L0p?r-Zk^>ltr0Mm& zwuar`YHMixL(^*uE3sNvHq`g&Wa!HGk$|Z4LCeUub$& z0X4l&ey-`o^w8!1_u3k+KdY_r(+8~zX<%uM7vD>3TqVqrL+qlRQS7UV5_!cht4eUGXWIJ3 zPF25BhaqZ(vP5W>yw8tQsLfXlMfPdGZm~C6e;HWr>JfE1X20ES2AgKMu_XY?E6xW8 z|BuQVkcn?+w(p+4SJqe*dnNfBBk*rz5&RO>W@jS+UVjHA|H6V2|3y_VVB^2ZC1eErWxH>kNe!w}nV>jr4?&=z>lG zfA)3}vFgX|1VI09V-fs1fcxhuAb(`7KdP~@3UXxq`!zPwN20hRIpqXevO=XsKZ1=K z6&nAe#)b;Z#$;5<U1x1;CpfwG)FIi|aMyEQ;M33s z@$+mL%0o@Fq&!|u6ZGSy6r{r=Hu1Q<{h$_SRE`Boq)G}|+kHtPBdD5*4_U1e>K3c4 zPuti1G1)%}d~N;JHlqgHUj%eIMZ>|IU1+tB5eG z&(<{$S@XUtNcGdp)!$k;Kd@>4Rom1z+VbDp`gUes<=f!@Gy(oXa?RffWm%u&qWk-7c8(RzDXYtw}H47}C0jy{7kA@F4 zH6ylI!rdyqRb%L>Y9k?ljy#m|cEi-Efu=uO<`~qInTRJxQC^OsckvEE`pLD+##|sd_Uh1JX`ie_pz-1H zs-WH7{tik*mo%^LIk&QqyK9*@qqCfnuH>Ho)8i-UhSUC|b}qNGn5KtII-`#FTNZ@# z>d=s1A1=NaUSp)p0wfkljLM5Mqtj(EdnrAanig|I0ms^wV8zq0B_@{c?{BwxELYs` zMzxn8`#A~^TaK1nUGC0DBQnQa@3xe8T00(Qu~QS<{QU9l%a*Z7;o1$cg)ye8 z{YDkFH+`AD2yom6D>l02$tth!myE&qV?1S=Jyv@v{rM-kBy5v+5KFu-N7tcu?D$aB@hdGD@CcHq*!y z`$9W$>pe>(NM+j8hZ7Rnx5(lOkNGvR7&``+(khrj2WO{j5i_bW)iPBnuMU4P7@f(y zXTYwqh>{*c5=!9J9%+8&^9%vCDs$?H9QqZ56Ku)u&F;B1w_ZBj z5`WN-Q-paCDXXH1$a{^#c#$fkxmdH%3H+ zpAaoxD6}yc~(qK)`l3q9R8OIxJSR&wZ0v#642|dHr?n= zNK4~h7nhonL0ugFiFG7guZ7pJOkw!K$j}cUZ&X8QPeq^0reydsh^hh?r`WS{B^9i5tAL*ccvG zi+YD>j_OkRa!dm%LifeZVw&4cl}MmV(3v@AK4m(E)l1IFYx`p%DKjb4yaG&bvCh_V zT7)CjXG6=Krx@{Jm8E+$(`=T=)-oBMy({8e1NteBa!z!HO*Y5_$dc@aTm3r5OHz|$ zDCP%Ea&!^oGM@@Xj^^lh@k+Ht{8Z+KxZ|Y+vlH8o$2Ct1-|g_n_XQj;wt=>fwsu&e zrj@EyYEl_;TU;_q5?NuX8kx14ob7@B@2=_vzmC&ap?TTS@>YjQFuCVaAVi_$}^p3NjH%q<1D z{`Q<*uQY8lVpsX1JO8eZoIU}Mv7xt#y_Sc*Ca!VVV z>JHCC3gWc8a)kM5iPoZzBGlii*3`wtPxO$(m1!|)HQ;?5Aa%>r*QpT)0^ls@8jwm$ zsx5H*B}MvE9X?-;+@H>Q5)s@P9zLDXYZ;q?AS(N8Kurhl3vN~kIR|fSp@ff~2ktb2 zYUUbRb8?6efate{LE_oS>q)v(hj^%ZuAFx>USA=JAHsJSqIfpF7)n^$8pwcJS=z_; z2ylXoD0q3A3ff=Ssb>Zl*}_TKS+!w|a_zL&SR%edkx?c4AnE7s$2^<@%0q?lNp(dgG zeJ~H@Xu_d%E6aON2tpboj01p7i(T~ww&mBs8yIQNk4v_|iDr|bQ*+CZcU93|5!5;O zJyTmS2X!y;f|e-He-)XWoR)dCN631bN7uHz=41-VhUfb-94d*0^uW4xM#mdd9T$PW zvUt&69l@G2&;{5sUcZl3_v}Ye=iarCY0ek5%Ny5nf?YxgR-EP`tJlRCValJ^oEDT{ zL$b6W;%d`~SaH^|be^RAWc48i0=j|~M0cBn6B*2+u#D_YE^X1|KTMJD0!qloL$}=SJ zMK?2bKn&l-3UqPa-dH!pzdA2PozW?}LU9&eBswqM6Uwf;)CnGG9go}5ZxLYv>Zq``5_b<(G)=Mj38LMeE zY&hx-FNix$-_sri72`#MoHyaZbfR$GylDB#>4dNgRoVjfFbF^Uj(4tX_!X<~!ytkV z5A;OzA59d! zPwZ^3+>TDC3=_5NK}AClbk&=-)!MDlg6iU&N)DfE+*8JJp_H28{B?G=kW52>zS-fctpG zlh><3qTrWr;{{4|m+6~2JrcLt)-JV}+u<~_JkFdEMbGN3mpHLq#GqTKt_I?D&~a_2 zM|PS%WOy+#E#Z-T_SQmYfpu0zKCbqk_nEUB;f7T=$PnVH8DD<@J~~7{uP!ybRBbi9 z6l!E}xqhc^AU(`FC1Sb&ZLqi}EL`M`W1gouPj0bz5cWbI%)BQl*@k$&Y@U@{>u+-z zz5*&}&&dt_(8(?S0@j%zokJ_b&jtAN?e$0Rfe(N`m#y3(SFLz{B^f*MpDKi2sceUT zYA`o%P2UsBv0py9t*@{HA9-0(fWGA9W_l3z3FZ5EM7iQuDDTzn5UV`wgFtiEU`Rt$ zM(9|qpr*hMR_rp5dvpVm1)zwnYGBS2m*cN&nj-g`KwK5~RZC9?!QQLox$4j5ARMqe zR8tOP%%5Fv^#|Ih2DCQ+ANJk?I*u(#*R{xE28)?2h7vPa%obV9%*@QPn3@amkNdEIwTcdt3`&YhVx@2;h)Qc77_6?;eS9U1xU_*eZtwejAYPQknMm%tH_ zFy3uv_)SuX*PfjB>aU&WL3x*c=l8-ogD*mNhpFI>QWx%~-Whi-k5ua$^hZ+H%XBt1MaS;5 z=RgT7g^X<1*~1{;%D029yqn!3XibiiA;Y#|W7=icebl&t6S(uhbp$=#sE7G4u0}}a z{nVF8$7+v*7LT#LV2PzWk#46R=bhd0jKzCrhR4(0*7gs_^JBK#L zaWKZmoU=o_81F;;*Xg9NJtDdz7@x)~G~zf+%@p&V*JW z*G#96iEb7>^rx_MXYvm6M1HX3h-0@EA* z^1zPf{wdmy-cnF`pFuOGcX!MbCgVYwRCa{<`LQ)yBi4@z${nu)n# zEyoF;wX#U2jZzT5Y`hn`Tkfc;j8j*Qi=le^KK2?=@k;DKj&#)0Fzi9ld#j94*X?a) zv7d&hC&jm`k2AE zxBGr`TNy1cBL0vkZ#*>*bbHqOQ6BeHrJ5_mVo&v7&>Bs{DG%95{ZySHzZm5#PR8BP zp?x!ap|eCDU>Hn;5B=86MaeYw5xCbH0ou0!^_AQ(qohW$QF9sGl9IhCmWo9Uu3Vjo zQ4-A(EDz}>^F{(jxd~X(!g7v)h-LHE%{>CPt2}xyt2qp%^cm2@#YN^kh}Fso*J^^9 zvglTSv058%BykLcD-8K|J_;t-`+Z>}UGFt_jPogX(ao)cXeZZjN%@FGJMXk6)s<1gXF=ukR&Wp{$^yXq6ZZD2Y zO}Na?^oO_I{`)0?p(NDxF5m{I{JY)Ov$6ZuGh&f$`$uuuZ5HB&Un9gobH9;}edN~y z%RlnrhH>V{{{luBwS_R8XM?ySznJxqIe-^E)eAp-%yH(!{ke)TW?m7*aLx=OOSlK- ztGEhPzGbWCCOxAZ#Ats!x+0rV)rWMK;Ruhz@G5mm#KA*n!W^3}Fla+C(kkPhB(7*q zV)%hzq`(gt$*UH+qQpJn7qo2xgAOPwIzkR(41X(r#)We$;KaVx0=K`h26kNUN32QZ!{Vn`wh9^e$ zu~QtkVWLY!_8&VxhKv!(0=3wK$@vCfz{A;ZK&FIHW9$OFw?2qG8fy(4z4;>gwlG(n z5gDIpHkA(Dzw}1PBmQ{2m9MT}KHq^9=Oc^kb&|j(BO$dM{~(StM`WrWB(?(Qbd_h* z6-Qv`|JfGJnd`Bxn%J~%eMEK?T8!C0<3+j*{6z@@S_<&n?@iDzlL&Y^gl3JZlL!LwVp;n-URL1luJWpXjz#q%$Fll&yilG1w`~IQCv@of zpj2ef@2`Gqq>t{8X^l|7?~o74QXB047^?Y~&4>o*Sk_mqx1%0Mn)T3p?MD|Bz^2wS z5F-N}N3S-2eL3ND2W4+Um?HnFmE18(aZ?KwKTv)JZ+BwX<^f5_)kDi?kyde}y4R3Q zwVH(E0SeB$wQ6PMn|aOwi?h4$RF|!hUN+$@H~y9G#RxqM;Gw&?kN06>fQR4y)%d8c zI_<MFP6lz8Tn;($m7P2>MQ#*H?RYKnjGxO3OY|@b4{%S4_{<(Sf zokzF~2IWP*O|Tl~l(mOtfgc=1=_^Y8j!0HX5xyOX_S4oe@KC=W-rvOPCdCcuxyPXB z8d#l@?MccL<328<@*Vh!FpD9#T0o1&m3VZIH1UX$+w#VIYp(v6x0)iF8AS1Zl|2dbZ;M zcbEG5V>2LFG(F1(G)FT@my&Nll$Xm*?=Ul?1ucu#!EkLmF#HuUIW>WxtEWx*1(}OC zLCcG~>cPdA%y`ME&3ccZ;A<*{(_jc9_*N0%n|dhQavcQ4q}bDSCi#na)A(@Lr_bx= zT<>lIa>{q(}@5{#AM!;RZLg({JXVi8pgUmM1iRQ8ix(A1pgkr9P#`12gMZ zD}#VGFIXfmceIzncCo>maIRfc>3jo|exNVEWm0R}tVnWTT^h@eAYr@+uq@ z`M}Pfi4yX-8TuKHanmg7NShHF1( zA^y}J|MH*)VSE$c_4QJ~2d(pQWYz2W6X1k9o7AWJ14vGT_NT!5KxayPa*uGIDF8n= zKiNf5O^A68L(7Nka7xwaK+xSeT31D*Nff#47kL~qq%YR%u8%kY8>heC4coFm`m9(m zIYs6uYIvjkLMi}pn5AdkXTt1g`TWskWy+O}>4wzVG|Xpk_4HBP*d#=S%mqiV;LArs zr1K9Ka5?E4^bx}{qLjf;Qnep==VjzAZ5t#y|QXyZ=_5gWK;yseMR*)0>I)M4JZ1QcTvmAsOon6&DJ6?5G zA8Un9glZ;LAeZ0faXWc)p5^s=1WgAzwpm0WAPeRje`Qt%X-rvPE*|G^tZ)Y+76)d7 zSex9GBN(;sAr6|2z>=#OJ90ER;07WN<3(>USOcRAI~ts9Ud_6WLV=D}>Q6g>RQHQT z;}gKeK9k!AhthMhR`mtA)=MZHYr_M3jV8MdR42IsAcnwmgx~;W)i6z`WeldqVO=p@ zI=sP@Mq(Buz>*}!h`OqNf{V(HEzj(4VM?dM33fL}>EEPKGNXp>c~=%h&O%q@C%&g4 ziGb0J6rs04kE#is15MyuOyWS8lnbXi`n`6UxCUGqtq0#;o?MVn50?xgNOG8K2EXN7 z2)RpSYdIm(r*IfS4Sz@>Wd{C$fuF+*Df1q;X!1COI@pT*g+ALTPkKGkp%Pj0*fY(F zrHlxp+TF|1)TkqHnKFz+CM1C|p)hezdpM>j+s1QdK|#K1y~)*&dpO|mGSnNzzs$@G z)YF7p4@9U|+@|mO5D^fkI713C0bWZFeQ^+wg5x@bDwoV*zJzX6^)7F1jg&CFn1I&6 z889$RJ}K}%wdd&CSK3%7o#4?NE}}|!twSOg8;1=fM4JNZz=MJKXO#i$kKCPi46)dz z-6=s0SPvN+r$Y5Jm~Wgryj5oYaQL!kjdyTfI0g1i7+~eG_a^zbL-udT;o^(1`ZE-z zS72`e&EruzF5Eh3y>p;Ved8QZ**(!LzM1Ory1T%@T_eD|6ufFL-rM4JpsYkG^V-@& zueYsH862e|eH3F2JD`cn#lqHg0luHJOKsM2K@)4%(@+6jcXAI4XYEE5t zpt&XX*lGCq7H3Y~<#kFkWVC?k@DIbVdcI1;aumXk8xeYE$%B;=zYpWC}7xeB! zH+UFPkood32hZ-RDfN){A2Q5Bo`}miH`yvYyG1`8^7r0<9WJc&vYmZrZRS)X$j6oy{hIU$H@Z9 zyNDYvnXBm+|C6X8IXe{?v|>;*1SvVy*Yb8Xe1nygmmT8S)%>-$s`1=d^>><#uX`e` znFNZ3;0_I_ybEx=I7^Q=1I3TXn2BXVt|EgT%ah`dw?*;PQw)ZQ6q;}Tyv^~f7yXQ` z@r+k`YB%ZYuO{bmR)jw?h561+Cp?lDizUqGHB2WccHK^QstdJ~LMK+M$AY9DV%!n? z3dDJWU7+O9j?#~r9BDq=NcsjhSMQk98D*d)cicsex70?MPbn6xGeE%JFKOb~>#gXV zGhF9ZrqRYDR}fc>&Wro*is5+lK7VNTkxv?TXdow=`^stK{J;zwf{&Ekr-bR@myqI9 zH-@lM9kc8Ef#}wZc+4iqdO{3L%oYT#1(e?L>?(uz7e^8zWFvvh3gR7t7a@4%zI1e~ z67*~0oxgD6A$jo|0lf7+`QN+K_BX7NzAhmh5byy?BS{m|%UIi4>RJHrwEs)3D@Mk@ z;bepa2VF5V6#@4fttG_#ue25tkk;~NLk9ahF(lL9#E}0Z(c6EbQusfJpl14; z0RMkvH!}Xs%m9=P{$FJZ|0@V;rvE}_{ojm0z|Lp<-2wgsfzdxnPy;{y?@!1~|81@m z|JxAMOn(Tb|J1DcdyD?#Dftg!;-5SCZ(jYs64XrpWg*ocret8;`FrF2Wl9F})J*>p zLHyejf*JU)-zK*Iz!T!1piQ1OW^H0Gloc3&4;Oz{(0#gw$haWzl056g1RjW+l~svQtiT>+;b5U-W@7^`m3`pH4gofH4h9xx zfB}aA2crRijah_=U0;xcjf0iRfRT;WkV%l0#fZ^>#LiIH0I1dJ;wofqMe1+W1Ai~#B1_W*W% z;IY{OMvTk=Ry_j_Ha1fASbqeAD7V3ncP>R5F$^#2)W0K^ zr^JZhi{u*y8XKuNnzzCf!>~E;570Sq0cKrpb4Iep1iZby1IMs`HMA@q?as-{zTfuW zd(xa9*~uhDM|wnbCXB7W-yUjvIX~j?AXiR4%hjSmeCoPCgSt(vjo+brx%YmZD|ml+ z?&5jf%wr3;gr;$fG%I#o%z%>w`DFN6{VErCUD|3Zv^9$5V#K?W0Wz`7r{E z-1$Ruf^v5K{5et)!u}}oVutnZD)aZuO>Ci=FwOTeL0vGrkx~-SMy%6|0dzc z3?FfxIj2I~bk~c+6)CUReWV!uxrRer_+w)D+r`qXT?Gzv+JKa{G%J^Zl+ysphgyqI zsrT2D$U8Evt?~9IW!Ot(_Vk$75oweBWW3*;?0aVBjd= zYf`23JFY@=$>EK+w1;FWAez$JWYM(+N2uMAdmo=)CnvY^|7^ zqf7}$@9)0hcZlLyzVIu_eMjeKWjkzM+5g-&xDL2!qrO&IRrg$lmK zbEq9UpKs0_!Rr@)Yhk%a$*WxMc>qf#XGdzA=#99^Scn?h@ugurb~%8(o&Hf*V}SE8 zE--?vv3)-n!3Hlvk&pVLhiVg#~pBjv)@K?wCNjOIn-pd*0n5V`T>qvsl7P~-IhtTG4v}&vNQlOLmz7s9I9hJjGX1q`Dz^3N%fLe^b%rfTsq*%?(}VU? z)z{{JlgB<&o15JM=7{&1#hyBm* zIBnU}b38n+ua0;t*RR#-@AN2+$=Vgc6ysCQ7hsz|KVAIbvx~jCp-Fm;X$X4~+dsW| zS$j0~Xe++He%1yRNzYp6JLPCS|2}%ZfZD1zt5xp$_;bQi#iMg{Wz6;2_crlnwY4ep z-PHX#rBdT+D527>P?GY@kg4RAU%Nqth)>Y!0ea z@h8!w1(i<@jtlhm4UP>UQ;S3cJbT!3%$+*xP|ETcXUig{G^3AoY$qc(=Mgx2Ol0mQ zMI3R~5D<+iqt2BsOeztXT7m|(J0A9@$+I8jY-6(7j@ZwA)2!@YCT;3Zp`U{j%Po9* z-1Lt(?t(&LC#yuB;OJaz>GGF_gbH&uhik3uBH^kk(j11$uBmRIc||_!Be!FpfH5k# zPxfJJpRnwuO{nUpHIcjPgtm0(tft#M_E3$r)(RZP6}v|jqkOE3$&xt%`Ze+Rcc z=^56`?j8bdDpEI;ky#c>X4&%k<>*$luQXm`sUlBv^x`*q{S}9R4cOO`Z>iJC~`DBUxR^~^$#Y1-_Xvmwa$(U<=h1RRdk=}r9 ziD`0_i%FF$oUn6%U16YbcVB}HaaF4(uPw)pZSZ&jUIYV8#E=w8TOviMh$;&-?Si60 z(aaS48Xeh#09ofPg}UWuhg8|jW4aT%BKcg&$|cQa!(~URhNjWDd4Gifk)($A2Vu;u z1HP=s{e}IVK_L(EkWpjGU{f;tU#j{RXA&8R2rGjCh3JzUM5%DP*4Ep^l6LwEQ0-)8 zJ!LKE_he=L5w4={rvYa6ajRp%%)`Em`m)gcxb#=nLK*6qcv}YU@B77Aov_lv%tux+8pQFLpB4;R z!;0d*P@BC!z66YB%K~ST&|TGOF^sk4o;hI1&6D0fV{e!gXrgqR+>*0@O;- zGVX7}P%l-oidpxcUXmaKxVA8nfj^bdgWxTgd7$uol1)?*JRL3;M2i@Qks!M zv?bnouPu0;2)HF&kk3Pc!O0epI6 zQIpm#X*xe_ES9B_xP&8I>mm-C=_wY5=`RG>xZgJ0r@-wpxX~yiz6nyR59D^2pdm^d zV4n-iPNU1ec^nik6xv?TOMF~opp}yay^u4>H|J^^xT-Bf-yyEYd1R!mnCU4wcz!@i za%v%WYLp;TE2g!+t4-xu;0lUX z)HRfKv88f5PAzW~vO;+migj|k|K01nK2iO7Jwq~puLS$;>;0>DiKadb9U*82uX%xP zOF`R+&ofS6S!)-gv%`AF<|Iag3cgMZe=p8}OU`QBPSed56OZcdko~SIunObm`Piih z2gMjc_HLw?hyHZaI6Rx$?I^w*%4h>FTdM;z8;I3yV>Hn>n~C&B<|S*sdTQ@J_~lfI zN7uWqH2cq79$p6Mfjna-(#GwmX>jkMuhDN`+mW7TLzYl``U-wF{Rj}>5q9lz9hWLV z%=d~JXfj%%Wz}8bVb!H-aRYgEE3A=B?s=Cb3%^cg%kQ37x99~piRuUAi3^Mt6>*#8 z;LpiAoei>R{}MzkWCSczj}xs5pcekN^-Bn~a1Hocv!3PSDWx9}%_hQ}5F@OGf;=0s zVHa}bag(*>wh?#qL(liu>p)mi+IMNiVC=TsNH!<8mV;q@$Gw<{qZ^XGPu%=7l+hnH zKd&9+q8rRY&<%qt31kT;%z(oz%`r^-8 z3Yxz7Vq`#U8H~IMqwnWpTB^3SJPMXm4~Ne%H*C&1xb1K_JXb9Z)tD_mn1M+QwA8LKH>50AjL1^(CEdw$R5gYFZ^JFJjsQ@QPss1x4K~kjfX{-LB zdT6N|y+{Px&q?g{s->Krs_&rWKNK7bYebJ6^p}#{Bc&Ah@KZ|Ocxye0z@noBq2hA{ zBg!$-7NKT*p{as-BP8+*{2D7(md!1S0ZXrXe~BT>c5~Pu9Sx% z)4b^0h`WF%tEri5OLS)J~84rDUAM}UtXr1Z{hqdzL>ls={OXd1>wn$rCGVd}?|JeX;ITJNin zT*^x)4>1Mohs{M(KlcOo0WJG8Qc$tiUCOiD;-FNV9RYZx=&^GH1g2`#t&U^hP+i1+ z>))NUb8k+Pk6UPaL2StqdrYHBEHsxqm`oz@DOsemW&LSXSb6?~hAwswUY3u$6p5-_ z@1SuZiqDlUw6NF}hlbs?7gYQ@rkS5VWjy{|DnO&M)a1(%UsjeJ z){VF#HZ5|!xl)8#afGnr!eq8yl~o=zrT4UAe3Y4@?KZnw)~HBDqono9McQU^JXPwuFf!xzm+#`{ce3B9(RFdgfqxa7z1MhC+L^KA0p+~lM~WEbRj3aRgC)t zpo+l=J8CQy9heWw1vL+rn^ReuA&(a~;Tn~yuN`oz7ez-}senN#f6*uW<^>+xGN^0o zV8MqU)p26lRZF(OJX~RAofPUR)osU1AJI|xQ&r&67iu3qg@UiL_}bL;ggdtAy4}MH zd3!o*1A1+5MHB~{92N^fyCZpbp`#W=hgxi5ET!zOi*epuifWZ2h$Y<4yRq5AwmW6a zEY7yCyzg7=4c0!whm02M3O1BGTrQJ^nwp&)LyS+ zse8WFi=euH9DTvwKM+kE-Eo8@sC5T7+ z<>VS6E422aiN!)pzeAyfF%f9aXJtN3X*`o3-kMbMOt&Ybq@cQ=raThb7@3<|=?g-% z#-||W4bR+F;pxNSb1>R-XoiYIf@n5t=h@@dq;rVN+Z zE18Zjl3O@h=hbw)8K~g28y>*qdXiAVWC9!Z1OI zxP@yBi~$HIU0P(-acYQOS^W@c^6PURuiE}Tu2wUhdp-v*d@`pTJpS`$S(KbJB~q73 zmLotwrrcX9z9m%NEHzIwYY1~2_(a&S&ESv*C>&m0P$n(22)*I>QD*!~emV@1CLzpW zN3B!zgZqk6G?7&lB=gJ^`P&!a%ufm>H?I8Ti;9{Vpip@qGA(BXI$*;?86q8O3Jd+t ztH^LAiNBMfM6bb+=L%OgiBvCQXp5TG^^|XazMnC0qGc8}TWRSg7X-z#NXON;*Hdk} zWVMIC6+w_H_uRua95j;fXtv0mupE~!uua%Yj(yIJl{VkoF4nHonIBk#S{Nv4s_QA< ztTQ)(>;4ExA7KL2jA#Hvk-$^W(6F%|(ay0^c@6Bw`05c>V$8k1Z#+3vzu}a#T~w9t zJJ#-4*=@g+r*@1z+{oOqNIbTh|q`>5|OTW%v+JV$OLjYyZMMl+jPoi)Ez?mlK{ zHZr@dfX42kr)zVX8l^vV3xRv*>_2!e^ivke`aXB#wmUgt9Z$ES7rL_BR;GCDI+)>b zr6i{q{NP5~b&yED#`8F7UR#e{S&M=@=i)tOMpzHUv1YgH;Vv@>zq(|bjp;hJZ?@x| z)X`a4nwq6*uRNVFS$ug*JtU_Uo%@!xj2F@)Iycx=_^u~C&rS{Jf&Xq*yq%-OY~9^O zZo<>WJ78AXf!PNdzlXV3ZXNbIcvwK^MCXlKp9-rYQ{`JDQ1&>$s%}VZRM$fO(75)n zI<#kK{hGiMM|1=gkT+r;*I!j09mn_?zYFillXv|%i9PyRazEGxm&lG$qSE&5v%9^9 zc&pMtV2n|BLM9irQ))RA<+r9C(An6uNK>< zHEsSSIT3DybV!Bro2%)w+m{)Il8h2F5oA)Q;jE)lDtq}WT151k``LK!JK(DV_jL@u z^h1eB-w@^oVZe)L>s@+?X$pDydSS&9_Bz4r zD^qHD@dmcy$+Gq0hfyK`(k^ML!hXwQ1?y04OaY!w8daa^fVK9rJZahjE_9`71jIKs zK(*E_`UkS(LCC_}0?-2EIR!)9G0xHPHnK44GERx9sRXXm4W859-A*2%c;0%zxU0nu z()C7lr`Tr+Bfi30N0fqtMWmdF46%ZnkY@&t-#D66p$_IvARXC)Sx(oe;S z@eyUbg+Le{OMa4o+I?bpt+4~!?fW=(Yni`HPN z6y;U||K)W7A*ZmaGEbT^ZrUk6#l*1JsYP#J<)S)LPJLt#LvJ*Gs;GMW5*~T1FIHq|ygUNp6$(fe=E5moJ&)xMg zpAg)}6j_xJJ#?}CVfw?Qa1LvI=cMpV8Jw7UhRjknc8zcK#johH zD27xojpV!&!*e@%wtJ0{gh7c;gCUPThjsGtLCeZULLd5$tVepZ$TW*drpN_!IAU6* zTUzUdJR>t9dH)8X;^VSo6ZFx1T^^hxd9FFv=t#F|VkQ2uOwq(M!*v2bmtOsEt?Dy0 zkbD$dj{_Alh*gGZGNgTKo!l!-pDrYcf5ct4 zEQ^aM1w&F=YEC*%3dh|jwDg%8`sdAQ!@_;a)2wMNVv-3{Q5L7=$q%wpt8;@=i&L`H zGcd!{6Oc+>D=fp6ANf*>zcfb`m-D0mzk(#{B~J@3^7o1ZD2y~yK@cP3rway!>oE&I zhpD2+I#;Bu8Oa3vrL47n)LvwG7qAG$1^T&&RA=NeG+h>nV^? zJf>-6^(1D!!fClMNlvnO_n_1n82&7sq}Ig;Fq!vqA4n|*xRx!sl8uAi8AvBXT8yVM zAYx{!^l~FfC*C-{`OS`{GROu{)dr&|2@w4KJi-;E^q0pFkp}k2JvL!~3a6U~oQXidsGKL6%NgIz4P5KLaC@RG&un_}OrZF~!LzmbJu++VPf} z@L1E@qC^gER*kT$`%BXCiWEJvmv9Kcoeh&T5;Clv#XXwZkPJ&m6P{>{Uv0>smMfk} znuFAVEft>IEaoSX??RLw6}Hj&Sl6l~qWz>3ik`V0B#pVW2B{X=ftewD*IMc)waHND zqY!HhmOD9V+-Pc3s*tM~WjGrWyTtV@3^(6h>B@j5@u4Aun?D9;G9pS$q%tBN8CRVA z08vk6(Z|1`G#}(XaMQxN_7VTaya&QuXEcu5C^^WT6YlOSVM>-%nk*NDc|6x?jvll6n`9jzaB3{mfjYqgB6||Ms`Rn#@0`@AW9v~C4UYX zJlGGK5jIS&4-GJF%0*qz&uaPcD;}RiO}6xBBpJdvewh}-2b>Zg5U#v#(6$ajC?>HU z7$yY)_*#!10<=g_GNi1n5;_eKEzKRjb~&uQxNJZjzZ`urHkvIf3YwGCM@5`gco7CH z@IfXlXd?(3NHE1^p9~q~QsCIAF&Ggnuj@UQ;1030Yjdz$e0)hxnM~^m!F9E!dVoFhl+@8_vPsU!b{FuU~Ss8ufG>1X`aH(oroGMqRxR>q{7g zRz^sVK1aCp=}F*`Qbv%7Dl_%GfJMaNCUAu@>mzMy0iC1&kpR81kbt*waAKy=R1YC} zRJRQ|eNVs7vCj9e+&cANzmN6vee@^@CN_$3I2+V`J4a%0H@w&37F(?p9moHG{7zUh z>s@V?T&xd!2u>|^DOVeI9kKyyQ1Dv%jpn2{Z^51m_YujtNoVmeS8d=**L`F;>TO>s5G&ROujD$}P2irWGR_w7r`7GxhZWrdG)Pt{c2 z7p$o4eUu+XVK*|fLqN#K=3b1e2OzNpfKX^ir#!y#SJ63eSR3miZ=TW66#mK#902?Z z`xsGPK~NU%SyDmJ1?yRP8dz7I?BAJ7375QW5`F~*p^sSD*&s6RZ7;y*2wk|3^=fX zg`mX81Y_huldTQisZyWoyO;OW46zxJ=Gk4i!IrMULIwu38ak4s+QB8cc73u>Z}+HeI(wc|VOH<8JlT0)Hxy+(J$Ru0=XG`e zhqK8(l&>+CCdb?~g@Jii`?}DU7DDR4eICUfti@|s*%8C5j2x;O+YT~$zjNjr=Khu* zrEkb6?ph(3zge)ahu%eAiM&FoC|^vMIT+0`@b_1i``~x6@hZV^neviOEIZGv$FD0{sAx!gxu+13YX# zDmpj^2iLa@97&!c++4IWwXXDWjUB|65j1g~_iYPJZv-2&3;2u9XA22M$wzyc3JZxz z$rUM%p$@eB!{_$*%`C7oNhh_LY6JUP$3J-#YMatKxzP6WZr-$rhMBF#`1wax;Dtbt zR9dwF{T>5yQqV0ezg%f+f$F;-JTQ6g2uz-%=&vVTf7ei8!)YlwW54p`IHM$Typ;bA z1JRleX>|dGE5}DZ`hh1^2ONN)1ADLs&YselE%|n@6$CN%T;b0mbSPyGVVD89E#*id)p%-3c*Sf9S;ft_J7*f=nC}fB+oqsv|IivKoI%SBI z`8Lr@qBl@rLox_}6$ZS?vog*LEoC=a;TaJ+bcCrBuE05&AK-=sO|5Yd8ROLe;o~9h^x7=*FZ$%sMDeXG= zVL~885>meUpNjd%>5P1n3B5g$7KCAi1J#uL_e^o*1sdp!N6MCpuSN*~@Vg|~Gh6Ix zX`>%26b#u&XfWMUf3xjQbB*YSUo-aTABHc%F zPNvXSWH(#PM3e@aoYMydMRs&rwbWsNhzx!!@sTX1IpRQQ4iYwOH+~^9l?22O%KB8a zBE+EZOG6b#9m;wfWG2fkNnjSE&rMApIo|#Fme46n7Cd7Ca$S~iEAEU z;<^rkeg+u&o3v1gRbM0eCSB%e5S8FAMT>QLYq>mzt3P3CkD$kP;C@Rd@NYCCMud%8 ziFO{7wq13+u;;2lTFIQ0zP!vyN_u=7CHkI@n^`9mby4h?9N^hpG*U=Vj#C5-xa2n? zzT=NGTjLQv{rHx@*a>h4DQMwdXuU)X-Cs}IdCL%$N~t5msb1ZxX?DB5sj;wT7e8XQ z|7abV5Ze&?h3t~Sv4=+4IXhUA!A6K~AvT5D)I74ku+vBBPj3SZb4m6xyd!VO zeNy%^^_gU(L0C$}DJ1|YTwThiS^-ycMJ@DWO7 z{i;xQLvR#}x4s3EGsS&Y&&V8j)`%Y;@%2w-QAk`t;*wNpD73I>2&PQW;>mF7FEumo zv$n2z;Kt#Ta`QWrpQiRH zt=K!utw)T$9meLYT>s1~ke|h$WE9|DW26db*@>(#D_RfH6)|FmBq(~*OD!Zcp183y z=#W#-3ecfVoF^D>uh9)9TQP$2I~ixqsR^9%#(|%Ly zvah&3Smw8ug;i~egXatWOQE6m)S{Nu;Hkm$8Q#AT=Q-K^uJa+XPj>5|o;3D+KO5PGMP(N0#5W%DNqYG%w+@U$?506nX-aH# z>{zP3jUJEJ=}wH_NHaK_L0*SS(YluG@1Ngu=rlW@Wr2dDKHM!o1i8%)A*v)za3E1| zw$qkMkApEae#B%mMwLfJv9*0XoK4tB{bXFt$hljD4L_!6QWUd4V7)_4v_xZt0m@ zmnmV#oOu~Cl}yyBI5vrOcDIaQ`gZIk4r?5!wQ=}Q3Sgfm$y(zB>jDktb~rL0Hb_et zDO{g|ZnHAqp4uqfLf9!PsTO3y=Gn_fKWlX8PkwZAC^1L`*>{t+bL&kgOTd@xMF1Tn z!}F-0PXI$+UCpzvx`6wT<%1C9vu zI9m(Fkm|2nSh1&?4Qo@M4`gGjv>z-piEKLhF*PTMRj{cI&iarg5k7y355zYp1V`{# zm{$t%4XKaeBy>(u7VArK64qirs_aDJi(E^V2pe{r$7QU%j0N8dR+L=nfA-7w&2&z{ z_pJ04fi~3<|1PhM(jcYr64}{|ySv?bJPwYmSPrNGrv))WI%g*CB|~_=?sQs^tpFb}qH}BzmQ8nOLyH`uqsiWAGyr95jHt z&AK;Zq?A6MED73F@k>#W7$|9m?iZ~cWAf+GzB^)+&>eylMJ8(r(zHGQJ#OZVkcs`- zfcKcGN(Td}(18@!Fv2SV`%LwoZ($>Tm;+YAiF$Ewv`mnLk98ErFhmU(H;Kx9k|r*- z1`UICPtUW6U6>Ph-?2?;7BgoYZM0fhFtg)j$4NU}62n)%QKmyYY*LiG3M zzgY+cc##9;9TgT+E7y0(r5C;Uag5qM^$qUHK z)-mvxbPjaX`=NVZqhnx;6$-L|WrtJaZ;a1zHTjnevtcxIK4rNm!g8}>9Nrp~!uc9< zYd&Fq+pWPN8rhfKLwAKEv39B_T7`3*gv7S>Q%w;#FEvFu5$3cIy3lCZ_OK6T3n$e2$AQsJXE!#HS))1v)ot8lMm7U$@t3aTmLiu2iy zdHrQ|{)}VKGpmWmDUJ(Ep%jGkQ{FHkQAUadAlpN_s}33Ba{4Q6GH|xJ+!khDhJ+1yk#Wi1vAx z3}7~Qi;1^ln#_K{Px-^~q zf7m+<;7YP1U5lBSS>0l0W@ct)X0@1F%xW=9Eod<_Gee7+nVI2f#^JZKp0VG0*I{q$ z+Xx-qdljLod$LYtW<{Lu{{b+w3M-=3&I3fq(-z#G-7XkjUM^RndDo-i@lRjg?&*kK z(i}7S8Pma+A8X`q0UxM73|GIrHcslT9wgV$IPI8Gg6i@&Lo1&z1a)}d_blRa6L zz)(1#81!4+wGoitQPVGmo=U(!@_#Y(Or6ZG^#sfDJ2L-?AWo-VsYF06=`atp3PmMf zvkhwNTxG%3LY1T}^IcE_I?~|?iLs~_E3wz@EWLLW3ROUAELOHcCHvF4W!7|od^2urNO4N=ShN3jRZn}v315&7gFCjIsz;^phM38l;Egzc~HA;DZ zeWL_S-pnLFZTu5fgGAJteZT{sG9&!3<=hheV37lrt(dkI6O)I0t!au}qKh34=?ZeG zfx?2q0J1_?ng6M|hi$f<)tpEL$|T^!;8dXo(@(knHoaQp9}oG|C-4VXNq73T6wOHw zxkEVjQvGXj;j(({$IVnff;CS7`0Ywe;K}BfXy|m$XI3xhpQ9RWl}Cg|XssU7va{Ps z+avq2-9zCIoXPM6w0|TWf6H#cHuD+bsmKx0pjzZbGg{ZvQT4P%dPrSV=CWRXw|PB% zxI26JI>9@BDawsp=tyb31yWKkNGaB?SKwIQn0M_bUYdF;n_qXZ!JW|MG75;NySohW<2@f5Z~_ zTb;>&gn^fi_(hk-5c4?IG-3en8EEDk`xJPbsOq>G+4pZ6*L;jv zV;aA)_AI_U7*zH-s6P(%WKuDYvNhf4duSd&)r!7oRps&yFcXz870Lp{=Zw+A>KbLh z-rtIJD6bomCBS1EWwZ<%VyHoaMmO;xqn%E~ei-Xu zf4j{4F*4^-zrgu;)`ILgo}^ps4X_t1E%!&)@qd8+$KP7^^z;nB<(H)+*x|b6U_d>x zwq|4L*50;0u451|ff%Sl_bcgD0ua-f6eFd*WNd1FfTT5zI_wg*hgwm{hK+vF0-jUa zML|M5^OT@_z{$(*x%1YPv{u>18&Tf|$99Z$&h?2J56SnE9>A$Zc|0>1u*OcOzfB6Fc&W7{vJNUn;4gOgvj`?5KQT?tWf3%&y z2JhF3{4rDdUuXOKip=!kbo(*>p*O_e%1ulkq8$I`uldKup3+pm$kHGy{;4D@_0ItO zQj_-(QT`yeF#o1!`&;Mza4%*0_o@!szo-Qod0zT+?OF8 zbsI{48%KDXo_x1m4gL5MTG95&*H)Qlks$d{Sc6>HR%SpUCcg$WUl_EDIRKQ5b%j?! zp;!1&8vsO|p~qls9sN_wgH9%qQ0ZAH&ZFpZ6}m|I>@> z$IG(!jq9nR(=v}S>uI=|br#X|+cf{}t1NBD_n) z5$i-_2>4rOxW=ENE~}U=_lGs@a<*M?m%i#MPnTa`OuHZh@3t&!e<>% zA32>2Vr=6)Qi;CkC-&W9-BkJ6X$Oky(S&!(CXoRgvF<9UCo#JW&EXLJ;`=GpLaa%) z$SC=^kMbD zIih78Ju-QGp6ALbIhjS8n!;^9aEArGKI6Quh3sdt=X#U%@binB>RtDgXjvL0jda3T zps{~`{Q!$D&4X#$l1qEgz$PA>pa2+Nw$Q==EqTaIW(+ z-i?|a8r|7eRA#hPUQ9J0GIfmU(kxX{c8A-d--WWaI7R9#hczZ~3Ar;Lr<9hoA1X0t zT^g4;6GN(-m+q@F^w!K=Eu$A)g03bg?3YC+XogV<<)T|JSM#GY%o}vBUPe6q3zmpZ1YyE;EuQui%t7>IimM@F7! zIcK!hSj%s=tOjcDdx$Odua_6KxnxCm;9i}WwmSyx1MWRsTBq?&&bneJtp#0q?`fXe zC|7H8y6()G61XAIpbeLQoLus-S))-y373o9pj_P_6SSGPHJM)aRSKm}AEq#Ajq0YXR zGRl)tcE5QvEdQERc+{vSgquV0ByxpEiDQnu)MOTSwJUSG5^d{&$6E4l11<_73Hn# z$LR)2!g}-L`r@VMGnQ}bG8czf=DNFQtzNt8UNR1-AUOt5#>%f*(CD#15;dU?GGFDL3gzv;&I zFYgT5olzQUvW|o<$96o^tbMz;y&m0HfAVT?m2_w@zvRTHSP&&x=4{vJuQaE1u<&ZP9H{_Ge2|VhUAg8Zj0Vow$u>6uugEfKK??<;ghNA>5lhoaQlZP!KC_#@aOtruyBh z@P7H_p!XpH)BwlSa=8)}Zmge&i4pvB(X)3W<)w*=I<{=tJL?!^+pPGqD^NtsDSyFa zVcgLn6t81+P>n|}UXuX#z~sY9AiVLz0r)$<%+~ehN&0ewmFIUE#YN>EZSu@x_2<+2 zSY!sCI^ z)Q?JM;)RzEU;G?erBjFUBh$jNIa=p>iA@_e2uO^*t?I#1PSl)fhlh#a{3NW=bckrN z$NG%k^oonb3~9qghqa=0I_n@@`cPRb|G=y|zg9_5H>Fj%?N8O09)`3h;YWolT+fr$901b;?>x(pH`pH>KgYJ!HWrolX%}|Sq1&o*km>_rFSh*HB3RIt zu?>~%G;5!+4WH~}aV!PQBQRZDsQ4L=RrqzUh_j+a3!T~n2DrVeC6b$KAdNPB(UX;o z=VEz!>4>zDH^QTAe^jS5I`UFY7iYU(htt&T)#ISMziTojGPy__TYVLV1t7Ri#M9gT zF}kqcXnjL@Wn1~q#!sS~X!9xkF8WH{mI)*!%jR^A1Katy_ku3qPEmAO@iTP_;VngwAOqgovQDuO37LdA>sEnW;u)J-_AyFtjk)-R4y)>wQtmk!=S=hI7KIIgT{= z83V|N^IR=J52mx*k}N^4Qzd|g;r(#q-*q&g>fQP@YODnEg6xahY97K6-$59~;}yd~ zl&CS|Zt^9*D{65(p!y)U0l6ST2Q|Wij8cATTroI4=VtCa_#B5t}@z+wC0uMO!}EvPQ( zA-JE*hY0$ZrAzgOIjVpx8>83)-GvgwLj}}be(tWc%?vD=#x8Fz^TmYRs@_1{P`|c- zD{w`=Pm;vO`9g%DR>GGzO!a|2W@Ayi&rbtUZOp)q9V?D-+r&Z!t^tUs8Q1~m*zQwz!1*1aNO7Tv3V;f4ujLv!aM;|J^NJYH0Krrx=vObb|!#| z;gVG(&umMisUQ?b7^a;~^!;v2`1{Yk?YwunmVt~l_Mqm6%jD^;YsV)^PbXn&KPHrB zkky&C$O-*?(wJa&=@n$ox5xd=4X1AaE?TefPTwsj;v7Cdv`wdTK7JcMTT}wIYH&&d z;%<~plDOu37e=JcK(|8{yGw`q@g3wCNF zR;yn4D05s`N|G}9Ots+8)10mK*3tf|*44(}2Y)qs(|l2V$&H<{>@Yy1ziy-Xb~PTF z&^Xd!ah}=LUa@-j3|=2NjDFN3uRXX7TD~ZlA=aAi;OpAm1sEi!0*Bzw35S5YX6GAE z;M~3mAZX@_LtxzSG465nLI!Zb#TKbQ1~<6aAuPDq&mlkyNd3V)x7(d`DeTXj#vW;0 zb2#%mEqf228BI(%*lUZv4b@4nN~?@pxJ|kCV13(3W8sWTb^18)V7hb@RV2x{`zbZ| z27r94-jwks0J$W6y>r1OAb3b07;AnYa2^$I6OBgDNhWaKO(O8lRX!N3{wBb#|7GyC z&Nh1i`nKWzmk8R-kF17`Z|AFs&H@)SZq=Iyj)^BPcC4A6lG;=;HRb+w#n z-=SXR((-a`1HbDLQt=8_p{=NE53y%%V%uS2{rphbRB3#dI2|%DE_ZG~rkZ)C9c`G! z)A@7%vMxR=DHpP&YyS<=oX4W+6N(ryhVuMju1cWZ1%;vpB*P|=5(@;Gm^=;S&g^$Z z%I~EFMZ#afc7aTAzOy6LI%Tg<1|5rW41yo|=&L}rR|C_+C(hx- zifXr^Uy_lcP5~???_EoM}fhsyUdbEr(ASoe2xgVqT(jYQ;@k;JREZ7<;(0& zX2hDF|I1JL9H`He8Iq3#-hfd{8FFsKgJO)mXUQ4*xwW{TRqV>pPMO<#rHz7HDzuLh_E#9KuicYQ{|F*34#T0QIyv}72x zlg7oy0jkQ>wH_G4h`j5il$6^|=MD!iWFXS&7sFgEHrgXvi=LUKu1RELPrsX<6~qj! z)|(+?VAE1Zp{bhxXy377SCeC^nGm~Sk10iZ5B0hM7gZjK$ar*XUZ>d;RH}*di3>}; zA~E@c;yp7s1AOZOEo{s}H~rISRMKLqE``tIXFq&x34;h8-7Q51r+h<7(RjysQ9cDZ zh77t-noT^V-lR+1*KH;kM$CB(Xhoz=h%bM^II6N|oG~M|qFCwQqKk}N)E7YBT>sjC zy~)jlhvGRVtUjJ15-q*dAf>TThzGe0nN#NZ#6&dfm&~Sx@4oLInFubntmqU!nxMeM0iqf&3lRD zKXCWO5I;Oe+|-;>>BqD*Q**SPLV>vzb@?8rt(C@|t(7yTQqk!ndht!kkE#87NrOgK zr6Pc5Smj}6<9rECk4kL@AQyNaDkXAb`oKVn{F6+I$l#Xm667uUAEQu$ye&t9oTEs= zeNG@@yyP>p=@Oeb*Ya}S^Iqd8YPJDhNFmN?ab}qeDG7(8@t7o$k)Yj^IXbNabH*GA z&5!@pY+C+MRv2j3R`?dlSsdTgHRd8d1Z-0;IUMFAn^6BnHbKBeG@gd*@JieeW# zIgrBIK3~GEOD=!EEr^1-4Wsx5Cpt%B!XCSLW^__6zmNt-+5Ko#M9Nzz0giD2fXbvL z59``gKHoOo6R~(k?@ZM;38$jF-geWalGSqhZr%r&Wqo|?gvXIL-;K2)sc?1x@ECP( zg31DiCulG%S+?<8JgK8^F;@Ff%Oz#K=k{O-dyxMwfiQ-$}C|? zxG43~#mjUAY*QPu$$i;b+yx-|p022HSLZ2RGGts8v^EN3oPmEYSjQ{^rdXtM&`E|X zftvohOC?d;73@%B)ZNC3oyoAqxV#Zz4GYQ}2x8y-y9g06QU}F-TqHkLU66slIL{WC zON46jpqst=0JqrGd;&<5<))rCyuDDRwzn5*D%bVF3aG$311tJk7;dm3*27J=*>%@Q zh?YzyvHNbgnP3rxFs758)7Yi+Xe2Rsd=5f)D_r}ts>y*Qtkui6_FfexO}(^F>%^u( z5|Hc`aklF}-lj*gyl?$!`5m3qBNz#g7pqPBT>MyEA$Q4r{@5@JIW zmRPvjptAp{>a39haEw?bOp28Uv&kI6@n}a|p}6H~M~AMX(rj*3#B4|F`yQq6&=`=3 zG|2uV(~|g$o{`_mT+X^so7xxFDUuzJDT9b|ld2NYq_xY)iFp?>$}Oq~q6DG|AWH>w z18PdcUXUFMV^BPqMMQN8LsBq;8A0%Xt$5Z>;%v4?s*bsqK-M8*BDhK7FgCs`B|b<@ zJ#i8?yc7+&M^#z{^>4)e2oESh_J@$S;LaTR74a$*^Ac?*^|7*NSYOT3kn-Rr;~ox( zgpC|J3);2~n)BY%zZ0!f4e^INT<1%4NlA|1dU^^Oz8R(10NF|bIS5; zTuV|__Ye2yD!xe2qs?0d#)A8Ext`|iZGutsGUb8;t~AabEP2vY%e3;1-V^C)<+5+i z`>l`K;fa6?wn89QLzwq{x=u5gu-a$q{f1^v$js4vNg^&l_x;kzN7rcFa3KaTbIN!W z#s_@gSVJ37uzP3sWn1~}M{(R`U-5R4%zLNkLq4A!A!{GtK(83;XTD%z5&sm?;e{_n zYGk{j5PH&7W72PI`y;lRWv#>OLQgs`rn;sVp%sq%S=&y3r*--4^B*=E;Y z_^0){@ZJ-K4jP|HNQ!!kl|dby&Dk0QtKJ_ee7d`We0>~-1ZX57Y4ixe$Af72Wfp{H zQ9NiO)CCquIkF+rnD#tT)0{&AETFbUB+T9>Z%x1cQ0z@D01i@_4jwUKLJAy=a?Z)x zPK+TvdKyViUnoYkPMl`-mlY8g`G~r~JqR?aAesD`6)UwKNnep&RFVC(3!zgABvZMp zuoCxvGeodTo*&`akq2{i(az#eraqi+bxSzj4QJ^_uD+bnIX2T04}E)!J6Va~W&h1ntOOLTJ&;SH5rMTK889Pdr% z5H{xJYs5rfT889>QdZmoQnC^P<4UE5>jzsw$LP5X$9UOJp8s8A)Xs!J2t6RljyEyR})Pw`2t>g9ns5wU?$C zv`?9&>X;C)+X4otJ9{WzH`%0h)*HWq zir!va?`Zm2v3$fjGDpv2ME}H%U)>m|LG}&u*4a_NBwo%H{i>konr^KO>lu2$jVcl4 zp7U&Bf|#2#`V^PvjOK)kG9oJ})@>nDD10P^n)CR)YNeWpjJ<-6C#mThDrT0yvG7h# zv~1HijO_|hYWjk#2YT9FmW7l3q@7ANPOmnR?rtSqMva*^$XOHrZ&x9xi3?v{e4Euk zYPKDPGxz!8z=in}Uh+SB4M=h7x6N~-SrkvcN4UC2DKvg>Y?|Ew5CaM|Udq^w;n@}y zs-PkuDSCbomC(^_M2S#YU^yNl9St73cR_J&1=>K+&r-q`enJEk<12Yk!fg@dgGW!4 zP@l(BofUk=4$ShPeo#`92WK9qQaJaG~ zF8xmRolA~Awn_??MRq5M?x&Vng9f4~&8JwE#O;I^LiixZVoy)_NxS%6tp`p+F?7Ws zA4S)dB3}s}vGGuX!I#@s!98{|2zKJZ$d6P@3W>f&FCre6Q{ZpJrNy-m$NUxAh_s6q z0My`(z>Q^!RVtVvl~;Idj>2iwcIqXTQ$G21H{i@~3kpy%Ag_-Oq{$YgHbkV_q!D}R zCPgWtVm_5Pcmx&-LjX;H0hLY1Fcy13mrrX?DeMMjT~Gw%7KFe2QwM%H`tK8m<&mNbxsO>>5$tZiny&z~N zh~7!7;-NqzZQ>kcwh30%ra%?p7-jY`E$oOZIXBncU$8ihG+9!1)QHjq5bSvnRYTQb~9 z3LFE11AXzGBu3^%i6Gh&k36eYFGr_>%bYSq$N2rzvY#b9pX+x~f8hbg&%{Yp%rv-R z`vb|qx24y)^9MwGY!32#an?%3iDdaWm+ALEp0GLvl%Y_agdIgi2OM3>z&6?KnUQM5 zv}3fTaL03~hcUXfOi(BK7PerD81Z`@naX8)l)i7fVVMKZgE}_}MV8>_>KvGjd-Q2v z_WA9JAfjsWsBA`SF}F2HYBhCWuki_ft!DA&}^7@(MILnS_PQ%GmNOKm(EU#t=|FC`1d z(;zz=&Wkpi=0bP5uN30SEJW%8a$SI(Sc$C(a=rP4Ad=~#3|dJVtj)fr)QEb1M95bA zQccCBjZn(jdNk~H#%}s`RZCcKB*|~BuA=^GxhHIGWu00yx$PRb&A2TFm1`)Bz=p3} z2HoAk{fIh5b_}A}(z~-ELdy}{PbARx4AD3WQ9Q}%L4-Fo($44PYUGR%dWwvW%sv2n`18$oeKs$Dmp=;vmCQ@(IVYPuP z7A9_uYal2VzhlR!oYF~oHK$g!P_sV~Y*>4y^p&#*ZmW1G<9Ylx0d8xc+&7Sf5dz}g zyS4MEY^L!|G?%es=ykHDD^hULJmI$2@GR<6hp<>q5M%UHVFK2C_MXq}%fIG2E_$G@ zz=~x+c?wO6+ThCU&SS59I)lI~o~sL0cNDdwjT#2R0AvU=AZkPz&g2E*CRni)kJO?~ zN014xde{S&@i|1uOiw%%j_Zor%mc={Os@LLuT@Qy_$Eg=Cl6}R0YeT%68Vy04QkKk z_r*K!38ja7H82lY4nOKAKaL{_Yb=iHOw<+~ggMNB=tx~pV-iSuJh+0rS-I&5h&ABu zuqa)g3}WPGmZF$(GcUO0Y&s z6b+%2gZSi>`9PFk;jT&{Kj7|aE6NDZ6p_)| zddbO<8~*VIRZmyctJ_Ok)Ffd1cH-buX#Y(SeHsOcx zJCAcbQNBR0Lh?P8LCBgzV$L@(X6KlIPlo&GH@gJ>!Q{^}LSJ|mRYd}g>wwx8B*{?| z@xyL~`BlhK-O^&RxkX|Uls3aw!Az$lL?7cNv0lRPLMLtcE;tr6yzrhBzVyL43??R!2Fr6_pKu?UcE2$W>toV-K# z17ua*+7J>(aUf4OxjAHMI3!$;sZ{wY3%Nn`24#wrb)qfb1e5&%)rhq|YgR3>2!{{C zIztgM)o(#f43qh2=8?#Q0BuoDr~SYarsxl#>lUjK7+``EXfmvpZq%HF-#a346k;Q5 z@DDlEa)Kz@CT~8hb;jWo0cev)(891Gv;@h^v6t?8l%RG=?f*<) z__6UK?y$mhFJKqUkxzeSJ%KPf+{Vb~@tXGJ`S(BXjCZd#KRez5(b@F3o-%Jicqx@d z@i$^uwRXUjzZd}EMV7LKP!U69o40qzz$DVRs#PX;U%-|Kdusqz1Fs2)e*4Z3XpT~w z+SckuaM_@tN2^ZdCIw+BoNq|yyFpY52?cUh92$%UHJ^^N3n8$vNWf8*L_$51>0QpA zLR)n46-vbve%@_4M`L|_Wa-Zdj2@ey_dh0{_Gt2FeXByS zuU)wADb3YS*c`ZFna${6t{O&aLmD<}*S^6N0pXJ4T7cf!y@vGMngCOs8DegW?L@1n zyKW2tVV=aF;`U9z;3FI{$Qt_7%&$|?t9aeH;k?JWDUB9BTv$vq!IBf__Z!ZsF#V+h%k0x9mW0uC4n9SU?A)}ec*t#)H`E30TIIH z1>>MjhYP{Y)?}7*Q((kz-uNUvoElS&iAh4q(yq)(2y7Z-D5BMetP9XRoKoG7EFq(s z8R3aPgr5%VN+7$(O3aQ^)+hgiKRmPoe(R8SIEGJ|FdJDHUnwqbOzefIXlEGh5rR0D z&Pu8Ti8A#EDrbt8TPGDQf$fUgaKmM{YpyS0bwNyC+ywYBVLNIg8;@#MmR(H~*LiYT zMB>ETIN_i>`v7yl#Q^V~)40<(o~vdC47d6!tXHN6Ug`u^^fX?NNcd_HH6lLDwaczz zl*U-yAQT-Aa|#QQuGM1HUPJ~c$yTfy@3{RCKk;LJ5&N4MttjqsVoJ9uJym1NMx)-1(=Lok>Qr$G=| z&JoH!JJqtH1ECw4?KpPps0l_HV zm9NOM3b~CTLm)a|5V9{1D9@OV%nug(nQl(3u{7L|w^M^Mx3hvW88d>=xScbk1Z7vH z1!bwTg652*#^|ZJ%UGznPdRx*T}O|vGZ)9rJe=4D2#)t~7BR{)x{_zvRWmw3zRp74 zqNvOcMG;_23tp-#uA9Tr%WIB`d>d|BnjJ4B9&ITYS-3;rKO$C7mjmZ&a~>c0a(m-+ z{K`n=o~{;|8d5Fq0=5>?$0$%nElsujkV(&Lr{^1RnF}iTsT`&><-svG&Upj0<5K}_ zddB64q16; z`FLgm(Xyqy;YA%=&Zx?l8AI~!9ms3=OAvPn@B>TKwO|?e$1TQgsfU}imDkDup09as zX)>6m(m%QO?St%}fVwa>+%9-BmJ7xkjK%lgx-|FB zX}H#BT+^Ugd4Fi^GIJ6Ft9?8r;7>Q9u4z)AW%RMi$7yDedLo;OdzfDC%mr+7<`j(F zBsrlfYk6Fx&3Oh2R`KdJ|5#e9y3Nn9e;R3ga6yyq#Q)g(@oLrSkrldnKz1&TY;kf< z&zKmx-pgQYo5E+Oc{&9TKI?I73w*sjPP4or%Q_4K13VXtSmkZ4oyOYz96H;^5xR5; zht?5U*wDsfSnl~+;`9s`IhP@VUh8%P?dEEx=$h?7H z!hwpi@m2vu@$*zUBUAAfjdNvObp5dPoF~tPv5s}_hH65 z8XwK7&7)@pc;6bE=`Bu#b1SKZ^6i;{byajzvNp!0!ROA@P6f6K4wb)>ui6|w=jSBGk=Uf z;9GvlRrDV|wW1ET&UOS`T(p0R(XSt&XcY-)l^pbK9PRWSjBO0vplHPjoE)5ue_2I; zt26nJ5T|1>zu+y3j(;XjA%3A-iV)HNppRqumm$7?sU`5AN5cMAxc+}3PFenklf(br zh*Oq-A>sQM#OcSSr~mcx|E?VW=WnUMvmSq({;$;I|2B__|K(Wxqli~+xcto{#21a_|so!`}>OgQPb#ut!w|l z8{%)(nEy~orusz$f)V-8B^l|XBnML?{*mk#>+f2&zuQ5bk(r5xiJ5_poq(Bz{lh<= zot~9|nU0Buk%8rxcdYCm4(fCaEFZlI|G)Jm{Dw~Ewl=>uCdvxpP_!Sv2*}Kwoa`Jq zXlWfS-E54VXbg=VoXjn03~jAx?Hp_^j18R}X!OzZFh; zdPY{p-!id;w%Hl-A^7uu|237^{+9)sgr`>qprX}at3r7kkXx}}%oVE>goFLu| z+MvQ2>2aYCLxIQHd)H_gd$N= zYfkU;zCGgl?)JEP-u}G({Qdw?cK5vQ^S=2y;)=iB_hTelE-5$v$^TY~pcJ3C<3)x% z?E@jc^wF(VuLebRcvy;lcl1NqmJHL3ubJyXr|z@JL~_zntj&$DOwO)#rRqwQok5CJ z9$(HxBHIn-ZTETH9O#iQ0d_!?*HTdqb=$oLed}*%^DFmVKMT3IB%^2xqp%Xr|E`nk z%wiv!LNL@vBA!^?YehxwF3!7r9cy0v=94zUS z;AF%=%-$=X7=@F`i96z<1#*~Ul%A-igQ_SDmZQM#vZH$D z6yQ{u6|0l?6Df*O0QJ+(Z21OuDk$qzPbBUGl6)CytYS(?!~x{JvH*mQu&Zo+;tL=w z4k==UTK&8ym$xVc#8i=ct>wfQaMVHvh519n9Nj|`Kx4H|EjIc?bkoR}vlEsKb42Jv zYUQ&IR$OOlzJ^9w(l}zWOukOto7nZZ={Wh6lTy=g(Xh}y0RAj%$w>^D9H%`wF)T*N zjk6^jiGZ{I!+9iF?Ns^$aGIm_NnG_2@N*+M9BrPZT7}Gfug+Ib~ zYT!uyeQ_P4`~I=@?9*OhQits3_|GGu#UqTGrE43{(&GL-L2O#1d z9?hL8ds;yzhxsv{xZf~KT`scaPi?=>F7$E|F;#sw4LqrrHR`Q4Q~@ymp>I=%Dh4QA zYhOt&2AbfUsE(hPW1(r1?@2_g(ynugsZiBoX7U&Vwn||KeTa;TA)*W?bVRPg9T2W2dvsN zbA%*!HiX4-QMi_NC(({vltHMK8Q{yw5>?RLs``}$tlFnBv&yMtXZ>4^F@%zLi*k&@ z(MtN1(oZo%Hp~f9!=pc{@6^g@Em@c*XR`a8?&oMAOL%TYfr9Ot_i3!UjR#@E0>fv=1XOaxzTnRcLvbI;IU5^4cqhVF!Du28 ziOrj=IyZwAOv|j#w0sE4zkvzIFNxbknP(&llTr-T%D~Uv(r*sGiYSyYI`hY$c?yPl zDW0&d(ET`on~^Y(LmT4c7w!w+Yi!Iu~&f zCy5<3WnLO0_8c5fK5!FjtfPrs0CvRm35WOzVH~2<#WjV?=cizG2`&m63{VzPknv$} zjLfLppPd_wB;!=J2Y9OK;$R?EWjr}!Ax@~7PT;Nwlg|2ZO`KZH;;9*wOb{)bTSyY> ziiZFTJV=)=0a@)N%u{eHYW0INJ6o+W1aZGk$f>!PwxEv(?m(0+YrkjTe3I0JRDYHB zh--M5ZWX-mXxJd@JRtY{QeUHJf17DK`4vt&-R03;$-y#4c*M@IU2|OxLU0HM}>{6;OrqVNe>&RF3nq)~ZjaQEUhOy&WtnDHQi?v7xp za7@Xw{KHn%k69-ISv>Fj(($j((>-&ZH`?PCJXG&66?$0eV}=s1{A8Y5taJ76gPPGa z?+YXWoIjEfypD$ES>WB|-a(Uw>gL@Qd|t0FE-ATgyLENTl@D(%cq(Xpe15Jql9Fl_ z=hP|7xsdaFXfbDb-KD=Z=LD1X0r2XwK8oFBPOOj2{m@Ns(_^4X3mS-R%YFqik!*qW z0M4kQ-y!~)HK7w`PH#V=1!Zq5gncG;$5No=%7Rsf=KF>)@YI9rqI7 zWp`a#n<5>v5A2PA)C(#~bdfZVDh_x@i1xU#L~2et^ISjqo!&RhC!HLpQUXNmQ0%yJo=lE6U2704bmSOhqFsF-a zlSgaTSjtR#YcS3Pa-qE6iL@|AyfJYEft+ksYJm^KyYtTz4(u>lkpP9e-=ThPq-D|3 zVo(w?jxywt8v2M3K|$OT6Vi)lGh7U9ixB2@O+2}M6@VVwlUo}h-*(X>!h%okHr1#u zwFrXnIkYU*Qjd-{`r(x8`rVmcL3k6BRbd-`iB8G8Juy-g@E#ul5Wh`+t}-G9Eug_L z11UGzP?rg{>cSD&2*{-X=CAF-;s){3obk@PVt(S2n*vN;BQ{)yGN-KB;(6?j! z<{D7}{vz$TFXz zX6erA2UoB4YC(=RVb!-)Qa70m5$QjH#^yl9t1xpAj~DhSAFOYqE>Aiv=u)7KaMDDw zpXC;t4?jg5!dzuHCYdBO(G$x^Mw|Y?O8pukQaxPDqw4&wn-!M~t;abW@FXc$qnxjX z99)O1*vzS5Z{{e)OpQvI+1supT84Ok0n@*@nii;A=DX72g>)ES4MiaTnwVtyDWo-Z z05|r0QH}$%R(0z%gRjPR)Bt&+O<^-ykCT zogPL3xDgl=)=yEGV6e{R81^MWNk1~b?*g^l=7F84+(ZDOb0lz#h@B)$6CJrfcOZw8 z5$k~xdD! z5)(2T685j9mJ`A9os9t}BzA_553M(6A?twk-2Dve@iG=v{v`@FXttV_uW7bA(iGy1 zjTIKup`KH32gqWwdgv!3$P$SSSf$2tzfq8-`myqZW@Zx)|;H1 z(#RNnqw)yuCS8SIk6n5!*d5ylE}Fw86Ub2DLbeIwJsM(-i}^!B1MZ;>GZZMIYKeX3A12KpHtlz?KxM>g2eR3+TO6Qwn@%bJr1dowJF1 zFb^m&wigI+fKw8KF*57&RYmq3328`-dUun`=+XBZ;dp?`COF@LYD{jOLQT?ET7VP8 z+X2>N!#2L8qj&l2LhR1BetHMJ`z3v5QQy}pP!Acku-g%l+4H{1@p6pjm%K|Ps6{_| zu{C|OysnT6(J#SDy$J8fXN}-1h*h4DG;6=)}~s0y7RK6TAl`VQ0oka;yi))v9)RvPIQW0Gr> z-%eTh2%B8`o-gTvfA=ytvkCs~vu zM>7_r(zL=^ZVWpEKxZo?kg!(a>sE&dD(5&$pfH$e44DKO2Ccn`)xh5_uz+Hi`>0 z)S=3I&OrQ%H|*5s78IJ)c@mOg7WAFd@h#Hv?a=vSr96YN8bhh%3jB$G%|jQbl}z%76G-u?xPA*Umm-#>g<@reoEPR&INmyr4GN5v=$;Y zV@R5=8nu`Go6FNl>%-t1bL8Z&SI~4@DSdDgtq+G)l_Dz^l{Z0duz`p0;Tk+X0s-yO z$BT-vT9yNZ#@7cel5o0r1km<7i#K_0*On8}gr8l_f_4h(?A@@+AV{uTUi!bV>28&L zRb$@*WV7L$esX91F*RyMFtxlYIDcYApkPmnOqNw~{Kps)UmZmo-|lqmesVznG>wlWr9cC+ z?T3cYT>c}cXWkQ|0R6SSKmjJ33d4yffs!Qwn9AZ-2P92c~;5KA>5`x)avtTPlB`M-dl;J#`GW-Vl^b;w3u>6 zvy;|Bt2tTgrLX&wcm535o|>4}x3TDk1FE{qNHQzO&W@Mr`&mH1^6}7+;AW%S3mfr5 z`r!PqfRU`3DGwHSp))5koSpX^`u%ack+r*%xY>-R_M zqcA6K94e`1HYgluJVq~2o+f)4a7e3Hn60R#flx-hO3HV|&` z7nsuUGwePE6a6lgYP#D@1>SAyeee#op6eTHRwEH5-$%LUX|y+?FGiryBLB-}(LDjJLA#-QNU z(4wCcBnMM+s#Jzafs}B5Z0(uympB>1{DDS?ezqg#vt~ObGA%cY8vGkx|Y%U?gzIb|V{nXXn)tIR@JpMJdXR%;0Twe$1ZD_6=zwLkvxsRX{Sr2G!cGtB;>U%b_ z>~6SUKbQFqUY8D~?%4!Jn3$)ur=baHI|q$nDutPfT~4P8`V~kmUyf%jvdRc_fU?H& zn?IscdOQaGmsq(mO$2_DCH-iuDi)A#fyy{cHH%io*Y0N>=a;e_W1-}qXrS{nxt6n= zab`+L2vkg5lNVK#cBaU{YhC)3lh35*Ou3QnRS}6Eq_;}m@}+ym&U+?OiRZJowMb>Q z>P*qrG?HrE#%SP^MWsPEG4D)mKqJwwV~k;%4P+SX6}YI{hR50Bl*L7Oy0(EYrj43=b$1LLWLL6$Y;q2rys`y|i-VJCs3cp3Z#5}Pqc5Ys~`&uELbw51M-+s{OV)Xh#;CeijO&oiv_j&Va~77_3QflH3Cu564R1mT(QaCh?e>MVbAPCG$9rVCgUVnN5W`o z=TEb@!9r64Kko~Q5pub;v=EqZ@k3c+BF+g0BJS?ptVCunp@&TtYV&BPk0amwdU)hW zvAI&vc3TFvNR*rlf9BX5#-}E^xt!k!He8#Y{3K5MluhS0bTmeGFpIcu&)wownCGc< zdvh7%YR9Op?EDtQvoK`+DrSb7Ig59~-`w{wT#I4;l0`f^1QG9FPpYxZ?D-oW&HgdT zDZ7Su5C!^X3gvtOx+ClWH$p(N7xlVSpkfZN=s4~Xq2`h4`l}0(c^~C0r!#kl7U-4b7U!>C z{@AuG7pQuDZx&oT5J;o z1fmWAq4d1RQmeT9+fYZ$fp($WP|baQm)-i~iR*pL3DICw<!g{l!!ONHKCvD2cvv)Z^sJWu&n_UkG{OXVqJF^h;EPW^&?!C=7JU+15>O z^4+yOQz_wkYJ_k@UP5!sq>PnQ^*L6An*+y!;OgnYLbX#=lBH}yC+(RKDrZN0<{q4& z#KkGR9LysM9Ms8HdonzKDmkserAql-(XaXD_|3wKWyl~UPWHM8H*SoExqa9OU^43x zkP&d3_cf6F7EKW9^3wx3AY@jKo#$i6q76e_^h)xxE5_6P3nNtveuN{~cFor80zRL; z?VOCdFvdt;-2zOP)4EDdGf}(gW>!O5o{@ z>@u|u4^6@3^^dpqKJm1e*zw7XadD>NbEmEyp+Y8i^qqDIxk%Sx&rr3UaGM*?4}zIE z>8>{-{QFGZp1o_uuB$V=#OJA9!(V=tyK9m)w%}MjI^Qny^x{#kLs3UVUpGO?Z+LiK zy&U4V-FaDvi$?~$qo#=H1XGAH^=lJsYs+2(V?#qYBI>gGka|O+OWdpsA8T?)#q$uC zsB!ZpS4q=B$Lc<_`Q%m7#2U)1eqa0!v@#?CVS^1rwXg_AEIPz&c zHB(8^w;`diBTM4Fi#Av~`OG*swIJAy=m?S$`@1hLUwQTS3{Yr^?<9-wWnPp{K89#W z3MJOGb6Wi*zkUq5y+-9nwSLPOuUM@~wj^?pM5l3;fp16k%J`Z_SxJ|u-|zIGEwb-g zvFFk2Ot)pkLM4>rA}ibY_^j_={l z@{asWozK~-JRSS@L~PPckow?D_8w2~)$B@D=b_F9x|-R~fOmIndvD8MVb{nGv*C4L z#0#IL8IDr#ZT5w;uiFOB9)z|Hy&w3diMdfbMsVKy(3d^&bcbiMHde@llFUQocX!6l z($aMvsWqV`(Hr8~E^AK1JkhoyY~&MhG1kl#Td&9ZCL&Nr2u(Zl0U*PCq^6D#19Fx~RJCT5+HLoOc)t|j~H3^x#hK6CCknAN?% z)cUwfzJ-ms@xup=nSG%%gpEYfmEeKxXWF-<6ka=;MciN6!OfuCFEKb%r{*O#OmGRz zX|CFej(V7Bc0Q4?%h9m>~{E87dATT+Ye9z#=vGcaC;w_fhcy=B_^M4dr&r>vWDL$A+ci7F_5uujMY)W&9KMQpq zw++kqe74>0DA_q9TGPew#mzIVmo-@~2R9sZAlp(XTydvmM-65e2AD>qlq0-Vp}RC# zU1Bwn`Po`JbL=hN(sq}hW~rYi`pJVl(0z{70f* zP7z5AWrv>)OSiXGrd$>@Etgytv>TR+Rueby4^jr|xhiQs^|at1i=G$BLTo2*ne&k9 z2J-o6Oy_QIg)*d{m8r6j81!pv<*{~+JVd8K*ssO9vG?8lSo3(^bl&?7lVN^tQ(D5| zHc%bK$6>m@v3S3|&Y54nXR(tXiS#1Z5A@$!h`5eK@+lWE#V&BZD0kzBbS2*aHlEjO zb!a>M@?+RkX0T{&xW48I+gl9fOb(4JIWkss{T;^1H0W42LT-8WngnqBX4Oj{mglVq*$-j)(rRv}X3~Sp%5%rg(W4gnl zZl-7Qr{CCoj%U%==K~q8#V}bs(Q_ZM`zIV3(_zdX*9l>Ee4ys7OcLhYVFvh`<4&eX z$Z{rupMOgvpbp`9S`GDwwR!DBs8Wl096UA~>g@Def4wd_T@%W+m9Z-!nta4_)frn* zoQ#2(#V$m&cC~uHym<@ZQ5BHXU3KNIpD%^d(f!ax-`a)EG$SI_@*yRZ5#R1QOaiz^ zhFZn^qu!&0QRx!iuze5c{^iGpC|PYJ4n~-hJQLa_+K!OFZmV~+D^7@1ahp$EXbKLs zTBwtFwQ86R;4Vnj7G10iIJ*6sB~kn>BrbFTr~HX=T^^Cmv-(E%Qxi6RHo@5KfcG%< zjN-f-)RBS-4GyqAQjT- zPE~^u4MP<1r4tmH?>?cU(%$Gvjq;q$5Rt{9LyN?>O{h>3mCsj5{SLr;60+Q05>*}T zAUKg7St2Nueh<^iDs?6IGSBzFcky27ie)F29Hw7AF5=I(!q&B)Bt9F=F z)FMw6DYb^X2E15QN#TD@AvzqNVtkZBXzbKtD(}2bb@ees7Qm4z83Kx@~D7 z+D6QPR(9Zbgf(A^W8l*^EUB2b&ZS)*Sl(tnLz_o#>6(41re2uw*7|OGOXr|^_SMh5dC``8fHCR8+X#gn9;>rGG zA`$okvw>)?o)BdlY*cZ(nPFUnpfyBXpsO0sy=uDQx}Zl>-iBJCv9_g$=(J&^*Z2&O z`Lwp94{o%Mip_Cd=+X9I$$%q;VCz|%8T%R~4=obgGe`}Q-vb2le~qRI0PX4T0PTIq zYLdf^wbwCp8uf*xw8~^55wiY0PYZFiPCHh^ZOmnpRU7{+tM-l0an$YWIPJ-;f!x;v zJ?Bx*s&V=g2YsEdDJ0jU&Gl(&^O{t;=6&-K#5bchpK?i_6O-J>_``r=5pdUEJg>m$ z0}k#NGoyE9Mvyby5JNC_pHBq_dH7}wfi!$uHwow{A71i#kV0UGNqzQDmi!+UMb{j@ zAzosSY`j}ElJM^kY_U#4<>)YYZ!0g`vZi)D;mX(pgBH0;2oFtvJ0{B;VtZX)bBM3$ zf9RYTgV`^jm0wJ7IiqN6vK4eR+~BTOSkEJoNsT=5>$k>IlJQY@`!rD-QHQ(jaA>aJ z&PwHI_-ch(aji>6l_0#@Z{%AWGeTmIpCGv0kSZggX22q_I-Wv)q#*-6{G5vT(G`H3 zs~s`&!JRk(&KVxl$I5_3Ka<*Yqb?PZDPq9Lqd{G!n6=x0CG#s*!jXYKAdRt`h!8h$ zjhwbZ`=tR3u_$OLRR&p~I6-jRCYvBkZGXh^;@RDS;>>_WVs$cs+!-hz-M_}mg;q75 zK<iNWG&u`RSCG%M=uEZ-^VEzIce3#5%_eSG$a; zX;j~C!H}~685`*5Y0D~|!F4J3X?#n!ek~pGF~s{NMY*LDqSS9S>?JJf3`_Cziewh$ z=)`^+5-C3SdvLRtq@dA((aUSpN;?;$QdQjX8UR1Vi<9rYOxL@-aR zlCXB5Ud07WL=zRdZ8u<16R~motPZ~f7P|%RdXfl7s%5%CbQ7ky%Wv3HwJjfLTeuEc zyHe{IGB$>|u`j#?zdv4UckN=1UeP5#2G|zD4yoaNLXC=a3;zAW;0Baax&_`jVr`}` zAYk>+y@%Kx))<}_pIgMb8WL*~yi-4%=P(V|fE~bY^7%5H^i(=Pzf|SCKV2QzGQRr) zKe>THzv6l(@p)RJDI?>ycs}uNefGSE`Sy6Et6&FB6VCv3vsdwuV5TGh}V z(~O#Gau~jm&*bI!Pd0G|;K1(zLcM5wNdl@B&8 z5DTpIhZGX_M9b5DA;%4VuKfCIp2f9T##=d7TLWqoJW~;4O$zem%H7D`VEH}t2)EG{ zHQb*93_xssWf~DxCJ`$rWJBeFqATn3aC3Ju8hIX4_N!Mue55 z02tTI`w`p^;Ea8I*~58OM9Lo+uc&Eh>uV0NI(1*T4QgHP?pYx!mK_!T!6S&VC*~~ zlfnfa^AsQ;={OcD()DJDe)$c)fyGsV2!TI8Zh$D71niJ)o+LJ#T9A&OIKn8^M#3;> zvx6d2OhlkXXb%;txfr9;RW|F<2Rng9RG^#5@5@qC2=B8?(2)UmFI7r|3=j24WQRpo z#?mbx@aO1p+xhMf?SZQL@di(WSqX~VOubdh(gNPu6QY3O*Whl1AD!L@yl2XbZGqUd zFS>E*3eA}o3MivY9qN&}0C>jkvJ)+6x*M4a<}rC~^|;c{mX#P7nF20!JWmhcQV==0 z6yM|^tQis%E!Wh==wZISeRqVccFvWh6?)b)TbQ<|fx~P`(2cV~OFxx^M62%-RzjT4 zpCY^=I_$=Y2(+;l8mI6H$>T-J8ZmVA*U|K3^}W(N?`9<0`pJw|gUNciFapiZyRG=E z&<_vrvKa1nfLMT19wm4SjB~S@8@&GXX>ofHmsis|w35zO>@iTt0;TFEHe6yk;`=Y^ zqpJ^}1(`-51Kb4|AT76QO5)K(cu%1%!83UZ_4ffi0&r^t-p7c-j>REKx}F)*dr8^T z2EFPltl;6(IthUb;Orkv5-bz$Tfvs5rsA0@&z4#48W=MBx~lNm-7B@jb)ID2ulhp= z#~}SuQ#L(|v$5>Aa*KL@C@JRTZJ>9ZK9|=w*vBvN>dkihuDwy3NOjPoFXctDb71YN z217&D-#tjh*N_qQ~Y(QPqfgzAD8p5rf7u4Jn?FR_RI z!2aPXiQvvQya*v^vRj9r5hGX@XwIZ}++es?FzJkg0)v;d@ufUf5H*rPEM~iOooZqy zLT6C7#fQ$@mGkAgnoX=-lk)Min0*%#;#DKah-&5ps!e zTJ=#?`lh5(vjDk`{d*g`qI1)J#FGd9WQOgKe8A2rItfma{gZUszV}L_git_LpsX`B!OyU$QG*bql_BFGemioFB!r0W2v&772hD3@PBh3`6Sw7d{z~{XfjL2IW@%p$tG=?fTNrjyCwk z;2E+)zYk2K8#>naSvoP{{#&eq^m|D;A&Sc03qMV``}}Z%jM&dj-YiMyzmuSlh?wy@i>QdZ=!ba&py2OTa))Yed0V_?|kE-Yh}lo z%Cqj(S)cJ$hv<1*RhNcc-~MA3gzoZ0lN%c1tFd#^_~ z(E!qE>BY#~4XKtQd(1$|l|PVsNTG@mcq!5dgPW^J?vKx=7HeS72=-~kiJ(h%cXJm> zZx+j;WkcXx`PVIV(RuGp%OX1@CQ`uaJic~=*6IpY8m8dK}KgAE@PV_|l4w==Q1mJ{ms47r@-oucwpJSzpsqKF`HSQ39&T!_zG7tH`{n4-7?Rls z@EZMVitl!s22lp*-%3wuqW$tLLLaxCg5`Co6k$1wtOamZQ*r>+4A)3FL$PZ1bBkDN zV1i0W=r=;&nOal~ZldwWVan3o6|$2ohxAG!Yi#M$T%dlJ?=aKLO}!5WOo$9I8S488q;y5bxP6)K=*O1b zcbhc&&Cv1yiIuc4=I`D76Zs=#lVzho&Af}><&)eR1o5)#;HzqbEZb{ua2GE8ndbh= zp{Fp@HCP8xc!(nQ@zImfVK(&oMq`ZhFIv7%rG;K zz|Z#;8tKx`0MMyMbNkQl2O=pw*eg;Lf0f`G_^(5*1A@qPpz^p)lkYi=Fz zUxr)vUv^CYd%5nw{~ojMPka7Dt~>C*$E^FaO8*-l?f>ONasJCN>p+GB{As*DnROtf zfIrdxJ+lrJ3jzL&hyIRP_g}68{}~hPe~DPf@CUKZ@jnvl%26r*qG#v)J7V4cDRF`S zGhBB7*MCTT=`1fOC#(p&>IgqCE3yf8ZtwrYc@_evGGe~)_ARXaUA8OAd~qBR0s=cX zdpwRmmRCu*EiY2;=P!t#W~JtTlU$i&XF9I@ZOVE9{Za2s7_T$S4}0f?NX?F~_qucI z62H*-Q$+p);=`gJ)n`AqDdx!vTB@;ehh&0*A#j^(de;(FDplpY z{lT<|aSZL$*SvNaO`A>N`~JgFLO!GB`H}%BTh6)M1(&Y(_b0H+1KF>C^%(z#NBDm_ z+3$bU`1r4LivP1(4*>j!G@`PR0OVc)M96Pl1}73Y&%fL1bYt=Gh-x3kF@EPXAoda?@KBnR$tR|0{Rg%#QRXoR)bDP0R;mZ3KaeXpY7 zJsQiUL z{;xlbf6^g?F8|jKne$)fP4T~Ni~n6@ch0{HrvE8E`kxm4hc21(@501??&N>e>i@|l z|6dEK{%5i~$Z&u^jrXTZ1|bFfiT3YZGRUa`{&Z}A=aT>HmEb??o!EeXOU?f4^vVn} zf9TI32!qJ()vz*yh#;_4Axg-hSSki*c# zP#?f-!ezq6!DVb>WUQ|bFf;)&8?vynv$OvLCOl}A>yDh7FJG14j@Puf{hKp$O`0Q<{)8V1F`-&I9Y)I1jGNYQFF0!8HjKiaj+RO3v#h@ zvI+u442|`)Q%Gs{1~%>K8S|1RYG?_g%;0I52#a(B7`_Wjmd=8{Wm}ZSXdcZ zfNY@WO2Wnps@1H_T%fLzotcq^of*i*`cL3CHFq*|Hu$qutNtNbq2OTaWNT<^#pGgc z=g4H|Y-Pp7!Ube9F}E^yBsVfQF=1dfU;*LQX9MkK2C#Cm85*-1>FXNXJ%*PU@b-Ms&7Iv1u z?RihVK%yAH=>6wM%*Ry$@e^+_Jf!B)J3V6P)Cj+|`{h&fPtm3T)^}ocB_*2D&iFRaKXKt=On4quX@7JYAUC&?6 zdojvmn+kvRY&JDd=l$^hE>KqB=Yo>TICQ!!di2szCqjytV8z_&wW$ zQRXLwB7qDg1II(kry-@Q+0WkIk4Gtl$xcH`&E}5&lsS0G8uEQ;nGu4KKfM^Cg4I9K zFu-fXT%qwHt(=C4@tRw+NMgK1TCf~OOjQdGQ=K(w_Q+cblKjT^DhwRupsrKw4HDN18d3WI%ZNn-jkIMq^GzIK76dQF^X=EG z?<~G`gxjQFlRA_?#-`Ri7OH(Szr*#)Q^b!~UMOaaH&KA^9zpK%&BqumZd_d&or}jN zJf8E_CN&hN2nT;B$Ahteh?t=sMUpHP#`>s<)9OU5RZ1uPma`M5Em*eEV)^2(^Y$9TDEc#8@=gtTgp|XFvFwW#Hu`|#9gAcGh50*ISx3G2i$M}~{Yf;!dSId=- z5-RlT3mF`-0R^EtV*73d4>J{~KtL*$k5>zMO5R`wZ@horvgJbQ65Nm-o?t5y8%Gw{ zgW6uk1Zkz6A%&v&9=GW|gDO!}+Z&uWmf=x5QwT$GShr%9(t6Z`)iu*;jjn0A=Jy%1 zq{+kOgSV8FuDCVNwHZQ8$`DLSYYX(VoeE&(t`eX1To7xyO&5v0rn5Ku@O?VE>i68y z@No(&d%-=ZGG&FGW+Qd&nTG29T}3eE?^9RdNhx`BP)?PW9Lq2jr}vRfVLI&WTe}g& zCS9rLNn&`pZ)~!HH&Ckfqzd{G!)N$`T91*g|XL53uiMg05l1AfbqczQe4Kfxe?m z6!=Z1rJpWLAtV4df5mguA&hK! z^Jm*{Y%K&(YbFn_&dZvQTMNezW{UW-?QI|k}DW=E1F^(%b?>c6+F};DsY6 zj-$h39~&I?U}kp-+djoz5uj&^96FL9`5j! ze);EoDrkoDaP|-e2D1!Ve4a(-z`+t_944;$T)|sZZvktCs#us008){8UoG`Py%YywuT<2R#h8)0UH9yw-6pr^$t;$Au-ib`c?b^{xIVPm1du z8%ZS#B*+BP74T~dTN+4J@l4|pXA)P;_T`W8@nC)<_5Gee6!y=?0bPn6v5t=w5e~0l z9Urs>TC?K1unW-|3tq@ZOKvTUb|LMNv|e8cT5@?>3D8zYpd`NKF4U&cOmxvdU+@0u zMd5#a`u%IOzC?NuK1b148hfUny-`Y!k!4={U6Y?=T!S>^zU7H|XpN(~4;9`53G?6r z0&_=#$9rq6NzKJ0#L|O^l!GA3a^rx+MC`<>kc4&%?Wwi)MhOO*$Sp)Qb!gn$aeW7V zc9}8N>A54&Lzlc?U{F2=x5#OlEItJ!U&-fw`1Uim#EColG%U|((M8~Rdy|O(KDRd} zQQZtq56NRWfJ~TXa4@d{j89|u^Q~{!M_k71HzBiH!7)TEUcCglXTF2-bkpXTYJ-qh zu@TAu!osFB4lAGz{@_cpEVRncZ~HZSkD4C9nn*u=uxk6oHTl^nd9~Z_JFJ^MVbWto zu$yt=5$p>r!Ojv{o~Jg8S;Y&9qKHYrH? zh-U7{JVNEVkjilvC0Sw8uGI^%B*OuAxbrXUVbi)wnnRGv{d)vi#7CaQ7S0)2E?CP-Z3M4f-y^$ym8J6xwz zg5TN~YVVZoqbSPolvYPv^3)*OH*cXAsC3PIAF%wvRZ1^^Qqzo7iYQ}AwrJ$3Q;jz- zlB>u{Tzqe)y!9Ak(Lr7ucM^9>wdh!;X362^OL)s zB;e%`wADj7&|Rl48ceLM1huTKv`(m{w1UvvKzfW89h+yo#g4j$L4*aM*owyeNRkNz z|JplE{*iuF2m&_{U2^K*yPB55b{*rj?mO6X zFD>Q2dyeN!rKhtI*7F&kFA0a~m!#xyB`A@vS-702K}30RJ`d)u>X^#QIoNbu=K*P- zg@NbEy&eAMU(dc-ub(D+ltA4-a~0BK^@%8Kdnzxri|_q>9cwf7^Bg|mW)o3BK+k7T zi1|K!Q>|7|$MvNE&O^BX&aF($k$GG(YCkun15dX43p@7;D|>pM4zdLsnEaesbTAje zBkh!I)Wlh?*gbY3N8=o&GjOR^`KHlEs>lu$sE|^E7xuQ0O4F6#8x+yekC0$)ME#pH z?$(K#NWZL616?Rz4E;tqYT{TXis~>7Pj>1Hd-^7|1)E@usW*;?%YMk#5bI~iQ-WM% z4=0Ai%tE<|7eodrK97@)?y2Kai7|T=bkQu@8GNxKGKNbg%%doc$H-c*yRI*Bo!^d! zOy8Tykb2vyiTFOLZ*;06UegP_I&#Qx?mrNu^95Ut+`!|N)Z5`0B3OJjyU zY>`X~2Qp5*IPs=Q$<2hAnk4?1W*#3WL-0p2TrHXx&7{J`e{jSnYA|hRQHourxCe02 zAEgNTJx7)~l$I?vhbIfY9eS&H&t(xHoEIdu#E+CNnj2^{mag|nb*ffM56Aja4DwZg0D zKozx$_x2;ptM}f9G3^{u?__&CvNNFiQ=wrSH_%w#DNesV9NAD`PgA5xku}yhI1bi; zgeeb#4tJQolyG`NPe&k%LJ{ohu9>1(u}txKO!`??=HiK^eH>3~y3VM9U{YJTc0LHR z`PjC$ZHe7j9yzk0B|?Wrp*wC>HY9P8%ua=qQiH3r?XWl=5>gBEt0W`1TBX`dqF)7Z zlOUG2XqRjXj_Sr^9@yq$=Io0+6hN@l)c|=OQ(WPwi)O$++j-I))oa$F~ z4(_6%eS`oYLV;_NANyo8j&d5Ypfl?1M}__P8EsB%BfwM{LA;117*&oKd?K#Yd|1*i zIssa_QTd78c_=BLW3mCbI3e;n2=cs1RQ zfi%lgivTe_Z8xRuWM5T)v?Mn(=(QF${gRimxLIv!>5zHI!LqHA$xrLzkAG0$e)D$IBMWy(6n@ zTGacB6M+XwQLodK68XC=XC;*=Sy=XKG13YmeEOB^Co_wANw60(Uw^FJRrudM1MBb{ z-(<-jP(IjvSOs%SuNacQL+>D-+>-04*?16pp&1FF>`zbnW(b~|?y;WkL-Nc4AC1FH z0R~mZ4>b9HXxyca=le@l8XyjSFn!rSSB)8J!zxRC4jg|p}lp3 zgDT(<7|D&I$XTSOk!(Ff=#w+);vINj)i@ZN7LD{S-M117&2gy8Iv7jH!6NzTtDy6(r?>f)uFO1|_ zp44E3T$}f|UNr{i#XBPNpA~(vaP=Lg`J|X(_f}7q+5L097QdgCRSSoa4;pok&QJGC z7Ep?m@nkE|nSI z1oY4qb?mfD>XBPFt=FRE_U-}__tltm##^-%# z1Y7X>_0az2?<^21@&KhgPx>P^I}8pAqJ7Gom{0*sXr#mcx@~@)bN$Fbw_`wwbJVEj zJA~^u7hKKh%f`U6TC;Z%Mk_PFK{e0ZJr`z(0?am8GoX>e<(^HbXv72rHqL~uvtRrj zThMDJ@i<@B@Etm*Lfj)HGmn&=`!^{8s6zy|7Q)r_S-TLV%H@LH1SkbC0gDkDoFA*= zEK+J;KTNh3fJNu;D(#pVq6eo;QkM;kk!T#)3#KyomUH~F%VqSt#pDzyed-45)sZdd zZ?+E=S)?z-9ky`&SwJY-E+U|sJrXXLu8P^hHIO4)tb|yaBvIVwwpwaLO$a{ z=1v#E$V{vL5)fi!MzE)X$4k-o@Bsi#ctasPd&}@*Y9gI&s!7AJ?-;>%S^9oGCe6^8-`pGL2%Gy3QdQQx=Ex{%qf<(mz&_qr!{-S?+8Uj0Zzvx-}b zh5n>RDHB7T=ZkwU)=(Q>2Gdx0zmy&<5+}En)_)#(sVvgt@c5#C=s{9*Gla#M*)SsV zXohd#H6K!OS&oTB$?s(F9QU7}>A z8&WWg2vFN8OK-O`vIbP;K=28 z>@@DEJ=JPHdsFnP-Fe(dla>?299e4@e6w9$tY5b%`JTZtcDwA~2BjeqpC=d2 zRtMR{ce?L-DH(D5pRQRbC+KnP@X!6~w@cORc+i+QuH(S%(nKd<+v%g>*QI6+)+J_@ zR9g$@uh9yKmkJ(Tw_^J|O@=L{i`A7bG$2w2-LYN7taIz|P*$z4Q5VKM`)k?P20fLR zJNU91C0oCn?GPOmS;2K}U^=REuG_1P&&^?nV0OmgueZl_7lm^yIQA8kL)D2@J93Zjy#OL>E<=+|7guLh}y<`Qr=t6h(%=ho*WuN{}%i6R1M z1-ePwA;cQeh?=M1L2-h#Gk#0L@R~BOZcIU?qp07A`ZU=j~ zGbjKrh9%Jf0_#Tgx_z#vpq(1 zj(dimw$o=mBs>T*NY{B<-`ERnR~I=)1J5_>+hejnVwQUCNOPNs&pmERZ0?$IY@U4h zQYV z?2(TsE9Y|obWB45xfb&~=4yXnoBspb;*H?vQ2Nv%gdO-eEK_uWlA`Gr6t_TpqO7#Z zqrjN_zPh{W582S-P}d;~TLTGh;%LZr+@>GSFjv+6I{c%ADb`24?8+clfVD#p%C&vP z_LTiFyCJ8S(j!QD4B_(=`rmkUFV189u`5LRs#>kD$KU|oL%zxk zhWP|eq}yXE{k9JL(M9jf#VMPbcf?vcM)<@nG;3fkgxm`FaCiP$O#kj~Wj(d=zE;f0 z)_Wnv2Q+~FcC+{RVx*7~v=;O{Hj6*WDTm47O`CIE#9`-JA`4q#HeriR?uAw??%(=p z`LLgk>la>0S2up6LP|#ghuk6rO(#6|__?yMFszM4-{o2j*Tn7KH}Nt_k{{oBLVoJS z>8f&zc%$LTHo`~KE9f?k>a01ZBf5WTg9%%3K$en-4?`Is4>TyPeu|P^` z)oPuZkrx^>_>j|k#hDC4J4zm@6Khb z$NB8pm_xk}*7uv$r(Mt6TSm9&R>TD7Q)_C_nh((Uh;-zl%r984qAQWjnj7it#XT9O z7|hC$JL{YWU5Sr!DBI`txKb{Hw+=K#7=_70ZX6``KT8q=U&hQu> z{Jnw=4sO?Ye`HuCylxhR4AC38v>^9I&NQG`H#d=X%DTx~@?1V!r~`@nsn{#Hx$H5M zd6qnF^}VdFcP-S&G+7``5OW{v{sMdEpwX)v?kbM1KWdTS&^hPQAd5Lo=4%J z-0uypPHC0JZ?5e<&kJmy1f*d)n-I1Ag3lQO)LI1N5URck(?hn8%J%8xJulep%wmrV z(nc})1Zdvd)%mRFAcKy(uj-k#Q&85d_dSVZn*dna}sd zweBShN5e+d%Qt`@y~X)-9dI--k7W#XYW)nqG41|fe%XQ;PE7hM4versNtWDBGn~|K z%o$%Ya521m+*rx(T?00ress<@t8oE}Z(?#yGZ~!@^u+C*h)f|8sU*0p%F+U$A?CJ^ zizdZDOKcBU;j$sx5I@u@9AYtok5lI5noxwglu03F=Pvzd%-mJtWFKSu^(*>UVZ}Co zD-{`(&_OtMvX_NusSnm~R53x6RGdpCA16uOp%cbtF7wd4x1vbbb_w`p(h+JqC^`3! z!qJ41P+L-`a+6!9fPuc6iBaJ-NEasf)M0Ra$iT6ejr^noAOEB*D(OSkIab-XPSxOG zwrPz84ZR(hB%EdcJ&Mf8cpg4-ws^Z{_$RzFKy5dkt-&RWym18e=bn33t4NoWx>~r3qg- z;@7Gzb8uI$G1+R%A;;70X<-Jg$(f%q)aEq`;RGx2L%4EZG|8e({WspL!9R6QhCE$?Y7vTRafpJ#iO< z&yuPMPTAu(BgRg4xcc=c=8-yjfp0)J>+(!n@k7~-! z7mmjC{7fNdqev^6U6$VE=iDAc4W~rwC&3mWaE7|Vrowz>(G&dGa~4w)2CKncXtw!k zC&>!sCG`@YtNIDCvGXg3BLfJm4qD7gy7@3Efr)(8&I1+os;T@a$}jULtt@D5KW+_q~J02Y_^??iWKuu zGrHiTV03hM#~{CthEyc`>69=#`S}4B7h9`c)ac`V=!!B3a3G@08#pkSD~^=WG!Yq} zQbgz>B8sU%T$|!KNe4i)nXi8#lvr+e@k1oL;@X;Jkbw3;c(`8Pq;Mk9 z{0gv$?0A{4lVy05GMdhK(6h@6^fbpPr_?i{~j-3mrgXE}~ErB;|0l72S-Y$%4_J$|>|IDV%YH)m3nh zKYfz6kR@7SLX@LZNc1w+Q%jy#OnO9BCKl)uNRuuMpbTSxu5HAk&_Rez1;nt?d~s3% zSM$KkO{C^p!0klq@@~2kO`??>PRtLhP^sE3IHa${KZ%fSh~s1QoUn)`z=!y%8*fHa zS6HTsW{k*akt)In5z$Kpr|A1VPoG>P?Ry1`)bjts-dhIOm1J4CVwT0s%*@P87BgAQ z%#4AV>6xB*(?6sTM4WriKDl%4%$wg{=s91h zS}%o{@xyhFyz4sXvC0={QWbB7m~AhrjIa2ax$wZycV{(`$PY9I%QIpEVI0q01BW%& zrD%eCoSbEy#0Ga0myTOy_wRPoUZKq+$qDyZi123e0y)bD)4r*@!fIN$K{f^Ug0n$3 zi(kTRLUiHzzcXsaWS>%a3S{-J;T*uP;ZQtD0qeEFs(x_WUj&Eh?hR2#4)V^#xv#YD z+mR$mz%XtT-SK(6%W@}LtFOX-hTp^(!ivFznQY+4YY2YjWYobN$P-jQN3nAYQCz-6 zUN~aUa<6p2Cqn=m%o~NcS{i=r`gX5N;eE!sQeWly=7^5l!0NLy+-qh>zKr<+c?dKu zdkXRz7uag({xi`JGX%_l;=m$`gNwlI&LzC8_H==bd*G&NUi(YCH}0aN^4=c;A3ZCd zSBLim{ia(_xHDle&CtY?fp*5_G|V1%TLQ4(Xz5qvj z2;ygo-||nAQ36WCa+BxJ%G-+)X`Js9>sMKI!BMK-f!x;{1ERsyoq5AUl?qLFFH$5& z5*Ul4fwsx{!j_GQyj*g#M9HA_L;YODYumxX8lyXXFb4^UuH?v@p;=udkO=(t(u%@Z zU_0dsWdTnz#)9OL1Wv;`LGEPb{zLYd`45G9?(7tRdE6Sye>?*-Otv zN|o#C+@;#fqjW$I1 z?#h}W?*`{fb*i4Prr!&O%^$Dc(c0`0ZgX`TqkUuww$BuAqk>Rbo+&mgCom39qd1aO zrAbkIeWqCB03ENfuob1!M<+~uX=bi-PYidFL5KB&#ZYF9pG-Kbr%9;~L~fU`kk7zI ziJC#`h&11}MIW7?x@h&}v{sGAM*wL(KCZSsyUY(|;6Hh-p4i ztZe6zSKm;tzDd5;OM`0%g718CG~jB2v^tM2-h}R~57$3G+ySKZ=`)7s z7skO3+~XoLacYc^L&3huNX-v2B&mR2z>}vg#+V%1;^iYWToMXw%zCwSYpQ5ov3TCm z)m84&$SX<*Qg@U@HI?3RBQ+*Z{d5H>FzfK`gL({kNrJGA(_|OSQ`OVDHK5r{rg&b` zeD}KXo+_SF)j1&dnId%Nx3lz}2gF8P)dy>bFnJ3)Ta;q)(yH<`r~4J|@~L2W_vND4 z#ZQGz!2-RE$TSV&2hK1dm7!^@Y2sp(iUmnMw70}0{o+42A4h~wNoalYffJNM#kTE3 zsra81Sb9i%K9^=n^@WW|XrgR0L-sTCOV{loxh`m!y*hEv!$X;M9uT)Z+Edq3z&h9OBeA4FK3&#>h35XeNG{C)XY znPZCdM&SaDrv_y!diMJIsv`K>WMEfq2I#~F#{49`xHx8$^NpDcWSD!q5cLZ`Zrw?k ze;>=(5Y9tlH+jwCx_`8tF=Mn4Q?*F?KI=GsTGuIfk%f)0!-}5=5o0!fyTy-P(vHR# zQ^NhNrEX>3B&Y%4A(b%`Z=7aQc0-bWay-;xz@_k{51XPyQ(N+UOPSJIlQG(i>xi_##3QLQ|D~s z&rEAoAwO*i`S*_V#oY$El4~XSTEqrDjZ3?Nb3zvLD-d4N|as?lyG9rx-epTeT9Y|lLF(8 zO{@-xRvPQ8zKwSB%TwKl==-t8Zx})*G$MBHpGr(M*$0@9qi2ahjJ$Z%uu?~?c!(4C zs=%JB;Ye&6@4C-LGue|!qv`74x@as@9S!dpeZRdz=g8#xt*5gc*J{QGYoc(}?Kjom zx#ARD57}_9$_}gVGup+kH`(G>J;QQ)x~4dL&AWe`L>5E-mDUk|SG)Piy)5qS0e*!hS!QSPm41t6 ze0!8!1yN9y&yeyPhkH#3tRh0EJMr2U#=y70F!9Reb7`#4izRH?dz^g(seIPoU;NTP zD-`|Cv1-5(Nk+n7jvD{F>F7U;boy`M!v5vX{x5g-f4Q^&#~I?^a4`SOZ2v#$&JG|= z{%I5LUl4L!09FX__5Y$x48p>8?u6REuor*#T>J+CIl!y`J|M^S8`|feIZ*#DYwmw6 zvCj1y5a5lYi{uzZ%W{N-qB!x5Ui&8=B>R>iPX89tQ{fYz(fBKL9NjN;oQ(3HtYAe4hPr@$ zF@udpBKU13$ISQ}mgavdI!P{)>qE~+IB>7*?YUUS z^|x)5{LoNPLP>C?o>#K#L=e_-Sr!@xnb@>~AQ>BaP55OTFO8D0OGd_(}81dYxXfQFL89s#)+BelKtSi7fV? z3-T|I{!fqpH&f8xPw4(JMgHaGe^-&28UNQT6#vVy_y-~D%m94$FG{&TBAb7T=wH|5 z-_(hJ?Bc(S>OT#mf7j%HT21vAn*2-P{uI1FX)*`kw|^@k{xTr|*y^vk_76;mza`47 zf7TY|cSSi8ZVb>yh6I!ZAj&ym-@s)DZ~>YeG>8QLdvnWgs00+@a_ zPF8wO&R;lgHUQGh!o{X+b0fI5iVg?Mpjl1LoPN} z6DC%6b}kmqPn_&*pV)4UTByDj_?snE}88v7vUo~OWRXbPmFDiN4sbc7SJ{Z05 zd;jkDbQ>c8jPic@nE>$P^>_VcGW=wHV1lG2d&8f*-j8>qqZctGQ35)?uL2B2dJ@=t zX5Qxu?=As6HJ6#*e2&uKlzbQYITtFJvu!9JT9vD6@V^WjUbW{P|fy#DT?Ytxx}OqB+{vd2KW{ zqfyBXsV;$NhO(WNgoSXhDJ8^;o{-st7vEGMPJ(4FYBQrs5^c8ox$)eyhPUjD3HTOX z28b^OXKu3hMRO;^(PtZvpy3vD<7i>^m~!XKfHAA`)b>=88W|zvQX@{vA}2Frj!-_> z*|mvYk-JC8iEn=lq2_h)aojaHelz|h8WzY{1qMhcvIv?%ABBLC(Pe}5^(pYDMHD_* z<8Vd)3NhOp|1fl5fb-mjR=94C1*@;~tzszP}EU3;s_O_4O@h9qS5JsQjnZW##-9^{Xd$j0kmVK>G)T>jd%yE%0jVcslAOg5{ zC&#;xU`!jav5Bhpu)_<;P;StuQlL^=#dcLlGy~hhoE||DyX2U81}a!6M$OS z$3d!t6=`9xj(`=IVPMzbZUuR4Ad*t?lOR&73IfEcA}{b>PIIjX@TIGDhQiV zXi2siC75N$S^FXw@#;ay$cOGuB9Kr$)JRL6*A5dp(%*{m$)n0*kGQBw-qJzDRmmG7 zmE>CG!Euuy#Wg89BefJJY;i6h_w+k`l8_fZbL0TA-W-v&x|)xAd+t56SK{sF;jgqN zZmyY6M6I@Sgtscra`d%*vr9PscoP6{54&GWfafN&Y`Y0$IOy@l71FM?q{jXX@;5vA&R4%{Py z^H%|fK|2?fmuRIitLb9#Ti6)FlUScPMexqNV>cC0#{9_iXnWDwW@n`*NBfTnnB$1>IxNn(i(Xtyp?=` zbqrnd^4G9|-9=KVU7#B~W(X;YY{0?@{+F0xtHG-E&)NEjp1XPIz$EjR=7SO~3^~@A z@dFRS-}gsma5~h58YOBk)V;~~S2{*q>XAal%5-GJ`_(`N2{{FYE7%qp?Ok<4%7rn( zl0Z9j(}JObfp;y3qc(wj^;f)!*4p;;F*PwGFAgDL;NZw6SQDylyV-n9-K$-XoOU2> zreymf0T9G=GnNa8DyGO#BNgga``8a#E%BdhbZaCA@z`uR8mLHiqJlL{gTvdnM;`re zV{vsR#%wu#0Op)bVX~H)8npVl4Z_MqAIhjfRMH&PQgOu+pJkx5*xvr+atS)5L3XW4 zmWi^i6MmM0UDBiYV&rOwnPtrP!1`ckSfTqER{*%qp>|S?8)-BuiAnS}@+zJ-47vwO z0W^>0@Z`#mfFGl;XP_w-;d2Zh=ll?Pn!W95uR>GDu3SX79TMm_;NV4O67TI!w5thB zS}owbJ5~SG=RGZwO-C|}xDJ>m!LJe6&rj4{nR}VEWr2bT<82iPfr4R9wXQJTgqI-b z>7jxuQP89(>PBL0(&JjvU_m4O7W2cU#E1!X*w5NV9+#Sel*QhuF>#tzgi4%WrFup} zL-}FZ$ZIJ))*{TEw&g&trrf>_2sYAcwt;B1PoF}8Xbyd!!Z(*&P*#N4!;N(d zanfov{ot_L6DnqsSyB=mMp?l1rm{hS%~rvlW0c@%HFibPy%<&nRz#>)1ZsOjhupk* zzYgtb#P^MBI;g8CEGKHOfwofxYOltTpN`L<+sK)43d&#G{lU!oHjPE!O*y6duLFK~ za)Nedfd??3WHC*oOxoUSzr&lNRvhHph8fxWk$7?R@q~Us7!&(yb`qt4>>0vTkYk%b zIzcj&VN)ulJQxt|>zP|}$aWVBiMDPJld4GgMhqQ^gh^l^0OxIVn@7s-D9vfuT5$Rb z|0qgs4r4SsqE9dpwarEr6pzEU!Caz)BYBS0OJ`CLvuH~N>k7@nYO$)6^ejm|Z_B;F z(ZQ63YwoJyf1Uk{Nn1rB#$CpBOM%yOw!+hNF5*-9JE^> zlqQ#%mjhKGsEKZF6|mA(tc5~2sD`wRt*Ha1goIvoRT#mS8C#A!>ywWkpn@eR=gKTz0-Y+lt#~Uq+2e(WMHCYq?ii@?>LX-gsL}Z z7z>T*o-YJJvdkpLbxNL^1(wxC&YlVoi;LD<@qX%>h9&mH{t}0n&n!g?%MVn`w`Idx zL(CP*?^5HMi{h#)p4nK?BP+BFB&uDm?1XYBd9`HJpwsBlf^K6_DJClm)Z1L2-G|~m znxa+~wfDW=J2*sGmUshRw9woeX-JjP(mbE-PQwV1`)gLpv3*wMA_$t03aJJ)3UzjUqfc<)GY94x)GsLn4ok2pTTK%IUz<(%&B|hRZ)% zv%|hjbzjlP2U9X~5g;os-Api3I9_Uw=LN4E?Y%~^xplPHPz#=~Lz$)5W)`_$fKEp3 zw^eVsx{n`es&crW9XOr2KS-LMc4QvbJJtF?H?MWa5a2!Fd?~yX2cdL@k*-^&Gi<%$ zO(3`mdT?faR2L%=UVzN{?7$f9&hzNEx#lhh4Nt(yH15C{X=P&TZl_Vco$1fpyw$?j zSW;Tsi?6o5&o6inc@ahIQ|`UK9u&Ro{x0czkWi3@l?mkB7aHuQ)r{vf0 zvgQ|e+p+?Q2|igMb(5Kanmtv}2FRIf&;$H$hoBfDxk(q9USRz8=SbcMt0 zmt~-J@Zq`_|F~bLm8+Jn^`!DH{Sl*7D|aEM{*ng7TuifXnz~`AbWWj0u@BkXV-sZEFAqtLiPsrvk?j%&Fu zhlkA?0_d8-dK0XOyEn)iT|{X=;@o6$qfN9ZuJ({%pymsTzC2m(#*UkfHj*vmRzN@6 zQF?67MxNc1fMp7w4aHA3vMwKIdy^wyX-nV-943mh6pK%2wL_bKWycfBg^1Uni`UP9 z(?o)rPO;PQ*V5_@A7%Wm<=eHGRJB~ZTgFDCDMjGnQFwHOh|St~WBxHKs}O6|SsI?G z5z;D*eN9(n{Rj(3&6-2YDGJZFSJPpvNYPNCgLa1 z{oHlCc!7(MqTtDRF1nQlZ79H^dMgPszvVS7R9|Zl!z@wp0rS0`Z>KZpn+VAd;o2GT zUZ;TwClZf|=4bJ-iKx?-i+=Z(5uYFAqLa218!>B>9MaZ;ZA^-9OS}x{aPxHZa5vJ~(*G_Y#LizWs zTct!7I9#V13d%WzpTw!q%{*7e9<|Aj2)|G$bs(}I41A9txR@xZmE9wQ1uKx9Ks4_&6EN~hxQ|sJqSMMzLKs0RAo{2k9QaY1k}W`5 z39T!|D{gk`Ydy7~1M^CmAXf!UywsRw$kL^383=CCF!K-mICXGJ`Qmh5_;+b5Orm53 z(#m=N6Fw;dj2F%Aj9VEas6Ht_JwB&m0@?S8H|R7dQFY=IBqICocuu!aYey2_P(h}W zmqft@&;v#Pf&?I{8Aqux%t+8Ah%UD1Iv`TreV7n-#zL=4TQxJ3wraV8 zK%TS{X=K=1qhL6m`r+XGGt}o;fi}m=EIol!Zc5W?fp*(U_d$Tn^i-YTx-!&Nb!`a*c@4Uk1uvJ=I(}f zZLrp}wc(l9vi3v#z65Ly-?K9+9gZHQP-Wa5TD!VlL+o)X1qW|3Di|w$TQt+dl2aae zWRw+4o#%XAwIpd#-AozbgfBlrQI1PS148)x3Y-RVV4-hn$%dLnXSY`Xz?W4+ttTf> zTGiM?mCFcYIBoO^!A?mtS*3H~^t#|7NFPRAkz1iwErhW!kH)2`=&8R(;}N;aF@sf# z?vc_13vqwm13Nk&^OJ8x`iO(wCc2pb;%g@jg_B+$316gEa75ZQ>y>Uk25DxgY80sy zqb$S19*GrVJM1qV6b(P)5DV9}n~Jp!!iZO)B~Dlki-kJ#(M5=!KCJ;txvD+p>e#0RrDrG72Tfv(8T=(-~ATR(Ev{d>yw8S@b=5D)9 zw2%kQjZaMA?r2`kw;=dB820G9p1#Ay`iWAX-U5eyzVs`N>f7tS4+jS{OnnS6_0JRQjT3d zzI+9RaU?g_SM7cLKA(Ruw1tMfLN(9(g1xQI`A(yQxLq4OB2n#n34jEAU;ii`B$&cL zZ+Y2;)XIVAicgq+4VI{@_Ofr zVUCdb&Np0$m&At0oF!xRsSUP^Q);F1{o>5L5hw1Eo27{>GoG6>Znbu^;mn<78has@ z<4TfEr}H%~Eq8rV<-6y7oe=dHyrw`h>zGieN3Fv$^h zOQEk~o0)ln(vBCDUxmAkmmk!ibS%C~X@E??Y>k5{%~A(!3|EuJ3->PPuZsC9tf1cY zWQe8}9(d2>)KC;b>~Y1j1;uk!ee2D_$4MJ+ssDDK;ff=FO4Yixobdx^e`L&0D~b57 zdBwrtq*m0d6x8m=` zr$`n+Z=ay_sEXf1y?V)VDV9xfTZb6j@6rpM0G&uW04|KJav=^+p*+#YYY$U65?s%r zF^Lk$od{J_H0l!XPw>eEYM9IJvNTRcZC53pMoxL$%WP{}@oq&=1a9x*{XAw4h97Pc zY0o7p7hFUn^sCYa!`I%tzwQeW4ketHrA$8xPCg=}=wlfydUobMzeTyR-X+HD290<( z4RyViXXqJjTIE~xhg3J{} z62>H`>Ka#~%K8SU&9}kQcL~NK#ONC0iDoHVn9n-hu&4t)fGw;nA!|=K-wDBc+p>K$ z)P>jiT98B7eyw?sFMLT_YGN_iu5@J&X3E7$4Z=noh!WqHnIHLSqNBlf1~lN$CU2Ah#1q{+J{O z;hOZhq`rOJg$oCSPF8Bd;Rtj}=~Ee0z8JEo%a`7`G)av&%(Cq)6&MVC#2sdaJ|RN7 z8A5a!(iHzVOiuTsH&(I?QBL>RcWXhc_%bGn1&fcSms(ks9`y2yHo1$^oI3Y0!g|ZK z(2-W-sKyMYD#awoUl&jXec~2h3)SdoMmmqe1&5&+5zNUzk4jV+ZG7jh{p%WN_iwzE z85gUK$$T?XCgpY@&Jt1#Sf5b!hGn1zT*A2v!tWOCgMLoZVSQAr#!NbDmV_`k(nrGZ zhgLVl5-0q4jT~-PT=ufLO%s@)2p#v0d!B(EK(FlIXtm{Q(uI}!(bdDM)2&;nXrZBk z*DuR{vUt@}nQN8Ag_2s=_xzqxz~)_}ni?De0*P%t6YUo zp$NO&OImi3_eZDR70B*;r#1VQChk7BP;$EqHC6XLk+%uxA{GQc-KsfVh3)9xh{NW? z4kH=xy5P>WGqZ=ThR5Nnz6r?B-kl?`)z8s876SJ#wm|$+t7};NT=mzlE_oTBiwJ%= zpGUut1c4uL^xNMTTrxwM?$+!M)>;8pJ1M{)&`?(+h4*kLmU(VMR}z?f#+j;~;H|J! z4(6X&6*AM+tx7f?y1!5T$UTW(l~~Aduy>*yz~QlXLc}!1DolASqoK%_ycB3zze)v< z(`(%EZe4#(Yc+v9=p8;-&}z-Tb~_!|@v(kEs9SloUw??+cyPl&o9V${wS69K+t*d- z!8 zV%bsriNvMySw>}xs#;SCZn8yyBG81(Fn2MM7q+twkaHG8cQkqz_6WQX0tdoPYv{I> z#1Y%hosT&mZ@)`6hPkXW<^r|$(V(QxdGIH!v zG@Gl^VeMS&t5VGX!KH20I`}y>^?s}UTs?+5WD}v|TBA=|NvoGLT5W(eC2ENuyS0`z zMx|EQLUBDaC5(B$=Ik`JxHDaEDan<;Bc8YmMrVB-!vuBNC6PlLY8Ex!fD0{dzjoc- zg^EVTI_CxPwh;avdQIob$Tq@iYX80DYRVji8SX`K6gM8mb5|*2XZfRd#hCI`>p`wg z(GKIl#*89;=fkdZX8Cu4!>fp(IY>3FW;Bww%7P-$l#8yB6`;HCEF)m%ZIW77!pa0# zc#c7uddj|}XWj(8SercCpY%@0qo6vB{QGfoMztx`R`_dbj3YL?$f#H)O`h)=8CH#U#`55DwM;h*0mNIUw#z4WqKCvvtK`RAB2WH_da>yee;r~?375l zzvZ0x&hDGF?z6KK&Cls~-s6Y2an|CIcYvIc&6ldPraZIiR+O?fy#5{b+#)HSSmQNw(EMkOqx z4ot;Zvnbhd@u(LYu*hq>LlX!zQzq$n(XUrh$qJ!;E>0@eM05ZJmes zkl*B>-;s@`)uiZ$*Aes0uINEp!f@O~p_Ngdsaqwgt(g@9<@>iJWtO7x19ZfrRgzJ` zkG>>i+;^15Nfj0I;$czTjY91TyBgP!NrmkH!`3umthdWeRBPZdy!Y zI5N}+cRU5B>l*i&9t>9K8zGB+MW_6PCT^a76P?4(%T4f;7cW(*@;sf)D-0|G?X;_a zPEwTu_dITy$6GGG{Ki}J+23CtMyP)d4qQaV8*?T>y?3~ICC@bSFe(s_Pj7PXTD#d6kc!t0;lr!Hd45-8GoaHMB(y#rdN$sHYq+*MEaxK2{pfb-bBpH z1USc9P%tmDN;9**r?Wh z;UX4$w1XBP4%wlL7x(Ux|6t0_jgwO4RXA1l`THrHUD}!E#M>O@ZQBI&{NYbxGnkVA zm!Vd1 zUu;4P+?hVfyr6mha&-z2%3ZN*57-5y`IcTU6_QGpa5mtN*}J?ua^(S5+~O9YUH>H(++KSDHiVpJ>wVppq|U0b9&ze6*otJB%?Jco){8HE?-GvXJq|s{y{HBC@1f=3Ykg#k-V1g zTv@UEQ@1lr>tP#Uw+Oh$?K5_cQG7U%O!ECzZ~@~t6|I>a{yww-mEf5f{wuTq=J*Q> z0)z;Iw7dIygg7yte1aHs5|LEg*cbz)pw6W((K=C$W}ejML?`Lwa05R&;CS z2@&F_nhZpBwLJO6LIpTwz7Ugx9He=YduPCp$+4zNP0#84XkWyN5qWrh6sy$E1&mzn zxL)&L3Q8xdL4F6!fSa${QMRLw#FhA%SsG{sb5emx2WhS%bi8Gu*Bfb-?xpaR2^_rU z9+k%&FFnc*hvo+3Dq!0j>JVQDJd;8~^*u<)uZv@gmI`C}j9g>hho*h1TClWy zD=pE4vSkZz!Hwh29MHHU4})wW9|od(S8${(Xp(4f39$ugBS`(GhpbD_=!8t(;H-FB ztec*=ZV@*q_ZOU;-VD?4tTPvF%-Jv7sI%G~fBR#jYoIP{bt znrfmGcxp7_o3Ly7+78;<@vK+Iy=D^~F~worum&o!xC z!m7dfdmnPqjszM86B>~1RHC-#c4E*2?u(H3ZP6&@L~>wD10{dn1VzQ&is=PkfP(z}BxwQwJ zZu1@jt8k=sXN5NfWWfMteQ8UPuCm+uUf5iLnjnkC ziOA0jDqcMtmnvx|0ZS9!XP}^Hnd|-3ROPo=68)L1Ok9wWeazX&+d0id5A;D#t@s*V zjMD)$;O3GQEUb9V zSx9AIUB%ne{Z;~6!W{+)v~z+akrfoyxY}?9$R;?Krjt$@b85iJI?{5CfInsih_~yPt#bphbxwfXi%RUc!H?Cw& z0@JiE;{7Cv5p=buN*|s=P0-X%nv6R=N4{f!n-m;e&>*wa?9`@IQbMqzXQ30prK;c< zrGoQiJQ?sSaZeYrLj;%6Vuq_+2)$7k;;RepEDSU(ZMMMlwoADeK7E(ZZO+d z`(V6O^xQx?U{BmgSx6yKE^J^ZNaBbXsU|`>Ofy0-67sAM6Sw|}gkaj;&RryG%FBlw z3<>r*a`RR25%}hQ2jN$z+^n}~-|)VaeM8#wuj*kl4AT|@9NL+Z5{E}6nR0Jf;h`^; zNyrXCGs*LJ9UQv7E>H%-qH57*uAVCjgt0CC#uoT|74N80?LsKmE~X>=ya$dE95j|g zXm?2yNP^BnNq8>7#JJ|q7C<+JY`t2W$EbOz`HaZ3~^FyX^ zz9BR)`7R5x#hZHpL8cTl!D*xd!V4(95dAP1$Jhp84;Cyx0y4{l56QsfVKRfD@QPnTrhH2PnpOnF#iX`$APGO{laZCEQ?g&4d;cPH_4<=Q|cOqeVafPEo)e5WHM6c30Ph zGKtbf4fbX}3>#y&aEChhis(9?jhb}^>jL{z&l;a3l0VNEp=I`{1q=w<$V&{LsVo1$ zyf`^Q!|v$`Nl{?J+@7vwN`?rbLQ8V00Pc(Sn>=6PsgKk* zagd+Ei@gqwi;-b(3sEwy0vcnFE!Y)@!Pq@oYobnX7vbX%ZzNi@>J1sw(Qv1uN?@4+ z`la$sK4eHmWR!6ToZ@`r1)`O?9n@~xcVDh38L2p0sdy~o_Trf0Zs+NjQ?&Vv1@};q zf*5sYyAU}!B5Ct^Tut@tEJ{^X8`QSvTgHya%c_zCrMB2Fuit^MdEuyk=Kwj={~D<4zXgK(7oPtwJpW&K{x5m| zOA8KwvD#k(MgJ^>^OtP@zli5EGyU(O0Rf}oPb1ovbx8j?3dr=o1_cBJ?oYw{6$J#`Df6#) z3wXPKfdT?5A?9DJp?_R9{4Fl+{}Tx~{tF2x^5-OAuox2b?-g>tAp!qc8T0q!vwtgI z|5xaI=KsVs{)^84@2B&b|7ndxelr6B9zFA~kN-C_(BGd@e^8JCFaP_3%>2J*o%mml z#XpM9XZ}qw{f8v^*NFaANoM{{nfS*p{>!NTb4h0Yr@Rnz1q~~O2W&E#utN$bDd_Zf1e_v=a z|EG%bZ>c&H8w(r2j{ZM_4xsa+Nx9Y6j)vyij^rkBb zjjM9z-a%`PSmR9bg{s2Jht7qlii%2kqrcyL;^1Ier{`CB+c*(_f4$1}O**8Xo72+k ze0#d~)3e_g)M2pQn6Z*v@%_S|xbXf!!0>+kdBLxUqNm@3;Ce!=guoAuZ0{^CQ$*?< z?fo^`&)Wuo=-V;)Jq=zy*}W%I+wO0QqLG4pmz&BT_-*Kxk2+oPuR8kM4@?ETuH zYuft!QyAV5%|Ko(?wT)op;mWw|I-qdY;qbiZ~Dpl zMocoQkq_PZcCCyiV^jS4)N}OtInNiUO~H!>i7&#H@B{%cVr<^VRMMYXC@Kaeiez}U-3s8mrq|zZdUYM zP=E(ey{9vQH6%4Y;QgT2c|rd)$qIr=GaOk+E_fWt%SDNhl0YHePinAfI=ebX5A*#> z36;v-YYG9yQK}ca9@ap%4_gk@zu$~P^z=4& zf5z+Dx`?(*gQF@H$hxX$beN&5fVqWS8Mvo|qi~@Q8E5bMOe{jmPi1t5Qh7A1RDbly zyfo=>ii+%|^j%82#SLNvF~pB?xk*Z?VCKm{Wg=93rOiOSjcZ z-{llLu<=SC#;5d$ArmCo+dk`~YTg|%>L*CXL@ z9EyF*t*3SjEZ*FYLIuZCRy;77FZ;dkSWYn6*#l1j@}$5Ap6Yu zRgeX#X=OvGHk?y^FlRe!Q#$5#=VsMkDcD#8etY~SJ$_XAz1?KL9gX@u!J^$GykFkv zceK46RT)z@Ep*0OErLKTj8RKnpKSR0Jl=@!-xKJ)|LoM0l&6L>>vQsZzNm5@EOLcR zfFe?)c*@+o&0O1a7_{;JjM-pEFXlp0uU;IK6{cX=*F01DxR(vM@^#a9JliHG4q~a% z6Z&(jI_z5x{2~R(-Q+4k&lTiR_)ljNpJFqFfMjY|M=My)l~%K?vNECd)n?(kSC=SK zBU*%fy*ld})TjH&lmbdQZ%iC|nL~peI%=!V!8Xo$m9!SsZP?{N`_ZfH!D!rA*+$XT z5~iv&fJqCQ*A#rrYC}DR8;Ldw>ujAC{7)bYx8hG}QS+GXDV7w5(^Eq_0 zUy?pwgFUs{vwC!qmKyUQ)9}`%a5!4;ros5-o%A&_vLG{XO-e-JH&1?M@&YDNOcIg+ zs|0yM-0TJZNp)Hw`J{#(E)J~pV^bhJ20fTEYQ4?GU8-> zIErK;XWy)h%Wwnw*G`!YCwSbO~=aXfK139}J(R zDZoiHvT=sTNE>mjj}XJy0Z#Zn$$Eh3$<=_7d+W-fTnhEZS3u{r7^^l_B&g3YfwU(p zK_Wp#-ZmtHKy*W`Z^>a#BTHs`nk@+$1jw^+P>e!V);y?>s~MnWSlHasGK*Di=tbra z)rseOri#CqzKW}OX-9p$*TVu&L1i47E-{%6KT3;G71|HDpu;>Kd7-8hq;fqttp^z& zew26Xi(x1a0y4gdBEybH`u;S)-kGllGd$Q)kQdP25&N<&{$k>iSB!%SFtk|R4)tEg zcPH8Fk8;_wxD(f13oFCM9$Aed7U$i4i##)Hq_OU^N{SHg^47vZup5#&MD5- zg#NPwXqPnWoI^0Vi8}a%Rl1K${)4NfDexo8JQV?WLW0pjTuw&D?5eCRv&Wb0?6}Eu zIR`~>*(qihIVP2}G>|e+#*md;SL(prF%>Ma-aQU z^0svSKpgh6QiXBXQ4J2-Hy4}wHP?*;!+Bd;lcbA}sJt9yN4zhPJ+<|+T5!B7#;}_e z^?r8z6ly5~B4!nCC-Z}Wq{ofg%PpO_y>B94-tt9}A88z$!yqEp4!?>JsVT9_$jY$9+rZgjelsOkK1`B=Q)7wOldZ*UG9~W?T7nBtO#lfU zw!Rm!Uv6`hVh-hiV_Lv&Z1+>{Gk1bDLA1kkKaYrP82t={cTNyqXvntoJlS^~LB$%s#Ugao2$Iawr$(CZQHhO+ji9|+gP{0-J@^s)4jXL?e25O z>2ZEUB;I#qWX_xsGa_ToC%pJ7BWcSsh_ou|HQR#*Mo+t;9ZKJ;Buk3t=o`}02kZ49nUZk)xf>+;F&O>#N)=9(84fEhcmGmT84- zs=~5Zl#PNy6iRxoCHDH)*)O?14q=zaBJ`qrLi>XEzJ3TRPnf0UOdz)xlgCRwS^9(&vz6|TgM1wE;-$>Z&f68jG}8cgERZs-My%rnWq@=&4eS+e*N$4jT-MUJv*lQ;g)-MjeQ+Uq2YM0(zZ=?_bJ`2@qth%OVCgN zo1=qR3Se;G8h3oV{o{8)45Bn4!$gkqAPEV$cQW~2moG<$GQfP7TCd{U`zSOTzrfZ; z!6?Bskh@`Z93X6+0IgMB$iRy*WTzb^)|#=H-Zc$sN<|G_0qGf+)^jC0z=z;*=UF|# zF*m5qIZU^`Fi#mO&^<2jemNCD+%aA83LgPNFdu-!CiqfnA^^j*EX^9=!t)#!Dg!yk zRo^5$>mF+t3TvEy3)-jca3(PEpi>;e_1lSEinUJQJanNdwxUT94KtB#o0z z5bBcyt7y*JVK343Gx^dwl*HuP+m}*qS z30m8(|29MUYr7l1b^)?>Ad*x{$rn)JjRhQ?dj8KCjj}>~h{}{ASQ7tON};5pU-VT z#g+|(MHrkT^-FXK0)1q(NQKOH7h#<#)dbF;2`g;D20on(#?P8vd$=^?%DBZ?+(5|P zacFdso6dA}=E?)X6?X>)N0sYH%|aaBa?=4v61w(5HoSB<33|*fjGZX{J+VLW0#D%& z2ZKa%s)dI=ek(;szel-_1tL-QGxqs~?MvcN_SXZ3&WKPz72X)yD~{^>H@Sdte3@&n zc@QPY4%kwzJ2_DNdSuI78+V8eX4~A{#&pFTeHjdk&>V0w1iGPQ1Y9M{C&%jwJ|6|y zWnlcl5*8 z-N4F{l&p81_0>(D(@1bjm02#AgH+AlkVQYNj}8<65Lmh%QKYQo<(}|?83br z3}2C(?e-^DGTcbcVbV$c9CNzd5HOGdpNrzcAOw*9xr<_QDT99NQ+l$Cg&N>C8HJBia^?z|uppq29T%vm>e| zOfIM{h6-_nK#y-lB_=_O5iKp zI?gvIB@E_ji+bg+1#+nKx*S&46;cd5v->dA zC02FleTOwC$8@^JEc>iLdUmc~gnZg20{Hp9@gRvT9H1=%wm7i$jVN_O8&AB75&Hklj00_P$ z8gz610Zm#h2)pQZXI+4y@Uza?W;q5J_P+`5Am{0(7!*}|95k9U$D zRH68tU8x~n)_w65$$Z+8hUt8{)WVEYk3~Ti#Rlk9_wwc?fO_?aBe4;>(P%Jwahf8A zW~qF+m7t8!0?xSS!O$vz%Jjvb<@KxSbZ&KziAZjX5Q=mQ5IdDS5au=&2&darL|+Nt zn75yGk@8OUn4pHJAZC4v%Eo9o{|e;Jh>fb zFE*TyeUs+OZ?X9Xik{=703aq6C$Lb)bQ^Tj-uSG3g=6-0k zv`1h4V=u$Vc2tC5E{UxtqDLEc6=En~u_KAhK)mfLljV;P?pRJp$TMF6{M7JvQPeda zX66bLz!H3#^I{-D_7tZQRo=JVMPh*S`D4$yK_GVF&Yx-+)b&#HhJY2Ocw*-l`m!5H znm`wwHrGydrmQ5C8U1qc6zfFO6&+S!#4SVG#bdD!gJ#7JAcVP0j=sr_t248aAFf?rvJ$2q_!!&)a48ON;IR)(@Z0R8MQ+ zU`LR*XC`~J>i)6wn`ejJD>kgwdol}3-rn zA}aiR2pG)}b9E1FxH3Bo?z<=aWWtdMFbZ1&`?G(UH0F_vgb$F5H2qN*Y&SJ7ST49q zNAE5hFAhPt>Jy^e72YF~HL4y0n@FL28~zxiV@?=o?{s4up1t_8EIWk0 z)*X>u_yqa#2QHCYfDFOru4(8%Oq|7&{^Y=xAM4Q5=qR(EuyAqPRuCJ``E)lyKQuIS zpF6ys=*9rdKrlu+dh#Q^aD!4m&R)9>V~U8WA#o9Jg^+n-+0ggL4WNy-31 zfK}81>grWsT1}ACv!kUJa8Z%^aMRZ7A#OVWd&#uJiJFZJVh)G7oO2%#uc}(28{cP- zT?ZYfFs>RZ+OcLDiOFWzKO`S{@EHSuZ%m=HANc$+RzlR=M-kS&Tbj^j!690_V0Rv5 z!FJJ4_Cifk6IdykB?S-@7=`237g8}7xG&|%51Zj6%fR@?JHUA{C3H91Ra~IN?Q!tx ze#t@T`HT6g+#&>!Bmu+amW0|N`x;R>R!KiLl4=mnDon{Y=mR3^EaP`b${7Y&IB+rHha_Y3!_V=56f9!7&% zVBl#jyycGOI+Z9$Qmx@vDT@w)Rdog!s8500Bx$)y`yO6n;veRzUbgc1*xodYc-2GG z1bzyyHb0g2IDDzAP3c5LAcU5mX;-tjyS}BrM-(gX9NTt{y`1;p*@P(4c`Uc|bcqpi z7qjNlVo0DP@kqIAoYiV|Znz!$2Xh~<8lGj0PzO}q`HRSSN0Y%KiY`;4O4|@B$jl&U0{$F?Oq-;&Fy4-R zwHZ_1>U%O&9|Nj;G2FaBCBzq*APGSq1cvU8E{8uAT8xl*w1^+5{@ibj4#t^}_IrMr=&V4~4;79e za@D%^R=>ri+Zg4mz`?0Y$-eNppV;)9{KMKfZX!k6;(fv2M!1~UX|IjDX0!46Fj2z! zX*TL(Do}j|sy~nGR#3jvm-S^}ZgQntksJA#K8CCOSmuPaUQU8889A2mhy|f*G@q6X8rtK1E}=JB73_iy7Z;<@n;zqxDs-tDy zWCc3Q{WIaE;~&I#;~PQa-m#OS8#1Yt$wmzAONBR|v(x)+##eRuW$Xb|^VN)a zqqa@+)4VT*5Z?a67II-AqU)Ujl$X1jwVTI++Zm@YmYdwndyHAA{a zFAUxncgQYC3}y^)k`A_SFrK~3w_+-s@vxtjvA*|bOCUdODGRTLdNty#->)BzC_5?3 zVzJ&|kKPnJ@H8%Yo+g55-m~NCqDnaMrdLrRad{~Xuw)bjDGfNWZf`L*T+{jIF*Kyo zO$;p$%#uxwEm2rHF$J#E)@DoXy?CaWN)x^rjP8+IawjKF-2_?10mJAWlouD4?F)wR zUNFOXf)dMJ3h@hDV-`c5a59|5_k+&+T@X)jc_VI&oVS2PYx4&N_tB?ZU0q3bzvshI zL++**HXicUiR0Sj1D{E87u>=%NX}5Ka8vfn`rjR0cv+|qryr1Csjrx> zUrvR;cC8EBQ*1F8r?FDMaObe_(52VWcnVr%n%?J@t^x{L;Cb$&b0{ASDq_FvFQr*| zKe>4{^(?ySgG_Vqs%5I)>zb|tcr_PCObT(H7Yb!0IO9h>71!-}b1=&0qYDu5a-271 zm_$i0OGWP^8xOqGN#xB&#GkEySz9d4tHM7V?6^fx?;UOb)RrJbdRykh9%(Ml6+JV>GCq-hGGvt+pC7hf=38*pPIw=Cd{dkx#-+(8?K)G z=lJyrard~}R~XMPFNC)IU4?n3Bj%YxdF${%y!0%Jk~B&l)rLVL3ja_x^}B_JG6Kl5vHO<9ldR^#%AL`iV7STt#S?y$Hme|(G;KYF5}SY~gf zv{3;Jo>1S$%k~N4K{_W@&wrwuCM=KSIaz0c_G; zdhTru0l-t*XXCjF@M*1qaK8ujAPKIuZ*}*Y3EFadYUt}0VZdX;FU<;wP8kM;*N9(| z3t;(9+Twt^xjmPu<&1r*C>0Ja*VR|Y@YY{#_gZ3v~ieVE3diA#lV10FSid9!e< z;fcfjtj&$>wIQ{NjOE3tHpooy<_#HUW(|Egh`3OPzP?5p494)_APe0EA>Gt$0&YZP z9y)DLkk3-q#AipHf5g#gUM+mJUqR39Z>!F}&C??J)i}gkO!KvBDE>HPo%W$UbHSW! zPHT37yV$*Tm)l+C;`1VEkNw7E&{o0p3v*9A2VgfNKns_B^{QkD>j~NZQz`?2oR$?4$w4>{Kg57>j#Ta%6n_VR%|r&OxTbqz;z!ou&cwr3t$9zz&%o5gF; zB&0Q81C>8fJyslz2OGY3KXl||zq)~k%mCGTk0Aku`hbAy7XYBi;19LSMH&=1%hTY% zfqu^~r_WA1MT_0g>?0Qvlkv5H6-dpatER5j+@^&cc!V*votoU;eO?9u4vJaMEngU5 zf~!9(1D%uU#C!oH3e=m706qyEfJFiHmqDaw0)zlFn!&lUQ)S6Pk27=yl-T~lT)ADQ zoxgd~$E6jT{;@KIxcZ$-;n(IMRcAnP&YT3EM=RHQq{Y>T+-j-G)C4% z>@$}jOI@mz)~E=X44uVdXliztGIuq(X#~IKL5}grj}m_;F&2Ui$2ATDrEW?HDe(0i z$K=EAZ@ShB+=#P`d?t#@7+f({vTasz^1lOop!1%eYrsfY#-;w2n>T=V;cr^+!>euEmNpkk!E8 z;pQqP0K4p>C7hZUG&1|XuDm0BZ5Hl!`W)UxNQguP=O!%Nir06fINXY%@ABy0Ub>+y z12(5|sDy5B-*zwpKtwD*15Eoy_C+Kp;}kTqHzwxSlH?RJmRp~=D%Fbkfu(=a*0wg) zNtcB(6)8?7?2oC+cBeD-qs&VB^vyQoq;4kFjIff-I2AaG_YIRnj&SDM@SY<4kcl=f za=J=bP??H=kpsF4tcie;6qBp8fRQDJ{impByp1j{=T6$2A-g?0JM1=Y@5A02FC6$6 z(P~fj8&fx9UG<-@6$2nCdVZM_-d+c?uV=_tct?SjXv1il)vxbcHA61YqM~DZ9Rm~J zq_@krmi(NV$Vg?#_ZQ@QwP{#wTMTQ?_cnk%$j2HbhcLhRg~Ruds4NrTo0`THsX1oP zI!6dlfB`$EY0h5nZM&nVLIjAw)+j#TYA1Z(oX^xFHB`S(QDZF|$Ag#SIl=yFAV6Ot zB=!!e-%7*)wuNZmG(S2KegJfbgPH->}oZ2mf!Fz=$Qp#y9LV5CalD*r`N|NvYFgk0S(#5DFU-o#S-I+z->pd@sY! zH*R6>`}0|Wiuwx*Xk$LKxmgmXI0#jt^lo)c7l2Px~#p$Pw&F zEMA;|QwY=#_$#4js&}(V-!Zh)J^{|wG#Op%k~dhgu?MWtQpqI;!&e0qNI+EJ4CikI z+h)YHg;gN^K2pUhv#@tgTYf;Z#2hT{@)3OOvwgEDyQ8C$xO@UJw7dZ-nIyLD9|tS+ z6mn^a&gS*B?VK^i7z=aEQdin#r@t#D0rSq zta}{U-rXY$WacwJ7>D_(`CCB)q(qX!Lbd^V2N9%0d&_=<-(UpowbY0qa<&klaX* zq`}#Xh~~X+oM`J6W;rQCGpRmhIH|Sb?pl(5XmW?XMJ{o41y}lDLt^uMl4Y@rgj9dq z_(B}NgdX6|G{ram3Sd%Xj44yy90Z>|9psQ0l8+}>`>*L3^o;Xs2Xip|9Ctc=dv*p+ z+`Dr)@pf?f7&yquG6G*BFIl@isU(~Tmx(M68PS@meWQMc6+XbD_;?w()-Xpo|tL}2b(y-sgGnN23HR` zIAAl1A4=2#T&L13e*9u~rN@XD>OTdYBKfZus?Blu70qRK#CcKoj#N%_)-7 z9hJ^X+;SD2?j$H44=)-4uBBP+$Qm)s^o*H^AE?X)2OGk_@Db@ALf;(eOlC zN7I#uxqiqww5)K77%-Yvy3KZJdWs@M5qvt|Lz&Kq-rQ;N##T$>N?MWb@81-j2cy_L zs1;vN8V$-9HsPv0wnXh3o@?zNzr3bNveICn0Ll!L*bHq?(ey1T%2K!7MW=cRiYLR$ zW)K-MhPJ7#1cQDs;d-o&yW9hFQ})XUtn<9RrJDvE%x)9xRc@RosQ@)5dmw_491`qej=C!pT-mg835IK`LICMh_DmN+FCbi9`>S#CPx zb7?(sXqqI@Qi6^u)UCLDYzT2Z`wLNr1!1^LvF~@oKf4)_LX-p>VUv>gR%J{sV0Oe$ z3%6aygtN zJWz~l7z6NF)jDoQvbY{~-kSzY)2XUumPm+Onxr0l?*<(-KtbWPJCJ0RB>|tTz6kp~ zG_*itOR^zFZm)f}F~9=qEOp_kpIRM|Z+!u?8uW`vuR+=7 zLsywu%DbNmjS)S>R^o$h*29H=#u+&~8ac8$e65_F&5-yye4obFgp4DcF=8Ne!>@^^ zpsiKo29a$F=B0#wY23=KM=n|Gu=g5f3uVvux=YC)>CAB(R-q7(h@(uB1Gyn9%O zmDZRiHFB}|&Js4q__}rZ4E?XE6OEh)tqK6C_lSlQhJiBYavdX30trV<#d^n?{Ur&| z_|lTNe@y7cXgb7XsELTgQhn&lVj*WIO6i(-delG(F;U84B(YLxpy6mjjXF}{w=z;_ zu%YWuC)7KwKpcv#r9;XhrX^NU2-An81vi7(^O?T@)Iwk&&*YYdI>1;2*xc7kth^OQ zhJWug?T+3H_q+EAW10{}9zKC#VO(o5z0r^9I*O1RCsrmblOGxe$ZbzE6n!zGX{-g1 z12C;#aP;nAt#6~K)EIkI?$FOwWk-A(gtSDsl4eP6S8MQ+%h)+_du&8r z1Pxij;#Bi6P-?+a@i3vPN!z+@L*Mq~;DZ7$Y&FDMJW>6kU7@Anw#6v~$P|DYkb~{q z@mcLa>y>8VOGD$_y6$~9FTDMMs`5Pr82dfZC`u5pW^#L`3s^h(lH~`=hf`GBLm(&q zz^(5#&=e+r;}MM_rU$@K?O2-HO>GV>j``z;QXJ5gNF0z$q%Tksz(J#d{RgCNbQR1# zaItN_(iAyZ40Y5zku?6h7d!It-ql39zDFXV)auA{l@P^uzbJzh=iIx6p#NbGrmvlM zN6aE0Sx?}%jCkU#nsGkzfJzuw;PnMuIG1grzM)Vy%daIU79e&k-M}WcVWH~=E zpaR+~P2swqdQphe^h4y9a0-#;F3ZxKH(z6izXMrGDJA=As6vwQ%pBxP&Y^CEOZ(~F z%>yjJQ7Slm0<*fQ2iN7^1{ae%U z#|#?lAT7?W#OI(5ZbsF8nUpblg3a2(l_cl3?pdZ%wd>97pG&1q1|L}+Q?=Xk)SiFC zICWgxurnNh3^d^?pdX9h%+W|dDYsjh^@StgxNVQB(yfjjSO&&zZR-*pby)}#kzzzX zK@3HvJI!MzWm?joZKxR|cQL7G1e1YMziT;+N1Qv1Cs|lbwAH*M(&tFGMRNGL0 zJa<0r6wG`MW_WzKaC#Tuc=X)upfybSyz7x)cJp>dJDjT5l-yNqx|lp+erY*x-F1rB zq;j`(2HdrsO(kmt#;+vD`C@i3AP9H$lh156htW$ij%Q9|U~$EHQJ|qoC~a6F2=5@v z{N!lNX zvYtFVvusXI*zTZOb8`);5($`KRaD=DZJzLV<7tzkv&hl$41jM)w6b*X#}}a%BCS#a zBx$E$?2Dqo%~TWoRU{PzrNozwsAjmXiC9ZBPh%CFbxtnRNX>{w2N{ZyCRBWB)JNP+ zWfiWIK_p5);xBXzB>q_=bk*%`#mRElv|Sbl*mS)^Eq;kmTA}p*BO0|l3fx3xku<1$ z#hiCQ48Q4qkGN=^L@q(=vXot|@JTy!a?;9Nc1_!;Ko}LML5?W4A_^0O%X)Ei_fa?s zgy?C^xIh>z28)H!wM&j@VC3(9gm(BSNmKvaERFN#7m(=j^k9%DjKQ=!6T+OUASz^* zU(YZnmK7+ z;4U3P=Wtl}6RYfUptEktx;}?v%PUzFdBpRX_H!tCS3@EjmYxr$ZoYcXa@^f~rCm-P zUQKC}jQ`NWb^bm^{j>c%Ai{zoGi^8&a^J{jk5#jJ_u2SjHG{*~{o9iFg+_B-`z+nm zq~Uh+^yv>*O)E}7Tk_F!dCU6~?H`r;NfFQh;j%g0a-5v{xo(FOjX&2JmY;tB16v2W z<30XpV6*LRwoOH4%h;JYqFepswC#O$a1g6*B0r+Oq8Nc?_pzoz5<>5871)~Lb@e6m zx51S`A^~R*vn_7;`pC3#cI)>OYLUTpz3Xl(igq1#dF9myCmYhk2h}pA9p8$cjw4>6 zj^Aj}p@KICpXi35Av;JUFTBuR0=H(guXzvmd zvT{jVVhHu;Y{~h@1lGAz$Hb523a7{Oq2>vc`ia-w3M)L^9k~6p35OnrlMi=Z$q4 z9dxQr)e%wHl1CM6%fxC*UxWF}HiaQ>-R4X2-}C*Ks^ePNo~d#cw`yYh2V6e+jWrQ( zM{~+m9Ib@!2UATI?pJ3c;^3Dnuef@%+QVM*^~k{^MTcR;YARp%1(jMWb;xHVRmqE9 znlQL4>m)NN^7YhbmV%o(mLikgZ7v!zIA2>Aqs|K^ywtNAGZvGZ3`cskK>n7JR-g@V*m-~F3%Z<>R>K4KGx*J2I=P4+k7(ZG)h!mjTBO;-?};j#pzhh#OGUzBLK}wb_pQ8Z-hUEXnL*svIwbqo0(B|w7)&fkpIcU ztUNBs1X%LOg8F9OKd&@EOT7r(AmpjX!@Zgs^9=RdyBWp|oJSH1C@(%qv}^-D`+QA> zW{9@QO4~FoM4B06gq5Kl8Ir0L{Se0Jt)5~ToMzf=jl* z&&s-z`YyanGh2kJqR+JtJzyZZvB_X7{yS?LMZgCF>?NKljWCRxvU6y5N4;_W7`3GA z?IyK$41X-ZG0*?e+fFQT304O%E=G}13ElkY5e{6LclnVtMg!Kwu{WU(e!k(MMVT%Z zHeT4cWL$3QYbCXA2|8f~t1W&GV@x6AQBmsxqw6#j@0Vn_6G#$ZSSjlX5Kc(j>#Q8E z4-!D)lrWz*96nz0Nos+ifLe4ppt%3ir)(rD<)ay~LarQpS5R=S$2D08EVu9{%}CnSQt`r zWNo~H-V`mXUtHnjY8~{au@~+9&!+xXo<`*#jpPQ^l~&7>v)3heL5JicIc(`>A<_)n zHHVB_-lE>mAwkuNJwzv>Frx0Z^k*;k-}b1o#cVe)%5^LE#RL=kD_C>u=A227{)6@I z2i0AQQ&?~@Mx(C#QBh7;8&@7WMi`4&dK|wSF}KyOfxEGX7&IV{gpMDdau=RsjHr>G z(*ugAm(#b|0P4yOxC0xpO;lmKxITv69}JfI9QsP##iu?PrZGBiw5HW|+HjeU zm4t}IZugaRfXor^HP&VbzAy@8e>WTrMH7P+YWpy1Q5gBrRDTw)INf zCMf|fyvmT?r(os@x|+-$ze4QiB5^aCjCgk*gLyy=-F}VO&xF#ox0&f_IpWMaybddq zG_8-(t|NK4*7UecuBly3_dIOje)ZS%thh`Kx6YiXx$9Fsn_aq4+fa+$dAKJ|{FKx+ zqV!oka4+s~Nzth01tzU!tX>@u*qXT3RP{DY$v&8e)AW{5={~k$2-;`EFwv2QQgtuk zrBUr59UCy%Js(#gW(aps0ng!(Id^l2`Qla1JQBId6HNqJ>G4R{&bzur)fpn&4X#1w619rYdr1M*`^k- z7PXf*L>L2`viqBOo6U5D3nSZUL7iFU#9(2%Ide!)VS3c0eNm#wJV1fQQa@OT4ke^P z!Gcw|6!cPm*&M`~`ta3eJ87lo!=@NIeV3MY8NMZ6W9+`f9GevAhVNL-D{N#*he4Uo zduh01Szd*a6hJe)gjR0`IGfzJgz`sFMU&o~P-mSE_HDcMYR-*(KAj`4-lf{Zpho{$ zx5#k6HqiFV8)EZBaGLb3JS7+fWKYD>{%UoIA}pt%t~RXmQyYAOZ7vxY%sq)x_4zOH z_BKpb%RE1?nEB?OuekNFs1IN|&6!ndgsU$EXVYlPU8*<&Av~^@(aW&{A)CPVSP6lF zU?KtfL6Q2%PybqCYFA1eB11iwO@SNT%idO*elUT_97NtGIAD>fulwn0NL*~hSX7cOVg?}k?y1GBkU zEKZc5$Oz-k*17{7z+NgJ|gL6IFp}h3j6aR)}c(TM=Z$8ikreK6nVlnx2jFf^sqK)-u zN_bGkB4ajjeG{1i`Kk=D?hed~c;sAC*6UfBcuYZUC^1$_fB!Eye{uqY2No8DegL|b zxSzc)en#=Ox*CUDIkesI+|A4A;Z?UlVju|7f~YZKO~g{2SEw)#sZRAxX1Io=t$rMO zw7oRS_nC3Lv2;RJeZi-TAfBwbDT^thft8qE!0LROQSPJs9rh``?+G#>WS&d?jOMb? z0te>FEnVf51iS@Gt5}8bm(7^3M=SjSBe{pvW4Z;>LE;;V`~~1EpC(7EW6N>ONs}dr zdxqsuW!%>mEP9#K0*WD9*}8)3zz#6So<&%*k*S_fwS3Afy(I} zBuY;Z&>?4nc#;Z_aWi;ECT&W;_RXY{*uG#Q!o(^I@Ua^&Yj0ReA?vI{Yx?ijSVt6C zS{t{W(G;JxIMty3bmI&jN-2ipnKLmyN@d0lW(016jBSLL)fekcBz9TlJ0k^gC2W63 zcD=LJ^=0nE@%Ca~P!s>LH&O2>LSpeBPDKRH*x-Rlm74eIzLi0&g>9|!s&5{JFvhxj zNWvE-)-sU?etMz5s_dub2f(P*OuY|sBZa_PM1G6l>;1xiP{^f=ZY!hoHD5Z0saUQ> zU0!UIZOTwWRbJ_Nnr5gmw;sxWhkPjyE!<`6E$kRjWlrT=wlAqD^HY!40yfEjAl(35 zDEcXT>oqQUwx$B?Ty6`9gL>CRVTtIb%&f++QP{?sLARNeg$&plk3P$K?)~20I z{8H?Wg=;C$n-^_JmB1Yy4Zwah`j#Y7T1gM-@gj%OStrSK$|rok0?K1 zRzS_<&r+%!R+$W)vtYhmo4HRxDo}N?+>SShDKmPhWloHVpm?2i5q-W~vr#S4!5r1G z`ui5;CV!!l)h5&22&>y#^M2IYv^oN#C;!fgv72)C(L^%V6xeA*Sox^l+h$OMSE}!o z4wEQ)C^+>joi2tJCAKdosBjZ8vm<(7_`RifBEizwAf``dwQBp@oDh9X(vPleo8Irf z>s;LVMF9CA{v*EC>!d$EHW_4Ntii?VZB+||Dh81{aVg46ZV{cB=RG_3_5*DT&WEM6DxU5S9GG;<+&_w*{vQK0`7hIu{-eleHWtRe zk9)RK6suNbfZps;=wv}0R?vS3sni<)RPP0g^?jE}OnCN)m6iBYQh@`fbo9YP9`3e0 znjo28<(OaO-#JI1~;8X2fBo9ndYu zCw2O75<3^7Vf%3S;=6n2PNA?lNi_z{JshSnV`yQjV&-A!#6&_#_P2alFxPU0B*SU0 zD6?`W0vzT^6fx#F!$Y1TiQQsp#B5;nJOBE%9!l?{IVo8C#6)6Y@sFgX_sdxPn$ltD zC_Q6GRmOaztpi`eQ}k~3k9dO!cZVD{H0p&0iy$fD!?RR72eEr%AG?eR^gN=XkbqD)^%Qu!a>m4f-xO zk>bnyA&??IcZ)FsVJO1d(7o!dIUUj<@chwV*5!n@FuBdr4sM*KyZmPF(ER{w=5z2r z=+ia}Q4y5#vD)na@kD|$l$y%VEq&7T&Lkt>N-IILbdPNF(9`pVD^tZ8w*^zL1 zB7;5wwZ0g6_N9cL5p|f;4!9HQS`PP-R28-9px*XaIr-o>tJi>r)Hgtf&pDmoJWY2n zo;8+O=N_Q2zKqFRZPIKC?qRwn!5`eoafP)?OU@JWJTP5-Hh5^|Ojb3UeW*vh1Khgy zJra6Vgj{YLt^RnN+l;ihjF5SL0ajWI6a0hf&h$Tqd-GRy|Nj9^$ME;nT`Gzbwx17L z&?BeciFk6gL%T*M784WJ7av9R$8*XmIp}YcdkSOac+uPTdH6kU zSC3h%eYUE?d=`lza)y_Po+<^TnCfFspSZher{e)jsH~Izi4YLqbb??oHoxb6Sz0B= zErSoVvGS?s_Y=XCKC~KMV%UH52L9)eaK4p+@ox(8PY4sbU%zZz@iqR^kpFU9{GSBj ze3$-@K{!nRV?a3nT~RR8|BFWcCE9ObjL6?M^!WBB-^>;!d=m%Af0p_8IU`78$bY0Z z|2+)O-{kr4VsM!Ldl($1e~ZCk`X7VAVfx14e5Y@*e+!%O`$_*wf1~#ND>5D9HwNcB z{q3i}pi%!DYQuljGx`5S!6Epj;1K;Q3QiFM+CS2de?!6fzY9#q!12FOgPdgeqk;G# zI`1K;N$dFpT<-lj&WFG)owow4^WXmnx(~CbNA3MW5kk@QRi|IMiT)l%b+RRHm!`T4 zF`b!X`mfNjTi&42;uE6|u?J;7f~eG3r8~)u%rM^&s!PhKK5!pwK5fUbetqgiuVm&6k)E9UJFBQQ-VX3)QD zxNkSBW_WxF+`@q`by~KWM0w@ubaVF2xVoh{0n64&-u$Dt_;)~`|2wgC%>U9Fx@Jm6 zGW=zqK|Ff;oeI%6Om^1jL}8?G|7M^6q_iqP&N6e(n>*(wPqJ{wc7}zE2!sg_EmEb+ zm6}1~!l{yZ4#57>SBrd)gs=r9mn)HQv*q-D3AX)>g+%D!TuQ`&HQhAiT}Ba|E1Oc>Wcrz zdQ|@!O!qCgZ<^X)H~5!D{(jQG(%)|PUs+_PZ>a2d`sXM4JB$2ZSAzf0B!9Ej{)LhD zkHK`3(7oR_*?{T)CDXxwlj#DR5a9kn+rs>JeYXFoTqbtb|HZgnYH8G9wIFz})U2KW zsNH)5Mgs7R@bKdSF$eiQeKv~8jnbrl`Q+}{wyDd{pEM*MEs$1asjlzEJM2x`24`wb z4Ikf`$iKW_ZfcU2oK!kUFWi?5@WRboYfd)6_Q@<)&~qjnJWS}o`g|C_abDFnunrH) z2Ak7%I|&c5TVNRxbC2!tdh*ifc)z~h9D8tne$e61F6RkMT0_!K^z!0(59;(;$!AK< z&M`Ba+FVw~k9-yg0$hCtQd!*E*vdh)gIEue+VJXTY`rb={Nw&cv@<6GS16 zE2bdI8KAetV8A3HN_Xb-8}mhB&oF!aUMal?t-p~+4mBa!&XEmPmr)ut`JKK5?fJ*W zM|UOdHIk~sPAvo;5AODdxBL6k6kJS?M-0a6RY%BkObDBd9nb)tpOG9tJ}RUq*v-OT zmHe<5o7cw%e}@_elxx2h-XE^Kq4lDn$+hFdOk%H_klh~&NjK{^RGam+g+ZIV%>Y1-NG2Q zi1KHHmP|;;X_M*&3-}CQV4%O>k*`%X zu&quLNqZ@!T~Vzc`lacw+JCme&xm0umJFHn(Y1+X$Q4{RjWI8m3zSIpf>LYOEVqmD z%uH*TU=g$jageQ6vT6jZREl)&$X<&IEagt*Nh&G8*!3%~*ClhvFew&dO^p2X5+}j1 zK93WH6HjKV>{G#31I3$!O?wz!D!%4v6nAQ)e#X?r@&U3s`)Fd1FWoE$auW3nhKXuP3LFXVZpp)f>FXf|^U0UEITKG%>qf)G zOPNvPD)GSOe6x0Z*GswC6gK1!r#H8|JV_2jpIJAYU*7$t)C-ZWR3RPwkSpNEs<>nn z0Dy!$Z#+Nn+hL)?Gu5^F6U7Z*QO)Q_08O;WysVd~5H73CHKWCE^hh+=3rM9nmPokA zXlB_{d9Vt$dWS$^lbo7}E`jZEV$%76R9hSo@u#0km$F%mjxfQyxdKl5HXaZ9DsP$m zOeN?}j5+~!+X4+>qzJSE6X-4lhj*v!rx_x{rysE8t03~HcWFkW9MRJtL<&!$u_hv$ zN*lYl=&&M~zh#j*@XFKpt1AB>g0T$fU5$vGRNo2RID&!~g~KeRwcT1?j-&DKqS&Xw zb0`fE?qxQVbrm@JFg^9X>}D>M8U5<)+0%q6I;b{$HfyG{d0#)Q7F* zNU?4+*#q#Htrg0h5avM4rbn=4G%co!0IL||w6()~Bv?P%j%%oZaIbCWMV)~6-;J?|5)SG%jHNa#ANmeg5~EcV{e+7J^Y|b* z^VD1I`sE2^MwBApd1C0gwWK#G9fK@K-5l&%_h9af@ z5rSdy&qCN4on%epnh~2Gr!LNP%@fXrTfOTgBfmM=XPmJGp4M)X^C4Jvwtm$4l?{*9 zo4TiGQB>OPVF(H7!H69j_Ujz9J-ghYhWvwIB%}{Gk@YosWtC&=?Nf zj2WeX0ef(O!cj=ji)bk(FH|Q16{a+@Tf1P1GdtI_M4BG1DATH7RKkRl3s=YcAGO!f zxSTJ^JZ+?{B3ln-W>0?+mzmQ#{gyfOr%X`yc>|NBuK&S6_m zxU}r{x!#E3`~iY#HFFO6!K`cf!Ky7NrA@br{o|z>I489>^15Q7X+IWEe3 z`rqmbHgsqC*J`_3Xrojt%L5=T0{nC}L@rCB(w3Mjd&E?Z!_>L+-lBOA$qqB14 zT}FYS`dpG)z6(C!#I|}^rIW=8NRg4>G&tJN6Oq?&k`!JpDg;|m_md<=J5$x#*b&S8r8KLfa2doOhVGuNyFdsf z5$l+fRi@)*)o7f}5*N+}G{%N)=ccjmMFD956yP8UlV!6ro7(gER#Xf%Q~ta=)wt;< z{Rkw>W+RFE#@)kNT3mwX)o;rkTOH_?`(1~#C1gE)*}BI_2D0Ivf11zIQ)P^EiqqRj z2>L+gv1=UI--TMdke`+N5xe^0aC8I@PFJLwEt3KcE&r}z^;Szh8GPH;k<0Vu1rzWF z2Gso7qx?G9VDR~+4_2j?|6V9K>Aoi*CptzT|La9zpE_rx1*v{&DCVkp}cZLh49i$K9Qrl+4^TjrG z<@R!e)jGmbjeRQMU{59CM%4CW@x^aw$oK#uBwPbJf+jvT%%nH9L|_abIOp2dyMK z&k41ja0tU$H<1@7-IDD3a8csX3MiSI&M&WkmSdN$4`=Q&z^(GvxKF9fu>JVAn>C90m4} z$xLmM$Zpl7<h_#bq$PQ+||} ztF1y?_$H{>xTK`8ec_n%pK)zpISiO<+j`w^8Q+*8yiKCYFd2okI92x&({t4nIruf;HJ~W>X9)w4WpGIY;=CcvqMN zld>E*Z1Rf_RbjTS8#~mcJPZ?5D5YCG8z@9V!V0yf847MO11Pq73?gJZ`d3;|F|%ae zeHX5|iJ;CI_NCs!qZYQRAv<^N%r0-cY zxX%DMn>~hv9t327<3lY}_4DU0piRu`4l{-ssP+bX zQ}4@Q$KVk0RV=rxvCs6+*7_iRNt~jr#eQNWo)tOWjsur7@`j=>GPJyvMj+sKyM+lX z+FI7oS}GrCb~XI#ba6*NYKqpZC!@Q?>e8R1xoK!KuKJk~wFO{E(Mf*rua*ZM&*(Bb zPp(oNNqgOTVwvC9rk8ylSu0nL+|%SGM_;if6bw%k5484^Cuw17mVFSz=_;V5bJa9o zXfPna2>9xOKQX(jE>p64UF^{ip^%;g1)6-Y=|P_uh)4>q6|EBx%HMkm(`oruS~asv z`qha@3FY#zma%qHCuK<1sLZ&Aak++-vTJ_Su-V_Y{6lj*8H`=H;G}l|uIIdJuwOZb z0?gu24`wKoB?Gj&cQb5(4E0x4qW)~RRwvY8>CW;?OK9FW~2^ki|d*V6ZEETw!3a`qlPpIm77jqU|3zQa=QqAuh}@ zMjL+%{WyzLiT5Qz5=$RU?E(*Hk$e|!iX9C{=4YAp?!wYqavAiOY$oEB#pxS!pmfUE z(wZDgBo|74p?EL_a@8v0OG4RfV3D%!Fln+L0<3AwkQ~Jn9ZtyRK%}y`dR++&KQzh= zLSI}@#H|JmN33o~A<_j6;56-I9!Il#O9S>tbZ|)UxF#^fv^t%WD7f=>UBH}f|LUcsf%2E_Uc?`& z*e5BaGXp(4i=T}_JAzeB=+kws`RY1>IbCxICT6hfdCG^iGbMJAO()~y+&?$u(_-WVFP8JEf&1dj;`-n?2^S>cDmm5 zxZiR$#11-Ad74yBqjd zYrTK9*85j$y+7>xU#<06|HsH&|3&=5{|8r+iTqQ3!KMAr@(U*#62v}<>l)HDvo&@B z@zXV=TF}I85Vi;{GS3AG%5?=Q;mCfS_pOc=+wEPm_piiz8OLKmOX%Da1AhP*5`8hT zS3%c*WLy0KV1Q-(1HkY$5kl|BFeOgP{pSwcf1*b9n+xLi)xi8~Mf}@U_n%x4|J`Tt z-v}_gkN)Qc6V`vCuJjL5um9Z?{~&;Y^>+%=-=t{#vgcm}7})-ES`6#|Ro(vMpke!+ z0Q29ar~ghadFK*-8Sj@|@;+1MU$cE*^1s~;Z0{fZLp1b{+YNs$GGY4@u;nkc@sXzO zepgFSl>S{UQ68B6@Gh4Gn!Q8O?}q;O9zcII`9Dpe`fVilUn4L5Z|SYa_9wE}|34uH z=0DX5Wx~1Od*ork+%vc5Vi?z7w^8x}13?HsfhqR9kXCHY{+oRAFN^+VpZvQx@o)R` zf2Z``*VrEK;j`mIlXHyraX31vrtKY2>$sZ90+&}naJ|wI^=ac^=YWr*BaSitb}|)=rF@m`&($hFomRZpK1#G%>E14@ z;n#=E2m}eezHBGIz^dZqhBD#uzg?c+1zl@v5ky(wu5~vV@M_|{Y%LHFyj}+NZtTK+ zRo282kX11j=%^Y8`|7ZhY@rx*eU{lNFy{6Ac-5Pj&+msxhFm|BY{&_D0f*zdTtsa5reI1hmLhV5}eL z+7e~+<$~}{rjmzFis+k%0;OIOOU`!_BM*L(8sNxztd!W#pT#(t_86~|ouZ zE63${(}6@yUvz|OkH9n{wM=(Z-HgfH>S0|Da|Gb+Fg>c|@Tv(4AZjuqpt!vlopna} zL4hmrz7nYFDn93mC2C0Hod;=KvcdFbg2qSFjehE^cE>$~M5PMyCzWNUsh*7;jJq-Fd@)ja>J=-89C7h`+&k)u2 zLTf-)yW2p*=K-^-0SONSL@iDfc)ehxuaMCU=;??p1HLFnXyiPpl(evdTd>f$1cE9} zYITg0gx_*>FOW}j$gk~#Q#oNfb<_=HtufK;8|sVb4}eO-l|L7+*=O?Uw;B{Gzy z5c0zE0K7~`t#bN+0VW8`Hjhe5A*8KqroqxJLeu`bY2*u&G!2Y8ZRQ7#PZ%Gk4&$S0 z^3sjw{Rw2v{qqld@GIQ}7WMr3pm|ik7AYK=Xif*?95b%s+&X#F>S7*sA_8wj%*)i) z5w^r{CJIo5@oH{JkzDTYEsIt{Fy?J@FdXnJ-tF69 z2%0hL-rnXY0DS$&7l-zP!xn0~COUH=(2@R^;>o0lPt_VEV&~JqtS*9gh1}w~xZ4<% z#2*f@%K9rW!$wp{9VuJ0vO&^wN1z~AK4ne$G}5i^r`Ammj6KF-tWzH|pf+-yRU$(Z z#tt&W`fl9A1lO3i3pCIPDuAVGWnF;sb)DmA+PGA*d=gzQncln)7_dVRD%qNZU)~aS zC^K}B4}+-ht*fcnw(V9>#13Y?wV?6gTQc+VJ zgVA%huJ)0h7|J$eD*_ULx`*(hNQzKw8p8_>X=R!2;@yHjK-!xH zOxY{QflW(?ib<|^K4S;jL`{iGxCI_YEsr}Qchll+Kxse43~K}Oc-}Px2B6wt`i|~a z(zzOYX8oKDCP zhwM(6GYjIfA7f%{jLrI|Jihdzz@O4QowUvN-&;oyxB9-+36kO2C{$nZtH4!oKfj8X z7G|rxToWx2dMRR~E*Dp}jOh2KGrnF(sPZSpkrJp1vL$@jkL8T=cyN{$~ zevsfMhu$%CKBA3Lkz4`Kbmn)v*~>)_z0Z>Ln1?$;Ls5aR${mK36h?eGMY8BJ89d}t z@L0V2#&%zI;W>>Sskuof;^2G-=|;tDKEG575R7~>vGd;XzVeA&xcfx!R$4BJZ?TBX zw@RhFmqJ(_=w1Q_MY%7Gh2y%G;Ia%10K(~%p)CF~XxTHPLUhIng^@V{Lw=XP^V80L z1E-B}&TwXY66K8dujxHp+M^BP7%PQ?GF_j2&58M zj4~Kx3#sVy4)?&a%TuUiIx5131g$%>C*Wsb@vvFrigIQf2md8T2{dMsa}$A8aO*Ii z!)EHQl)037)GnIp&sTs9zVwDF2m*#RhcU-6VMUkfLLyNDN%P6F-kB1^Z9`q;6G&)4 z$+{AAyW~fF68g!8>V4&5n!078=o5~_uSXqO$dAt#^JyiEE!}E)L(45(+x(%R=@*d@ zn|M2juGO28iPZIuQhF_4zWSVi`7;l((LyY5WI-@?fVpDK1ppRYni6W=lp0p{qrdb# z!Itb*2jR2@0As;?=|gZx+<|}`1hU4V#MFgj&H0JJA9X>cTr-n;0q!y4d^cw{pa+;2 zwJH{D?~&C(q@3CsOD;Ug^0Scl&ed(U)tJgPRcA+_cHNiD-RJXF;chu@^V@N2%#BRK z+?<7UZm+R}sGU0=iwQUY31porloMy~K458b$_-dV!7lEd7aR&8YdJ$f94WHQ9 z^8w+|caFIqFdhGi)uiA!ES>?v^evw{5UGy%O_MZbxv6Lf?vyV+oa3hFB(!omqt>)( z8J<4(?uXpk#X!1^8n6!6{8v2BIkYM`YX?>hwLKbIlXD)Yah%xY3t%9Enb{ZJ7WyM1 z-Se}gug$q95pzgwH#p0gw@ucL2ui8~N9>=PpGDUaPVUKP$gqf22&_%jMGE6vB=y&WAW&?7(2?xnKK0sTghbZbN0e=gf!-@|z9jUbF zFwGR}AGzV0T61sy%p#b4S!n^k{M>y$%m! zxy^u74kKFf-Ysj$W@(^02Pc&(Y-Out8n&kdpd7de32S$2?OEK2CC9UDfD_&|ggq>- zxkX87cD&|8%GZyxyl^=HisD$I3b}AGF4zV`aF*j=pB?PT3h;R{zS^I&hs%nc;GJS1 zaF;9WO#N~{;%;dslv60DE#Aq)3GcSs*4d9gCDPi;v)|&ydl~tZK0ZBFC7ER$0RGT+ znoaU}mfVz=f>1FEgVTt~mH$1bdBn(qt;GxUEju)mgCw5OT9hV_+Q4;7%5bu!Tv2Z3 zm0LXx-miADzodyeITdIGOg{D=o)=(-wuvXtW6|Qy4P&im;`Ib3E8iz*t#2OSv}@kv zj}9Hes0H?|oF-329HYPQwzJWpJ19?|x?BNT+N$i_Gn8IY?T0q3;o}4h`biv=Dl82}OC)Ot8ov*Mdm$~wY&L1PcmZJy|RI?4%nwr!h0NM+Em8Fy3fZ}|M+bn);QY}e&^JHo(L zR&c|D>z?{_h@K+w)dE=h@bT509idzj@cG-U0^Iw<*i|%pI4e>{ZA%?nm#Z z=JSQjhL8p*hC5Ap)m-W9BHSU#x8WC%4FTPi$k@%>@_Bfdrl&oDfF|>k(glV$d%4b- zNQ+o^3lVOU#{D&<_0YFb{Ln%0n!7MM${}4+lR)~l%B%g8C@GwsqKHXm~H*<;%r~=6X^4JCsExgn4Wo#}P zP?;xL@+y~&))z^BLM$ALS_azU?)^?b0CfBK02 zdF}$<9RFc=qLozh7{h**$)I^wp%>gKPiO_ub>jjsLdjF8yXSIzL;`^Kl3L(5YoSE{&@>!DQOaT%Q{ zi2MM6N3FQ>M}Z)kri=|GiJRbWYeP)+@U@NfmaG=5(u>j%48r=6Gr3*5;PLlY|CYtYLTwGjNYX3n}518#j?~ zCb0`#3JxB0f!S?T`;M}x-{d^}_+V`OBAKCVdp6O)zhvG?T}^-4;LF4h7+>!UH`KXa zY|)xd#yL&&2Lh5;_gUIDC_p21LtV7{n9!*&?)*LM@^&hvGf#N00gTnKZ>f)-=lhVzXbqv=K@U8%Oaiiy+a&b6Of}A z^#uh5a(OE(NRB$fl9Zk4v@l9PcFPfG{S##AxiI{3a0|`weupll91?WTfVz ztfZ#Z)nz|WM{_d zDn~Jrl;WP9b5Wz5jC!tc#fm?wPp>zE{*H$VcrlV44mF8{XL#~VF-F@|^){vFvKdCR z+Ev4QEqUkI@;U8rV@<*Kh3ScE#2@{0@xLL-n<}`i zfA7neSd>?>lQlW1TzpnJjyppIPJQgV%d{@YsU6>#EPO8|N7G%gp#1#?D(%aF*DdSzudA<3|0X{Rf9=D7j{4{FCqk&U9)?axU^OGGLEn* z-hdg|Jy`imF{N;ds_)i-fH366Jue0x@NVCmA)bS5V5U&DW^aG0O6W-sEl)ehxTMO7$rv%q{7FW$)7>Ga?Zt|$qtUU%I1Xj2y>6!tWnqw(H2IFx#di$$|g$D}x zl(DBMVeoI|xy2!D1m^hAUCdcV@ZgwPVGVAaPo%HYvcX-F;AGihx5*o61z|<*(Sj*m zdYmP732wkdI&2JS1kptW%i6r*W(q|kG#`ivZqUFYmRhd+TH@pw>ez&iQJuHzSe#y-hfspH5GG%!@56+9GfTZXhA)sEHa}iS@N+afyuX#5xv6!i8_El4#XB@l##*)psZ_ekvPxJ;hV4+# z9;|!{9=WaU6&lT~(H!rHdrt1~yaK$ej;mog8EZ(4gt6&{@Z5@&YnE)zo$JC=xlN|( zV^W=CQ~*xk^ioi_7^F;s)fy10?g6Cs!DKqlNvK`;hehV^<6)&SdR%1wI}gEimPz2l z8oE&6v`gGNSjzlFj%ZGl!k(OMu8^8zjFUnx;O-DYgLvv_*Mi&Ma-YDmFYr~raF_JV z-`*zp7t+PkPGK;1HFRe{+A-^bc(2@p!y;aGtV1*E7T5J6Kk#X}WjK@!lozt}9V0yn zhDpBM!k`NPbixrbwxF$+CDYHYsRYZ6D%kAwCnd0h;@8YhMkW=OXh741WqL-z^~?aw zU~4H^Q1FiqBJJ7+#--cl;B$C8)NrcD$AEsM zUahAtcdqZx6T;kG75$vZINipJ#3Ibh_)t7E*;JhfU|){hCl{bx{@!7bY|Ji@vFYP@ z8gzlWrtF0?z0A$OJmPYCLKS$T;VmoL;$Jf9cKyLp0a3cES~;LvNX13Ouyz4FuO&yV zgaBe~ZJHG9#zRFNhUqSHoUb{1Lr+u593#JRPu(FmyLPD-fS+EeCCa?*-j0%UB3R%| zP}z94bMrmAB&j0KIZI1iKuaPigK>fm!Ws~w{Ds7fX9wkGS2C-|RuaSp$D-%D@mo8C zAPB3{)N=OzNhoOWit6`SQ*i&OZ4Y_Qa+q$32*lvt`EIzz3ydG#v-)Ny=&c}f)PQDC z>xWiXvsH>fyrb|>b=AFu_j}b$XbkU7Gm|A1aisYXK|p5Is{09w0s7LI6RvO!x`M{W~j^x_+!4W>qC5STpu5AS-Gxyk2)c`ATo4&}Ad7!0g4^wY7ip+rj50C1Wenty z5rmT*)?lz*S+ytakib&9g*IWj43^tR0O;-!k%KLEWnVjt;NNGRgO%^N*^=3@M4IQI zz}ZB2z@OE<_T0d_p)m<*MXP=ix?!J2?ffV{>)T+vid3IwI5?`OJiS(!0Lke_W?+n%ct-&2xBqCQIQpE4g0h9#e?a5qf4Ddi_nhd*I_}NweDea`V$$<0R{v~vF(TiO}|7W zJbZ$>v3TrhErrd{^ZMp7>a-3-S&DnA5j{opGWbjFBbF%(AVx)WFeYhZ6Ik+Z7Z2UA zz+|5}7Yz~7Kkrpu|17GHABx2^I?P8tHX{D1u>Z;2_2BDKT9}fSI2Q;wT14A@a%eei zcrV7Z91ElVOp)P=4fiHaP!;_27Fx;&}e}y{jpNFihpSMgCuEjAksQYHL!b4cHy!N9iT;;vMN&0EO^w z8U|Zc>~om}uPo)h(QdgrLQ)vJgc-N_;r-A=hPsc*k|M-5x+OE*$#06{xkfR@WPW1~ zurt_nlE$V5@TNC#L1n{rp5NWrKJ^NjaftGK^MHi*=&y+V6Ed)981X`|9Wg8sRhdaN_FWflnLp5=) z_#|0pZ;^AZ883-S;7%s=rcZNwYu4GgW@|LceE0Hg&~$XyZb@-Qs#E%Hg5c4? z5X z{NdPTlX=EZONR$L*GlM%#e^@?w3by$A-srU^ao`cl4U11A+yEm6a$>HTI$Vp9}0Uo zRSF!E_pPW>;FV2f2?}CaUre&~REzvlO;{`mt;<>aMW)isF~m5|ddfCt5@iZ2_|w5T zeyCi3tvA2d=spPlq;X+Lo!I{5pgz{G$obPgfdeJty05hPe3gPKv6ci+XX(S|Z8=Zk z8`rXrTOrg+V1?TO9#I-gDMJT=<4Sg?O8k}wrwq03_`5Y9=vAe2$|s&~MzzmpbFVG8 z0n|ty>Er%&>Y&EZ5NV(I3q%a4a9@CRrWwPtF>X-b2~Tm*!!~ z(AGGd&GUThWR^-=J)Cg;a!G>o=pdisDwKH`FUuA;E+!E17*aHY1W0Op@em6G%FAFcu$+EUYBCD&a#sDu_y`Z=z6*=wJ#wj5u$7Fiu#|4MK9 zS9;68(p&yWxUv6_L7@NFrnj*F6Y1sOz=Q9rf%(^p_#I9Acb~<7BTV}~`k#ks+5d^m z@gJz;e?W1@e{6aS`|s%DzlnDJWzWBe(z5^OINe`M`rp>jf1tGNzk_rCyO{CcqO|XZ zWBz5lUnuSSOqqYp_Wj@e?QVE46!t3``p4~tzZRMNzmT+J(tk*AVG;QwNelZ2l2+)? zlC{r272{^qz_L>+%2Y1p528 z)Zglmx&DGf=J+4;JMlkli+@yh3&-z*>A%S(|FY;`bjcjQ3lsmgFaK5l^4H1yA1;~W zpB7U6)+N6ij`^4Ie!1lLnKJ*H?VoYUobMar|CSp4lc?;$*1c~I&T&{5ZNznG!#%1GTXaCcbzh4D9Ibz=nbOH`O9I~E~B7z40BwY*wVg~`K zJzJMR58J_#-hTs8GHN7MJUWY>%h9y=up&)dw9pOh-yUqSi>J;L=oR(q#H+2;4Py#M zd_F(C+R_WU*S5eAGbqQ3PdO>dzvw0K5_tZZwncCa!v;;2P+MGbGTO*3%^yy*s2+#8 zz0vu~JVx+(|8l;@U~&JlG3(7JJJJot2b%x6zZ1_hzca~Nilf;Mdc1n2z}_%WfwJWL z(KP+-PRsdfp)&!(#>?IL%iYGy-iz0_tRv6+t+k-Lpfk?~zv$k<4Kv0NtIy}vce;;T zI|sdYGkMPly@PK8F2pez{vo^1_njghgk2zqlYY(A9NeWnqP+qt#)%xesH88>o{Vb7 z;;FpW;oNHZS0!!y0{2jSE}8h0#EsDWwr!X}R|g!P(g;0sI5QJjB@+1%_Op^M2cqq* zO?D9YwAN+ehMFzM;TgiRx9plS_|nR^f*R*pfP|}HsR9;>__3n2PM=cdEb3LA0Q~b( zVUj`Hu9ySq@|k6N@{!1ODy$0K;8a&b_5udvJ)<;3s0WA!n@sP8e;8%GGy?v!Shaz zSGx)Is~a&8x{PuQs@sMKXoD%1m-cg{?3WzKj*jKLT)plOcfiJw*pdwkNXDp~{K+SC zzPe=nnQfrcc;TZ}}t;2nhfQX6DTn5QrjDN)WMq^lzStW;&<>95Drzr+&=s=hDs6 zk98MN&#CatT5BS^&2&g@)VIZaKU;>+X)=VV%kadR!<>p&1&_o9l}C9#`>o&TLycGc zW0qR@__y~gK4&Fi&wNYG(`C{ahi=`FsKseEZimL zCiE|6gI;-wz{@(+ubi;9SWQSI?P7E8&90+GKludF7EVc8GSyf>Oa#C5-{qHM+F)@P z-@zE?e^HVZ?5K}yJ!Stwj*X{yaXu$ywewXR*oMiW89N#}r=-|-O8tdZMO_F;Mcv~V z)t7dUixNZ;&#?4V_+3_yh|PR2lve8SXT4Is`ox z)sh`v#2+#rAbDPd<#Yg6ARCk>RZs`lN~Dgg;oa;7&ZB-bfFN+rb_iQu)iB4jtC8lwd?AtoNSn$4u&z3I?7~zhM}Unsq&=vEvXcK@hO~@K>h~YkR`YOc z4UI&IzIGpc#iDK;1G6^}36)WmV8sbK1a7o+Q+ZBXUf2~n@(lz=(aM6GHsl(N1x`&m zS5rs4vjbN<^zpN4b_xm(F-q$)KWI#7C=LHGr7&#dVa?6^7V#lqi_Z`Mm!q-IuMMtb zI+U*YWp=G$z1LwzVQvbJCrLHJX&V_|9t9+nIx{yJQhMRISIB(4K02 zXeX_7N$u2j_Aqt}EReeU1;^SJ%!H-}3M2W)2iNt)$wosX=RwY5(*dhSKcEgVFc`kq zsjv)tILnNO2J-!%uya;tG-6OTJzBT$Po_;1rfQ4LBKodD@~Pw-JFs( zUksPx7;M3uLk{x4o_rxaKG+%T$fV1h8J^$FhZ9L}JUfUoGwXAy>djC@o80FKDyG~-@{AknCf0g3oOmWHNJ-By z;x53`czR4qZ7xz>PPNJw6h6_#6|kzjwYA*v6mM!V3kmMZuPWGy!DC$bK^Hr)BI*SA z==gBlv!6yvkkPjxVb6*^hwZY1qMxfk;-OgA8Y1zeR@_q&-&4_4ix9x7e++z!q)KZc zOFeOxx-Y#w)2!e-jFPZ9&xU+}T*C&M+ZETQJzq6jbJA=rUxphw;lX;4 zl&2+oxT8C-EcVDF$AS?7%=D?wT*J7!_{P)RU32ZN#MAg6A@_w}XC=Qy=s|sF7-m3OTl{Sfw9#jHp|Hrp0J)b05{lRb^xKA*qrwn9^eij z8h5tlaMI5XwPO_)3PmH?&OXN>UB~W-^WBXW%*>!f{lr>gdYFiSzOAJHI-E%&{9NHI zSkqgu2*fpK(5Oja@vyMTm*M{4TLBUi#N~I|^@8g-K{M`BlSmr1zg?u|Q{gy-g>amr zz$#oE;WO2E8?&5z%-XVm?+`UN(3J)9iNPmRvTd^mC=u3wmYQ5L}!Hr1sX)X%b^bt@Vf7<Mp7+xfV*WtsPmFg7rrL9B6pt^(7 z0c!#uDN+VunV4yv823py%l#v#y}oLGL?g<5ZF*NGDfShc0I z#EZ?%nn%FI3EOAb^Db*CuMy|o&#mY`DGAlsyC=C3_HXHou z8u3IkFFs7a&5kt@C3j9(IaHr+RW^j}wIzvR*bI4`Iri1LlTE!{`aY?Ea37`+ox>Bw zta9(X!^ieLWO{{LG}UrJ`+&!9UV}WwToXUenQjbjAClacnn}p zkpk27O4)Snl#WM@oEL4i6p3# zMy!gBilIXQ=4Cv7K%;i?*O+9;ai>NaN4JCdd*5_UODwc{&#&7azg||}8n&|O@2~oc zb}l>qFu0o^Ay<}Px6Af4Nrk-pxdSL|N9^+^{TfPMuV2~d0?W1H{M(wR>O_3#TMAyh z=fAZfJ~dM~#ajjmyc z`W306a1Rw+&RMtUwJqYfaJJk__)3m~0hF2xUV(O9su%mx-T6|xr!<<%m#vD{6#(TzUc1ML<)PDX8T_3az-Yn=V`cA% z=hZv}&#S**%&Hx8Anhgg#u;XzvM|j5=*a9w zvBtpV?1OX7jM5be^wRzdbjJLJ1f5D|wL$G+t#a#LC?Ws@yzwwpBNpXSRRWe5!kEet z#s1Kx7pAP_hiOMp6g!0j!p{MBN@&R+>y_7cdO<^Dimi;$Qhm8Qq1Ye$^u3;6&Kqq5 zy(Sro1SJ!4-uuKqU6zwWVhtdkyx&>)j6`6GWyj~dY5fd*zmCwxc)fVqYSo)Pf9fnY zFi6kFwr`nJGx?c$ zBtHRYMBmgAQf?A!&ek4bh-*Kp7aG7wq{f+kMtG3p6ZT9u@gxQHm8P4U>`ieN853Iq zn584N(tPRtK%rl%SSq#vU@FdI;hL($GCvPFHW9^|t6CH%^%LJTE|f&)1L~8Bu!SXQ zVETJK^WG%&vL8l4w#AtisaB{>AZR1{BpW*DVT&1MzH-CJlnK&&q1@Yxxfs-FBM;5W zQ`8adFvO>$M7JKqAs_2;N+dL5#3=DX7#~qBQ3uFJxKq=jJxu}HmcVETwXmX=ceW!hiZC4?uv7QH{KlWKQk&myh$r2u1*Na){ zcar?3>j>*YzG3K&x92hQEG;_oaJ#7}wO%+cf25A9YtRgB4)-iT5toVdWaEpg33%;G?r>EHaWoay}mIZ?$X30o5^OT zI*Qf%nl+JY`&^yfT@Wm>W)({=9P@z^k{Gwz>Un9J)=mj^q}VT3RpEs2g6&6^ z6rMw$fv0-fkzCMQnD(Zjtq~@vqfefTW)ds9j6baFp%m>+Op|MIxCf&baxQY8k;bqn z3!caJR8G9A$;lVh4OSx=u~)7ei=05dDH~|+_V-F3L&ABx%>_9pvnHx7*L0--R^Q`` z!hQpZc_a>3@vEI+(p2(j7jovy=6f=9l=v#w?8p^bATetD`QlFwGNnQ2jNfv41d-WE zAC>GxGf1Cz9FX-&@1>;1P}Ib=x5xYG@+re>F{j_@$5?ca>x1BQ<#=waz13;hZwLwm zUZ)Y^Ck#5+SJf-ZV%x*8gE3RiWJcKY!rq3%g`e_vl9I0bCrG(oCnsJmKELLW=w3>I z#<>J*f12*;OGr)j#&#&CV712^{k%6mBP%hgEk-Kq{`Hfd>`p}Ic=2Uyhj@rY+RtWU z>X@Ej(Jdvvy7rlHIwj9j9JJB8djG9O=j@uTnIu;G$GbgW8Qny(1kY=(moxzf1s4ez z=w7pWDD!+IP@=Y2Y%RKoXX#`9h`ak&izRdWwzhlZ!a(+uolbMcuboLkpm^rA+eQl3 zSM!VtOBcsdkCL!Xw845iiEM|;!U$$06kMf=$TF6EG2G~*O-##m{!oviI@h|M7`3u6~KhlPAs zE{8@FEu!H1&xnB2qQRZrh;a0D3(|*2i~Om>ngS%_F)Ru$V=k4+BP3&KXk=tYW;%uG zbeIRDt~LQu?AN44vtyH{+#ibza;zN8XDM>XkpPK$tr}vF*R^31k}G=QNRrIqlPA*< zjzmZP%A|J6n#NfkO0pD>Q|G!>jA1{a>2VW z`JvS|*W^V_b$HgSVGP4l-@2x)j*i`wwHsOq#c4oEWP+e8s&cU zr(<$bBu2ttOe&6tK>r{1-aQ(sHVzxEr>Cc)(o;!Mq)0}goX=0r#&Kr$9_NvSjF6mi zoJ#T_DGWJ>88ds2LtzkxQW8R#A?G4woN^d)7{2Lw-*2t=UF%!l`u_R;c~}10Ya6ro zeeK`2V^u7OmvolC{0#@>h!6|5IE3|ARTf#LL;;l~2yvc(7z}>!@BXj3r?*p%=GxSgV`PBBxA*pi)CwHD; zY;UVLR#(&5A3>Jh;UB?0wzlFANk{%zonEaA75hILli!2;jlgdNek1T3f!_%HM&LIB z|9>HHSD>T*;oDHD%`uHRF$vyP?yl*h#e~%ad55Pij2x&X8m?nrhxqxM|4%}wemNBclw9GiuOCJ?PrBk&xiAm zn%e#Ps95!pQzoZ^VwWua2MH6d1>3xHUm|af_86WDI*eJ(**-a-23Y{j$p1b)A9Li0 z;i-AmVcb~$Q1}kto|tsLqiEj!yx!-BMxdJxrJr;fEf1PU*##WdMVKRaU#6tKMCoCx}dbC>MLrp6OU{!#1U3evPq4 z^`Sib^ujxFU5ZOfvPHVqLp!51hf@odbmT8IF8G&2O!4>2D?^d$bBDe&{2Tn>v)Nlm zEO~$X&(PlwQK4peD@XsC)k<0$iT0cyp>4}PdT}tz_LS{ave~b(8=Wwjl~Vnz71Q5z zbl7)NPpaQSoP~|N7aa#bo+x?vgr|btB_t9~nTyh+9j>PC$4BqL>+EbZ5@TqHJ>v+` zbLKm+fA@5KV;{Q5db2&@{~yR<{~p|a6te2fIK_u*I;vZA^7J0{fG=h48yh&;*20v{ zyE6)~dipD!eZPh6K*!~RvJX%xLnE7S!34Ue&7g3|_gTiQAQ{M1i zHwRWtzT4QJzapr2>H?wPb98y3>1*GxRL;%d3ZmvBBTPX%w#9lWkrwWbHOj=El7$n0 z!G7!V$uk{Lnw5&sVMh50ddYD-cF8T{Fd*&=lTGQ=$w;7s-qMMcY_xmk&?X|7 zsV1VDg*6wXt(214rwO4Nw|@o9!Ktekp^FNTB*e@-)>;eTtNA#coAQYG+zL;Xi$Us| zP3MCphWd=`lvp47^8z`j>ICi!aTX!JGgeucXEke_x~%v8OJ>>NXa?0%JhU*p&S|n0Z}- z9)3*eAzGp6a{Tp8@6?`d@4wsAy4~L^*l;fsdf$2yhP#{l-emgBeEf*-#L~23xc?Hx zPI)!x4_(;#(9f!E^Ig2@#CWl7%(il7K8j#km@rdLFqL;Q@4uG(_t``v(!C?|VrHaT zZgwwG3ahJhx&$Qp&O zpT88oW+#Q%Danx1g+ThA9YIqV?&?)nm@r#oMmFRP|DT&35Ht4-qz95F3gcrpP;srO zrEAo}LoC@V=28~iU`t7-M*piy$BGeJw5aa;@z+3&BD+r%d@}U-xd~m7)GzZZxL@lG zysRLtywt_Fp2u74S7OEVE8mSpXa!F~C)Be<_$)#fr`8p-1lj`&2pd0)S2$7hvcfx8 z<@c8;6V59n(RLr8H4MXC3V0+O-lY$w|H@!DJxd^Fo_m=uf^MJ(4@p4LXoYi}be9nN z1-#)&LCdrQ90~_=wOab?`{HwttRFMS&Tu9->nyjVQ>M=r?zY9c#{O^+w%J`%l((-X zfckkar2O`-0vl}JaaDnWzX0TH+FO}Z*%dfb`iQU2!cpER_INp2iU}kdDIvrL9-t_~ z&VYwAvp9=-V-Entz`Z%g3@pnM$*1=sYHm3%o{XO|y1k{lAah>QarU&QdIP@XHBuNm zHChsK6KpMvErK1p;FwJODwVBz8==Gt_qzhE+HvSm3vzm-vFQK`b0n0d2`3`WCsFQQ zQ?;X3!>`1N=@+LiOI`sk-L00-)^_c`9JD@Dwkx}6k;ad5Q_4i&1kGlv=bbY#=GU>T z5U`>HZ+y;v2=3Z(HNct$K~LZ=3jP}qU++pE2Q-wR6@5+KL;j(y0R=NFWJoEi`4$(` zJ3R}m#&v;{dTkDx!#wABU=CkQ_w{#*8mH2~j*53YIOS4&z8yif@tuXSbiAbX6$T=% zXz?|iZF|v}rd$LY=HP7s(3B=@%B=jzyF@&15`JOaHk&2|9v}1+kQ7vanx8UWErqn% zF{jQas*6~DH|P#d3I^03r3=^4#;s@yGC}a4`a=1BkF;Am9_iB#gGC+w{IqGO#w=P4 z6&6JcHti^5fwMbb_gBN~DX^h2J?wkQF|_&PjW$c_{&imF+B|#G2!)S+%HVSH+0M)+ z+moP=VU~q=JFW1%kGmClQ(EQE~Okt@f6- zQ(Pjibimj1?7=~MK|$I>v0B}$N+^gI-v|Sc-)P(7Y7)|z2jH#6nX}K>>;oG}GCP-< z2f!yxSgA&Br+Q7_FE8rj&m{2iqbA?Z8lnW?R(08L&dkBInoAE`W{&GQrfa9J_!sE( zE`EfQu?A_NG@Py=uDWRw?>qVoL$*Fp(X=Dd8`Ru!Tp-pP4r#=)9=)nJB*T`}t|xep zBzFCVId$c4^na)WK$w)Kz0U1^;k*NFxmMq&19i~ygX$< zCR|v=Dk-LWFbqnFM9MlZ*eoAj%XXMuJQsg z_}4SbZ9y53LPLR{Dez5${$2k!x&pY;m!(Rm7lGuHBA0mpGS#+~aW z#|*PfCOD-g46Gcily9BcZaTTxGIqyhA1{MXq-1q1Pu=!EMmDpqR>)F4^+i7?1eYlo zPPVSUxBZ%PRIG5V-*T0J}9END|s?tJtV_!~aSL zM%PxQZpm!Kl8${tHB#RAO>o#5A8BpWZb}kA$F2Q)TTHI-kzkH=t-%x~QN#SbdE0e} zpWs$gt!6C{T>QX2B}VQ=qG#ikp8K14!<(SJ3wWS#{Tiz<04&=1`bTuw)^{f+rC*7H zFa+uRTPYKO8<%%gix=FR$^E7X`oNcAX#E(JU>T(lN(bdDr{I^?r=Qs2I;DgSbmA-epySn)EIHlAc)DA{}P))|Ec8up1`_*ztM z!}rvM*I&kOSiHC_Vk5k7W^!lcUPyLXoV9kxk+q(j2S-?gPcURx*z4hzun2Rh4WQRE z>6eKQe$BT?zXwm5*o%;z1ZX1xmKd8?kQPtEqJ~PXsGMUBRMJV7jiAzdtF;hn;9o=_ z*G?w8YY-At5&V_Ds+Fhr$NJ1TjI5Ew>Q{oLEROlL6}l)b(Vn~0_mwOrf|3<2atAWS zY{&|CU1;!eFe^R}_9Ii_FG<}Bx8W`~I02CXrI>Hdx(r(C{+b_QD`f!t7Q~$CWX#H- z8v~hBw+MjBg5oPpL>*F2xTogH{^_=yPS1I%j)#i{?hE)!z^kF7e_Gk@CtlZB$I?ULKCx@gKrpirU+BATal7L!AfE)2bl|8N~r2@ndgvTi~E>G~|naO^3{)S&c!Ld&a9Li4|Ft5=0`*q(T{5c&Z#8)2d1 z`!MLL{GvQY>)D?(`SAN<&T|{VgFD>Rz=(ZUJ?2WP%(Z5Do^fuLs2{9IS|?RpVZ2IV z=SzA*2NkC)LyZFlw?Fd;Oy)nKRMWO#3zh4bB^PMT5lVxY%U^JnlWH0L88=O`oI0k% zg%8ev-aRs8^lU6pUR*1m6+}iqMkwZY$>WVJj-5j(#96lOV8`*^>PZ$03`lv8jrs`p zm9^Z4b=|-V*hV$bRS;LpGNwSNpNWzJeVu23!|f9oBV$JXuP2= zeOf1#@7L@XsnL1U9~@Tlllk(fNgGa5sWTA~jdEXi@ae%390QaKc*7OrWw*V=voLCS z6%YQ5?BpxNXR!D^SdBMLS^hb2*oc!DNIpVv=TqSlGl0%2CuvH5pyxWFUyY@y`)f%r znsG>G|7Bm1Ktj9%yp-Jy5uAm^K88Z)8A#!ZM1X8gzv;@{qgiS{H-zlTu?uESE|73_ z@`!`^#Yg#2tXH*EJ|($_>HDA8J+hGT7an~+N6e7g0MLbQH|grLvRKcX@&^m?TC`F5 zFRG+Is&&AwyI+?_CW%w^wtj@Ahg)uDn^`AX0nAtg*|xr`YD9J)*nD63zZ`M3I6r;J zzVus|wE|-gy{s0@;%>MY5Lq8V6OLrRsz_xPs(rr5> z1sL|WDj8a?JWWY=$gB&nko>i9s6HRM52+bI1hH#jC86oINOF1{i7zR%(F_Kj@>v_R zD$-MpR^A&U%*nC_Z$na-G&suLHZI2l$ijxZU7YB;%t1}KGaNZNlk%sMy@8oi)MQUx zM_YsKA^dDlJ)TvJD7#lwgk5{jp#=l<6SEh-0as}3+kMAK@BhCSFDdg?Y$_L0_JSptoz~JoinH5G_3^Ox@HzDyABxD8& z=?nNm!CzAtT_l``O-Yp|;z0iW6Ab)ea9ZE-z+ytPiPU+o4x$Fw^(!bkX9qqIh*9) zrSIAL1K;}^PQ#ABz01q)Rjyn+ppe}Q?k<8y^Wa+w+z6l9Ja3JvXH|{s!svZ zz#Lww8j&JDfg@^0GHKj{iB>U`U$t{y))~kaVh+clqcqvfQb+VqS+8b7I`|adHr@C( zB+7MSj2_bY2$!z!D18pqoASfKvS&;E(Lz^!z-SGono&YnMHQGw~sXck;3YP4g0j&h2jHSY5s_uUJ zXIiY!ydKrYuiW!4K;_+ok?9-7EM#|$-*}T~^yr=1?iB}&H zVT7g}bF5YwO5$6jF1d)Z@FrlT@$S`Wa_dKaXC}+=xF9FLO9HV!zwW%{B>fr{{g+aj z_IM{o!5iLVUh}7s6Cr$cXbRU?Ti2TukrKYgfqr^AP`m-2X~3KBZEr1XNxIvp&5F0P zBbHF{^Av2T+!6FM*0&x<-vdaIP)J3 z61v9h2ah7kd6|R{J|gvWm{9D{oijM)DxQ(w08xKU&Q4tEl@1#(UmE0fvQK8HAT=7* z+O+JQ(m-8t7(T8CHc-1V9ZzZvOcGUC*_=L`jQTCujx(RNr$Eheiw^&hTG<7jjb zn$T~2@@ZFwHAyX$&ByY&zY>%9<1>lrNl3x$#&P?0&opLX3bSf3Y*-z-`Et!Y$^f0i zsxW3vau!`D*3K=7KjO=$sy?blo&4k}f#Oa1uAT+e@RmHvwU3F{%}wU1$#Rmftdfro zIp+A3VnR12!fM_^VIO}e495@SOe#m6u#tr!v4VewEH%)2yds_5h`X`A#;luQ(H}HW zc74wMvL(&U2-M4gQ!uPnAc_v?84H?k5`!qILTImw4nbX*WD)@Tmy86KMHD?jM)Nqu z&#PWJNb@GN>HF0ResZGLpjvR=XLc7q7ZEZp=^#Ujr)y$G*%ZWGEs9)vH-LYFQtnf{F zKm`hqk|53}s%Pn=Cl`$o@%e5OsAlYv^R;<&(U}0HXT6@hP$z1m)Yx%d?Nqs>+kk)M z@H71(M5EP$KF(JRID0p?N1dfdsR>#t^zbf$o(Z{5)_e^c$oZB!wpJWbH|z9XYVFI2 zzI)GE2W$&pog-_nOxB6aBlhDQ*gq5$wjp-Ga!KX*3s~YYaJ&X?&<5*rU{lYealj-8 zrl%qJp!=7>Qtj}v6g+~YUL!$Dw@ItJ`KjbMx~=ek4CcuERS3wJp*NzT215ulmbj$& ztVKDq!^U?QNzQx2xWfo`y(QO=*OpaIkU^Ijt*nouoZN)if~}~^L}x~SW3cZI zczm6sJ{x6Q?^TH+Zl!4!OY86+%`UY?08cZ9>(Kbp^MbO;umQS{IlNXb z308UgOq_w#1fgkP19nJtvnGFjESGA(&`&)bQ%#gat@#gUEvMH``PQ26P&$XQy?I$G z2zEC|5j?PF%R{U2OM172w;|sN!s~?#9aVKDO}67lX@_vTqsqJB;wf|Nl;%}Y8_p1{ zSyXL%1Kh1gs4)PeF0)ua3+iuuFX0i`vd#PTxh8bG%n0$5tJAvhC5kW}aDVFsq>UDi zG&Ksdj?t(Ub5{RF*pY89ASNya>7`Sr(mof(PwrY^=$gYFB;-Yih3RjMBRvH0!%W=l zZN_(q+jb$b+E&)c+>AY*I!;fdwm9HQO{OyN{5SUISMWdYL0RVTgV)GnT}}~%2NaHR z-qGo3aUPj*YE*d0`TC|!rB+q+^Lz#3<1P#HKPEzHT^c*%GFZ`15IGwndT@rbuAs%{ z(0N&ukJ+YUmcpFM{QY`gaZqtOwTG%K&gzR0XQ`87-MIM32#zod;z|JOJRi(-I~uQ)7GSkuoD-2fLa?5adOMZ zXKQ>^aR#~`345Yw)`&~YUixvw_pgs)nm&Dw@uOT@XSSqQTO)0|1%gZc<#co&OyYtb zTF(tR)jt|0aNh6A3LTSqJGM_0x3EB&!iska%h+&EPuE<3@&ZNY!@PTO9po>JO#^X- zcry4VqD(i3J<;}Jk4+q$n2C_a>{j7Ank!?7^FL)2A-BgHO2sQ8^BkG|>q-@St`gZ?d~9Q0S2;c6={!yn2nl5yli51dI7q3 z3_xV}PiKcnVM56poKn{b4>d$QX~K-nTG3bPNvsU9!W^JJUp(3<$J;?8^Gc&HW^HiZ zV!MU0Auv~jEAEKY%l=WeobVO*11ZxEH)7k+SS!&CGa5efUc5QBb3d=u4wqsX03>V; z3?YiB>!s!T-1mpj;g@{ELwpBI>c7n2R-X&HbQ4W<<31Dym8Y%EsqNP{x;!Hz*6NlM z79Zg8A}m6MIW=$~`QVNn@*^n_vnK$$xPtT=Ao8923EQ`i6$4ttYMUvfBcg4N_19`K zE6~L23?$NMfM%rtl8LdaM&p7Iq=~>C2WE@a8*4CWw<@B5fuDqAl;X`_@6`$vOyLEMb6T%AI0)W(#~`%#k6WKM@`- zP4#|?R8AX7Lp_dFF)~2C%{;-d6G0f~)yZ9mMD*P2A?DW30FSa0%VL7gCFL1S1^@is z6y$zq{E!rvgb`Sbc#<*h_Hh@@t^==5X=&Qwx$Ev&1m}h+t5%!! z?bFEhG(i?`3;o^r^3+h~2zO z>v@^0Jlzq&$$)-Nh0c6c zZA4~M=bFdBl1oHl2m0sCnBK*6)(QA#aQnTT8wlIQyF{9>5VjqnGi3-l$DB($o=pN7 z*x}x;`*|#F$-r(oFTQiaryRvFP^YRna@Y=LOf8U9+wT3XwmPM&w> z!*b7q#|LX{gajefCCdZ?uKrPb$J^k=pOaG4spCte zTM@-MqZ=g_W0*qG*As6FaT5uF9LaZ1*623GZrf>6@n!4JR6AE%f6~4;*X3_Hyw)zU z0nKQoNbsd4kqqkT$m7Vk$FMRXw=VMnCV*hVuLj!WSNF(S)Z6hx4}I%zdagHK_YBdQ zuB_|zaY)O40F1RPck{Y)4bMkvLBMa-%BwdQ{hU`7xDA9}P;$d)%n{RH0lc0>7a86B zr&INJ%?n6#5_(D-QYEsZSM&N9(^E4z8DjN`5xRB%84eiOiu>`dHWZGauo7BinV!k{ z_m7KbGfh)cC|Oi*{vh%ZrDJ)cj+SFj`t`Zc@qfHZ(=UXuZ)Z2ry8nF^G1Z=wle3wa z?R4K7JK6hH)An}6V~Z8%vW|^AnsilKM|am}_N3iadQ4G4!EP~43xRaP_p(ZORrQbFN0rA-RDM3iG&$<6gH_g!Mdl7W&%7pe=+f-MTfuu1Xg&ME9M6GUzoc2zydpdxf!519gHl z9K`E*J<~Vvv+ui$^S8y7inFg&#cEP@wUB>MHN%m+sBQ9&=^BC|<~lktdf8u7>x?? zixR!Tig2y{g%SUH@2j;or}4@3)YA^^c&r9iX4YqHnU-u0Y#MyuLf_oFKPbv$Bg)k1 zBLo_i?e+{q_gwo3fi&>r2{?bn8X*Q}Y1x;+bW7?`S@u2fVN4@VSKOTz3f}O0cgu#qnx87b&>( zFyiE!4Yk=TT!*;q*cgnp9%91Oqo7=!P~0*9bA~0#%o-TOe|WQjmogw| zA80R|oL*AY=orqLBp6JV2u(?EQ6{5;?yS#U&l&AlcqA~Du;sg@{lJc}`6}2}pd{jA zBQ|&&0Xa5;G^bcz7(v#T_kS+2w|u`t?9U`%6!xILP0e9C-=Y>OckCo3cAf30>IvsL{id+PX(%#m z*vQ_p%wc+{_vf5Uo2Omy-=6zRw$29?m%^-q>l_K(XHiFK8{AcJ4y$D|dxGB{Ovo#T zu@Ev3Zis;ARdiOi9)AiQe(V9T zfPnksBWADEhv;&Am2z8jVcUIR_pxnj$dvkkS33UCR?oW%YrX5u{=%!R=w6e}oKP|V zX9VtRT1_klX4wpRVl`S8>DW3yM02QKHIT3AjY3BOh#@bW@Stf$`ktqNGcCBTOLM@z zPTI&oW%|HVAk)Y|Bmce|@U^A3X)1*J)3DZ8cD}j#2=Rib7;N?RC=N%6m9cbegDi8Z zFL$YXuTPJ+%6f*-+XEY(LjsSta5*Z?Yc(2gWkR)lwzujzt(&z|TbSu(fjb}R4^Q)8 z`|RpDU&o%5>y_?7d$&h@si#D=-oX>iyf+kMr$??*8dNcU_OIz@nC_QKH398zgohC zUWJl*G#EkbKT3`bZI^rW6i7#c#ltn~IEMA`c`%-I&S!7~kwC&@Lce~%sU@VVl?X|p zzP`YHRc2_$tV^5ct?y)L#|Zc6X-OAG^PB{{?U$c5Oz)yzose}HFK>U|!=bnniY`;@ zakUN<%jvvM+RLKy$02-wTU|QJhZ7ik4!yY1dL;aF*Vvi{;p&wLr3jC=MsfK?+tZPS zml}laY%(_4jd4LEueB@Kmub(vl+IayeR4He^VZ%%KK{b4;MckKpu@}Tk2_Y1U~xFM z0@%F)A;aN*S3A_0UO2S^J*!Zd1o zFBWwmGGZ**Nt~3PVQPn~^0%Zmte=sUtOt*kd9R8u^QhiKRr6(6gRDkCD(s20Dt29_Rm=2u{BF zIUMzVHgtM{(VE(o$0YJ7ho`fI(klyCv8obDZZJSs%3wmnQEcy8W5mfmemgYE05NT} zTZS~p31)JCSTF*PvsUvHvru}+!Sv37DmF8Q$q4J_0E!yM| zvN-oT_}N|1>sm=5E&I=VVBJete#cLjT3an)Zm8-C^l;Qk21c}T!!z2soUw?Jzm5<_ zj-K19vylB+ll2WyiENx2D;#MHG-j2U)r(33oyu_Q6=QHXb-1dtUKE?1CGf{ zy#V~1WG9W>bXKmN#V^35J|5eysXJi?dXIXN&~4&%=ZWc`W$4Z1cA_6-XpOKW%kt>S zxFLc#ujZ35f8Z&zXgxkO3Sdv)s$A-{mS&j<0}ENnL~pVKUf z{CPf@@!}49{(=&$^1NXrgYeN;4|stxFlb%grKp~M4|Q@k=j#Uc?|Bt?YdNOM9J##+a*=>kug37ve`p-JvDhl2P|KhX}Un-!>*>{fra&DZ3>?!Kzx8GMiGV36*n4WO>jx(JL$$$DyY-)650 zZ7C#NdHkiyM({`9=|bWJ*?sHk)gM|@rdT;A296BA<=*A)|1x3sTBmI1>xu79^<+dm z-1Vy7oQ$}Li3*41Vc|duA!ia8VfCVi%>CeI+j?;d;$}WPI2{zOH7&%XB30Ijy6`9h z=7_@lzVR?7V{!U0T*h^b;AjE1(LATgDcCE;>Y^0S6mWO!#U`P~l8hc0d1q~ZXV?|f zXv33Y-+N8E^S=UeWt4(Sm@lwwWI21&PVr5U3vaE^stcON%D)lXjfo0fo$EnEH5fr? zKH|K<+<~|@{>mAxu;iOh`v*%_@5~qlybYlhw7{i{t@4FJ4%F39RY=H7ZsY;4V;?~K zwc3J*IR$dkJl9+$stS0Pn^Acf(SE&uoQzg4H@Ww)S0(q;Pi+q~rh&=A9$UG?Vyopr zK2zJ%)2VGsh&vsdUv~>!j&RwOUvF|c2o1ZPDx2fjb~<^z1qYp57mH8730+ln3QXOl zz0C{7=OD)@MBvLa4EM0b_JMpt{bp%4B7Pl6$bSM?{SuN|_JN^;a`pZ589Y1fddE*acLc_mM8gqrBcg_z70m_jFg$P8^~Y*Nyuc4ZHo7ff(%BvnOXA_&jE3T- zrLK{u7*Ph0Y9ili=E!~?X91rLdCIEIFHya-fZJokmECcqyrBsJI2b5pZBo2x!HOl7 zwxV=tBMz79)L=gGrk{Ex6D!hCRG29JqGY z8Kb=;4}Hw)wta+#@BKU%qP2eFxNg0WFO8i*0>OSLTNV~x2P}Eo9NkPwpB@e?e%x3%8UtMG!(y38BqU@=hrqqYPYzUb>x!km&#P9K&Dh^Q=P zsuQd25J(W4WyC{}xDMB$5W*w;_UNbu#*MeZnpKti3Y4ERxxTl2{v|2PknTeaqvj98 zV@+RchsW;N$W_~xOdIix5tamjbDV7Niqw*lj!=cagv;JizY%-f=Ft+wZzx*=)Pctx zKv`yE!9S=Guy+z$aoF#M9s`jhRDvsNZ*7kI?$KC>^CL~`Aq|@Jmy9s$JZzv)J(?z5>(azn9CTK6m z-v>y>umfY7D4{OvpoBr;oU_D83WpGWNi%V|(63CQ$~3a-){B=fd}%}s5mTtEOUw$& z$ukwUR%5-ua1*p)qzqV3v4^vl!{OzY`i9%^mxB7}=EIy?6QvnawF;B^K9fD*ECqV` zu7?bkVDn?$xpfE@b@3o5O+vbJtFP35SFbm9G$zjHB5;$vwXO4JI^Qerw3O66KwPvE zO#M&P{GvbLa)I8~zO?>+DOVO088sEkPQ4FVnud~PQ)+%KLE7YO}Oj!Cr!9%hUkuL?%IrP zZ-SlAV|GLArALUFqxhWOwYz#|%ed?7B7)bW_oe>NgXqpNL|7q1Iyw-8DMI-r&Wdudo!qbJ$B z!sraNvjivjkjXfY0VVLIqZ_p*zs`p0NeBv(yZRVxb*LstBy|p4q>7Cipffbt&e=v< zCo7Fzt!Fqgq`dG6=i{t#6weH085sdsKW3Lcj?hDSg$6@>g7pit8K)l#M;3hXuKCIx z**Z0^AZEnoqqRoQd~X||nt}Fe#E&E950vFp!YT3}g!3p8L&BDdVXJJ{RB47;hN;|G zT3ydcr^LUBab~P^%#X&voP`o0xn66@6fqNzA*@G_&*qUBqwOBTW1q1Z-)o_)%$tbs zn4-z8;hVSNIrjj+>5)Sq_wQAxl;=kKG;$maAUN^VXiJ`Dsh1M+gDL=t8k)oMlomZ$ zn*uw|3SA^2nAACm)OET$S9u>;5sS#+)TkHdtrJ$-^)yP)_LkBn+sbjRDZsE$+^}SK zs3~@PTh4sPo_|h{zBf+<$rbmAZ5D~m%OwBG_P#sWG-_9#)0LF=C+x~SuGHHCtnj$a z#gviNvw+i12$2h8C>B}j0c<9OnG~6*=_l8925;RxoO2eFPF#ojzADHQ`8rlZ$=4z~ zLdmK!9N0s{@;>^H0y~kgi?r1*YTJW_^B$22k!VST>s3T9n&R$(WS4##>P`kqZiL2u$uJt!QK$p(SE=BB8|GKDQaHg`4 z(Ly%4wDE3%r1VdG7FxoU#NSQi%9B6Jzl$coGE?J{ZQ6{AWL{-Vo|WBw zWlOqxU}`C5spj0;-#4E%G0I)4n#C^69j;%VFb!(u^Eq|3T*@!C?mp@xJ?=IqMJpz> zc6G|)HTDcX7>-}ws?{F~A>_ZaRI*qEc1d%cyPbM|F3tI$1yZf!i$}NvT#L(6;1y#| z-{0^qLA2y0cqL_ILqd;u2)^Aq@A_&ywP-0anjJKs+vONxdF>$_LupB0t{*Bf**n>et0_n@GOgLUpFh#}I~AS2f5 zFi~q#QX;^LJ$EYnRAR`7_Y6S7!06K#lnUctQlen!Kj;`;e2O8ds>Db$b|b`Vjha#g z>@*zm>vuV7sWM1BU=jT3#*vFACvr?G77etjx{gO#Jl6JDYL`H*519$lm7X0bZu=BJ zcn$M@`+Ph*ThLokIh8cv8CPag;T zgbHGV;p-zgV?cbDlfzQ91Pe4n2b?5TrO}{N2rn3fp)9#&-Tlv znt(^=Jn>H|pD54hqAM7*#+|zigbJ;3Z|mgZyGh%eHxJmIci@8m4dWw|8yKi$@Llh< z6#QN+E##DszX7Gb~A7Z}&rtgOfhPm-(K6eNhYZA~7Y3Bk{2->D%7WlqbjT;vEz<>Gq{G`(|DSWs$Z&OQJeClQcq%9+R6YoY1fjsPqjM853z1QW1&NJ^#+NSR%#6r~8_4g#PnS$h+wMMz-2~U-s@m zWWFF+S@LTy1XC+N)X@P^1EDXi-5&QSz)nE*YroslE8Jv5@uAbECY=a1=?`dJ}a_Oo_=;}qvr zH`RbB{=n18H9>QbPuS;Vf3~tCglrSp z7lhEW@hC|I++kr5aH~F+oiDe}h%>0KjFDrQrwo6zYL=}J#H`OZ8blm0SKkY&o7_bl zhK)q1Ta#i}sQ*ibfiRgy1LV2gn2m9?z-~+mF}7!EMJcSl>Tr%5d4;bdJVveqNxwtx z7YQ>*&~;=2KEdkS4mOO+1Y}m$xasQPdj`#a440=e-%`xDl9-4*i-ru4f@qnYr}U*( z&XWc&MIzltOI9QxEff$8Pe>CK=Dqi!qbiMt ze|DP_x(&zV0w|RpQ1M}7VgOgRt9T?h(u)3>`gqQkUFnnW6c-DBS`4K}TWP82vVK@` z-#kFP#f0u90-L1<5o)=JJ=B&52o)>AQ&XWom@az-x9)9pY(+=>&xQ3@-rvSAsUkR^ zUBgE7$#yCWJe{CCS`PX#g|hTGkRxDfi{;~J8If^Pwvc|nmhw}i2bP`Rid1?6U`GZL zNRN+5fL$hzim7w2MzgC))$z$kp8zR|y88Gon{vuA>2{+xM~#4cXiV9K!W-Esyg}NgMczUUimhOWOJOeD(7^PcsMROJLmzT6#7PgGU}Wp z>78hi6HFWZOON0GRmS=H66Dq;7u%o#ZUpE0-`8b|8ZJ{5I>OR0WY4XeO*uj6 zfKcBWr>2Sxp6YeZqF%NBynVM8N!|M&xWnWTLJIgB9S#_SXMnozdvrO}{Y1|-t$-77 zrj?e7($v1(*!1O`rC6tm4<+Kc>tAVz2m!mVs~^_fxAW`&*Q}Mb7U96Is{%BLEiajG zGbcllVfBjyKf*PT-Y>ppOe3#yJRk^^Eb4?}QVP}$N1n$Fm0*JavHf8Z(k zBk&D^@xPi8HS+2IJnYuMsYB~)bWAiWHcWSX77RYJW+CQpNIFh2E3spsjVCfM^LFlW3^RjEDt3px`I+@rWiCY7{2yh*Uzyp+ArAC!c{k zQljx|FyLvs3GkF_7~JSO!L4Fq`MaqWw{aKxZ(o!Wz0XvF4*bu%KN@}*%KPkev2cSw z=Th{(F**Ms;`RAozK<&}0H=b3APZ}BN4GOKW=i06$!&ve9yO&(n<;l~eN@0Ei4U;= zy?jHzpV@1NXYa{CIJ>7*LiEYO0AU+z?6;*zEo2rzAUrTE0Dj=#)1~-}+R0)m%6Hfv{IZI#T7w5y_&gsE7 z>bua&N|d0clj4Z`da5^rg8uY{4J_b&hx3BVt_PnN`s&P?wQ-I*1G*ao@T#hnPUQX! zO83?)Y+~$TDlr4b)JTaU7qWvk+T)Z*GdeL9wC@@Ce;#G zHlxPxR5E7=Pt5k2{f11h_;~SC74drUZ@@t~$o~8)L=*8)FYK@HCqutCw_{`R3qhlg zAp9dB(e#NuTa51*=?34PXgZ@7SAP))7{$+?hD|S2AF;JP_RWti|M7c5+*Xl`_YqiD z#=e{8g)vddN8gtWRml@*?c%bt5GUYK0jT>_-G1O{QroBg4_O84E8706rH@NI250hrds07{ zg~OeY@82=?<|)OCq9e^GZDz*yPq&-tO}>L|D2g23?Lwi>$)qNzHD^}z*htoLkqs>7 z7TjfmDG)?#a@(-uiGHx<;nnJ2Ay{Wt)A_Dnh4O+*;{(GR;v3BWE64w*TKucK?ghm! zu`bWZj3v6Dq#859s3=P`7&km~;M8-xA;gU#)#0|~&xQvte*?i8LmwcBmRV8IdAuSS zsBqx2XtQErse|dmJ_VeT3!BQ%uL?;|XGHL$WJNqUIWy?{_t%Vq>OPyp>-7VTfJM_YaQzgN<6oG!aUey@uP59jx?l+-`}%nZCg z0HdyO^SpT|BDA)5*eK-inRv15=fVpC|D1u)sXN(81v^WZ}OX1x*LbK>i*1}f9Nt}T0_?A zA^Wm%~pz%ej0_rQ7%u;Y(FqiC{IwT`fj$glG0bEOD6XJOVk{q8{BhhFujwPzDu{q>5lAZVgp_{ypwRMO~fJX5Q^TtnbrZ zosExN>I;SLKW2U8<{w1DjVSd(&Y91GiSjN}Kic$8BfLah&+z0n$aCR>zU42h+`S3HNw$8No! zfr?8}4R-4DnE#1Gz$WkcuQ1}&Ui{Sv>s)*sihtDUdi}2lMbEWYQjmV7z}<40Nx0&B zPz5+o^XAWldt*wV_wmY0U(eD#0mri*Vn?f^1N(0%fsOtr6YeMClz#aRA8ddh2zB71 z)QDYU@YFEI_XpY^9*o+fgE27KbXo{k;BZyC5Hhz$HeOV)sHO%0?OV>)j}#soV!9zH z0upL|v(rbzhf@Qo=e?VUQ}VSs;geGp0;RZFJWRiJ9(SfSPupp#bvg6riZ!KbZ~yFn z9hRKJ@_i7^D#XqudyX#qa%-S3aLIB-Kz?kP3=?~>z!+Lv-F+riSJ){OjL5SAYvRtIkJrw2v3)}*%hlYyJ&yWE>`|lx!2EN~1Hs3Y9oI_Foa&GwLxuIV8zva}T~DWhzcQD9=FcQf>c4!< zG(t_0HHtmE^9&)%d-&ACnuJUv>*eCtxxBu}zcq6Lyz)5LCCz=EO7m1~dysV#FW@M5 zEpJ^D#sezwjM^x$%cdA5zpy@Eet$bnw}-SlFZR0nz^g0dD$uLAiw|dTqgwovsu!^n z&Bk^YbbH~p-iS#J#(vDCS*4gm`o^}FZPbUsGv?^&D$mK^U*J>;avNo<6*~5!*pW|L zW5Ok4_^&%Bmba)i9eMa>Znq~+``UcnI5m#<`99oT#_h%;^gMWQcIdNyxY0Z;AioPK zf7fBqV6eh1hxS$>s3X3LRUhd&x7Sna8fenIJ);Nd&QoF$t8n$bx!k;r7wh2E===ao zB9THLcL;T6>-IRj{(5P!@l=H}ox-WLIP}cz@T%G=(QYv9 zO(2@D^oR%@w}P76|M36GqXZ$k=z^{saxL<2H~-ul&}b-h8q!9vwSI;0LqQFY+83ty zWEO!A_u0`>Igc?A%jcQ1lvK;@5ZKjHOz^0NH_YqeR|&PyB2%N#;-d#&8u|(A*r9ql z@U4tqebbTGd==>#=C%9v+Hhd3kjz`F$t+`({t2ih!=6uITe3lJnp3SmRir^o$^k2+ zvo5oFn}{ReG!cj{q;D~4?pWjtu{czGK0iUqt6tP&EX2-tLt?r!=%O%=4e80drzom^ zC*Y17b`rK8xL%cSeZ!crgpSmMFlu zGFu$VYY_{u*$BvSMk*}{=!S3jUsyx{M!+$}L%2GJb*L)It(LVDqloE}=?NoO|rCL=VZCFxrOSAg1V<{p@8Qv#gAb!*5eEA|hK zoTw9y3S#)S`v-G{!qgq05Sg5@$e`=y_&>f#GD+Irwqvv>Xe2v3$Bs7HdAu zK#Wc9N6J|w0o*SJHI<7?K`)?MUWImd4HX5|*61!ebOc}?Wjr09zL7Ja7t)GMuPwQu z+*+50(T6((_rwLwtLs=V%1IS*wyq%6kj_h*`_iu2_0mX>jP`1=o@R=(VQG3&ZwZ>nc1 z4{!rfx9H8`TO+*q3LF}sb{BjAo;c;3Wh)^bDD*c>;sbAu9X3Orr4 z1)lc41;EZ$QTrB${~eZ>U;Pz)cIu~yskA{037hO4D!TL`{(L~#$~?nT7dgA49ylRB zy-iJRi3Ty`;66fwZZGQu-7cQTJOKFRf>HU8pU1)4j9lehwMVl*=(F=VX@ka^HA1%f z-8>k(2>07Mw9QBNtc=1kR9>cf`dxP4!^vqO!Fm2~mbH&CCCxd8a>2SHz$SC*bIPuF zwGq#ai%jm^e$bQpM9qGXGTJIH%V<9>`Scstc2r0+uIFjsa8Bx>Y)@t-TxM#jBTa^? zmxEiwH>eUsVSaiDdHjH}l9BXQ0?LqR{OX%Ub#8ujrTxODlO7?W-m` z_I`v#tT3jynEU8z_4E(Q5B#tMEdJ&O=y%tZQ!#Sh4ooODMr>{noBEWD{ zZmauNz0jtWp5fD2cj&R^xQA40D!4mam;s&Qgv{|R^%xhE5O}ePS%31P$un@4mr2AVN-{{+FV&tbkwk>9l=@1tAh9j%!nO zQ8oa{q7Z^-AdJ;S%uPYq9IS`t37W_u$ifuQ%5@)r<$ybIVUJZ&wzQdIC<+#1AFwM= zgnc3ingMEg`F^Mv4w9X30HfradJP0ZP)k2GRQv9H#?r?Z6r@}BK5OM6S8*A6()%0R zYVO{)q%Qv+g)~L4FEuN^Hd=i#v<(kT{uDTx4kdj;>tpNP%7OL6w%n5P9xWYIxTy4NUfcBRdM=x+DDT-o3kj#kjaP zWR?6_mVhhCzBGS3)noyGRnJka1{xYF@eGft^6y7MBD5(NqI$w4)}gact?6p0rhP3Q z%OrjEE3+?9cc5*StdA>Wdq`7eK0Yv-`CTigi&9_w&9q26ro?tnsLo>hrK(l+J8LR0 zu8xs%e3xD}nTfEDoKie>0?gTETqFar z!HO>ba|>IAedUuf5RrrJ%7%*;H83c;Nb zkKJ!Cv$GYl=*I7VP6loL=@?cA+{XqzP(@AoDA7x8hfqBNrTq@opvb5+z)Q)pdp)-& zp_}b_!d-K;{-wU{RotHoz8E7^m-XZM7u>FxA3IbsJ)>d<+R_C7nMKv=*z8#L*xuu$ z5*{mi^~0MGG@wAQpUaGG8(9k*Vl2twY*;Nu0`_SB3Dj!{jX7HnO zr;ABk|Jn!T&w9OED5@vnur5y55cYj%t6rG~GC2G|MI!qq-sg{#P#G_DOa}Y83tUZyA^|IdODXlCyafjMJhP ziMU1c^R#zMp?&LpWU2UsTqch_`P_&6HzF@sC=b2teZ_J7O|lC_B8SRqP@1n z$4TMDwZWw4L(* za!I_3>`HE*ue%MtiV)SqRvLEB@A&H;A+&%5iC@hIzmW(tZzP0KMh#^{2&Vb zMWcmOPILa(3(+}Ccp;qG9#pcrXJ1DC-CcA>OfcG|XAK1$>R1An`*{8NYqN%=4;RgF z$FI*Tx;H?fMuDs|2O3;{sb*+(M9)@FJtX;lXx{_hE8CNT1}JDdWSmd3(9oPu$h&y{ z6^}?1>URZnC^+;@sqN?NkeJN*H(v(TKs9aIB;U>aXO;5X-g-UC-E3r#28%*7{jPRh zjF?C2-I&K$o!ti(pgSs-^mq5|*C_g5%w}*Il*S9Da+Zm4Xd`G3mu@k~D{gRcZY=t( zR0(cPy?Euw&iB&tZE5A}oEL$TlT)?Fy-t~6vZ)jUDYQY;>qB0IiQ;1=3Z7P6Ds@!r z*MZ0Q5E&;ol0iNKC33As`r%1l>o3{Wv)`gxS3S{&z4s|1aLi`P*3Rc74`~)zcwVfG z{*bh`jeY&tj6ryW>y3Jc#;aKm}}ZLbh&#h@~saj4)X zI~k%-|7$w!5M@z=s-%z58m6%u$(6RIcO|ePA)XVjSBONO?*cuTU=)XPxbOGoYEBkw z_T9y62A0_LoX%}>bc&ut*2IX_d_(;n{Mq*|lM~9ML~s!vqUxW)`;n&ajD+%}05lMN z30_T6^ykePP2_?c!I&#_7U~pK^J6RZW&l*5Uy#CU&pT2m(K9>R0hDMu4DJla@X&;# z^pcYj%`2*cB^VFR(f9#E*^fif05-qKpi9HvOiLb zM>}4zPPd(1;$^kKLluy@MK!Ri#$dv{uiX+sF__QP3Yu?`*6ODTnYSS+r%a=knSg|W z*RgdISuCf{R)46igc`WuiQmF|iQVone5g!4RXGM^osjd_!paqByM z-*Z}GQyFFE6uD^A8sQ5`4rFg-WhCQpZ*;L5Meb$NPa{X^$+E7Kv73dnF6S`{hWK z$FsnM1HIS)zrY<$(p|~>s&{h4&~FzL<=^b)a_c?Eeuba^wgMLWzGjthvOJuh4KWe3 zy7p^bC;N_1F|KynT+A4 z1cld-Qz3RZdqxgScG-C_oSpo%g;WHw{OalR!yx(>!N2+4ys3gVZm3HYKqE5cIK=d{_u&L*mz;UJDV0T?OLUS z)|dfDJg_d62Eqa_nCvsBUdu+74_p)b=$sXJB1bNWzuhwIt2#+RbiXAti-BU-uqJU# zK{$K1iDRGsv9bHjw99gU$Q9mRp;&na*42V7{lE%SqtCv%Us$zb$-2|J67)#9z4+;3 zfGP&RFWRie3lG0ws%e14?t|&7+eE@}Tg&sIEwnwZvsVZ8F{H`I8B9MT*W$5c7~>vG zb+=&d(s6P6`)y>dp(gR$3A=mNx3V4Y@Sp%fm+o$y5&kaa830qd41&C7jQN!szC12* zFCWl{3>{CM5$-E1c0bwvrr9~Xodk~Ozxn6_3SdRQ93ETYhl9QPMO-dAL@3Z)@8ROHV*FQP?e5)u`?RftTkCB85Ubyk)&6tfW{8A=cWv=I{@r-(&SQ~tKLT?3~b zMYa1nVDyeGFIWB253ke3lt8F%m|@GL`!N5SSyS8R5oagd4U-mHneGG9B zm%$T;iIwuLNh;^z(q{|&ljw#9&kN7$*(+Mx#z!fl7RzMo$jD|yY#R8Ggjk#acv!2s~u*MK_fj^WCpe360EAkX4PE)Qy599u6WITQo@;E4D=>BxP%K84km z=9LMcf`rcYqv^s?2A9e6ay!a$#y@=PyrO7i*^nhH+hW+mBNqQ`5R4G&d~28n9%tJ) zBk<*Iro`C%gPDIOmWSd%lbUmyyHNfjF)t+67vjTzvVA1(Or z8@t3CqM$(!mQALAi9hSNK&g5><8xomXN2F$1g<|H!*{$)6`60$jzk4!;@vjpxqK-y zxW*++ERj{ehr)c_0GGww!aZH?Lmz%ToKqQ9Po-PqCwu=b=;8P0X*~>G4-WqwWGPw% zR!MoUs-2T~vDalMdN2H5VNPs~%G2o^%`5W0;P}MiAhVLb@|Po(>J3XK@%9N(0wNk* z_YTFbOc&q!HKC8suh-S9z+4khAAVH{I+QwY==KzRY#Csn6{r zWyY_qvYOsZ@LpWXfjmed{fwD*v%FX1>pVim#HNh7|M=_qy{?++Nr#c~>OT$1rW9FU z`;xY4Mzs@0pGCP@2h1;OYwIw1e_2VX)^8n5d5n}5iusWlm}_7-Ha6CqDngrh8qBgs zq(Vlis^?qLAyt{Hk}$fa6a~fQFh1sXrm@I{UOXvD7iTWN(}L56hkba!P4fcH)c?Bq zINRGSSJlEAL{AMexm;{$5XWz_|8*R@6>u5tYh$y8>C9&xKuXN;j0Uwkd}|ol*fgm3 zP7q~r>iW#Ji7aXFk$p1c>^hpZG9l^oB&kSs-<#F6ccKSSRq+-K#h|W>6A!k$JJ>DcEMXxDuvKCx)SUqk z12qe5;a1~ryB-w-(g?r?2&}l|7MpT^Rxt>vw37`E>!(#lox|@y?`yS6gCzm5e^?P7uhGX39rlD^mA@N*e~Ct_nrk_3?HVHO`=;fj`rOV)FJ3tmah* zq*m6T>Fc^!MeFcp*{AYEveR4E@7(na`Tnj6{5deO`O0evvyFCs6S`O_4G*BJu~mdJ zI3!4yb^tqC8f_qx#zvhl4~5$6;G82I4r@P*Nc9i3VguC!dj@`z(sZ^M2|DE*4RqI= z{Mqh$@46-RBH{1iiE)bfev$=3$j0o6NAFdC*<# zjlgwi1p3d_e}L+1`R{hD-IaeJD1u>y=+E9?eNCr#GgYZ5^5hcG9+)mQ#}$QD&+go669rieGSg`{Ox zR^e0;nne?2N0cQK8JoUu#Gi3LX!tVc)~1gKK2i6$r&Aqj4It9}A}ZHkDClJTh^>V3 zFmr`}@67A(OI9iwpG8d73iG_Da|{1n@M@ig@$YSidd37C@qLNvAH>(UXScxL)dH3d z2U2KnP6TE!mk%s8bT{6-`6N1qOr!6NQHu8@X<9O)?;laKB09^5k~jQ8*3-#Jap8-?xZ2o!h)FPY>TR7;Kr?km zOBvTiv$c%ZB}5!rFrXItrZ1hBKRO{zPu%?+r)Na}c}J8A$pBbj#v=*!wtI{nRSAGB zedNHaED(eNib-sp<-SN>&YenPBITBn>bF_phOhh^SP0xDr*=u{LUEw$ui=Do{O6N) znm5Mw+CvdEu-ddL%YNO~sWty55HXgE9cm5Ko4M#Gg@3;GCO63>jPoj%lH3aFAJaun z2*Kv|1%9CdLhcaskdXcxCG@%EWf*Z$@Z}HK^4RqL)y0NmxE+<@+8U;|$9TDX+3XPd zA5~TPIqP4MihoacgT{pkBb{#WnH%n-KC_6A17}YFa5r4Y89l(si{G}_><_4rhYTY= zIt{i!y@wAWr##;a{z`hf%p>-s0GsG4B5yg1 z7V;L(L2w;br`{w&RWGZx64^@ILKQ#hLcz)%-ujX3tkT2k&O@b`O=@&FZ5m}G)Xbp6 zHp%byJB`bG-PD}V%3Y-=&NCkI>9u{)2%+2jaY)MTnEhDf)um&RE&wgKEw4zn|j&cd7L#B@*G<-d?|#~4Hqu~11E#Nksfzg~^5&3Jn>!r;$m%*Y7Jxc; zipIB)gKvtSpm{@xu_DYRmls+dC71I`z((g7JF8BQ@K`j_e{-4{>xQ?DL%wea*`ra4 zXKO@NiXNZO(^-p&D=D9y?x5_xR{5jo))meal_F40q?Jn-&Cp)qekl5vf(ZOPh4PtS zLZfj3oCC1N6q-F#_~G&VXd1kXX!+?FNWV|Oi4618VNeTUiFv)VC;(feG_KduJ2nWa z7C}JbS3(;WE8Q{IzkfobDkv44R8erld`CA|?j!tfE(O=3@GuJL%Mt5w@=SHQvX-T+ zdVb#_p1jifkuXSO24`5mF@`OGvzx2i;%#Iew*UEK%+&oyxW%A_K+g9)=dYh=jco9g zdSly}UQ^?!EsWcFrN`gJzzQLPSNu5>7P)?$r6SVr%kDlv9SkJEsz%=lLrxB2D^IBB zBl#$KhEL^Qw&7dl*y*jCUA(Q*B>qy*P{9-yJ_rC!HdGAjfJkYg zmq7RQEjIq2{3()-V>vsE8Q1B8pAz@^=FjMq&c8 z*k3&U%Tll7s-6rboI@u;x{YQr$16jP{qdTtn|yCxMgiIDO=!!3Kc5wJ&&Nv91FRmI zO{{jZD&8ZXF#9Ye@CtRq; z+h}L<{j;0A2S~A-%=^fx?(^B3Fl>tL|LAM~)52*N$a*YN5`vn#dv>@ui4({?x6D4= zZP4YOIChRdT`)!wtXnuJ-Ud*!;^T^~Tl*d>^&x)z;;f|>`jtqA zd7ci>8-H#i)0|H*#SwqjIzr^P|8Wx`bWn! zHhj1#dGr)ZvaIk~{8xnxr;CJTorUE9?;X=Kjd#90pYcaWV%8$pX3blkXUNJp4L9a6 zS?97o+)2uMsSNxj=_&Gd=S1z{(73L}AaAw8 z3sXU~Wlkx}2?SXwQ{wQ6#G^V!V8H!13x)#NM*9ICo;deMXHiUhkKgq`6rt+#go3}l z@hfF%*?hVq-SXY}O=)PE)5#z@{3u)ffLh^Sd@@OvpMfFad~3$_9yU}~Ir2vRF8>1E zvvNN~>T=6?_j%c8k?`KFMq@j6hv^7D1i@Z!Rn*;AnEN*RpU}gJe*~fazndXLhZXRh$w~^MSfWbH_6?&D+grxU z@KZ<$Wb^PQ>-2oDQMW@62f+-);bODS-5A(Fp{#o2Mta*k7)ZPbRna6xlOsa7+zkD~ zmLJVU44+sX$OP$_x?(Db3@P7%#xsmiJDCY1ll`Ic|KK*Xs5$h;f*Lx@eCjK)s~CVr zH`H{wS5wli1)|%aU16q4nngyBXv1DNIa(Fts~lp7FiKQrG+*k1WN8}s5A8zO|7d%4 zn;%2HCTdBY8kTbYg}b@+!KQ^@=DfCF?7+lVQ|pwz)4EZuGb1j-YsUg=HhgS-t*~_R zvDc{1_TMO9D?2T}y&PR0=!QL^4^FO%1j`VZ7L)hs+y1)~C7ijuoSf2H3Tv}zv%$Nn z*sp8q+Wki#9s{kVOLTtdsKWec-V`28UF1F%vwX!EOWtfVWL-zi(kxOCsr11x|Mu2J z6$h)GP?3D8zhZNq=2x!XNB2aPyuqylhEaw9E$O5yR*unJU>~5g?@S# zW~TMe_JvA3g?*Rvqb{~VVyN%8vl64qC7_iK#I{R(OnPFz6`lZjgFxL zAqSS5AT?0~t~H$_ZZPSbia1o$^nOU;pQ}Czza=+e%AsZor^s+Mlc?J$xO%k~IecD3gM*9;p9Yh|gNwf+l-9inT0QXXJ`&OGEKjg> z0%Avvdi@RT0gZ)^;JCMv!-V~Ni5Kb82fG$s0nYaL#4B_3)#B32s$Jm+rbXb!r~G!y z^VES;{vSS*P!^30RqI++Lkg#?Jty6SPX*$&54+pP^d)sev(hOYy2>{;zN`usMe^8S z#2WjiBowK1!xzq0W3!P{1Ai!(9Tg6({(S`^zYebbtWpGnpF9eiTiyQS03PBn6#U}Q zDaQv9leSgnj`CeGNGRO?tZEoH`aWN-`{ifOpyTlM zqAAt$W%dCgSvkM2{Hm}{J57e{+Y+#xFR`_EmF~YpyuR0H9~eWA-P+n3H>&4*KWXhe zz$FBVtMHKn4Y>)k_9`8+FvYsTqvsbXO6Y*^F{6fp6UH~X{6Jb=+91J< zjR=hinsT?eg`{&vem;L!_|_|Oozkz9zGSX4*`EKJCmQf(mm1hl{kqA#=H+|D*zc+I z(g{D9CbE^d)HP>9w7$uOY3i8|Apkh{&zu?u`c?r=3!_{9~16mI=Fx1=`P7f|7J&Ui{&K&*j5i zl@~Riogy-Gym?1JLC>(?j3wp5Vp0s<{zzt@tOPD3gm{8E`8W?mVZk>F12PY6|JQmzR}b&may|HiY5#6 z^_GOkWh=EmekO0h4xJ^;>dd=oNr#9QtX9WFWHIz=a`ICMTN4ovUv<3{TCXaDd3_mE z?d4MBn^Ep@!2EsMo_6p15fiI~$QR z^0i%Gwhq_&_+aA$@nwYZNT1!)*m`RCi{yThn(UlOaznd})4(k-J5n%3QE)C1vgqO# zmMxW#^yd8H*FpxS)4);}md`qNHqFlo&9Tx2|LJo1M|(VCjhBBlR&I}WR1EJ^!ti7T zGoC_3Laj*@G4we@I7k9wfk(-!NFc`*jDp113M$O#huQ`{25?*OBOo2G#(}t|+yf3$Zuc!xsR4JB|Ld5g;n^FxFCxKlIG&?yj zkZG3alT~mcY;KiFW4~oo<6aQhqqo+fjwrlQ8f|9eA zO4_T%oG$PL#=R>5No~9AW{%C$xj$fA5;EJz89-RAWEo{>caiCe;qmcud|poW&S zPYe2(eRifl%xBnFRk=T)3%W}!(ZivfdA_+J^PHxpV%YzN)dx_qE@6nEZCnAriGFq9 z+6c-I!Vsaxhua4HP&0cvRO^nJqW-RX!?(`J6WlUQ>Bo56WPJrnlxzw-s^96>_& zcv((fnOwRb?0C!b!6H>X#5_Rz1_M)Gh)hh>eND~rR~=O)lfEyf+$poxc2D%GadvS_ zsdthU)BCg9XVlclKk<R-0UraJ92`=^U7(XV@V3H;*sn>^H_=~|87mEY04jTT-~ zUQF?oEzPdt#nkdX0R(Rnt$m(ug0e8bq6yO&^-!!zf7HhK)N$)%+zA;CcFzS1(T*h8 z?Uj;{Ykjo1i3THRlmTFYA^-*85txO|HNv$s8sEW72u1q^k)T6rDzsVc0!gQ41p2<= z^O$81Ls)Xu39z#^zUuFnriJVkRJclKEe`dcP$YDG5RSSYVzpz+8EV`hr_>|#26e8@ z9V;_Np`vVtHW2Afp(PNH@?(V&&~B413wQo`3c)-gtu+7jvFBKK7-Ta*w5-oAAjx3$ zHnp4D2(|krgdASKx0F5KCrT4ORCwlvx)zAPXwS?68Q|1XHda}KI(<`-)UE+O+rmEw z&-SegbQY$v-a_^ywAAk{NAo-|R{=pXL~bCZuZ>|| z;E}cjtU|Z`mk4rFJVb~3>Z_4Bcb3l!8lZ49Lrc01?3aRh#ek<)8Hl+=jNU1pr_5v_ z8Tgk=?;Lb~d3bnuAAbJEEzZ6vP6JjS^`zK;sy?QTOH%DO=G-W*jb$&%te!JP<6+K2 zDrzg~l`rqB(l3|mK2l^txOCQ4uV=&io3tg8C}@>MS+tQ|{wmQ^UsIcYI;=c|N1D!- zJ$XmzGY4rmAuY_QuP-5G8;N6E;-dbElNJ~5-6sn?y884rUx36+sdrAEy@ra)@X&)c zvc7KbG@qoX@I|d%vt_LJcuneSw#_yun>fiA@CyoOsi^2$&gYGuMCW9ZSD8KIW~Am@ zYzdI01Tp9btS=_#J7F%;tTXagDdWyC7{ycg5X->y&wvtWA_0~KnxM~#i(H}CB)0({ z4~DP8^pNdOZ?-yaFm{gu(WS+pt1x8=Vv~Fr`hSP0JdaAqSrn?w9^iiHL)-J)hf!BlUJpuW>!m8^rK>qUBpqG`9fF<4M*X zxT_+Z()j*Gkm+(mb*Pnd+L3~5b+FI!zM9q`AVi7HX`tW1)>MVdpI-?Bmn*8Q0N1NE zJucPKZku8hh+LQpUDr685|?zJR#MPUDlY(%jV@Y3kJx zm85Eir%CoTQcIG0FCF9gm2}cb|0y#^=?~tK-}y9oGMVhR_pxMPf@^Dm&`&s9cECyP zPuZCZ;Wrg7-6z`0xEC+{J6OHCrqw$_O#bariOIE0sBh3{EZe&xnHFE5J^py(U|XHi zrO>k|3_5i#FDt9zrjxvX5-6k)+fJpoF8w=#@s|@x_U2~OJGw*hWn*N&-iHS}RlC~A zrcYO6jy6Yp7ow*YEFv91uEw5!ar<#`<(RV;03^2-$!y{Tf_hH3lFiHKx4&O_hT3sIpjdT8jSKN$$Q3={e@Bu%d0S2(h6RD0Ld}r1K}Cfd$AW~pG3f`^^$@jxC9ktBqRU%&5;Wek@P|7Le({6^FQL zL>NNv-(x_YYNxSP(9F=7ExGPaCyk20H{FbQ?x-l+_F5fa?Vt-(fZ(^>&VdjP=m}bgvyoYSfIDH{<|3U)wRx44(Z0Tzaxp;a9DB)I!?@KlO`mZ#-q*K=X zq5L$N$zcsdALEoU2$SK35m5>H>%py4G-ZUpag2_20s^v_)DBaRtZe}$B((jwqxkBWGF5mhisCyVPA5&W42HT@9**iA7ABs0s;73Yi3X zJhky)Z@K#mDIh*xa>XU7tk7Mrqj^I~Ib%@JtO2 zYS7EKfm{_yH7duiHnmqWs{A{63fcErp8Ths`X8r6{@q7Fui5_O-wWn6Tl>wzq-eFL z-xv^EDbV*b@*{1|G+;w=5WL>1dFK6&mjJK3OV-=}*@QAvy!q_71pF6!~LLcweOvX2y^dr4MVeFk!l$$9L~HqE*58T0{gnF-5e{{S;eU`hWr=fL=90fw=L z@2lU=6OX@rIVfwJpNv}jMyizW6|UjQsJ){}5*jo@>);efL2&P^-yN=In6`hv6rnQD ztlDy3PLziJy13p63l_In%8@Wo?3MoYlAyP=%F)CE3b0{h z_;z*07V@PV#2EZTI>YwW4}2NTS;bY#fzZwuLxEL>*`!Vq-5)yXq(As#)1p0Q$oGBxHBa?IeE*%_MPagu*Bi7ucMr)$yx+l(YE#vg9 z>EPAuo2M$7;!jci@rz4U`>0E=RDOV`{ji9qeQ<&l@V#~I5{XTW9;oz$61De_Z}EHBD43TO6$0Mv*wdt%TFx`H5uB_W&?B5=yRUtAAF zL+-vFR`RU<9|!2aql-~9TO=Gjf9V24z3y;xxOL~V6!P_z@@afiux&o_xf3?qqHseu5ME)zMrNMJ*H${Xv{jP`dSzYNo@e^3XoTY+?SKG3TO~%pX`3^16 zuA>xub^gcyQa*lR|58|z)}EDs^tdsk?RJ(M|rW@AD;VuRmt?UH79R}Wt7M^<}2kUi8u%($&d{eFUsr> zZdr0d=*{&5QkAmHU%R;&7m$K^?q@#ug`()tw83=l;h=XmdSp0A8a++WT+Gxqn6*i4)mSKY1Z&%_cD$u zo$*Rc+29UMxlIFJVLz?EgxcZ&LU{?SVa3tC2p%qSh<5pk)cpByhPO0>I~NphhaA+H za-4Zs6bb(p6+NGr(&aS@9IR%g$sGOSu+pTGs{s74&T*|E$0|bI|M5Gm9ZRZkP1J9W zutEja7em4kc+M2+8=#jBU6?8W|8kwT8kv;+Rb0Evs&^_fSfv}EKY@YhTGv1Q*gi1F z?0>=pmXfJ`v)~4DK4_*%-7=jb>{UpH{PnVZO4XEQnJf0DM)U{w!pP&f2}^g_De&@m-3 zZc&|eU{0Hr>~7#X7CgsuMoR?D!FuQY?SAgGVK3VCWQ3 zSfgg*bV?AJdRioT7p?h8GZ7v7h#h31WnksV!$tCUn9bPLN`+hp$u)}G+Rr?FBlNhP zWl0b4wt?8)5vGB~G`!!KZ1tle+!AuJN;RotFF)Xd4SG+0>O8tA-#6c2%7^U?e#@%orLDub(@;_XYwof0{&<_urE z?u8*)Ite!8rgv7pl}T2<$X68C8Jz<1a>dg&#)P!>c<2Jom}Fg6ioZwwa_xbgu08EU zlk44{AFrB(6#;pXWF0FFsfVF4iW?|v=*22C`3J2WjcOI!pOF&3=8p5UGv9jGq=j60 zLuoKyngLzcwR~T-ahB7GsWuEZ-O?L_>^$1c-^5FfD3J0^btScaI6QdG=J}=~{U^FD zx8T9mJx5Q_>#Jn81ip+5p}t(noEnKebS;}xce=#=>y12x?JO;)Oj6UXt_C}UuKCbG ztK?=eLjKo0YTh3xvLRW2oXI8u}br8_9zxM6Oa&dWJ3Ya5p&ply_@- z(;BHM>x7diNj%P35Y$NwJN~(-TsEiXm1y~b0u%)h1y&m`G%1R8t*jjF3xO8j^`Y`s zYeH#Uo1nqGd-0SWsP1K^%WFJy)}GQ!59{Ku&W(wUP)zoY#$EoeoLZyt)%0^nVUIB_ z#o_7a`<&a~ShRQDCu+A4r7LwT$i_r-Lu~7%Jdb;lGVjs6;;S-tXq{#HYc3e?0{89~t6b z#@!e0*_Y~4dHwZ7>aeMcF7Y<3R6zjdk=G#K)rJ=f?=~7l5;=?Yw|;^5c;zg?G);_$ zvUbkQzI7z`!nzXNWw0S1^fodR^=-4u)|=Hd+4!&6&>_oMX~1`o|2uv2l3D>>1F(oW z^8h?&s?t$MLlzRs&W@tf+ukmDt!Z8d$%Z*abK&U!oXbwU_^sF^*eMw@ym6qYOcc@p z<$tl)(I)SsSa8z*?q~d(kxTU})MWi_(Qxh5iLXg2cmM6^^RMJFvFQ8Bm$2_H4;6=Q zLZ!XT$CmZkTAV*sR{r#ieP(>UQdz=$Y&W{^rv52b!jpU&a@PEdlgRFRY)VYy!J9Ti z91=N0HKBXkc*^rmJ=YbWxE>D@XV9R)ly-MA`^2FJqT~E4{)aC03#ui8+bERK&spMq z<(r9y@Dl7Wg1?r1o{J=k{ER z6PIKj&82A6kAgy9?$$u)`z~vk_1hMdb*qBepr%9TA~ZzfCRAwHj+Agy zRky!%L)CQWO=wYLg`W<;Gf>dv>T9ZyDh-vjUm5C;zHUpdd6Tt9r zfUj}cd~*H}P73#VrbWV9hu)+2lV9wmq--x0V$&^pEuR=+lXt)M;HOkd2D&5nAAFW3 z1h;ZvmQsSGrcrcU158!pD;^$N=$_~$ui~HlG$gO+{%fFr{<*XM&tc(fF;d^cW-XRX zE7<7xx8IJn^Y^0041rRdb@#ht=4S~J8szhm>o+yOh%az5b-IsV;I;kpPC2>At5XTq zR7;B(jxK=m=tQWQmGhE{taV&_MWS~Vts%hAwLSHb&YVZb zqwbkG+{F}H7c(1F)1?!Ue_iXH33Ogp3oE0*Bu-fAd(%0TWFy!K2}px*6ip#|T`GEL zsYOL0nMtAEP5F)ks%fVM)kaDi?^I|_Bu4A6&x>N`XC+g%5ixJCXoE@U#O#;F;u80& z8gY18j`mmd)9|2Cps5)NWk%qrre2d9ku`JXlmI|+=>k$BHIMy64o-;d@rI)Lg79Ff}9&!ID9i?UUQPgNOj*dF@W+!zu9_#L2zD~~HO z!Gk7iy#9}qi{nYRX-ni`wX#By*}c2Ez?EFUiv2p)#72?`0EmpS5ZgeBx@))!JaLIJ z0G^VxT~bkdjU<3w!yqQ7$PgHB0J#*jSU>lGxm~qWR>TT-c7YUNf7U#POO9O%d}^}~ zWq1|{3MsERl^D49a|ks(ywURB{~T39@-&0529gT*-#1VPAy>-v+TKH(@R``-Q?kR| zxEavw<$tVi;o~e-Gr^rRo5&lobEf-TyZzVY?XyZLw6On%dGAcD6MA?CHyOIRmHxPN z5&V$7qYl%&nmAee=*v=$uXHr}8ha><| zK!P!=BRs39d@6+SN+xkDaFLM~2<`sNTjQ53NW<|RAKd#l#}GlFo?Zs{9e&ElLu_qBJV98e z<^$|)3q7Z-?B1LpW0LmWMaqKiDlx24>L)Ieq0;! zSN%l8c#v8Ali2Op4;4I-9NLWHPJT|u_L!z+pPSLhPw?9EHRdZC2F z>`l20zLjUnjMsh`f-+%V?}xqdRZWKOHILV-ccS>l*%SuBVwxh;xu1uoi1WIzI^>7P z0se>gG^YWAI36G_f7bja5_xwWRw(;dB@jg3{j#yD_au)jPg@>&C$g&qKz46hebY%1 zEo-RnU00pYcGn={d{9J*#2ISqNs{%CVrF?Qqsgx~q+Zceob`1zcX%F~wq zaX3B z_bn>dH&SuiZ6(OAX6(`~8E7lr)6Q4AR^mLs(j-G*Nt>xRf&}ruyPtn)UK}Y%R{SXa z+LIZeQ~T)eMXs?K($awM3^)EC0*0?KA_zt=3wxP*Z^_m+PS`xt4Nne))0Dz&NKJDa zhF*s2X>SMtkWbtV=26+_&1wsoUZYZ%66Zqhrd9oj`W>1~#}l;{KQ$&NL)D%2!FX4# zaPAcd)fm)JYoAq_a7aP>_IpoyaWX@9XPW`Mu0{dtWBK1flGYp-4i8zL<&M6H(5f7p z0zs~yhWT~<8f-x_AJJr_q$IT3f+v!{{MIaAEGa0l`>0Ik9*6#J64|C*MrP#s7@0Pb zUagOVr)QB`%hhvpr@z|deJMhAIX0HWnOXQ)vNUs%bCEQ#5ke+rX-WKAJlJI|VQtaF z?e`Y+dyaQy@K;k|ARYClxcpnZ+%8wlFj5B`qJ^!a3Fc2yKkecXg_vr-OB($OI`8$i z%db3zG=;0IRfhTki2n$`(wqftf6%kY-Y{ZCbm#C|f!TkbM;GvX`Ru%}?rNp$!^-R7 zPk$T$A_LX@9RsIWz!Dr-V;-(X1lah8&p4J*8fKz$Pc0A6A+~R3(wL2R^^zBx|4OdI z;$%!bwghsB(*-ct+uyPSRmRJ1O3VQ&rDQ7?jxQVwELph@nC@+$v4w|zW@<0r&V&Fi z^}nZU(v@Un#si!E9SU*hyib-0@$D@it#x# zrRp;O6EwTNdCDO{NZrG8ll<3Mu5bK|+D`=b;Qy(0ct-!rwI#@@bEAg8K&T_8MLq8e(O`Vl7T8zpi3OGR~^B@Ys;K^5adDD7cy2SxTz z33FlU5pj9veIp4?o;|<LRP9cOH7SEr#LxkivCci~>E*_0|;^|1pvR)(^bzw-H%O)+{x^3(2nNWR7 z3?!s0-Hcef1UE>26}}~F%n)La5!awNy6Y@-$|&TZyfJmYKO?0u)ArvG27hPhUI_#Z z@)C$%1;v%E{S?DyIp%c0M6;We6DN{On}!@U(1rJhKA;N*8{smX^%SH>G&VNw{Zu~$ z3fh~rsLDR_4!qNhnfz_Rn?5JdEeUDkdRb2MZJa9d96D40wb+~&P@U;+8z=AouuDXeBTSe&Iqj!Fv<_u`eC*p`okg*`vTP4LzKQn1cu7ObPW}lVqQLY< zk=4um0JHmDSLHX3iSmyUuYAZC1oe3Zp%mQaNh&lf?M`bAa}?;|{CrfIc&Rbv^+}L_ z?#@M<>jHZlKU=tjR?LSw0rv|B{Yf(gRzZv$b2F#OVsPJKq7XcKz;~D3nUMhO)0nAcvpIk#;Wf^%b8M)fq^c%6#e^+Rf#Xb5Tw1qeGk0 z6|h}WSaRpmxaweJzhmm)%I}_v7;EhGFnXD3WLnwFmEy2yiY4obT@O!jOh!(U(Cp?^(0*vDjr?&|5Kk);JTMsQ zKS?wE3R)9P;t8sUIb7_Q1M&|q144A*X*Xbk0gph_r?^Dqv_ks>>sn0)jp;Z z`?D^iDmDFZB9QEzgLC;aUN}f^a4eM;w^J1=0^Zzj1CRoQIqsf)wSrew)c{C%uXX@A zaXl4nc(@}`KUn#;Z@{P^s(kUPsI`9k00x}d<$h8`Ndoxk7;~@v-*YB)sc-uU#r(+w zJR!#$+CEN-_%D*N@M1I)Uing8WN@Z%bm#NKEpzHpeH`Dx8Ts{DYrUWEB<~fREOlvq zQ=-0sjKSQbSHt%pW8(TibaRL&>W(uuLCchjB-R=fUQ}r(9 zBh~4%~U3^e4?l{7I`By_dn~pXlHQYP4Wj+q*@B0p=D^Jtr zE=YN=JZ|JhI%SPdt_dPiYJ@u(QSG#;vRwQ+99szs=}FA=eDNs`C8>t^>GgH@%BIIT zX3>3rAmq2q_9$A(Xg2ZfCN3_yrEWafo$A?4kx?0Os$9nvAH`>u6=eYpZZP>O1cg8^ zz&Afx$(@>BBGU2;+M~Gh4b?yXl<#%aM%-TA|LP?|1pvj~8|RoD3L))(Yv#u5H%JIE z0|Cg-$rFeU9YB$gyZ<4WV|#q^z;b-Tb^Ty?v@7!(Y3?!(M11yIlR~)wJMyX9z`RgkC=9ORsYEphn3;h&zJ9C>p-Cmr9+9!o3`+o8;X%RT|cfSWH z@Dalt`&Aa-oV;{G&xS;K~uMU`l}4F~PP1R>ypq1PlsFDA)USHC@~qN(Oc(Gq@w5q|e^A(Jq_qDVDIJG7oz>wn}=L z%kJC_EgyXEUyN~(=SD{P<7qK2WH#9~TwV2V+U3I!-gH}r6@Ei%2 zpy@tgdWWD=w|n!*fkl0RW`TTq%<`_#5{E?wNy7on7!Pg3)?#(LCcs+WyblT zEDn@y|f`0u5NP} zwK3&qPl&jcL^PxQr*VDvMg~dc$)D%SQ^22pMb8@kx+OP6lIw^5L{<5JI{8HR=$6>FUi( zxqE*}9o+wAc#j2aNRp}hDW>o}@D;&2pxwUDn{fsf2+Fkc4dmwXY4VRYkJ)}oAB^PU z?twDZJ9hylozjs^-&KEgYitZea9|Y+?lgW;SD2Mx-@N;!!Q+0A0PQO#P+#nmidKw- zBAKU2$Miw)@(MU`-zVBCG0qT2*Mh%J|05?S{KR}G+s3wM&|b0G>+ojp7ysjc@Tli$ z)u(j4xVH<+yqI_FSxlD-K1V(gZ~`4QMYAX>G&CVI9I}drwlG!z?YRrqCJ9GylVb}r zVNdtza8TG+S4naj|U&81=1Ci9?# zsrC%!2j?r6)p`2k5o4D^Sk!)6qN0#ohh?a&ym z-^RD!B|9klqw(<)O2nt<(O3al=;easDP=@?+i0|T`(_Dj+Mh2y3Xz$BeShOKAsM74 zetp3LIz5t{Q~RhZUmDMy%{NTm?)?6YM!UCCTaR7uj^`_-_Y%^32Bbwoyf4+VjLw<@9P5UMO=bi`~8fLv@N)jrc^0*kbJYjT#CF)7&q znGJz)=F{sE_lY(;PD$IzA?{ zWT`T=aP(hnk3iX{Xn}H>^FY8+tt8ttwvo$-*D;3AJi#XCwbWuU{xQ3=JTG zS7k)Icz!I4t|eF6998z#xyR~7%TkFBn@qc=o(hamPw;x&63s%Xev-r6xZ@*OS3Rjq z04GmT`v=cPV#TD^cxYX7*D~LuSwlTp9bS7piA`4TRIZ@avKw3;;O$$+e1cELysW*W zUHeHdrmAO@yp5*KU1_rCL-M@B-{RVTIPC?G&A82EofQWMu4eB;aI4({Z-BBJ;hrQJ zel{0ZtWroemjfCc3tg?|oAIRM1}^zKgd!`HYjK0(`D4LG{m5A|34$0$NBfKgSlo=i z=a74V*FLR(#)UKWIlxrDR9Z|P=80q)G9%@*IZ*HAOtkg5t7OV7P|D5CQ9`)u-g|E+2qI}sd8g=iI)tCgX z#`Nyo7;@1exz55RP&~7J{mz+4bck16+>4W zsVmZKC}c-IR~V06v&IADhHN15bwg7Bp{#X@8}waT_+`cv)-?`mn}zd{ODTlHy-vy3 zSCpz6BkH`kTwf*!CZz%tv~Yg8(h{&#$r;`4%C^PbD#zGzVDGvF6WzVCZ^q{f{WTlQ z%(Q;_VqSDp|6I9t6-98VFmgp$s#d1UM>cy*_8oiH&4l<=x;dMg_%;>0E&=Qll~Hc$ z1ba{GY2?YSmq4<4X-jm;%A5XT#9Ko+dbtx{^o?R|ed|*e$yCZi!*+fVS4{iGkr$ zzvpP#0Gy7V-FuN-^qhBMO={Me*m}?fO5X32?6u3@LpDyuB?1696s`MdNu9MWsEW4p zTxq`!ggA1uSB53-3HRK`^SUe8k5KgLd|N2{G|luPn2>MAXJP6Ne!)e3R38{}@fcre zrhgz?#%7`zSkLS6^m?i~Ta&b~`7svs8c?z^l{-uMK%%o>0FBTt_biCF*L=+$uxjs#zq0rjoYhNV+1UgX@@i+1|4Ahlt$7%~EE19g zp+kv5it<-~c`hN9k~!Y9Ga%fSS(i0Pcu7y}vt4IwEHarkxRHpBL=RWBoS26o5R(W0 zuQ>BLbVni(9*#VmxW)cJ-E(p>hz9@FWt{wbppP$KS-&;1mCF&yC!XtvNiRrCe`fRQ zoG~w!k{Q8-D8a_Y$JD-Xe$NdFZk2u!uu;H)3W=WeZe2N=adMbY4c%c|Zd~rPE>W@o zTK$#J{e?WEAE1e-rv`AVQ0;*+#VKk6d%i$`?A>1N($_17wInednOl1|2?vf{?uC^oB#Jqr*BmsUw^O+@qePuNA7v+|~EN2jD>I;QB7U`c}++le>PxAC)E=rE%uUvMDh zSCF**D|(=(anGywDwmioUEs)pm~jP4K}-EKs2!s6m+RAbGp{ zEmsq6iN``l1n0a zHMm!@N^uE+(@7!s4gu@mZ=}>#AOStweidssMoT9TVcUK@sECv3lC=NsBvLcNwc(D~ z5FgQVa#Dytlj#_Yga0a|5!%>)bGR5hvQyokiaeiN&YaQ;*GsM-BvS~4XBHJ}Z=TxJ zww0sKeHOW_ki8QN98KlQ*Ct%Q<2?h4A*mvJh;eA2c3LD)7r$2m$ayFNX;6o9FA zqr3En^i!i1j5aZYT?L?&Z#hqqz}Y&YPNtn@$BZi2MG_J5M_<2gYJlI(XDWQ3>9sk{ z#N|P9&7a);%v|gQoGYChvv#pLbf*nXx3~W~V|STIS$NMlsT_WsF|8_xLG##}Dpoj< zR`{qP*k&P?0Wu8mL5$te>s+qb4RG5n|4lnxdKQb?r8!g1N4TDe-PKv_wn_F z(Aim`MgH4GK#neH%BJ!ue_dU3_?qc|=Lm0cXf z>*0|!2n3t{EW;|_pcVd zehAysjFcxrp_D%OzhvJ#z4QRdG+P(=>$I+l+>c2odi9AX^~h?X;7nh**?uF1daJLw zNShu)3Uqx&m3BWdk;B64Zlt1Eesy_d)~KeKMx#JymJ`&EwVmzsnGt(kURqQ9;io8@!~>Z(PRbBYB55T4ic6s! zoMk*O!whi88_xCOPJfmZ(D4N?wIiu}vr~`Q)hqr=%j0zM zNnkpe9DQ6s?^^hLVFXU(Nkfos6?z^;`Yo;c&AvA?1tFog)y| z}@>;A-*7J_Vq#YnUyO~0 zE{CCH(D95-)xqYm;C00n1hwj&h>@$B< zxBIHiaWhTN znrP;!wcn5=fC<{R@rD}G>&Smd7)GdkPmXlN5kS)!>7Lqb^1d>fJoquFJxR}kT1W5w zTK);NSp$b3dSdCXAP?Vfo-Dsye&6z9??FZb2#5q&C}EKhoCw6$5%Ul04LQ z%5gOYEWwJAawFrzRzAeITkkaMM4NsV15#t<*s7{`!saLSvSeHEyi_qs83rAqfib4Y zgMq$d?|9cDi+n%Q+=Kg*{Jczv_uL#T2PLN1XQs8xYa9rpe@t}sJCTj}WgU?2Uu8`< z39J@l17B948o*CoacaRW3f;=<3%U>7j!$y{d(lGlH?z#R2<^pWw&E9WzgS%fj54xi z9$L5!88mli_OQx)^b!PY2kW(cPVFmAl++rw;Mvs^nv<20}IVP1$LI5P}rW>31 z0b4tNAs2#u8PdhGGLI_6mR@IMT{4xTS_(uHBn) zAK7jPoXbdgBV2NnYV!Lo3>1qjaJx<}R` zqQR3F_;lAnWsjKeT>vR`dz|@bIkqGKL9kZuI2v?Ir9BU2cF!MO=e3GV6-vr}30eEe z-p$>UA4#6~``sHUza}COIWmZKTwVC@6z6H?A5_Bo{}GtR0%m+!zI*ehMJcwqSRnMb z>;!WE&0#>wH(Za-S|fru^R<6(`8@P>%=na_!^{vxQmL(4gw15$zB?t>O zX;xnfJx^E>Tic#*^^$#k^Kw~RYBdrYOFyf98Elc-B-ES?E6Osl%~UQ5%zrgCqh{!1 z2{u@u%ChhvVow>2DSE#6x9CH9)K_l#$>S>EKIa;|P0gxBDgxI2RLp9d6Mp{CK0P`z zK)@<0n_{23ydo_@VNxvn5<|`<>EWG1kx9#5POqwoagIc}ICi2u*WHIg?TDJ79*l;) zfeamkwozR6M!|I*v7U;tC!P#sqoK2#Ai=h32oo3E#A2yNJq#y-vBjXbh`UypfW^=m za}v+qRKOM6#F@cV!U};azeYgyqI5zxuc$1ufOEW8>u8r9P<(qMEJwEDYvhO3QP$3! zwvWgc4DeCpO38;rxpI;(5>Md0FZ@OadpjQ&Aq# zi6|b}pmd-0xgk8MU1)h_aE--}Y4Jf7vij+T3FBa%4Z-gk457N=$$M-5A;ED;=@stM z3H59g^+9r+QjRupf{;-1m(#-4^sXP&uGYTs`kRh4-~|ItlVig29VdfGUdb55TJrb{ zvk3i`w_VEsT-HNDcuSZgsid3mnQ? zBB{44Q>B`kv8DN4okUc#2BhSk?kPCrNmCj!+xB>#K%ptlJYdNFRP*g8H1ej~(7=5% zG(@m7E0~UUm#eM0z8qv*e|eK{ZG~h?b~!4@2tN6BR|F0{`NiZKx}m1b&bVEUYlw@V z&V-BRxLiSlOZ=aIdGFU36}ER3`{U;zbbjcT8`jy*BCb+r+VRz|Ugu(`W?&T;W90^` z`Q6Xh4yJaJZEL$SrS4;>^VBeyZf?4+AseoK$2k__7km5qqClFPS7Rz8rDUY%d{1QZuSh^*Ow!R#T8@R5<^N6@={p~ z4ZALd`|Q2{1GYZz$&2%*@+~~p@5yX)D~>MvRCeqU+Hd6D38rA5QEyrV@-qH158^SP zY*i0y2zze0n-WTj97vZ@5pAm7zK@-sXh~WiCH2X89-^dJ4F)I(r!s7;?KS=kVc#A< zUk^Le{bDE`cUxuJhy9O$x1(?2U?2X&?j#Xq*;EsJQ_WURg}R3wWTZUG*7&Hz`+kNu zBwQLnTR55b2-UZKj7 z|7z;m*c#B#)M!VHcnLOPWLY^)evwvU9aW;adqUIP?$~~M!^G&9`P`;0TQ|Af?pWTx zw)6BL?zyiMU>aFscn0wcL2RC=ok7-4k)0si~c-cT~Rla!jET?atF85Rq3Fx zCVoS^iqoZvAfZV-t32fOdG6)e=U+A{q=>9?1=iVbSsM;cnSWfwf_!zB*LkLSQzL%^ zqgD;$E=v+8*yLw1HNM#(PF@^*W-xvJIiul4ohHCBd{*q)Ewh-$NraWGvJuRCuye`p z0tn=`$Ht6@xp4YuobA5CYVX@rw`NGzR4?B-=zUxExbbm;%_!N#Fxs-DEINr$9y_#N zfDAGNTqjPT3H$m7PrIB{?aTSrX?Hgr8jO&=+SB+n1Pt;*hr}dlme#uF+Vv&p^j?Vc zG-Sn0;?vRR_x4$Ug~lSw{)Nx8Qg zQQkV|)y>h-iDSCAEtvpN9l39OD>QWzBe<7le`eZ0cgNe2OtX;@ovVBL65%!pA(-e+ z55!B2c;PA^T6K9beGvxUe(!&6N%pX2K2w)ZiH2wn?>|^(&BK$&lnf2LRLK*6hc>I9 zGobZ`(F7A(fjzvpYh;8A`Ye0~DU5CBJB6~-Nu@tLqQ70!1&!9tKytk^Z^-{j$K~!L zN~m2;yC9C*Ak2JkHtJSH$^U;USq{pL5e(|?rO-Jwzn^StGlB3|sr%Dvp%wsV_~B+I zkFRehEYTRimP@pZ3Tb3mGhE;N>F-Ok+h1Y^40uceHW~vg#&28??*_MSg$H3vqqh}~ z4krw`Iq%z~1D>uLQ-OY;&&TmauO79BU6@od zX)yq$J_NZ~;54@D7lnU^-TYRr`Xi9^cbI=z__!$5!3iX3jKZF+T9fu$#+=4{1b$+6 zc)HZjt<~xCwosi+o<=BoLQ~zMp3(FV19R8t2lZqOi*BMoc8So~2;)-cJFB7OWW6Fa z%oIa>(3&mn$af0_VXP7DrIrOC|icB^ywfl<2BfZ|sLHut>^ z0uhsFM0jSs*|b#kos&uA9X(Y`QRR_--<#j%ga`n2-xbl(XE=(LjRecOe}BjR^JGxs z6&PPxR+Kr8O`@a0owcG{6?>2DSWy>?dQU+!_aso#R+RFYF?K8KTdK>9FxzU?fm9LA7u?#IG--(C&DUO(?;_tjje0{w240bpG|mj%ulaDsWq6xi6`Fhh z5c_*AJn&Mg2XsY>ke4EVZVLmKmwmyRJqNdQ89ld!lF5jqsfE}UpWdXLLD=&5Zy#1) z%3QTiwjhc2?z(<}a~N)mMueSnpEYrs4jq&x&3hpX<# zI|v6j`k`E)P;EMRAu_EqCyIv1L5B-qRIzvD198h)4$#Y)TH0uxe>9Nk2}|$ zNlD2B3;I17*1$2~Bx(C;wnU4x(e!2i+5s>RtlNh2C*Kj3vGT{N#MkSLRE_kns9*5s!VC zO{bNpGp2SaZze!=w!5-e7D4hJ_HF0|dQSW*uOYQ4k0aMnA}E~4c+`ngt*8dWuJ!XV z*9?U0V|m?5fLAct+d4OhT5pl3^oP>L#gIa5DaHF_#U#AS0zEoT!t##umz1oQ*ip*! zGK9W^4J_U9BOTb0M*~=vOhUQarc}lJ!kyyvWSEpVPO)6M_IP}mDar|{gKM+bs~rdO zp_wf?4;5%GMhs;E4K6n3c9)ms;eR!bhYM3z^lNSyJ$;K&Y*-$)?0bwTEF`Tg!p6#i z^6K$p`uzBh8l?fv9^(Zk^b^8gOA4gE&XHH^1ah5Z2HLn8t@lBCO+K>?Z==p`SZAYp zw5+ksy!Qc?KDM6xTGWWcUyj^5J=*G>lMrNF3DR-xGk+6yBXwt$niBuVGt=qQ znfe(BGST+`=E|oxGc*CIes6kbxCVC|&(7Fdp@nJtx3?}bZHJpi15dX&#eX)3pKcAI z0Dk!`qZ=^iFE1B>&H#-2`gg`z9kp1B3;YHXEG1D(W=J z9})T5o!Lv*ZLjfvEVz7xYyr+4o4bS1OYP6lO>GbTRcU+I(Xx9NjJZ?43FkJ@7RFY5 zk`s6N5u=*@Ot2bw=x3Otm%x+u$pOcRIX+KPL}+pEV`t@7dWFHXY?uVoC)>3ME**7= zh~roe_lS%wys|G5<{pxEA$VnR#RGEZG8scbBC1TuU)iY_8Vf1d1-oZY_}7as1CGf=kE(lN#U%lR8?v|Ic_5^ zk4IVyzK@Xa%m)Vu2b%xi7^79OU}6-2uIjclCzv#4U}4u5Un2*_WHr%LRa243%e4nU zACsn3xaQR)!XIo>lBNVHxk5K@^*H2c@}MezX-u1>Tfs9iXWJ}2DXoQqd`ti zPRrdnVz`6_K3=S;U-R{ir%Ol5pigbPG4}ahoaJz}nxyt!)+k$ftLfX7+$vyz_)i{+ z`hfax@NjIeq2`BDQg*kXU1luX3#bozjI{T|2nvy%(-GqzRzK-{oMPG!#Co>a_50&7 z+ioA7t~Hhh79!0P#;+K?cQy1-%7b+%UIDI}$YYmb9^Wi^QPH-HH=@LYN+ZH}vh{)J ztUhZZ%5)yiB(Bj~flwri#wBo`U4;e6bK9Q%%81AlHx`U0zGuqunhDUROY8$t%h`dx zrH|LQIQ;=Y{3e1S+Dm?T4lLF(i60vgRfr@*QyY}+=;)4rc9TZIratDplk$6v(U5=L zy?(H!O!DVon&kHTxfHtRb={{GW7^{Q@0H#lj8ElO!5sk~d$gL-1>I418x&EL124O; zZEqiIW;8MFsIkB(4o2&(Z+WXrQyIa|X`zeD;OS&3e3CpJ2h$wuA>/)kKKjbJb0 z==piru}buq^SR1lVO&l{rN*1 zypfFPrB`g+hi;~`xj7PfavSF7$!&A580Yy_^s6e=nVJN9D7_4SY#D4gz164SaxzxWbgZpSzbwO!$K2iCk6MrT6M<#;!6D=rsL${VLf0?_S56} z+`q-@^8X&SAJ1Tt@YMKH(isWE=5-(}NX5<9mqK;o8YQo}m`IP4r0!t<7r@WA=6Yw< z#@F}3!kcf0my1NHwaOJBu+x4xT;iz4L1K!jczp4o$Dymsq~^A(d4I*o0fzt%4Gq?K zNo`KjlUR$!qp5A|IDYVxs_kqEJ}{4MreAu#tS3+kY3n7%MKAc(Lvj66#BNTLC|z&~ zg%lCAkC$agn{#|k{4iw|4SossdWtjKlo=KVzoS&+bvbY++}%BO<5J>w!z^J{ z80QBKiho4XOWcE zq0zd(4+9{Hv*y-|#{6-`(9#$%37uqt?}f|OGu1l5J||`+DxI6zkbE9cKOZ$~{5hJw zpr9d+D$V#$xhy3)YNdvc#j9o|$$-|Ctoqn@5BKqA9?rBEK*k zF95Xp_j6bH!-van35?DRW+~XRiaIjrscxO`41$IATBds3-`NR0>3e|+xENnR6-zp3M%HxAqPwh}sdq=ueQ2G!Kg%js?ui z0!NKx8H+|+Evx$FnLne3QPKqUVWM+xX`vV|zn+XL_~u4hzrq3)e0cS_tt>0&)1ip0 zm(Z^xh)2~Bk$mrCW`pO$OIALxd(-yw8c=shC-~&Ano=2Ue$t;smi)Gnx8-B6DCMAs zU&8fqAy&d-Yn$;X<*=8hw}@H>;;B2O_1#WOv3dHs79!sGf|Q(2+r81{b|p8w#*f4?6;o0gk`{yiTE_Rg&mgF1r%VR-@13CK`rFd!Q;iTCyc z4KWDt(18qH(e83%%8U1YyzsLfD{=pZE3Pj@1-mY_{pk^B<;xRXZ{_QM+OESP$2CvJ zCHMZuJiX?E6KSfGf(G6vF7mnaR!oP*!4EN?xya7@ykMPL`ztF=kV#*SM`qz?d}gAz z7~Opmh8B7fGIP&mSob$vRr01O<8^pd@f#33>A2q~!E(&rv1+?QSs%`lmia>Vs2&}%x~T-e465~LjPo8wSJcr8TPf&f89R>3KPZXM2ll%i9iE7?ZmS`qcdyT+NKmZH?+u0{f( z(n|zh1RefH{Bz#QAEykfX^obMdut9Ue&d?GWt;&5+~P@Rs!s7oM0 zPz$}xVx*Nx-FD5pB6M@+q5!R!<_%;eHl+&i@+6@D@2ZLGmTKqmZZ^ah;^+H? zE42)Kd%^yr44mxSwQUN2?KyWfa|2{DmaQ+vCr6udhQU?wQjycfuxxs5RTb zG9|>U;xZgJH#*(LKU`!qr{3g4@^Tdh_l}gvj^(MJlBQxoiE8Vi4R{2ahrQt#rVLrm zoym7Dl6T9qp|^{{?2K*a57*Og?Tu!Zt?iL?bLCKCn=k4Qoii)wFotkfm*^+f&lm*h zu&5rH)gpeOkj;ZeG?)M@0=DP|VS4G+Rq7(l=0S#bylGsW6e$?gJ!Oez)Z1c~9F;B)tlJcZO=wR@2xab2v9mpnRd z41#pF#L^fKHuU*K0q9!#O}dGjoLc>duie|9OZ0#{7uB5=1=)oPgi~3- z4hrz!-@`X}8f^znK}b@j0hH!CG1{4T=ZEKC-{mnd-kIQE6F2GlA_%gzVY*^fe8(F* z9r1_cDNv$Dadj5a=<}{k*LxIvS2?gDMEBqlc~dCE9L5$=X@Sq}Ra{O}MPOkUkZ=wz zC|HRQpYkJa65k(__x}vq1p{bb&=XinaiRDu^Xgu@kG3HtMd_P+S|RHENGv!7ny4pm zJQ<8x##UB7wC&;LMv4Ju$uH~%8WWJI_ii>XE_ORrtajI&-!*34(fOBCCUi+5YOQVx zVj*gEch^W#bvkS;(u3g#wp&U3Mp8@szlrq4MGpkfrnV}-!*ObwucW{+^3%mK4fnjz zLw?31_8?f)oCWRCJ;(RQz99C{fdge@T67j(F)b(I+LP!iVsL57_$HHm zp;tJ(N8;z3&XMj7MJh)CIg4umI{Bnw2X9m}o0J(fyJXdTfeY(L1lkg@7+nE2&Lw~1+^eTTVr9rz> zUe*M+<5{h^@k$T;tc1D=I1Z|!{WCzmK-Uyw%O>>e)6U{*SoqYOdQ@(u(js-E=A6*7 zikS1qkkuRaL@G5G8VBDNhI;5SVyy-Oh?vRY#OxY@Efw>?JBj+6R$;2RofMYHXSD61{gV8P;ngo&FPH|8dt+p1C`*?|J&UPrB^(xjisMnbQ zu+Als^lP~r4n--c3bdq9rAsit?)5wMRS>)8b5Y5UNF>jG?(gu!hhP0{Kud(`{KtT8 z*o^lFe>=wQ(lBBFa)+YKozi{H=Q)SpFyouKaO#_s%qM0YwmFdGGpWm_WH;;ox^X4d zHxX6;Lwh=*fHqw(A5uno!K{xRv;19PRhX&Wj6oybXA$xw!p{Mio_sZ8hP38th23qD4-XkHR|N(rv2gOAT<2ARlR!6u@JGhz4p&y~TBEHLJLdh8)oiEb)h>i*d; zi6)aUbm;Ee*LO5j_729n&vB8ZS@PB2OLHV(hHP#ZF41|0>1Qb?MBUi%xc(7SzPXgQ ziq!o5Q(&n(ga0wsiytWauBvq3PngPYDLF3g1W;D`MoE0WxX9<0cpmh1>pB;uu9*4X#65ovx}Xx3joXsh@J{ zSvf^*l*jo9iH5pJa$t*Wr%YSaFRiK3oSmNqfNu$QSJj_UMYTEZ1Vlqy`t?XlXx_IY7Y(;c z?~JKnXc$EjQwvJ2>0@U1nH4if*E4U9G=(N8fkLK>HNo;1A}JaT1d2mkIS-DE3H;=y zVB6&vt8800JaZPYZ*mtLYec8TVjsP-bIV9{ul^BWgdXUI*lbaZs;?_rGU+aaa2`ACqr*Mq>ui@6~QvH8e6q-<{z;LRZLMd=t8 z0CxFrlFF$vfHmV-R#goZ6bEhdh6x72VDeqYTziP13VNl1(6xO_8Sa_1M*NSjq zaDQ8P49xzImu118piP+vEEj^UWQ&REz~s)@13rWra=0Dy_VN-}`P#IhbSjQ>6-Pl6Lic5Z7}-Wr7Cv$okt6fwkfN$O>u^E72hlBzp!_mu8!5OKD4QbTpU!hP-}Y49DBD={bsPD%81*E%a9 zeMKLT2`+vi8C(*m?wz{?F|7^I1@|jZE0CIgcer%XuR?IC)uP+jRio8FP3n_zHK9d` zDe|E@DZ3m^THK<=o5%nlZ^su1r*09Nf$pziob&JO9OOre-<#710+wkFNUZ{I0f0s! z{L%`Vt3tL$=_s;|_Xxu$+C6yr9YYs}Cw|)#=u$BS`37oE5Vt=U9~5NX#71MC^@T(H z$h&&x`6t#g_{lq!NI0S&VvavbvYH89ocBO&=*0qilDR6)W40faU2b z=e6s7{;$C6B8Ja4;ifkG?br9Pl(-G_GI^$a9`>N|BTr;XD zO^AbBfHUK$k71;c<1vU``TrI=W4mi#@iV*`pTt7*&@vt$NCv@Js(!~oFuwjABWXbk%>7T&v2KLp#TCKRF_ap`*pIaRU*yX-ApG)dZct^neoPbm= z5P96#@QDe$ZrQHnnNotR$uS25Xl%-x#1PYc%BwZS^r+vK%1lBa=yt@bC|3o^>WWpR ze4!?Kh++f}gry9;FW|*M%rr8;u&@o8EhA1RirxeGE-)qjP4KsHF|3iSzEAEet~Bpc zU@aB7rTE-TH`+LH zGn>Z&Hq>H^nvP?ee+p7p&RI`<3lPTqz7)A%bty80)Y~*1_0&?m7zBf0Gftc5#9a~z zsw6nC&prczg@omwT^`i>;E~K@;!btW88)r(KaOPG?coX!vunPPM94FIhZqM3kRSn9 zEcMy1J+72o^5#oGUTIOy-2jmBCS?f7?)vNppz;%VdQuj<`Md8oJMOn>vvFr|G3P`F z{x5;Eu}kBht?BWBKiB+M7-@#xgN2n!FWBkY%WmYr8GsB@l)z&(N%o~SEvMpYjE#KL zJ16muhb}#8$>rw4XnN?t8MeCG9v)u$iLwjrZ;>@wvZUVRgO0U2r`q@&7MuUb=AFgF z{d5?RBM^)L!shB;ctFq6ThB6AzL=BQx$$XfZ+Ag6VTQVPeV({CT(`i-xIUVD{Q)+M zPj)`!`{n`}lFwbLJibTys$6aVTq8$;45a&wdUvCiseU|-6y=e~)De)7>tXLM55YNM z^ZjY0Sn-ipQI1~LD;ng9K#r%2ySTyJAw376$XLnOM@9-vox_fE0x;2<2}4&|zc|R1 z@thE`F;dSTe^nUN*g_l_c#i!AGp0}R@LU3%co;lRjRD|$&n=6Y|sB2nQrqF4T8SI6oeAvrIf3(C+Ce)N+=Ltxe1+H2`Ip2VJDlP3H|OM&_mZv`5*p#O`uNUZ zL}bBFB^k$<_4NH9YisL;3zwK(k+M?kcLjQ-cZ)Js`7u-syLAT9AqjN)x4++HYN6XJ zAl5tUimbLe4jy6qu=xhlGEgbA@C_G1SopxuUWh?WF?9_@s0IEq|!oGvo0Z2t%eMhBdHMd2#<|Uvc_VW$@ zwY-ta4nwDe#9Zz6dZImxtFq#F(7*?w%iT~c=3)z5VPZ0SXbZwjArBg_@-VLjI|KPC zdayF4BLj0~PiRKUC!_F=g1K9gA0Pi(NojIK*qIlFDaFWE&DEB~+ubY4i|Bm~Ww+J? zciWV+Pi(6VYnUi)ZP{fX|1Rp_)syBuK~Lsk+g3A0r6?yJj}36%JkR$v{&8ZttW_66 zvtt|1apvoTrAL!%y`CJxHClkab z`mW`%;SZN4vkf9wjmR!P7 zlfktJMcg#I`4RH*>g|#4V6LJ%Y}u7*uHBSGi^*@FkqK#iBMy_?-t(_SSOqcE0^%7h zf=z?^!fGF@AmX_R&s znbQ=R;%G8-uB((lGai^me-pUN?1;$zaC$mF zC3N>X)Ykd8Zv3{pJT*oA9IomjF0NWKOA9e-t^OD-ZwO%yqsVl(~7G0LpLKW6K$v|tLlwhMv>op#6mQ(s!#P#@%xi~C}r*>0o9{Wh5Tb zrreVA0BBdoAv!6o%1)yZv%A$R)ciejPQmE7}TxW()ij5T0-`&V61 zP9~&SRu(UaY4}TUU-=CIomLUVT)n`B1+tIsl)plfs%&e~_V(pAsr4*hiBn8S7M zUP{Jo4Zr*lp@OM9GL)(>*X&%W zNmJdZP>0cZO;yG}z_HQAHz0Nz6Esyh(})jwpWhJl(h686j3D)ZnV~|cEnS`Sp0FB| zJtWr6{wrP>@p4KMES-!*IaHYiqr|xH@qp@%x>83dOEdH16bwwMYFo;J400&)h)nrS znF?MvG-*fPZL_s^`wl&k|1mkO>|_oSRtKowS?o7k15FT9gw??uC1G#hw+VSkyIyT{ zm6jsN{AB$=xEYs^GP*j7yHdQhjD2XN1+H(sx zwWZ$ZqZW*|%VstI62NxmFYGfenKj2uVlnLX^7dlf&5v zLLj~4cg`K2lM-X_)2Sn|te%w@VYG!k%ba)W1+_T5fybaroV5<7plREML|^C+B;XV_v3HcWSBo z%=ewecMY$FmbQ~Izh08l`8g%#A$j&9atqdf@k%!jVuT#S#n8O%Gc2)2&EGIN9Uyy~ zw_R5Wwlck@@{I?#=4XuSXT(_o!==aOZ&sEUJ&5!LO7#O zwH!W$C)I#et4elV0$~K~)@yq>dgaM-yx#%%OtSzsa&7ym>Lw7iz5@Ds#DBOg_p+RfRPGUxjKv9ok66H+e7x^u-*ZPfGj=cMDO< zQ!0q7h4&vt3wRl9h#JF)z?hVzRKdmRiJ52Md*axYOf6hRMoube72*>VlRhlmt>mkB z*{a@HlG&^EPE-sn;R36nwh{Sna+s|y?D2R62u%o*=abdeh?C8Qm2mvyx1ElK&* zHj)?7+yJ!m%9q$yy@daEZ}w7VQuJhvd0A6hKGo@T>}V>JO%c*c7$Q#d(2qThD*!w{ z;lAf2R(p7`dY_7?$Yi>vRSOFW-b0)4N%{;$H*=Qv{s!7$;x~;Rxz@pFq2^nAZ!qaD zoWwjVoq#eJl#AmGs63xcn%e8Cr}E0WudS3F>XeJ7Q2-%?6mn)99=gO-gnWKD8cP*U zR`C)`ft&4lQJNB_2Gat}@kQ1n9wNEm_5>eMP6bnnDY?~$i7C9QbehfB`yZo$4$h-E z9T(>MAL;lAN)7ExX!m&a}|16gfAwk@FZ>o%lkw(5y{i$zmwbZz3!4MZQYP1Zr zWY2P{4&x!(e9N?B2n@7iePn70ET_{WNbA}Xr|6PODmLL>Ame=79Tb1@XP_W&h0i@THq0;^I(~ty}X|L zcA4W4Hkh`@b?+B1kX|TuE<|3JEg`z1(UEqmh(CKhSHVSE}e@x zO1O3ufOZ3>2mep`6YWn8BB%xc_11*G9RxdS83zKqA5P}%^32Pzpkd3ScLH3Y8=I?$ z@UO(azAKA9JawRX9)emveNV>f>KdmrYAwtg`>x^5c;J*xj%$U+Zalu~o|P{o0HQ5W zFek1#T2n1FGo1pMRbFS!ZtLvFJfJqE)`vx78D`L1DjpL)D>L!DN&NYB>*EfJBI={X za^GilrXN#R#u`Iixb#M*dpqt4QY9dA)k;+Z)NX2~Krn&n!cU1y1T|)xJRx?*aiwbp z8`blYlTY+Tw4CH&J9zKdnmb)gc?>7-_;2UGrp_NSg&84bo4*%jQ@mn&$PWvDxrvhZ zp%5onIbY@vL|uc{WE=mK9aDOj`W;v|5j5upnAIfYBw4G(O1w0R;`i~WS!#aHM{OR_ zWIR>sQb})h3pGQv(N{d(FcZZUU(_^^krVp)xjtpPwrwp2@5daerDd6xLuQx+J-~gr z|1v&NWbn`#J7`*nof0Ya0FSSm*j%z}N-%j}eckS7NP6;j*WR2!bqh0^p7i2fk-VG2 zhbN0-9Q%1|!g4YB_U$naz}qrL`>k%Tgb!7HJ(H!9wH`s-W;FEA;=eiDRPMvf-WoZF z+g?%Yau@8}PENkQO87k35bL|SRnPTu6K8dYB#V_F@H>3Bhba1 zIUZ#680OB`b^!4+5Wl%17Q5NWgF?J_YAU-QhfM!V2r|)idLF!9?*$WZ-IM~LQYBCT zbZ)dcix~6=HN)HIQdrDk=QB=*NH6j4=WVu|o%S|u8X9;iOclNaH>1r3Zl~Ki@aI;% zxj_w4mIGyRFkYem<+XfUS~0B*UzR6tdXaqe<{G?W9=~;flVOLhHBfbk@$JX2D_n15 ze~yiJULtqGyH(*i%SX#DAgRo)vk)YfDY@oXZ=O0$;hx*u0`^3iGNyEO@q&)0RJFwj z*RP@1T;@tPk@_*O-jn(7L{UJaHkRCs{+xP*#8x#j$R@V_MVP3pY@K$UO1RBm%+$dD_bg)G%La?nYY-h>j=E%EVYDZ?OAOoN%OAF zId_OWbiVubUVllr8k71e(?mmJu||AJWoA;mCN)j=taIILP-8~%Bku-_tYe92BAl|f zXS}fMIuhJ2Y_6j!@2$I1&EI2|D3%RFBdQ`i4mG5oiLd2!(Kz!u=nBr4)HEg5a3&h;`BVYbSn&vEimK|%S*<=?@Sk?LP4wjy2KeR00{=(gq2Trjg- zXGCPU`e`eKm3~#SX6C?AUq9TFzru6s0RAaLE#8!Y{~~LP5TqW3680hG8bB|e0BvCE(V^ad!W=ZKM~B^2E+$(4!v{a} zINJ;Ehi(*RD0{;^*tu@l2Z;}yYgnOa2BxEZZm2#&%&L9(jlkWUh;f3!_>QjF3Ud=;tFNp`zJo$ zWq70@3;-Pf{p7cdE3jkrl3cE7HFycRX2Wt|S zME6$V11c3UU&-EQW;-flX5r*s|2?6d2_0p$NeCMWDcOBLCFmwWKHC}*rLWv7zRLw? zHBnyDhl3nsn}RV!XJ>G9*=4LXg>FdcJ26v~s$I690lvT%hWBQkBD%?y4#GUSLcLQh zpXpxT=gr(CKUVx!>~}9G95G1Wuwci>^a+|mNF?4B%uKbc2TP>}HRBVSW3d9NqeRna za{qA3YEIV{d5ls{<&?4-AepnMx-5Mvu-^vdZ&mcD^{88@<-<*Z6c;4Zk;WY{Cp-=M ziq)N==TXi(U^I^%>BywO7-gUd=xDf_rbd0;YuYMUxxe4Lo%yX|0=|9iy79UM~cM4?9*~}lD>WYL=Lm;Qr)HT&klmRqLDJ%Uo zlgr(Bp32=qao>J^gu}=LYmvu=beLy(3B=8j~#D9BRQhklDcamwI1wHPleH@Q8W6h8MEGm3fgUDCVfi~>VHeTU`XZF)O)%7tk zX%cmg0L^FA<+-Y(qOUiPKVifor(1ovehZd0ww-7Kd+XP0qiAp3et++2SN?rlX+c-4 zE-)c3{G*rvy=-pHBL%GKY;x5{4q0xx_4Zl9oxEkxT`C4;Z#b=6c^$T(ZLTR}rq!XO zu}2Rr_q})J&pO3P_G0%bPe5rjyEtMcHT}d(OW74~ZrAF7bDuI*OwKI!s89Sfuu}j_ z(!=(`BjLQvPlR=RXjkt2Wq#?-zDnr~5XM0?=8+zGXWPoIWZpw;si*>Q7Q140q~nA; zX?zDd{JV6lK6X-?I6SRK{pEBUcl81){?ewW>RcMxb5|u2Y?YkC!i#)!&+Ww50*(x9U1qy8 z#E`I7-b1**$3zK((cqanGD$b%VD$%K;`ABgzAkHP5&Q&yCn|FqcqOXi88I+5gyrdJ z@)Ot;`YPc?dv!-OTy*C7Jm(mf=NzzUwRJ|xe*uarU3dqS6M4*@1D)SZq)a@$I^2Mn z{ukzKKmPLJysIJgOf3oqGkTD)_^@gjMPE%zeDQSROfS z_&Ic7dVIP?AklRYrX~#09GrXUznS=(s+@hD)98Is2y4DM@^KZgG*wO;7TDu99j)E} zz4G#|Nh0S-K2IXoWLV(K{@z$k4S^H2>G9ffNBE%D4P%pHtaF|LJv21i>yYvvbJqK*!QKYv-mz~GEf zM@+x}+KCX}!6?a>Cs$C#qUy`uXmBa5X_s1{y%9bRZNtYN3Rwe0rw8$M# zzXth#(us)CQQbzRE(yk-Zf+blj4s8_VfdWlU4x^f#>RYheGUF8^Fa2CXZiz$AATAx z18>K8y@f@a+C;B`He8)^X^rN;`w{x+=-%8y>8S&%8q~qNrTVPzd|M?9ai*$i01SZ^ z5NfBd!v=wgJ8|~j1qF6(_f%fVaYREPFferV?vkhRoR_>e-(`W&05i8$}bN+m9Mwz}l-YliX$%qKEX&@hX_3O9sW=A|#|%!6p49;Z(pu+ojd zQkLxhip1r?y5U=2Kf#Tlg~cR(604f3%Tr($s6*2V85b&7m0pDY`p zfzpn+tuBQpKjy7)J~Npf@4tDu|3O64lVTJf10#Fr4X~tW;AUtM7;yap6;p%y)$%SX z<|ai3siItKeBvh=MM$(-MdGIOWDz+v%1l#kW)jS$2-hqOWizyAilg@X_G0J;%EB*! zVmI`hc!DD+d{qTY8hE3BiOV&(?dFad{j@QZpqA0V=duIhCh)h_Go55haIQs=n+@~s z)@GNR1t+~nC@G}Lt2`6mUL~ZZWf-phU0dWHaVj8`gh_>ZqdyG}WC_F$TxHY4CArX% zHT&Z2!?`-_9T&$vE;oT^b?50c3YD+(`Jq4}d>~8Yd1m#Qicv6g13!X95u`@qF4>iWVvkBSx@zL^ zCyVq^fBhS(G+huwhwe4JoSmI1amn0(qA{ZwM6t~-|ESGzih%fe!Gyi(ufMDTv6{vN z+#Ec!tspI@D3?q4*WdMdgd`&WJWZERwBWflMwjI&Bq$e2bBn{-WVxk-u_yoBm&%NS zGwF}#KhC$ogP)R0NpdhF^8ehARXs|)PgQy4$+tNsYp2D<%0u6i+rX`vkwud0B^AWf zgPxRQR;Q)y#s~MyP!dnYtQsKC&dwGw@B_vYO5!?Z6f=E`H3~vEo0h2s;dpB4o%lU= zV%7J$ngJ#J=VhVSByYRM-jhFD8gMtPh!c+;I?2g*%GfQnf1l^)Ylw?)wnU0`=@KZp^5d}9e|2#NByfGmGs^VeEzp_c6VR9e~Nnt zY}_t&7nyhxfaj0_6HjSJXFf*a^J)rH$AEYn))&7X5L_}3p9gJ@tXX@)3s3(4XvxB6 z`>QM0jVKQ^Mz!-_T6)cwy`pryDA~8C(3eZRL2#z;hJ|;AQIJ^! zCRATS;(7;*%gx2-&f?`BTNRLvl;r*JND_N%5vsz!`~b5KRvb;79JjW{c{$xW^O@FN z5!Dmmejkdzst(LeRxq*3>tcd zhldY+$QUSlKwTA+usxpEoM0cetikZS@Vu&ug%YEfN%ZBLsE%U3N8N2$u55~=V5Gp} zSE-+D5=HCI*f5Rlyj?*0g7|Jr#NcTJ%3RlDk@F}BSHO|3xKx)G%ixVGGR-tEv89|IhR=QtveM zsKyjT(|3p#O%F-AKtaW%VPo=3SRoKutBcS6dm#VGZ^&9bPOKy0vSv+#bhHPRB2^%` z77<5gIW04yvAuT^cZqmag#406)xvds-6KukapChxpwAsW$vS`D_tLjoTCWtu#Iqa> z^b-)Ubn3>Vd720H{AcaMOEz2#5cq%I{YQhvvjfd;6YiUS;=z<$DE8po9Msp(u>5Ew z-4_md%S$re!ZVR+@tgptz)bCGFId#py%{^B-rx6w6>35JS)YjGW_J8pD-{>2U>;k5 zr*9I?vxBFrqvA0*Gv1tr_YK5^V!f@iy}{VWqn=0P@Zw!F#bf1cl3jH*{(CtGH#-)9 zYeszr!Nh$k#z^FMm`ij;6iJ*fs;nFp6--3~hi(5?@cbZ;(k|wJhSllnkexH1ySw{Q z%1qobG~WF3YjBCQDC+lKo1$;?z31i~mPJQumIk_Ri9c)i!oSIVCxR4|B$6jwJd+Ck ziGAB9_Yrq`fvbLi7fe^DA%Wlb;cGBO_5p&D8CDDq8YD@uuyVwZjh3yI!8>bAW=EZ^ z#Pq6igdi#1DlHSmP={A!6L_~r4RiT54*2BuO8xl>*8o8 z$J?;h6qo8qr6afA8IA=rf8t1SW}HyXydo}DO?#9;?dw{;C(iR@znYf6p;L3sl}O3dWf|xNME0 z`d9u3o2KZe%GJcj`^oj8aFffKc+MX10HoWuaV#1DMSyZVs8E|xeIQyC%7s8OzaDGv zqr4S!`-dP9`h(eG3dzhX2QJWh-6b*ENwc__u6M?>VZ$3$thPnn+2@tYV4o^Q=f6c1 zn%;A@ZxXbXIb{ot>igMhdKUsuy=CZ=-?dMqj15>&rgP}>U>kk@I>o(fcsk+e=Lq9X z805d<^S*?Ak}E{=2)(i(dNm8OmbFjZJk+!w z3o!rPfAI`)H}K4qZPzP1m*rKU+3Dya8q_q}CKv!$sXQ-RbL}~hpqF^}SVc-eP7_MP z8-AmJZ>)LGebxFbH@3=@Ek z@Ais%Lq(kL&z7b`^a72FY3kqMb(^0@eL4G`f%S0_vl4E7dcX%IqAQKab6thvV>wEw zBcTiLnsoG%^*4U-L0u*hdgEsiVv0iM8Sy|Y6Cx-?ps?_OkZti-{o?y@BB+J42~VJJ z{kJ>M-(F*a8w(+suVDCOr|?!bg6Kgrjmr{~Z?lPXKYYhH(VHOHV)&;Urj?xGLMMsO z*gPhw&bwze^1Rk7U<>22SyGVoIi&0jerrd^BpbfN1ruVZ|K!R{cPouNq}$_*++9jLmPp) zSb1;~2(7)2>c+OksbBGwZFRBW52gtG3w9z43-x~Idc5ZombPTXhu#?fp|!GVa*(K~ z=q|A9h2!7)>Y8bIR}DSr8+3fbj@9H_!{4JHTQK>P=pP2Q0B74^^S6L1JQU3hloJxMhT zw`I$P@38jY?&to@LJJ>-YH8w2cjSfZe%kuLZX4ZgsF>(a!0M|b!k|q3sfd%5Nf(SH zFksJIRFqN7x@L9VVlZvxO8kcz$!u7N?;_KiB2X1fF_xbcWa%2SUw}GxS(`qb5}Kz* zLwI&k$&r;f&hX(MA2csc-=!ZI0Z33`y~+>Zta;0jt6?D^Iby;YmmKSCiQEou+4FoJB)%=8w0NI;O8l z|JkJIsRQOd+Y54+PbphA%84po&mvV6=*3sU>)73D4L?bJ4Y65T+i>f_j|4e&ajt$@RZ^Bk3nyLc~%OM#|0AafzVf&U{#0pZRTaBhC!KPNr>EI({; zo#FTy25?q#m;DnmBqM5~<}tlik!c|9Z^{P3^#6r|bAzV$;}FdR^3E$R{Lh^&Bz!hZ zvB*GGp_|L|dp4PqzJ6~~3$;Dn`$HNv2=F`7>c&oy4}9yl5a==(U$Lv9)>CM|kK9=b z7U)r7Q2kw#ULDH^PSA19B?-U2)|fN={e~L&ra@D=yC(lj=IhLfscY1q@43YY>cXjy zWXqEN{AQK`@szD+mTg%yP*qt#Y8D4 ztdfyqyQ*$8N=HSg#;cI1ddi>$%n=ujRSK+@b4klb@%}2Ws-(B;(=M@P%;HL3U;|1Y zqNhpV`aTK}k>MFI^4Qws%wudNO(s55DW=WWk^V&sWRx6l>4CVzi6b3Rm~&kI#qEfC z0;w`QFacUSBQv-8LDxFpr(t)mlWj!Oe*?$rGGoOnxQZ|L3hVu70VjcKYD3DeW0fOo zx1vYfk*tT`g%p~Ukt3gJl)b{=NRS&sy(k9$7>cGS;26f=?tD_C?Kjwt2 ze0Q3gXJ6#JELp88shx;qZsJ|rqM)n~=;E$#-qs+vkI%c;$HQ8k-5VH^jVDXMl?*9i zYCsib9=r@n4B&1Sze5JF7s7jhHRVut_5;OfYn@j2Y+;4QSC5^rIIt? z`YLF+v(puq>bPX%FVH+|dh#WU5Cm?%4lT5idCM$b&u&6-R~m_NlzPIYxFfUuR#NjA zUCL_pUT#!#TZH}QQ1L_m`>W*ObZ>kM)Ta?RTTr zn#6-YxBD;TZWoNI>kl5h%{p+&5d0?paaDgfi|=^&TZ{_2jyS&pt3Tdb(Bk9Us0;fMk=0z)iZ}8L?r1sy=(I35U^mY|!cf^d$dR zL6Fh@r;0$ATERsl@|&5_mJ~n6vP&grR|Ql^SzyJ&bWngad^a`{D3EsM{1^S^eE87C z6O{#=At+>HeN9HHtGy&BAR%$mh=LtF%{loy2jF4FZ91wt`#Tve1;E1cU0iN4t@8C0 z6A@Aa9H=?l=vd^5JwJ60p4ji8>7PR!6{l$0EGdWWp4j@j6PLQeQ?oUX1D+ms*)t+>85 zzd^qDLB(C}P5Pm$(NoA<&vAnTLuqTG4}qey1I=|ha&W7?cTYa0&q=|dd* zcp(#_ZVK_uE~Zv`nu=V3uSn`SJjOh9L4c5CYcx`(Im9HcZkh7~`; zx*T-fQH{z(yDc%+*_5Gryf$R_Rs@QDXTJSm{krG*@K|J}7RI3Yx!ztnM;HXcG)C7; zm9=?@B65x6zo_-xWEV_4QcZn|QkD`f-taU(qoLv9shOO)E8anLI6w~$F41B=_^b0$ zY6}0Zwz@+5frWXF=d(t!N|Oj$WS-HV?5F+5i&4;?_2YFh>b1{O)5De3HX?0ekUd- zvO;YxTTQBKge^vyb-OZHIu9}rkbo@Ne!e~dZNWY*9Y0eO_>4xa@>mE-D&AAo?Jf%x zH*lwfu!C=^t6d3LyVdf0??igjj=sNRhMX9yFlye)Ztv_~Q- zL^EU>coG;V&hi5bm*ZWm}Cc`Vv~APtDj zVb116nsxHIW2-BwcAy`yybw0hh|vX|5^78|E86&O1xP?EWR2HYd&A^!mII6{^~#og zoMcKlX065#c-!5t|MJ(tR3duga^Bij->5rc4hM_%9tho3f;s3ugbcS$vAfnH8JeVu z$VYw}DX%+l-@KS-na{w7;Jp9&(_dhjF$FJR<;jbJ$gDxZ6Gu~EYQ)EfiaD&L5K6Da z@!;O0%~D*H|Cui?f0ZaqgWv7W_l zNApv{n|cn4hd_3U2V}r|j`;ZNFt-Ql9e?<{^EBbh8B~rwAj^`T+>Q0u(QRmh^U$6z zZJzi?@kdowYSYP-G&oG_s&ls0m3s@pqDTu?dAo=x;^jt2TIGJRK5*z8K+o!3A3h@2 zzXAC#ZklWP879Q9|ed5UcTG)zy@be z{gUPL@(L{eOlinA2hjxt`Ocdkw_IL7-`_KJ?dtuqzLiatao|W}?O)y*<^9L`yxY|g z#)1`0rw&*1n4SDR26$;yQag|Z(HXdt`0noybRV9^R93`R@@qZy%|Lyy9@&JB`(VLr zs20~V=)TGFE;ysybk$9DW|;eTw5YZuO0Dry?^*+x3aLLdKIqx?xck zmgsq5WuAJR#0lCK@;@n>(TAuar0Us`V}L4^uh_!lt)i3ns{pj?ZFH1^?0MOhwmr{b z1Rs-xL$u%HMyP6MydfM$YP1}xWxb*|9_`tQsN_NbRB2oj7FZ;+AwW_gV6DD79=raqrowH^ zd&n_=`dRAd37N_qni|=apyp^B%xsP{udQv!DTgAjZP@yTf`94G+k8k(pr+_e(Yf0^*B(>~ zcvkJuH`%JsUEF`OND_&S#Qf=F+cpx1?o^d!{;JehJtDci0FKUmhS=DbP9%NG3Ga=0 z7Ulhu6NNG((k>|psU24PZ=1LaCJKvx&m(+d&N#fj_if$9^GX|HuK24J6#4z$@A_Q0a!XVuWAjfkbj{MDZU>o*(zy{~|{R zH$TcFFjbvs5VNbxzl+Sk8Db#qIwoYFg0C@&5keYQ9Uy<^c3p1eSfR|1==mIt{FY(` zmkfbbR2&(jYcy&EkpBEl2bB-dU0)pz3VI})GS z5|ip~1J(m4S)|>QIS=x*D(q@CMfb`%vS=JAr8Qe3$VL@(N#A*SmW&mWPl-j#weXkd zf&=KWrK~(nIR~nJ2QybYF>=PyXU2YiS!0zjZ_2(rYBIb#I$UGqh|rhe<3t6E>euB8 z*~DXJ=Vz6WAUl7Eo_EL%OX^Ol=zdhL?p1AGjXkuSIh%w8eV`3^{qECXKmaNQn8qq* zH5=M@HDBmD&rpS)+`<#wDJrHs-=Gap96+3e)_e^mgx)ss`cWRN+%^nbnEk5DZMBY8 zzq$qx$Lz5Rt7NHwlyq!gnI->iHo25$fQ`rxi@IsFux4S~fR)yDYt!PvSjc1;u>qOS z({>}IFB8Y#TG)>=+a$SZgIz-I5$vH+UaUf(+4@)=>GA~f&%|joLvp(bW?YhdAEi*x z_Y0pdiIW;A?Skyhu?sSg-lII~;4Dp>PiDr4vk;v?t8xav@7Nnq+477?c&0fS{MUR4 zjf@TQVckEUxNT<{J6c~Hzj!vg;Z`cgFX&9pgJSqhnj=%<0yb%u)x5*%3weY)KVTJ} zX&Ky!mHenam!q-DD#$r}{kV*Mj;NOOjWw#p?jnt&Nu@TF-!tUp(QZIjHgh@@#sImRKMi2p`4%o;hHv*UW7hy z;tL?RWMfx7BK0ye2)qrn-jL8x4hG(WrYCGAZ!|s3C4&AnmqA}{`iw6? zz`qPXqAa)#5WzJsggwh2k?_sMWR1?meY4`Q6{D4~K>TS{5-b9dAv_(mli9iG6SmU` z#MU^RwW`t9_?~TrMcr^BdYgczAr+NaQwsKbfRn*Tl4p179ZPpnz{1bJv1@{r~o?!VQNoIoIp%di%$vK6@d(4B$V|K6JG==_z&CXRwEDB=~i zh7Mh&987q@fSmt=C+*tJ_r(KJ6}g?xl{Om9GL~P5!f}-=C!F^8bBQzgSuK{vwUQ?2 zEKm?e*+8NnwizY(UGkxoDQk!FXF+g>@>gu^%M5&#Aa7M2f!oue8NwAg9(N)4f?Nycv8_@F71ku{r= z2otrZBBT1BF*eU57QDg3j&(iPF*H0%`s;L7Z5QI`y+%DWBb%7F)wQ9SBmqN6-y_kV2K1tOvdOSdzRmyeI9TRq|zjj*(O_Dppt z=`A^?o9N&gSC=FJkIbK~9SJ^KT1wxsozb)Bii%GShx!=iWrfwdtbbddQ}Q=GCAI9w zo@M(=DjV;z);O*T?7N#27s~?oBf<8gKhhxu#b2bvIF9}4)23(Uj|-HunUn=((`>a0 zGij%1f7pI_6!|>Aeyx|IjVGJh{VQt|E}bq5*@B>C)QyLmLFVFO!+ zylA4^RYVN0Fr40rjwvfK(!PGbHjFGLDO`>I8m&*{(7os(8WVfrZDr5jsWxPkuq3&0 zun=b$wxsf~$o-$R&T$1YiDQ+owqX6qhLsguT~84_tqaw0S#;teX0_M$-KylL;0O)S zthFhS-fc7~Jl~Pw?J=eKOjeUJZ(jw9@7|sKzRri#p+Y2qdS@7k!LIm_+tZ2C>!+;fX$~I{@7K{W-{{z#BpGE7=g(^gS|mj<6GN%=4WoWF zQ}>(d)S>lrwufd!=MqoXHSaR!%X9G|1QXT`DJw+zbQ#q&G=M?d4^!n%OkxvIV#-Q= z47Cs0A{rR;lAtaS7P*m_n^N~;JZ$Ml#ar(y`uvN(8Cm;-u3;(px0iUi$Y`z zz;E$#tT~Q0G3d+3bWEe?OiZL2v$mn<5r6Q!12B%AR)|!|4>2vMa>C&%#y;Kr-;U)! zt-WOh#sik_Hv4vpSEn{%V@gtpI^52t-4(a#L7+c7wduv|?L6rm(3m+dbh)WG?~;y} z6%^s;D9gll=C{qR2MFYu19k4CAe;B zS+2qoY%@ZN0Iu}RR>Z=p-e~v+Gq`G5|F5~9{~y8_aEVYpkQMD zC(Q=-3-Iv~5-COa!FY^wa`O^8!fug+u8a}780OGU%->N__Sy8M8y+b+_%l^@nf;IE z3MVYoiTku?&U&~XitEEQTK0lAam+(7BB4% za-8>?l#m5#y}TlU?c{MQ*Q{>VLfQ zd&o>R4;2nzkS=u~943=5J^w&pu$g29*dIrat_o?jNzw%`2xM$ImPjrAnA7}*QvAwy zr%I4LGFrKFEY4OUuLTEEH)_w)U@17FY9L!)88eFCf3z6#UI3jmjjKx(D_8if$l!LZ zTc&^lgD|zHr?$sP{yUWfOu_nWmP!htrsAxnX#UA4ewiAxx-?O6z7ucHQK#;Mj;%!e zw;G?*{!IG0r!=1QIn8^~kEJGO!0Fka>;q5xoMI!|FaLnuoNqWDLPPzqXrux-uE>eL zA^BjrGgNI(HnttzysUU9F4)Dp(thL zr>Jfq%b$qW$zM5(2GjGlfP>DP$~-yy0As1f=Px(2qV>>qw7GE~wV-3rf2C&4|L*(@ zfvv~G(ggHUVC>{Tv~)O<6+isPX3^!OBmLfm~I zO*LoN?#j^GW*BgUfe-Fw9xKg`XIIwkDL&_&1>%?Iw53<=*Z2AHW4{U@x>WxsIbD2h z9w*wRo$D1VqMFUX+_et0lZum<$&&?JrXbxMa6HSVmg5R^94L)<4 z&%D2EoM^n7e&A}mkBi#=NECM9UYFHWSmTXh`@~V-f&**wDPKHjPp)Q()u_DpAUKtq zr5pIRX8`q{v=c{-SHAIZm#{5FWcS~}Cgot`5G(*~#%=%ytIF2qk*4y29WEzvZxuR# zT)F`F+|(2QnVF&7+Q#>bp~t%^p>n-Hk~Z}70d}3H53;_Ln3UXmZSiG8A}B{H_U}~C zC%&r`Os942?1Y8AGBn4?jh0la;o^fNs;q0eIfzZSBiAtK{#H_X81j67D@As6g-y6q zo>&!s^^v#h_&5%|91r&AGLCojWVP3IvWpWRZ-`rt z0Pf=)P?}3a4{*`(NP08->Gz)+7?k6GWre?iaETBYX*T@R_yRI;EgrUS{Y7x$Pp;h= z8nE7ZL%k4e6n}nYP#JLaS|iKKu^0{VC5gZBXJ&UAn#Okp42H-S#Bo_FE3xKqC=$3oKLnQ3c!BC5~4aco@>5KyF9_I?!+ol+P$`UxfwwXio+EYS=_5ne=os1ulRitzyz{ zUmZ~KXc?yiL|{2B6J{dmt!l_0E(5QAArh6Py5uF}4QMjt!8TkO-o>&WyA}`B>7O6~ z385S}`<~*KlBYir0*+H7a+4DI__GB&Pe*9_RJ=>$$=^}!fV)o`y2hG)+WETO208Z#IPq(A3>k%{h`Uo-1#4tWU zET~}7kw|{Ny^*z>dXJ?nf@C@ zw)Y^&Um~Zn2s}xF5s0~e5XjGsq~gQX5X*6V@qCztt67)$Ul+-9EKuzI3jEGHI;I_V*wTShD3wENV_`&;#Z)PW}j$v|AH#PClmpfqu$e{hb)D0kH~8rt$w1eyUqRk#HZIP}{Cf}w!#N;kXh5l07(OC~a|K0(gt9cWf@U%h_QlAV z?%8N^U~w8h8tq0#Geez64>MR?>cV^h6}ZrRcQ=_4upT27{CiBWXO@TuKk@w9;heYx zc!!TK+T5Hv1N5aj(78{ZR7r4NO8%RgIvM~Tkr)iD^ z91Q;&pmh}W$YB`{=ot;QZYHF<*^2|PSH7L&p%KqGPBui=a~A!C;M|d*jFVdv|JJ7Q zL8(Et)1Y|M**5ykA4k$|NNPE|F5@GC!!Cj5kE6#r=dRCk^c++W#A3_ZH}Xi@nZECF z*4otQ%u?G&C;mvtLn!feu|08-tvsf#-(JKdT&NM*nox5*+~{?^sfGAE+C6hBGmY4+ zx^Fa=XT=Amg`h0{R^nUhL4lfGbEAK@azp9l*cNCzQwPP!w0w$M3K&wdxgcpgRON?{ zY9TWw_nVhkXo(yzLg+~_f_JuniP=B#RJ^Xz!RL?&6V=M z!&*(NU%+y@sV0)s<2n4wzG@~5-4-V&hiEAyB%ejRca**@WF6_n}sK4zpqP7d?ty-dR^rvvywO zmU3~0Bf0!IM0r!hP8lWdxHs`W!_-`nki%;Fq?d<&7x-vOZWxjfi3s$(bR3f26Ksf} za5S7t+$JeaI0zxnkzmfPb=;k$jv;W`qG#&i0qQ^o9&qz{dH+MA zxsel5Y@PK$2R`zKPB|BTnVN6FZC#Za=JiA#88la}1#9SA^GF@@rF0ClR zXGrt`hYy)~fnTuq#f>NN0I%MXuTN1Ue~*zKKMES(%2`O-qJYj=zpolV`};J&Y^h>S z?>8|4mwKMZL;eUU&qgD?l*m{Usk=gAmg?2jn#aeyOFZu|%OF4L>* zdiK=zyQR+?`{Gr1+CDZ1D+A4+F6{O}1N`Hd-+VHx<7=o@8D+5Rsn-nFjrMgOT1b$A z5iyCh8QTD@1AkQzavkQ+*n9SM(0N$^TGqjR{P`=y#j~@t)<`z&pQ5ff;dSNV8~U`~ zDC!X(vQxftZR3GtELz`H)6Np>!25{z54K^cV?F&Ha%&}vj`QbfT~rg4D)*h_OV0a=l>$Tu>OLaM{WDxwAIYT+P0LcS;JiL#!0fj!+>w;IO9pvlBS1dAFzw`M-~9_+>Jv zkaen{^<<5kudwwrc6Zn}t8%Ytgc!VD05)LAC2Z9@u`z&|3!-<4 z003`9Aa4xh4I=&^z??2nF)U{=FnhALb~BL>2N};ps-SLnzwhA<9u3N+)4}?l_^TnA zwr*mrviS^lNXpR2`Xo)WvIM{Qz=EFb;S&A2VF|n*248>NtQyx{^s#v_dk*)~2q7;6VqMI#z-di{SeNGo^Z7uLm_n+PgxQ z^jCFcs(_2hh)n|5?p`~s6dr~qGB zbo=){?|Jm;*K$n>`G@p%75ghrOc?NEtVwQ;z;;hkj${4~3);-DK ztVs0A7kReyg2s9#KHt@Di(D7WT+k_l7GGqDKaMq- zym|}_ZwjG#=IkX*PFWN|e~A~BWVX9kv6>2l{1&1Uq>| z{!%uJU{-;c>wV!hztQ1@;*(5uWb( z#E5hn4T0B`SVUH`B&t#57SY#((6IR1-~u+cH-&<9dBS+q>{MT0<)J;`t3cMr!DK8Yx}EKy3ReAYv|>x+wC;F&4G z4-C0|K-%|yfp&5<4c;N~6CX0y?8XG-{W{R{Jp;1nDH)q$PE}Dc?TvF3{jMK|2ZE6w z(iLM%qmFil@=wB)X7^3jI={H(UXbiYNui75Xp6Yv2D~%+kd#<&i}DTMCU@ZAw~W0l z?W^RBALgA=*8Lg0yu<7>c6R7BqfURcc8C*#@CV~uBnVbhV(B74^hFf6vsmLU&$l?i zv~|^$u9!VV)fK(#P5Q z=l_s2kN$IKEWm%R6yQgt@mc(;!2os}{ouStEw3(gi2LZQ$%?gJD6AA+11)Dd|GVP7 zFFFv$Y0f#}6`U9gOBDgvZ44SLGy^F3<|@EgOnMCm^|ULo^<3dmT2Mm+{{Gz=Iu-79Q7b9-^OoZ#;&12E?OCIt$Lyi@J~j@3&Ugd7nf0i+qy=rPNQ zq4A^3>V}(QMweBI$HX4FN`Q!%*bv6QzKMN_3rGjM>|{t#M<*7-UG->GQ2I<{p-XSB zpY%R@KcUm5@)pq^C%E?GC$QkJ?4wvEITzLnO?2mcVn`~2MsSQo`bQ2W;-1QuC#k41 zg`$Lw!#xL|Q1aLJ9%^4s+o7e&*pCdKf;8UCf_KK`c0D@)u>Hj!_`gkXPU(+dw}e-I z9g&{zM@Gd7IS;$~)GluL9F}R0gH%i7Hud*q}! z;M&iMA%CRP?G#*LrvrqP`_Yr}tKXd(3M-H*pP1O1L@aZhxsk?9cwQSsl*A6vpY595 z>j~CA<}UNTX?`Q}i*D5uE8Cv^xM>HGuwQ>mU0Ejk)T%_y!*GR0> zG{Tvu-M>6^B(3_E8)Hsb4Mzv|lS4JEb83H&%*oB(3)!?fs(~@)p}LA;Ujhde!s?`= znfAy=u7X_w1hjhb{_ify=8s|D=FWLErTBqIPoA(maeX6Af=ZP7|t&Nx-s!s zsJM!@8AB%`65n^Y8er(B`}l@kZwT$o{5yXnejm8Qh=2pXP++)Es2noJ-KpDbM1J_Y z$5jTgOC%(cB~^=fr2OZ{GQ`-J%?-@Z)HGMK{VofRm7%-2eV^@W;ph zpy(6vsQ}DdKQIRDQU^7Sie2Y@98J#=#^0?>ww}NWFEWSgi=G*fVr&13)~P}={;c2Ql)7*coke6%?A|F3$X5{e zeUlc=ISp065TT zl4z37`vAqcA*=A?C5c~XcoIsGTj<1O4t}3Aret@c?3>{sxA7Bd*1ara2SPMS-0vwg zqG`}VQbsIFr8h#QZez)UpCL)ATN*hJ1z$GpMvX8ThF=@>!f1wK=@Z(WYOSl2;dIP8 z=>>5nr3_Azhwbl1I9m5CSk&4w27somsl9DjQpj(%vr)O``q0ur%$?gdgC|4$TPgVw z7cUJB46NtB?WLs{N7JsUE~dB}(f4yx{hP^Vmqw2rRR_3mje1ng3Iuq%|m=|v?BaeUDhYe?c!?6tLL6IUX&!OCg{XcP!Gf)x) zgX&&(_7!)eeHVd66Rt*4F*xZao7FlebV3l9Yy2J9TiiUOtUam5*)ph{xG)jmy_7I# zoh!u85#m{XrFf?HKkxeASVpiHABhN%n{Us}krX_Qam$?pBl|1`otWj~Yh3;c6G%Jz z9(fs)^qKFPz10v7k=^EzgKSY+;O{rU8GVmwkDs~1^3Rje==^(rgW#3Z# zIK*=O;T;LJ$)N@$m1E8BY#SMWpzbcxbX+-PQ|$B-Oq|!p{;vTYlQTfT`s-0hMJz#Y#ZU=8%qe~mBQvg2KzWDLoS&&W`W5&NZjk6X zm)ahGAq^2cjdbMMrkF-zri>%RRN|8L(Th;qN{Q-^_^{*qAr3I0P0cpA&JRM?H^Q;w zkif&43M+e^r=y+8t)5H$o^%!{BB+JRHq<{+sZBT8{Vg>XB>M^!BJXvKV$f5hOG?A= zMlp{I4ak|o0?-pBak0AT)+5l=t}3yx{()0t>=IMAoI*pYC(E8*PC$UK)yQ@!ZpPQb z5gnPAjvNC}d@S{W8!}malw_A{BX;AS#KLg`!0;pz(E+5%pqzoNqH?lmnydi~tY3t| z_n>QANqvy`p<?w9mGs-J=+vKiF893+`i>+>9D6;b%@-2$s{^NO!-!}&2o-`B2gN#tr}9wmba zd3X;a*vRFlsdq8a81mCil0`sR^j~@7F0l+T>pea)%KfS;m%bQr-1R;?l-+~FaD{4U z>)y9D)DkeqNwiUxNEBX%Q+EUNUfpr+AaIULN4KZz5T-6=5^b?zH8>1t0HCJ+={HKz zZ)$xSx7j)I#cksW3lMWLTYQmL2F>_%Gb>k^mrdv)4wSm-+w8;xcp*mf;s1Nh|I)`c zP$9NTSAQ`zNMd2Mi}`W?#L)TiLt#-Qz#28a8;DJi85@KK6*!-z`MTyV3I6zp>2U<4 zVQPr)n{goa@s7fr{Y;Cshxnx(V0!eEb3tuwm1)S}$S*%Hk6wIIe4kDoCU|B){CFB; zNKI|*y)Lr2POVmoCkZlPeXUXYwUa4ZEiuOXdFz^#;gTRT`dlj588P8e|1^Z4D!Gu9 zCgbUgn0!f}c|b%0pAo#Gq6;n$KT6U%%z!a1rs{gXNw*kn06mT7TK?=hdGgnaie7Tl zr|bC6d3Z2Q6G$8#%7?Uxjf6GkyCe|3-%UIJ;TEr%S;a+G=*QloOu`ZL)`@(;jVT>ZCwaueKG#hLxQ1T zZBr{(=St3M(`ALq>_CF5)8;%|l!Q~(sdzY5w0q3R3hKbs8P_!w(#K|te?!L+z+#Cg zX)FwnO(9WaK#k$R*sdwNEGNLFKbW4@ZS*D)VoZBQ-j{3=dmTN=#FxYtBIMA@^)9gu z%R)m=a9f(EmRo)2^lA`xtJ6yRnE`6?S`zB~s32FWtkInH(ZeQv?)nEmcMsskxVLG7t-8S=;LtB?QitMMC-95#{TA~o!&!)YzfX~b1qN7v{r9DAP zy1Z(*dW-s{2Y3~(>q6li0@ZE6w#AYz{KRWnkmW9T#gL)|C>t@3c)w2}P=bvE!fU&{ z-bv(i1B`W`^Udr^793{K54=YBk3q?;b)|XP z`abZVJ%Q=Gj~kVF@Wub$G1&hVS;RV(>uXF9XsWVp^!-3=57S)6&U_IVo$G--J+nEF zJua3(FI&iouoCcch!w|cNXq+9Xb>LTFc?=sXfdee`@cvHdGpSoh_4))7eO}(oRCUy zXH%D>kd;`1-xhy8-sSgkjEW!SeRzWZ`7;bLR$hL*!oa}5^mF6$^4nGYRw;VM9{XkH zm4l@AzxF3F@n@Cs1LOdSycgc1ItzEav!i3DC;GRU8i8_Y`Sq~thdvBj{K>onB<=X4 zvTGez1{R*<0*Y;gKP9$@@F8_VDh(;OQD1hX8_CSA^m1*_uT3d|24+>_M8#Z4sISBP z@E!`mqYt$KLG5AaT&ireaVh*HyICsZ{czkf)u;LBCkw8J~HTqh9 z+*wbFyPTq!cy>iF=HwE_#^;B%Bq<`OB-B(!(!5o))qYZ77n$9xhg8R{T)PP5_cJ2k zwp4e=<4U!ae~=tf;lC6yh0P@B@Rb5Hm_5_r2&gx= z%BkW2u*59Riqhs&^##E+*8Ug}dGM>%)2Py$Tpo#gyg z>)~XS+6|;HaLmP*;^i`nF4*`)RYp*sXVjJ|h*|clYM}i~uxD`TZXonP@EnA7Dk0@@ zGn-rv4f+a|?xv8E0(=&^(E|0jQUhXyAIHcMw3B1w-{nsF%biA2dWyG!_<%qIalIW_ z)->$b+m8Pk%+=4-X);(E6Y={w!P){hNMJv{4E(jnQnH7J9^w&V5}=_#gp0>+PY~r` zl~quu*1&9(q2WVH?{E(SaIS0JGm;z%Q;4ZP>k9a;SlUU?Oq&GCPzh8m4B!EeCI@zv z#+bXfxbmic9L%cPq*KjH0T9!W8~>vU@tJpM{w8i>$;-o271!C=m~IXF`IDwEbDDhV zr#kdaNnL{GX-yuKGO@6#r5o<%>dJffc$cEtHi7g6OBlX(jtX05EsIyap7v0VR1C1rxaOqm!+`MePe!| zSxjob%^yg%E2k7eT^K*w+33p$j*zdb`gPjEJo%}{cJsC`DBkm!^&JY8r-vQCb)+oz zE9T)JY1|qNXX_0kGU={|iX#SPQ(;fWA$Y3~@6=-LGmQDYv2C^{Z{p+oh|97)R6|kI zx7hM@bsOk-j&`-?a!~~oWYyIbWoes}R`frsRPBIn8W=M6{aW4oYBjWKv?(3Zt8G;K z9rn&!Wt~x7+9a?#uYE2lrv6q1Nszp%hw zPyb4L<&D$Lu)*W<4QP@<1HXmF@)zCK*yq?Q^3R~{m5mmy-;C5ts)7!$sr4-72EY%X zC}rlCCPLO`tAiYoyH|o+48i$KeWi7x5%&>2jAoWH=|*A+XFo6gNMn|5ehYfD526DV z=7}TRbx#Q539rY7{|_ZQw+-VTN}1z<6-eHKv%twZKgWmnl5<~|epEnvll~z~&iPmR z!TIO^BpzaY@hShm_dS;0g~-|oX4LpL#q$FwHGEy$&>$27Hy`;B2>-w|g0M<(?CyL2 zVaEjR&Yd?JVs;!P!1HvqSlGs@I+i=EW=dHMtY#T_f4+CLP;r!ly`V-PjkrJF;;;S_ zsq*G^Xq+ZqAw5ciDi1hx7>N99vg?4E|(nPsFi2q$-QqESejjtL`0E=pECD-^ZO~^}U=1ky#v_@A$ z`|)B}m0f>}ps#v0GcV-G#=55OK9GTZ5@AVeF8mOOf)jrBTN4w>k&H#GC7ll3lM;0* z8!<_-YCYB?g{e9R#3wGAA#`|!M4aISESRdTxAn)p4jKR2q$=KU(21~*61Eb%+6r_J z)bi&?BU;Xptit#kFd~3+n#{AvJLR1W*HeAf!q}qty9$}D@6<6O%5B->C-T!T0!#Eb zYK(9W-!_`foR=G=vB{Lzy1{Q^b<01Vxvu8sqsX|Vps!jg#-``R4iQ)An0zF$aV+k_ zveX+YDf(h9FlO_m7t7kRsjUbfndbHMhs#&G$3nz*?is4XW#uw@AB0Jv>ynd;zuCQJpb{yhs8C0mH z2Dzk1r3+CUbUur}1d4+Gj{tHw+GX<~iVh5OcjCj=Ac=W!6z)MZ^?rNjQ)vYctO7rt z|3C*Or`KG7FDnD=0_gm`JZ4IEfxpx0VKs%|$L-c|g3n1(5Xri;u?6As zp3+S7!F89d`y2<$Puj%qLUsX^lw?>-xpXQqn!YlUm-DTC#G(JB_jSc`50X-wT`Q*A zRg~9DPIgj#)DkJ2=iqQ`+VoE$(y_JCzkR8csubWI>Gwni1cRR`z70joBup7%){qs^ znB=Pee^k9?TU!kmtqT+@?(R+~5GYV2xVt21Dei79g16#LUGsP?ojB- zd#-cs{hWW04=ZcUIp!GSrWp&z-jQ-ER4RJi12(!*Zy|165!QKU!ok?kpW^7J4p zlnELPV?B(2YsU4-!V~Wz7i!OwYv%qXwCaeUucPn@@6w`zj`@vHM%V_?CAzq-pqV0* z9Kfbv8)e1N6|l)ZQyj`$8^;!zfOZX;HU*?pV40Ga#E~K^1*Am?cQ6E&BRkeP@!4SC6lPiQ9a{hL{_#)GIF1GRZl$I;W4ny6BEeikV{(&(Bxl64%!3 zlW`WY)Kh4&_oo764kJj3oa3{SR$Ql1tP-VK@Gp%fQ5w;!kINgpJZEw;_l|qR(jC>$ zs#om78v4;;SZy#_F;S6QG=YoUzMo=wtf0@|FX2~Bb<0~wFtm^2<@Y;KD&unml%`fr zeQPTSY9!F>XY)0^xh51!@;=u)#=Bgy^nK8CcSUZ}4D3J8>jv0MhIE(5#P0jV?B931 zvOw*~(uW@JQj2ozQi^}>Ubz(}dTH}vS=DBbhw@ktntJk+X zcI6QUR$3gi0Z4|RS1av961B%jo((|O+=%JC;jm&UW*3`ZjY(}5%x@ZO~ltClUxltQTa`=F66ebQ>8TBYYuyP}}mei=Ep zhPC9Og|dcKD1E1sX{hVa8DSHZq>K6Jg={%6j_K+F6p1cE?6Wyvl!QSQ$uiX{3w8QZ zETFH)A~(@mB-!GiCb+T)(&N`7IWu+uA`aHeteY)XUm&7kuPCBRWDqVPF+fL{Yf0+G z2ymHolXZ&8Mu*G>6u1<>h!gYL`W2NyC+f?W8mk$07%F%C6D_qZtQdw2e zogTjva^cHu3W>GI{39LjI;So7z|hN_yChp zRZ4ho<%!+xIAB=VSAdV&8<&;Z!Favir(NG5eFkmbH^Ow)e2FtiDSz%CB&OMq{{MhF`{oi(C0_tiPJ+ILQ&K$r3N><=^*PAtm*^V zKe!Rg<!pHyQ=>W*1 zK5)S{<5_kin1*5Q3pF;#pO)Z(~ zsBhi}2WaU$&)s6wK9RkvwJy|>x2S$E`e7rtfqj=sKDT>hI2;k%Ve0p>InGA^&*$~r zhn2Vlk-`8tIy9cmO{|-x&FGLk)!3PVhgJscT#R7d^|oWxYE-SxWWQo^U!f#CF-@tQ zY)pRP4D^bjFbAI}j7&S#YiO8pdyoc*ewx-dvMnunoM27%U+xt8P#kM#oXnfQ$yIKb zaOh_;oB!UQik`3qgBFAvV>_V+^5X%O-_e+wmh2ok=haTLeDWOF%tREqk)pWabtBZ1L%AJilSx8DkT7j zAOGu339nSbUzt(GP_By4oa0FVQ5lm~lALPFAxE9XCPQzD%SN@nW`(qxk0qW_l=D{L z+4H7eq6Ixaqa>h2;=#LPn!}-kZ{=}%&nri}%_SO9Nhy+t*{Pj&L|?Rtcw_rpVuy{> zRGLx&un}aow4+p%)wlPIu{#$ZW!3x9ISo^MEXLuHK6Bea5z^o9m#?02Tyu1EpTWVL zWzY+YUT{7fm`bUQEz#8yR>6_WiBmUMLtW4raq#00(FfK%2Rr7Sl)no~$S_&$wAC^r z0h+^_#-#5=Oz!~s-f6T1RRJ1^*K*ByW-fWp>dXRrM=T&0SH#r)GxuBg2b~Zk)ZVEy z?YHou|y+1&%S$BXRs9HT6a;F9;@ zQxtivRB;y@v}3c=}lQ=#Nl}tolNx0<$Tn z1M{BQ_dwoPN7;1mW1|HAYrBb(<_TqOwqGW%?$Uds;ulltyR_5y^doi{VzGBEcKSHD zce>^mtz?-6dzbUHyr?26{Q2J=raAT|AH2&Vz|YS;7t3G@gmI3n|F~JS<^RVz*W(;H zvc9);RSlq6?9e{pn0PCkMdGB4KJ-#Mm#6rWjoO%rF(sMP(a4GDWtNsMC!|aE zab-UYVaf(wnb9SP=9EuAC4~fYD!Pzhbmu4#@btx^Tn>~r+HN~R0!=oBde|Y@OK4Qc zF7$3ymg*0(R3YMsl@b+f>V19%-UM;o^mPdQ^~^E-zpU^knIf=|O8XJzi3&Iq+;JEg z$zT*2Gy|-je9jG`u?N75>QFq9OQ%2MI-L1KwYWr*Ffa*BGc=3Ev{&Y)ml5V*SJ(J` zW~2EV@mS$UAnd`81#IxnuT0QnH}Y5Eft6w*4u_JonrxCZPy889&1lI*SfN3TkFMjJ zg_2FSXlsjp2wn-(QHI4qQF;`ZB-ATOmA%-2=6Ijz)9 zohGeCtf))$oD>{aPU6jNXL(DQ)T5_kLzi?>IESw!k{WA4%=WSu-bhVm=`T#zdEeDk zp?YUm{M1_Qu(FAaWgOH)PdkJ@b?^8*!J!s8H{v6m@#Kq?g@lN!H%aByQ71_^m0nE9 z*5?eO)#zoJ7h=W3ew;`EzES(n(Va%fsYRNv3icjM2*77S1`DQM(mD8VmPVmpu z(t5yZWpJI~hx+8?qYZpYAMOFmcRZtU+TTpDwANJRj(Lv#zU%coQay}bFM}G*b|0w! z*oijUKw{2y6S%GQ{{LTEDpH1TglUk#KmH=8ABiHAHgd0{f_eVvJB$$djBy~98iCMD zjjXxnX#u4+{ze?7cMzV>V@_4K-f-oElNh`q!*v_`XaAn2_a2@H&_d2rkJS4SQho-< z!BkgQgNM3y1J0sgDX4gcWAGTFqZ3C{fOT9gNIK6?OkL=~El}D!;^a*0EDL{+uzjAU zDg25@>Q2mG=BeOw4;x4^fVwF6HUYTTPlEW>07xF9Gz)fCDAW=)I|tqt4k}Wbvbo z7(RkBK3yX9ISOCK(`?u}_@-dnsgFXISAAQ$yHbFxZch zP+`3#kvb;=S$)Lp0a(+xVjnda!m2~O?U=1ED^SKmT{n-8{}iC`HB9sQTxa(`iydHA zy&vf60i)M%sNouZnR&*!0Sk?W^JhBMNC|J!NLyHdw_`x1$`abnnP70_ z@9pf_*%zgltjk%eyWHi!T)B2Z&qj=`+*`1P@?3ADEg112xI8zi(Jz(%>HacBdnfdA z_TG2e-u@;p{^a=LKkD_zv8g1Od?33im^m}EB;8K_n%|r_u9jjV1vF5#T{`<}*aOk4 z6;t9Ftdu}3E$r~|@bILHVh@D&zs4lh$dTd;t#L5&7_Y0sGh8ZV>^6Tdex!=; zl^`qW(RkL2e%?Ur7&pn-_Vc~pNY~l8UqU%ek+v+pusQ09E&DUp@7foIyy1s#QpvIdQCTV3&HOi}mNI*lxU3~nRh?ehw=EHA6!|Sh943@iWY5qEMp^punVv?af^QdvwlcD= zCe>CyJMmqe3Eo}2K__r>jEO`1I13u~clyxj=SlGvgJWx0!l6v_jfp+a3gqOsZS(uo z8(#|CQ1&}*6fTlJr3!3E600S3?T{$>BwBRJl>^1maWhy1K0uG`V{2B~4$G?dOihTlD*{K~!ad zBHxw&@ysiO2EUly7IWK2J|nU3kI`981B>+iwFmBbLi3bODZk!S79=hI=mQIR8E>*b zF>mkD9McRu6^$d@YRsD{@Sw4udeVLQ829(`ydD zFVy+I3|X!IC&_S7)-A6 z$>`Hsz>9%R$%7rJlpwYJ#}wT7;uMH;NHlZ(@~05CLS*Lh+1=ge^XJb;UE4d!glJ%w zaY1QMBohe6vB(5&@a5d}G(H1GQpfBoBEv(yu8>irl5DyW&Jy7a5$vI}_z@gI+o^=~ zaqq0Swh?lN(dM4weNiznxaa!TtO?@;nqGl)DY*8?@c zxkgjHE0=ne)pKlTLbscCwdGf{9POj56o~&_@UsnwAAT&)_b3Pd=U5)Fc9m=b?``l$ zOV6}?uN}7}PX`tr)8U=F5_jHK&6PDfp85AT^(im>8jv@Nn(hrZHqE*;p@N0}P0{y2 z#>Pk={VFSt%b{4Mpwg+t6m?tn(zD0Hz$1>z=^wsbx7#>my6`@ONF{1o)*bgWl~7wa za~>893n>NeOCAZG?+CeG3H|#^4pAxt&&zjJ(8$%u=gXv=oKp~Spj{Gc`Yhe84hz1X zd?eDK7;ZTV=C&I1A?YX9pgve5+a$4#F}h-%<-N>!O@cD@Tif}Z1oiRv9i;Qc_fsX& zV%Jp2fFZ%~()mrgBMZQnUS$tr@A}|DO7~PLje@Lcotm~I%?@%G+zxe%gp}MkhI`YikuZ z%>inS*0Th^g5>)zT(@z!6#f>`XyuGBj{a=z(;&{uROqDfVi{DUsyarj`7_HgCXg#& zBV8wvmqMa#h*HxZ+0ouK2w6rite2wEGIN)?T1H#-VEX=r(m>UIWBXlkyN#FEc6fwK z5-auhKQ1Y5W*M&oZ$g_~GV5<=AV;YSQ7$}vi0Ty=Oqe4!fp!hs-!Uf+CnsF2z|-%< zeMr9fTXq|6k`|Y7m_6&rN~8v#k?*9HsmZKQ@hLcGIP#eS5>dej>_*^~w93JaECXC8?3)zItkW#~^>LIW*#s8E)IN4@d zOzv(^&mjKf=LgT7=*jlu-jQzdBiQg`p*X7g3+%s+rT||rtTgWsGo@d%_tKAmLCBuJ zQJkh#5Nxl{^2nA@;@3?e2e3qRotIEUB;|ZZ1-Pg9$dCe$#aNT8_*F1G+}!fB?%2;< zyvQ z`AkiOma5~h1(7LRe4ACbyIr_UC$PV8 zjL?mq4y6a#CK(7i5B>C>o5}+^($=P#B&B% zTU)!kCmZNw1wHC(U-?2$Z-j-H7!*gK4Jj_l0k4K;&qj8PoJI*X1u?SHRc8k?b~ROr z>Qz4(Q}Hys%=DdG-N{~cCXEPiAdiV>9o?4#_jg=`fFsx>7nhpalo~_8hBQ24 zJM~tb`4*C-=65yjN4ZE-4qb=qcKq6KAq8F3MMoW9y^6@w?u$#_8kjhjz{LRNKGM6K zJwtWkD%U%O+xx%c2(6)ioXU$>7R)HLlp+geb+bCJ;z|d8%HtMSDK*;7mQc~{!VtJ+ zk-zTJ{^uS9`+QlG|L>9YL3g&mmldZ}?OJ*ceo-Wfftr-}fPV<3KUF0uYx0E(iupzx z)%ht*`z|av(WGKcIi|aNdhW)7->T-YuzY`i13yT@n9Y%Jks7PLcRy)H(T z5yeq_kz(V@G+g2M$*S2QCW_&ocYtC+=^>f4$oHDRWgA=zfd-=P!0tu2bNz(A>6^mh zsD?co7O}X1-poz+?%kPE#e*UsYxv5Ms5VNXYQJSpupjlgdbS7t(zj1|_E`O6Z!uw; z#3W@qU+un=#aYnOZPi|*?0-q%$l92Vg{QllQHXoJJ_Wh#N)7iiG zHeQOR8n__-*jj#ufjS>8$$%yex$mYwTpU$oeiRQ#KZcReBx6t=rUG%aan)sR2`zPq zLoy<`Y_!}OqE<}INtlRt^!Pq`Kb0oxXcfqpe8WoDwS5>rygF~T7Jy||Ghp2`NI2uGM9miIZ(Y6W$*%D$E+_?=8&)XKdaDFbZ@ zN2_{ZH?z^Qa8h0gy<)2B+r!OavY+P>Ox$rYCnv|8d%k^B>MF{fANY(>(J|<&mgau2 zboIN0cRiV*yfo*_QIhoE+#fbc_p(_t1NU9*7!*#6>Lmd^;NvC{VWX@qf(&%+3wC=F z@{O;Xy?*)GjDam99n^w2ySHIrs>6uc6*m0hbd@ zANRTs7B4Gv0gTTW#y6|*T5{OnAVYl(oVLeSUxUu?2U+g^Ayi-Ue-7&&dpvtQqR~I* ztjcv0VfvAe6hLik4LhLrL*9Y_xS==YDenho&+IdXiX&V4^3A}kKF?=_c=iwC;)K9d z>Bnw($AZw#`ohMU4BKA3O@sH?=~M%*Hg9+BUFmp&SUe8Tv3UbPCiipve>Q~F7!>zy~h^X z@=`5I&?eWncp`$sjxl!dhH8KDQ%mEEh^A+ds3-;z^I-|-po_k-4%7*uH_vClw@pI( zF>f4j1i`ST!Hcm+Oe(||e*Q-le|-e*puze6b{HKIFDaN9(Tj%{9}`WaZ$ET|u!SgB z{KA`Ixo@IZl5d3Ap%Q3P3`E_r&l-}uZdy_~L)8~}a{%&r{#8$8Gz*L#`U4S8l1|d6E-$|DiPvVwK04XDh zdPPO%ieA$>`a+;ArRx^Nj%~^qo?d{xIOSH}LF|Nu0{4+v6iR(^e z`gEhH-^g!4SAAg9RR8&J|JYP^J$r_GmC-C0+2<85LRUy?zY=AzJ!X9)Yg=)k75BgS zOY$tAOVbbV62Z^!buXAiQXCRn_Nu4+(wnn=m9l3kWAu?9g|-}i+=z|Ec5yoiszQ$h zdQNj&A;p8SXzCMI_F|w~!JSl^cjH`8P5-F@rccW!e?#8%(MMjHM;H^vtKSk`5E)!3 zBqbWSbiymir6ockEFSr8VolDD_VuzqIveNb^Dz7*eK+P*cO)!h|GGv()g~w7QPlb8 z4|3a_rGMY~t=hyu=lLCJW1;JO-3M^L4vhGz@V6&G{_Y!Az?7$*VaX|D)|k+)7*&DHjSplz(`0}Opcb`0kxmpLaaH4BBsE`fjQF z-zYYTtjw=31=7i20O^#I5c>KW!{Vx$d8`+_r-Vt;x{hcdleRU2fSniEZ>rkRG{}|T z4i1J#(f2}>E@vgTMCUBdFyT$4q7_g8=(alY?xS19y<)I|Z~KIF+SbW^=<37KF;@$uxr-{~2TMgjt0cn`zpFWTDw zuJ5Y`eA_-`5rb)vYa1psx=(mgdsDioRQ!s}0KqV4`m`swtDC=3>+6<1eu3{s_Y!nv zrANm$j44xCSh$&nd;8&JPYRZd02%ce6Qe1uQ*=wK$7#mw(E31$3P#`isQ$Kc<40^6 zqQ@~l6XF=M{Hlzt6fcnm8&5J+UnYg+{Rx+~id((qPnY6kvRQXl&;?>$=!af!wKCvY zzEf0L6b-uxFSjpIaBRM=&>QKprOm)h#tE2s=Wv7n-w+Q=3VatlCKJK7gBg}U!Su3C zgT7|ix$vF}mYD%MCaG0TQ7$q9h5&c5^#Bpo&*L6Ld^EIk3F`z|%@H09o<$~ylp*{q zIl3Xr2=QKlV^8DJ)VKo}=hlVS?spx*K#J7?`tkgmq(0nXnpHGl$x(_XS-_UkFZ7Af zTD88ngGTN$;&{olc4~6;2WHfLc@3qKFa62Y=n9H`GOKyZL<;(7_hu}du2G6d3^~T) zDvN>%P}7uL9V7E#^rhbwEvzgKtywH;1yw;!02JLF4TmKYMzPP7JVtZPUgsM>TI4WU zj^J~&$dTRo}@Dt4`p|@+Ltf&q_aZOhJ zpNXLSxr~a8Yan}@F{QtWwsT55qUno7Mxm-t$3u)=<5u;kw-7bDtmW(Y0r05**vn`` z*b(6c+Gu*Iz=0 zz^UHl5hs{?z)PYVbM80lU3fdNRGat#(yjrp)}sZe#P%5?I=3*=tv>|*F-6+d|DO}5 zGe8`r)cwc+x9%sy!cTPo$%@aq{SX=OKv#U|3w)fH|0Q>q#wR2~0J6`HRoFIkz`=d$>fd zbyYIFy<`YzQ(pRaNjh_(U)R$0@ zbo;)8`bid`oDnH~I6hbPpU;;oA-n?2FV=GT5CgH_hzO|Dp zctqSWxFquLloXoRVJ2{Pr1Fi)+-LkrgM%)=*ZD#YL#vc`_oU*2yh*N|LSit-mW)Mv zOJj>wfk%LF_Dom*s-0p^B(_LcC+Dm!j-6#juCTbNhp|wW66p?5-)WblAJjxG!JKB+ zXy#-83`W+U@C5TYv?n^6HQ*%{GeMZtqG|!z+7mD-cC{_sw=__#jMXkAv&E^m-SIUQKS$&dJgLE6t zKSM)9udlBKq*+0f1+-$2yK2%H1DLv@R|K-}d~rciMiiP@MPeg%Z!$DdI=OSwYJGLJ z^T!WyLBU#Fowp{|u4v7acI#n;m*mOd?52oA`oW{}@Fz}t49M*J))z@AZ{e6xqH3V= zWsL1D|Ms(yeDrq|h;xItQs(Vvn=-Z#u8Y|}tn?7oC_;N1FkV+v)Be8hf{s(AkXp_0 z4GzdMPn}3TCr4Uzk73_jBy?M}3A=87c!Jy$@L1Tv-;R3U6<7Sf*t{j&HRwCt;9Y(x zJEi*NC#mQbOm6*A0mT2lwI=T5*mt_){|i$dj?wDVT&5g5qk{P}>{e7{!*#>MHr{|$ zfg58DNy?EEkVCkAMbGyBC6~NR8JM~{)e=?d8(y6*EL37P)|&!`IS0IEnnJKkyM@!G z#KZulmEraQ3=z2ck7i-d*C_;S9~CrtWK(DHEgzd5~9yCX$?7}EiEoP$joi>T%v z67*R;$X_1Ez3O6B!gQS%E?70lf{^h;(SmqLLe&rOG)qv8}EiRBO8yyY@KoEp;)lijLjRiX$r#R;3LRXlG) zBU+@0qmc!B1Ddon5J~{-YsFEcCg~vbEXF;~ViF5##S!k~xz$S)7d)-T$K?CR+uzjaXph;CJw4{8b}4CujEe4Isp z;m#Lqch2l5O&0@_oGOAXh$R7=+bTi1wzVmdu*4Oc5kN4#)8jdbP91Smuu-L1UZ<%K zb(I3usDzlAQXb=Hu0`XCyk>hvg3b<9BCpa(GNfrvU{Q4z$aK+zG>fR_OKDPpGe>B} zLK}v`A$uVNV+os~Y-aVsIBC&Y@Ka_&wREH|oi94z zuf$R8qhnvc_`CZ2lO+Zp@$8Y`r>CDEujO!*y15-uK4kY>01jb>;wT*D6*m%hv#8RF zw0phYzf@1pX$5Il#N9+ZO1Ip>u&I%VShK9orlyza9Ni5cHPMt70$z!GsHeah@{;7c z*#Q;r_ytwYnYy^vnEez2QNLw6se$}G+0ZbIvhes3{tp{=dZjzl510XnDKO9|i$!D_ zrI9466=pavkl1d-Dn|e4~1Oym$5=Jw}>)nrQ+`c?d1L1 zgT^3lG6SiblFImXC9)JmxX(_NK^QkY#Z@~Q*kpxFwU~H{xgAdi+FBa5K{W^N|=?z0W|y=JaetH>`OAUAy^NY5xa`h3@|!f zVIq8@#7W?QZogKCRvpDzsS|)_QikCc01Qp;)(BfBPOYCEA4_Xw>)ZxuoNuBZcx#hr zpQ2Ck;~r`>2K3L&`M&eeg*MjN%`w%ZEAgk@oiT<0OEV0_0wz$VP{U%S7Q8h@e z@OwYN;ghGosqrn!-)(OLjU}UOmgZmHdE13`$35ltB4O6n`ztFezp2uGgrG7bjq2j9 zE;K7xdx{y2!_@ipFcxN@g}}z@gmYEo&S7!>ALlrn&QrnVTe(h z)EoubeGvLYop-`oF}HS8g?8p;?ajLPXJu_|dHE?Ncgo4&AEoWXubog#VZ(w=mF~hX z4QkDvmXvR8M>mV@Ce0{jelR1XHP*eWH*=oqTg8EzIY-!Q>-< z!?3G`T@!tfT8A7|u>XT>M=S8>E{KfZoV3hM zQjd9lB+n&cnOoIa&MY^WbE|C0$;d29afB(X1kNj6pDv#xS9Ig4j3Z#d$~fhSkf_80 zHKX4PenI>oEcbEOM7m`av2DAXEw!)J$QA*g`9te6X6#g^ehRfVpJKdpsEi!JKbwzc zP3BfeJOWgaSSrUIi6(Wf52M#*SA80VWt2h$heYgA{(p2&zm+@54VDt|t0;Z?&30q^ zGqF}{Y1YiPq?l8sIq6hBf-1!UBlN-1SmmKk8{~aW zFg7MA)@A)I)$^;%)@i=@x?g9QEBTK9x6wyg3@(u-3L3WDU)&C>Pmf|rc^ps%mGqy4 z`=(y89kx_6@01jYw{U_t{_L9w<`vsp3RpPEgV6y-aJ7yrj}Hyv=plMXoq|3Ff!#g>?K%QojZwXj1>yq zCyi7nX>9w@lA!s?hxf|9~dBL1iK-rnl)73YZ_Fs-ge}=^1k42pdeB$L&zyR{Vr0!eA)-o||etBBew!ebQg-#aRnan7>6mlU*+r>Kvb;D%5Jm2Gx z9X};FnlwC{K3BS-FqA5iDIy|kU&A_q$N@-uE4Zncpb|7C(m~a?8Vt6c!gS z1s4y)HHrO8l zayudcL2n`q>dtwEQ>WN7$Ck2>>wTD zrkxj~!Atg?zHCg+=T`15x zDbNZAW5Z+*HFAR3Rvaq)?>iTnqnztp%Fx2`6;`-+4jZE+DD9%_S;mgM(zAC=-wqU( z(Kz}z2snDxaeEgv!H}GOc-^fo;O(+<4u@us<++Vv!|V{KyD^-?o&0lcTTf&smGC~=MjF% ze|O(~elSLwk*cp^VOWujZ{m? z(tg9W`^OdNUmJc$xiGa{sS$y_iwhU-M6aMJ1V(!<;}p&vr} z6?!Xw@u;*{V#j@Kf&7ld^EL`S@e;%fmCSw~NS+@1>!-roz#QvP`e=5MkIg^Ag3u>* z)1_X67exo?`(lxCmo7VL($Hw`ar+bBW})qd0wp-cRa)>|zYuGud-JU_VTC_$Eg+9H zY!-YWQ&wB;9Bjt>^>%??HMi+nJk{62T(L<2eV7cGVM?~+axFMtv}n?6zE_(AqSh55OLX;SYk4PVej z=JN19XbpV{G{U1qGy zv)glRyG3WqGvT&cyR8|o#E5FGAr-k`@AEpLaEO-!Wxfyciaakoy34=mUE$@RcE$EC zp(B`|OGZGQ3i)K(H&+p_3>%eW zk%aqjjO}4iBOk3bhdNo1tntnM5@}A-`)wGDqjCSYIno!?9TIoDG zwvz8Hpd+x$2dx;D@GAQw5CkJr=(`|~=^WzXsvnFS$VJyBUoFdT?pv<=`s*DJo?;!= z@GOFciP$@jqD4t7*`e~1gVfxZM!v@tuih=Q++VX~KrG|`86@RXLV8pCb^QBcLu zk)Q)rh>yV3h+chLtRd%+#ycvsT(KnNzu7&AKbQ%@D;z}iaghTxrnXdW+wV+BBhvLg zAB_0Xu_HzH0itB-`umlud6QPZv<5=ADP-tM&n@@(iVoIOtV(omRC>KS#$12VVJMjwKZ()JZ3xvKSxsKqQb^5G6)D@N-mW@7(@0Qm^PYf>b zw{L05*~IYYP}##U)$G6T--kNBaUthCN7eEisuHa)9TVvJlP6aXF@3<)A1D0EOe0dD z81AD5|0LYAyXJeZdlrM=P@Vc;OB{Vx+k*RCo0^(X)#)2?3)#`Y`ux-ahve#xtfa%# z2PyZsadB~KU{X5Uyl=(T$uC3~kW4pk|2S*Cd2I<2@nNu{Xll@N693aa909e*s*%(T z_x31?HvO4DaOMCtW&XdTQRVbubX=n!d_#5s@x%Lw;OJwxrFaf3o}wlyCpxG2fBp}T zXj}nLqc+_HDlZaz+RCL?k)_?F6Ht?=Y2R9LjKSHcK=xblfKMwbRhoQzxM~|UX(j+6 zwOtEQF7R@H|4e_;PEqpj-2neDR-#iK@GG%j#s6p$#sSh|-4_1-K3^TFbj&%!&$P0#vM%xF86W=k z+Q(tKOhp}3L#=DR#3)=7opfD@n<`Wgz$_Pz@Q9Q0R0fX)FMg&}S~1D>Qe~}(6h68X z3eMF24&@8-X7J-%&XYUk8}m@J2UXBx48I zvK}noZTXwWH|#`(ZF%#N$f7OuUC80=k7CziSh6T38Y}_$~ zC~+kFBfoL0tqdYTFN2%d=}NS)VFXr0aYjs@#O&n>y4qF*fNbMeea+INO zDlb~2_scGI+ct0@95gKeo%3nl)4BZ^Y)agr9Xap9^DthjH!-@Rua7wI^mA!_T?{Ub zezh5L0XA@9o;I~M!ayv5inp1+EcW*AaTc%mf})4FcZZ&

SfObPV=l1QmytU-pJ zFJ~D~pgL|gUqHc1v0eLpWqEQu1LuRvZ+GRxVi}$lL$1N1sZR(6X_HB|Qspe68&FRT z+1r$7(cIh|W0oK6GW)C|9-AMVlUNI}}#-JlziR$e{{}Nw`gg4l zcRtW6RhS)hyzUeIgI1?}HE1vc1dVR%+l5?NR-1MG)@_=Y&6=@NA_gBf5W~l;J1yWw z9qS+W!P&>biM1{|n6ow;ZO?34&5yOUwU24UnE^h-$3GWp1bA+3!G;?XFI^Mv_Aeig zkC!ptmaZ~k93qK(TWn4GD~*4(=-OUe6CFC+y9lo0M5Yr?S9(tBXqw!-h*``~XMy0r zbPn~dR0{73-&u>!MUzfZVROnAoP>ZO`#tz27_n@~6yfP;h+l0fK|#3LV*)%Gg0hX7 zIN7$klcq(SOKR`_rjbY+hkRo~C-(iZ&zK>Chxny|Vk-#;v29bBS~kw-1V!pdu#8s0 zghB!>ovaz{V+S6~kso_79z|@wBiRQ`1)N{moM;GD47fYBW@jC;bF+RWg8sCTGT3BhWiftC0_2)!C|C4#GW)-^n0yfyPymVXgk)A?f zEondRJI$rp9>(WdE~N#8=+?&WR+Z$f3l3(rbg>AVF-`KR#rRebb$3&p9!fonX>0Mj zXuZ@Qb5p^;+OYfSV||J#YgUFD-lJ=he~_LsG4=pIkYqtq>L+q;f{kpW%7-{LlL^W( zjGADOCM{p(7y79ag_FIu%XY4pHZ@JFL6)!uaVRe1yw+tRJm)rZ+ZPhcTG$>qTIBgx zn^2Io`xqo5n%FbZmYA{@Lkog0{VUB4CSdli(CD;H=}--u4$Lt62&GszZ~hgSs=GP^ z-fyD3N&6!1HvUu5&_C4FIeB@;Mn=mN@=4JNwy&ON=u4T~pSznV1%qv;$`&sFG44MO zbHsZF-F}e2o=bv-soI`@*0Jj5%~WRw$No+MiCda=vt*v%#@L7%sLI6it*G#XdIZ8g zv6UtTiGO2n$#5Hlye;jXKmr@DfsW3E$BSoH(zpevyAQ14Ss57A+bu$Gx5Ozbg zDmv~S?j<@6<4n)>K@w}tF$aIhRzg&9^i&c9{cED_D@NKO_4SXAKp<7^!h&9E$Z@`R zn80zNvfI74B_j%6AX4EB5vjhlXWe%HS%y6suMx+*WgsMK>{jjfMwu2tD{hoTwLg=2F{Prr3QsOGt=mGRwoN;#nzUMS`D;A zStBTQsv7-(LUr3%@SngHLeg()TV3r?4lqnKngT1PX}o97 zA=@;C?uDAAb&4V2Cbl{n@xz0&Gf`5~^*Kfg0TtN}bK?T3egZQXNiCO~O1mQkEs4T} z$V_%tZKMWYQ7!G^B4|RxY4fE`apri4XeIFa`Wj9%^9hyrE_xjNf2ew^fViSATbJM# z2vA6HcefBUxF$&9?(SMR1b27WqHuSYKp;SH_u%dhr~bZuyU(eYdf5AQ?ltFJV|=6H z(+}yp?o}L64ip|85Q%Ed4VAq0md^Ug%>m!!)`DJx;P4fpR|lm?-+z=%cYrs#y012& zU@#i8@}!vos&cSOJC5QCG(FqoE;sWu>cTA zd2&@SthxPsF@TG?J%D3po}VQ_o%y}apnwQ{6dsS;)u@;KWdOxJJRPR=gi`et6A6e4 z;o~)}$#OA<(fnA_H)A`%Zc8TppwBts%qYp;AIKisMa-i?)dUG9HkOW$jw^D&NR>9W z5{~^#QQiPrl?enyFj~ z#w?UY!$ctWIjT0yT|cHBcsd!ZF_7ruthmB1hjwqaJ*EF` zFo-jdJPVQbWhl;l`RY24qBR6sOXWqNK21I`sMz@I-@=HJmS zZ>^YSto9|2>=V?>yg&y@AAW^*pcEOwVf>2+OpMx(O2Fr_Gu34&V@xRK*|qY0BVM(t zyFAeE4MLeMj6T%4a)%%9;dvxIdkyq_iSNWD3Cu>{eMB1<8$(jNJO7^4Un9G)LVfN{ zcIYKy&TtzR2c;>Y-U7CtRVH+gsj{=Pb33k+yS^5;%aK*96mO(tDV1yrw|;0ndwRGz zq2Gd3=GJ4t%mSPLUF167LW7s)Z3HE6XQMZTp9=STeGuEh( zef>q|h;UgAQ5p(VMlm_%bNn%jGTj;g^qxNybRC+#M9KBme!o6@%OwT&K+l0Yy85fN z^)-QXIV_*gn!b;jf|E7XlWfx_>fQpfB(p`6xysAxQQY&*vf-S)T&w^1c1eulZpBNj zF3N+anz=HcvY#3u;#mOTYzRduChPWxQWf+Zl9pY9y_p?2L~^?`ZYyka9;y!I4B^~* zoLC{GEpg#k8pp3sFnWO~VHI~Q)kNi0p9sSDZwX{C33oJ!ZV=(4O-{Sv`JM8Y*=YDp z)n|~6fd62{O3XQdmj(SA=<-HN)cItwx%zvnhzMqyu+kd<?Vt2aywO&OAQ}!?-<$3=dI%$^Yn}x0L;;d!bARl3%@*9tp{eQj zcXyRX!!IUSiiv^u;^bfO7-q>WsRJ+a5r{l*Z2kW3b+_hg#N=R8BWEWwJ0W_vEc1Ux z;6Is8DwL2Je&+MF)Sp^k9#jq{y_a<1x!N>fU)Lw7nv_<^<1cIp(V=hev-`Z*xq_-D zFvk|NE&4>8Xkmn%>sCA*9^LE#FD%{^rS3Cz4&)VjfdABV;8pui@BK|k7k&o2a|ld% zaLASNqe$ce_V@FrJ-ql)-~&RzbeOu$Pw=|r%vg6{7%UX8yNg-d+}zbr+u`pB@^W`S zWFO^6@zMJxwA%*-u@6I0W7xN<{Xl^bFVqBIGVc0Gn!mZt=X&F%q<4}UKv$_d7GchM z#qgW_sFUOWh4a?$f_qhW{e{QO%RgtRi!*jApy?43FK#$v!PD zEq7aA^7hZp)?@zG1mxm}KZ;P}%>Ehg&5s8=%$T5Fuyi}_`bY9U z3^I$52`f2<#P>FxaNOcW^qf9awo;&64v7KrP6Mtt6}8QD_tuC!?^D2bqMgN3X0$w% z$%94Np^pawap9hNn_i#g`yx*?K;*HPv>AxQuF3E>dWZ1rAx^|Qw}_&Q7c5O5VE6_u zuIogQu&8E|knwvzwMWItdlRF!u%ArB$-5TOM}&C*lp||j`U!A=zp#RM0iM6fXLXDI z<~pGS|Da|hD0d0H66D>cXSM!|t-Hi|NIY~~z6sy>NuV$Y09AD65!>Gn;>ao@y{zY(h^XU+3faMi1%zM4&2g86iT-2{od;vn$tt43t^@<*?l z=qX^hvY1!HO->DC+zi{UU?`^4{B3n*@2?mtGYfK-0-)?ff$kQtC0U=Am@q( zGg35`gCo6mC=6~gKu5Cw`vsTNAXOusq5ys4xRsW;#@+I17@1`rhXNo;WB0}k%MU!8 ziyj%@uUA+8sAK1%vI&;LDnJvIHX{i zoyOP(fX(wm<3)udGM7(J1F4*#355=V9ETSoCZv3LqoWY5)6Xzadqek7u3q5AHj#`i zDakL`zglcP*KS%Z9~V#$@rwWhLM}-fmLlNj_U{Zm@=LNoopkqgjJoFD!=Bf75}02v z0NKs$-7Z=Bf0fnVgd@Iv)eZLA`Y3h?Mwc!)_L-GYgFIlL6Pi__)-*yR1_SPqTb5!I z)#7Aq`6DDS?>>y@lYHy4-I$Tu}$;2 zqoc#y&(Ho`T)87+bQTV-h$hqA;6}Ad>$t0-!Nu7bRZ;AL_A*dy;s9R=HqOij`$5)m zgK0U`8*^*idPX|na+YvW)m_FRd5(-=H4GzYEEQ`5Kdu3K0Gai4wi}P?;VSi!95W)^ z=al>yVz^YT%5|QUg-)lC+$%&O%IEc#XfV{i!f3bQQhI8$sH(1r`wQ4G2kkpTp^3}T zMf?KjC@%cu_cEBhzeH2%?PF1MU`4pKBA?Bdcy;KJ|eLH0aK?4(rkJ>sbgQy z@d6cGkdPt}6-de-ABRrYgoH}{lK6y`AkS>}4sSy-6ElOHhbYD?sP0ZSciuo@^nph|~_2z&EDDj!X8O3wbb1mt?cTg3EX_H|^M*y}) z&_i)r?lE2h{$=ULTaL&@2q~~wwSUl_F|6Iw5z9nMiRl#=DHjTHSJM9J`pJU}**inF zwOfghBf_!G$ZCET(*;+O`x{Q{T`%#sR4J_2L8oo<+>?7Me4I1%+NI?XX}2B3D~k)FdVz~r<(*H)a}#AHM#y2V%Bz=w-e1&Cd!Y*5H;=~@&G5`2TJH$ zG22u=F2=TfBJ3sIb(Jef&ZL#K>cXob-D1em)tHA%Ln9$l|93qo`1w`)SH8;;)aA5- zTy1dF%I?yX@H8hLa($5PdoRI%_Bhs?$9h5^D zrKeP#f3?^SeJz0QU5it-=3=t5HE&*&M{FVJo#RN16xV4m<&AdgY!udP8s`J07khJz zXdh9toQmZ8PahN-=hQH4oEHY4P+|D;Jc0D*MncEtipQ=TLR3#%mSA_ z^dhJdMW4%qMwf498XAtXh>lrS*VmSqtjbu~CfUgI+ka~D|9p=9QNAgxtY~K;XeR%D z@Y$QD^}GXQtu}qP3zB*&1e+B80=hZop@G3%K2v19K(pP)n%)2DvgI`1T9`$kXoL@? zd*+hYYC)e5>o9D7s|J-iZ!|>jd6yfO*JW52KB^CxM@B;2xebySwMhe>1}6VWcc=9w z)0du|B^j6Bh)hO8Y9hY-hV&(`$oW2B-L}A&3Q}ymzP>IkwXqzpzAD>gK&~G>7oO@P z=xE4V+#kW1d-u|}^g;Ercnrk87wf7f$m^gt%%w?un zT$*iUb|jz#zd)fVo?<*K(VD=TzB<;4eo+QJ?Dh!((BIVl$#dQ?ELVkC%3aVeMAY|r zGnxt`mXbC0@{~(T_29@vc@fc;JyubYh#f98J344UDpB`PZ-l6UZ5g`>)bDg4pjM=z zHc4ZL6VXV?(K}%*D1fYn&f6qpxS(Aq#&q2Puez!w#+&ULO6E*FKEs{Z+hvU#$>)mZ z<_1FgV40Mm56POQ`d#O#*vOqN>OY6SHq~jUwyR3K=aQAe^d}|I@HH{?uwe65 zt&e-n@QQUv$;@qi=fjq9SYh;0#H3CQO<(=7owxT&IZH(mc>-Z7e@WdwY;D6T&LdD6 zD`ha~dWG{Pk89h(fcX?^4E^}sHl3-|u7r)X$i9f>02C4tX(LwvTU#H3X zsl#ADEkRKh{O}t*x!CX?_E$=7-Ap6X{Yc&Z00v(aL`OIGu#v6ul0JAN!va zSJFdW=)O}T)A+AB5_dF$w|F2%Pm3zXT(8F?Gjkv&fnv%L1c~zbLDh^m_lWZO|EHrq zKC|_-^1z4oinPGr)%)3_+%c85<=wuT*BA0&p8#e3xHGdLJ`4f|n z@iL1{0#1yMUglB>M>RU6&#E+3vNjK; z*j1rG`eLiEl*MY-4KLTF;yr@{;5CpFO$HqtbQ6wPe(WEG3)9xPln9+h)!frT6xOB6 zho6}BiAZ$yqhV(j;`p71-&(v7H%%mTsJ$oOTlQS0F{V(hMuAmjaGO{WX`gsjM5<7T zYj0E|+1|?0dQ}ls&L+mNW6(%%2`(Z#qCJ^PnpTa}QISkM z;-G8HPL<`l{n?kTqoebze6xDF4XM6!AJhCk71i91@mzSe)1qFd!)1iq%@ep-)Ghr@ zXV+nTbbXz)zG)eK{u6n%`w;}H3secj1zhM2pi-h3+Ru!!e?vf1-#U@13swID>PFXV zq_VP$ZyIQZB-O?pYgiccQq{{av(6=$*#?nAtdGkGg>XAiAq_Bs2)rrlQ^0`t#HQQ% z2_5+-l?#B_%irK>cyb>YT_J=iPFLWiEgFMtFF3LH>kgzVX=WxXOUGaEcJ57YV^v?5 za*z$BY?V{!0ub~Jt4N|LV&ni_d7P!@j8~mRkt*f`6su}NE&;?m8$N9H=RfIf1%>O!w zUHRNc(|9pUmHBSqSJ#bCHnq1u)iYymZDKMoGwj=paRlARf3}}BWc13LuhMp#SCzOP z8c<4vs2g_|hPBO0TvvT*E65u3xkz8O>Yb(Not5Pj>1nkMWQf}tU=l3t_W3R9Gmp@9 zS?O~)+2Q?sV)b;!%F1fj_gjxKhJ-VH8734}QBBy-jb@Iv5P>(5j}ZmkHg0`)c791_ zbbV*Vqq(8tt;}`qdGRoi$H$oJ(0%mp8vKpfz_l1_O0*)KmlWT(eA`fGNOGKP6SoP2 zrkH8{z-H_e&Fl28mGB}mF4_RQNDIdG-xAOdIkA!| z^yz6ru^LC76GRR}j7QA}u;6Y9!@^!VTOD^MyBCSS5Ak$;BwjWZPa6pOV>EV;bUO-p z+I|lbAH00d4)-bNn9@DaOlEVM^G#q>Ll2vA`u)A1r3$vn>-RWP)^@k0+ETZiH%;FF zCdaoT>gY7%$t?@F4;sl<-6bHa$(k?^KfH$NHI4c~y=HAUXx`W6rlE&N8qTxIo({YU ze&N1Y6lyBs74pC`XT?laVFO~oeTcD&ZlD)78bv&@>??``D$n*Wy;6-3Qlk~b6({eO zP>X6wl3VJDG{I*6E3cPZ)I9$HCUp(kH`5_wq(O`+c?YIT+wGhR3l4-yL)*|m`Hy+Y zdm@!-4?{`y2LMu8N9qj--C_){OV+i83snR@X%yJkHx;^!rx978Z$|csTHCvSR9&s*==H`Ea165XV~Ulnn;$a(WU5Q>6Xt-Q6)8M7 z?(X*2)`A8GqQ;nxMK;^!USHFWvrZEH{G1RxpqeR7tc<4kTWI~+$TUwMBvSEzLoHv{jrCw# zVYDm`_EQaWkQPOCI^J45X%-&81==0&ow#=ppOtGN|` znS#B)eebLheJK>$%Gtw`_Jl3!6TTzA?EB1>A*ZLOug@XA(Ps0IM0Ye)!s78oX!ghF z!pn4?9SD2-&xMq%LOKxCWsq1o_T^c~_~R$7cowa-lm4fY<^d3Iq)EUxE_j}Q_TYQL zw7$~#2nT+Wv@;bG*}aJ}A*TewLyaM%K$Rw%5H2Q|7;c(XZ`$pCc&kr{0GvzoVVRlr z1Z(1qbE&P&2`BDUK{6^TUBm0bsLgx_Rm*j6~Q!;Z@U8kkvLW`XnSzAEa7`e|!-zu1& zbE2Y{gpvP;cs~Zyl^gEUs#duR`n0G0d#&{oNg7ADf)jkt5KVbGZcaf=!`{$c&v(Jb zyWOyI=W3}am!GE4eT2-lSQ$HbP6QgN^8Ea)?$PAY!=_z?s@Md^)GlWS%u~B#kxJFw zmg~x$E3s-NFyGg)J<-3_lGRmkv%zMaBEZeUjfjK47$QXN=?Ka(k^SMlWA?VOv2kxx zr~8=}tS&wGI%b_z0CB&}XY6I|HC@-X6KvKrFp%EXvZ1xj{mRe@RuwP7O0eU-l?cz% z7isVD$_K&QT1+t(G}ka+fvRt3HJq(`jckf1p<=PB<~Zfwr$@4wBGB8vOI(7Mb>G3P6 zhUerK6Y!zU>*(o9?&mYSA_+0cDOfnD0^IB&X1T_jD|dAWU2#T(v9q9;x~rE^CW$kq zQ7GF}|2F!ec2a|4d{~x`mf4=ee)9d}oD(@?o%#xn-D|&XG zqCbNw8!>y=TXsh;m_aBqJ?6aWP{G`GqFY8KTf2XJq+3_LoWajWf^n#{bU~7NV{2=w z1?n2R&U-gz)A@ljK8%zD0~E*;Ij3Q7a@ff$GJzJ#B%8hc`P-Pt`@;L1$lLJyt^a$= z`;-4mUek5k{*Jui(b&RDhd|n)0obBWR>%#mVdgq23YzqOtgo%;hSt1aJ-HFyDh_rf&+aQscgu@Lf*hCB>{xN z!nYnScx!hJk)9LU6xUi>*SpgLF$bM0*yeY$!zUG~X+Aew6Syn9a?VHhx8?F(qfAfZxNh8-dP^ z%~hrvSC5GN067OI4>=b2xLSi{rmj{ocPE0iM8G5BBD$X2c*E#*;TfoQeIxb+Tgh*L zH^2VymlpFb$w)Ip?YZIxLaCiySk}<5j@#eQV&axF=dC`>lw)sj{WMZUAb?c6ofj1T zxmY61L)6W^oT~!=+t8}gjgp4OSZC5cbet4oQ->TsPRo~&J$)0}(}l1E|0K60xnwy5 z1`yg%*gej#YDK|(Em2p(rA&tu$Z4c;U%T`tF=^A_fAcJCSmY!*j9AcCI$VTwc6Lh0 zkjHCpZy8444e(X%AY)4J!U-^RU{4elH&f06H9^?#&=u!HH<)zm{*ShfDR1#Tp#9^4 zXeT=F?I@YO!bKSL&@BQL)W~W_F?%2wkXxEi4Y*ysY(L71y&!9khD3 zDOVI}Y;L6f6XGiN((gTbIXeMW)2)J_)=H6JuOr_e@cP6c@F?nSn^zM`=tK+`TI+r|KpeeRv!|3%8l~9ESVdWu6&3H_V8ff$omfUZg;oV z>hIq|gG#!@?aX{t)3f(6Y~3^EUKg{gCIeHLN`(z+k5L;OtcKiAf<#!Fd>htuT?QDQ zvrn7#yW!j5Qbzaooe1X483R;9mC<)AZj`le9uJi$vmQKAc~rw8;e3u1j>t<<4>iiB z-9f7%J}?@A&R{xL=Eo$Wd?(_tKqBdTF9u^P7mDRAM*{r){6-s68OC-e&3czjhyqG8 zivnR8XHQ-0+07`mK~n8$f2!kR^;1a#^#@`}KGM2%?(CI)$?n1dHCE#Dp3pEAo-4J~ zpEzNjh+Bvv2BTb{!DUT{Pt{lC)OPmcfr33W4iLsjR2x-x>B(+=n4Wf)23WHG>aQq8 zJEXV4@Dpvb!6}+-F=%XDW^sLFipbf|xGw$1+BULjvI zrM&)0*-mZ4E)rtERnIo=330f4d+Yw#WYN!*d)$`lW77>Er~U3ShI_yDbNG~tjoq<2 z_;;rVz?$K}9N9uqjPsV1?&sc1Wlq`eK)cq{hvnr=9!^!s32FLWHhVw>!jY_%L8EU( z(?6C;GDfHEsfN#=670q`c>ETQ^Ki`-lbt(@k#f;6Cnr>B=ND@1q}f+`UAW14f_UH^ zNg8)A>Zy~f?RC`7wv3-?3SW}xRBc5ag4-JH9+_``hQSrHwKq55Z?47mrleh8yVx}R z)dZvk8f@*z{Ee8j>Jgl*#NDLyqBCY;V&yb&hvxfZHF`ao!5U*`*-e=b|dvIWUw8gwejfV>}AaqG7MeE`pV1tIoO}C zdLMB{^b5HdSjG5xCD%WdHu^pzh2`DfxeK3%vUvr9*K0IDqg2o9!EF4Cst<)d^q0wd zC*I}Lknod=OI3+i|1TB>c7o9COk6%!yj(Bz|7BS0l7VmZz94Kw_#fLnQjL+pmYPSF zng>Ai(a&vu&!ThAO)JbH9)OgXAM@wTBO@MB->+Ms(U@Kr>koMY2Ua-UpMJN@USE-z z4b4J571&kB2aHfd^Q*`EnaCR$T1ju${?PviG9z{*KY-+tb4P1=-u-#_O~H`{_zvf)*QibF5qCH>^;b?1L+TTtMEEIb7S4 zb7ho`18>+$K~2c*koSrSyx($N9hIrH4Fi<7xVMkIOC&wJUfdX;SlfyGF$#Y;v|K7+ zI^e<-J9W(phF)?1>#zMXoE_SKLM_)8L=YEez$%kn2FFQ%dICPVuY&_wAw3_GW=qRa*)v1F{`rlSDCtJrU;mC->qBy5w! z8QTvoe+$6hCdGI{=axkaf>|SN9%+2q-~PSHFZyML@uc)u>jxVhbtlQsQF<(ry%b=7#vg1ovWP;!vP%f&K-)ehe72ERnuQ0QzT9)x18Itf(K){U)O zW3SlgCFJgY741GH*|%2@D9NND4%*6ynKQIBQl5(z{2r9MeYf@+Z~U~7svYM&m_sNr zs#+m}--R;-H|3ElA(ibb9t&;u3xr)AI4whfn(sZs?;VXWg zVL9gad3*V4_Pe8deQC*R7KmXjCpAPmM1*#Lw( zduOMdP%t!@>KI4YfG(p6t+r~|5C^;93cfo{<4{%|XLX;==BY}jK5Y(|rzdoK_-yrT zEqMFXM5N3MLbbmLcT_dF0h^hU`AmUJ*u2!$TXyczZdIMm|D?fptc43w=RB2grg#3&@$INt7^45rCFgP(NYt+M|yV6{y0MB1$qVL;$4uba47~2{vTG zjWs4wM({V^`>_zHqKpWJREzXTw#qRI=wRfKo?QyBr=(B$L5)-aXl4YSueM3H#Xdeh zFO%;tlm5`G?$ZX6C#-t-CznU)$CIdc`9q6xSd4|8k_qr+Qs1QxrfIWlq+|SM^k^m^n@qpmtvw(|Y+hva&Uy52V)PK_2+uFz9Q~#4rth#Z19#wZ?T7Lv5V#bG3o4HGE zf3y&2i)I&Ze;cRf=N>pNKVn)FLeI1}le7xY*G8`D-mr)SI}Ozzig`(t#Xfz+{Bp9d z$#>M13sq4Sx{kGlz(s`RFuA30ohMj>syiY!oN+%UUy*DpF4igp)s`UTQRLj zPc+ulK^pvSR6cGvm)Rtw?y=NT(;xpS^$It4`gkkiQ@M}OAkS9~+SbZyl`gF(<;QE+ zotvd)(P`tJOsdfLTcp=qnDX+E(e9&O3T`TI(v8<|0%ZoiWg{UA`;@+M3HH zo0@r>db`_Bwrrg&H9XIpy}z$`T-tBV!6|*01@O%O0mQD_yK5B1qk>vn&xPZ(4n;NW zRX{a&W2#T>EOlbRqON+1?VXYdE@0HtQ2~!r5w}Y!&&W4l%2;Ta<~kg|-1`+)uB%dQWzd-LjBs|(k;zQ@NEYfUK_Ct)cFNQx}~E@ms|Br%1a z&!iWVKdyLig@UW~8~TBAEv$lP;=gW(g`Q(Wz=e==5a?*87J`~vu98x&TEh5BLd~2{ z-9<-n^fr$og(U}TQu!G*(f?`EN+q|Fk{$QqdMvFb8z%i{fvgU~FInrK+C<&x8P3fD zF|uZH1QV*r3MiarGQd<$9(8j@>hB1nB|8BOY?}P;)GE9E~2F z4dviViLsk{dX57jU2qnf_UC+5*WdnuJO9kWm=_PuU-Fv%2+15zDcl2OdsP}ebketr zS6uif6Y;bknjD9p{}T5(`_Vg8JgX#7&R=MZmFB}PjCrZoKgr-37`!(!DfFt`NF!l| zpTJ*|{bkiy8(aG(8mkUE7kWOTbm)JP21?Biohhy6N-B}VGPghPq_FJx%<>ivj(-jvQK=ztay6d&wGE_ z7umt3y6?o_G|r{RY)N9qZcw}Lh31_?^!9wsIr6w@t99WyFZ7pd?bt5-em%=x(%Irv znKPNnSz0uGCvOWkD8LCemYzD9y2%IfGaUXg;c$-n&I6B|&E01Vk!Q zOl7uGfRgvWXIxijh48i`zR@sb!Iyh~Wy<;o5%V5xTll_D4jltFw;=j8Y|hD4?T`0Q zzS0F(x;FSMlE|tdE(UClXD(CKWjc%`4@MNUy3~KB^+&7glzsDG z`zB)?=P7MNC&f$a(dX9+H{knn1?IDA>{LD|$bw3EiecwRPDkTBuOmvhzkH$V(RUGi z$qqbMkRi&NOej5rm(ILD-|q$3@;)V2R#x&GGSabp9i9C-xO*M=IPa-)$Xz7!b6Lc2 zbw8V<#FfEm*9E|^KfXWrT@PgG(u0*|C|e2pQNu8K%R>QtHeFNv>|5;J$nOlpvhS+4 zk*gH_0)m+uxoUoc{&y$Iwlf!Vp64XyZS)89XVFTZ*DN1Sz_W@Lj0p|%-;>s!6+D}m z(0`7Pe@Bm-n^QwqCJAXpBTRbpdWiQJX6iydyzX!AXJVW?zn6{T-w%>H#7ozu5)|n~ z&k3@-g3UJwHopVKuTW8^pe(sr3VvLR7$#zXlZ#(fd0@F;LZ{!n-|Z{y z7U!Q@QXnP^ zwEmeDECSnL){N$O7C6O%rAum+Ke~Z^1bVV6Gn>kXJTaeSW=Hj%3cjWC9UJe(NfnW- zu#kb{4E1IPX$Cuo6)qxW(T_1{U6|tuKsQSEsRhaWi}AmI4%QAi4l!F8O;oa1RaF;`ZZP3zw1h7H|1rr)+PhB*{!dbPSB-N8Z`AX9|^ajYpPssmMi6 z+TGWRiN2uoxvk99M<}dO$n4HByU6bZmI-@-$}i4$3MW%Y6yx~zFr|vB#>c0;Y8H+= z_!y|9+t)W%Ha3>m>z0AO6+&}Nu2V+UAibLqX-dJ8i)5@^&RpO7PWq>ux>*K~i4-8X zIyz!$AO6Fr(6a(+Ed)mYtvKEHcC?`eT5`~H?FKW)Fg#H%!M85)tGY^JTKqnWUo2<* z>a-x11N6gfj#u&i+iwCWmi~FT=DbAx1GBs)C-)!P-Ad2ZU&XUon7sd9UOGq4s(V#b z9J;X$kBr;?0HTjrWZ9QtGZ+x(+fokl1RT1v?cTo`KMA@VJ~r%6;-{tl?DZMLPOq6c zt-hbnuHsuHj#>R$+JK9BFmr!%uw>x(ddk-G_A~}P1YU-sa@O?TR@VE*)&m1He(;D< z-h2!t%K4!|DJ)>*vi+kqLVSLH0Ur;)Yjk!;npT-GCsA53H+5iq)fF&4EePQb){OHT z*j)m?=*IHt=^Qa!O5&s|#tFork7fMrjDGv`E`=dsLcdk9RvFDeqs6hG%tdZ7EOge8 zsZaaG`9$uErTa5n6j=xL4U=`Gh_Yy5EL6L$m?unAA3W8&lJH6L2jJXU<7em&VR9gO zx|qcX4m7PHB&y0GryqX`gD{825dt?D50@EIKTVIm3}*QInZ^^hXovT6&WQPNOl!+f z)uSuZtI4!?OMx%Iaj5ISFub4;Lv#d*X6r}NiULcOaDm+x{(rkL7MbHXrW9i8$OJV=SL*h~vA((~-XE$WWw?3P+ z8G!d7H-*T{kikn(_GEWMdjy%@no=NV$Z}P$6S73Y#HN)Jv`j~0SA0tOC8Qht(@lG3 ze%>=$gOO({aeQ(1J6se4Q@!24zqnqMQGbLRhKnr;8J$IQ2r||6-Ryh9NWZFK}0^$(gV?2MHy3Asu`!J%n zZlZr^Kvl>r#yq6%;W^t1zTpTlR?wd8=H5IG;G1wnXzpktCYJ(A`kn~Ae zX;B!R?19}E4pPF(&Ahx&#liroKLX=&bdIs{B0h$R#smxT5MX@aZiX5}Foek>>E}k| zita}@Aw!bCUdFc|x*+Rz$Fq)e$bVw7oTv98KmV@7YdF;QV962 zHv8Ylno5dr>e~n7J6~5bHtEvDaqaeJ0;KN@yT5jbE#lO^VRk;Ue*WOPsGLk1;*^e> zTK;F2q{82C<2X-Iaex{?5mq%dpPDZYUy6sKu=})c{Gp$Ab!lx!#2EN+fASdB^LG3G z`nJ&XcK3V^?XT9>3$7lUb)8{?rb(PILY=Xf4Q_jrIZH3jAEWRe?ze~T!zM`35pQ8p z9^3Hv=SueWQ8fFC-R7tnX-JVCvh(428#H1LM_Ly#0#XqB#(2Q|Znz&oqJME=nJu;I zT3zHYS$->NTOUPF2~NJ>$Wovk50!SXbWi2cZ})u+Cw1R92I8}RvJmgf{1rB2f8-`! zZlWN)u)4YmZSXdF{QaTBWN1HK8KE{#s0iW*26~A?!u6dv0VR@@2Rsq~*C!t5-qJum zT)%1sy3XkiQMa|z)C`9U7LVapDswn={&_;Pba%QvOx&sZ@wqG5Awe@~J;b07?YKHW zZ0qUksrimej)S)(%TBUquPC)Y!r9GrS?Ja+ zq12ItILTy-J2ZFU6t2-6n)guXW=f5y_T>@qjwP~}B?p>(xm{jvw#M@}T#-68xt{Vi zGdCzrY8xtL)=u%9dhiN=yZk^A^Vb;Y#fB!g_;sV%)BIm8r{d)(dT$xQ53aua#t?>| z!O6x`PqT}>bq=k~+#iP(&Uvi*uXFCPsIziq%s*tO-jD5=mT0niQx^^#P9FCU&veI1 zoq*|1ol0n>i0;%WwL&%ipqp0kid!zYXZuY|xvfJpv2L)GBLYqSBz=oQ#~p0ws=2ib zEvrPxX>=i4Zrg%s_H@3J>c2XHVZA-MyTqsM+NhI5_>oB-2hj@5bL1QZFfz|yFQ31~ z440zf_n_fRx>@rP+uPc1I`v9;4N-3cdEp&No7pbTJHD%;A`bTTeK?EN`VtBTWM$^o zUCd_Fql{?x)V42wM$d*LV-C|NlkbbaNS>+wvjn6%UtQ1uSywHbSJ!yJ=VI&K?1pFQ zZ7+Gee}Dkj8_w;iBkfJ@c5{7s%?(C!+m)bCNGG!^&rO2C{n8AX$C0AW*8RZ$I?w(y zrvZy)6Ko4v?xoXq;SYCORljoM%H``saX0;eDpGgj-QI>^HmWN+$fh+24sGX^3(V-!1!=FyZ-Or#F(K*x9i zM`NHsEu#_nz({b{%AsplTRK;1`1ig}*M6|KcdHaJ6aMe=(f6;lax&`M)?0& zY?u)Q33&OZG{qy7Gn@*tN{nY8oX}QXHFQNeJ|!o+{nMjQEn!E-(m<4oeri8s5Ra5O0D#-3)KFbuG7;>I zzsR|_H(ck!aw-sD|7$3q%0%p%#b!*!c0<(>w*DN2XKe)X2>Ep0?s)OTAKgFo$1;{! zNz5-14tXV5!Xj2K!3w~TH32oJ?+-X(**DW zry7;ixZqQZ!U{k0XDmz#7Lm@l+D1-nT?vDP;t-bQ?kKfXc%_tlaU#k9@6iXZ&_C9|64u zz^tsXF{ZjEr@1k0ue)Rsl#UXxk*T6lb*WK6a8q}DYv=p7f&Wy=3@yJSY4DJ!YO6P! z$Gnb#j?Ot|Xi-%a$yZ#Wm}Vq#a9Vd;QxgYa0!LHnEaX;yIOO!0xu%j8-sl+?H2U>k zOV1TaF+qq1nn32p7z}pSyV-mhLwe~lHMuM42U^5VNh$_|3neMY=&%IUQW-(z|J_Os z(=xkg(zkg$T&;3CDQv25kGVW|$bn%LNXW9-nki#`CD-JodXo~czRW_ zvd($yAR}39X&Kl~Dr~a+;;+}zgy{}iu-9%KB>UD210sv%D;*sxunKn9FNwX$61xL= z7!AwoOY2zD!gOKXVIJ&`-tc^g0~kD|d-!Eaqxs&h^8Og)^_3v;Gh8 z3;Ba`=wo`1BaJ=oF-Q#$>TYsNO6XX*Oe7I%zl$bynZ>eoFQm>+G;z|XU0Y#+SiHD= zJr8H%8{r~_@=!nQzq|Nc{smQqB4wGF^>eU{Q2UWot01;tuytGEP4 z8J|~d0lX3wtdjM1ef&5(6x@Or%098TNBeXL#W2D7LS-$)7#x=IbDlNlcCr9?2)9e} zhnN6HLI1axfiTSfOlHRmHJ8^6PEKZei|Vcb>oDhS!GnG8=p>QXLq%v`eEgrut#4G* zq}6baPOfRCy_RDNmOz%i*WmqW!2rruh7NcKSlswDtIAkUH%(pAqz++NKhZnZ&Mdk6 ztCZ1B_9SBc@i38&CORaZ$D8j>>f;f}96I}ITBpP?UL@)y*4BArE|k~cb9aX5c~Rq7 zzxf`%eHQ)fb*xQ~IU(XCH0Kcim*)glWsRO+6-NqBhx}UkojLVq){kci^19FUDL2MZ zaHeLkO70k{i_~KBn&zU3HIgdtUf+Yg8__G`>8R2hR~70SgE>t0PmRSb2uJ;lEgmfU z zFjoTMIu5A}882}$87Rzzk+c0>A4^s^7cdk^e5_Am3jJ)O``B++%#lxd6I4!?qeFky*fr3;n-J9u| z9cyoftxe+rJ+99rQJ*jr3$9qg5j~FBCFjy zUxCTK^Z^hgOc#|dQjG})_9p6HRq%?I&N-?HDlbKwN`J(%a#(klAY&em$c7XC$+SH+ zJJ0g+&r{@Qvq3!HGSO5j^t>a0vnOjZkDK;efb+4f_9Bw zN22s3*6y{^^=eb9h6@dDUgYP&(h+s+qD$QZJ5pn%5?K^gQydB$H3kaSVhl?QpFt+H z2zs4fyD#u=qBX9;T@9_ZjX`E!y-KRwRz2sICZ>2s3Y$W&hZndJ@UD!?)a6@L-5lbLT)*%f zB-)%u6$)$@Q@Fco-3w6I5_^KRQQkJi`=#v?6#U;-+d$J?%D&-Bs$K{xmzwv@qcl5o z1h_q~cPl;b&pq$EZ2qD#%w>gh4xf>Jx8M6x0bw7D{t=91C5~+NGucMYS}mUutnMDL&mMf!Zz z>0~yQm6TEDFS6L-DAShds27>S)WODrnS`|tOdx)>*2Q2L#KN5xBUYY{vLQ8`eJMgC zB+Z?+nbuk8M5FE*>TNJ7(vpJ9<@Ou3+gV$>&`kY~S8Qgl3ZORN(BnTPUgR9?@fs1b z2_a@&iRKAXL$MuhtHKJu)_+D`&B@qVWlBOCE{Cuf{tS9 zrY`x;jIR-)rrGJ5VnxJfJxyP-Zyp*5P8KqId3N3x=HY({)T~X{XZ;JY$^GJ%#6I`2 zfW+QDR_5C+mL@eS+AX{SF=%y{rpgSXQfR`u}w$&iA}x&%eipJ6iWUk!vepc-iEC(Dp+?uo_QM{6=(;2l`;)r zSafz)$lxkvhL+O$`tlN%;ZZ(JX)w1WNN!yK_ok}qwCeP9Y96oXiY1(pLFfUHPRUIZ z%n(@eFBm|3P`{}>+fK>83rLc%cxaCklle9=ywlPDe~5akfH=2cTQ?Bg-GT&nw*Za1 zHqc0L3-0dj4#7RRySux)LvVN3oL>8!eeX*@^#5FQ&KmWNQE^_-MiD=B=n6Gzh(ams=<&0HZZSYA(!qnx$`BWMk~af<_Tu2wUjdYShwI-^@25f zV|2#l_yh-8JAMZ(ZS9TKRrkkp{BwtpS|g6C{Cx8J#rJow>SfQ5*9UObUBf#JZQhWI z=SXo_xZ?uylxbL)QXMy0*F#meFHm56h3|ief+_L?U|^vo`t_7LbcW0}~%#8K=xU$O%qw_J*Gs zLm+&rzV#H5vXKH+{C`m+`6ME6XSt@gMLvfMC~{n_Zygkyk9=!EG{XP0LUWhFZR?X9 zq--D?B&fut;!lclfrH_@+bSl09ig^sXV?T~p#lRq)q5lT_bXNES6;xy#?_gA4fJ6( z!-CLS>PTtp4u=gvc`#P`M2~=(-Bese$x3A7HSd>qF6taX`zP@n#Skp@Q4Cm`C6R9N zhZ9hEh2{|BI2n7oDfxiiDZGtQ^ZTq1<67@3#x78TLkOS6!R;VOshUpQ`JN32NfdpW zNH<=(O*KlO_Mq7=l<_xL05q!;gSqG;fUA(l2*83yO$<9oVF}aIz}RDDDUn@nup;b& zZ|N>l#5*Sc3TMCnlPk*7Vm(1{T|!fk;N7KFZim@h|G{v5Z;jwt4dPm2#84*1W>Qj% z?RxF;d&ZKEU^qFd74w3W{plwBAxKJChW!7O+NROV_Od*|p4uh1nm5wqo1 zFS^2KDsIr(1BC09-WTvMW`a3RjK>(6Ev3)fmC8;`Ct+c{B`@35`H4#~$gJMM5b(q! z8YH#AF`K(V9M1pd^%E!80WDe?7^(zItTpG<%T{L zX9}{{L%l5W^E*bi@^shwQhjw#QRYrAwIM5)G5^~_@;Lw7R5srod>@G9=6rrM_x8N} z|IY7JPsWv9l)oUKHL?xpf6HXRT#?%F3SL=|Ou2zf4=9bbX8zbA*m1vi)2I8PA5u#F zio{*AVuTMeW&;JY>!HZ$v>}~^>0`#1TIRBEBa@^8V;H=x1d=@BM!f1BXj)quRK9>5 z1z5J{lyiN%E`JqyeE5F>wWFkBw3z?<`**Q?nOU#X=jP){EDugX$=sr$@qp~u%9=fD zN}omB{#xpC?C82=we@msO=w@uvy*so3i?2*vZCs_p>0jr9%?*Y{A3YkD1+19RfLMh zBe&g|Qr*J&52m>iQUs%oH{h(mADMoI=Uc=S7XiJp|91h^n#*X7>Pw7zc6KC@P(nK+ zXB_f#Q8w(af~5b>IE)Y22;PsaWk|y_$0JZk)BgbGmr?PnVkij5y8pc6(Y-@eqml>= z(1<>@AEsxiZgZFY&12bD?48)&*w_~h3NWy9;w91zXBF9&XglA*c3oXt^LRML_HnSY zW5Gju{rChcKBFOhw(*QMokx(=Jeufi!)PFykZ&{`oMYFAli$Yb1>J9<(*EqR!0~k4 z&~KO-8SS0S7f)yNd%oNrOiiJ59kBNne=&Z(873*k7w?J4(Ax@ohiF2r>vJ=6Yl0D` z=3p!Hvr;;%r%LYRd}GbK)>0Xe&Yzgvnf&||un9GVtc+kI`JvS4?IgCzm%=G-6)FTp zun&G=|NGef7oDCLp&tMeyXdxl)4_|1WMu~<5C6&EdLDlH{s+_r|Fy>croRzo4ZLHSArJbV1qssKnDzY9r5 zq5kWl+vOP(sVg(B_6u)nYEfJk9oL!7m=lkiyt8<_1G-d|L!qb&mPX!|AG#C$k2?3% zMpQ4DIRL*LfEjmZ_qS-Ym2W>uU0hsP<6jjS5^-E@F9{HyzM@L;-(M$EI~-+uzf(_~ zX7V@gZwT_$$OO?JoFhqmI!}3jL&+xKbt|*op~d@Fu2USzg#HubKhc!(dcm3*pjuNL z#nkq6j_5RNJ<*lQkL~u~hhf76*{WDPIvLx=c{u$&R`*t$}V{i7iW+Q~!Qa_GhWPNpvq+o&FN!-Ch%%<>_UsDYI zF)MaOaB|RFUd@%{ReJf{w(b7+a59Tdt4vNU+SOUh6EGR(8@N-m>_{xl0)m&jK}swrEe7WJ#NOW? zfZMrJ)}(|-{x71b2swyOT#Tr|Vs0UC}(_2!xntm>& z5E@b*$4QoLzy!JGt=SFKHjj=4$fpNQkjRLvF6dPoq#_~Tcz~kfb;Rm0<*Zk>X})sb zsyrSJK@ENv@C$Odb#x*RLAD=B%2a9!AW^1DSv$07cL)r52ea+I|302be4ckU+g-(i zP*72QKOUCB;4t`3MMBh`hz8gcv;ldYl-w-X@{|5kR}lsOrTD(!cI3+NI0!wQ_y@Cr zeh0@yBpTR8(342u1b48|uo`l+0=T%YwJ@+}^cGI~IG0e=*S-i0*eZQ_M}Ypb{vA3o zOuVKQu5JfC?N+JHDJ3+Lbz-aA7tGOupTjRX|6cY-G0$D@B|v1ZfjRlgElAaFv25hN z%A41Wmv4a-0G#8xrj|#u!2Bd|T*oIE4fwYWE@PnJM^Np@PCx9%SFlnL!Y+E><}CS!#xm4gt<%!XMwfNon6OE5Dj2%_9zdXt4jBX{lDe4oYRGj(}@4!V>3Q zH-YCGY^)^x{md&UwrwGOo|AUOwP=_vSp7!khph!$dCdMg>UKtX< zXc2sC7%{RMQ(uC68mSbdpz@mBsT}IW!SI5;qY+GbMv6^Gz~};Z0|Xo<@)?!vPUuIu z^c*o(=)wC(SX)+xNt9d;wrN$RTjwOB{iwAvis?%a!}*hudhz}0fV*&`hBgdyR}%j01NSyk zf!_e$B)&$2kCp3zb51hlO7n|+s~7^mTqIViMPfYoWgHA;B!L23Y*0wqv*0$j;2O+L z(xj8eDB$((wlyX6xuZAgHZqvZ)(QI z=H{f(t#RX`m~8&HlOsJJFpMJT{p{y;+|tYwph45K5c0N6g4AwlNiTwsj++(wjs!M_ zEGkIG@HdC_=O*yuCY2^7Z6r;H%ZFn|z%@+gUURrp1~~fYhI>S8x~=yrh){?oOhuH2 z-^3z6x<(x`T)6VcVWIL+cTrQ8B*OPg@_j}viywuYCAT;75e}yWU;JE&8&r^a8U!pz z{L3ppre8jBqJb*7ZQ2O`lY!s;)Cm#DzV;e< z?B)Ih^zLG63fsE#kw6XX`uFL%kD8w@@O{jEM#o@1)X!94AiZX=r`l!X=L)%5QA`AH z!$m8LV1v!?Uop8ZR&wnh`*^mVtW`xvcgL8;?SgZoQkP|(DZCuetnyJ1l<*uKvgnRN z#e4W}|2{ve!2;FcWX8pXHMFQ5>!SaNglPWFe%B>uA`8l_hFSAA`1k>zJR?x+`9(+U z3xnH|jy>unQaEfkW>a&-&_YK&u~Jz?lIDQdvP?PeGVTbSVaUQ#}Vt-Re{@*vbo9ghQduJc~3|)eg>j? z3hl9KLK7}v*9i2lyiM2ng5(sT>d>}V#_8w=Sr&m_fatVhfP*zjfpYC+GAWb93cBXc zd$=qD-vzAKA7X;FFMoAYvuf04tGVc92d~+WaV%LW4QSWk59T1TY{oe4HMNHL@UHCj z7KlWlf&P>`av`NXMFW;AZ4a}jLJtP!_a6KeYOXrk3s-J4Ah(x;z7+N2k5kcygGX3h z$0zQ8wSsKc)|9k@pV8c&NKdaIy23;{Qv-qHN(wm;ZR4mp{@(G&0f+-76B-p?LCFn>cM$??g$go ze<_v4#(M{oO#sYFfA^a1`u}@l-p-(dz@mi!v+p@FA+cE%_mEbD^NUe=Cl8c@(_Q$) zDL@jPw(;O10Ub#GKXUTPLx+4?dF-loMF_3}MtN zc3;g_n&P(pzm8b&izG-eSft?fWk0pFJa2XfyFb>uKfuTXpAUNf9zscc+}<89z)kU#tdz%Q_;=WabSN&> z;%-BgkyA24u>))*Y`%|Uj$pm;{>!f+D)sXzmuHRbNp*Sa)?NXb__dh)Rr&!gL7SGL z?HPsyst?W`rO`Y4e|2Z6xqx$mamrK5{1kqxqbo6{!S2}G^-nTdRCnKj!lE1%!G-U#=ujeb-b;xG_8Zs`A4XoVc>Dsp}5U+7G&rVKGz>@{A2{>+b z*%2%8C%zcN%5poj{4Vw|p%sa#Rm^ZK2O^UZ`}%r@=Z1r`^>zC4*me;}WDOJysHQF> z8Y_&bz?bi?$)bZZy;Hoo;=2==H)Wnetxy_o_~hafA(9?74{km?wIv|s3=G*D#TL-F z-M^ASGJnd@O-`%+D69OT>w64m;zc4J`c>NpLM1-z13hW4bO~Yc2NWmLnee|sWwiCN zi}@D=oar#KWsDx>vli;74MEhgtLnY~I~*lj74j?=r`auYqSIjIq!hwK47VPqJ$w%> zT9b5zKhXs4&1vS)vT)*L$oSLN0*5^Bpk+X;EY6Kzir!BOAVJNJ`eUAVwB~fEVF|F7 z*>?u%_^_tfMcGh?jw@i^_7S`s<}oHA&7m(Js;J|Z$9TG#C@rFA0p?$CjLy{q#lE(w zM&>Px!(o(l8mJ*CJvQT1(Ce?2I1h1FT2>(%^o16z#ED?;On#F>=*Etcs}l3VhC7*C zaUh}qe7*qg$>+=6t<3$DuUUs zJ=A#}p}VUV@VWw3F~dHA2~B<+MArHH{^M!8+wH~>yfdme$H(J#U%Gmk97pmy$`y4q zth`gu+I?G>3|{^+>cga!KYR=;JzvkaEu%0T&QPj)3r|ly`#j;yi4x zA={eq+5&R_jb*ALG%{u^^IA5&%Hs8gY!)xei9vSndldI;R6>mmQrU^H+j}_5;H{W5 zt;cr>a>=t5mKNj9nW4PL9rf923mCXYP=gw%TZENG)DT9r^i-m_9Gz|`9|B-E8{tExWj@v0AS$%W4A&qwP9_!8g2s9F5PaZz2YXM25My=QD}(l^kr1Fz8SLx@~V zQK?StfB>T3W2HZg1*ZJ3#<6cKAt5fpPLwZ%E)KuA7VsFTR0dZK;<3DOf-T z4>>gLud$qGJ83*hO-WjxLRv3sOQ&znBf+yB)w2Js+G+W;>mmjEu`P9((|Fka6RpVY zC+L&>NEdvr2mGGI-a;z|)A2N3CN8~jZW3tX4yadWat`n%84Ts2VbukhN;d(R6-|_Qv@v96Y5T9|EGLqE`;z!X`R#3mo`j8sL{3;ncGTS%Mb3H9U{ZXD)P0Lof$A@c zumU6~QkJcv#?lcDhdi9Gmxf15`~*Lf_ekad=g*x6UUU;!2v9_MPaR`vh0RGB(MLGB z$EC^lcNw@CLG2BV5Rey-@-S`AF+MwjTsu5o4FGtInL|j=37QGyD>IO`g;LK7{(HXz zza+N1yk(K`DO8Zf2g7#51s6*cRqjclOXEm+lcp@qwxk_Fn;A4wA@+rjETl#30-uR7 zZKH~z!e4ummAkyq!Y9eDQImkx3KN+63qz9_aY#%Q0$5P=Mfwn4ZP9UU^j}=W zg%zfyWsl=~bztIj7|9|Cgm7Z+KXgPlBU8-(FaJ-i=pNPxz+hPvGf z6zV`}oqG*Dan$H*72&KlTm&G`XH94^hlw5pPzT*jMtt^;yxw8DE4Bxe&HJE{?VWV3 z@;{yq)swRVIj88FAp`u^{PA7oM`Te`YFQGU>Ul~5$f8r@6&0a;)VR{ofs89T1GsEN zKU$b!gX_bqv5uE2uyRD_Z{uI;3C-fX?Rh7SmT7Jv7tWniEQhaOwtj}p#r5=v>hkpH zt=~oTdeho7Gk(sN=Kxz%6%P(EvY2BU$ghOPRFWLQHuj& zElfXAvXJQ~DDLWo)Vhz>7MZT=7iP0tIg@tdotV)EM{ofagQ4vkJ zLYo=J$n^z&mmpy|AnX1g;p21BVm=U~i|7wLO%*Mo_ADzrkB~u1vas)K7fX}LdV&S6 zTryHJ80-UowMSJKlGi1Oi!W($oOfj7`urh)r;wUf%1~8GU%c{W#j!07Kjle^;lepc8m91$ZMB+^iyC2~RVU z&toIl7LaAsFzv#-3lEi(XH?EFtU@sB9A?X7M(`*z=J?peH!B0hj4X?u`&qRFQOr#; z@Z*Y;S@LDr!`Y^zd^Gu?N*M?(LThynWrkT`1x2y-t3=-x5`IDCB`aA(_@#S5+OPXG zIM+_=un!E~kmhO%uq{)X8i9{0*YB;n+8$C-Q<)HvKXpNYLq&`r)Lh7?GS+mn=*g zMs%T~X_@}mHm%{^CSvD{HWXn}TAlxk!^a(As;1r*D!0qi(~Yg?Fa&5lhJ_Lmq>_TM zTtE%X`Mkel7W{WR9*Rl=E=HKZo&QMsryCi43uEIX8Bh!K)jr`%P)ICTu-VxjPhq~v zhQnu=;Mo!X9>3wdT#C=f3j0#5meYS|v)Otl6kyEP^0ldUo!0jVf+keaJdjOO&rH3Y z-^Bcw|M7QvBofOJq``JaX$b$?8+ac1j1ax?7(tSLULquLOr5&4-R<=<&fNXJ?EA3{ zzVh&ck&_$e%N{Om)1^0q>MY!I@x}+0zcwBaA+;ub#}}ei-jF*%2|kV+``z4ehEP4r zpR#LfZU1k_Zb6xrVv%hOAb-Q+fR~JjY=x~PPnR@EG0pBzpu6vupuf& zW6^{c!H2%yTZA2`nIX~~R}rvzf6~R~z0FZk93qXr7Dx7#V*1aQ(+4#~dn6>JJ^{Q_ z`TTcBU2UVdbA?Rq#&0ec_MM!j^hBhZQ<`DrW`)nhfp_4CxLeEXhX64HK<*i8kLzwK z*31-UuRKYdzFt*=dse#1=7(SfdGNL+d}b2YN(K)*$2<_a23+#GQMRcO)Ix zbVwA`i$-*vHcO#i5Ma~&AeK#!=+6+@Ss-hk{0G=1NhPu|O~x)SY9=NfCOosVw#z`dy37OG;WkEi;W8*@4ayPly)s_@1c=kC$C6Iyo3Kk&~DJrZ0l3 z5DXdx%Fph9pNCNuimqAEL$}h->g!OQL$Sgz%KUldEY~*@bXOBgqmD;|YjrCuaXd3T z&z_w=De6NS5isHL?I%ptCHX?G~%BG0_iSRBPN zccKihO9%eirr6&aTR*zOd z&2T{c(*;gcU~t~??kYEx$@U8{Y?b>(I@{ZRqN|R>COyI=_y2)Eg34nGNg5pV;ZWhs z6Lfc{#~a0&GB*mWvnYUG)Qny8zCY$UX@Oc{wPOkJLJ*l|X-qoXCaBhnIXv0bnRMEAd3i!r?o1At2TlBNu3|7-ySN}9mb8^5!fA3NH z{^|)oHTFE~F0YB-d|`_G7S%cR!rge@P2x|(f(Z4e(3r}4Sm^N-IyOnPL}+LzvtAb< zE@;~UcHw%zL?RD4Z_jkj4TTQUXk4_JuM))oDhm4@!G!(8se~(^@C&3E`a3731F(W~ z+%Kn`mtUYc!!WoY5%QO8dHh?t1kKRsDMD!3<<~q;@d+7Wx<2E_3KClmuN`-0w*#!9 z%gugZL-+ZkTC)|Wzrcz{+vfZ&4YL9S@0Pvted3%><)wA_3(Ie!Ee_G{>^9ifIQSdY zx0joC^UYB@u;E6`P^1Rj;L6nHEQ?qLNinqY(@ya#4 z{wpb$yoA!Nm<{n}M6Q4%oWz=zAe@ygxNgdx;7rD2m9_*KZncq0N`xI1-H0mMBDa60 zClcrNb7Fn;vdm#N1w<;i#3(tCE>)es$sD9K2DFG64lHS8=I{g9q>U6u; z^339kY%xAcRI_ff<;lS}CwZFddd8$GW`aA$uLhel(M~3jaV2m`b@hrt!p1P)>yG6a zk;>JdY9;aIf&5e2gvhxJbT4I>5bkVv)RaA!*gUYav{Sp&Y5sesLq`n@0W%nyhEZ8| zWGrJ#-08sd?2ZWd#LF%1i~-uKje@6-g;h>o&d8W4Vtx;fxFGx}o}bL!nfwQ=$%teC z@eC;Dh3veBg@-dH2PWdX_MqabaeUC_hU;FNpb~qn7KPJzRy!D={aMSpZg!7@hl=#~ zHZD|+2cSBlJ~oOAuOiE0wO>#H9Hk96>8Pzeu`A;&=8EeF5&fjii|p#CqiZ{6(gqvx zCvV;_{fEx!#b!mPyR@1?N>1S#e^FAE(B+ z^d`{3s5PZQ>`9Oy8ar3y!{3qQfj1yR8QuFWuN1K7ivDyml+O0*e5M+iOY?HlwK#0j zm08fIU}B+P>YrERy!XRe>td(R9gfL2X;2Nk>*FK%RqFbb#htU?*-TFWf|TR2vano- zK2NCm;fCLPf98^vHoWgw+Q@mnosuOPf+>>Ys^r{ZRSHVcq(I%amMOfz%ZPnFLQN|o z$|nxV*%<{5kqRakVhS_)*f^8v=v*qQ6Ng}y!*xAHn^zU5%{rhM6>`oo0qYkeqfGZ&+xDbhQ6H4QIxdA{s zb!|6jgdo?uMpT$t|Cga+K}LF!D-^jSe6`c8as%vk9X*Rj5e0zXwRfWcPkz}kL6^6E zXK-2rh7Q9>?bkvFoL9MLEQL#`N!2A+>scZ0V4YeUzrd87SdDUlRCAh3pe;JJ{EA^5 zPB5Jo)TqtZv%Z$Uicu~_vqfy1MiLp5A@=VLe5)S#dvGKI7+3_+;W@`xMeGE8=*U&+ z3LWS-C3hI~aTV-*v&P~5=n%+R*t6(~uA&(>8Dne$Z(`?+vO@*CkM1t4u~})UwV>nxUOZr{k9lJTm7TwDCmJ5;+uN*Sa>Rh+hOE zDG^8gjA@?G=TxfyHH6KSzMZGZAyUj0?0Szcr`3KUZP>)Ru1iQfA1Q%8m|7gu97ecB zNtE&uIajQkHt>UNN;hcNF0>dL_Fbz*|-NB8FJ)_(- z`gYNVzzq(9nzG#5&(<2BR`L1i{s={#894Goq)9U%&pW)evz8Pnsw*I*(`PRvla+QS zV+_RI`L06T1-*o5v_Mu_{iF@Rs!P>=?+P6#x+UjgPL+0(`Q+jIN;T+F&5g$!4AFrS zBKq>LD1m5YBPe>F^}KY^M!o-0V~6%M?@lasSG_=i@;cG&ag*gbQOFJ&P?&cN0l*$U zr!Q2X^*nW(?sBqPpkMsIo~+kmU>T-D*1BNZ58tyyaAv@?Dezj$(8G;iW8T~@?VMf8 za!?Z~(Eq2TthQ_gG%-c@#yTT)6fBk&VDS+Dg$BBa4BiR4NI$ga_2OXwy=wa?*IhWB zt@fpYn*?n5feOG6B^k#zf7<$Z8yw9KpENZtBE~6>zOQw}$OGs76t~m$EO=CRch)-ZN?`qSs2j&c)NTl3fJR3W+h>4gfo<=V`{y_s3CBCb& zQh)8{YV7PR+%(4?Qze+C6^KgwLp4;ZnUF-EMd+;uNgRY$+~&0!+CA&$_4(s>J5u>? z;S=J9$JVvsV25?_^ug?$5%{S(;NG#z=(U8M%Eb*WC zz4IARBKsPn@@3}l>RPtr`NyHlaRzZfdL2!(e-EM+CGXj8SVb@^vXV8LO*S4%gsU{$ zrAEY*^qP`P=A>vaU6zYdV>gGIL~@AMsnVn{Xw!xxg4W*|JJ2BDI7RWtq7aiVzDFi; zdKCz2mDy{-XbZJccz}&bf5K^yd33N|Y}0!pTcBMl#>dCalsk#a^Dh%JMQ#|IH1RIL zj-6-h43P|a#tg<6F*xKM$KY1D4l{1??yPGROPAqFd446F29zWb9%(P@kQg7#VT{82 zq6m3XgVaTg%t;*PvCPSs2z>$r6cum~cR?V)n$o+U6R!F=SQGN2u=V7d&(`(M_Y;p~ z1+2lC#jmZeBiw+>5`)Yu0#d&sMl@_bO___F7HAj>R2vq=MbYp|GyEx}-$psZ9&lGb z_vtG2vON5ymXv^uF1;go0_o>f$Y?J~AwRN2x@Z5E_mmnZ?<_8ls4IdZ}Q1Jm{r* z;{C}~#tuYz?5bh_FZpSJpfqE@tw9iA))^7u z4_arAM$GceEJv8AAFJrO>1nihe;uRZzn{}aeC;VArQpOv+Pqn{%cp)`7#cALIwJ!P zre@ow>QO^xI`F6sR=Q4LC2;xC#k)lpD>8Cv+6KghTMNm3Pw`5*bQbtPR-pekYUfMdidX9iu0v6k9w?2rZkL}jn+@a&{*wn^*P7=vr@h~2#b~^| zJgdrxxANgtYn=}qkmU&rOCfV{;i+#Si3h>}x3-Ymeex002gq%pX0Fbt|J4~5$aFKNV|^dG_2*Mq3orD4H%_*UiT%>>pf7cns~AiRlf`8Ivzi>!$q5)-H0NeFmvpqzoY^a>G$ zlK;X#-f51Eq{BfZhb!XI>6pWLFCg2~wEc0?ka0~sq2`>QRoW933b`Gd7_?B8RPw zp)w#IHK=a_rE0uSw>GVsAMbV|aixK$9koa>%~nT=qK$gfA0j+U?x$pF-Hk9A2S6Z= zkZfsBWASNy^C*P-y7np&zc{GftObfTo7#|3yWJI%@>3cs?W zM>R^B?{ci107S`NZm9Qwq~_Q4SVr@m&fi&ygSVBIi76MfbV>lisC-a z;gge=0@Z-ygi#5(8hzvbVa_c)PQ|=6XSLr(OK7bBVrPn6lSUjq~CmyV&c&HP33=2e@kWl0*1aJtQIElw;|K~<-Ipr|qIHXe zyq1TMz_;XcjGex}18#5z6BVI<1t@?X;~UxCDLrcUFrkN>eT8-G)fBgnzmTIz2LG~V zwIN%P=_uV?Sl|y0)u@%42>PSg?>4WfgrH}yNH-$m&a~Nh6Fz%^aYG+bA3u>iK8rXu z;GwiI=;Hqvrn}0Or+fZm-N~hS5h-|VmMBQ$8cELG`A564LUX?}xrfz-uUZ6)y2%Xo zn`mU}V)TOQI4pWOrGgOe$2HC)(56JmEh=ISkA^(G=hT=`-N&I~ap_&d^;QSx_seHurVGMch#?+63#N z5~L=)*}+*&ac%*Xkw?oH?s=N#+>3h4n|i4Ao_ z@^Usp1&(dC9nnsNbg)El@wt6$WV`Dfl@%6p?6@NCREqqsr+p{$`t7TPtSW~z4nvwK zg@0Y&=+bG6CiqDzuY5jV{R(J5B!eQTZA4NWa(#|Q{-ozDk9gOp>bF^0+3@3B><+&bi4pe$Kr}?JmwOii|{gl6f-1%>r1cs)*pdxca!rO(-7d8 zrzOvtWdMt~l?BPakyHnV*9qXw1FeKe<0Y|kS;T7jsVm^(>|2u4V!P87JZ{H1*RL}hcc z)BQxA;bB-pY)$|sN6p9U3>0w-$gF`nR?XASH;4Uk`ExOhq`mx);`4knt4t-H-4qlu zb>#GPNsH02dh?!YOGpR?u5xbu=zU0|rF*H(NtH>pv2!N5sOq#0NlmF;wfd057AI@= z6LrdKh#I@g$vB74K&y~h$ilbzuK!0dGlEp83Zf z-UCj6D9fI3MJ_$ZdBeR~{b|Fr5fN<~0+luk$>0UauH?T`9?Sx_+J1?78c#MO6akuw z^koh>BENXCIil|xvs@~ibC-{e-RPt@2Bn%tR3lPLXNA9sLU>u`JWF>Ko`OmnMXV4W zp-hQgRg|vdrNF;p+pE+Ly0vTYvWRu{eOu3pK@D++e^&Sh9f? zI(rN}qrOhe*T;9WSnB~*u`JbJxj+Cn<^IxstG|kPI=@T28mVV4R>-2q6({)$^L`80ngvaB@gb*UvgHo+rkG+=R{TCqe2QgC zewc-BMap=EvhAwveF0C|rfAqyak8d=7a^FPmKF9{MrCC9b8lx2{8vlGj<#KZ0_4rJ zWOX&l%vknO{ql=T9({1ZJyI%f@3cQ%-CO~EU+wJNjumN#Q`e5A|F%CoWQ!TNlz<(J zU}EF-2&tpFt*vb*;0LNbgn@tXMj$gVk)N7{lV0Sw1fq;$r@89*rrZ#8KQ7v+G~cWL ze19^#v$F$Ub&)O#EzTGl7XNp^tivD1PiO7yL4S*WGmIq$0bdD&f0r%ZUd$)aLf$CD zZ?3AM;_s!Tq-0>PpZ`d4M@yRxrX9JOzXBSTrl}A=j_BqM7G`}|C<^_i9vU23$sz&~ zHrA?w}BD<@L_0=ElgM7Ukf;f$T?QQ1PQXnxNkJm@CfD@bl;}&L3oc>i zo(H5XKUfH$L#3QFe7~Hk{m5hZVfC>$V=rqR6uwZ}4cv@=u!*VGR^ z95Ip7Yj}Pw)u?i(<$U=`y1(jBt8A!p8YAU492HbvP(ow3`c1p)dt4yRGls;Vy2;?Q zASVBkPq6@KFfQtQ@6zz0NW5<+2XQ`aZ9ovvg^{~BJzObTnB$na?lKa!T}b5ixVmGj zWbD$rHyryAa2#{uIE-nXZLnO?|{6h&xX6e(fHLj*n-#(>HJGoj3aL<*}rI z->HE$I((LGM##>n_@r_`{zIQn7({(jlY$E2JX_g0mr$n9z%rgz&W3(*FG{AwsJ9~()~(3 z^I%boe{qa&)y2FH7@Qd_)h{-w(&ma8gq-LwFef*e(eknV_ z#Mx7Jpix%3mIO}Y#C%oTaifSV7=#&=&^*SVQ^C}>cmY3YnE}QkuiP?`!%yYLk zU+kyJ4-uEPo}b3=Y;5i_)J5U&Lin0a!81>Xx?5a4~FLaDuJxHqT%%+kz8 z8AQ>u#$Tt&*beLr1F4Yw;+7!O=;LH>9?eS3RtbhM%cxigG(#Y$uD5i3CmM(vb$RzB zbD}ICHGfdB?4VH>=w+DvHX+6iQO{$&(GrP|xbqsb7(gVmD>Wdrb#^c#c$H@q3xd1& z4PMn=rgic+?OMPUr$m~&Mv2Ip(>i)?Z8emM;OmJ_9^cx8brYk#F8P3kKT$h(>?Ou# zr@SQk;bA@1)Kei zQ{91-%6H9W^2gI`Ju0~iDo$7=V#n9^5CQL{j#2LqVmCV(sh#>f)S6=rAd88M>yy66 z%%@-L?kWhN?YIW&kCy+*Hc-??3=Wua!tECiE-n&x{SdAiU|J}hsh^V1^YW$?GsFx+6>fXq2^2o5 zyTqxg5TXD+yK+O6sq`cGogL-uS#NfOctJ9yqWXLBER#bBRh~tZ@a0^Oj zGMGb)qPR(7u?!;kyyNG&s}hk zlceOd{!(wUW3BD$R0dEAv?&?8DQ)a(ZEbAK87sK|zO4q8tyzH3CfUd9M&28HTf^%G z%(pi(3iPQifhs$}2epz)_MkA@jn5yxgshb<4?>?5i8fT}p=BXAo|ysk9w);Q?I;I} z?%`6Wyib!PoDfM2ZDZ;xBbE{xU+q@CaWQUi%w?Z3jj75bxD3b7pR~4aqT4776lS$# zXn__-IrN5(N5AMik$Ke1o_kSe&CD(oiUXGvBO;*<-0+|DDsaoHb&1XRZ<_4jugHCc z4oJ-&*z?u<%g`YPQ$?q63VX|KwpCuljFkyUQ{XjdEruoiPMH|$`-~%^P7Y;B#*&YI z$N!m=3Aiza`MLuf;(utPSE;d_Gb1W?*DOFhpg0aHsFL6nU%6nn)M?`z!El)jia#rL zpDlJO|7IP*$$fz$_YHj3;IXGFtq_^Yhe?E7_uKWYWJ}dRTT^bzb9b_Tx8;sM4m#T$ zwW!CH!;5A7kZv=QDYo*o*A$^D+hFNiyQ%k1Uksw=Gf$#M`c$J2G|V&nmFvPwYbQmc z%)g*9hJ>J^$wjdcyn^LZg#=X4Ht&|yFoq#E51EsDWL@a{nM%p1jMEpZ^pwOkA_n;& zcC9|iSI#DN*&>%GjO{&AP>F5;QhE~$Ru5Wokx%}v`Hp!&k=txc@xTVLlP?OfKJviQ zCd^^J;ziaX-EAGxAm^!Ja#>j4@JS~)Wp^g!zqO8)#wuT>b~FtFp&KCuBGXLN#s@caCdG!6X9^x{E1DBM9nV`!~Qsa&W#oA zyK5CDK;xQ!Z`~J1W8q*hiM1_?olVB&%#9)5EqFhcXW{E4Ty`%{t*~6EXCUl;-n4_r@)wxQ14HU4ly~DB z0Y37|FBmpHSz6*6yOh&D5^~k}fP6-1k8z=?)K;}Ilp$>^byOEhVrT_Uxu0zK#5Dt9(=)%m=)1joX4zcdySE>We zBeH6YM81f{1SMcJM$?1r_8yrFtpe9ETQ83dHN%7wROa)!dI+MOC;ap5L+A zC>a(#)h+fM9HALwzjdEi%qFC`e0*YZLP;>#g01Fb)J1oD-@nu zm~+BYb2&UEfdc7HSWu_R;VDC%%47Bke=PFsyIAho7g49CPDGtLJ$R~0RjSe{Cn`}h z{n2Hq(%);s+Ni9mljVR_fKE(UyiVP9PPrUd@=rJC(@H0%oUz?b>}!didq^<%D>){W zT99*|2m#~gcx);qO(Efj-7XBGH5B6*(v*Rwlr-hc7?@6@EtgT>X)2A)mkTmb zhk=KQGcz!*yf>e4m{wqRbzyyVd|6JrkvEwkY)!!-xsNNm1b`TV;}suv2Q z4t1P%p|>AzZf@@EI5ODk>Z%-B-XVtyuXjkT7voTbAnu6m>nvZ~aossDI#U#xlR$zG zy`6lSf$-G8Lyw?T!{Kmgd6|070nMO&V_kX4juWVbnm&m%n+!&r57kMpoK zRLNXeo#ul$Oo^ul625J7B z_iRU?9q?H7oj}|=%8#CkZWrZg%ir{xJoe(cA;{GYD#AA{(VWLvMK4E9O^qOxB`<9p z9Sn8xLtOL;W1zHzw&MDp4RhQ+Vb|Y z=;zwP?8>MS8lImSWtG-fM@41;K$}(FDwKcUKtEaAWq8Gvw z2>I%_`f#O4R0KPe0+lJxidDn2Pg#4ccdF~2qZx*EgQ=GXYU*iD&2te#KS#R;2Fvwp z*Twt(`XwPp=^`Z&{Vre$lZ9^xGv+&!uH@KM&Wpb4(>1R>buA)M6~}P5xK`%a)ZM!U zh03UF5}tx7vb?-P%O{Wj!pMDMk*sz)!T{fJ^zU8{Pr0yt0!;Cr^X#K8`of~XQ;%k6 z=VnxR>Yckg~dow`G8DiB4d>XZmiU8QH=W$W3eMou2H@6)JL<3!PqrB2nyVN;c7 zUzMu#MMTGtdlUkUkp8nCbn7&rZ3Up`z3-k$ouGrMc1m7f0x9sDSHaPZTtA+x}Aye84FBV8&#Q0ias?$RU$k5c`<+94%M!vJRy+#7ixp+-T4W5 zXl<`j9^pK?|3xQjeS$gb zo|GHXrbI=ddJn^vMLF0#?=gE}dyRcFktiM2!rgbR%%iQ?VuYzFam4K8gt6q@RF{@8 zkg^Z~u-KG+Q}cL8JCyLsyys(9hG6hvVM9^uU7NQp(qRmjnU*=~3*M1T738A~z(zv% zikhnyPUgB0q&J#K01#Y{$&||t%3t@ch|y(HCKCp~stYRH^3qaKA)`jq_Y(;MR`=eZ zQC;kBb%~6|Ly8~P%EpXM7Td`}=w@64+QQ>OlUS&?sgPFMGPMM}(p%TeQ(1azt*O0r zRDQcI+i_A0`&XMQ?fn#S#hkB?d^)=9gxLrwlr=w=B5<{Ih-L<1i(n{=P^IQaRDi}9 zh85q>KYq*;7R&=ymP+%~xkBdl3v}G$(nAkEm^C>ed~%9P>F9B{)aISzT z)MCz_a_R(wp(tlM@4mrsqc<4D@YKrc;_~u5g{S6ncuIt)ikN-ls8c3p-#E{{OXEb* z&s*x$nPX!1DRt_T;Hio_Ri!HZV<*fcn18UnV&s=9eG7@6IJ7GN?)*2glwb+N-Un64 zzCFPxidkW8JpuPA6L3kyg=SBHO=%`4`ytcEm)>#qdSWY%!KMmiDvHEh2u+o_^A)72 z@2uc=p@FV?q3X^Tkf!bw66kk>*nHCuU2MMDnOPs2Pvk&Xyv!6VF{>^Wk*4U@M__7e zYkOlff|&>NttT>5A~xlCQ|@1OU`D{*(nsHzh-S{3( zPv4i5P3oT$p1LQ%6w(dRQ?+4z7!k?E3ChDp-=~Ko`GL8%>Xkg;&kbY5Qi|$|oZ+&C z(XwoI^Z?9Q?ltgJ_KIp8Q9{c5GMr&gvUhPW3}9TQRy{d6s3vZwVg88TsJJ@cGa4P8 z^@w-zO8k&)E+mvnh0{5tI6^F3rXG3q#KI(oz&a8s8h7%pgSk1zK}?O+!lsqfG$HWt zCifFDiFg!8G2_9N?v+~N|Hy1{J%L~J2!5!~T+1t*XCW6tpFVX|Y*trqszxSHAqv`ba=IN00S=He(iIN_kK?37hS+bc} zbc-W_WMGV8b?1zbtIT7_{IniojJ7EnBJG9M6VGYWuuRpS;S$4Wb`3!) zd@IcD+gxYQ$!ewM4S^}OaLfUmLt_-0qV`lspt`2+?HajH`BQY|%h^f+fl9Ec`ww7X z92_1#d-m-4ix(T4BRL&=+R#T|kU2|4Vf3PMdO@A;PIF0l{;n~;eu5^Stwd6ee zQsJrGv(IB?q-vX(ea=)1v8ii@I(5an^%eYZ!KSPzx`U@ai#ql7Jo_r@RF$gq?I-1d zV7Kx|m!(R1Qq3iF$~Xum6E$*7<|oKM6Cn}m#(Y^xOA;1k^*sI7fVH*>Re9=4S$~uC z(S>&`X{r>NN=Z{OGUb(~EG|`$rV62{^8qq-DJD%_QJ*vwU=VDIz|^hOo39{EO_Ma0 zli6vGt>!XQy}@8-cbDFLN|DO{?dJcSH{bToXtcFC8f|PiZ@yl?FC2J*r`Fezk$Uqz zfBxd|@CmMWWU9rbJpTLR$1@s@k8%ypQzno2OhVWF`y|HSgCVC>BGi^99BN6hjT-5+ zPVwf3P~~wo#Tmr-zfSvKnMFjmDC?y7ANe^7A6fp7N<(|wds0n7^e+k^1hEc^$`6Um zus@ZF)DES~c^SJ@502?Ps5=GvH=$k;zsPQXYDSvI?lq#}c}9Zb+1OQf*zz(K(((#2 zPh_$TjhcsI(!K43Y@Zv3lc3uu4*0eS9M&jvEzx^5#es-`JjM)hkEU@*(aI8lViVOo zrG$E1R;aulI=PfS;Ppg0NsE_-@J<$PgpnFv2Haj|8zGu&^v}BCZ)71vFcEI~r%YHn z+Z_{TCypwsJ~mn)^PrjCnByscmBPz(HLMu~#%@V$u``cHd4zU~T}J#6DN;&j&Uo~c zA42D>i4c@XTWli1IwnFrBE>@Oz+=Eo+@cg#jdDi$378;Z-bgE3TEb}A$U%xvuURbykfTGt(7HcD`K;%CmP^rZSrdH zia9nj_>%pt?Oe^AXe6Cy(>vPHYqLFmZ7%&by>)3;{FCmb|~gk z@S}c$E$kU3P!X6?%S6vg2!kl4N(1%D$&s@=u=wg?${ds~rFe_SrOLQdlt%X_ak;^B z;|6keK~m)5RY^%Fjqby~kgasbqEiA-!N`Ddva_=*cE~)1E)|~2xl_x_>!OAZlcu}2 zzLra)yRdyu@xW83R_NL1WB<+0(X-DTuHio3fVod>%6sOF zMie~{$ZL30fhcE_Io`H=1>AU;h9bcSc}WW1?AJbir8O_%B{`zSC~N}8G+ zN17TZfi5PTvDt#)d{=CYWe-ddnKGm)6$LG1rW`P3kf{X)(;(T>OSg3RLLDOiijv`ch866!J8Z2K@as6S@@Z2 zB1=W4(-qN9XE;7pLDyh>O#Dh{NQJ$3UIG%it?rpKxC_;IXcMZ9$2SWiM~@~~+gma@ z*EZ*s_6+)rM8sovl0=lBEK3l;X6UCA>?!YC5)+8 zROZnP{)%l#5o}wY$Y+F!jH&3#%=0d+p{rJL%ZuUELq`?6zh-&3onhvBB?}of1+h3) zzOvSMYIR5EcluRioa-kOK7Lv0R1y6|H>9O^jNaIbC(H&Pn@}uL7-?-UaZ_4yT!3c^ z7h~LJCc;NH*lH$dWAv3;ICMK5m-Ml+6~}w@FSWKT;VrG&@wF(eZ0VS>-;Ns?69$7i=K8dA zCp?PF2BAlPX)SCuYi8EXOaKC+H0rH6ZhGN+i*@TKiua}}e|k-t4?2R3dPZi9lAZ9= zR3F2ha>!J@p@xkmsb{*6 z(|5&+FGWmo+C4C4wvl#rHa0e34Uj;^S6Dx)@^r^=r*gqfe+2eWPQjd>fH1ciip9n9 zTV5uOd|fD0-Su?`Pp#+h)LO4kdbtWu6`p;xYI4s$iP?8Q5k=31rv#gdMA1EU>Pm^~ z)OX{kQvo~`iK4eZNffOkIzo z^A$={_X2M|rA*Dy46`y*Fu+FCKi|($sdw++|K`%~zy1FElc!Iex|9pax9R@jKMzdx z`hEAW*I&ySQym4SXyz@6_SB*~;a$Q#=jZ1ciEqv)@~2R+;c)o$=;-OwrzikQjM@;G zV(nnapY9P)3YM(ILA7Iwn~_ zM)9j==)b0)*9^|UQt_tTN9cJ<=8>zW4}?b$$)(q(mj_w ztf!A2IcW{UjH=0|nCvw|i1bNhp8O%BV%gi-S`+??NCH{ewlR9%qdjRYj6|>B>WxYb zc)O$2%q^;O%(N5ziCR2xdMPep@L2dRy%?_qQSD9H4tmXmVTnu_UPoqJqB5`KY@y5O zjuQ#Y5@i?_Y$8DkO8-o=Wx`0H6uI@PW9{%n<10)o7%Kc+QJPPh>rK*%q=P~KWS~II zQ5cq5-z+3P+0m{KMQK|_b=MDV(?!XSuF_1R8Z|{{jPVglS3x_NOYbz`bT?ewT`qDo~Z+1bfnzgNZ4Ollg8ps3c)oa{UU=2#n z;VCPMe$!K@yeN8!>QpR>9#N;PD0-qgH8~lmP8~0b9>G&ds(lhXRi!FbDNmfrP7x4b zkkfC|f9jt(p_j?NK5;C(kEX9j`)Pi|f>9_BN`{NIYeF^A)72;;it2$V@p)Y{pA}E|9$Lj4(%<+Hm^kdwcr_ zyL)(F={V%`%`r)Ua_74s=N29@D=*%Qw!$!c zUNXoEm+ALVrwFyI#jkH1gA>oXan4C zxUqq4J8H|uxhtkAF%6|lIlsB{=h09MOxEpo2@sL(!`?xc%+JqnZf*{TLzDz9ha%&K z$b4B6t|t;@yHbUu)NM`S8k&gbB)B#K7DdA-!qf7C($S_MG9%NyM%`=dAggFIl3rOe z*px~(acUysfo@Xe6OLk~9yN@ING(Ki>Lxs2wEfZBsV}5OoLXLMUAa%uMo%#uZI+e< z2b}U+ul8OFLD)uU2;s`MMm;gSC&KNmZsJNO0R0fJXe;WHsmEn>nYGxXy<|Ggpi&qN zN-MHAvc)F;88ISi3CPp%%s0J8v8gOXGopLh)G+Qv*%$&6-xDvw*k)_jl6^|l8us(j z7PFt&9Pl}YtGW;}s$eF--IN3u)64X6sD=1OHU@k+CY3G~_>gk~ZN;`o0hH#cZCILH zY3BAhik|Dz-=-}bWmS63gn_^G+v6eAG>37uo*0iBMb|_HD7{zuAv+zjJ*H@lWf0XX z`g2@&mo``Qr#61nDfN)BTAJ#i3u-izWFciVOQz6c^0$v?`lp>g)8&8@LiBUJ(oVTV zqQVI|fUPVxrHMyzG<$e3hxrXlJgft5*_10TmXB4Ry7-+yQEqL&cI~obK3`G-m9v3_ zT%=L^40Zg*jgUa@BJ+9;o_%AfQ;mu`Ri!F@+v$=}PkBWC^}vcMeQr{~5DUrIyUSPV@vkiyMWzQ9<9{-6 z=?l|G7u(MuO-20naipmbm^yprY~jvV0!_sV3~-u)79>;b?1XcW)0C zR_@IwhlH~^WoltjfGOwA*XhFC+I3O+4!kShuKc6s`L0u!+H&ergW*OFNs%rksFcLA zaoE(VFs4>k9Aj$LDTU^wDGd90nN&%ddMsM#1g1p)WLkOl)DeXZiCTEZ`*osHcRXVX zwPQePF;K5FYLCb2T$`Y-{eFLAV*|yaUmnd}8g+P&3x)%is5B0flaZ20tfIs^%88sW zh|>XeUsqOEun!_I#a?EwY81aSPN=-Cu#Y;;DY=X6qr$sWPRVui5)C1>CsS0a<{1vi zR`=;Bc|AELk6@+JeGO%u(6BQzGvrj%z4jDq5#3sMG5U;9K`Y`6=)O-svCODwH)QW( zKUB?g{fe!v!dZ5Ir;wn!BVmkDff=L4mOmmL*{`AvX+4q8(r+;c+4vYL4a3XILR=-9 zN$ltLzN(Uqhd7;uv;el{(!HY1mh8K;V|N_mzD@6orcgyGbg?bWL;}Uw z4=2LlxmmaquZ3WvHU$O%?g$Gl@*b^+K4`W#Ck#MA@|f)!UX0u@PN;}gI~G*Y&+$0Z z0q4^j*=DE_4We$!Li9t|nk-SHO7l#IpB;5k(bRVu*!r|TWR*@Xm;UCPHgTq4?HF#}Jq^G9& zZ^lLBnO|C3COicTNu&-|S5{YXr893_gcpZTy?*oN?YsBeJ39oXg~ICu-~wG7p@dcU?(!_s8jRvv$-GN9K{)^%s`^OaNzIXzI~e^v`|F` zheo<5@ouP#PWzRNDI2Al1}f^gxw(mQqO$bhJ14D5`<5q!`42B1n3&WyEFyWx$XnvY^Iv&u`D09~xyt-B*PQ{~7$~D_1K zQbec}P||$|av)+xZDi`xMnofpYZ}IZ&TgahUM-P|BDE>n^4Rn7v`A)j;k$8x)CVZy2q};i-KZh#taccq4Wnqm392n&Na$m)z*ozNfLQ<}ef(=7 zl%ZLn&2NkPnf*3PAdzF{mYN4lI9iBw)eNeTg&R_KYt5iKwQ%>U?Y)J3Ut)j*OURvi#g-f z%%DxDIQy8}g}~lOTPa#T8lFgL?~dn=BM^^mJ#hxq6@>F7NjRL8$&yuw0}l??{T0WQ zUh>yRv~h)}rY7y-oF2@b;}U%_kl7?A!?3(LLUmcr!TPXfXbKT}%7Gm*hYI=48!B_4 zhjw>iWFUjX!$TN0R7aGL~}UOGq$T+~FOJr0&}Kdao-%`rf{K|KX>f ze*XEF!>3Obo>I>~m{lS?_1ICTL>Ik)r}6-Tp=Y0ir*2UcJ@@RBWOUIBQS_8Lb?&@T zo%$5&)bXBu7MmI)DUd$k$2>Ass?y(Y$|S%Uk2U}3vV6sa2}A*eZ%4NM(-WpRqAMr+ zxs?iUpC}OCrzEUBCyS7X$(%og0es>*{(*_4DZG9qvGjku^wAZzmTYaZEI!OmfvKhl zdgN?!5yx&HBY|GnX6MftUwaq;FGAz{r}J2d$6~0BwNFn0YS>j zlohB*QOqPrFh>Pjmc91w-MiuL?)&}!U-F%KRZVDNA1TBh$d3r*o)2U3Ds` zPRV8BfOdTSer3w{=Rg1De-Qrq*SBxq$(#}$t&NSK^uDr6NU9=25AONi%tz0G;q&}! z$jQ764YcP1OcAC-J=7!1(x3kwUhzq=>)cehL+M-wdsiO8w%sxsQR5sF`3T@}1;iIm3R7~P(sL8XYM|tjEHq{z zs#$0>^dW{DIjHUVs25476g#qKa9j6oG&9jT!lou~QqnkOWV$Y#-HrXVjH*_u%u_^c zN@uPjV75}W*=BT-JA)P_IRfb{;Tum{PGP85BXiyha9p@DW-KE3)anDqW+uveozA3vLvEk^R8>DR&y3B!cd8j!zYzORJ44zN~#1H zvFBnu5AWw@W)f^llxEZGxgp!8vFp1l*wnqKETpbr@CUo|aR?`nHy{-8YA(3Ct2Cz{ z2ZSd`0?IvQ(5ZNH7yRgnA`=-8$UOyV1cD0W8Kf+n11pe~HYg@-ZS9Cn-}Yc^0h^8HrYd;qy9Azcr07{}>LTz|)9f}gXaY}7!Z#l<(G;?{DolX1dsu_;_ev7H zl7Lc??-%FBYtqZQ)}XM@c*qj=6fzoJE88|2mbyvh=i{98Am8*W5+weEDvXi%$bhVo zKK7<>5gEIZP>OoSW!jb{_a)-D@$O1CbkODnnnzGh> zi8#hettU>L5@{1q;3aO&y5R)UME;2W*PY_%=8D5aJL4Pmm9( zrKm2ow6q*GrWOMdCI8+8+$<>7?nCf%Pz|uSVo$8vaTd?fceT+}b1d45PR~SV?%MJ^W!Q3Z zX|shdbEn#(4p1bA4&;c*h-sC0@iV874we`~3bbd`=lO-TjBX1!cO6sa^7oTojdDV7-4aq`eGqq!0 z<5$YSvIJG}>#yhv+%p!4R^+iid3>W+r<|HG#(gs>vB7t|zEQ@c+X*~nI5%gb>XdwZ zfGu}07(kGKR78P@U{0Nd^D!O!&JCT!ROr;R$URkgF|MSfAcR0Zf-tiiT)J$BYc+wy zHv@9s9}ISa{`2nMfGAZUo`OttgeRhWE~-;oV%fK`u@W?|Rw|!;*0S#<;i(t2?5oWB zqR&3D>{Fk84XRUlQuGn5Q#Dfb=?nSn8ylOt;Pjk?N%)!r^;LMMTwc+U|GJ5ZuBx2h zR_KXUni}l zjaw?Va>b?~&ZN7t#inw=6a_O#2+v{&{@N03s-`mKh^FpX=X}*=;jHICS1qBrI@8p% zA?K%HQ}fYbGJW$cLta{4TMx(-#4Yhdb9i(l#(eM9j!)F3&hYPTphf@T=vaWM!^6G( zfJ*I>TT0kLg-d*AOKue@zXkJv$T3AdhX6?}FC*_am3u%sS$-ojTSb6{@&(E5<;%0P zv-j`c9~~X>XeMRjmDeDkZ5iOfIXR!uSuZ(S*9L>7U9__Ipmbiy9Xew(>_>e&#(OWGysu$6+RA z9h*|}D67w7j~-kti3XR({H-OF28W!9-Yuy|r(@67!sl3;b97S{HgxI=NZJ(Y?hwI3 zB84*q^Ls{9&$4WEJ3-XKzMG7eP7Y(SnHG`FeyYx0pS*~|6RSr^7LZx;pIyi7 zZGuWc7N8PVs%Tj@WSpvL##+`X3%uM@aVXmN-H+r;l#ZhBzKBgdd_*dM3Y${nzNZ!G z0g0ZX7vtzJrt%gu4{2m&Wpxl-76*lJ4DB$wMXKrdw;=QU`0=NoK7HChI1nSh;I|K= z(e_|RRi~n5-@38v6Q6zauU}vaVgMe>Nka1WU592 zYP|CeIne7A=tJ|hifJkZrsyk~$E1o%VR2Ed`8F!we2}9cTAjarr{w3f<2yY&`}pyv zfB*YG|M`FaAO5_1_r5}+0ywi9T-EIE;V=FTgky@D!+-y zR0O8p5R#%mh{B@SsE6>JKSynz#~{^v_B1NJ&&f}LU`iT**NZ%wp_Noiif9Sd&1Rzu z=71E5$`e1cm8k?pqZo>6)C52ylKg^D33A-p+CqC1ZwazJ#kmM6*iPm+M9MSK>9)NS zw$A@Zck@NHDc1*QNa*R zeA+O;GtFM~<;MnRt@RRI!3P#>I_JfYO|cyOB5j}%Fj_euW}>^d!Z{A}$1d9@y*eY7 z#U#$Dm6R4qp*Jxfr-cJYt5(zx+O{u}wbi$ke1h5CqI4)+$58zvpoMkmv+ZEJqmzSQeAc$|0dqL{KozH-&E*{mgN~h18Dxi=>lnf$Y023HsJ(dOb;mNPG6DBq^UD zs!TdWELPoSQ&#On+xyA9DC$d)0#kN^+cf!#5~E?+RBPn~O6t}@>?DP*QL?f>4TDz@ ztxqwJO*vF56^H7C=rwYKI`!0Tqe6bKQWGLOdZjxwt3V9}qz5EOj|i1jo~qQ#EBdLL z^S);lKvlt0m37~nH<-Vh{XWE-!Cpw_pkr?pT9zC+KKQK{%s2| z#eamSR);?O7Ck)myrw!u)~UInW#40BQ;$@2YSxgVSE^I@8c5MiXi}YOx9m&dsa$9p z^Jef*;HgQNgf9`4FluFG<(mT#ewR>=g$>fp7PgSjYUD5D#jholLUhla^mi%1*nzH3 z(BR{NLTapv@J;aikK9$WdvQ%e#T-a8*i?#4HM-|(LZ&KgDp8u^o#0Siedvrvktqs1 zFDx<@t@&uo7wE`0H#Y(rA~aLy=Mb^Zh5S4KQ)0?@a(epHPoMt%pa1;pU;qB=U;h_h z6_|pk79ptt|B`7+3>5mJC>7F1>dPxDWD}*&8W|lpw^caRf)IoTA&mu=BI7Tw5gAY~ zymKI|TZoCOGG?G?AU5^*F=~j3kA@ISJ#xt37h}CZtV*-Kdr^ebrX~p$F-&$79zGC- zEBs}>wzs#b{)C5Q)JblQEhaz`CyUi2vY&;URA~eO)kL50CdDd8b?e$Y)6pTICe;&K zGtE>XBg-OAoJ|?16tpRfzRk3uC7(8?f-{jXi_lyzs(aaSuF@1|a^TY*b?D zI(33>w5co{c+!okEZP(rsGCHRB{X$uNY0ajB~{S+CMrf6rY%850Dfj)+sI z4hY!1>^j+v=A}t5XdM5FExd2}q+X1SSwO`(HonfdZ1=Ii7BNeJL0g8`!PUY%rZ#Jx z6fzr12M5`F?LN|}tJ$Ey=viuM>b}vGT2rvyp|wbUZQ9Z7lWrZt?KB`QP36%{?ThU@ zX|`-FB}|@Ne2;EQt?6A`By`ZKzzvrAwJ^ijcXv~o9H{)-bYN$+UQQd(_KrT$wOXI} zS&2-si}A`z6X_X4?6MwgQued1VERxI3A?yynzhAwYAP%^MhZ%d#S{anbaf)-)J)u` z6hE;75(Ojm+sEyj8$E=d`%z`;zJ{Tzn4u2U!ngp*g|^S4rNHpZ|xy!icaFO#2Rx_74uXB0Lo=`}*Ru zZ;h6H%R-8-mVK{Cif$eDDeIJwXI4J@A~uz%PDR!!(ViM&Q+F)ul*6VPSf{e8Q&SVw zsY#fGZz|jr2dTezDZWtPdNsz2ST>0iVe$WB&4sRMXPQDuDE%Td#kovSt2BgfXpmTn zer$-pcX7Tz7`3PRZMeKDrKy^CnuG$qa#CY7*z-zL>YMM$2y4FJ`EIB)6@2qmw}1Wq zW^g;RBUXDsW9p3L=VvtKI~C^hz%_ahIi`X?zP)|2fGQ*vE(*oNa=t*?wBJ?Y+>G81 ztL2oAgnD<+P=n}3-C3SW^*T-vjlHbY;+oEsp{t#aW*zp_U~giBdz8?7>Ip)>I^NSHnpnhdnWS)N|HNVR2VP zC^vc76}EQ1%rYo)^E z%?=n;=XF@_=8#1)s(qRLuGX^8*`JbEk};h9;8QE=U6URXrGGyD6Uq=>+ zurPKFYy>K*WfS)WPSQ-WYbt+sAu1YWjczxZ_+{U1N+ekoeU3>YQ+5BOwg`3%+h28g z$Gcb(`~5!l`d|Wo^QI-1QVrXzw?3~%1tICC(05ZfBF18Ms4#yIBwz{;84rfa<<^z) z!>q&7(fm^1tRpb069$kx{O!Qmm~rM>+F z+VSm>lEQBaoBhNUaC4} zS*IE-`)*jvzD9Uzr0P^Lfu|P$h98tm*GpPX!O50-;9 z-x_`M(VFl09Wblwmn|eUz z4X?#Xx>37^DpFHoI!7x)JyDj1*+Y*T3ITBx^rHVGi!!P1Q(3nK(;;dHV;PaCqOK;9 z95)mSAnv3JQB#IlT~RpVscMSI!^3o>?~da)`0V3dfKHrlgAz+e))_l%Xced@DQa60 z?9w)232mkP39AtD7CK~{F=l}JiY=A>JmqX>d?S~2@!MlEKChbeUdL@Z=Im?_dgLNY zz^l?7KW#0NreLe01y+JrsSwzT#`aVb7wjLEsR@-d%`GJZuU{}Sg${a-ly~1G~Na~LG-&9X<4B4h`3Y|Les0`#Nu#IEOX4|2CThcP1 zs7O;(Py0x@YxHgW29|7Wnuu@wP91FViP)y-s z&VL)5eX;CYkCuHE@zksN*A*#xbl4ZMsb^W%shaB4Y)y44VpDb2sX8fo6E^h)RHxc! z(1H0|{iZyTAYQF9?77`0-;2iJ}Ny(VhwyI<==5AFU#S>oV_EQD*!~!gDkv zw-TyVU^Uy_-9^@Ddc3>0w|97W2$}P~XiTveNRv*)N&ix8MjX65BX~|P`WGW;Gc5%8 ziuTy+=58c@;Sf-}Jgehmhm)Sl_4NdXnliK=R&B-(NQ#|_oH-R)wOPSlveVd@ zDSz5QelxP2Pe-%Cp0TG>krnS+b}asCCEi57wKL1MPtp$A*-5H80tNKr=I6BkY_muT zUz*dOT{LX_6z=GkEFK=(D(dK#!j&9FRtd@%zEeNK+i1y|k)Z2T-F}djwPmvn+cO44 z7YwC4x@rX#sJB9ifwh zDT*9)Kr-sp)m7x{TgK;=%`v+%O$&n)(#J%zEmk^|DO*&;q(vc?qh#(#MEMBt30yVlf^#?g~Oxl z^Q0un%7bN`cS$=tJD7vIO(Y9Tm1eydwp19IkXs;pK&r7DlU0|Rjt)krjbBdw%qUx1 zTZ2I`qQ@*&vp%Z*MD6lQLJ95v<-u^ySrvlZ1crHFTJRI!o8r3PW z>|0&KyGlIeRi^}=Qr4-bDBqBED&w$k)~ZgWmVFiL)a^FasflIZB>Wcy40X(3%%iJ1 z(PO~#svT(}@heG_0W(n#@?TiFr73(vFvztAbjL-Mj(U-w#wbmxCq7Dll=*1TR|#g%o{?-pSU?|=DhhR_9Uoc& zwI|KglP47$L*-{#?i2ADnW7=kaQeEEP0@Ue=6h85!5lw2IzmyAl<-sC;xwePkQ(ev zM^AISAny13ydb7Y8oE%e(uhh;85STtK2tFX@iikwv8IeGu5P3*vF}=0F&%8iy08@O z7owqv$?RBuCQD;On&b7vbPi2K%#eQ8G<`2~@(EHSeo9+E!dy2aBf5WO%5bw!85$)& zFzKmO8WwgB$3JojPY%QgYjI`dP85DWP5J8aA-0XgaFBj5$Tx zaI6VQ<7=^7s-F}!si0OTS^f2Mc2{Wmn)H6B&Igt4k*2+81K>C z2@6$mcc88^wpWM>mHEj)dg0Lcgm6>SYGrwqjp~Lb&7y8q(&Fr z?!b&7ya>E^gUAFyXlHj1!V(0e;0q?OcLoo};#Q}-M;m8wqFNYUF>r>w{^8k-sgPYE_Pfu|;65=I0b z|Hj4vl7P91)VPL}*Q4$8O$02M)JD5&Xht^7!uptgM)*ErKRPeJztFieW)~Le9hE+ z^DWnX^KA_V1g73b{_|kUcXE1sa&i!_wNVdq4;1YT(So6tezNlXIh&3THtFITk>_L2{ z-jOxSvO@b*G=igf0s$h0bW}=LY2Sh~D)#pb|GA2b$P}$-y^z}!RIuc8Li%KM*DRFY zXJuu@9%MRoifKDFh@|nXfxpsskI7h-oQ4Wx-^965)-`RCgLYDYq5(QcvM3y4P_&** z?N@!6oVi9X6D9?psVz1KTT3yD`f=F4>ub?*CumK|ekcvXlf0O;a9P);C>l=Onji)( zCLpzO^kJfrrA>+zNV#Z|1Ft5FQGp?}Bq14ZNgb2c$bL;mi*MDW(VCh!d5C~2U|k~4 zbCD4;vUvQ=p+&1l<_PLVR z`CnUhU*w3kMRp4d3#vYs%_ZqsjvQ1I3w08+tjpmxDL?gECZn%Nw%I!_6uB1jGs~B- zrJ<7fm5pO#<{>7-K9~GNQDr(>ZTE~V;V}2Q6A&GlDi=}EQI%cQ2vvn)kB8_cI8*T% z-qiSYiRqRa`VH00jprDvY)+8s`(b$auyWoP1gQD>d5A&~n0Ucw{T$PC-;3x?#=ujr z)u#-kqn`sl^{4amb4WisJG=V_2at{+SOw)NL8tZ)4)+cY6rQ4G-p9oJUvr>SLTrX#gOTYUI*i;xFRL__+Vcs}aYr1$ zjZ&KO_I$x};_)%5zE2_ic%>;TP(82A`2q#{E3!BxzWFw2&9{Acd>l|I0j6lp7nG(> z0?kxlJ{OKDs-`3JePR2g+=YKZS1NcG>j$;=waSi7?}N&^0;z!U;v4h92Znv$|D zEQk@`OO%|oVI@SHJ$w&xn*2o5JgP!T0}L+{AH<;I*)4%z)F^-`5M;}pogEZgfhmf? z>)sC->T-gwJX&Ir?npJb6WKP+SM*t2b zO{9!kMpMSwoJ~sAQS`7t%>gpcqY+AnNZ9j8FVbFdaPnAz4+@keU{qO0Z0t{pMW6ti zo14NtwvC>$0EI7!B4&KT>LfE$-|aM@3L~ejean7GL})Kmmkyn^dQM$Sv#Eh4>uITg0VZOUsN59-Hd8!?pg3Ue+2}O+Tv?rw>s!tN`?Ks0zJF zjqEGF@jLD~uQ5B$NUCT+2}j_xoodoNsId zno7^x`P>-yy-ifrv@Lv~PEB58~7A-hNb_>eCEx zHC#Zi^!r7Ri|1V_RUr#T?Ipveb-l{yE~*|ba&^F-sl)9 z4T^wtcQ*(EQiIXmAzdOhkPrds?hfDG&-)#&>wnJqB?7qxH1<#*g0ZVBKtcum8Wo_` zcPT|${Y*~=;TMP6y8YBa^jqDA)PbiBrT}e8LsL`gQ%_D?!6=8*EM52y)dxXy<>Qdw z@l_L9A->vVf|UG2Yqd7&nxT>W9o8rD5$cw|Sa^}{Swo;lEPpJ1etu(ZjsM1m8q-ju zdm;T5=yUf1JPZvV{I*-xs_?NL^Gi;yz%;zk`xh(s`wEjDHI&tdonoQ27r8T@Pl$tI zO9nyJla|81@p*a>2g9DjAc&go(|>m(YcDsqYk`j%i=_{W<@$S{O-iaVz9o=Y@Ca=a zX*-hqOD-yA6jlpkj!izTmNc|%x=n^!QU9M zn!AQId3Rgl7QiVI175FP=D7%UEGER2Z#`I}z>kavvt6|8u8K;p%cC zPd@VLbNn>(BX%3eJ<|DeKiA53E;4!C3jHqDJnTneNMy%tyg@Te{L+iSWjys0$o)bs z(b%}I|7(v6rUp+-^a$|pLzjtNs+%!YYMNQY@}0rxl-BKsmtXz%uIZlHLu8#EqS&9s zi(V_8c&|8!PLaC8CVC9vH~_2}_ddWNrDfH7Cz}=0eQg51741OY#pR{`#Xq<6Gd8fB zux*sX;D{px)HGNhZ-KG>>StoPZj+k!#}f7S(ht1ytZF4ai(K?=3?!>c#IhzU!t%mQ z&GuhFK+n|k(-rOBgTybyEHQ3xy6fLAzE=nQB~n}ujek)yXa7+$r}Ul0mQ~Y>Z%jB( zW67Y5msqQ%I`#doVsiJb(Jv#+&!)YsaU_#d>`+}9E~8uLD3<5ZKXRCvTAb~Qb+Gwh z1TUQ#(`5ke0!k5j>dtwuqt22P9<8!F67&2P1f38rz95AombQ5>OeCkiI zLiNC^kkG+_&fXAv1g91qq1D&sCewDjLVKirLO9P(_%^(=ODVO;;4A7SyYMwKb{)ggzPn*(WocC+=uuz&{tu#AdTBaGOZ|Q?11~7( z`M9~%F5LmPzjU?C%G6d>ut= zw&gI!k(KkuQh~_X%v&d+ zo@F|d%t#^>$!N6>E3)KaDLt(P@EfD)gNk?HcjEr<&=KWFrx9w^0CC{glCQ!@#hjD48 z%InZsETLU$F5-RQ*b%! zDSKo7^OX;@cMHAK+hBKXo6{MnAp3%GT}_2S(LafqQBiY4cnq^&E;9xT`cyW0NtXyl z1R2uREl34Q!WBgf0_P(jC|WT);OpAi2U72Yg!1r-YHIzwZ-UKI_;jOpb&S73k7z0? zCVdUHTJ!7|^s;XSO7^fY*u|APEEaClD?l?1QgGV8pDlhi82?15=&AZWw8 zt`9VcH-dd$mz8{>f2j<%GpdLgBAjNo?!!<{R6Hakh7T9X>yWHBTweE06R6Vh^}d3K z)vz+f@p^fI0d32n0nD#g1OkK-%fg}GSCl5h$WC|!QW&hEG=!W zu~ox|NH?EoAMkR^cp1d*w%7ry&W-n(bCQZ|RI z2VV}$R_RR-VWl1*xE}LP1~dLC5HW@ju(|fDSj(#8G;+gFlElTq65(a4ftsIW9IvBT zQ*OR0J32dg$=N#L4{>=g8zVdvSQ-6T-S#FUKjj&^{JI(A*Q6BAZRlAt&Z-lWUldKF z-Psqo_Z_-m}%Ey+%2QDN&NmbaTX`1<1RA^ey z6D4{)>!r@FprlW?HTjUlwSw!u=0Xd%(z9x=aE=_T6I#{FFGlGOJE{R#X!R$0Hd?}M2Kj0`Y;%+;qdp+)pL`31#WK0t`gZc24$Em*k0<PLr+h0Z@WjG9b(wa{BnxgTWbJ>zC_!tUu#jq^J`0zv`~i`CTiKEGC7{0dk& zXT8GXEYh=GG>FmLSetICvh3-n1%h&{#Db}hSLQX zwE~|7cDseo^z$&&v#^DP4a5zPQ9#CP1;OItQhv-}iVlf|X`owexjwds>{uIQaHi_6 z#&h&-_gn;T+dDtA#gTmbRNLhYVZox}Y=5Auy`A~>nlzbr*uRfMTxfV8L`=`&NNo6! z<`aL1DS5lgP8|#t^NK(Xl!CNs32HUYhMrUil9hc)-nn2+Z3d#%4VE7Pn_pWrNiIi1ET?RnP$Ih`=}oHd;WNLuO{ zanfa_Ez7TDn#CTz#t6C9c|pz@A}1L5f<9MgF8F*kJ)yuQ85-{#?#ySr&`~5E>m1&I zEC1kb^~}nU(EXikY~ltz-vvJak zoGM!uoAyVl!(okt+_)iV9f5-LVrnqlCajXJ99>;0i3)ZDMmBdYS7cwlomYYxxg#kU z#*TxmD9BEqXfZz9f(z942mz#8Iyn`tF9357B!n2Nf9N-%#*=p(SdzJm+C*r2kK>gK2Xs z`al9i3;(g|wan#C!cOe}&~Pg}g_UjVUnCRcno|PylzPG2hTiDi!w_vZwM)v{(=*a$ z{+c(6-TrUI1k^V*RUJWUF)j-dp{$2t&%sy04vwms z+Vr3`8EW6%N@_Z)*`Is)Jh57Gb^!Za1@%ymtCMH6l+YLK8FWHI2dJW%nnx)TEy)WF zjox=K?;g>J|5Z#EeZK8NxT~LrX*)qQA=oj+AaY9#ZwmvF6 zZ(Pb72~k%xfpC*n`*RgNhKFCEN+~anpji{^<12nE(bY)50o`N@D3C~Ai9-w2Y>mC-gg)}vuJPi}vDVXRe%(M7(%RinUw^p?#b zWhzHp;XNL9^b|%4d{lX^>nVL<_}q>8a*=K@)#{G9FRNuV#NwEp)s6X3XI~bhAW)YU zQs+!R(SW*1++JMiLfWgH=_y2#>jx72@9LMF%4~t9G@mYKxnuJpsumDMOw^R zh8r(S!oInUl{nKx@e+H6eyp+vic3E`yB*Xn+xmwZMec{$@L2{t-a$9*G(zHHxPlN4 zM^l64_y)*xxoSn);E&9b4*|cx*fhdRgv-b}PQFZo5M!IigOx7l@t&lg~MY^i( zzXqCy@(o=mZbEqgl2eL~SFwJW5^d#gV4yE1LO~-bG^@PYa*Lwk;-SfJfUo|-lWC;P zAI}Tw5@ll0^>|@n-UywR!UF6UJTH{k!`;23Tk6}#f>?!#{{D7d0)JG;D~qMi2oej> z58B|fscSv`!^6e1sg#muj^^^Io^C7Q&s^aF*d`BCd<#iSFEhaTzFb@=SM&%p4_hI# z%X9p^C}R0POsl^yPSzUDil!<2K|F=~g#FhDQKB)VK+KM?r!IA#T+ZO`-2B%vJIU}a zs@^R5>9ve3dAk{ld)Bz2b^9(=pJj;!xTEe&92H5QxC5yZY#|pEQ$&=@!1=V7 z5*>HM-KY9h0;B%Zm`&rphoj1! zGf6|Yb{pv>PBzo_yL>a%wA~(yp713_=Z!SqvGKE4*0uZ9njYy#OFI%foCU=Extb|h zjJe!YGM#9aYDFAn2j-$!0;Up?vM@nybsaZgqg<(gJVgDW(m~`1Q;JMZz>RMP+`Ls; zfF9xGWx`Y7J(q^n(gJxi(IL48$2F}#j)sDX-Qiw#AR%q;87E|BQp}H$gWwmOP`ZadvZFl|cg(_xFaa5IblqdoKf%*Ez8ar;hP-`R zTUvv77gtwlkEm%37W~WXb`g8for>ha`npBIzZ<-_?Q+rmz17DqPgvj6lM6O^@~#jm z*q3DmK`&SPb1yG}D6$xW*T#agWBq3=l0n56RA097ixhUUie&XrRD-IPie(GWqz;tl zVe7#>vp@`#2Tm$13VN(RQAJ>h&Q1g;TdT;htsqFA6XFjl!tqR#lCS+%a-knwDwv}h zi}aBzhrrH9Kcc%z!hSA_cnHR(1Xj~qTP$FcsV2DhT;}chspzIi&Hq&8-iAvNn<9`h z+-3CVkSXH;6GuniYHP5L^>-C`f39hFdMmh!eX%iDhG@w?LJZhEc$!_TZzR)5ro1-B zviMQO>{+|Rx+m}_H|cS|*92g5s!o{9rF)j9@)`r$)*!=dR$#X7{3)ZIsMV$WbTA-4 zVH)O_GodfJ&q=jJ%EF!&#+u?J@+5T#h3f>aKrS&U zn{V-6^TWdStL?2K+WIE{+uDbjlwf)oHc(`Po2^!4VUvJ7$nqXpBhL zNc(HsIq(lYTM{voaK*=mR_~CyJMD%~+2~OiUFEvCQ?4UJlCYLWGk1~-J5!u4PV~EC zkSx8+h}H8@OGVdjbzLj!TfVrsIQc_cLaa&yu!up`8OnUs4j9$`^eIztBjiDkpf7AV zASrTd4>d2gE8iCf-KT7A&G+BSfR;>v@!DeYyS}&n5tVZ1zg4)g9f26)2>GGc?QH}> zKwA7>G%2_YZnst$ODvUrEfpk(;J$S{F=zjroN&+9s?PM%8Q=IgtLc>uR-I~EEo52e zIWj60Sb)+#e9^`%6fxSb0mxnWnTi2L3A>nv>hZEckT4@s7Ji(;K!^rO6Yq@^_4e?q zth4bf9e)6ihMmW1$R?dF)ygC_3TwCwIqG9|cnX#6Ot8j1Rqs1Cja6s8oQ6?w!W$aG zRQwqpDWV1zfX1ZWUtJXSZf#2k)sP;}Y~8w{74#gM@;wx*ZCBhGt7dop0x zI7Y~bP!Y^wb+yYV$Z12@(@bh&{Sc237Z;DuuJ}D1NvOCVG8=~Zp4kyxi@4LL1ipi; z4$Gka>HnfT)imfpDxv8+8^YRx^XH1!mv%})d69l#_^+uu4578G;C5wI71#Gsrds-T z7*gu+Rw|t7yR2Bf)lp1yN{LQa!R9$Et0MKQjF#r+h*%T+n5+x7$chDyiAs4(gdRgQ zjn7RfOwmzLCn?T4iqp^-MI!jwn>+qO_vW`Hq^XwpWIBCthV0snA?KjWDFuAo$1B$0 zfIQ!>b}>(e@xsABEj{V-kcSHYIpPdxr@c)+rLr_05Is`T<%RvIt*mT?VpXAnqwJ{`@Udc96yEi^yX&w5OxCbS zXA^x^6kj|O**FW3r^P+hzoX5|08bdwZh)AXN7^r}k0e8~B9_6H$)MOX_SX2O%&TiN zna>TS*Grbf1k3VK592NA33xh;2RVk#XC+%S3d8xx9hIAy$&*De#?)n!nz&rGd^UpS zLAQexek%#kaL!6=yq1gu@|x*VZ2TZ*&iFn^mDI*n7c~64^T+CXU8LD2-$La(oC5N( zSP}me_XE_{-qWHFB+@D_9#42qJgBJ$I-t>_U?ujr{tQfGfa8p4;vKPG8Nz@F^oXKP zft6XUlI@q7EBy_<&&Zhf+0HNexHe0O%qv&W|9f%q=r+RV;OuOV?%&;RLE!WC-4z0P z>f1gaAD^~^*e;QIOgL2_vdt`Y5ELMSDwL3vESbp0%&p*j1b72-u6^cVCL%lsb*H*j zAjT+D9mp%zjU*aZO1nb?s~SB@6+clFGwD92k3UYl>|Dt3vPF$=4}}>X^+O$x;>$V_ zeZB1QO!4y6RmoZVDi6WM7X#kxh`NlX-xb4tW+Nn+KFuh(;XH)OuBjQ*8Ih>Y<1qE@ zCg}1P=-<42fW~UCTRp7sCvj#22qRf}Fv&!17ItzEz`UY=^Dtgf_fh_3X+;M8v>*?Q zxAbXuq)3oiIY4CuL3V~bnX2Enw7|T2Funu{jDk%nD;cCQis6T^fO_8P(A%@4(MJZ^(EzkVRTAfSKSbGt^%~FU#eNCO;Tyjk0ZXbjRe@h?>gyUse}GqQ23RtF z!1}4Vn#+wxp+-3t#7c=6Y9^=}azhx{2Js0kz!S{(6LWkc;yX@Q(B^64qnHM##qjb! zn@+!a0G_{Jg9K)4ZOy7D%I2CDGsGUDiO%PSyy#jas2@1g$(lG}V^PqC`(n%v?6_C@ zVMiuQAtj6&66K?L3vs?~55mBM?ZfEW>@dY+(V|pZ^@^(PzSwZ)&MK$z=3Vohs+ERw zp8?zbid5r0-&Ce-4M~{W1--*}=;v#U1k`hk9ZI0$_cA( zT4=d3@4+{l#V&j;Byt5LP zmo_IbpDivXCPiuisQZSN0~wA?J$vXd&&3@)zrAx(P9YV1#}vJwkP_(&(nvr`7q z`cO_v3i*u=c*bITl>t@TywS9z-fo|b0?mZWWx&XxUyt+i5oO9!;9uDkls>g-*bX$^ zK*!b5EOSvNda?MsF)MCowds-LN$-yd>}2N3tYTC+ z@2v5XKO}c!E~~YR6ZBH`t@f~=9c?9VlMZlA1Wy01_w5dRHVzoSLkBi~#%@X-ygEHV zlaXj(w;R!WhioFRj?)jP;Ck~3w@`1#4UACmCwvxO;n z1MIc9xaILp%0wt;WY$RaJ)%Fkt#$vq&yqQ&qotgOSuCOP9X9haA#cRW!>27F(=tKw zQ2~9tA8Ysz8*v|LCAAU8p8wf!PsEk4(6yTDG@B)k<|^yoi5=yBM{s!~c-!-GXoBB& z+m9+{yP&}&K-_9A#OqFTlVAoq&@iK;A{0h*mGE~d7z!? zKAOG?<#C-xgzSE5lp)79@9{UX%jxhFiGXs>5%Zi!{zlVsR|6^7IMOqKGH8M8Vxr>G zq)t7T>$#^}TX&*Q#eUM88Ezue>Ns94El9l0h&Q^PAbaW!k-WvezXB}^-(QpRtHsR( z`pE}eTwEF8-Q783;LI#Wz1=qcm#^>2@hb6y**CJ~rR-25J2=#|;n}*ey5>$5{3KTN z&jI!Fie@v>ObK|@Scolb{>809W*Wuglf!k&Vv;>*KD(cYIHpOsoLyI2tk;Q?r)loX z9k}UHfi9INE_gBhvUY^pj-jzqS5r>A!D?tZvsl0Uv;Pxx8%eA}C&FfL}!>gD`_jrtHdDSI`2akyigGF3*+-diN7Q`L9E;W%Bz4r3Ov&rWxMsYyMH9 zY&!_M`!Z#z1VJm)wo2A%Ge6oE3yB-ddQM9?Yby3P|NGeAY}Y>bcS;KXNUhX>)|P?I zlNpnOK;Fl`U))qV?qfYGa4QY^F=m*V@L@{nH9;!%eV=0j3(7PZA5FTOsTAcM5*fjz zR_a0YA89g2O0Gms-JAB>_g>?7WVuk8?;@5h(P`w|6bd znWqOSO8JDi`8}f8EB;RO3m+yp8662ng6nawcj`AXrm$!0PS>gVGXrlw$g_2HrtP$F zCZ8~Ws$B9K+pZK3UFPY-%Z*Fj9sZW~I_!SDfyW9&JhGsa6U+UGbPA{4s(F5%{2tv? zZ$4%mLQFG5hQ$6r<(nB(1?tnWu*u8$6u(Du2p)r$Ys4lNL|NPAO8u}Iwv9fof`}y_HE|m+CAQqe3Y;mj(Iq2J(=ubUlJl8$k zIhQjE*jpP339H@DAiixZH4tlG`svZr(=UX!1K~})uMK*pN+qGWOwsZ8^Q&7rjdSbq zZ1{%7+uUYR$NpD`UMpn~>2;?+1vaY8%N?U5y5*4%erf&;4jskvIp&~Px=FpToI5RH zSPscx4BKj$_j6RFH(NGI>9F5Cjs-f~L0=!ei%Ims87rpQ;J0ZmXaBC~Y(z!+sOlHK zCKGno^UGt|rWZ;W#hdTr-)iHRRrIZ6XL(>XX9nyGTvh`X5HJ*WI%rLnakjs!ik58b zv&TD^P9kZ9NK)|&!SO%K*3#;7pSw#TH*nwE!;~SMoaU|LW>7vj%)$C7Gmk?hHeo#L zoTM#Cog%*TYW}0$0Cbe*lcb5iXBwPagU3gRpd&%?A5n=Sj3%bCuCk>?V#&xs0URMw)|+>Y#929 z3!qx+$%sdO#)u=oL8*E_mqOh$N8NC|l-_{a&@7PbxAC`~Nn?W}!{zlO6V;LkIMq|Q z6I%N+1WgYRQ(554?cqLJ>bI8_be~EE6?MN_qUHmP8ru83sPxo))RxEQ>PmbbGU)qN zV>>f9uUqiVBDRY@%Tm1+V;NSVOY#ymY=kTFnSQXl)2g^Z;;qyz&hev7RtZoVTCG$b zxeOu^_WbNkwReIv-!nyiOW|E{(mr*@E;(emb+)(n9EDdd5iqUIK-mw%nrU$R=upb= zLL3-=9Kxn`jK%XnOEIJ5=}6;FRnjUFml5h)cjR|pfvbhkW+cA?!h!SbDaEu1=~JT+ zf_jc5=+^NBSSt3OFU9ZukALoGG7b2y3N^-hZy{Fi-66|{bA6j}W~DRNITWALif7Fs zWZBM`bn6{%-6UX3p7gGZQIGs|NX9EWMzd!)*VhI^fjle*Yd5ie|8V~_*J5)w^D81K z=B{_N(~D>jx3Yu5H{iEwy7maP?lZ{$;P#OR((}Yw3JXsD-K#~cR8tcv4uZ{s-TiLM zBh{7c9ryBU-N}i_3rM%}xs5L|=HM2rhL?Hyc`?KAeMAb3%=6X$+Q0j$-k0mspr_3O zm64GRQa3vh@+%iNqU@p?r!p+BI7g0JSRymLqiF8HysMbP?KYI5f;SP-Pv8?!(Zv^WV@N2B}}37SAv#r z3=g9UrBqR->P0ge+C=azXR}cYlF-~2io~!Kmb1OtUm)RELnVkZ)ViD3tAW-KV`+Vz zQ+q7syRxRpPM>e@hhSqjNm6tWQpq+G$$2UMX|RtBNd2lJJ}Da;`1W5T;X2c(dMfx! znob%;#mB0ajAtRg)PpU}te3(mxXLB$-b#?pBpZT!gSua znsW8dAsD*F+Jqte5lJyZp+aR$f1WnJW$5l}EN7zHcV;d4!YQf}=c>97dt|WKA&}Uc zD_fflJPt}>SbyO}T)y{l<4gK>tN2<7s+b@@H26|YRfrz<{Gz)b8tz+hk=@m%YUb5Y z7+1Twj{M~e{?gaCaD$k~b($y>()3D@qB3jCJj~31t~i9-W2@rwvK2wS;unVf^;orB zbKb6-D%S*-8FJHs@YzfXiN}Si;DPYZOMptCsOY#X-X2E-EDz;d_cV zVuOdvjoCs4kG>ASspI)pJ^m)0bKm@{C&MYdRcVtgo)?z$%hCU7)BA-*4HOG8?1s?? zro07ZBGU05r1I@@E)2Xe)#sC8tVzXwJ@BumBpFarBK+HC8qrL4g(&n6 zPfI%RY5(boI+eieLQcJ3X7rt$fn$aS759BV2`vqSb+odRH07RDHT8nFIYSV9&Q2a* zZ8zi~7jF%*FD0*@pPye`xUb73z1|+trTcMJLgGl~?`feX!%?C@=dZ>g7mU7!FrK%D zb7B<$1tQexr%qU)q#mU-El9m?dokc3}>GKF^3icv8QZsK=~RS+Y3_ zqJ$s!y}1}LAz^oNx8H#3QX@GE0yx=|YUCY3GgEKRxh2BW-bDP%l}c@rRB71z9T9;- zT@Lfn6L$-yJSt@G!|y^qL|KlDX}kZj<{%okuOLWPAsdzS@WdeYKFmxtr=f)zUb{*? zuf8G9&{!jcR>kO5su6gdaV_TSTxk2lX3kBly6Fmh!%;9D!Tf9MNV~q>W9vn5Pq@oJ zMhW^n8Xp7f+?=KP-q_v*r}3Hj$fUNS%fk}-C9bNTGWp$a;RYIvoXyd{Bv6iH)pzD@ zlol@>`s5vjTfVkI*QM9Y=L8LJ#(GbRmqdGL#JL5Z;c$CtO4LYk%ceHlSyQh0ADK)m zRu9d#Ee}O3T*)>wL}eQx6z+jN24%sQV-J*ki}hs!s>Syh`TnEkzt6%@#M=&awBk(@ ze_NJi5ahAN&T6f;g~YrOLk{A)23swCmMGPk{xB77(YWKAd;lVmMj^1WvqMYG+)&1A zSo}I;QHDro%`fWQ`h}^*HSKaS4j8PK`;gtxy|jivjA}k;Z8Tbdio}~cBFp27YH2wi z5i64ahsE2XojN?X$j6?>PfYi!>7BI33$SnEB=zhmRfaBlc^!Ioigcyop6pQp2-miZ za+_poGIBglPEx|>SZa#46El*T(zB19Iqp6cf_h^7fkzoofPIDg&(^np@$xRKF{cnufMqG4 zCuIoCTK8K4q8|e#3lS0`XWS2=msvA4GQ&|bnAtXZD?|3{PliyzsM%D0Z@Dc0$3~^{ z*zlvfq-0_~4pJiKkx%LIYSM7bflmAz?R*5;3=TQCl8@JJPGpAkqjeP->s6%Jkot#5 zp1pQU;li9Mi%Ojr)S*>Mb41chkHX+%XHY!P4vE44IQwX7BNr!+=y*oaEx@eRJ{Ud} zq`=>3@Bh{zpF{I>t14S;)YM3YvDg^3rYYIJr(KdzY+Qq;AA*#-2 zwKEp?Fi-j;YL?#3e*W>VL4Zbiff|}1GY`vDnibi#zLE(+;Qst%PD6tARLN4mT`u!| zObDjtT^w+$3}|EkJ%}a}=}tY{sWh%|UEPRq`*CCdK?xlG`(4kYTC>CUv3~n{OW~%h zKY^&g*l&wTV=X&Jf|OMFZS!;EP)k61dKV+QrD3MhX}R(jk zXQ$HGHAqQoizMUgAk)%dm+6YtUz;D$ZXKD{GRmmPIYVsP;;NonFDT&^x;gyo>AJ-V z_$z<@Kx?slcZVc+B6;6PB-Q8QJia>G@42sP->Nkq(n zLEeKaB7++PX9FtQGW=?Hbuy!5Y))hc{;Rf4es-Bdt^>ScC;6`FW||0>nG;L&Q^4!N zNR=dLe4Bp!s(ltRTODDd3)uoJ_jAH|hvVtnc%4AK_4aH+P0HkA$J@kTzFV31E#C^= z5bkY4p7H;P=ma%TqC;%|jJ69PR!PnOLoKd44h-t94*Hbg*Yg%b?j@w@O^izQeP+0w zqf$B)Ricx%tgMe?ZC~5^z|jAahMG3j+VL$i=ngF<2K@Ev698Rr`=_BHlyvBuTgZ_v zTQIt9hDydiMN2#(Sxbb)B$>ZL{e8(VEUZz3 zjHww5FH){7tBiIkl0uO|I14}B*vtgpVRnBf&m=6dv zl@-lVNVr7z3qX7St)9bNKcj|9>Q*Hwr$liB9uHgAEI&bY32BOOL`qugCT>g*=@Q{X z9&vTJxgX%c^JYkMpuRp$qV}GjHNrtWm8@U1&;}yuUVFYos15(1^0^w^prtNBfVZMK+JAObfc496_!%AgzafYmq zCMJkZ;@sz#hlk;@v9W(Ir)w{}wf`PZo}-TYa1kq-?$vlhErSx-L=V_A_6j}4Q|`wznCOFIb8&|=Q+nXEum=v?v z5L3)6d(#Z7a*pd%br8?sbW%D9?z^jFWga~TOh^QPw{{yFJ$hvC(6w$tH*?-RDHYfC z?LC8*%F%IjLi_Dhjh^4Gqx`8ezuGC*s1+$|EgquNffi!q^Xh=TycjTuy5w!?+Y1S_ zjWGvABEmD@E5djF8jSx?#5;eI=xYN97I%>S(L=$;<<8k$$|lX+-_n%I^UmBwKcaM` z$#wsw-K<5?^I6&e*XsrTk(K2+S?X>v)n;unHb;r36=(xil-)h}lH!_wG|1_`3+vA- z$%*}?+tN_;JU>RWkcz&fr_}rK#yI6r(M0thk>^)@XKvfP&29v*VgWQ@k-1mCWOu@Q zm_0C1M?N@VnYI$Pr8@dP>Zp5&{J-#x_plUB|we|3jWb(cEc$vSFO z9ejl>QJaJ&ErFLa8<@GifY-`4S6JgTmRg^vogI^%Q&PXfdB0EJ!LwAqJ@$umc;(ef z#arn)RNZ^{HT+T{z0&>|N7dQwa&8dDF040Zk+J9b?gdA|agD5m4^zzJkKIggapK zX;nhf0HHXb^YQWd$X>3wF~1(bQl}}mKsXPx%Q#5)T)ZvkKlHl`#(l(2%CrE5&=UlD-mJa~;f89( z$T?LxM0%u4Gp4hxEiGQ3KkK}2<}L}LB}|tX9}!`^^wIiCmtvnoP#$DE`6lg+A8V01 z285JhWz#1OHHAABaONlb{Vy1l^0kZO%4k(}f34`oVn|gYj+?)kP!RS3t+eK2($C-L~Fik)W9b8u(V)J_Ov<0kjoD83MpOVhygJ_O3 z5P&JQp!hc&PuR{mw0bP$wS)uzE?rSno5+k3>(Iol*J+4}Wv_TN@j8xYrHipk`b{oV z>?`C}@wC_Kczs>eA8&CSiO3XPx)P$S_(tYmkqRgFS6(_Vh6EVAhm4U<$(+CY;uh}w z#;fQ(qZ^_ivxg_3H0`jns7F`GQ}G7)4%B48gi_bhh@^FG0*q3>MhYJw22aSc4HLPXFO^HJ5*&S~pD0 z3Z%s#Orlp7ntm<20UNL4x$t42Tq@&GzA_PO>^WT=6(MZw+5bAw!@+mhxsIO~J`n}o zzU9Eq4zUsJ03gDq$YX1mVE8Q>AS(W%%$K+YIp+=-UlNi;8||Vq(%*M4-2Kcu2UUphD;1W!yu8SeBO7i%V=qfQ z$*!_8sm=+93Uqmv($m5!r~5}art_&bk*rMFSpU}bY7-7J2P)NjiSvKe5<37$Gs&0s zXJc;ZOM)D_ngr`kWRH_xDLr55C}US_$7c>YWD!d2ES_9W{;WI_JZw|YpKxyaC@w~o z#`3k0d9CDok2vrIflqSAnu5|%1%6mDQgVq2iEL-P+%SzeTR!a;1%lmbjlT%2{GjD_ z)?FfGk=oZ`@L~Lt)8x`Piv>8PcIJdA0bK5!OAX1j+!$`ysK zqSC16&D+IKT(53+s|PqP>Js$$Lq@|U6Qn~AzPu#aPWMN@gIi6zLzctwTM)w1+zo3B zWkeF~f{3ueuZ2L>4=s-Uv#)qNF2ZW}MtYNcJTA%d{E)-iNQkYpDZbxxt#O3a5HKdCH3(GR?Dijdh6WsG7j1l1=y~6yWtNdnT(bU|$aF*ES z>n2g*mkKBKJVaUs4ISFTWZvpGK4!Jekgu_e;Gyp^ilNrhOsv8IShZt8+{Ak`k*CZ* z<40R(xoS=4B{On6Rqlebo4UV;64gAB;$MnQ-oiD0NQHd6V$k|fadvoY(t2M0SE-kZ zxH9?YA9G$AMUL{|60_uJKA_|jE=G3PZ+r8Ni@dd~!6=3eCV%6kJIVx^1k)Wn^aZk0 z;#LUfK}o7GCalB}P8-W6PXE`bjt>wLjZ%;F>OfEera()8f!A;Q^Xd@UUR2TDdz%1p zjqaUKw=UU&?{!=H^J-n_(~OH}RA&=|GaBsotR{zW;m%~%GXoFtCGgTJtx2enxXCIa z=A8PzkR!9iQ1aMt@dklISaTgar1=%bm2&OY(rLo4#;^h#!I;&3 z|F4S?sW(TUGHpBag6TL3$-)BJ?_TwLhKnKOB6AwNe6-ttokOa=vJhDJN@=Q%MlQJg zyH~KNJ7bZ0cXWvQm~eIOCOFUdwP#d(NJQv+P9c82^~(v1bW~6r;(15R z1D-Zb7GXp(Y^FI6=g(f;%m6GbH?P~9KS6hAC(nLNags6d6paW6NiHHcCi*{ZP93b% zQ~8QgSjbZGp91Q(R}X-th+mhr8c~_nt=Ysv^``SouAZ3qI(2?TUC!Fd3qr(DCKb`R z=vflP9AZc}Kz{7d-ZSEDw#p*B@6jB7;jXSP^^r%lIe~AQt4s6UfD@%;+L>om%F24S zI%x9cz5z90Un&ovA(taADk_@JAs)@yh^PC{9|Oxb-8bF!lX(CU4+bv^5S2giKZf8d z_WjiPy`muW?X2wGzMD&Rb?w|8Pqb`hhHbYPI zK_fJVgky7b&#@1E70$fbF!#+fF*w9f>*74t*+P;K$* zmKp)`3H|CSMonOobMaE*XiYGe+x<+rD$B5sC@&&~CARoXgX0KA1^f=uTDCr-bz`>n zc?n%<@PqMBHEDKr;DM)2@e->@#6M~dEj#eErS{HS9%PQLnYn_~ZD$ohA%_uc%>Zwe znpbU!g^NAPj3y2?iPCc=KY(WhIh2xAb~eBUo|cjw>mqJLFV)dr(mcOJPIX7igi^+qx!O$6U%UpIV!4ev0O7%M!2?i$*fCHk?&a%u z@Dr}@Boph-!md#w7J(9 zi?cz)_+J_1lkDomy8+W|^bQ{DSu;#GZPIHOqtg&;!Byq}GR-Pc9x`Ru;NmY($5C)1O1Gx_ z^fy7Fu99M>?9NyXxj_8N*6Y%3TYv>#J^O^p!T|&>kNh$%Yma6Ib15X4-nxUV`NpG~D&MVuy+M2>_Ok(%yW-y#oUScy!WV^Yd?7 zTjF^(%kX>99p#Lbx4y@5_mgABVd5Xej9-4nkRqro_9av!VXM2j(boC%H^uo0dbf%A z=8;_v7W^~piMu56P_Lxth~~O})k569K_@1bL29TX$Ydeswtf)iV>U8NV zMe|`T`?;wk9e1iq{wC>o)TkxLri>6UR(U$(@vtf1?7K;++FLk@V?W#!-^x7QtBQ;5 zj-)PGn5(!zBPUsFObkd&UaS#>L|R(Ur=X#%gQ$ggQN)De5`nqkOVu(|MwY)TRzleq zFFx9v(ob44NmFq3r^=(=l&pObE3)#9s}SB)_oQ(OHz2bEAUm|Ew5iaCuS>S3zBRHn zG^<6Q9?D+BRnXP8wdYqq=-f4NofA-DNRIlu>*`KnFlZ2!SP08{h#t(rhY`1sxsTlRR?-5U`q-eZZxe3m8^0;{Yzw!P$|jh7#iw61z*A+sPnnK>ItqhaO-1(~ z*0N7^rzw(Q&|;Z_cmoM(+Bx!5{hu4^yzka6tkSy(dwZDDvx3qD*-Sti)iSzU^V~OU zc^4jj=DQ)9+2rig{5<1*OMR~~pRG9KYP z-o@Y{Ky(>>v+=O0%lIzriQApAZEVq8YQ;GQC`T9^jW))+<=0{%J8}aYS81xwf)2?L z(&_df1nk;vEa)|*sk^mnx!DJfYU;7MjjQ|T3*t=;nOch0e2{Ev{O9s7FrNpG@qv&^ z1w|==o`M}sObSM*~pujOD?q&iy6>utQMhWwI7$hPly?i6(KtL=M z5mmrnJVZ3q<$h2juSlh8YV^_d9%@djJvx~Z`S1?)oe(TX#7ty6??qbgN-pa4kjv`o zD%uOe5qc82Z)^lbc|0Lx6og)Rg@PH6du(F0-BWcDm6i$VBQMgYBTz-BG<;LjhF@JH zB(l2wnrK6nMsXr}D=W@rr8^G#(&1Xx0zyT4ekki~-r1sN=TiFw(_cIFBS}kxv?SG@ zCZA)BVX@^QFR$)i0r{@D;apY&nZH!NR_glYYNQ$mV##cRTf=*m2F6q>mLZsA_!wJqKQU zFW6f6QrQ=6G+hSUE9(niI)$`sEo?V6rJpTB>0C@UwNkcfE!FY$@~zkOR+3;-?I2Rn z;-0=8lcbXNY^ss3Z?@5ph3XvEWv;H?;OOSdSGw_GB9d8PgmM^VGP$}M>h>5_pBYt} zQr&iJ*{FW-d$P9&*~YRk@xDyqsk;?CWvHhFo%((VQB_xoLaIsng*kFB41uZVFRD+K zeP3Xng53E2!-v7nPEeiN43~zLZC_>Cw=1OR$~qM+`$&pT)u|z=!W>nno>Z(;fvc17 zlrW-O)v1bdD%6PH`VbZaBHhM_uJBX<0Jpc%Xb|nj#-=U?PfbEwV6*?;rTDy1il?F9 zyA=Puf#gnDF1{F2MAfgcP4=kXL!*`JDBgc@n``9WX9XlwIk;01_+?5!j|7{_0aKOegQ9K=GKKwGv8kK& zV5z3+Ea=Mo{h$s_J*0pUl(Y>rRVhsonhIP_!JIEDO|1ssd<$$!qdWwRw5>)W|J^)j*0f4%5N6qvo`A`s25hzNAclg&fBj2jDo?>4h3&>t| zWwsgoQ7IQ~ic%}wq<63ARVI%1MrrA%PrI1_)%8hTy1Z zAl$HrYZb_|Cjy&@eXc)+rjS6%f6AEhd2Gr`l9l`~up0{RkNN&{)8Cd?wC?`Jq&ohg z|KLAs;AqJU`0uLNkh2=~4xRL0DMz9;Yow>fb z+FQG9b-3meN%}E62AY0qid@t?%U2;=m*hDW)Y*@09ADaOUb$Q=r;95QjzwIe4`Z&ocvAiCYdG?lIKa9z9q9wp*QKPtE(P%^X2sAZz-Og zm}pxiVWXY9)f~2vRFXwy%tyq-C`|SM)~bc5QusrjyRAaQT)_f zpEv81mP8^D5rc=ptu3WWNZ_dn>(sRd^e@#Ouz6i=%GU>W^{$$M9770W_*+5e%4<`s z`pQEu+T4vtVt*O+o{r2EX8o;b9@i8PEh&RhCE7S%jDkUF+`qPTs$AuJx zY3lWYx{_Hy9?=EgE95ITfpd|AT`vA!y+Uyix!>=fo|4b%5D!se{Eh`dbfqfIsLFA( z2t3urWo#iO+vJDo$P__4zUin&j%5ms!tOv@Y)S|kdeRw44jB<(QSBhbsT6KfftgMI zUA#!ODpK|&%kH)(Un^GedCxFk73S1j#IusU7uK&VQXh=&j=|TRdN7-##`YUw;2?QSZK{M)ob1w5NW?3`+EE zk~B+0sGela&)vHHY+2VHOj7m_lh6(~wY+$d#C@A550Nz)`LbAXwyAB&{jb<&a0DLM#QvJm*au%|9#LNjT4uRY1d@1vY~xm7MiVO!=P8%|)j$qB@Qz z$Q`+eQdM9qL9to0TPpBGY)Yj>-p!$jC={u$XZh(CDar+>nnAN{OF+u#4$(#LLw-Xs zc%6r4#Y4oOii}V8b`?L7i=&9hkK#h?dX1@FPeE&>D5Zm>>$sr`;{~rUN3(2dWVNDI zMc0@tWdSiefSJn^(p)@#tf#_GE6KBsgMjA6(G_irznxZ{0bdwSy_R!UOZn~O^{+JL zWpinIG5OUe=#QCYU4z9#K>lG%1vSkg*B2vOHQN+L^C2`Tk1w9j#l}pYWZTNtD4ToP zKx^;ImZaZQ)C&g9T~z`38H)qa2CKfFG-L8`WSiSp+7oQ5a!Z05dScG6?iFkz*)&_K z!_Qcs)qqh~!X#5gOMF`;dHE;4V7^tePc&e=qd_kIP75WtPrP)1t$tP2JA|$=JI(f& zuL8BTv4oO*ti7~J9kbQ(uOtnaV07*Ala6R=1RKZBT-|YeJNT4!FeF*{X7NAyQrU`d zM?(u!+aX!*%IG>oZjj8m z8=ISflpz39L1{|4r*?Mt20OvBFRD(7W#5}c2yn0De)7YI5AQ#GI669h@#XN0!T*g$q)>^9>(NzJ7H^n*N6%wRhNxkCC0!#(hd%@|RP)Olj{9TN^=TyH6H*pe>I&bu-E+y#H^JkIC z6aN?O@j22Ogp0ZFD{nOwdL|vs zRjh$?PuY@j?=P){%-{i*^jC1g8V5}7gO_kKywA!{P}tEEa?nv znu>OoCX=>h_O{P$`;(1xp|zkPou((ruOnX{`R)Y^*{PrVF4!7A_~GQAWQSAJ!}f}l z4VYE-^T@9)W!9<3lPuQJ<>h7S6Smvb`;4+f-G`)J*{>}*+ANZXSlq}zPq;Yg`fU3& zCB+ZecQ8F^?CGnJG-+8!PKw-+)6W9c>asQ~tMU&jj;rYV~LkVNy@C82C3lJb3Y!DO>dk^QMXolruVzdhqyHj&5_`k)xb zyDgGZRt$j zd#vQ>5QmQo>_N3^rE^LOvx4+aCOPCX{;)T4}9AIgow;S?Fv+M`*Ys!rW%P@PK5`Vwp^3r|hV z`r1QJSd@S7QVav{f`9K)d`2iQedM=#HP@sq)`{vCmoKdbE%Oy>&0RjAj+bvtE-YUO zwAH&DS2^L+u~qx7aKKE$*Azx>dZSs;^VpQxjz0sN5@5>cP2C&HIH^J3!x}b~KvUIK zTjW5G)a8&^c6N7<12A<;mwZP@$Gf|GkaOsFn7~w|kb2G6ApyO8_wM7zkBE%Kf+|)3 ztb+Dbuoo1xff-g-e6Pf^FKVW-m?++J@kE2NJ{OlUs11sGaB#4P%<|ZJ6(( zSs%qqHWA(Ap=ppiN{*UYe|+cyG~tx#fuL0`#N%i;WHBAR@2S+p%#aSL(WEHY-Nz{r$aGU8WsgsOR9NQ^9G(Eu-GXKzwMKhHa@XSz=A1eZiE#iSPl9_??9 zp0e??xoA2`%Iz;EwcrR;3WY2_ki46=?*&4Fi)Q24Qe{79E9mQ32>%t`;q@X1vah=> zTQ-rF(5dUBC0&5gj`pM>Fh{;0KP`nH`J|O-#%jG3`*i>wv*9AXk z3!g3FMe?;>kd!Ao-m-nslzS4>w{UxvNB){rEn9t`UG_<~jz0d#7RVOH7o#Z-zv|3t zDtSu*Yzl?5AQob?Whx08fdx zzQ-1uqDx}DcyM?K32kL%g_WwC^$F|L%^V|of=!K7ow8z&bSU0hU0vl?i_aHRo%*8% zY)Q(Zb0y46lQ4F`Y{jG)&(GTL73ja|suXgN&I1A7uOuld8;n;ly!Ca$ZsP^4v^3cs z!spyn0HR!uvcl;8yrXGje?U##7 zOORpY*6pbwK{wv{-U!i@C{1l__79Ja11c3<@*N)>9_{TPtZ!@t$1b7}MN}$)PM9h4 z6^Hu!_a8oe`uWqRPX`BwG0EKvDsfB5q7?#TBOk#2(=>KtQ47?D-7;@Ep}b zB~i8Y^>rMy@5oIY+ri2?B$BF{PFjqugI5NF!S;6L23mFXZ7<9ik9f1fUpg%Y0@RqA ziC+AOP@#d56e1HrQggp^QOmN@1%+5sS~0 zcU5{X9gliZKZDrMWsXeP;}6+U-^m@L{O7E=s84Q)StUjVwK6)*r@W?QZTUxHCcY7T z^^>;hdU4Nt?NLf@6+)en(gKG@@pvT`XRcKbLmicD%&hc$$i<9;*oA8dC^Yc?2w~* z9S&$%R9kBOxm}zLvz7sqZA?E(lV3|g@6{f#y*wQklC0Yw`YI&J+I*WHHkBmX&P{F7 zRF`b|vmtpad7dq#uL#Z9xwmH1Y$|{9uqk~TEkUuGYO0?pLSsl%0=J1LEm`C`t28$? z$)0QXXuGTOv))fBHU(j5b8{1djn%=f;FLO7k_Npai_lcmn^OBeBfL>+v$7j`#iQms z1-Rgpv z6rS213~H)VOHp-7Sf`NGQ#$Mm658C55j}eAt5m0EAK>BY+M2*qhfn6_0yaekc)_M_ z->zX(?Ph&X0s-lBw1BlNXi=TQ!=ZYc6g5n+%U`+mQz>RdSD2tr zU(KJdFPBO9VgX&LaM16rt%T8q#Y9|dt&Bkr#X#oCz(V|cSLc#Jv8nNxvZ!S8RoPcg z!kEz1MUqB2dbuC4DM z92}pV9G{#X9vwmCpu*CMcy$T91Y*iJAGD$7U&+7MK?+*j+TK1oI$m8}qhdMT6uuEl zzn5|W_vA@swTHj-Q%sI2$~?Rgw< zgX*GSXd5c$E3*UzQGTs%OQlg2Xi{O7s#8>>DkI;x(xu{+@5Irb3Q_nQ3Dpp>n}$dHuHSE?y@3{-OXTh+B}IqjLLVj|Qd2Q7!g*v^3eLoDWiz#3{rItkv9Dm_V5Z~Dn6RDOXbAwD zZT2K)8GZb5xk%pf=UG2nlMhWjp8cwr8x4(pM>N$4FVgh@fu=aOLA-AWBZ#PGW zU-?{()uiTe>i)a)9 zvfHh;B{{+4DAiRg5(HUQAPBrTJv%!(KIyqmg@k=uAz|OzTG%}dN*WXPDL7Du^$`*M z#S4L)Vm?8J_0exiY*XWh_2E@^9Ep%D71t>p)`un_7SXlpbOUWu;2bjmb7tao-(cDS zI}oWXX1|_!N)qk8`SMIvmcS>Uj;TxIYY@g7BR==#xI;IY@Xo}v!NO-Mep5GrB$5t` z<6AMW>NHsw?x(y1pb176FB5vCd^fY=#?Xk5onx3Xwkg+X%JrJE@C7!W@8P4q+f?6a z>X~wyingiG@87>aJw08G$d;0xuTx%<&(wCZOhIG$@bOa&<@Rh*#?mibnpFvNuyBk|1bx_F>0U1F`8O^EAcW=5s?(+g@l zxm|P9ObRe;`YRNDW1}oucER4NMNOrW?0h@MGN<$;^59j3Y=vyczt`7RHH;hlib8D_FukLAHOot1R^<=*SISh*2@@yfKG zW+QLU7}mBacbKFvT8wB;5*txmrB3O7NhJ(A&MwJanO(*0j;%Q(V&-J4Co2%whGV-A zhS$S~W0U@GZZUUy*h?j5Y@MZnaJhAB&d!vs>SEb^$Xc(kYHJgsrv$;?#kf?u*Pg*3 zG9!rwzGw~E?#p>vxAyn<@rj>F$seustnf=>A4ixOWz}Y%wpQ(!47}93{IqpnRh83( zp3L-~!Yrk7!tbfLXVaXbbquY%;oh@IP^_4ki7-|=!7~3cZQqj^2RA>zFf>d(>;4g& z0slc;I}L75`w4%Fu;`1+31&(n`>5MVeBb)|26VII%sB&0iXx=;jAD zN?JfBa=kiX=0gJ94WCMdH*6|?f~;5EA%9^p`JbT9Apqmbq} zq9SyzTJh>U9jH1zCv0}SNLrjgyldMO${ZXV9335@^YjlF8KDWNZQve-X@HtlC{kjH znoAfFG+t2=!Yy+V=-`e5O=V#nxnqqytd_bEN>Y{89$6ju)&2V%9JWObjm0GXu1yP7 zA>4i#08G2ofqEio1xz?$i_+7XfdQ`CK$shC!4pGw)}FL)fr0VU$ZogwmnyOKR4Q>BwU?~@p>#{B z=5dZKw@ullhlB~QT{|j+o}IVMyKK1CmTsvKOVZPfo)Ua0+&L*f2mPSGOvu?ZsPsjO z;VqFZ_FbXrs%+trQY{s5+vQ)0ouN9dTX&yO+i0C1d#ThNm(PrUx7u-pR_eYzW5rlv z!|gI&+Wcr&Y&#_)>e|xM626Lm&YqX1OT{HmliI z?n=z%*%iBVIeUxhyY#1!g`qHn{J$v|EtNLe;-RY5!39K*YpuD7USU+Yd(mtA2aL}7 z`FT`JItZpNtWV*h({w|P4chzV<>l$w8T6?q(a4j`RL|&1-Uax*cnLL$xKGJ@D&nFC zJJNE8BARSdosJjx2SZHX;Spo^n1wl7rvffI{&DB=r$7Dqx4-}6*WZ4-ynK&asLK&( zy=R+Z!anUf^(=4*UPsxc66DkuX6vhm^-W-&65AAHD~qPdU|7KX6>9*)T=`<~ZWK-t zm>Jw2M-gzlv9WP=-waF%498bZwAVz3F~(qC(I`s7FbUw;%`tC&4H93zY1#C?0pXo_ zi>#(!gBYDe|KJI3m$^L|2t1x>?ht)&&RLz|73hdQ zg{7HUrbLSgYE0)f)j3TKfu?Afg1&P8?t&gu5oYTB#l_{(@d+*vi=YFTiXKxd3eudB zebK>ujhN?jH3#z_KYsk%-~JZ7wmSdw@CjB$ISxXNm*TOhT36k!VNSXd^aA9Mgm- zO^cC=Uj0lLB?HWov`tyt5h((~FQH%7pcJPo7xtOE6A3&&%PflsJdi(a^$IqXC`}^O2{q?s9ioQ+(j1NDy;AEL&?_XxlR?b^^J>&UbIb(jfjrI+!&oKb5;}I>Rc~>ZEMD4^xZATzAnvu zlSF${Cro2v0ZqlXgrSjmh1|f&BVJ6CJ!=@>X+ge^PqQ&SAN@40;$6vQ<8*nu6-3t* z$Z&!|*H1L2^u#>yGjzjj^&`G4-ZXK zF*_e2%sZs1y}f;CDZy##)29y~J`!o_^z^LD&9}AP8K!8PO2Fowg(@PScU8uhBq67M zj`UxD``h{X`7p9C2KU8`fpignmGUV+dE6)2TSVWeLvkzgUe7i)Jf2H`#Uv%d4KXkG z?}Kd!6FlG+i0a_rV0U*HHDFj+hR$g;9Elb*mm>9s*`m*bX{UH+$C#a>C8Cq!FmT>w%suj_Uxrhs%`=ImQw3& zc@DU()H{_mksa$Zc=ghq5AQM8c$<}P3x-^Kms`dP+#Qj-3W&^h(Cyd2zf;lBDv_^dIIEdf>$Y@ zZyVFsQ{>`}0W&k`Ymdb?B_Qc>>+KOSC#kzZKiS*c13yWrd)A?&C*u@!J8hWi_8nvL zWjamqe?#o4xChDILnvnN-+zEUc5!(LrEYg`A1dG5w+GQWb^7Mb!Om`o>iQ}{qb8Q9$onR%Jk?T(Lv-b>Io*GHPdCw_5p5z=^=9Kvlxp9J(# ze-YbM&uc1bFGHlM)nPavk*1)NKq0w&|NhgDpMUxFxBut={O3Ra^FK+4iMjbUgVR)S zj*6L!X_BG=Y9+Z&F>@cCqZq_@aBz5he6kg28wJppR}nCisgOf%zR2biDl-Z~GbuLE z>mIS=v>J6_EyAA zbsakBM>EwQf$Vl`_;Q=b&bzlXYUyNG^o_UfbDJxjx3vxWK1&sb_4$&i!S>6oHskYd zMB`yb$dWX&YHcyMfZM3c1}2gKc9q7lBphA96-9k&X*RNkD&?(6?NwTmvsSX{>I%8k zO_y!An;292!7}K+RKxi73%L(<=|D@87#++aAtA^Nu?WvVo8Te5ckU(bK-tdL}@2S=1FGQCP{iEZLKdMwX?0+6`F0GGf?I;ri7FkZnBJecCv4!Y%F4S(aI#Q(c(Han@lL4 zd1{VXQSg`U(@~#!D8QlgCK8p7dK`73gdv(hoDv8XEmTyZpw%VSF6eet@930H2P( zE@q3EE^ogF!W)Ux<|+nT{i>X}5{0TaOjGWYW0~q~Q+NyyNQZ|KndMlf%1%=nYibCi zSqkWT+H?GlHlJ57JJVEBUxr9iDLY?`=cAHxdUp2y!-s$TPIUn+3_;nrN9-K0e>+cUk3yl zA2e)j!En1R$!IQFmO6OSB*i(EJ%^xAM$&-^4^ow3n+|8r` ziiRn%?TArmE-6d&q|yeW%&AFFjZ6WSIie?#juxEhBSdk|3=%xMG^FDT#Iz;HTCcmC zU~>ir54NwW4uSlTv zgdkblKn(e*cieWTE(A*hQ?BcjwN0U2P5^wrN>5Fi z5;xjBB|iC+-9Ct$r_*K05?5^)K@9%Ym%W%*+`G9I&LM*YKmMKh7fqcs;L=E^5ia2g z#&x5tluSWL!`*fBG6@M(*JP+of6x^PlbJ>myf7#B;7T5JZ%5juT+@{3GXxo6gjdOF z%7H<*8TxdJ7s+5ZG)+Ab&`cB1M?iw1Z7MlUt@WLzb`KAaE-o+MfB5kEr$7Dc-~ayG z-+nm>J6X|ViZD~_G)%2AlrJUu>$cShUd5!ti^=huessyde1%#QsyaJ6`}pw_L-`)Z z&BU-*C@ARB2fo93h+U^7L?A!JJkH8Ubx+hl`scG4YGQ`gs8T+K+ywE7f`{-h4#Ail z2Z135ls8RJGYL_ujf*(#=TGC+Ao(e|F?6K`vQ@w37JHXeC7jSQrm>`Wl5=b>fot)M zu&Uz+2g)I^>1*uPK*8fde{(rI$XIo++B&n=^#fSCQUA=WeA;Yf>&aTzJiEnqc6KoN zW!2f5C7b25^_D;NzEr4*9zJ+#H#axk_n3&fNpUN-@=PX{e>=FE@Hi0u`c2I5Y-=9$ zVZdFIF&d}ink&3y@UCzH3|r42bT~eoR&X(b;zBSL0WpAWR zvRmAex(sFuwI-dLG80IvhC_D;uL$|f<@3y&!0wp3+}f%zphQz=ESuY-j7ckPx81DK ztk+o?o?#F-J_H;!&FY{Z-6qXt9naXy4(!R1KlQkjWLRpeBph3FsV#Rj2YpLa)=)|8 zE*ow!D?Q7MJzu$zcqt>_PVPso?ML=$V+hStjO(}R996n*zpNkHC&~&V__DOiR6IJ} z?(ySC8gMgeN222~XpSl#USBjorA@%s#4`yNq-36oZd6NgH!|pao%a-@`!-SzoM4^m z%u@kb^vxUEraFAl%`LjhGhttbh%S&*FOqEvETaCy!^6wVOQ?=nIvb6+Wg(}yGnmCPDs~v0T(oT*+CsG&PPfNZ|YJ&9}QE<$D1~#fHbuk)AKhnYQR zI2QNrfhDfcQ572^mMJdjNV+@8kR?{5L3E+S7%;@3G;>mGyye!8PN@LFm*@yY{C`&< zBP+}fTuw>_8Z+*;kF-sd90F}6mhFlFOFY!;v6WPAcjacgV5_S4G&7=>nzoHr#$sga zZf7&;)hl%SlC@=TsS|Ip7E~(%_g-6-m6hHG(tm~UWB6&0){jnwyE7{;+1gY>J??H& z;`l$&?R3%>ZJQdpPDK~-&QY8oRJ}aRU4);86=h_fa+q3z0v1yzhxj`N-z_Fr`K6RG zc|~wWH#avnp#g5~#I4EQ2t0LobcBB)BXhJ(ZNl+aiy+fU178^lC4;hw2>OewH zMcWkP5MM;SE6>*V;Gwlm{g7-^nMOCXO-+o5J_flnkXckf&|gPRSC@#`d=-xxE`&pX zCk+v!QF?DTI)-+YOO+D({resU)X#&g4 zy`~ZhI;}&{QHJ4saoY@<$??ev4O17Fmlqe8r)TE}hlkKtFawD(wH6)1R}zpEs==Af z2uDDrCwfeEB);Wgi!HiNg_JQdGa&AI_wF53q2M(2?3q9-B=F4g7Tf*%f`5*m=wYVG zpid_!Cs^;$>;593pNBAk@MbG?)DX|VC0r5OCKOpg@ zq;)a-XtUBxLXp}JU=D9(wU}w$+8A}GpHnY08I3em$t{(6i&+9TFhE?G54;e+%%G(I za_LPHQ(NhI(LeQ7TfQkTn(B|CTS=ukId2QNjA0rO{ljunKd!t_8qe-wuV$8hhU9E1jxzxh+o{DM^Sh8i+LV zhQ1|R2wR42TP5CX{lU`y@+Dr&I-1D}q|&=4t=vm;Zu@hfa!?_3AMaH>T-wUrm^ouP zx0l@Wl`^&q*)6VYZEYFbrNSjnzNo-BS9ze#t#-EXzZEVU z1XUXA(#g`av{lL1O}1>B^p4dknrq77Dc(9r+fUTo=ouy6Q#zDhV5jg5LcziZcP_zQ zYG?2JO1GiH!|*+7cxe+-*`*?N+8#6FJ$n{X_C@_FC|yfS(681b=I83_YSAOOjYzYQ&-xe1ObWnnQZfUTRrn!`s>t?1+ ztkbk$*ii{XBPX7~x0f`k&rLA53JF(VJ2%1CBRo(tuWpoVe{VGMyEf7=RkBU#&#r5m z>Z47K5zr@CQ^_<1Jp}p&RFe4wf*!RODkjl1wY|-NKByuWm%(WYf8V{kI6XT%JUn`P zZ~$dBs3k*>sa2Yog6GxRTHJTrjA>j}mWg~Gfj1Y3b{>5=~tB;>MjwnQLyQ>6Lgu4HzRVpK*KZEmbV(+Dez&{?e)S z)=-rvI%}dN!$zeiYrLhFzUp#fc`mVCc?D(Swa2#d(oc7=DuSv=EHhGBHnenycW`B{=!T~=9b_|(vE+_02=q|j@q6Ljfxg~L{~#+9`w>Y1)~kOJrRR*_cg z?x@_m+F+9HJVGFGe=O{m(aT!QFOvHY>dg;Hy?dH$Q;+)eM8Quz?whBWw-4XbMdBtb zEmO1G+}eVkM+*}ELUa4+r=QNx&!NaIr9DCh^=)*(4iS0^b7=p~!C?sP!(>XXQxVc( zb8~HNJ)%xUC{gBFo?l4W`hx2eG|%TLtnVok_QlN0lHi8%jGb+&5Y`ux0f}vD>}-8d zHaCNYxyl#s7uu$r$u@{iL=!tmG|}sW=ER%7fO``b#i+8=fC{r^z@WzU!VeQMU7=WI(x4~vlUtyf@HpYxsWJmH7l#pFf|`= z37$PC&*H5!9xuA!@L@Y|j)YR!Hla)Xx^lur93q zyKK7y<02vx8Zv(w4TIpkubz!CCfJgt^Ce=nm<-~1g>iS8l%Lt+rPOqZANP#=Y-ioK z<@F^FTvmzuQ%=g?OjWMDWo)~)PWSc-|8i0bRvY517%Lrg`LFcI7OM!*mMj(4$F5P) z4q~M(IUe*KOG^E1`*O?vx@6lOxqxbt$!lk42k&vbAuG(=1DB;z$K9W<@SC(lO^Y|x z3|*!qjq%H5C9`|+DZy$K-x@J=H{Pr$je`DLx!nrTvNW=H*|Dv#Qm3uZ4g@}P;woTq z!`$0532-}x9~9ekNs@9>uyMe^z@R+YUfW){P1t)iOA=pz=Ypzo#;|-Dh4T9OGBiHJ zqPFQ8x(%abo{A}kU)(X&X%0~pK^g9&G3qBF67=>Sqk0pPyvTkW9`KNw`T29&a|HBY z7~S_YQPTQezIsLPsesY9xe3i}J;GBHQ~|2gr%#{$34`{o%*5Y zI(2tcSf4;nK~aQ482-I|dsk(C(Sute*EaQgqbZtkFae0d^atMZ_0m+r421?N-f-&9 zb(k}Zew~(S^eTj&e!Y;ui3#sLEWIhE8^zd{68%Q57`Qt4CRrYCFx9_lwG4f(*VOp7 zslL;cGEF7VqGX%uS*DnwFS<>=JUl%5`0?Y(=_&LLg@GRP>OpIX(R_58IzBm#p?vQz zE-ugCU7Vbp9*1ng$52zaS%zDF{QUW^KmYvKzy1|vh^ra&nTSKRmJq1W02LKxZwcXp zD=ScpUUc*l{5?wqmZ9G8EjL8VOxg=Qqt4FGpwx*FM6Zhq(lSj+;`^-yJDajOcWO)= z2Ql*Kff%GsRZ5%tr?mNKMTi4+$3Qb_b5LeJ%5+^jU-Sf-?FV?ys31WWklP=`Z0YR& zOu~|~jrLWq;urSEF3HP}1mN1nX#_5#wA}cfUEl{c| zyCwT+WmV$PZBe&XXN-TDh`}=KvM0ydwrQJl8MY-ycEq+`>F+qTx%b)vZiSWMvo%+K z+LQIU(Ut{kyMuRN7ExPgCX+yEG)sc2^CmZfllAp=yva45o;$L(Ay*pqUbiFo$#7|j znsNI+QXsa`iYTlkZO!AfWn00^5MNR{FNq^iYsh7TB)+?Lj9jwC+#6jP+TKC_gy>ma zU9B|j*5H=6eYf1Azxb5w?Cdavwk^ZdmzoyJT%_85Y`#4n#0-znQug-tpoHD&NA_tY z4=Oo1msNncRhqr(fjZKLRlir9Yz7)R$`n( z)r%ISc_@G@tEOT&H?reVOZ2-!>Ipr?h$MuH!nTErFs( zp|)qyh0LntrMaXg)vY&A5#{(M__PQ-_-zSX!jvOE)pSiRbGI2*$R#|>c)q6SiA3K* zybyE%?6u1cEZxA6Kpm)f?a%mB=qkn~i7T8K5AZhA$Pe0x41MDT^cl;Pa+>N#^l7N6 z&S^?i6e3NT41Gfs^aM1;aK4R%G_~{Q?OUiomzVF~U4&@9v$OM%$oC|8C55fG_0IHk zdU_hNuI%hAEiL08&O{LO4Z=m@C+bE!9r(b@m(W|N7sU;=7xa}9*Dm}81D65V>H^xG zc31xdCChL@KLin!;$CZQS*%h6X;Wt;GuT&^qbKg57 zhbB8iqALZa3Z5o%q8rjJy5bUY2TK>WOv(YnKQlX|t)$coR~jYxxXf$D+yb_+Tb{>w zHkm9tlcy^{%cLz<@1y0A(Smq|b0zM!JF=BhA2T78j;+jXukG!YHz{0tft32Cr2#p- zj8x)zoKfJ5-R02bd1R+D>uy~jJSmxp@W5h--C`L7B@XLtjU1hllw2{ECZ2o79U2~U z`zdN=C5$Jx(V?&^-sDEmurKOD!eZL!WV@2Qf`7RmG5O^v@_H8n3(ZA3uT@@Xwe&71o#bANz>tl7E@1FYZFS-~!5IP|~iJ zt#3@*RP?;+paurF&?i96e8eWpk2#1T+c(WMZfqL)K^wz1 z^+iroecKeY59khCktCq64>dK!ntH0^`DmLOnx;C9MCWHoAn3cNXXlrf0ss8`-31h( zq5U>|;zl3u%bgsK_xr-&_JB(14kDd(=tL#@}fNBo?J5itbYM zEz$S#M$u}TIFmDvDLn_W`Ouc_Dl#ty(O-)$QgW~OWet)sExY}0L|TTZAxv9Rrfi8- zAv?M4jCUV^(z8)%F1u8!w!&)DH-cdj@9*zpHtHCntP;&<#xsvCS9Kn;?qn6Zck!DG zR<#vzOzAad0ac%Sy0f|fo`2?-#KUOYs*JdO4~~2xx&`o>p(&N#6s-|mX)H!gQCloC z2;gxJ=yQFyc9(6pr|#szlO?GQxL?y6;g8vtOQl74_TyO?pa%107BV2IXU_8;RBJ$@fTVjRK4{Gl^Ky1Vmh3Z4~GDuQ6pU6jJBx|)wjD#+Z18Z z508!x4iE7YS8(;OKmYv8FTeiRfBg;m;Zle$S&Er%7}hrcctMB0AKQIFr*71NPftQb zf06-;O7i6g9^@20m#3$vCy_$-jwkd0x65A9MhSSqC(E0f}KJlJyO2eQ(*QTi#%+N>M zR8mKxA`+mZqSsUi=zIJ2;Ns#kB<70{=qIPAN5{u#^x)udE8-PI+mtp;g?}L;FkVew zRjY&`nC}Am=3{o4#ehGMn4w_`JVyM1K;RhV1cl&%GE9laGE`c`&AV@v%KXpng_O;A zMZDDWg~Z|{BSXAIF=X-fxs-fITZgpKNt=uY%Kt>q2RGENjoZ5n(9>R6x@LPap}LDyDkvGjD?lZ{#5xj!@J-DCQ< zfJyw#rj4b{)L=Pms|LVQ-+4f&>QYC>slhEd&O5V-%RL76y7kyOmJLUCY)i_|OomHK zOAPqh*w`3&_+YJ(wp(q+13j0ReycQR#w2?eUW}ODBeU1l&sR9H_v&NXrbYrv*jC&| zOML1}m>c*mXvN!d-j+wiEn`dC8uV548lPIePw<(mw4R;Jszpb{tRZIeK>@E%H=!*m zE{B!Q+A^8IOI@(H3%71tl`|C%Emw`#O-c_lpGNG=$ZQ$5B5Dh{OJmf1INHy7YbY zoqzs3R|28=;p+pPZ9Z*N(s_zIj2-IK>Z;^y-r3z1^VHt{J|p|~-@Mt1VST%Mdmlc0 z{Q2kqIzN9Wu2WrD-+Vwsmu!7K$f>7KAJcV8K~6m^+omXI)Ct~*`Z5LE)EJ*mNHO@E zy?#9zN{{&7?C$PPu-MUIMAwcF4Dk~G=em}$gP59ukkL1AnLm=i^Hi)!0?RYS=tvGO z1bge2P4qgQl*ruR+M6=H_zL=t@D9hB7VMw22ntD0(nu-XS%&ZrnreY44utm1FcXoCj ztWp;j63usdc6NMx49$cP=+R>;_RO!)%Br;|)J_VBb z0t|)?zThI&nbiayvy0<<^oadHM?>Zs1wk-0PbEdJvmhlOCrXq;g_Q3o?M2Lkl(uYl z;yuRvDWYBuQp6vNiIOR|aCpVle>P%OW%jEkfqrPCQ=1mx+Jj45%qmuktck|x=dN){ zFNmx`W6W9Jcx#!)tc={sT~=KN>XkQX)gYqdc}#;xal$nHg+`r!-B6>}Bjb?mR91gh zQjW9X8}lvW3QhmC>)Fb&74n!=>ZV)2d!sI_SB|BAjZ;sBCH*(7F_)IG%-Y}IACzN) zY?s}>+mj`US^hKLvXlB2Vmo7nuJs4ogzbB!JGNN8TD%qU)u`k?b2)cqVmqEyvbniQ z`=O)_&BR-3(F)VOu`c$KH0p(QN&Oh&F=t9Oe66g|GWm?d_BcG)j+9t++s*nis7CmH zQKMf}CabwL?qAx+Oy(u2n%i@+%%;35bpFAkK@$`8wVAZxHPklLcI2JRPu^;MM)8X% zOr3G+zBWN}V@^xNUtC zLMbs=VyV7qLgu=4f*bjE`Y!$VCLq0)Fqt8g4)*x_<>3F}YZW}DU%kQtM-t!UT1(Y7 zwYs);nCOR?&@H!3c^XOy2;H$w*?_*D+f?T@B~DXo5o!wB1ycq?<#=~-A<=v%r)MGi z-PzgOw+ATDMf0t!M#B_6rUFF}186VXm+#;I@@t@%7H!{4T(t#9HQQF@ zybS0_`MWF)JZvsoX3%#Na*r!rw$)~1H%`rMVW91e!f-b3`mei!D9K#kH83zWy3CA$ z5-N?Ry*-nL%bP7+7nBu_mQTn}y0o;pxhdN*CH8FVF8?mil{zhNdUWdTx<6gv@OHd} zS65dzL-6>TZPD$lo%wEm-PSYa?az@sWampJVz<$Xz_aodma^LFx3`Ae@)Rjwvvw%6 z9@*NmYOR6GEmmRD6{9N$S0-bMx74ZJI2C&o0HY$&sG>coX47VtY-w4VRqov4H`VR3 zrK)nwDcYt4e=4^7FgZO8xjArl zH-zw#q-A4*`8H4~FTZpzgI_B`wUF$$%r#7D+Y~;&+?IOv>Xqy1T>+aKTBc~8>TjD# zJfCZtdik<*n-Zw07|s_wx1n;JpP&Eqr$2rE>8E$WGIc?`O}a~o(-d`&&S|PMOf5$@ z@RjZ8+6}ekFMs{(FTei!>Bk>&%wlwMLv!?-0v`f~Nea433hT=`k zA~9o>pSBS0CrXh3SV1SGjf>bOZCc}S;#m`!)Sy@QR=al9u*NJgvY-0opbr(>niYYq z#NKH1y%B~Bw{XUlIHB1m)YendLhX&V9?O{9mR*p#Y!8fG(Pen#NmpF9Bkp{#Jh zG8vP}(hSL(aJz3?FO|1E*oN%!I4hBHnsB*t#Z{L;r6Jn|dy8(R)O4kO`H2_KdITtD zz@WV`t1TNQYYWW|?1XpO%c`|KZOt60Fs9|>%GS1$y+z%&G#i%Nkpp3?wKcnCtbAN? z*^`!&(s|olTL_4&v*G^KUn|Q)NeC{tr7^OXDva4K>+?_>pcz(h3x&9ibw?%R6VGaG z9uY-C^uP?zAyfTmrs_LS{UBMHX}uXnz$GOxK~4?frwEEpTTrKEC8dxXmE10z??U?) z7ZNV|a&n(qTVIbL4{xC&#th7zd1`OJgGI+d0D{=U)vfgnB9SWBsUhUl%jd(ezGq!n z-;*bgnXONS_0cO#*{1IIY*RW_-xr4Uy^5I%q2`H~`#9#QXq)=3%u^HlNKAzW5i9A- zy#gjAfgi_uWLk9&V!ng##=K9;nfm3W$dkco>fnI8*tms=1R+i@ z8m5*b2m^sKx0zFzC0Drn7PXYvA~YWwpoVFVlZ$!4LXVzQqN1QH;1)$R#uO7PQ(L3W zN<#Tavk}Jp=;-+9=m`9v0QkSSxBz3cI|Vs+0eT$}1kRvQsAT*5`?y8)90EXPR-kO0 z(IPrX8)H^j8?`D##TAXx#(md)bqbxhx@~Gdj%l#7ZEcNjn`+zd$2Ns$ z;VMb2u1?<`K8s(stHX~A;Xx6!_f}UZOckR|T{p{Sd zkif|ZUo8eZW2#)E(eJyUksq-!GV~Q}Q$^T;dj;E+O40W)bDMgqOg}n9-^Lf>oP7TL)5lLgUS7U`cX4rkets5wrA~s=R0Klb6{o3QDBp67j$DVf0=+4~29M4f* z4y8dU4Y6x%w0&ee^=wKQXC>fPUMZl@xV%|rDxGaTs>s1DX${VH_y!6rE9+@pGPZa4 zXwZ*0D{Pq@DJZu&RE~EwMvb$Vl)b)6_uBJTV!AvZWD+0b(zv)IVlS1t-}cACtv~zg zHsQ8t8OU19daXsx;Cj0*u)VPS;6o{%z*YgS@F`UhHlNsNwwqQgvkx@tQ$8^JM0Zm1zWCKv(3CR{SuOCcAu&uzs34RCynCTd zX~ZcW=1Kd+hf3k1Q!{+3vN!A0&CxcsI8TM`H4RkDXbvku=u|r~e2@Q#i;iJFe|K?o zbiCDVN^Y$uJW|}rO-Y9JQ3vaEzh`~dsgz;x(GU*3=Q@Skp@l*h#fYGcc$D4!Lh}?P z2sW62gjNnEF?k+!M($~L8; zFdeU{%r=#rricNxvJ#P|Ha3WYzPq<~dUp2iB0!)AkEzqs!^5MKlYle@4P;|;lZL6~ z4&Hp}b<$fx9+$0>I`k+$<6wpYW8O3>q8v5Z z^wbt1{Zku}c+#CB_M}#d8nv|1lWbsszDxCwRHd@p8*gbK$C;_eZMrEa_9Zs5uC@KO zK!tf*Mhm3rr*gB;>cC4cRcRFS4U-zPnXYRU-m;(BXu9`~$wO8qE5>yv#@1nETjP9~QHi~Fl=SS?(ixZAj0ZcoZkL&AP1`Hlz74!`uRZCKa7Di< z`k6Cw#FlIeBF$!q6}bDe&Ra=hw#%fu5iBv=oOSE5!bjitL$Fm3ufSzHyHPX1T`#SH zms)qFbWd3TD&4fg5#m?g<=Jg9>y$o!H)hWSKemA7%2w`f;qvaR-ea^+JJ0C;ZgYA^ud* z4g(fwvP~@{+=mFputW#@?Fc-j%~P0a|NPg#{`K#F|MaIn@9pgqb!u&WgWmPHF^2Um zq_DmhSy&%6z2rKjY*P&Di{_~xB63C0P9vdw4|3{Dv-NpYnw;6(m{mEL+*iccCNzqs z!2lj@^nJ1#{;-5xovuFmc#>sRKCKWfj4Z0cSC8JFQ>pXD5<_6Fn~U2-oE~_)-YB_o z!(}oTN@AMbv>sgtjq?Q?4K_70pwF{R-LpH@Ymr z+egR8@7`TR{PXkEv$Mk^(DBLX>G8=4ln@jQ_~#)jUo=d;CX)Ixfz&~~O0TNu(H$^0 zQSZgY#lgWr^d9dBjL<3t4#CmE;UR7(TIS2(F13Iv13JO;=ZA-f&_;H5cf~42TN6s6 zW^|V!bqqX2clf@7T<^rpdXO3oQ&54R%UxbxVo@If`XWSUG*U4oA3xb`-;qhe`s}dE z$r+WcPo~H~IY%{SIiRoVs_aCn{H&a8JYBj`8nr%Cn&0kpub&)QL)MCB!@b?sV2yQI zRkkmg1RAq`DLvR(Z37S0D&tcZb}Mv$X1BYeBL!wuUVExEwzzZfLq40Ers!(Wuy-lcryt~y(F$uzie|P!Wh!_ zsB3VgVcU}4*<0}b#5=M`$Ji}RF|Z!hkx;XBbBD%E0?xkoe8hx#uGxg^XIpSJ0yAolE% zt>3oJc_NNmnP)_ zgY7WPiNnpf)6+A&fi(yfl|k-SMvU=3IQru!-0~B*dgVP8HV5h7PHWQ6?k@EuXp8vA z#C=c#gKa8B@DX_G!^e+*|NB4w`LBQd`Okl0Sf6&CS`^o*m#~75hP6nOg(IQAe;^NkAB0&qUF>lX z)?DIHG?h9B5wzs$_1q}p0{U8PchD&Ca=R{(%Jg7x(6#U|U6Q1Szx(Lgk)N-j#`3jo zQx9mHGGJ3sE!NjVUX_>g^G~1kva--`JI3<`k0(an4V|WT_X7BN#6LefJ3l%;hK_V{ zdU|ql3N112g{_Cge9=#v`)RQffjVD`It+;gmX424{`99mfByXW?EJiAAi8#gBPvB` z_u}&MhTtZ*=_xGW+92^{=@I3`GFxLl|+TGnnG2A8kiHMiQC^^W4 zE?5MxQjYgMi_<_w^JOZiH5O&2D$#QFc|CR9dUSH2pP&Z6c#Vw8e2z z)0*W*)^yfTQ&{+9jk?_|Jy-5kcR7&Vm33LOXW1@2+xDs+P1{7)mc3Nzpvy^Jq!=S> zYRCqnE+WfY){BfK+fb>M#>@(ycLkW$GbrFBS0t8oDznU#Dz8ha(mTkUkv{a=va)i? z3OQqv2YB;f%^1V1*IgNw__S4J=kbc>dY?Iz-5Rpm>Vj&@LsROh%WY{yvI<>ExeE@SwVNNleT1j}x5YiMISMW~?o%vryqdebDrJ#7Xr<<+c)to4%ItmrC2tB_k^ zrD<0_U)ppVAr_gBQWoH)ez~n%{w>2zK_)Jr_GDWi`+4FS%&3FI!?yxw8v?UaS_6IEs%1keRUs4GlMB|h=BT+wu?spj}#(TaHfOM)}lERtT z3s~NM{`?b^w+|mbayv5aJci&tX5|~2r*?J@kB;7d_;7l5PTSNlVV|H*%`bFeeMFr~ zep7fILC*wBF>TG`VX8iDoBE-%P1!s+NgJHIqHU_KROoraE&hq^2@D4#O;!V6FZg>c zi|Zzu*Dz|B9$%V9>MDdTqd7GCEg^<(9pSmax@)ooVU{TH@5~B1Pipbx>0gX)1V4ZEr(&N`|Sk5X~2SrjAk1+1dHd?%qa-*NeGV zf|l}{W+<^oEi80C+b@%66wagY!NI|&PoGdT3P_4T!VZLV#?POl08|?M#Yv{*12;^} z2dxRk@DXH&K9f86ZgP5`L*I#CE%NM1IOWa34a80lUQ&IFQ>L6`XU0)o^tV9QU{8vk z<7z%~siHMCWi{It8}vgGvgY(9@y3B}Jkv+DDm9dyhvacDG*!$N3AVCqm(FMjR35x> zWa9SMW!ttga;$aX?8dCNN~78G*%e5u22uaas;%_MN~6wOsfKz1U5{0YY%faUvdoOU zWILG2q%~7Qvt;kJgW|SMM~J(9q-ZN%R}=$dvMzO`!hq%9JtKr?lW9O@M>XrIW!sgf zJ}>W2=C9F(ZNHi-S^i5`-2z!FrJ>A@<;c_C+n}V;8_)S^HGT~@`ME@k(aHTJ< zpsc{N+ega5N~}_0MQ-k(mpB}!#gWrs99G9+Ll@S^*%$eXc&o@n9)uY$8}A_c9t88$ z!NJ>ugF7)rTE#*&8}}XX4aGAxtI*LirLfZmV-7p3+tPoUteE;_wLRhMhlZqI#-gJ;t9o|%oxC9T{HuX^1rc$=PDcGj264uvD0}dUGu}9NIK>C)% zaQ<)Xt00YXZ{_MVh>7+vt8Y}wvztR=!-3?dm{D+azAXx6#}; z_`aOzFsnsXyX~nYM}EB8f@x}Cln}=@Rj^EzfY5ttNb;J3ngRW1Z+|}+2ZDo;0=rCJ zQ$(6trqk5=29p9qtvEY7KYtfIrjCzKj*gB$e){x}fBg6V`OklT{q?tZd9~K#W1}Wooy;I2cC#ZfwSBy#gnVkAM+!gCuh+v+{3&! zU78!wOz0M+g+3eALWv8jD<`sovsVXw-waJ?1+N`+L?C|$eXEz9OLncQxe^|-@=9gu zZfp$Nk6WzulyIEHxNJwF&xXCrZBbvvgp_C$Zg1Ik>-D%CRyxvpD}`|$*wO>;a_I74 z>lsAIO&v#5VY_rGySLP@lDI5~t(mTN{T3n4jivI5$7cc`sJ1WUOjdd- zmWJ5&s7b)o_&VSvKuSS zxufjzQ)16H=eFpUsg$n>xx}HZ+zw)P#_hY?FZV{v%pkd2%gfM5pHF&u)e9-roID$U@>0b*tSOe z=P5QS(LmRgukhv*AEGH%C{BZu85plI7Vi&gRC-E0JKw=5U~V)2>|`+PgBWLYL*!8Z zal*$#Xa4tKnDM6Y_DCkfwwogt@ z#bfIDB;@A%@BjYifBy5IfBpO4KmPb5l#LZSO(nxr$mf#iRhNO~B@IoqMkPn7RewB>FXqS#VSQv;aK!KZKt}^&*LnY^q_GJ z!@|cKYtbj$!eYOPKp*@2`wRwQ#w%T>WK(MUHmi!ctTihRITrt0i3ZAAap!PWPuthq z^)1;`PFL3mE3m(__|U z#_f2eFWIr>t<;LX$k@x;n)^S z(sL!?vQ%PzU>rimueQRHZ792|jW0%g6u7U=PrQ}6ZC#s#te{%8HNY~=RYBEAQtwqn zT^SKqlDhAek;;1EHa+GgE6;j8y33_5lx}f*G_u_~hb6{b=Ce9&6Q%NQvHIXPG1cJG z(h_qD*mko{m0HJShL*xNx!Z-lc*B&{8iE`opQxe!*H;f6Dk+E7bqZ=y^26!0!v~sr zNt_>v0~IyJr+re1bGnU8=2xa|D&e9B=P5?^b>VyQACvZlO{s$e9Hy|o_0_cw2m*IU z*Qr;6h~A~@ixjZX35QPeR0>P%*`{=+=FB!V5)M7SqYfg0LkMJ2+ti4OdMgMLV^rXE zGjg4TxyPN3E84p-If+g`-Bs!hS@TYj&?71d6X!P+FPCZg&P_(w2pH8wF%ZNBx4T z#n3XfwFQ0R>>Tv&^z7{TmTJ=|(_v8Jzzx86#m)Sc4p?oZiU+1uNjQCQPLnPD)yWaXAU!}j)y4X`a( z(p*tsxH0rJPf3Dix6Z8B?iiJBaaqlJS8CK9(2T4h%l5)0+e$VBl}c^0Oe1e}J81hgPRUXkJzknh_H$QUZr5CSR*GdFgZjXVx;11O%ev1{JMo*c zC0$m>>3DW&(1*&m(y-mk+I5?=d}bWlF58+bogGPS*@o%L)1IOK31iLNMoT*L7cuGH zo5`(CP*)@%h11eb33q&LCE3fo@kY~)Oo7*Fi&0g4(l<`gHZ|PN3~unR7Z$s;eRR1e@Dw!2jgB^>nQD7$JNQmP zVEb?0Zbg@>a3&PCjM)M6=^G=!gludj)pWo{Rz7{WW@Ng}G zV1j3Ujj0&FKf~z+G(SHtw$?Ab7vCoO`AjL_>u7~UzH#^((l&&ztph7iw@p2K2zBV_ z=qMxzj;^zg+tmFB{BS=^TE`=^872sq9mr*eH1&E}o2E84p->zjpD-oy>1ptrIyyQ& zJUlu$JbV+NhwupO#H2+L0{!)Car1sf%T!c0=pPk8&V#KI+BSd4}#(MCikf%Zki z0w!B)79;vt-5PHKECDi>FhDVVqt-1=@^gTKSC$NM}Jl${mh@KEo*z88<4 ztT!nE*B0jEYfA#f@!64qirQ?OP3kh(@aEmO!XOScpoW* zku8=^^7Gpo`XW)dXX<^l0{*KeTIw#px{>7Z9aj8_MJ_qnxmW_jKn%Qo;^~lzm zWxg@ODb0#f-{mLXDv}Vba!Z}4K=MsxYshAcCVawzf6m*tOG``g#dlDTlzB>Dy`z=H zevq1V9q%-sWWedNNSrKGR5`lTzz;<=dOXyN zo;)FTI{HEtOF%w_v~6mR*aA@%p?(4}@;r)B$)Te=0n%xnBh131nBN2?WfU@P1m*Yl z_RyD1^BiaFwT2@#XE(Z9kgE|jYQovpn}Sa6-tHFD^Sm`ngHnIxyzWBw)MSOTlY@So zj$66gO+8v_8YK3fh%as)i2=6*DAYgPQ8J4Qm z;&nO4cb{sl1irarXD`_f>XUdkqGo(@+Wu5=|CWTG@y`SMOl4(kdE3^=-Zk-q&O{IR zkXbR-$4+0$_^|~_jJe0QOzCQcvewT$c!c(STUEE|IQ(3E&{1tSXy|`{wI*4Ew~;_<&DO z$ZEF~+?WS_b>k|wDZMr3*rt?A<6gv3mk?{+yZyF$8FL0yhuSE|_fD(MW{@umuKjEGkFW zBgo0$QR-{v+h9joiVZyP zsV2U=MD4WpD1CqTU8zyca+9c>Fw3FzbJ59w71mBGGklG$Yo4d zXoXM`i(A0$QKd{KjjVoGP^F$)mNNO+jyGmLv}*3ThP&+KAOf}%AV|VL-R|o~ThAM3 zOc9k%;@QL-67P+YG%^P2wOO965ac{w0)j>-u5N;X?56A*(VX&bmMkdbDi z)P3EqC;(_er(@7JW>dmeWm)1{Tioee&j2_Md-f^@0?S%VMZCRR^NP?-xXsyW?E}JN zG{I$^bioQ=i>NWA$GtI=K?}q_ETxexb=GAMUrG8KLueVpF17uMicbu*n)pFq;oPtt z&qU`6#~n(`tvg1T_VkJ6%g1fe6^mP-B;hdyQt3{qYwoyMHn?P#RGvID8*{WhxPKp7 zOy{|6bVL0Ue`k|JH^nOk*{8Y6w|ABf{r2b0e5z9&R{>U789_G0J# z9wDdZss7>Hf%y}G&^IuYTQPsiW(1g`^VDweoqDskzfUD|ZHPKWMDztBqKj<`I_cTj z8J^9Bn4r1K)Xq!?=`f}Tpr07fFP8|w*=QI^S0uB$4LLA@8DGuJgJ=ot5 zTVD8c2#U6;-Mu{&T#B1zDEZ^(&o~ov0e2MLrTP?e@PQHV^C*VY>5VY)DyP>t(axC% z8NI}fbW#^Q0j8b-p)h(e7g6GOc6N@Bj|pQ4g7icslVmi^56ir1gLY^j$~>leCZql` zU$1epA$Es8J9e#7**uY-VD&H=1{+V^)eE0y)Qq$>*juuBZqHjDN>{U!bsf*L;hwMe z#qE)t#EfFJK9>eAw);)%A<5O83PTnp<;8CT+pWmkCNrx;87fcdl$RnOMn` zDl7>kcuiPxz%47!4?)ZmIspJ!AlT9I{e zsk50VDndY2V3?MTwlDv2deM5*gFoqwK$`8N7*%?0h0ydThTFj=MfQ!9q`d^*Vm`7R zyjbuta&Kw9c_L@fE>HJp6sM{GHT~U|~?KM*DW6q5Tl?^wADO_+kD!| z{)Zv()cusy`5`eshbjD2T4W~9izwxt>pPXmgx@gF|3R5t3kJq5`b{zHk@)9Z+uN9( zA3uJA28rWfo=UD$0TKN*5z&L!Jyl0Ew!FOZ{{8#QNGmHVVw+NaQxCLliprj($RRYb zYnz(wLr#qh>l+D&9*20Wr^Y4lgSQ9Yq7(ZLk=2QLm8H=1KchtFF%>}rf|pcMVsLVGbrt&aix@^1{G;Ml-Q$#d1zZPT zsfaEGt_9E?|KZI3{{HFdDJGr{-wWoZ$B!`~FE1|7&d*Wv;o;%&@iCNh>LlDoL=7EU z*MkROiPQMt-~jwoOeOBdWg556*wOKxG4eq_RhI;*_GP+nvXtuEB)}G;aAyYX@O_z9cZ^;<8LgN{C zsg>0>qw-BiJerlf+gToKE1Y(G(#7n7CVWPN^U1;jZ!b~SK`T1Tt;>JupmbMOxfZWG za3vnHGWrtJHEwQhLM@Sf2VK%-vQmHPswJts^df5cq?aq>*4S+HktQ60>|S{>eVtAM zo$h`FpU<>LqHf+(-c!NU^Ym%b7&}W2p{R7)KIlc~@80d~?4bM*8vSvHJw*$ZknA`{ z@2UA$DLXTsRzW-8j-h-ph%Y!#LE-%S-~aKC|NiICKmQy~t`iYGpj7n{(IW~(w1(l) zz{3T-Zed}uXPbKX@P5HImBXRm2HVtaCyWTgNv;uxS<@i;B3`i)0m+}bx!~4CU5zBh z8%`1C2vsdFFVhk0+sr5oHzSC@L0gt?LR=f#m7uU&$fT~L)KUkgSF>Tw_y*}Dh z&qv$XrZU)o)z#HcpFaHv3I?S;I!$$^sr3!$3`a-D!DH&^=*^peT^a0B_+KRcZ#yDQ zK^dNp7$#6@@RQMe!6o~7QZ1-m%+H^koP3Hj9|JVN*Tdv7&S*QRLl+kpXqSnPb%$t} zf^veYbocMaz#r6kdHEi|^DaKCx6#p#Zp*k6BfzUrh`=)bC-p%R+o} zHkkojeTB91AZlO_c#7wTJ7PnH5sFjDmAnW2?KQQ=gsL=a)kSD%P@=Hzz+Lye{Y;vt zp#Pn}dv|_*et38kVIdw1Bt%S>_e3Xp7UR_7;^Oh~$=?3{Ybb;fAsr&>^7L(PLUn|? zwGo5(ws&?ueEj&gUw-}PKmQ30leQ@$qHEWwF04=B(4RhKs=l<9sclmd(^pQ_clQh6 z&}SwM>nqLn-wAQg_vYB9rb4n#pQ0}io)_X3PX*8XJ0|Uj_1(;6_3|)?;dQr5 z=7TGT1m3Rxjzi;ou)e-+DuWN`B?PuW=r3Qrf}-;F?OW&uL_uF!Ww?B>O+m*v3AUh< zw{H*j_V#z6TF^ALzrPbHIBAE-+!gL~%@bzoC3CEFX;u44xdj%cSppEis+@k#A&&3My{6h+eWFr z1LNS)CgWIB(2yIW?PrEE_m+|MxC}RaO}?bdjq@B;3N&VkAy@UWD=W)t<-FT&)_O@| z6^65#ZTH=um{;OfVFCF|l*z{$A4+1k^_Of@<5W@+jy~xgxFxmdN&{UP;!+<=JgGA84$CxEWRvXnjAS>bxSt`M?&-KqwCXEV2C#;q&Ntnf^X zlPYnQHBqWRyV33YND;Y}xX+{8*?RpY3EO*Zh5DzhtMAG z`}a^H!OX(Kf&foJVT1aJ;|?uidmF0c(eZHvh1l$DQvne@x=t+wm9lfZk70d|Z7M-P z)NE7AJoQDkDOC0L;9zreb7^TQ(+}G*$j;~A4}FdGEQSfQ?z(&-Fvl>r!N3&zMf*Aa zUOgir*W<)9nF?<=is*=S?S`81X%K+~ubYcMXcA&TCGlRq8za>?A1v22mHBFq2AjHT zEmJ-ex-v}}+f>3q4>0H<1MngSWw|p=twT@P+S(3wo#W%+H1+oFUZVZ|ef$T#Vk_ty znYjgXp(J8*XC+6cDA_l$33Yl%nD>vu~KK#SNnCz$}L&Vji<@inRg46YHs@A z(xqxE%XYU>w_hdRw5TgJWQ^7OUg}PE-X2I{f)PPy#%!;!*P4-X%an?Zq)gOqzg$UX z&?VgukbC=>3^b<8ZqsggS3Z^Qmqx0@Ph}j5*cL&)x3j{PrsX`|4=XDx zOq3~t%@l?~3`ZKeYMbD`PT7bDP(q-;L1m(@C^i{U8AWq^7~P^47Z*Fs@P166-P=qV zb%w|g)&pM>KBHPFMV~%>+TPiD`KrsXv$huWNvMn4+dDj1PpIg`h`@Pf^n*Sb!upm% z#^?Ek4iWuX1YM_XDmiYYRDFp<71I}0$7GwjH>qt3b%HZ)1JNk)JF!g-BD5(nucjE8 zbrtI8ocd0PyXsR}|4P32Dar?oO)*vC%^^O*U$qG$R?(65+uJvmBVk>C?LlqeLC~LW zi=9VD1>TUi-_>cH57yVTP2C&AHr2reP@51K^!fRa|95FAqM%0@^tI?Tb##1kbaV_& zi1C7X!|-XIu#|;p%pdBHbsxA*2LenM%~Rcnby;&-TBjc+Iuz?o4#US(U)wy8DsS` zl>+ttX8dPWHKPzn+&bH;sOxoRo#H`77j?Uk-LAYiwXA4xCaCt6C(rqQH zc`cFz?7MyBK{lUtoz|$53Eb_noTP6jUJiE^+;_%_rIE$zHQ*g3ImFR@x8oxj$c&;c z1DQ1B%-xvEv)<(r54KEW<^YdrAjPXyOiA^-G9lPYZA$Y;q#${V+Wxviu;SHM@nxa* zPLTFYVr^kMxt+@7;IiSCv}Llk#;?5I>k_vmHpXnlZL3Ms)vX+7=t~2_!N`VO$=icU z2TN5|n$Bv=nyYi`R#o9gUnSrnW;@0+>h}HwuSo%sww~eEm9j<41G|$?sgVO+Dz_rW9QzrVo8a$E;tyJ6`=EzOCjd z2ufCG)5_g;McNK7cEOY3yR?>EooFFv7|7LYn~iAvoB+272YVdCllu)IzEQJS3%|X6 zL*m)5-H@y8Jd)exR?y%IAa!)}qchBOxtf$leymECsVmv0FygDLt9TIh_xJUl*L?+r z{zz<7!>z6kzw*V4n4oWA;q~hd1wELiLSB`v=ra`{&<_p{x!R&_3TgzjiOvUmb(PV4 zL4_d3)C*!vJx?A}&xvFCM0sLI?1INk&&P}~3kwUV1Q(d#xN|R$#wZ-%b{y+4M%=|+ zzo25pyXb{}Kfr#BtlVBYGfvphyqpf7*vD<{(agu(A zl%+k1!r$+FMXG6ah=k3l}vA(jfr5A3OV$iqIpVC z4&qRd1rQJo|@I&D+Wxjh+o8$0V1G|ZUC8TutnQurHPr|3Kt z%v0MtJHxQP&UNZFVIrREu)at`+f*-AUkd9Bcq5MAl-{@;7jJ4($SHK4R<&#KUO>|^ z4q|ySV-7X*TNFh#CJmx5(BPK1a9kHbM0{i8ft}XuWyqo6pIjr!Cy8p|*CUATTAm=Z zixGsVZ-QNM5Ti}63swGFh*5zz$@6OD$ExTwbrsvx#>U2JB8I{#)6|2ZWh%2xCATT6 z4vUMg6AC)9rZ%wVxVXGLJ3Bu-JbZg_fECF8{u`R7qHStBI$*ESX)1n&Bg|BXF-3Q& z4*#4Kq0T##l=w>F56+_oC?{A_fh{UaLgEc(F)gWFQ4gU}i#eBxE5(F>s2s3 zcsOdZBGC0{Ym%*pm1AgdJ4TbAwyfR8tQ4#yvlhpB-mA*0Xp#slTSKWYw$2ijL}6R8&AGLWB)7}0nNc#A zFwok)r*exvPm~xC*T|MPSAfzA*AaZj>Q$24&2i3Dq@jO`>m#Am$C2td^5@meiimGz zd0uqoC9;p&%Ur}0&}f;yZ7O1+Q*|uqkR7CFRJ2q^o!kXq=hP7&d^*Bw0BJxF^sWYH)*y0RUpy+pszup?P)?_0PsEK$^1J z&!81FDvRZ|u$Hl;3%E^W1xoen1N~PM^O*BfB8kW?Kbn(FEHuH9WTjbR+pRe}&iJp0 z!aa5w$ZD$;u(gpGKZRuijd*p++OjR$wz30TL#clGY1izf8f=*{nW@O!)|}N}B3na6 zN^Xl4;kbfwJ7rmF%)pg+9)}aspdb8O>g*RaK@)wYBc--V{Vm-!4nJ^z{6nVNjYe?=rVO*U;vj49(?p4&2IOlBgr9I7*Zg^cWrk!3-Lf${@o z4Byt>-CeCZW^PpUm=aucqek8(CWHp_{K1e`D0LX!qvSW$;iAXCv_}y|L5x%LLxMOL zp|5UiY(nYU+}sR1p^WX@4(6%Ob!xRkM8^=IJnmw)zG$0zMgVsF$JBv6+f;O&`eA6B z>ZR&K08>G%zOmiCz2iu92>E)pDG=m=&O^1HU@?yRB`{|);}SZ{)y)lA*)dFvow^q5 z#2^K8fsJV~pkv>zj%WTI69kSmBcA`SG4vP(?)869G>Gm-*U~QI(XPeY(~`UiziJHT zO(Si~oh%j-!}l@~bcT^%EBk>9nBLGa4gx{)#}d)^tb>|* z)uEs-2@Lwi#@~MVEBcf(a0Pb(d$pf-C;)=F!%@vNbY zF_(WH-;H?AOOfnuwdPGuW;PJ|RIJCS&r&xVvv$zuIRR{$irgwab(^p?+iq6sEV*jf z78^4YbQxQDiJ21F5tN^UzLOZ{JTwI6EYs}ONgB!q-HNm#4O@wAB4eo}%*GpZd)4h= zTOQMT({9b~v3n+KuEL3JvD7J-e|xD?l`CPFAIp5!bme5@jY3JbBdfJ+xJ+5nMK=yhr4}odWP&Z!?+a(3Fs7)$&~@sq z(i^pHN{Hqu#`JXNjh*MCiM?JK}qB-RyiL!mA*FG=>l5gq~M; zlcZsMi?8R%ua*74VJ6^v9HAh0F%xpjRM9r2Jcv9P^ioXUlgu>riYVy8X-d4NpuwJ; zo_+r5r=#OzI!*0`aK5*1q9YBit_IM6)s;v~5feam%ATdHd?};KQ)w|M6^e8sU|hyP z5XPK%Q(cFWj-lfC?h%U$g`r?DhVgDpv?sfS30fh*PKmG7jO5N!Y92;}+rgQpk*Ob6 zCuzRKV$fDsJ@&Xs-_Ux^E)RNUX4t=DGFhq9ma#wEvT(BQmxxy}Kn&%;UudVLw%lH{ zp1|F^Dx7334*F3T<4DG>JQKy3OxkM4ENll$B6RQwS6H$g9ND5P+d5;}sAV0j$k`RO zZMrnLC01RDS#E7d?8(wyE@P#8OG2w0R0?OzxObI0QYup^@AkAp^*RS$z+hGkpAzn` zVKIAGLBYGNWK6o%mWCj^#a7t%1x`0qzRd>8N6x*`wk7ZdjB9h5$@-YpNwgw+ixp0# zJ0%Wn>-OY0WCx|`kC$7Zej`OEc;k&Xe5H=t+M0s&>|L$|vc8n=YOB=KMP_EWtu|An zpl+)FmzNh87w6~auHRI`n~FP|Uy6lpZBw3ksy<9< zG$(lwzE|Rw@pW@CWtxq6vsbSNkIxl7B`kq44Vw2I)3>zV&}y`|x3|2!{Po(Ur`flU zf*eG@DFzhZsJsK;jg|h}5M-6yre5KLKk`%M?!V-CQ&+G}{ovZB9%|dv5C{DQp#Y+u zu(Z4^U{m{V-W(ns9UdMrf-gLV5o&6Ge}8Lhdp&tvqvY|)$&Ww&_~GNnpgFwAJ*KoJ zD*KtztURWFIMJd~Mwkb(Z+9<`=?i^DVVc5Fn9fvpl4_y#4H~SpTnF@qj{`B&kJq!B zMrNC8Q{e zVXO)kYo)%Ic(bk7*~rdV`<`vlGLW5=gMo=ovQ4|p+sfUBS~GTT6RsTG+A58Te441E zQkit0N-Hb3AuAbubWSF)J(yHhb%q7_dAvY5$az!L!%*H+Aj~olzuC2lCh+BW9Dz~9}d3#)H%Z|Ri5d?`rRl&Os z+RKcB!LQWjmZ|V&*|S4ni_tTg@MT%+?HGiIqpw0bHYxr;{4>z#ce@mRbD~I!2bHLl zbKaKc1ECHbJ?WN7&!cS$e+khLvh~G$G#$}4mCRGnIO%~O4?=7oBl|YDx5YLE<#che zbIuPMX4>~ewXwi*XPe4W^(nupzHRF6AGWE934&$X&FfvXa>%Zcfv-WdMc{FmR$@eP zyul+il?wkL65exSHTv4t64d|wBIb{w6eWSF{=ZK_ixVvZG^ zU8QH6dfe#`%4@1KO+^@V=m4}$K{q%&JUTo&IygM+3{!i1yZE=e2L+F*Rf0;evT}TU z^7GF>|Mb&Or>AEzH(!_JH?vKxudg2;AEOmwObLP|i76)0Fcb-JOXMi9&TTLBOv6ku ztqdKs9>lbL;xVO#N1&D2ls<1LWa9^AM`y;vn39rWo@$gOVK@WI8nUOf^fcIPwb*)V z0bN_=Qkzs?+L_yevfVTz)P8%H7D!eyW2`Z1xqG{<+}<*yu&UgevyN9Jmi5%_X60&D zQl^l5wbY%gzXJtTU6~9#wlmi4qb*}^Y0^$p>y3Ns4e`i6+TOX`erdH?;em&(Jy}(y zlD1RXFj?8UHEV%bhTR_Fy-n{L1{&K=Wet`3Zf~hDkX1rw)YeRltdi_%#okqE7ditp zXIbn>RZU;cR>Gyh!s~*0U9(7JInd8+X%KZ!?Y-_OkNi1udRUQW-OtY3yX@_is}-JY z`FcI2wk#W!hTH+Ilqrd*RKTqvn+%ON=#^oz4BP&ec!u&rS30Ow5^`AS;J~D4adb&# zq`ISU(T6&vu~6YpKr3Bb?2sbvDhH|**e6cxc&t`eSD{39`sENWqTBm?(t$SwpY8YW z-(Or@Y;JBcD-EfO?2G>hJjD&sm8g8KuWx+(`03}L|LgSZ9E#|2)H74IzJ=%~|AIiK z)GZa>)T7Qem9Wqge3s3jb5+~a{h0k3T}MfG9`?BC-5mS8xsH62WJ7cXz+G zS>U!4?I&w%YtusMp*s!a|CKD0gBV8iHR8yaQ()qpl`hR*Qx3ixPJBb&v}aSW`|#el zZeG4Ujr>gc>crG+Q+aBYp=GM)HWjT?^tgV-fIfjiUs+vSU*F$*iR#%Ygji$s}#y4&!|q3AktK~A*iGIl3pQ0AeZF4y9?Hs*g9*D z$jVDGcS2|$8c(;k4e6h{(Z(o)AiZn`MX%gfk&2eIjvt4%CcCVKD?smlG*}bbV z&y*FcZN)ZP5lg+-W73zF|5CE`mzXRK4G-pG@|Te@J{1XAfxGu+Gr=8*N~4wfo2s-0 znk;Kk^Mf*Y(lPm=8fC52ClV=FBco!I`HIi=nD(@_EGJmmlTvq-16(M zzy9{y-~amaf8j*R*0&VG`sPzuU-X+wzW1GN>Y;0!>KyN<={FTHz9MC5D_v@Co^49H zJi)zmn!?}fT9q?vCnP`J-g*yn3gwraQ{X`ke;VLqal0%___ag4wCy_qJi z#Y`ml16ksg>m|%6d?4@v`u(7(D;h_eDB7lSWnvP)se9Ho1w8?;+=sbkN&@hsTk)78p<3{HaBzSE zRK^BMF{7a;$$O^tb|E1ytV6+uRVLfMe%lzuSkHh`fovL7is`>}0JF@L=3h1!OPAb( z##nFMIqWiHe@boojC){zX0pl-N-SxE9?oDYG9{u$laudtiQ$Yxmy@hfT~CRB+X@K} z4j1N_>X?Cb!InhSmIt~m41uk%Nq$*_f>WFwDSI;GCoASotx}y_wQ=LGEt3^d+aF5X zivF3|Dl;MvOqbwx)AHc5R2m((@4TdakKIOvN|tade_LT=2Dgb14&H?5H4_hIg|*yV zQM)|2Y>@D($6FU~_}Pf0RAN%gO>5n4*$itNwY6m*0z8jcGUG4ds_aPFVRb3H*S;kx zBGOF^jEiZ;gXO0*+}UwufGnSyH@r@FB4x2B!i;^UG@tB|EJN_sb_-j6TTb3Eo&n3%kiAhfTeAA?H9P#A?hsi03YNFL>6UvN7R3`5zI}Ei-qO?K3 zT8X;W&^*P1XyGA2g+!0eBGJV?GfxR>1RWBLU+tgL@ zrcn86aPeBlOLC-b%1*P{lpOq8qDv&s>-PE`P2DW^HGrPJKf-LmS#7O#t_9;!EHgv~n$I>Ugcuxejzo-!Lv={_v%J3p+LP8#UA}Cbmt@x~3^^ za`pYDUd=C@oSvS)16{m)^{Vr@9@?f}L~zOl2K3Q31-;I3{$;OzLXa5@lzAZ$EZCjHCUA}F) zD2-VrWQFOy%p}pe-PT(;RO)FxZM?)-{dUW+dy8A9(sWx55_CJB2}DS*QZb95NYl1J zmBa0VtvO@3F53!MnGoz%5~eyPcD5UpiO&8k$;vj-ni0%ubBC-V5Vt_q!I4+%l4;}m z3j)Ci;tT7_vr@xkWisa5IGq^ABFk`FRVKPjfTafY;0GVAY1xn&14F^Sv2 zgcZ9am&83@!vNYEDza*#+ROxP_~2UOd4&@_Sa>RN`>Uwll-MrSmd%G!b2QT8EmT@D zmBtxx@^gLe!2x=swTPj516)nx*KLA+T>2b#lw^u4t8d<5MN?gQ^C- zk=vgdJ7O5wm#`z~;FPj72Z9)*!np+96LVlOrr`;gQxOzBDxrj(3M%L3=9bFV_Zr&j z%Ya_>Qo{O1+NOSR@TTVIlmBh-rtG{DzkoUS3}QN(Poc=sO^Kpb<*_s~V{=u>}|F+Z$bPp$(@-BFS55)gS9SH67d3+?=va z-Rr0Q?YyS&jXys>KRr8p^Y-nt=g)PLK4$163OZBtEkz`B=mT#L4x*9gfcWPiJV9HL zwuw=>wY3^)Wo3nF@&sn;NpiGSQ0I@Lk?K)0Om$9E_hTl$sLzB;_alzM^2*BT=_#s( zY7y{D*Vax>PWJZpQ4Bo>f6NAWc6N4hdb$&BQ<|XLF!ie5Mx05usmc)W3_6I;qJFD# z4Eme$ZHmJZZ;Fae(wa4t9G7$(DUUAG?FVu$%`;m`R%T>@wy@+GXJ%&wvRkaVsZr|} z-BVlGRyY{to}_DTmD(S7dmp~_mfR(a{oW4mA( zvqH`qYCLKSLu}b@%Y#xOcNDVbTn6krbDW_m{k60RD-is z1Y2UG!~j$RI!{&rcHHsh@%;ds*+ai~*|0nhOBS9@$^3{9T&q$KcPeGlf;wZ1QZ40V zG|2Q+%kU>fy-8#r%~SM2`XR;2g+rAW?|#(f#CeLADY`a2RV3!A-~<)0%>&>mR8Z)j zG)Vy)-l<-1zLh`sSK+}Wm>-8TmG zEi86kQ%lRstE+4K`)>{o4rrLd@ooy`qiqT=+l`G)j7v<=x3)n4>i?g;H{p)kNY+FF zP}E{d)Iw2|xQY}h+N3DCExSE!_wD6O&$;vN{Qv*+K4cW40a{Akr`Vi zkb%g^$gQnOnknAOSLl$5GEI^>O_sSyaZ}6{d8_cK{^gfne*XDqU?%$kg?MZskIWJP zqMtv126;&Tpr7qi*N+w`1}z!-i@qka zQ&G1}Mm*HU4!4A&I#u6(=F#gCjhJ!o)k~B~}B2+RK~BLW?cwj)+OCMppx>No9Ix zkcul>HPmaa(q@G*vghJdGis?eUGMU*@J9-aWakA4C5vUu#qZWhq)WudBt>7`9H?0h z^=yvQvS$HAF{Sd>?}T$H9ew1Uo}RLK?5b#xu|(}wnNe@Lyo{ z<}`e&GdAh}y}+qrYEF_!6#taWCPD5gJSBKeCJE9@;;D8&-_d*gorX?*_|RrV-7c!Zd|YGP za**nZY(^Ucyv}%^U~dnvpm%(R^7Uc8WI(!qin=DS*A5E5ZC(}(c${fP=7wF(Bj>5e zHx=bVSAoaUH^uI$o^wi__1p7JJ%7$8^tGv`CcdfN5;p}qplqOPck@xW)LF?cg`q-@ zDe_8@V+svu<3Et`k-n3NsSaG<)U(O*)>C4rjiD->f*h#h*@qO5D6qUUliKL(?x;Qp zPsgJePt=1o+$lhzrYIS7{dsu!D>vgZAGxkw{2aG zC9+3MTGEu6fgH0c9za!A9pv)hD#Qi1ZB%UxhMcsl<94pSu7lBHiH;d9Reu<}Tv=x7 zlAg}JWx1`*>n^GmFw%o**0gv6|Gz-+PX_01(rQU#WK%CqrP?pw1QXt2LyAR zQbKf1K(WLs&zR!bwx#V|M6~Hg9x4G7N0#TC3BN{Ke8WCC|t&9f*~+*EfiOlKNVLOB?Rdf{_@okNTsPO~#<$5hWfMUJWI zw!Tg2o+6jjX6L7(*eN=T2PP=YPneOEBYnH<@1vAcWnbUXG0e{L4?icqsdw+*?CijF zl(^runAWH$~z+EaDJ%-+faz4A2|88=7BuEC>1>@BjN0Vgy+zK#r0z zULPUUPPu@V6#GH=X~XF<@ZT0-(6U4I{`pK2Xv)cnHyPiEmjeYK-m@W8^>=eW3eMnO z28^7iM){`7k#m&j;PUbkQ}ztLsWK@m-_*ob*pw&qm0VNrC~9i=>gw}<|M!3Y&;R>> zU%&oJ$~OYo zP@_meXY)N=f4I&OQ|q0Bt_wtWL!?@05574&18-}6Tf&-ib?g;MtPa`N<3~a@!VgfT zc6e0I4P748U6<`TFqK`>ZncDBq#2i%i!*1;Hn-KHuWzdvi%^}lYiju0lqN>}t}j zKUgzYPJ~=m9;_Ml6gS5kp5nmit5)eeBH?z5TR~xPyJn2q84@Rnc2RYQ_wiZA1Q52I zcykHcPekUorsd&RH0fKf zCr9|f*4-<|^0djuOXw8-m4l)8VW_?<+xlqf`4#1ncs}(_J@tH3PsEAO(l9M*=cgnp48bWkZ?R?`Ct@aAcG{V(6=2U%MM78Vc*na$2ZlFnrbbB zS1JwqyWNuyAO81${_{Wo^FROh|NeiUKYuwtKWE3($8vpga?&31yMI8Z`R$f7Q_zx5 zZ77bZXix36WZtXQ}YvGGs-_5Hr38KNkgHdaZSd zd|ea57FI(p7gacZB&f=@XCddb2Ek%(yj)LFN!2&Vn|{zyB)-&Sq#svfs(vDryckr4 z%b4WKe*fkjhmpp~Oeht0?RAQhE~>!SjmfGMiEQO+;%G4!8-wd*a=Sw!v8{~OHHWr- z6@ZdLv8|B1!_3wBAi269kK|HxHKX+Ja_cf+)nz%cI#&#+YnM7+dUU=y2CW-Gq?#o9 z=fb9+lquJ9U1CbvO{5MuOOzn>KtCn7Zg;2(XhNUHgG{z%SDo;O>fw_6M-BcN0v}(eK8PO&qS4>qn$X;H-9Vbi;?O1ri6ED5|YF*RGoW@ ztW7?&uk%qor@xaxs^Xh^`LaE;j}LmLSpMxcnCczbnRpi79|I<#Q^hw`PV0L!$tEFE zPCYBxu3Bpob}8yS;dA;P`*Bm(@lAmcXW(~x!5!Q8251Fj)i#=8AW?kL>aetefT6p* zgZ8TK49ez~_NmE{xg_V?iU3}Z@87?NjLVJ^q+;QzPXzW_qrL7*7f+) z7UX1vDe|WdXf-o39;ACp0`2C*+-g!zO^@m8`=*{ueN$o?OZuiL7v;nVn7XER508%i z_P4)%{rc<0#l^>NH{U7#wFmQ^oqYIkbkydkEC=}=poFqGqG7w{^=j*Rw=Twxsiy)q zCP^}%c1Zxbu<*x^X?crI_$5FIh5JstQk`RpJXCTkpLJ3}fv{v?YwhgpK%w-tGrYnj z95Sv2TYE>e+n-fna)U8Cw&PJhQ)@Dc>~ONCPHl|&2(7Fj>nKM}V>Z#aV>{wd(XxIa zr5uG>evc>0v>s_`P zD_}%=%ulx~Eh_79i@MTkJ68_lSF+nWiXvWgRxOnn?U6XDWDMs@fn4&T0I?Chg)G|2 z3<)b;BKX6y@p-L(%AS?Z3KB_I$GvIUtGdWKI>A9@{?;a(zYVuN?P}y#0bCrX_>e66**T5E`;5JZ(H&Ty1KQ@ zxI!r^bY=?d8G0C9p{#&WKT1uKyUDJ5wtqXbXKl?nwok^Kx54UNhJBS2-_)bdMb$sS?+L9$KI60VCVr~TN#K5ouBXgX6vDqNS~as>JA>LHw+lwA=nw*RsYK-p zZG@-lJEIbuvIIR#%lZJLew$Yiv)sLY<$Va|Dq~B@#Ru32IbCUOP#PPWYni z@d+U%tRm;$O7v#cl8dakvih_zrcUH=ju5JAr2)5oq!!Dbt2BjyW~k_4m&kKwY^#Wk zNR2M(G3BnV##FGfjHx_^Ty!y#rR%U!jUEgUMcexc6AGa+q?%?(pFnqbUrCKl zJNodK_V$r`>bKv1`{zIZ_4mL3{qobN_igx8dptDxreM0lg6+2Ty`Z41r(KjjK5X&k zr}L?8+?4c9ti^Dq&gX(*fpoR5v66o9qq250joT2(=!+>upJgP5p zO|h9^QlWELHCX}^*VNmIYif6Q|E%~=&V^&DJs#!c1MC491&2pR2jyVjfBfSg|N7Uz z{`~V#RFFYaoc6rU^>ljn%P+qG&&Fgo-&5(Ql4;r}XZs2uMrEN)Go=iwiIVyn<4A0) z;E5xvpBG*BUDY?sYx5DIen#e~1W;^KbsZhS=)$!cEo#hI(sqE!k!D9-R8p1CE;`Hz zoJd-gXIH!9mQSpv9KVBO-f9Ui3aA3+9Ob~Y&s$WOZnNMs0K68ZVNHf8q^;!G<>*MxB*q zPzqH!`sr4XsPO244fc<@HLZ#gW?Z65_MAgkKvf=z?22hCC%0TlBW_(;sy;-`6Lnc0 z0K9>hj{lChjYzvhBc2DfI!HQU!xeB2oNhTDI!w(pi6;nUq3s|#%@7X-rV^eRU7jPf zBLzu%CuvfRR#$YF%U`^BfsZTzDfuGr`Dt zY6-q6>7DX@Q)CR#hQ94CYKnIB9UZ+d5mP@=j;YQu)gH{(ZsjYXUk4=%I{B}PpQ@ys zDvk~csBTZ+E05kUzx?u-Uw*;IAXDGyf~GhL7MT!~X-Wc>$Z+ci!Fm>(Sd)ulPSBzt zuNAU~iWdRfZ8cq?v;tj|*fTJk@88;(yY|}tt@`G=x~PZDUE6%{HO^6vFlDV!wXw!s z*{M&_O_2zRIOqE|p;(m!b zB~jgYu=SxL3j4%pY-EtLV21V#a=5Gl%o6Sjon6)=Q%ZViWQ2b4O+94y6x*Emb8&I; z`Sa%zNWVJ?pnBXz?(^op4p8muufKl%`YWu;Hcfh$ehPLeOww|&4kezNq@93?iXn3K z`Ez?RG>p;X`bTl} z!+2=QzNclJly@DV6HZsnV|IN&FVp_Vg@m|}2ahJHC3$b?TkpqvmsNfYKz2yIj66>0 zETE+iv2QBaX*E6JIiQ2yzkiR{?EUDek@M7izA3gGye)m*roJan(DnUOQ@TU?I173? zp>LlGf&GVK5|Tzt$attD|JwUKz-Vn!E$ zI$1>SqhV#YL>n)lDCah+pcI(%BMXxYS5fM(tLKOZR|#&pt8Vcj?hLmBU&z>338V=`7+-Lp2H^eR zuIMFr6v9Z=QA3NFPN#(>&$--lc_U#h-Gpc&a#X=q9=zo$D(A=Q%@yA^sr$W5Yc%NG z!Cc=t4*<-qFcOYiN5MWPa~s)~385iviQ)q#s}VX^71qm{HAhEBKq9m5yV%Bby5)0x zb38lvW~8Ozyk;~WDl-^hv(ctt+Bi1FFf>^(C<_y265hQq@bGZ0_0N%!hNf~)P0dbq zc;BN(FfY*sU%q_7Urs;ui2YL(J=I!(8+1;=`{QF&KKbyW%RcpdVw#q4sWvG(hfbCA zdfL^~JxX+Xc=Y~#>FeF%o7#aLyG7gjN?M7|H`N{k-T9{2J@uFqN4UNzy#Tso-_-SC zy=0sQ+@}DHrUWdln#XJ*us|mgpGb>OttD*|^T*8_46d3R^qzs=S$0>Qx#1 zbiU#3#zW2o@_3ZH!gB&MTMG;IO=0rBy1K%=PnivrZ>rnSw?)aOc6QpeC;Wq{aDHB1 zbm!+KyVNPAog_1WTvD(MU>@x5;@>VAlLRnw$Tu}fL`k+mm-C!C_@VEcD#_2=|It?2 z$0Am0lJmS15Hl1D{-D2=Pb!J63ksA1B}!fmJ@7)|M91Y?7z}OLJO}fressGv>i5cg z3nVooLThl$=>ugXSsASU@*ur@y%Ca5RVZFJil*TMVJg4M&P&-_d zJ}u9Rfk>0K8bi|s9=JX3vh8w`YsTt9)wInmxu{yCAFB|1%Qm;2h{uY$MjjSi8*ud& zv1)%tdgi-3J3GV%hKj9_@S}KhYuZ9}H|Z&*$w&hfd4<1pPLS11Z92s=pOm{gakVO& zkjc%Dp4F8SFjuUVJ?GXXWa*AX#TOW*EEEK^3URwHXEN$y+g#P;%yM{qWT2+SX5Gt` zQKJM*ABtjaAn}tZ-_*h3A)WpVTTTX|Yu{97ZLW(8*Yf0u_epG$%q1$5pZ53nQ3h1G zvyWCz<+i@|48M{Vb*~)T2hQh*M6Ur9ODodkUy-&En@73G~M!m z$bq(`Vc6WtuC%2B?T}jFmcu2%inEu%w~)u_F2*w5Fwi?hMy=dk7&%Y*zNr!JDdn4z zCIY7YF9oiyt}u7=?96%4DR7!xQ)R-ZOz68MQ}<8BOZ>4!OqI;%CFM2k<7)$@_V?Sh zsxEc<+v1hN5Bvi@SQfOQZ<1ZAtXs*`0-w-szKxB&{XLMQpeb5w1GiKO1As%DD7prg z9?U0L(RxWsXl1Pnnkv@CQ5{&PmQ{5tX;KLb*_K4IyJ!cMU0!Bw@oi{VF`GB_Q#s|4HDMU}L2Z&{oY-0&N#Oohi*%T*+4aUuDoUDKtG zJ4lgeOwgcJLXOZCDrY9rgX#s#mE_H~vU;#ObdkIG6AX$mTLGVg^ogyqV?7Ms#Sq zTmPg@D825TTp6{sV!9BCS($E%bnCWqg_VVn1?C5&lM5D+IF=>1Ng`%ahw@9){+*_O z45%wef-vDzAsGYK(u8Src6J7fLRp$!P zN}mK#zA2PkTwY!j0MXnrHH&ZRTLC&@4UfQldleS~&Ara2z50O17GvPYSn32 zYF$m3=u6PlPan_EPfyQI3Q)LIIhgNYzqqH`)KYKXVrU5v9`f5dsaW}P2OmhI z@bdEVr*cjT7}+cv$v+oBWndsr8W;deS65dk2md4$@W3$O=4xrLDWOoLhqcZV>etzb5iZSrbC`m&%yIw<=@3t4^HN0+H3^MKX%m#D&F6A3J#GTcSBLjmb^qR-07{ zRbSzkYE*3-6C!2RBI`3AiesmpAeOEr9bwC*aP^aLW!aWBVJ+hcLdW6l%5`{TM$EW+ zOVk@RvHVnKfT=>ODAks+S$A2&uu@>eXQTm_!<=X&lw~;5t=pvbAW}G$%kH)ftxjYK z-ea`m$%>|GCR$b1T zZaU6MyRxeRV5#`1g3eXo+M5q__Ri^bYhraNIv@0XQ*vpv{GGUcfqp@OF8wX_@=hda%5KnT32Y9)h$5VeLU>4ZK=g(h_L3+Yh!Jw4gd@gO~D?R#oujYYW}MUy+DZCv_zYBSM23lL*~9iOA~0`eQ8#7l~}Oxw*;i1uM0Sq%yr6RdyM(4C6IO zi@)d{SCB-6NI8jGazW~#bH^0AB-|#dzUnU*NzOoobFkG+B-~rkU>k}5VL8l>aL|$b|6J8B??i)+v>0> zDZ<8xFgVS|CT9q2WwPDHCA2`PH}^g2VyL=QqU;wUgOqpJai)pM0n(eBF9f_Qb}AdI zuU~IdsDB%&U(%emfm83_za`()n>Q3^)lWIKLAEakO{rYyxo=A8;k$2YCZMGED;|k4 zE6C(CcO?Z=Q`1s)Ps02^9>r;n^M{TmHHq%sz zo7&zczt)@Lr@~_bqk?9lHu+?C5+9x0esy(qaBu)4f!EPMdvXllWV!7TsU7m7?O>4gB3s>V1YidGMmXDVBq5m&0v6-`xWycjB%8Fee-O43z$5`+o=Zn@<_Rf{Uv zI<--FjwhlUiEKgPq4TUMDsRvgqe@1WyLxaHqUu}Em@RR!x%|6INa~PI@a$8_ilXAu zQYE%LVcXRVUb!kWr&UyfRw>G5!#0eVv07DsZF9?Eq7$pVyu=lm4@HvRJXdKEwuH$< zAyzrn2t7yQSOyZotrBwlN+Ns9m1QLVInJnLa6Gu|B}l6NwqMmml~ZV|+A{C*pio89 zMZ;rca{}633u|h<%N1{%yW=VX_D5Owl;@|K+MH~Dl7)70aRCF5HmW=RDb7082$nq>Z`*taG3U=wlH&wRv!Ma6z_D$h0I0T=tX=%~( zanCo^+pG8>_Dwaj`=-G5(a{n3ge-$k$_fGY4hvukxOGnMD?BRcGzl=@&4&b| z1!MBfn;khHam#rH)JAon(Q&lfBN+4k3awX&wu{UzyJO3 z^B;fwaN6cSr-S(@?Rjxb9hTjEdz5vGj(DRbs+T2A9Hl)ccp^^hou0%uji!Ditb&PS ziWnt3fm)HzYQ6ZN=p;TAVwQxB0cLuRsm_q<46QZNDqC5;lPC7u5GX@JntybBAyj80 zmt^J2Ger9==n{#FubckC?v|Xz?-shqEiEgxLgkKmi{G-OI8UUG^rjd{bf^$EX2%&G z1UzNvM0rY}t1GLqL?JF4gR)2UBf3&3rSL(_Rz_8h=MFC}>E3rSxE*af#qGq16Qw1W zy1bU&=E&h$$K9H!!UEoMw3imc#!4OiRN!jN<;TTIy+a>vgKS$JS_Ui+R%to6F7mn` z9O%~P*V-7)Z8y0cZMmfnE0t*^QiaP;QaMsuf+r!AP_a#{HU=BI+Dq7rdcTTwp3CJD zjmAap|!Fky%sU);-qAlydT^h0F&mWWH5|}ZntZB2J&!y zT2fr^mJXpPJY}Che}-KIQ`9Dz;HxK{5vYArlnRxSl$Hy2PmznNO+Z0e(M9H|aR(mL$iJX{~>0~~!vCraEWke{5(^G)H2fkn5#U5)n%$b&>{SPRz= z9z9b2J$Bm27scFelbeCP0(a4e1|{R|M~ek>M?ZGm)SHh&3n2i!vK|PpR312`i~;SN znx4`(ISqxDqA0f{=J%_s&-izCc6RciL`)SpJUZGdna>Z3V+!!;)77U>pP(N!YjXm0 z2`Afh0SsNTDLxX#x}>C6int}G8U7N(k4n%K?mrMm@*SU?(Bc>PCvR2HW@vgDrPxlG zmaMJS!JfVd&}y?-l~kfZEH4W=Tsz= z6(_;0n0NoG`W98w53s3Ap64ICr&PM9EKd7(khJ9?Vr;ON-TsoCxUDP?b^xf0IeMfL z{cgLdHhpB9M-*M%DwdQ}(KfgEbBYOY1-#j8{v}x<`6P7fM|!h5w5<}(Bm9vz6a$KF zw?b4xfDhI4^Yh)^T|QP!v28`ONNn#|RV3Wf1?_;geuhK|5ky?MT8+p>y&2IOtU0nm zj! z`%@a5Yn_Wm8lGgl(b6IPgth-{^BI|K{R~vS7%DbOd+wR23*`OC(D2(?Rr}*tT=nu0lW=( zfUWHIz!eAHYPZVCukMf!ZApMWqNSZNaZ~k->ClCHYMuR4?3==WkNY6D^lk8V{*niM zi&IM;A0MBcoqhPw9^8ZLa`?#+=JCD#30z!U{Qd8L|F3`iU3G1Zl>R$YnQ%9g0C ztQ3-KxatolRXGw$wx!3=?Td(Q%cm+--GRQN9d?|L)YW+;sY_0ga0OJnDV&K~B$KX& zU2WJ4tB^>#2&~kR!fVravZggw<=Df!nrr~fBMO_#YQ#x&q10ZR4sEq9!G#rh-Odg_?Ewr|QpHH&WwdZ3Rf{CzZgnh|hy*ug5C4>dQSYtZ%hMp&SS z1gO3{BE|qTPg??)^f|vGUN4L>H&FH-1D(w`$BX6e0=-FA+=sS&7&%$ZmJZ$VP06!T zblgqftytTDn#1#FM z)|asjCVgXjs2Z{x>wc7oY$ZK2s{7SXD2noWQ3lbdnmd3L{)kB{g`&bG@>^aKwHMJ( z7GL?M@(06KvpC0ehvGaER@RZMMq=jtyF5n?YY!5-Rws0Up@JtA4SuQ5^uK*g8Ky-+uF^=_R4+8J^wW2kfDeE-7)*+u1ky+gYb%Bu+!73gFB4=bwLu zyf0q8dd7LtpLfu0?js)+OxG`8zWnWvKmPdh&tHH2b+dZ?yb`bv}&C7XK1hw^T3 zA08f^o}QkZe4rdtNAKUG(WX((TmJd>QPl7puD<_0W*Y0#9+ zJRluY6dXk&P-Xxy&I@zx#zv8Wb7~{?SGCA8VD}UoRWMPc^G8{1RbYs6pV*Sdga*k9 zwK00#I(13LqROSWL}7@oZT;ky>w{ADm7a1*6$ypEHrBf(;fkEgqOL9HQCnHlszSAr znQo}AT0Cy`u=0auxWtq785$5ld9O_9c11}`L@xa}aU zz3?8(t)*^3VRmmt4U_U*y{bvm56-lj=fAGE$FizgS(X%Xw=FB#iXb_ch3dkVTN&+L zdELZOh*bcJAIlz|I7&bbz_)Kg-IXySm(b0bjD)gkk1AB2!d)J0pVB8mt5y)EhPw<%1!qa3Uw z1%_5xg1kT-_DxCu)B^)@-B4y~lBp)7b@#Bu^!HXy#m>HW@5*V;Uw;1S;(~Ibb8^%+ zFyGtQhez`2>N8YSj_a8K%v17By(;O@Y1#CL&N@{oCcL;Qu>>l7Q!SG}{E+yj+bVHVb$bz%a!ME{}=@iep^3>wx#GLZXHH zrYJmSu{a}uW|njqrOZXP3@0iEKZmB=u4@Qv{8-M$U4{2U1n6bXOLphdRrR4B`jG7) z@=Y~<=#=Z5!o-ak8ny=>dB-<3NrX;eQ!goM3jfN;JUu--d47IQ=i0DIKsJH0DhIDqGedNCzkcP}v9^hOEfLm%T^-?!khpB968p0%-xrif zED_(u6R{By%0bl}bD^m7bz_2FB5^FMiAw9B(<52bMWkEV>R~xV0AN9%z8)`dJmYy6 zSkY=P=~g0R(~kpGtVTRHW-DK!u}IZ}Jl+QcJ{uVk7D) zR}WUwoZ-R3gt`LA&Re&v(sDgl{S+})S5aGa3u>p0S|!Qkn$<%zDn{0fep+qhL(BFQ z*e1v3tOsLBRM0$q(dWJ?#kLZm>gEp0%MH_73B~gQnPGBuPh3t-ueEY8&Bet9P{A;G z(9a((xAk!tm037-R#9O|zCS+33ySiVQdV?I8d35_Oq^3MI`0&vq}bVMGorVlQ?OPK z4q>cry?*_woYB*!oO=HJDW{y89>)_O($}{w8Coad#l`uLKfWzn$iMrhW(66caofDK zK)tpoY#53Z|FcxD5x-Ga`TKn)z*~J85mS6R-oi1v@aD}MA}3$eivp+!Z#ImsI~U+L z6F@r71hukz4C&O5WglB`BT%Owvf4aId{ce*loK}vrCk;H{P{CRvYhh8A$`wiil?wC z+P7b_zPG2&y?@^ZP0>ESg93Yddzkbw*VB1?XoK-X`vED=aFPYRA2h{lQaXHEWXR-w zd~Ce{8_Wz?5gaHb1!Oycb|5~S9NxFKCXUHd%B02aqoX5^t5*hrXETIO35md7L(G_mwn|7?DJ&kzJRTp~7iKw06p}FP@?4uiB6*;lI}|>#)<0vk>UTla z?>ohzZNk^hP%xxw?g|Co8oNUy-Z%Rh;C%&nvd+P1Gcc*7(KV4klS@3;R^|P-o*n#UrcyL zm;uYVD~pxFC1hocIFHm-d)=K&8u1z3k`1AO4<9~IcjJ>m(z47bCx$DLDp%K0wL~W) zYuZ~;L${S%jnu+9XIk zsy?M&h`5S)ibY8MN-`LUbs}TK%2h#DS$F!L9v{EitM*_;qB=*_pOV(sFN(C(mmC!Y(9C^rAFto zb)M3y>gLo(MVtF5X=)of^|pm~@7k?>2M6tFZ`WR5ZM|sIp|`R9PrJjTbKlg1zHjP* z5SEN^s&H-J)SU#V{arZ~adqN1XgXU3Z@~Jumqz=J!ct?L?xo)~2a2q|Z7%Kxkjs?z zEv~>&898Om@0()hlwFLP_@;P%Z#VD1nE0m3u0G7hAAq^7Zimeu0!{h*mDo{!V zSA#kqY)6G;4>U%Hb+jPZw*$c^eK=4=P#q+f5Uus+54cj1GqO&E&0=nXfFdrb`UbFN zCK-89FRwe>LxdGA%WCZzy;j&dw#;cuAjW`f(hQ}|pbdz$aNvTaT2S4OKPOU30x)r4m7bs&4(ZQBI<^=1;vGUm3m zNL)hhb;OvJ$gRUQ@#4Z~K1Pe($_fuySnDeiYTzMs?Gps$-ogMJk=DLx=eA;X5z7yy)bcqNJ&qao)at zTM|#T>#CEr)UrUyzNvCRkIjHOgKsLd(uaIgkc&>f2A?bNRWc8-89D17)nx#!f)PL8 z=2`GF!Lk!o-68J;-UCnqjht2RYAzd=9pu9igNx0RKL_j;SmnS%N+7v1V=tewdS(G0 za7#x85_S56Q{1VFd^X=XimmY*@=)TTpSmZEM_NRK@GUzSan*%Sohv#i7fXiziXz zAU{cAq$PEoD3-4=5wM3dVZc_fEUCK*ldd>}bgdK?gF=<}4goLnx=C6F8Kceec>nWg zSItMFvLj@SLPjzvnQ@1-)K7k$^eoJnqoX6Jk@8PgvG{`wkC$DwvY2Pm7{ z>OpX203;rjzF(@dxMWCG3-xTG)g3(U4Do0OEuSL34z;t`x3*Ol` z@lfq_nWy#-4z}OCdD;1psY| z=1Wx4TGs{U`=~)He7KcFvWN3|5qTVzx=hpMcF%F@}IvyI6U0n-)|F2 z?(M;bDIwAm-xOz>0!y&&Pz{(UOC<~jjD#;=zR&~#ifHor^XJpkQ!*v4uC6{^eL@|w z0dN;3m!CeJot-@_?9m}CWU)|}(GEW8lA2mXMfj<8)IXSS(Bi7h=K%E)|8$}Dz91+V ziSk*|*OOaKl6KKXBr0QMQuH!gHMOy;Yh(1xgnLQA+uQO3s_BA}h7aM$%SQ%k^(>x!4A^)Og93RjZNa zoJ+#iQT1K9az#b>Ekb({p^BJs)iQ=?)$huj)mb4STA3lFu9Jolt?TeSsKBU|OV_HeN!?WI!sd{3Ud_7 ziF{MqF_rkHMgSNnv0huy-C!qL;BQPA&vP`V6Q&66coyHK06Gx^2A@Am`h;iTpq-oi zf+oM>!o44lx>Mxv$xN9F76s@Ie5;bK?ws#&R^ap?%Q!3#uSa@yEcFb6HfZFweSPaC zqurY~Zx%ZgR|ojjF<)0&-`$vLi|ql5J$_)fw2up&;#r@4Q!)`crgRL{-+ue;>(^iL zv42+1=6ip9+~z-@_@;K>?e4xUX{L7Cb*0ufg~_xW%=d!q0iNaQFKx$r++{m|RL*(f zy?Y=5w7i24!{*bcPe4xWff-c5Pg);;)+IuZj2`8%(iT)?A*5d-vX9i=IyOP;5+~1D z)?GaAEtd+Ht2+D>W?Q%D_G9DigzAf1*}GP7S;0zYo4c|kDzY^baM{Soxr&OAC+c!B zC;06xmrpB>Ra6BMG}prI;SiUTriP@fj&0Qk2VoqNOTTyJb&06{!#} z8QNZlXUd-Nu5`%Pu6lDxE7Mt4MpY-Gm5Ax8*TrwKMXFY;>zjI3R-5pcVe!HG1}q-e8nOJS z%1sdcg+Xoye_Voj17-7&GnoFG9qdjw%WE7UFxoiMoOxbQ=5)+)u<3! z4Kv_vhL;{^_*YG=8V7adieP`b3bf>`_>rFTnpHpdUEK%Eu+pt8hpwP8eDUEWpUZ1W zxV@0jQa>9nYSC7%O6W3;bG$HVzpX`XuPtU(SO+13uJ*=gTgerPpP)??YYEw(3hnr= zaappQM7oWX=5m`z6m^#5&@Fda&DBoju$O3s2p5exm`~AlN#t@VpzmeaX)wdawSCe&Ypz=>!UK=Z}GG?c$={A&hi>f0rSH>`o#)f+<8f~_)>YL4j z)a~$1#f%89NNZ>n-6Z=@Vold4eu#ZbhP zg~#pm^punTM}6Vy)`F`dD^6t~7sM4IN0R6yVxTe|VebwyS*Km8Dp&?A6?N^hWRVPt ztXLY~DXI|WA_be#5VAa2imu>p$JHLVI*imsfajfk2+`>eIg=4YY%9@J zBUhAAsyo0ZIkhO{KzGEHL>)o2{O9?oral~Ho!T7f6HC?jrj+3-%~!Ty=|q(-`_v@; z6q&W>=jXru_S^5j|NiC6mp3~*cbO)h%McjSU4YB{uQ*tS+`%EcX# zunjGSsJmTZW!JbG=AWmhr$U+wH!++KLAmKLQ%7Tku-gPB)IkZ|*mGh2}P3Rq- zXw{W#P%Q}_i>)dLE1-|)7}kiQq7rF9x$a$OzKcPLW9in#Lxo9d&7ARPo2bGFlAaoD z;@+w}%_rI$I~}2Vo2uhMC5$TxGdoU zrV*LSZbKIpn(!%R$x$82>%Zrl8gfs;R)jGLlgvd$*NO?B)aTYL`5LMa6N+*`MO3Xa^sqKnFIq2c&sG5~Be) zIX*t&Z)$5kd1gT9<*+}i*gTFfyESdE^996t_39P0O@5N7RZ`+|0D+8dt{KDMLtH5LH-AO4bvZ9r1pct z6(<6+u^yGIP%ztEn-r7mMFEhLzA1JNX@H=kY@6>xNPL{k-B$ZPTO$7U3bdKKRZ zSTFfw(c^O;{I^(WN;30zWz)y9Y0;Af6Yj<$J=k1a_-SZR8mGWoEM@|Fw3mT-4B%mB z)v2YuTLFyHg==G}snnrBK80ba3Z(by^6=jPQ1<>im5jX}_a!Hcfz&sJx8g+y57mm# zG)!9frZzU%HwAd{;>F?75yegI9~|uN?X{cuic9M4+exM=3Ynq}`!E3}X{Ne$tH<3x zvK(ag^)lo498+p#O8z7#Rb&;cbzV6BVukHt73CQKqrUFt&uLeA4Hafvd7%3XK;g8_ z1Q)euB-h3qt&QDlrLcmi=8^37A}WmV=kh8}qVA|nk62WBD|Oe_q=Dojx8o<$tt*An zMy?-)wkhWb!^Fjtm8d!rO46!_x=gjI(%!VRB3Yyk6VI3x-&Gv}xf3a`TB6K|C6~I( zMuemZLPR23wpyh2y6g8yMHW9_qZMAo^bWz_K~*HoCwg!>sl3sm zZ>yB8Z#lGVyOp75%#5)2+%p_4UHQ}UW*Hb%vgJ+jY3W)4RsBKEU2YQ&U4#jfl^F~< zMOU1>PQ=yt`nK(u=5AjkeH4+iq;ri~OWrL^gsKfW3G&5`hk_%Jy~WZs7>zJT&(1zJ zolB>So6<4<+i%`nerkby8r|AuFF`s7PtmnpY^Bv!%9GB){Oq3M!}~Zd`qtJKo3E~K zDvFp&f~EkVb#QQiSMhk?RCSLWQ_bX zDoA`&cpp+iH6j@T zOp((9t&vboU4d2KCX|L*T>_b)$@BB`#JZ3TE6-?byw&I0Ghd-h%C)#=5=Yp9QuV)K z8?$3;aJ0E1TPYMaRiWzd=190z#WSez+IVuJ%2mHpBGp+E3Wp8n=>Y#dMJ;Kiv`+q5A9M$pw#SCFKze@~oJT8rCK> zbWDF)x@v?+!@laaU_{|exngsoRj{c%(RtmUHQe`G)8#58_Y^D{WwY@zB1Cgn7}-5V zf48=_KAxXnU0uO6?XO)wwr?xASn}w5^-vB?a3ap6W*8~hdsBRfP4T`r} zcpjlg1`aY9Js(nEe){z9fB*Ym|N7S-fBbQHc*sZcy?yuY=>7XP zXzKNAsCVL+dfHoZ;@y0FmI^04U+-r-XJ*(SAs`nPh@PFDfrPXNlyp4*qmDG6l%l|} z46bH%SACPr8gfTRNAwMXhDo1Ay_oc|-|HT>s&A3X68k+EjweyUGN3Lj1NqN{0n1Mn zXx>(fT17-7atRfylU$iqUtO-oqK1~P^+6>n%6ZGL6^TfE3AVDU1eetWbHsKeovR!r z+Tbm#E=w!oKPs^}WzMmQ6N{a zet-mnB9T*cnU8AbqG7V5uMed+ml=iARj(xxLDWQ1%w>!?bQ_M*&-e->`Hzq!O3v%s z!bF5z@Lc?;qt&g1H;R4)92^`(R3f5D`CzYQ$em&9z{9e$4}Zx{Q$}fEoH~{&{tq(} zhNZi!u2_#fClz24M#a%n#X|*ac4udYJXFuRq!swDJ&n3`Pi+q6ycf zHsF}LhHq-U%K$ugmK9*2^sq31=lhW1tvY}?ntzAyki&X8?|!ieIW*;FLiIqAc4;k^ z9MrN5XW(iAEeb3TKi=ope3z~WP;NAW`GOcRuGqUZOS|bjMVUhY_`vaJvH|CmV*q&G zsfUlcNt_Ql!GwK$eDcdLUr$fZc1!+q@=bxIzy0lRfBf;s>FMd#))q;J^0U)Ze1fUW z=k40PIEhcf17T)pKUKGh4^ell%;TkI=ne;a|H(~6-2$7B{VG{H@ zKwiU;+27yi1Iud9qE4_?sb%Pv*L}m)Vy;byRD`n;%cB+>-?FG8#%vSnid+g+;*yBK zRoLlgmDS%tRS!}eqXesV_ou5a z7e8LnbjBH8yp*EE(sgyHNVv%DE!Phgfn>ma?%pf*us%t6RxE4F7$J7aDW#GjIK2= zSAWh%Qa)2PC4RZ?jYGWLU?RHfr`ljktyFUR@L#o9Ik69eoDaO*S?t&!mh;PdY%yfq6=P zUK~?x3iLNSJBNpd!GnIdRDXB>T0;lK^i>g0{aVYaWUyDF5?jGVVsS>)xkUE0MPl*WhA!qr zISGFBFP+Rt(I852i!D-`YBH#Vs_y`?XcN6zT7zxvT~}9hfw77w6vNxqSR{+fo9%^M zy%yV`8YA}jr`44OOPafe_Os(9AU8T$(h*&^B*%~_HW4t_gTiSsBrM71cueqOv@VE9 zDBFo+`r7u0rD7#=^_EEIsx&Vj#Aa1N<-Ax=nO6tUP5k!(~#nXo+wgZdCq8jhIB$3xwR z1WCl_NXRir2GnYrE8|QQ8Je;?U}Iw=si}$fxN8B1BK4*_)32F&rPj)+ zeUl^nl;JvYRk629rl5NGkfWa1Hw77Crv3%+%P*7tea|?4Y7#v~E3LT6CrUqjq=Tj~ z@F;!j+1c6S?zF)LI;Ljr(2?-8?1KO-HCfj_L!3pYRx+QVngjUC^HZra=1qXXlX zfuDxuGBB?c+`NnwMC~3baq~cXnilJUk*U-dh?W6Q8CiXII;iPR0EQ^VO>x5BaWLy_ zHk*4&&F||bt0ZQ2%-Hy}#0Ys;BBt<{vrCIxPMg;>);6%=Sq`J*Br_J|)`gA=-Nr+;PnuqxDrQj}7()%%#fQT=4^ zQcOGLwi={pktpP@0b?(?ZREhII`LnG{kto z%qzRYGMtwrJ!R`FLRNb&W-FZ~P1j_cQ*O7Bb0Sk$e-%jkHaB#uVB|z4iGaCQU4=*` zV~U~SK|AFw&XFXno?UFJ&~}i;lZa_)StSqhKU1p+nm8uMB^q%u*lIkt?r>6LX(lDO zUCci*H^ESM-Fm8~;=$6g$Ym2Ni>m=yIH+MuTGhlHdQ^@YvByP449HuUuPMlRaBR5P zXax!|ILuTh0x);*6hQ6>g(24-CP!NKf?>e^{4vzI4wyeIkSvQQ*qSc$Bwp9{lT-Eb zn7&|gym;gemFTA>Hz-I_?qZIb;NhaK#87NZIIeA|x|jf+NI9nH^cD$Y>{7m#aZ}c0 zbv;xZKGj}|J$;lNolo8&;}+&CY}uzzrE97M^4oA)Cvldv&Vr7Cham?O_u}FLH3xlD zGwtRpid~9t>Yf25GryU`@8tHGn+Y4^&1efxG(-nq0zU@uGF&&5MQ7n?zr(B`H?J)) z2|qbBXy#oMP7AB-IE4ntW|(__^xcPa zL@MEHG5ZfFn#(I=-PLhw;-;Uf1xh1lh4L`F3{-*1XUi+k?zK&FxzMfr;!?J>B~crr zRK`syHCl}+{nRDXJ84Ezw>((oSV7!QaXE=Jrs}(0BiXR1=mH~_9I%-8X^q?Mlt{M` za;Z12DZeEXLIm{vOXrBWJhNqeZR@Hx0jnH~!Sdtk2LP_X8|4Xi zNh`DwwupcCuB$G^tyR9Q;Oc)2Ez4)bIUa3HzLez9vS+zfZ`X)tSN6eM_GiRTq$pe8 z;!h~%noOh{EQ#(aEPVTY9I}=s*Hh=3K^_Z1>O>C>n4^K(=t5+^4omj&9Ldcq$?c7`-I)};4Itgq!$ ze`XKFc9+`$vL~v*Of?iH<+QO8nsKc)7jqTZ-fr8?4Qa)ORkDlUr4s4WHi^`-*3YpY;di-8)R=ItgjIJb z$c+NkEZRt9CFY>6+`EG%?yUrEgfmj0!pT2Be*8$^q$-8=AbW#dAZsQZx(c_LEzXEa zHBN6)r>mMgW}qnhmF>#zjvqxL9{^SrgK{OMV=E{rmA>C?7I@R~v|(*mem>9!*zA5p4uF8CafkG;H!x^R_1M#~`S2=KWIJI5U} z^J&0+j;bL&?h3`G~BaiVRuyO{v5C zI``C5GF+b)3zkprYj*;?e2H?K0o7$D_f18biJ&qk^xapW#5MT1`yOU#2dp0H65_Lw&Js!*2<9%QHUI7IMqQ92mJ-#C_>&)i3r!d>n zSJ=hH1-i_i=6eBD?QD*jnsQ9Nd-raqq?vlXy}kAN^{WywML|L(x-e=-8$7H zijqPJlc2Ajw{PFtps8N?ly~&7JmIA-38r#GsCO$i@an+)u8pZFFJw)5A!|m=sQL=O zEwQvH-3R4$w@o4uR2_@FHi0^-j^$*KkQLL#Y%!>sR6?l+XwjcG`$XK1(MgkTesl#- zR8jXKxn))4QkTtLp%fvv2`!70Z%Q?E1ytp^9xO9f@G*LeD(4!Dbm*#uuXzUwCNfvC z5f4@&mc2oRxQbP++~yI{1e^Oa>H^6p<;da#IArDIr=pVR)0Nt?t*%|cUCdRNEZ0R| z8^}?)w`_%^gQ9DTA=hfcRm5A;`y-K9SzN}fh9k^T9k*3pClW28o@-bY%4(_(C%?rP z8AjTmo(J{g4oH{hgjN0tTMKVF*k-P}>L3Dq4CnOs)vH%Ob#ZrfLC4HT#+YN#b=T5K z#m1>MS6wF+d!;7v_GHD16;idc?}zR<>Ph0M0%X%ZfBu5(Ta|iZfsU!Itu4G-VYx}` zrPJ_i&*>cn8GEqQ%|YMcCSkEB$^jJzVl5*;g&kiD3{|=g;KjASzfapaSA?a71ErHf zZ!XDq#Qwb%*CB021Gjf}S70=`#bD+~Ou>{&{q5VgDsIYkP_36Z=2x$_cq?Ctm}+

<%|sw`)&yiVDs9YY%kx0IIo0X$98Sz&!9hQJLsq{^>Gl?1*RiFlTJ=qiX@$mY(NZ-PT}6wop>T4}(0&9+1bJPtOKaLepGU~trB^o5|?vZKN2cxl`xiwpzym4*q^qEd)Gzl zO6Q81>rGv_cO}Bc+ea4RaWzJ-l!TCNZiS6HVhmbWOpDVJjVk91yFxYnu&A78%b21v zQbxrCv%$<*8OKPin53j;=<;&PSq@Ak56Xvf1$8ndm&@KzaJDS2~Q5?bnR zuKWnqV2O*$GBXCrtd(7j$^LS?j}8r|uL(H|CqgC6B>iQz>UND{_1Uv$v@VHHJT}z1 zelud%p{ihe_Qmt(r)4u>`+SWvz$60^NY9V7RM*Qw=kzC=iy~r*EXfzoUtC>Xot~cJ zCD7m1H*rtVkv$t58@$Djb^%acbo3_f4mzgh^G$&(>KBY0b*s8lz9|*@J`-?iuLXKD z5PJlZ!H$0AqQa!y?&9klQokSD zm-B{^n666s0&haRtneYj2K-tc#LdHlEzrtbvEAnm1}3ikK0cZh7lkLTz39$f3k zO-VZwu(7dmet!Px)2FMeD>^^7e~#Zn9YAGrPf<1o2C6dBE7hba&}m}=+134?9Xs}Z z=wPNkT_BL#U#1LQaai{GVhZ>heBsH=37Re>_&dxE7!udXXe}Rsh4XgnK)xx0#X8^c z)}^FC3&eTnfE{RaKgHzRztzaA`rzOIpC_1Sd3(jUNq@jSMfvvMzI|&QR2VipJ3H){ zdcFO65;XPdRdGzUoAl|Lrgi+`h$(rpN#dJQjwz9DYT}z}!^O)!L^{f?>E}GhU+@E+ zKr_}e69J4gTCU>MuXSp%^95NZ!i4Zm$~rYi#N4H#I-HU{!y5s@FsFp`&kJm;W_n=GEVzx?%FuSrSh84xegq=jB2eA#-srm|c z`ALMW`<>YIPYQE6Pt=&SbtQ7ei9~Z59&F-j#_bmuNnKt$w6up;7Cy@IhJ&E^PdYRq zQF}d}beUV(-mOdrSvC^@$euGFohl_fVu z2{|p>eS=aAcC;N27VQ}EBk3XzM-GV`$h27NM{imZt`bIaSeMj}W0<)n)B!}xh0Ww< z&osqf+EOP=_?phyxhMeR(=4m%=qXr<@87>iP3xO_*q!M2L+78;dC{Lgml0F29zhh; zDKp00j;RQ$(V316ZbNLYA9BddVd-2 zspfmQ*JvOQ;fgp3G13;kT@Iq%SY+dhz+QnB-))B;;VEElXFI+rDBY+%Bzh!#_%I0o zwukd3kWZbjUcI{L028tFO=0q;L#!r_sRHDf!YD;$T0cS|?c<{~Q!-+TF1+9cPJsZ{T~Y8m7_s+<6Xq2jSBD83?%hami@{Z<%eh-_1xf0=d=9pacpD>#?OfY; z?%hNukrXc4T-Y&?XtEOdG2}P?NTNwKHLhF+W}=mlHa(&StmB(%`XTPhI;HHWc>lwy zn?9K`bOcdq*}TTP`DBPF6rTtKA#nT z1TaCN$1xGi?fvFGt#f;~Fon{AwzE!l$?OSnFv-Fkf^<`_)cQIky}G*k%P+sMW6JF2 zd&<){MhH8m0PI|fd{Zz1@R5c3)-fd`rreO}x}RDKbWcuBWJI*Jf7nKn%9JIwG1zQn z2trOUytGx~N?X4Q?Bs|Rv_WIzk1leQ}&Z8=wp zs`~xnYRn3*SW3iKfIfxhkB^T}Pfr`MRcf$X$4D35RbcT@pddNT$S0#zlyG7(yHpY+ zs$njd#jk$Kfs|CMOovh-9yC@3tpQmDs)knZoO3I$(oF50S)eK;8n&FMl1LD%G|Pbd zoGNkL5=$|uV8v{LM0vI*C1J*tLB?~0Hj>?vh8i>W zXQYJjRH8ZwxC*R{wq4AT!pBG&2@>_4D^$`!R`XW6d?e%*qH9?qsqh8fb@V-m*Bu|c zZn3$2;Yv4CcUPWfW&)-2+7#BYZ%UO&>-6;O?5B&1gM$MqS?dyzMj&_e;m^b3af*CX z4C>@Q0zR{kvZ^YhlvZXJ?wFcS`PTukN=mq4y4L|pqzr5MUS{|i4>SUoftka-78QE~ zKEW+IZtmEOkyMt4d`a-`-8%|%THraActFx+`|rPV#MJ)&{^!r1zkdBnYxnYG6I?tl zzNv@(%;$Vm%G6|7Uk5_kqX&c!L;?Z3-EZQU>U>kKP$MS#$#h@$O*Lr-*jrlZ1xRXD zXsgNVx^G)r%v4TB>FMdI`!eB%wHJjF@mv{e)@3ge))h@@UXhNPSjH4rs>IfDC9=AW zXj%3mJXYAs8y*&w{W&O|%Q;<>(+m&DTG`?eX*l9}yxtU_NuPof_k8(?6U&mT7MBf) z2T$DY?k@SJA{kXrCCah7vhrH}MC8`XX%2~`kt&idNWiV2D7ur&7;U@qTK*MLR~(6I zYisMr?j%h&PPOthoQP?=%;K?vyR8!Z78Th-$H&L=Ysf0Z;*8`{ELjF@O}BZ%faM`! zIMQ&W(umezO{*45I%=3;cE!m@%b*B3xOnnTAHxHCaoq|D<}sXGZu5pC`-Qd_+3gSY zXu!+i=;-Lhix>2>>Efv#J$ghd!q!-A{G_R!2dT3s`M{lt!-_0S;h3VJsV7gK*u(pt zbwCG9+ojUbD>Z+_)Y#$o&4NrId}Fa*_ci_`0vgE+L`Y|9FDWk>o?_sqT`hOclfWTr zXJ==(&CB9pNkLrX@}iK@Md4g5fJ4k07>#$!?SBoZXPNN(FxowZ;dFG=9*eNO{f1(t z@R|Jk@4x@G0EPtlqj*bxyQk0dO_5`YeN*)J^74`*wRk;?rhB!^uj!cq)2)0`ntFtL zs`5T~<=x5{VD2r|q%u~bTcOu;{ky7st!zkC0)d8u{0KgqU9oNOh69a33SX8Eql4L zM`F7AboJ)yL6szWwiGMVUkXo-HfQ7b_!tu|KB+jpcEYWT%0kjLi5@IioJuZBD`C>T zR;?n5FhN5_up5;hPstLgC0AN)`Y}Rin_C@52&=N8n~y_P6(U+W=eDv%JJ`yV#pS^= z?Ba}6kuav}N1V7A+&W`!S@GvqqdN@72M@yE5|cgZxwl=z}|Glv;6COr&{-vjQr=5`#9|sUShap zV|BncH7``(9aH0g*2Hh%qiOtYJf6JqWO-i1^^%zx18?CZ z@a6&974fQ3it<~pHENEwqCz}wz)|=?kNovMH5k)DSGp$cd3y$g$jUwq zm+GC{;v|x4M2-S=(arQc;}2WiRo@skHiK^uM_uC9iIBK>ELw%ra#b6{c#vFzA=g+W zuVSD|!DTpSNfr)rqADl4O+aB7sey!IBlbhNR3i4G!bt6IO-tA1-138G^XTY^J|AQN zjLWk{>#D*Qcpr@fUkpRf^WTTyBHyY?)%n3X7+LXmSTD?B+HmL)5cqUEA;%axv!<}S7|KkdaJ zTGicSz-rhPXS}wpMDDev=vJ_p^FC5~$ax!NK5u22QR+$vRVA~HjOKEYqr%?ap4^Z) zxm8WpQwOKq7cXAW>vYYWxvb6B5>79pm{dfQa!=W`5*8?8itJcUJViVE=mcs2WW2st z3YcE7z1@*vBF zxTjVS@P?5$#_jFxF_Yt;DaeyQWRX>}4S`}5t?T<0t#@Dt);c;bgYpT00W>w8{&VL&(_Qp1GNmwQ1nvvW_ zLgmdZB&;TP2OFvi`}_NN`Or3m%IIH-PzAkKdHu!Z+z}BEF2k;VR7u34%QIg;EaxNC zrpqb=R%%y@G0fP85uXV^mc79)mUJTl>+(qz87fLrR~9R&k|I)?3vNw%4=0+b`yJ}? z?_$o8SV1C9+9nZ8uEyMJNimT)4-Cew;BZeb!ET4S$*|TT# zse;Ka`cz>It`T0RuPg}^za&eP=g0b<%xxdxf;Oj}P%7_Y{iqni(%w!t_?xvY-mj;j z@2#p!Ja;1;M7)|7nE}$3RQHX*#_Un5g3o7rOV+78Ly-U`9LCbej~}5K)xIcYdxbmlMUd+jdNI7on?3 z0!+|&QQ*r|+K|a7Z8IXk(#jj%QbH-Gx79;_H!q1);m*Qt+x)IlMN;3b5Ovd_Xd^p1 zVQG+VbZwj1yA*UpS<%K5lBnDv1iOoK#i*F5YN!j$v!)06?(QzQ-PqU|d3dZ=07}0}L?w_FSN2fdL;V~WyD(K&rT{O|*B z&j+AXk`ilF%2fDaW5e}LHC@W7!B{B<%9AV)>8p9BpZve4Ci;o`6lk~BrFc>m z5*6FK{Fh%5c$(y`x^JG_h&sI~dMIV#VQWng`{EFDr;e zA}=s<$T^1ISt|*^EtT;-;%a`dZKObppZkp0))yn0~MHLmQ>xdlQX&l~6He}QVZn-PI%VES@uB8Z%TT?OP(seN? zag>0AI*jUA)w#@%5#0Uhc0rEHMea77>1R?-C6p?}Zax|>cytZJKzgflZ&77X z|FJvIiz688{`$T}Vzp#3yPQ;Ux8~I%Wm?hHUH4knZ@e%G#h9gNG1H19g)gdxF8`{6 zE0#<3V|Uq_57wp}q*TdV3O&4Xl>;1Z%0hbK>- z*oN*TYq1SNB1q1^ZOGS{7d{lg%T0XBh4RiJi0XaChUL@!nP`c{0srU%yxizxVWh6) zPdO)6MsF@%b*)5m#i{!+M$%ljmJN9gwd{6~B=K-1mH466qXKgJuoo_dK|!iOS0iE8 z`ty-c7xL$IP}#Qm&{aL92bCFM=s4PnSjW)F=&2D|DSFN;kurkK&JQOilra_Nli1d` z&VMO%iq7z(ll$n{z9&EYFj+jkhF3~LHM?U98aq5Z#4GW(zDA)U*ccQyF3&ApL6DzU z_c%w;4FJ9lSd+^bcrwuIc6ZDziTaXGtXnnUXdk>HZkv~70d*z$epkw4rhszUT_>F# z#URZkqn+woz>Iowax!v3N*Vx7x1o4nxKVZmp5kemuj6kY5IQ(G*xue|D%A-4t#3=T z(De62)Z)~+yt#tPGX-m72FuEd1icEVuXzZ$ge*()XC%92EC2#Q{l4NbkwOuzmAzVk zqV-^L`8g{L!bG1DbtS1=O<_oQcC}}zL>h20N1Q~gTE^%=F$&LU`XM*2uB-^QvZ~`Y zSJ$qJ+-mBl2FPSk+^rGCO}9V5&^VxHbLT|O1d?XT8ZXLVS8;>aCK z^K;A&YbyOzx3#bRe_42aTvDS`UUbyE4!07jxgw_c>u>I_c$oK;#$i4u15~k8H^l-0 z{Y8Gf1%?kPz*xJ-t_B8(xx9n+s_uIqB<^v98=c3uyrDP;phGd`EifBDUI>&;4&U;( z>$ibK;DKV*7W;%sKk9dncMNu_uki@b_bH45$5bz9s%+@vv{8+*3h+pR?xWTV$0kHg&M6Lp0>ds>F1K>`-&7sbd4Is4 zU<)hHpmH?s8DPnGnPS^zwepNT+psovBS$@{kS$BmvK?t`A>fj8RTSwhM`#7aK&5C> zE3zC3F5Qtl*rAv(7B!Ek+y0WyMx_e3E$e~eU?X{J1ChK@Co0mGHx7Mt`A$nCbR>c$T8r~jRFG=Kd?XQGGLeNAjW>CVUv3Zt zmIkIU*Oxw0Q7}YdpCqR>MSV&DTY}<1==&(?3yUzSkoa(_;L(fZwRa=xxtOv}bRCVH zK~{4ar4)+=87U>hreK#&%u%saI?d6D_^~?yD;0wB?%lgLZ{F|`rMC`C zdgAz1AP<{f2;6#af&tF7gRWdS{>KI8V~h-yTUXKY!I}8T9i$5Jp#9W=JHxK8w`jfmT}5MPbdLY z!oR|1do2>pC9STjelJ9%-8u?`V#(gMJV!dT%+$fIH&-GT+&UHytzR4+9jRasx2>zy zL1rQ;KpHO=e1PXY5_LyqbZ*HdQn(lh@J*z)stsyeVzW$I4amy5jIJQI3#=5jBoQP+ zXjQ68EFN2K`H333qz5&YV;%#EPAX4)w;@Ig|9sL`l|;IVq>#6wLgitNQ zvYg_ABp!DtDpW34_Btw@8+h%bS14{lmi8>Xv$L14Uh!(FTr-smseI9ooND*<@v(i6 zA5TK3c>OB}+QZ8y@hPZo^Jy)oWNRhbX%o@zujRbKVA29_vOI;|$xfu*M~*gEb{)tq|-ZyWL! z(kQj8*1}MX?k3f0V`tWVS5+j7tAR*$sxREOu5uJkmxt(CB>Lgd4l2jN| z&FyGa6a9X0aKJroYbGLFD$$tCIjPMlZwVWcmfPJ?^SV1rltP%cx3^_|I}VkMF6VOy z8?~~WD@m=$b^5A_q)?L5G65MIimsK*EpfHv>OmC_axT#(njhIm_O2_btAt4ZRiJ8@ zsI583XKnUqtA39(pK}s1EF0#tm~AM3D)uZPS(9=;Cwi!i<|CZ4a)fY>%7gu`^sict z;bD-jEsqG%=0tkS*~JmdbIzD-9`O@3oRu71@J0;w1dJ5b=7_qGnGacD=nEMoy z)vY?F?hwdyzN>kn*7AZMr0n;2o7*yAA!7#m$7_6fdl+YhmoHz^iqfs`m0K!sAmXhb zJ4gqMEaL&kghB}fAme~SF(wCCsN2L}gvZg%^#HnwZ!*{JH;N)fRa31}5EsFp|@ zlIxZ2^of%gFIL+8+` zsMiuP<%L2Lv0<;>wvj?yx=O2Kddd|Fb06gnayzbym6I@2neH28GU2%{Us&ihObTiu zvpToEW2?Dxxq7oARHk=aT5ea4l-E`pquZo;6{{s_IC3D_0bnn3amF*B^Ph~gsFhSp z!hh1^387q4cbp{RkJNBgK2%}N;*pUL%dEpsswEi=$)HN=SAFs21#G{gqa*cEV3{8j zN8*G@6D3BYI<1TT#~*)c4-(pi(MYYw_@=1NS~>pm^z;-|xLg80=uS>fHa9mLad@9x zJmuu)_7-mgpj`oSXCEx#K@KU&KOK-NgJY}jj;UFIKEYr-+~e=@2q;cqfxZzsXb%tg zlAK*lIcV<|v-A^C3h3M2GX);-1-#luC1uZ<2Ct>ceuJ!$gMy(;7wQ#mHnUkiXbhf8t7bGpV{ ze|&t54;G%;*UZtqjYxOSE~m&brA!Wc?LbwnbvtlH+1QVo%Coy*o*f(kyb6|9(1Wu->d#MQsOm_w6M^O3^3t!fV}U6)BELY4NH zEWx;iIgN)%z4szTMRjr=<{FUL+!B`=SE7heWgtRjYbLGo`Ys8}SgyB`{6ypu*%d{% zo5oO2x>AA?Dk_vnWCeU^(<~-e>n!r9d{*g3_G}f51WTO`0L2uHsjZ2Rs~FGE7>Q(^ zNJ|NcF-%6-2J4Tx>vm|u=X^Xw1K2WJ)hyIXzO4^oeKsH^D z3+aGrx;0cK9ngcXFQZ2$a5d|%5BLYqCH z;(o#k9u`2GuomvGyT?8L`0-;(+q;4ho8*0kwJ=}8D~^#~MjEadh9`FpHddL^AtqS; z?YG~4{q@(&%S#%`Mrf81l>{4>oNqU?b&rXm(BllDSBwAHI?T@Xccr*C34HNA2?w+ z8V~MM5Xq7tjKoaFg9R9kFzhK7o!0x@F#~h1T_mk05k>Wk@Z!ablamv>3qXQe6_rb+ z->Kg)ypK5b+lUD0S%|39tJ{{(RFCSY6Dfz8I(;2e6R=*>YMZ;eM)q{Utmy{h%41cZa>Ze7Q+}F61c`{*vdN$*8&CntD0`Z z$S#%FYb8ob1^?4UKRfzE3Z24-5Bey|+G?SieIFkOB+Q-qm_8G(lUNv|@k4?4@88dd zfs*#DS}tM+if@5*3*3|>Vb#9e?+`R)d*F)Xdb)X7_-Ler=j69pEavOL!aeZvAmdwf z4avZ{Z)XhC!RRBDU&mj%4q)=7lRIF>tF3&}Jw+>AsCII4vb(!0eN$>fpX-~F<^e9Y zwzlXn>w|-Xh_R`?A!GwZyzr$vsES=5l`t~vz@V!8wp?CQQlXsifU~o+q?*f;`fFuz z*;A-o8CA`kD@D=0Ygrnpx=8<)w}=_bzY^bKimtrS8g@(~a;XJXjJghxV>* z?kYS&ZmX&5sIBbZOEl}3V&CN|d zl}~QvBL@_1%s)OpzP!Br^yw4kWt9aT*W26MD5qnTn|=l=X(7;0a!ldx*4CD?A>3)+ zf(_xA3NPAO1PXC&45~V?3Dr-UzVR0#B-Lc0WlS;Ya_g4cR*BB);tbr~-GybPw*Sk@ z328c22Y|VQc7s~Fk?Jf_Wb#>LLFaRNJ&TOsHjf(4k6%F@nCDT2#^rzVu#r-h*`PIoI5wZoVQe1y$ zhhS33sUb@>Jlnvfq7tPgTD`u#>1X3cElq~Re-Cp5ad_Ckr75?5_~cJyjh=8& ztf}^zSImxb{K?sgohbalC)2+_fFu(U)p4R^#*jdVCov*rJpjc5Z-lN2t;1@?i1&4LWMpEO`Tyvif3Jx| zy_((JC%|q?rzwf%qg6`WrDSWybi$7O$tR!Sui+*R2ruR5pMO5Nih2}9_VJ|&mVm?I zfi83vs76;w{fUnnq{)ZK)NruS-0#)Rx&7Exjc!Fj1MX{H3NP24yn1 ziI+|WF0Rs~{P;Vwe~RBY+jU|6!~Z@y#i(*GPPB39Elbr{YVuOMmR`MtxcA~dOcXWw z6IKVab_&bxQYRduPEOP$F)oK_G~r`lTx_ZbyK~0s^=;6Jpn5QHk5N~gn-g59{d`%EK*jP58l>&~9 zv|6Zr;m(5R;#aR;_4W6tI+~Bpv*LUMd`Bi&V^%9JEc+g^H; zifKJj^Y~ryBTN51TbT(ax$`E?kBeP1l<}))`)#(>;e+Ah=sn&VFWvpkj!5ENvwxbD zIV-fomM#@CTiW5YS@XQVo}oJNma~}j|JiRY4dSHJmj1f*u1U8n&4jqxOMji6SBYoi z4<{9#ZB+b)^aP7%NV*l1l9$>Ncjlz+OAWkep2Y8kgv8$Z^5x6eHZ@!FQZLQ6YxZ~f zgb`$9Ydl-?^`A>6PJg>v-nhQOS=-cA;3XAbm{K36>I?0WL`k7-ili1|o{C?0ILJRo zbx0J6DHff2;Mo~FQKj5rVS4(l#v+9T_-DPL=r=|Ea}?4r)DyM6xw$Djf{=J2&4mS^ zjbzX&H8f})woazNQM zf1f{p{`&RnFTeZ}o9u@len_V&$;~H@Qu2$0?@i+PCN`*v0cwr5Alv%Y;eL1j=9BZ* zfC*3~vc+%>;|k9XR{T@`3PJtpr=Q|H_~>EEgF`e%vxUsoEw1yVkofn+Cs#po0gN34 z@?;>+j!xXehXt%0*7%L_Uk^cF@fYlU(D5Ww;hM@U4cwZ_Fa0V0Fz(O9gR|3PcHGl% zoShy^RXtnz+3L-{?r^R@XA7K^xzqz^TbFoI{MV(PiQg5E;L2`XQ>8?Q%zmDphm)^e zMc^`lYKoPz)ZuHo_mCWjtHU?S;qq4e014$Y)LJJ5Q&e}MtGs>t_U`VEm#q^G{lG+>|og!Rt#OoehM$nh0s*?#;@sgA9HbC1H?U`+wNh3ouKO7wVEja&#Kvy$R zuI$tmZ!RMtfztD+SVvDV2IT?m>%bAg&n1D06}N2t{$>xAfPD-r7S0DBe83enu}y_c zQ{pHUlAnhzQaald-t~^ft*X;s*|eDRw=I7 zn%=mI1|sg3rG7Zf&4ENq&-PWiOA~`~b(#av|FN`RzkVHmLDt>bGH3sk?xiIxeKXzg ztA_)cE}4OBOV@>Ghw`i=+0y56_2PHUHf`yVvxO|ZH2uaktyp^d;i0gKOJ4eY=@n7} z9nUaobn}awkm!&#?OIur$$M9pw)Fkk>cxLu`JzPMPR3}ddg+;SSm^LcRTI-@wuXrr zvIa|)S=qNMOPl5{o(1; zkHetmStOKCC?R}2bfY4u;zGNA_3G8z6GZQw*rpiPcevatg>rb^zn?5lG0+Ke&u+x{ zGl4|7>?CHe6zG4#D2bi-TX-0+(P-~=&D(FQ^rlo+N2;Z0LI?@6d6#CihW z@=a#6H*fH~?Czq#Ea_LX%FnDS7#A{m1r!XN^f9BDN<%)M)Hc!EVU?CD91ab77^`V^ zXc7%y`eyvOd>A(&9FC>#nsik9JF}m}UtTKw>fT#ysg0A;m}Oh2kS29VyiQsjKNz1xh=aTWOc zE!B3mR!fzcd~$Wpc`t6=%H}5u4F4N{5;te^y4f#JhM4m3Y-QFIzSN4@F`9fHeql{7 z#iN!}v9qmCV`*s8)jnJJ$`(yJF!5!^0mYBV9N;72@3SvT)Ok&F!nqWFIQeGWR}=XV zKYkTShS>^Csu908uIKE7R}q%pHL12#b*UzCkInvRslrR`jbE|m3-LfK4dqfzRzjYF z28ivI7lpHhuWZq5)6Uj2`~(~5k58bQ6c6;LFJ3@t{PM>?{`ljMuU1@uP9QFwOg7CA zWA&A~@rOV7fn3PaHbpS356>Mgcb5u@l6GsJ3JunjC2U6w-MK!j$l>- zoH2)pJf)*xS>HK`agF9Z4qa` zFTeaUbak6lZ|Uu`^-K)$nyQB1AvFy~7S&6`!S@YMp zz@=%h=J&~ampWm#72zi$}W zvbX|EtzPrq_`zB0%9_&F4CvA)0!n+RrqEI2W~QHAQ~vBsi2pk~4Q5MAziVX&ChB~) z{PdsVCakH<`Z^>klfOpd4m|r7MeAl?Iw?8qLoN_u47fDq{hAqd(fXxrigDbtSy!N) z{@FZrLQwd(Khua)U0gkk^854e4`Ts@!a{6QyyM0v7xk6YpFB2z?hN?o#OHho>uh;2 zPsHu*?IiE>dTc)B+yodk>9ndx$dz2*m4GqD!M|Q?Ai9p`j-433(B5V(6(a6>eES!H z^jR3|;sj{qNL1{1l|VmI)C%=c3^$hia=6^8xAWEAZwk1&u|bn*>U$@qDYBr`W0~eD zagGXi=WiXQPCqeuNRA!u{`k|B-dr@X!#6(AD1=nQtkOh%npI{dO3sq5by(KN#IVEv z(u*ndqkEvAM0E(&nAs{#UOo8}Itrr?g#?{HTf*$?;_uA%z@#hUN8;|9{cAjGONhT2 zch1sS%vN>jjr^S9Y+row1+-`(V~c!umyc)y$`RAWQ!te{TQ)sEZ z{C(+>!^3f(RBx$W={Cj{n0?XJ@>H1s%UR^W>=(|C(bdBVv-HShL}njM|9A3ux_WUJ zr7O17y4j}^zb6J_sZq0qEPXgz&csn|smIP%EPi&WbFLOJ>4dZ6wbZWIFEQ@J*|sEF zH2HF32*O0kkD>_c*|*QWG(8Y;O(q}4e@eV7{+j$;+7=W4UHVhp72)SgHJSZ=X}l6x zD&%aLOS9#$(5q+1cd4}5PtG<5|fml%*L`{#{B4`kN&)C(`oAe zeTzr;ZdBaLzX{6w>MJ@|hx_{k2T}PJYBl-G`|rPx1tK>xYm_?qedeVLYVFe7!^abU zovq2_U2!#L%ba|kqwp+MFRobJuBGqCm6WkQJnXL7ZjY;%njum3;=<#a#QnCWKWE=N zThH0YXDcwNL)?(bUuXM#sh*Pu6YpKwghWxZPc0Sr;fEhepoB=RrM541b)tG_v1W{x zioIH%Bypc7-pKEKdV*|uvtLWsWT{rO{TYw-Y%9WHO?)9e`swB$&P|>*rSTVR{n(f| zk(OrB*~%PN4}GG9#9QM3E)79=C$jXerDx-zS&2leCm$w?ji*_<%tSepCY&7<{)9rp zOi6$c6<*X2hm$(N#LCdSVtUCn?OLk#>?ceAokje*@LidmyylHdv+?Y^W^0>x%h{I} z!Bz0OtB0#cBKW>V;3YNpmj?j?!f_E2Pj&Gwz(V-!9=bC^n5kUX1QOs|CPk%cDLfFx+EWEQAo@>1jJ)2B2~88-qSPScOH=cR^*-Y+QA2z{2o zn%h-A(A6tL0d#n9zAj_G^4! zPNU*4@vX7e0lQu#s}vVC>5#bmL)1$v ziwYlK*{H-woqc=!#-&yefAJT8L6UYr0x_;4vZG1G$cQ~vvtM{!8}h-Fe&h&`TXsxPmcPpPt2k}{NWE5 zbeV53@uUhZR6>f*6+tC=WqnLRq5|vLNxFmfH*R^o>(UOT%mO&y70<0U1WeH)g~%C; zHts#*OL=#9*Wh($QO}Htr6E^lipNjsJf7Mia=!>POp&J|{wrPY&@DOn3L$*nKY@lR z-o?Co_YTLZk3arc+?zvt)YZcn{7E9+2e^OBM59>#;5W z(BcxV=0X+X60S}hS?HqIuU~)k(MJ?`7GhYwDEPuDPArFi%f zy`3mzsR{9iaqANAU1|%L3}*Z67uFO$`6ThRbfcEuwN(E^A?b#n?fI*Rm@VyUIgls* zkawwJq{C8=rCX8c_Q_LHX52ZmAI|>w(P~Pf^x*O-x}HLUJ%9fE>ft1b3qRYj;Xuq* za<-`1SXWH`Fs5L(HzpO1E3j1C*?yb-@={B~@1uGo10;Lf()VYPcxk$}hvo5|?U2Mv zXWN_j@=`TIhD?Tm%#Om+>#j~Y8tCaAIw8k>vQ!9O`qe!WzT)vzkwS#jkvC22`$T}l z!uu!MfmuU${NJz|`~-3d4MF`+c8SHW%@!*VMnPa=NSW==*?vwma|uhcbW-_5$%%QJ zsOQ-NC)Jzn&!x8r(33L5XPGW8?Xmd#{Qv(u-O0-B$(2;;5Zt0Z{3LXmdK9Go5%W|c zUW}GZyl9i5RinU2#LZZc$eQltGh=~#LHKE{(n^g9%vB$sYd9w zs*q81C+ihaDEWP6Ax%T)>#BEk%2G#_4=<9;BT(T;DivNBUELe0t{&Q^t{!6IP&BLa zgcX?4A}&1R^G|366mMD}XJ4HtA)(++NBDh28Ks{*d4lcR zhtj~|Pb#;jM^;hqm1 zz}zUZzEB`T0(IV@_3U``lt43eKG>OjgXk09S3-^zU*PC!Izp>^4>~`6dg(O9J0NnQ z3k!O@HD5jSq>|m7H=E(tCL8@k&6xcptlq3zGW$3*XWnMwmnD5{^2zM)OEnCC|KSO| zGrbD5tgDBJdprKqY|qSoZMMwGQ-^ymK_Jb9Hd}4}3ES?cpMJ`C;kchCuUqQprRv2s zUux;(!LvOOzI3U2S0}$IY=u~iH0MtKI$Ndqb&1YQgO5*EP1w@7KC^`!qP|TJNB9Xt zT5!e;sgP#dzErV9pPcQ(_?s)cPVrP&2MH;{miOo(J=)oK≫(sL5EwoiN)`lS0-b zJtB!WCMv)F)w9(|^v}vEk$CB&AbUl+=7~;TYEC@LvxB%a4Q4AA*XQtXdZfQO`)s1} zv+WIkr;i7NkHYWArNzH5eR8&4>A_uU??tomFgJp;C8sCDQp1-fK)=F=It^zf+0r&M1s(ROi1lN6I25AhT-6lU19NL0Yn3`VuaL@UZ zS&d4CuOuVN0bU^!qr0b*P`A}~Hd8?O26fisHgZf2Y^m?R|GpTbB!V80FumAyD%JzP z``zyfBl^T0Wulv__3PKqpFc-U!tz6XBVC~UzGen4>8q3KEorS2q+hZ0 zmf7;>G=Jg}61AG`vG`B39hG<_ z{KBLOiRLdA0(|)4hY}|eHaY%%@~*hHOC7>Mvz20hO^d?nJqoCv!@sT>rb!cK$71qS z{QbD9{G2vPUTIAjd*XL3jrdYmOd2>lUb7FztypT~8l?O1>S6ZG$%9MHk6SVO$WmJp zJsEe}Qu$XAW*Z)VXSRAve@(PKu2o#fQr+Ux5|2!py!6Oyt(M*uzi#qu{ClDU&o*$W zU9-Qh`9iu0@h|C$UG&#PRoA@kken5eLK2@CH+fRRY~kdf#x9?De0{aUiMM_lPkuq8 z7{vxjJF6|PnF;IX*x9xu{<>7))dE5_m}!Esfui%pb;{kMDgiT!t_4P%Jum^DJ$qJ_ z%={4O;oXntl|Zf@3&Sd8hUjw(zIo`DHoQnqB2W0iQgNyD|}0$ zSpGL{7(6^2%GpN6kIcS0U5)ghtoi)x(66i&#o)w0aAlc^Ni{n+R@N}?jY0&i3T`id{M0sjV!~uPueDVo)>bGy-e(}W@q3cxfwMot& z-r8FrZ&3hExVgDer#0U#FiS0*&3A%cq&>3;gYWFr>Tr^);>2iqEz^buful}fI)U2R zjK_I{^Nq`8IPpFAFF8jm6lXMBR%e){RBymMSqPG)N|`{lz!l_p*7#P4F* z0jO|JUKdv;ennWfxLe}K;}2)wb@uH9<^ba>NgT2CHBP5Q$?1MRtnTW#ssQD zqNN9C`#gT>QeP!LNj#W- zQ9M$UYR|rLeREd6X!ebXUnV8Q)rf05`%C;`-2AxnC%-JcCGM`XUta3}vpo=g2V0VG zR!?MUq624Nni!_p&(n3Atx3A%c$gBkU8-2Rw&~B)1tv;fS%JwL*Npz9?@fI3>LF%7 ziEFY3@q1^xG5v+ZT&uCqK7an43gnV)>hN#`XRDOx>Xlei;rOo?&Ciuz5a3YHg)b4@ zAwtf{H1z~AdrJ#d?UPSFK~bS?s<@NGqky?x7u)sdJ`-O~gwYR9&~d+n88+=4&`3dJ z!AYhn#C5?=&pTE^jz|iSP!!X<5+7QQ!H4Uvst=N#XtkVpWOVYg6R?UEGhrpY&n!Zr ztu{h(*NAJ5-I=D>M4w<+#nff^9`qarg8k@6KZ-3;SJ9>X#C0lNLyAWo-`7Q0Qj@~Z z!)VqQFJ7ddZ4bKGt&c0r|4t>O#n*a0vntk9Bm4rE%o3mW(jymD=5Vhy#U#}RQG5{9 z*Ar^k>|3f9IbD%HiC_9i2>V}Rf_}r2$npp zIW67KE`9cJ?@3r=N26g1KNF1#-^=e~X_q~Bh#?5&8(AZ0HB)?I{TAOYDI}Ri)XrW! z7ARNIfskF5lsz@L-osSvj)I^O8$WIC_{|`yg~25tE(d-U>u?MWl4&p_Qg=C%V~}SE zK>T@eMxb;r8MJ~*(kpd%3*;KOoAi$PgB%V=KEkcGySgH}lY#-5&tmVWYGmVq6ml=2?He>tIl913 zU{NJJYQhP>vL+920xOz^%1z3vmY^qO?^?`*DPnuqVw>RY`MB2Uf~a?2kdFqbg!_W( zu9{`V;TQtEhPL3-PJ=x4;Y$}Cy@P7o0p#i==VppwP_828fK)2zM$7K&685$2jnbh5 zO_xk_U{Dl~&}M5PxVR1MyVWuFDo5|N={rPkH~g&XV1W5dx2tE*o+%y=^-tY) z6Na6ZonVX>yoj*zaGFkviG)XF$E;0IRs_@#P}NGai`8Va5!Q#SpzK{6T8>7 z6pkUaeOJ(j79#YG(>K*aj&D4}?#L-*%J?J5_Z_N%UZH9i0Rze;ylT5N<`sPjil148 zZ)BzG8fh(cR|)jrBP*uaC=vl$CoL^5QPI^hb!}R+)nK%gwKQAB5$0jsmHO8pG(*BJ zbaw&c0y0Mg@~$S8!{Knu0#Z?wr6KM#w*k5$3~da=nfmtj)Rk(mqb|t4*nLr#ssLk)W)&p*iKV&F50$B0^J6{o zfgLa>e^YpSXxyYp#+BpoxYhey#%;MulK_<#8iae-WeU^^@=ARWW+)}?48`k~k5Jax zF}~%S1SQpAuXRUnNeH)Q-jbDEo`hs_rAJnG-l|NX8?DLea5q;^C*DnD`uNrJSla{W zV_9hB}ri)ZJLa3H`)+ zot5ap%Ww}}9hhqvQ0JEqZ#i{h9Pe$A2;L61z1bb^kJ~hK^sdVpTsju@cze1d**vGpJz#Vu*^`${_?wx|5ouPy}=WT=@E+ov!bkM<*y=R}aii^7QG`H9EF* zyD4se3*Zff`f+F!7P5XoL{L_^0pwDIv8eSng72MBsc^>-5D9Ee`DaWhSHZStDHDgW zrS{czhocLa{wCk;>iYUxtVRmKLPsF}PB#f!Z)U$t8oEm_f_ZaP?`CQ}!UL&JH1R~h zYjl^7(9>ecO{FxNW}v4MSenb2HmP3s_Nl2wQZDlM4mSoLc6B%7XBs2Jua+Lc4* z!^LIOMLd*sb~^v*)2AXo6_1B06m=#$+9K9F;ovP)Wp$^1RJgm}Desjm@K#AkX~#MU z&=tESk)DP9sK82qOn_X1j_T8(I2dr@T;+%0rqApJ!G6YQpMq}N_|83gS7dm|X|c#v z7dGfB&Y3gwg9RhX7)$SJo zbo^r&p!&qEt3PjKNZB`v9*e5hyUqy72Z}TN?^%;9f_zhUZAkTu6LmT!pbk*=`rF}X z01J%Ar2v7SpC2|Py;Li)MQl@00LUYnnXXg}=^h<#1f&q@T?@wyT=A|ACONX4#hU?W z%{dy9(M1V;VNsh( zw6`YXi5kT>vP?n)M+~!eRE#eK5$30#8cKnzhI@Hlg4 zsAF!gGVif9eINzciZ6Y}l5HQupFJbCg&2u{10r?ARs5~=Oi(O0a6Qo3U` z5-4)BFevhgq3EFss5Od82%Dy}i;^20uz9`^b}1||#p7W-$jg^6b#=&LtFGFm3R?IE zWKE_P$XSSBL}wbD|Bf0MYl>P%8yk|Htmy$fZs<#zZG)d~#G>uFb z-9;r~%9Xc9GD?RIPfoBYNd`r2Z$L&p@6$GQ7=fSMK17FihsLwO-pzZ`98I3rZ3byB z93gV-75Nbd9T5_YtCfK;el}C%g-${nS3Dv)G@Ieg&T!iY$%G+@)P38FCWt`Iv3IXL zJt-j54->;|JY6X;TS2BbuMrFVSyhfDNVIC_}1KJL+zZ-Y`gqWqhe( zaar^F4uMs`%hTQ!aX7XBsGSTg?BbV_56Y`dfxyfW`5G_IH3{Q6UO`LX2OoT(s3EVI zjT{r!BV>vjae_5K5swHigdE?z+6axnqf@!=@R}@iPf`z`DQ^>jFuJQbolKocdC(yL zd5-a94TU>->YB-%ixTZsIwtV2%z-XtBBPfYi&dxx1`$eoouel6n2`0tpwL(XHAx2e z^sY-IP_37#&ziyG(GeU<|JKK%J z;jjtp7jiBhj>!Z%PyS{dx=R_{J;NiRVt|I`pbn2|^(xQQPH(#ARAq+Z+K$*?gErP9#5V;vDvybzJEf! zon6?#@N?Vg9){*UixC>t8#gEPMN~X4&g~7n0c$`lMnW@tX41MX*;mz|A4SU(rQ}^T z>)yE;V8>^M+2_xnt4kPnjfCReCmSL5#{Gn%Zvb-ltzO6u%Md~UsB>=JbvR6+3o8+Q zM0woS`G|@uKDLkAxwcW&9p0W$!G7`Lh2?#D4Kd4EFftSaZT6CvelK*BFk8v>;NgWq zD`SP2gpdiBckeVpTPZ#8OT=qqvoS_51ry=$=rSlAgI z4o7i3IiYF**DUb5{M@GE3o*-BPWg}44X0;jhK85u`dY9mFx9&{1?1s$ zjNOJ0*g%lbPPKmssrgWdWtmVFn6&g0zLZ5=Ac2{+3C}0Mileh)J#s~f``h{1JWNzK zBCXu$fHEK|S^NGs>nGy~!E}}d-7klO^Z;Oa#)j$CHwLFtcQ`DAVOcrB8W$n7hUKtl z$PGC2M;G^;$;`zp`R*0hB8*0C5H^Arkp!mK<``x(tg6S-gKl)L8zRj1KAc-PRs<(D zmaQuW7a^0Qm`p*<ek7q z{{~52hYM#Y4*Tw%VLJ8Rbt#F^d2f@JH;2PPF4OgjG2`si)_9(n@o7uC3Y!M;qt zAl)5(7=BW`Zbe`re;g(NEfu;rsr8U^y@ef?CPB4J9_bpOI*z!dW}18tfkWen&Cfwj z+R(#84m!o-44FY8n0vYkjDA){{oi}5*u!18($1rRt8;E+&1n)uA zj;XRvbz7CZ-NHtnZd?;PB@Zcpf4my%$_4NpK8cn%#7M{(rSfLw%- z;T)1PGoXx#w~BAUELrC_)eOvVm+7+0pgiLTPwYNu>G629;4~u9H)>Mop+PT4^|B4! z#?(gXaXHD=V7D`zQ}KAFQ8Dz8R6H)?RDGL|jVb5ME*68TYqo(bt-)u02y_5-8pjDR zUV|E+GyNMyzUgdJlA8<@bx;wvrASQrAQgAm7I9SRR#B4NSyo>ij(iwDxi}mSHF$8K zmr;Y24wV&KGZepk-8H1f9r1<;nh8m4dYN3BnOR7rOjq-&FIofW{5et z!-&EnyFVtFOqKQ$Qk+`V77|Pq1{HP@?-*7lZtjx1IUii|LE)Na#@Uy@qOV zRdr}k+h!5izi)N)#hzD(qd2w^$iGQ2ulE}Lwp4r;z2C99s{{A?0u>gur zaG@i3oJUu5*_1`Q*r!t~Rv9OuI&?P^7;zEKE$^Y2s{$K(aruDx>^?|iLGChYb4@q~ zg&e+Wa{@bRSr1+h<63r0ds&pKRK>A;Sp7#$c2x08JEmRnTwFg!ch=mt2cQ7fqY>87oDWt zIUUwY(7dU>EV#%TzXUvJ*%xS6z;eStFtbDLb7<)JSMXh-%gVU+Qr_Z?TmSBmoVL9y z(i%ehY=JkxF$-QUw|N)mgH69F5`x)Zq@?q;*@yX{sC2Wl8ky`UhZ2@0$P+Sz>{;w* z@^y&ns~Cci$yR6D;_y9t_RQ=`L>uW$m8c{-|EsUQ`qi&~^>=^wceG37UlZf;9M7d3 zxh+Ox-F}U?qpw!_BeAM#F;b9)gF1uS(8?nisnKn2niSW%i(@>JY4i|TZC~>l8ax21 zwcl`{)%ISo80%P=4ne4$dbVWdH9Opk!JO2Ms6SI*sVz%kLXg^0MQ9SsatcYY`6>LE zy0<+&V0eXRR#DkDyxSf1z=I3~^_~xshu~ftU18P^AF3#uyamny^^MUl7I`XE%ly!? zq$@;DD?Y&nh4@YBj7uSBxWYlGjcIFTCaL@^_5>RB>V%FF$Kleh{VqAicFz*tI4`6E zVq8)@n;$R6tOTQoYt)v`KReep6`-v+=WaKjyH83`i=ce{M6yI{pKNnB zuXJ5os#qD*#$K{?Zl_ap%lA46h6J+z-ALsq4v1Ni_BM6DX24qG=4)ATqUivqBoBO> zpnD(*%}Q8AYV8rH4ACCdv1~NZRZ21A*gPb8&66ij6pxoOZ9xd9mjI3iYuwQ#elT8@ z-#=m2W`$St5PfrVgB2ZSR?-PxyhtwVb^9z@vEIdnluha+?BceUZ}DJJfR5=4qb$t% znKhY(1U2Z4OPQ1%GR+{a_mD*{bC0IS3wivC*KH@rIYo+8QTt6XZDo#rQp78pc~Tl5 zsN27>4J15&ldW?s0UMUc^DcB%V;zv1BXd|dFjs@ozl|EV>p z*^)!>yK&4kunE5XD4idJ^fB1)g_}R~XMk5ce z%XJI$QX_^?+$i1^HZ7CtQyA3M8er|Ddzqn*ncQx8yPUOMb2tl`)w;e4o#=EaD#SkQ zgXL%j2$@W_!zDmuE#15f0rFt?u7yJn?0~&Suset6&cQG)I?fF$e;f|`2z|wM$4}ug z=pG2;aEuFjIsuAh7@C02`ut$QVyWVwDy~ox4oOZw)Z`bx_{F<-@0N@_!o@nN>MR}o z`crv6gEtQ>tU!*dL)f1>M+LMO>T9Ca;t!@%aWg|5$?fK@IHMqk$1l^#je)(qJkqTu zdRDs{zc)~~#Iz|ZWWuw#2Q)25HdL>>;dQ;tf_6}b}#OO zgeCUo#4cEG$B}$Pu0A;&l^|P*PVaR%92Owfn57*#aYBquTfCS?X(ARvI^WRihM(}& z(7NBgeTxr&`qQ71BsM(Ee&-%bO<>YeKy2OW@Ve0CKKn-Mz)L}G_^TM}W=(}C6E);1 zLvdiwCwX>$JjZ&_QmWhH!@yp}WXn%nE;Qh7-D(d>521U!#*i^0_;@_(?r{WkHpbk( zySr<~>q5gCRzyA-dp)RoHB=;YcI-@tUPo0>2`pRSn^VM%nuj3<_6ymt>RC9c2JhB_ z>Yksa;E`euhhtm_A(c+24Nr)((YrKlC88w6+5<&GGAc5IhWIi zXqcf-6tz~ojxE9w1BX`r&bNoz=f$~;HmldKU%!0$lD?WhIf07J#83nML>#E318Hl* zcRu>)qrd*^zy7Cx`lsLg<~Kk6=}++qzD$0nHGRv7KRn1b;&F7yrEXdh0ZNO(5ALDP zXvXViwSt$K=k(y4?52^EZ4;}TvO>pM7m@}j9>+ox7eU<=<at>&+1?vd^GYP5kSg^{Zd~^rt@!k6=rkgZiNUfAv>? zg}49V4}bWt|N1Zd@;86;H$1Y15q63hvZexQWRm{nhsk8-v!EXup=NB$Ax;$Auaihv zL#B)1#L4s0$MYj1Kf8zSGO;{O#ZV zEtq*DZj9DvQ zy#}BF%*lkF&nA&sT0R*?!af=L4$Tg+xN?2>yWhohl5o7R@Pu<3Hp;he-+uk|*Z=cB z|MP$U_kVx-)1Q9#yWhpjX& z*ah?=h~HEfx2sAJYQeNMeq~Xa!N?aOGYLgiq?7PER)SmbhL4KIH35ejw8psaHxXW@ zdxtn2j^dyyyX29w2DDARdi83ziPVKk;!OrcWN1C$?PQKKHmw2cD}z%ES)uUW_^mA|K%@#`RiZ*nu!!w z_Fm|y;PmM^(9N#Utg55#k&FX?A1)kr&~ZN%t)Q7#7=$M|5^dTpXje&lAUo37wtbH~ z5t?S)nZ%)hT*2$O88-eq}{kE*d(;`lpW15NTlqIHmR7GoVCv4`uZ9VqL(s*x#&{$?%lgzoq*rJ z``zy@RTx;BBn)X(urq~ASjTpLbHd7Gh>i)E9Wp0A>ul8OS>V0--ghfwCmqHiu9*1Q z>tebwze;U{>uaBPaE>%eB@Cr2cz!vKOTn92-}@XzAR3)b{zHeOHWW@WA?T+8WRgn^ z3UXrPu+5;~psePbI0TYrw`HbXCi`og-&u&t)k)-YkeR|S1pTSbGM>rn;*bRN!%t6m z_wF4khA&(c;)-u#9twXurp@~P4093cv|?F7uGgtS;v@A%TfYBl=-;SLOe5svYJChn zKr5eG5K*M(92KPmwJklL#4Pk@RxGO#O+&m=Q73(<3a&5Ucs%Y?Q*tCA!qevL-2fm1 zYj-S-&lo{>ZF1xTyFYLIJO;fJ z*{HWmQG{qq4RO0tUsJM#^=3)#R&*hYi~8+vfBW?bnfLOFw3Xs8qnkYWHVq?7Z|9(K zAZIICA0fMhe2a0uNYBsgkWXS3?gF|JGEqG9;#$+Txt*c3muO~Q~EGH*)G~3 z>X8*llv(jZ3jL;Z?6r6b_2JQ}m+&tb&WW!0`Okm;ixU*Ksn8~g$2k+)94Ze14Tw&H zNlaqLp>&i2lQO8sQHbT$XAnq2x*Mr;!PAD!5_DQReP4;31Q0pdEi+M1?9T!dhSAwo z+e`0@ou9li^RAAI&_lSAi9?LS0g;zZjwoRCGsyr zc?-tCb301cN}%}+z_*#qu@}Tkv&fiY6BpgAtP0_o-D-okD$vJ_N1}0p714NYf>&%g z$<`gCgXy=h9(8j7`#ZPkJu5uDAO;G^C_8FW7?#rVz3p#&c-hVNHWr~F!%|h`(=jDL zK6YBC$+QDWvec78aU5sA!YI6Z_wMIE|M~0JuQRJuFRx-Hkc+fPPlnmH`rkA)Tf^zPlew{PF(JCbo( z<;2%qM8=*EMpcKO2;mPD7+py0!f(ba z&jPUJWg3Et>tjB?MF1V9D$&-s*meLWZ>w|89gdE`sBz`0JvW%M6+b=wN@IkCvDPFE zX~bH-F$_8=$UGLh{nSW)&3pMvhYycP7*}nk-_Q}Li*uudQ9x2nWE6QGNRYn14`)d& zAij>rBZc8b!$A>B|KTFbFr0F|Y&%#%IVYgd=&D;a97n;JjhsPUT83p zS_WB<3rS6@OTT!yzs?)ChZzV@PPyK7*$(Q3(K)(9vU@mjfnz<$SLxC~4LXVx;SzVl z@>t;c5u2$g;sPGk>lt&FAlgN2!N>tRmf7gkS=efTaRH35sC_9wJ|gC_>|%cot&UY^ z6z^Fs6{N+}F>nRZ_Sjb@s}FHpH6+B=H6hbIKmrxjgF^4koY44vdXbY|<4esOeACihAu_TR*0XYL}Soqh2R}9St#W4Xn zkreL1MSvN2JRZ4A7BBhsgtEmt+Ccm{%?i&p80bE+F(>M92q|}TO1NAO>h?+|gk?@x zohO56fNosc6(EN>Z48b(ok`kjk7ON3pXgi#WrHGvLFd9 zXNB>qjte>%=lHm~acPIhw@I1>uYe&T+dEy5v`3M*E&-nXdpWT$f$75Y2|O)B2-`82 zbQ6gI2n9p7-3i&@a109UVmlAbc63A-rE5x?8XctkEm&Y#`yr_dA$ba389Ndf#r#X2 z)jjw{I~=0`OY-*i_INy6=9h4638aa*xw&cPL(5pmvLTj@!7N=+s@p7529W9oh)$T7 zK1;@FT67gJbvPV{)9S+_!cwv<>*z;{Lt@8NVia-Mi8dU{K~4i5_Y1SElCD8#z`?6+ zCMQCb$PcW(Y;w$kzWt@*=Ez`xF)B+qzbh75hr{9Mf~`j63En%QcP+*MW&%zn(D}_K z*OvJ1Hw|+fXObazN0p`pwM^iLLm_?7<`v7J-pvr01nv$`~NLEC1G2 z_((p{6hd6iX z#6DU_6TR+n>MA+`f?k!(-MSJ`d8Vh_o&*yro`Sk16Gvv2Abv_}=|Ro;cs%CRBm^2& zo4|YzSjv6la5x;r0lCeHyiH1Po}+QdEx6OIgc$ws_EP!-leLw)RGI~oYhR>nOZq=| zPTK=QqibxpVSdTb7_uZ)BrL+_wK$Jd>Qg5kd~pw533B1PCT-#@G96%a-fM!-?x8!? zsw0VZ4oGhXQWZ>gSp%pWP34v&2RDF_4s=%=bm+CUz0H$@I;A5#kuI>68eM)5c;hdNy}GvXK-4fJBO!Wp8El5;_qSegY(S@Qa z6Z9*fZNY-~h+NcStWC|pSug~@YrCF47h!?62OY?l;z~Eo?k+~&8<>aE-#YDia9&7*@NA>EXbRrbD|J;;mvDdww zl{e+=u|0?_+CIVW9!S@%A-t-np`tMO-Pibj&_MZwvS-%j*%EXX#V$OG>y*P`4cMXR z9kEHvQa?h<7+1lo3VJg1Qpv=(r>xi3qZ0}iI4OLH zNj1v3KnHQX=u39-z3+XG1};+uKyd?@&>)Ajy$q&EI}C*1cTLRUXo)cP(66V@g13-c z^>24L9BDLTiOV8u;0SS+xDabj%w8%JdS52bCyKLiuSC@igf!=GD z*NL~)J71X3PPml2DGii%JRWCFzKpwEDCp&g)!LC{n}Ja{ z^cgpfg>JMP7FJMcn7*OQ;|_;$kYsO%Eb*Rlw>GFYhd~F9-2yu)^de3PZD7E;u7q~03L$q&Nj?r!dALxqO&l8NM=+ZQ>S6;3`OOJ9p@a5Q84H-3=KZU zLwDsCa>Hkbkm6ghS%m)HIWcs0Ci9aMieC|81I?U5c$~5D+dHE3oc9xdDJ8UX4U zbhG?^Q1g@92kEmqh8{Z{3ScLqLR-~|w;pKj#-3#@ckQ?!yXI01^;s|lfG(dPMv#x^ zkOWE?IDR(suU4H#WWT|NXlg|}dcjX6XF-mIj@l#Mi??IVTC)h*fjS0o2!|_&5lEigEzOpE&Ok^f zDM6&vk#gjNebSto#w!hyxO zkz@&U6vtLIT+Fzng0<`fYngPN!D#krayO6STJ)0NwUD}me>xtIkn@ZNjlZ8mkYWln zQ|MMAFEq)HqImrAL zgTM{~F$h&bEet&p;VjTUj|^E47!{tLZ_fu)N>Q@ApMTOTzz^E#pB^&T(Ol)T$}FkFa}ETxJ01n z_)8gLHYh*F;a*BZ!Elb;Qs5>6nPxn8#yB7rsP_(P^>sKdg~U{1L-9lL-VplgxX{Z) zre5b*0|_KQ9*?f=93CEps@^he&uSXlIcr}>iVMv^G`V5Sh$6nJU{1Y)AYU=Zy_AuV z#4nWp6X$>C8endn@IzYdioD%n4cM5VSL?PXq3Xg0r+8d^#&om*w2P9DQStZ&&{#Or z7L5+KEDcDHi5cYv^S{TD|A-d)GS+;Hto3OA=W7#r9$l6sk{gJxorb&RA+L(oBlegsJ$*Ge_=o1`}$y}uC zA6j74eiW!VBx}M$v&ABOSP82bSxWk0A~| z354-Y*2Kk@xS<@5ZQut#_<^{>4k7Wbudiu-x2!yq{B274v5QtDaTo0fpa zVjR`$f}GwuC+a0QpUj}Z9H9QQLr)Az0cm{RLO?Mor}28$gD3;)G_Uj-&bc2a0Vz31 zb$bn+;b~;k)xog_pfDqSyMB?gAe&~d)Gw+Cd^VZ|1Iq9 zvjA!CwlTNI!ailJ_^}xGBMtdp_Bm4YpjId4Io#7M=XhDj4Lj5lKhIi*a1mpq#y!)S zN|<{Qgy6b&MHXS!^vAA)7Bs|-yrU9K%}IyD5u(fTq!rz)K7)$M4e|z#@WSj0=t>a3 zDJUE2^TM-d&qxiY7z{ATQ{R0h*ZTsJ-j52rOjC(i~^|8VHHg zo2hn;wTJdwFsa;r06BwxD@)qRGexu9F?fZGO2>XcVsNZk%S43}*biWrtQL0M$#Oc1 z%&t@t3RbBl7(RgQsR3ip=D~y`=t*d3MGCaAifMo?yI|$o_r;4B7TV}=I2;bMU1d7f+%~s6!9-jPP!{lzHm<`dYkvOO=V~gfeHN68Nqq*KtOL zvX$?k9QioGS3~zaiN5oi0)hr?7 zqR0+HC0U*Sg@B%rsVHJYq%eH>@};_v37DkV^+|`ru{}WQLcWpRYuwWWtr-^5Q`R^^ zCtycMEdqKLQP$Kz32 z(YGcLq3F^a-h(~EV6=k6u?9?i#owte-rnBEiYQsmW=jyl6Pt!Fq@Vz);&pB}p565CSj}A;l=rd-APvY?h@+h0d2Fz>S!K+nF ziN>pp>?;aEEylDVVs$CcbNu>Pf`#+NZXrRDRqCD3U{ed=rmcX+S>%oeg|0Ns5N?L)FAp}UN)uTh{@qG%se(;6Qh=D^bB`3>pp zbjydzBwL}=#zPM@T^+fC<^d8_^{z__ z)EU$lCEb1|MESctDDy8K6Sn+}z+GY0aMOSdZH5-$MPZ4mL#fsPJ1; zVo|Y{clwg>+FCzMAV*`h=Kurz)jByIG<7r%?}+Q2GH~9sd4zFvLC$3O-aULqDd3&9 z1~{-V7};!hp@tCMI92I(c?rc*I}8|Sy`XBBvSZY3Qxis@*k}Ki7z7J;1_H{e`1Um07of>wFSbuU$@@@Lwbyu& z{s?uz7+G*7k~?D5r_|C$f#gTEBefikZGfJikhf+R7t^bm+7ma1FhhjyGD!TUFj%@e zkU5ay?P@PdR-n=)n$T65T`6Y~nmCMWR*o1LKK1$<9rWfh9!BACv(U9!7SEFk0N~{a_o|VNNFDo`sqW3cA7XSsl#;um9ehc*u9F%`#Wu z&d)Ut$IyWI+QuQ#An43&L~EJ_Bf9|)e9po3^)>sjxG{lY=_p)%>LgM8`tM6R`%06R z;eiDs_xqwAPbTenBqb}6dSGQ-j(-r=*) zK3l2mNjiHRc`RG4#fFwy4#Z%l8Z0S*%Pv4Pkkln_Y-Fpc2bwF*?m?r#w@8P>u>|VU z#zqj_seIOx)k8m|4rbXlMYke~uN+mDEkz-jnnNXZng=*F_IhUUVm&NP$RXs=nvXpBJy*1^`KG zmKRP9aahW^XA$mDPna@6%UnM)ly)Soq`|W6SDX(T1d1r(j*Bpag3$&c521yw_|6G! z-bL4U9P8>`zw*dNu6VT~4gG=lIHofDv>d5JllZLA34aJXEhjLrr5z*`&iVIc?4sJ* zRHiRSsPHHr58tlK3JnR9nQ}dU9|^}@r}fdQNvLH7#ac)E3|>vXZuO!T!Z)C7-5fkF z9goM|re9wV?58hYyik)uhhj}95QG(0cQ=6wP?+>`dZ&BLCY?0UtC$=0{9%gN+^AgT zm$M}>x)Up_Sg-1F@Aga7Ss0$B!S=HEWb}N0{eYr{>Yw20u-Os8A;#C_xeyIPd7y z*$J^9sr{x7ryc`_z66)VSn6cr`BzT)6fsywqSWcczNm%jMU5GVhLCVu@puE!{zhNH z-gU7EdP34xY$u-OB82w#j(SUusaZ&t)bb<~m;+LQQMST02$M;fQal`I0UbleZcx$W zI175mc?gLDv}3rl?v_9c%&S+gnrSjnjPcSOkES-@S;LNUV$D{zTVVS*9*>N0Q9O=m zFF_LC2o+rmY;}asE{DSrBa_%|SAafAW-a4J zJj>uMp0z&YEpVn=CN|miu3S)cD%rtMhuhoRLDi>OxWUjdG$0vBrLMbk=XE(A?4rhR z;811?&VA}2pbLphp}`aS_4PIMG-mj%_ZCRDA*2chhz|cl(*&XNraD{#6|p(yge@?< zOU-@caBLeq-VPU)!;72Ri<)r_eSKmH7hmEVJX}}s(m7}TU=or`wzxJ((jm<7vynT( zX z0+F<)vd0=h_qYc7lW>geTpTDsT6o^V>kgY?asi$B0y`8mD|Mm@HH4N;ZFrGITKqOp z>b552lRkKrrXtfRzR_l{Fa;)6VaL|c;l=i~`J=bw)iUKD8>Va7fGM>GFzv}DuFxwm zrKNkZYt*QoV_bA`qTtn7y~1&VCP%Jud4lR$cETY6X1$SOh#Beh8;lggC-E+W7c`?l zwvw_ZT!t-Vt_4g~sBi0b4jcLT z{&;oE!;WIEc0BKpmhIIEYBqJo*VHf|bCX?fLaE`tCCD$CeU-1B=6mc=@u(r<&`Xls zdE1$c(1#LFWa`u=NvL~QWSfv&&z29uj>ZVRR+_miLVz<&tlqte+z{a{nNp71pG~Kx zZJ_0uMRMudVLBZS+^L~C`=W3-T7p@?sK}Yp-V+d~0w?G`3p*A(XlOa!JKwuUuUSgk zC_s1K*;2-k(d(apkZ0;_m;&+Gv0xLP1&<-^5AVFpZ7G!St_^t8IUF59GINMEBkF_# z^jD9!%c^%M< zseC+l1Qot5Tl1WqXHO&x)hc{kmWhW0MMqlo6h6h%1D?$S)VRD9vrbxG+ z#}K0F4H#)1jy<3|J3%RQ@uNfU4PhLh|J7%oeP+Si5IeivLHjo0aO?!+f>v`yGFXYu zHtN$scSnfLfcL_>o@9hIX2KA=r=ZQ8LFb5DY-UC?9WXBR2FD54!ZKm31at8ekZQkJS-@g z#7?5lcLKSp!%v;kh@%i$DV{%nUc7qsAokvZeiY=3u(MP{Fz*r;uWpp(w4y$7hx9MH z67uUH^vF4>7}1dK*}F395HjI(v7c-hSpJZuuU@^v9P47cV?qa3p#9q?2v@zIxZ8u9 z`|a)RMcW+auu$&k)I3UB$d+&kkZ4X(S}CAbG?R9$gF_8EqxP=Fkl?geUo1Kt4u^4& zY{cdP{9uVIV+crOtNKDpa@)PprlrGN!V#wNj0(dgO5Nm&KjD&@E+^22DM)ldN#O}m z$I2UeJ*mAnG1{gB(|#5|mKL+m&;tlw**-XJB|jreBqwnJ_Yu@)Td zVKXF?G90SQP80@55lE2K&?Zf$&APq4b=9#WglnR4&f+!5cNj>6C%#ICuMnZ%LifN% z3^W^V#7d?BNlM>nlQCHX1mLXSg0xXLXE5uw!EfwvTnaK=HDectGJ~BIqP2@q<)OaU z+ha(&VdI8DNxQ68q%pzJSaiGko+aP(Erx3gyCILXib1bx3X}dxERZ5s0J9M1Ta<5k zIjjc{ZU!wXBSPkeTY(&-gOS}sPv(%4y)jiCvx`EJtJ-^`M2d-h#^y%DxQt5f{p6x- zb3d3v3SAIkgi&`ZSx3-o%YFDA4o5!vMnL5I-joI1L0`OhVNEG@ODGJ zoiX~mNL-Lm7kT*4#e5Js^hv%hoa(O zNJaZ70EeRnMn6?CcN;dc_N)TJ*;q-DgOWf|GelljXaakX{|*60yo<-a9fZ^t&CL7i z3uT96Z(t}l*`kJ6GEbg7p(&<|T7US2_7bP45fI1(U5HWl(_Q80Ls+|m15b~qA{#j+VsgW-U4w5d437@_aI*-DNA z3^zjyOBJZtyFA=h}8WDLb!5PbYX9n^0ow^*>;(L9_UX|0^ zV!jCnY*H3z#ICQev16hp zrF`=o3dnK5FBcq+3BrgxgPX-HBoe=U48m^nQ^?WyjqP-PX^3;XI{p+|G!1mRYYQ3~ zjwk54@y9>@F=jrmK^2c5?$gR(_GTJa#VP1gJFU?5pfiow6X@U0zOA7o6tP1xO=NyK zj$YWL{>ju)J~I^{4I{5hHaR!WA~aUmx$JXP0?8^fQ|8ssKgq|{Ag;OIE!gHkW&=n| zwV-(K1Uu&!IyCmZs&+VRf_%tW@5cE|Cg@0&{QVP(zn$)#7V^W+0^0$UisSLvmn}-R zCv|WWy#&W~i0zwYasu=urUbUv_1c2?oI1gWpgl# zaC_SAgon6L+h$341<{w&d*sVf6DWxfUh%_h=+>Apmx-2=Ndq;(=n=1uswkV_(hjhi zj>jX`@~#|-i-0+fckXr8aUVzji{C;=_C-73txc)qfMp@KTBu%eTOtbdsM6XH-As4J zVemc~N_CGjRi!$cFwG9_sg?Ht-rR9|=o}A1YLY;I1_2 zG=nI^davP1?WhgL_|t2v(krmZ=7-NWLo@dw9hgtY7aGB-g)`JB`UcYi;^&~-U#96} z+n~>qI-^Q>bElTZ42sE#iy?1D&fPt&+-eKz;nb6~psJ5o7=lc@5WSvQ2eo1*x=d^9w+>LcY}XXbgz2`ce;We!evO9_~BQy1Cm~7OJeS09d|3(@GPioTDV=;Ja63no&`}9cs$f7{ZYcENHRX4g0JFFB zu7x=;AX>cug`~nY83mvU@>a!(fNBHX>x4@dKtfA8`u46%Q_%CrMWqf@HjXEF2Ra-z zAaV3%Ex_wR_R;q5O#@Y8&Yc>P2PKoKsk`ATqzkhkW6|wmFxjompGiM;&yu5ZWsI%Z z5Y*0ra{sH~*$e#~?06^gM(oEw{&7Lifzafb(^B^_+Xf_d*!^-HjtR&}-@6t&0;3BJ z-c8pw;ENoF_A)4^x5MFZY!XbfrA}m@1H4oW5xY{+<)DgR`qqSe+IBKu%jp|EW868! zCS+>0;mIdSi`vnP?ou_DKixqU_9Z+heOPb?mh$T1g7wugI>;HgdB0qT<04>P>@d4c zM@Y6`Q?@DQ*=cZRN_x_I}4EW-+`N4unKogTIEKyZ*Ono#mF$jT6J|ePNnn9CDj?aNE9{X5=_Co%OEEx9LBi@C-K_b>LY5*xNCaz8^aGqzT9p zqgE~GZZ`?U!|(LzO3Xv?)4RL7D>7XnbKLCga5&mSQooI;3KBSA);_Eaw@ov&!Dh8( zzLhm1@rrGrZB)F+n}tGzNu`INSX_cQ$mu-QLuv?JhC5N<70>EG?|04_w@o=L19KHi zOt(5{4X_iIWd~gQuU@^XB)Zj<-DM%$Vh*EqDP-naY7hFbK@n0LSn|~pydAqLcB}4} z#Z0n>7NIg{=XQAelex1?Ig0C7NX{@2?@}>{?~@R7vR7Dy*ebvTSevPUV{ z|MmcgdLD!aI?KxitIZ9Cys1v=j?ptCbpk#Uoz|9F`MWGr; zW(Ikt#wOH~nLK7W;y07*1*e;*C+N<$B=jZ*auqHD$?{h9PRAf~cn$Jrp0)cnlZMuT z66MfsCdatF0c0l2>kG9_Kpun$g8XsCU>l%P(d8bN(VfTR(Y|ep*20#~Y>qbAh7hAi z{WjW?hWM1aUsErThr9^yrNeP4HsCo{9FY993#qS+@svcP*w@F*;(Pb-J}eFf$ZTE- z7vGP*!cBMu$sy3@rC2p;*UiJ}mu_>igKl}LRZXJj z-WX#xE4~ZR5}scUBY*SDX#lhrgF8xXd%+0dp(7vRt&ko6PaTXXGi~6x;QJ!H%NXur zj-Yo$M?^w=4FJ9BgaPlb?3X6FyN7K`VowFdgV;Ai({ z=9q~T5ZBGSySrvDbxcso{Y=V%x_H(?#fV@A^r?^7l{n>i*PwWi^BF%2E+X-e$r&0k zJFgiUhr`hlk}wq7&gdptNEqsDeqrRO4GG@qP6@66lmzj3?--|$PmJTpgtcy$X$j~` zAQic_b~#2t{tO%xWEmo{iIL@Fq#BJO=kDY2*t;(K1$~ex4RTIKn8PTC_n2qP$w{s^ z!Fp${S>WvxQ<9i*E_GN6$>d9|Xw*SEDyJMtF+b@2vZEB}C+Q|iQ`n66ue}A%aU@&`aZWhN9c%jK#+9Cy#Y==D9x?LW+B2yoZ zeo^8W6imJep|lxa#Fdbn0z0;;B0yUxRh~b8-n%Zl0CP#Gmk$SvnGMTUtS{CpT2O~F z1J=YN==Szju@MVhK)8>K87G|}Lx|kN_EIq@ZfhkmV}3avd+rb~9n9XnZT$|%_E01_ z0$m*n)=I8ah9EEP5*z4-T*u?bk0q&Gkp(FGd*)rU!;ypH8%l97a`5Kn#?I{tBdp6_ z6Oca##df@p7OID4-nq1{Y(D667U344JK~8tq;rX(PdJl=_B~_L6Qh@wMH`V$tK@Ad zAD>)0qf65wLcFBz?(Q<%PIl{!DH5?m+J=F#8^sfeev&Kw8y#oCeINUv8~SR4X)kow z5E};jL_Ph)?W!!TE2)e}Srq62NX1cV>zD=Q!-%)N*C&)JjaQjInH^m~GJN~iQMuDe zJ0Xk?84GO3z3PC&GPc)dq|NEA_D{Qb{&^H39>MV=zm>IO(`!aNjtciqz|(WX@7Sxb@e7HN$e) z)s{8hS)jrQVeZ#)RWj`6IY~k>aP+)_cA7JSnDb0qkmHt2 zJI_V>mHM>86eJ;)Q+LNd1`=+@Hgz}|+}OP>4X0i5*JJHa{ts%UzZCQo^7zohY3L#P zsNoEKFbsjV%({~Hh4=~AxOzjG0N+3$zgW376zT91868`^{Cr^hc9)@{VJbPMdQ-?Z zKGO}JL>am|NO;}0T`3%n1Q-aD6AQ50Xl1mTae~lQ_Spjt-VqJhw9tuGnrwt*$qvTwx$4O621y55PoMtq^S zWJ+}iIJgj!Lofy9qpIVOP+sq(Gxv$c8LlUw@e{MRua|<@wAK3pIchrgByW466Y6{n z#D4B7rDI&kWy;;%UGKV_2hV^;mYWPOs!@9do znnI2*?uek?S)3J4@ZKtsXVy%sM$6L_kVanm?3m&FQF^M(K4@+A_v)4Jc4W?}7F|c=Cnj$0^(Jd(I&*(iI zX>(|AbL?YMg1Q1E@6BliW8BnnsSbm{7KsBgro@P@#lt}yfH!R2&5==MYK)f z01hQ{KZ=lpAo;VAac5!_97T=P$I%#&MYL&b@`3=mmTWP)24?cng@H3eEHPU98=LxR z6JS>>G=cE0M|Nada?b9s3`m@e4y5Aoc)Tc3@ocpr^NY-Z%& z!hB47n<{G{$zrU9>XTN8S=xKo#T?i<`EIUdAqF4&-a(Y2gNE1fK-9PL;mw+_Dn{$ zZe|=Ey&(4*)^a_Fv$T6)P7wOI=2#R-l~AfyqDAEJIyM7+eg>7F7D#<1&D^-%=+J@u zD(br)DlmRqSDQ17I72TWI2Ie?v;^4R+E^ve1Nt za)WNuG?S_WXL$2oHS%59netx|x-gw}C3|xcSk;wF-Lg{2kUW{3OHcx-f|l9~ zxWBZ&BiJG6Dr4bvHX_vX^T`Rj3aF0}USwPFU2!Ch_%kMCAnXpruKOQw`*g;9ZP_Et_^Qm@mOetj$$PY?o3G3B^kahghchToFREInr#+GoYtM~^9)vz%Et`N%Q;DN7aKOaEIUbKr&DRT%3~d&pg2qG=t?J&$$92y-9L2!^ zUf=t+1Ru?dz?+mxokrJ!?%olO8W0o523*c0-9V{qzg014S~>ysKs75YX^gT5j{CZGBz%CCVS@lH|6z8=w zHQN~#n^_2&(=yC?w~+04lk9(c120x8xd1sFH9)I~!Q1LJ*o@1WSbK(`ufM*&CM^l7 zZQqhs9ASF95m$|4TtFwM1$$#U25*s`Jb6-2o`2_rN`)`I5iMeZ<7RS_yLlHaRJ=`q z#;;xj3yDh{YLG^ie)3yo?~%(^g6xNJqQXx4%4vy*QLOppiku83m{ zFbxxhj9S%aj&j0UGGEI;&(ki^IEFE_)wB`pp%&WSDGur-DV+_T8Ock$b3fJV>uZW2 z^#GCUyYKZ`y|>dR=jP@ne*!bU@6uI|p`oNwm`^3mUr1mg_h@Gej6JME60IVAj&&#Y z;hb`)E#KbWwozaAOw7palf7%<$OYyw>6Ha{SW62v)Ul3s+oDQbqIzc5|FD4XPQ3)2YFr{AYqN z?sP5Ri;==uH_mxS8bF)V!;uN5jk}1ZJ49xtyv+yR7IZLRA&@!i4WSqjn#J&H9g!xU zjnn)wJ~1tp#TjW5D@Xc*mCpRM7oD9LIjmgmA#+~mdzORa@ra(!RDm20%i#KgkTK}c z_V?Rzr?X#0Rb_J-`m}BY?t^8Dshld%QbNteAxDer{))K`t zbE`=eLl<0YektgDv(`MvdN3#NR#(tjp!p&dbyimNTaMopGs@B0uTz$=BQSKg%LrmK zIxE11X)042q*dplkqUP`#Q^b*Iwv1YE$p+I8?LyCZYj4**fWif&vGedDrL!f&< zwIX2hsez2T>(NFr8&~}kH&Ihf;5`ULlc`$8AQeD8PW##zwAv1bO-S}twOS=)^*N^) ztZT9i`2w#E-n`Q{X`iNp4S>dqtBY=-qTY9@m>e=xX)&@ncRcX`pWL(sY?KwP@Dc9vc|? zq>D2u84Io5^{hmuA>APm>*yP2xV;<_(lw%MR!Fax6OzEo@lx(L5(ZK#+}qIrqLw%u zgMx}KX}5Kf2VxL9HcA*&t#T;PKy`1=XMSkTxzW)($an%)9K&yKZ&68I#8Y>KjxpOi zzpnv$023Q+@3Joln^SGFJ|U4_x{G>LN7CP zOX=}$RTptYxxKdZA{G+$X3X>0^u@QNy&}r6pl8pX z*_;D*pq_y=APj0->kc~hWO7qCaHB;H#oV;=T|CGu+J&V`w+gX?4Xs5x9Ge7v_RyNof$(!nB*vNpeV@jevdvr0`Wdo=?yU zoiLv<+Z0HefeERzkdv=J;F;9gEDFY)X*o1H9){_ShQ{oq=vxHp*8a`72Q?^0^NshZf^GGl>vEz^JC+D zH+LQcE9{fh5fNVn^EV2MjhRAG<*rC5iTWF};_yy0EwH95&In`MG<9 zx(Bmp+k#!4iN+4Xqk*mjQmkMO=Ztk`Tt-OFGx~_kB23b;&scTGR#9q?pz+quW?Bz8 zNRoWsh^*rwPNz1oEzlV{224sp-r(bOD7DQbb1$Qz7JNSxkDx%eyub zk|wprin>_QN4JMC$FBNXDxX0yRPWX5w86c&ESTWKrqP8tfzUYT9fNDI6SW@* z=Iw$scH7G=LUKZbwmU~vhz&%yt4f4X?c2{VbKm+^%!oqFYPFLI4Qp|*>e&KCW0_b0 zXidV0=>XVL{$@5Io?2a;MJ-=cIUE;(x|~nxfk4|-{-|LOlKr<--I@VgfV0p$wgFG) zv@1M$@`QeOY7!e#yc(yNkW|QREUuvw5l(Fl-gqdHnjsUlH8-ZN7?f=Zm1q3;Zle!q zpP>toZhkUMh8{%4t5+4F4Mca3MzeF9JGhm1#1dpGxp;JBTsh8!p@)?&v9DOM+@kJq zI3@^nxpD97_o;Fe0q?aj2X^iN1H~I>nL*WW1*mbM$vYqSvVfx1>_qI)fjntB_8dqF zM$)O>FzD;D=cw39V4w;wtecs6naT}sv}`0)Bc$(eMXL)ilV99JF$AHs(TS}5)FG%j zCQ@T>MtQsah)%L|tUQ8=?VZVaN$IxIKtww&B^4jc3_bJPG>2nQNUlADstd0bUcGu% z)o-evqdW6TG)^xsjC_m7@==uR)|{SR9yv8D#q3^3-WPc z`KWd2A^|={g6Xh9paKJV%Bd3vIEDs2w6X5`=B>a=F_l5ACGrIhR&FNoS5E4X(0OTG zO8lz0h`>{LRz+W3IkF+g6xOw{Ik^((pc^(6B;VzCf-u*BO^4X3w+T<4JfSeGv?a+A zJF|RVeWJ7?3sbUP>>-~!mByh38pgf0dG_$|^09k&F{B7%*S#iNg7550K+lk)EGLPK z?4)YBN|sBy)~KB%Y0t;n*@>Ga8q1!yb^){*@Y(|1+mbtX6olNugL>hY z>46dq-fpi18jj|7@tYb2^nhAp z=4OE%Z6_BT?ZKFu{0Sq%x!KhWq#UZ<*orInBc(hv91hFiZISV*PM2e>O25;&2w^~I z@47g40q)v4E-P|9q}DW82jL^#1LSO#G?yZJUCcUWp2HIvpgti#>i-A*(I+6vrrW@zw^-ngug%u|?b&1@;5-w6f#*H3grb0|k_Vb<3BA{DhaT9kGpI^)0c4F~&SIWJ4#|MbhdB_N8g^ z-jK{nXKIt^UDCWSeT~VUb5pXxfa1TX#=7qd??;hn=i>7{_oJdMLP z@vaS%@5%YPqh~npo{Z!HxfJ2@8I-FB@1P(zKh2FJT3n8!_sLmTem}bIe z_!2Y1JCWvyz}W5FWeD3)11j?Efv&#;#Z(qaaOSua;pHz>h~Cw4v<7dqna$SeO?HUx z6m25;aUktj4K+x^f}^xApAkW~w_Yko?F=c5gI1_jG$pBhDS3~e3-=cLQe5XXH1GV* zo)1md5JnU9uFH;qHAo^po771m&8)%dIT8@p&3u<3l4k5&cfvkf+s0*wxPv?}11)*f z7E;t_X?u{Q%gDTSIJO6@ubZ12sOWxi9D`>`?-@rIgo(4adMUP&Ry~ZXr9DA?VWG}D zNl+Vffw>JZCIaW#Q7+0I4er#yPRpB{n|*HFI|m7T zC_lHiJcY1*&6gpWNxe>67W-tSuM74diNXt+#%m5K$Aydt=Slagu!DWcMFM% zQgisXf%x{ftY>&J(dF#P!!J&Jm5gIh5}>|f4)nd1Ml}YNKO#SKGL7y8v|6Zdpe*NO zHCwS92&?&;YYWjO1tCR)rUiV3Elb_&e zw~(%@bRZ40Wn8b10cSb^0^Sf?PwNuc5Rb$VAQDm(FuqbwG0_}n>1ksMN z;3ahq9rO?Zyl5u0;@T7|6UY%@tG5PSEPf$q{TtV3Sg3mKub?9M!95huO13qH9WN)b z-S*Io&RWbwYx76P*^ zV25&nc`2xE*6TOgrZ71(UxA4s^i4&~Q=$-V{$7B5>;s9iEkUASMz;+*mO$eYMtQ_z z-IjnQ_PrAn&r(@sWToQ7Ay+U^Q#WZp>5InJu*Sf?4BZCmYp+XzFoeh10*xcQ?NzuD zVzPa9f?~JA{1mlWp@dTx!aU!GF2t_D&q_-sW)ZLPmI*2al8~>yc(D`EM!jZsg&ELF zc{?7SiVrM~CrIn70jvYeOr&5=vm~v1E_h8JFLzAnWjR8?M z?hfc!iSSm)H!n4KZwu%oeCClY^YMf2XqOP>@z1jk)`!s0K<))e9L^B%65;DzV!dn$LjcK6ImcYl~%yA$ysWAk_rL}T691}np`|PvN#^Tj?I3{2QkUi%L zG!FWWFsE(rx?}-*yZB}+WTue1s}JCG9S3f1ZWND?3uu*MT+-bp z(t^lXi<(s0zi?{iD|(4vp4uq5x>R6qU~0w8FeS%IgcQ(~I=qW!TU8pLbu>xTe64~b70F8p?LA8Z2=hAKG5Y91EoF0xMphw@EhiSeY7J%i} z{sue*Ud^lUE|L>3CA~9d=1xR61C+LXe0J;yVZfb4f3M`=nndE00A$-Pg-mCVDe!rd z-oBR@Q=H=$=WwhEKM;)XmLJ@mb27 zppJYg13~<;ft|Y=wui9nIr@HCvg>Cw$M%3(O^4Mr)0?** z!i0cz!B5tlC@0VIy<=&BOq#h~4v3%Xr9Np6M=40INz0ZQ=3=WP2ZYYORFut1PQ3M{ z+1D<_34G6fQ-?8K@5=hlt$AJTS5yTZ!u?LU3ur;bcHo`AJuu9nmtzc8bVvP%o;gee zIpQX=ZD3{|kH@h%Ogt{n(F;6O)?O@Otnt}*L35yqDZJHMnH6RBS-cSfL0$QlP_UUv zPQW*tCdG1CMwkF=be>@y3JTINjdhXEl+x_Su;fQ7(SdEBldvP`;atz%OMsE(e73;C z{pf_=wb&hK1nA=F?WhVm(qm~4cMuL4Dtgr+^voH^0CFjKp!35{129Vw6BYe`_TH_# zjoWGSHI>+694U%uS+XM9k>kGis~d?c9=U25v!#d_G zqQJxV`+b7v(F%tSZW8G+quHTCAnjOfrGqG_CovzAgQeDBjD!)D);k*Pba|HP`>fvu zlwe`ZuwXj-ER5+9+5DKcDr6hwXKm5&m~#9-qrOxub7nFKq+J&Bn9DB9w9YMmqfJrj zLMB$oHWPMm(U}iA3y(Wcl(L43Sh%-WFu-!vyr!1vhKjz9u9zn;#}ACYNbHz620f=_ zP(BY254m7=UiTs7;o|RTpMjP*&1)3urN&a8g?g@ zF>v^W{5<*jzdYdxvv$J033CC%%LE!cW3XT_SzZG}Gp*zSL=H3RDEb%|4jGTh5f@6x zzH_GLJYM_q$8_deJ};;a#*Rp9^NK({D#gOwX;GAP#xH8ju=ce?DO8pxS6CZGnFB6h zY5$z|gnF%>lo&ALVa-y))<71_;7b*q0%<0DwMWd%3imPBvjto}rUJ)#0cuK&#FE#% zX(1iNFD7|gljHE1AqY>XE)shJ3=x2wHk`-ik%sy+U$lf6s5d~boYv@6Q3MHVA9*;e zqO2Sd&LgjR;7Oy*uvVGUjmF{A-#8=sq~)ZUFpZIXYCMI9o>_ysnAps$ zFo3XmvPr#*6h@8XTD7_sI|y1cBC|7PlLu8`l3L*$A--(Ms~g1xM#jJRLY$x~6I+{uU&)8K+1TAhLtOim3?D%Qq&B+$V$d$J`FVK|=HQvERepb9+Jwc! z!w_jmv%+;p)x=n5IpJg-d9fYZJ=tU{Bcf=E7jlq0%oMmWi*73W^hCivS)#){i=xJ; zh%!vh3kKLhJ`o+v^NTMpFVh~Pn470lS)^2?-+GdRa@}=YZ;?IUED2QBStA z2w)zBG@to|sK4^Mu1HR6kHTS&|7k^vddKWjk(^TwrVUu~$VttTMl4b0UM5rAO*S$a zk2zT73aE|}s801KE4#dQeKRpePNvZm{=ZtaJh$viIItdao%$m?=_sS*Jn@);$ks%e zM<33W;v~=%efo3i@sRN8=N$Fsr%3Q=^`Y1P8iTO;K# zei1qevQ2}wI$>3&J!%=bF5b>oN`}`XQ#1yM@lp{Lfq8MV$(9YHI!rQk;yJzZOBEuw zgwy|7vr8TQDUxdzx6^11|F5?Yln!zX#3UX=;viO7fO&leGxhD>;kI+0+ zkuK1Z0kgRV5L*~bxDw%~-VHKkyy@T?kgbO?5rC_PD~{yQKzV6$x|B7bE`O2{KiU0$ zpVv7Ns~&2 zDP%kWCG4DM@h3FGjApSDQmKWll8os?T6^maKx4M4^fOdP*AfV8e6=!yP4X$Lic%4> zajc=<7RC%$QpM1!IN@PikczWwcQJEufmVAIyH-(&qBOKd8e>A|bebh|f{r);5QXQ{ z)6=YLOtEN+oOklZi^JPRnbs*5nzKgk>`1P$igy;T9UvOgc6B))?OhExO~b# z?sG!KHdtGTvIe;6*@lB*b>t0%t2D-%j}}tGV4;L%U1RpK3>~S;SY%LNVFI6aLCx5Bce8Cc<(A5O=D3 zQ>0>ofu$BzwlW_gHPskgLg|IUf=UQ7!v$$$8{$pn0+j_1~3D*l&Q7BX%q`;9ezck@D+u4#w{O|2EA;x=S(qz#vsp!&v#aM3D$|2pi5}yC68lK~W zW}M)#VA?)q@pqUCj+_|q%RH;)`ucjm-=mHq4|r;i+XID+{0)G%BpUwQX;E_W@j%7| z)D?UqdHlhRq6u8S!1;E}ZUs)$Jo77yOoPDS>X@1c`^QW|Vc2K}5OlKW66zw-Al-{Y_ z9+VN^#41){7?cWW103z~|0NZtdZJ1)D+!&4Jnr{<&fVi%CM|H#>gH>2)J;ud^vF?y z3ie6TRw;BGo_vb|jbW;I?@lmz&G&HG_sQ-|r^Lg(m^7`0X%#b}D~+j3FL0Y97qo1r z+tko|MYWPJXQ5x?cDy&cJ!D2Sw7wERmUYco8EJ!8O2E{as4!sC3C+PNKGN_>Hjz7; zXWTnfq2yal3=KahN=RhH_sl{RQ|}B@t|gu5={3*2;AP%e4v>E7`K8WZ0U)A_95R0H z77Lszv^{DVqXbw!y5Is-WFeV=8L1}Wc9aZe%xTSxX+4PXaKGO-wm71HT-u_~6o-c1 zi`UWVX}8-Ay;oU`?7MsP$kyn`LqX4?Pi1@4pArLAd8*Bu3C1Luq-<&IU7+XMAWU;I z{=yUM;Ccc+c`8%xU47vuHQ=&^5v|YLE{Y77jx$&UT=n!%U+eK$zf#3In&r>+Ed1O-0G5T zModl07xG6k($8>`6rYA}v=Qz^;9j*$Sr~KQtw8xfh8l?a8HXA=jb@1`E|POOK}D)Y z){IY2Pr1{w5LohX{gTjr%q40<2gFNhB9gXnlNr3F$}$~Hit5okac|H>u#8EMgm#Q9 zu?fw|#=vcbVvphI4UbG6ehDQxH>jiJqYcKyg?M)wsiQF+pa^deT^h^U+L$mZkw#^2 z5(ofeH2f1%{=rY8n`-q0;nEN>Rigw~1f;V4e$S)aa;L>j`9saDh&g)3Lcpub+?h>) zJGp7$>1xD0vLQ`@fFUARPy(@uO-ngF>q}b}F)%M{B>-mWdfc80l=bG(7qp~*% zbyFC(3$$=hRt{DH4BS-gMxml8LlL*Ekug}5EYK^KR;g{TwQa;kuD~G45Y(HQDAU%S z2|B~YN=#yV&UZ#qcCeZl6p3pYOgo|iHMfc~2sIND#KN$^>3A8q$(uVB$~3IUuDAqv z!143*v$_@60y@aU!vkZ&=p?924%aUl2R z5i_Zr#x-)>n^tg5u;%J@+?#2+gvX)-CTycKBp~WtzRnfyg|1Nlr}JrpYsjK5^68G+2bu^mM{$FJZ8SI&kY=j z7#>7UreXlLyo;Q9z|F$1E^5N68hS%ychy0K%1Us;Ns#9+&m<5^TtT$|G9~jGF?S6n zY?G)UK6a+rk3+MYlpt`g|`aDgjEJ1yvz<_ zhP%la;U{l0XuqK<-$@Yt`On-z7Z(G4yx0z|)Ci>6$H&L)A=j{c+wb=Qd4pl5lFzc? zSh38u2nYF2ks@me;o<|^0pb@EIhB|RSa^Gv5$S3Cw&Z(}W#(6HeMce->YoLiCxzCF zG)$$AKqC>|=}i5C>W--rjOSo@d3t(Uc|0F!lPKE>C8D_-!@I*=HdEbEH#K2n%L@vM z6SqbYQIw3(VTbWQbEjn%Ahc&!cw%Xf*#{+@MawO#108I~!!tc66jK*~V(Q}oHSezl z`W7{*5;XVpo6H~)>#St;Nc^-VR$lhIE-o$xMWv7(e5dk|hNFW*Z_QyJ!ekUUnwckb zw<=RD#_fUj&ZD7<15$TJL;84RYgJD?d^eAhhr1*diIg2$>YkzxS6{itz(@-*iKij7 z)MCqo>z6U7L7ArS)22-+1lqRcJ!o&Y+hJJHedH|2Y1%(Ez;8X6v0KZTNvE=Hrb!ay zgmSVr6Uk?&i9=lE?JUyq^LRPuaR-o~<;ZV=>t&ubkX(9{>&n+!D9Mx-tRMgnG@0sL zhUQNoRmOlemUleI%(9pX0i)C3-`{JD`gccD=lLRs$U3Ol07ONB#yREyU(qZji;;BL zDZi%5Pod(YmYL=}NySsX~q*-;gfr)ixU#xThV?2JX@Rq_|0AuE zO5Ql8Ehx)pro!3p_n5gJ9v+r=K9!DN^$suhsb{UDL1bU{t{f`Q)qr1dLKP^-y_HC+ zjak@ofKA?25!>&{6DD90)Xe$Rvm#OTo}Ql4BoGL+-wtH=$Dau?!}~e<#G12&MQ0rNDOowgI`3(3VOt3~x*oE3^Uxl{216;oOEeb7+p8K+xLBY|kj z$p7g6xzjQLIrFPzM;k@S!ca>{(@1I7gvsiDv2IICt8poJV%rW07#lqNJS>7vcHSeIItvw@J_=++WbWWVxeZX{qob^S5 zSQ=vmH`3e)iJ$gB(gd4-#z%d8e4JJ{C5AM!?ld(JXt5{}x2X8xrUCYRN)lO%X^bW^ z^n{4Upv@RYtvT%HX_V52)=PuS4aHn$7CT{GTwE|dOvyekbSp^qEZAGYoPQ@@J9BZp57fi^=15A0)7+CE*Yfh26DKHgiOX$L3 zlO(JnOYpsoZ}#XTj1kdMKye$LBY&i2h-tM|PDHW*%SZyruRvR3c-WP9VOf%|Ei~&? zc5CJ#Xu4v0H;+Iokq_tVtu(})T=W$?QZ$m>X zmIv}J`fMRFqcD9)=$_nZsR{J5LSmRyDrIq1%NaBKy0vi3!0%~IZj#Lln!D6Hzp&3X zHbqK2r7UkpYm`NeFAelM`8gs=5Arx`K+z5oeaqL~2F=|l7W%TO27Wx^6$nb0eA8f* z z4i&x(HFn_@Lf73k1}^m6!aZu0FftcFZqGg!4C4KP+^Luy3>1tIn_N4xSWez0XQ-U} z1IcAhU80T^6SCcINA_7U#2w^lHZ5qM;lW1&_NGmmw8xHly@8C@Mg! z(m{rcIl^@=308&Zt@Po_ot8!ro7FLfPq=rGqggJ-tlb#RW=tM=C|(;oN+jWQDzUJg zd@QO(E;98(X^p{rLRz;K?N%YC*90jMvoy8wi$|=QH9WgwlO@)ZLM|>Yu*@vPN2x|k z_ZFQL3WqWn!A_u@-lkK~0#1QDgBb#WT(Zsjb; zvLh;&pQF#MTY~@=IZ)GUzVoA$b2A>q)Fce`cBC2S91A7(?($=d@OLCkwBgy6mJp|g2I5vJ>trSFEhRwl38F%?Uy;T~vMlC1`I)Lc3I3Xy^>f9gX%!tRw$J}X| z3)G9aT1RT(cnIAxiz&?4gOo71eq=Kfg~=pmJIWSP{HmPQf$Iy=7SaV3>6v4tfIRN^ z`?;g3H;fz^PT^R0PFV;Nxy1e^wrfWvw;WT4FVIoIM zh8ctiBn7AwYk=_~-?{CsdYD3}CB#JepbQ~THn0O;6b!Dya8J3@qErk7LYg(^jgPkg z7>MEpV9~cMaDrZzwVQaM#>*R!Kb=KE)gR@bNHN>Z%ccrGp8*zlylRUX=Ea_^7^-;6)qno(cE2B1!?0eRkuv`;-l zR+)s_1*FLlv3c$RqWnw0W=ajr8q{LN%_ay_-Of?{&(yKE!>Oe1Gw4bTW8fkY_sbw0CM$k}8 zo-!g)PuLRRR{nYnQT1PziCV#4iQ z2#+-5DZI^)_N~Ue^%qeD})D*losnI3p~GO%s7L4(X(fUvFV zWu++4yG!dVN+HnwS?xNK;XWEBaaH^#u-$HXHg1^%l=O~bRcA_#W;5f1Bq%0XR45p- znp7=v71PrGtg=q#n6fAFLqX@F@+X%k3&yVA-aRsm0B(PLe2mmhIcv&Xo8%gc=-xP} z93;&x&Fm-#%nM~o>9xS9DOf6&(=eKu;@dbFPBEDyPWyT=*O=LN?a?b4OhCKmRPc}* zx-V%5DHAc9+3)wc(-I5gnPccE!I)Va_D~?D%dlVFw!WgQ0gS6+PC5Ayhlh_pURh5H zAac5gJ(g05hru?!sK*@HW|JV^<4P(XF}Y8b3_(sES~9Yh_+FK;%&8PqoRr}l4P$6x zc)~>+0t|%hX`5AfK4w1vf+mZM(!ZW!p9Grf zq3FsyIRa}v#-`9}RkD-I2G2aZO(V*dj2X__X;Lz%@$gYojm+og=QNWW8h{$p>l|&K z$C|UOmW&5@b91xb@5i`U7C2F+kzB1PIuv6G2Fc=9jJDK(?RQHD!;N8lEW}o!S=};C z-Q2m>x_Eaed`wlCKD2R~@Z43D%*sct!a*HL{MFoPSqtKsQiyJf=k-APt)iJ!OCG?$QF)c2#EP^NiG-;tkqx~|~;|XBR4)Jw-UL=HRymbmD9ZZ6OlFYu5 zWFqGWRWVT#3A})EuGFmqS&$`XMJ4Zpfu71~)#ZR3Mj|D%%mJ5l zMaLVA)1LVWL;x+Rkg|<1I^(u++jw}otC0u zcnYkQ?(XgqZa2f+r7cy8TJX*X3W~$K_Umae&5a^kAV&KoeZg`~E_m;txZko(v&`aU zg`j;(TTRJVNfXRRlF||hB#oSEmOPd9xUrcSQo0_S9LHZ}$h>>nv zbPA0|Ke9Mg4f%Mmnt=S-z>cJ{3>ejS zyIt~HTh>ZxwwfZgK_*OVw32`{ngFu;C2`a_UY-V>LQZE7bdi1SWIPyw@fQM zn~tAVjNv|zcvTinMb#Z#sSchi4KT%|Z3&rnFDnV|AyG+@->Qf1bwX#KT9!^q2N9fp zriSOGEH_hFm>6WWrPdnC7zV`&7aO6uZ9mYnMEk0CCXp~KJecpqG4t%{x^{xlqBvrw z-Od5OI;EVCa>A9!kW!b|gUuu-TnLPD^!)r>smcze!Gl(7OuRBJR1r|Uud}%l2_xW9 zxsBWSYnvDX3GNC(jBeH~j{8>qk*Thves9iIh z?Ab?YfoHoX8k{kdQjdutZ@l2Qyn2ajB2jFY4u{BOqV@e2~|4U zmO3N^zH1mX4_z1zg*L8eKNzm_mY(cr{P^*sf!Q2cczAf=-dXY@i&1fEUx0+6*=O?D zZZ5P(YL?dN{8(?`7n%Oj4Bh8|>axOnD+3D@8%}l&CWx33#K}U%+62s?_ZrGcnVT5r zl<_kuUeS!MRRpsH?OZeFJ<3dQU#2mModNOM*lFEvxBLCRObK&IPy*a(UGiMfHjwol zMCH8QoCYw>G-k0+PIkK(@3>JuX4s+5UIxsQ*JI%*}rJvH>WNlrH_lLq4JnsB#nj3O~(fpDS>izpob#~d9<|DYc~ zevDMNGQLpWW93aFsFqHqpfCK$maHfp%;QDc7JgO*Ly_ybbqS!v)U9$R=pLRdsL^=TWHirL}%WtmvJN(qdyl+YfhgrU)Oaumcd@UY8io2Y3> zlh$jfy1Bc%TfXm5nH+Xek!#Y<7kGCV6C_I27?ICB#4vs`n#pRbke#EcknKE>J1w3py!vEia(G}($?JC~-1|fK)U`~3VDKF2k=Hz!V#G70VF#RsQRDdu zY0S=HJPkK3EaEsj;QtM0vtcMSmb?(iXos1g*@yw+E}xth=5D<5XAI&B9lnN#s*HIN zN-46~X=~xrA`V?#h}BlS1v_^YlTQns7K)?D^5kk&6T0nV^hmawIzLcCiRHqy5h}#| zjEnI?5~HlSca#9ly~2AjN)}dl@>&9NH0>aHMwu4W0-9^di>xq6{1{1Zh42g%Zr~PJ z?{wa2`&0|j8)T2us3d?Ylli@5>5Bm;m+#|@e1d6x4&i4^b|z8&G=r@1Cpiqu^zn~e z8_M-1L{l-X#j=OU_F;}Z#U`?s?RJZ{H|8h`dhQpZf-rSu4M;3i$E}h8O$8p)lMyMF zWrP9D`w-x3wD?*BEuFX;fSQdlPI=R&M;U}{CCAH?MPbG>&z+WPFeA|wsMC`;)tKFC zY?F~dKG)H&UU*&`UFLJAMNtxwsD-pk~K?WR`K-ol=g(85P!M`<^pp?kUK4dkrNoF6&-8$Xb^#4PZu47oB&?nhQ884 zw!N|#$t&aGOoZyIbPtXPmhJcZLUb%*l2o!i3=>&wz;L7rlj(N5&7F`QxC+xScZ#wq z%0Eg~!LUs4JY7e0Fi%-Z({7m?f@#GI@dGkjQ94P5)E>7AjcP)39g51d;V)BKj)9@4 z)rx5hrhYGP*N}638qkE#2e&`eBd-K>*eL;Y1QFY`MjFPfXkDl(%1YqY{L|Bu$~+~L z#m$Pb1>Mhho9XscB0>-d=+ifzT3Bq>utgT2ScM-3;aBrxWPMkOy|Hxj9yq7Bbtmc2;c zj~_n@F(l3imNO`d{eHiU{zUwVlI@X{ywDIjyS9y9t_}EJnP**98vTj#e0IgiYT4~} zY(i}~|4ssy9z0ZK4b4)8HzjE(|Jqzu(h+CU;ttVMqw9ykYr8m@naU zfRS+AV@&MaX~_>mRp?rK5am`ajJ)t=jKmd+1U`RY+@j#&TR663Cod`O%!pgWJ-CS9H9h%6 z4Re$p9gR$uni0wLtzVd9nKiYYA*U*<+#yQ?F`>7KMiOL>NJU`un_s@AZqo=`o}?a8 zPaKIk4kIcX_%i>(peTa1_uEa=+WtmhnV_r4^)H}l>d|Cl`HFYl|IZ5XwHRD(ld@U# zl|&-?^V3Y%j5Yb#Mi|2zTV;9e=z6!xyfzq8YLM$BEdfW2}=&et1b6 zP_1qxt}!>6gKh&m#>=nWmcgH3rS{j`{J1J>ndRL_Qm#8l=owd$3H5Hj%;nP1x;W&`Ku1;n`Zt+J|1f9)dUbu&rGx@_q!&oV%R_(Ia+fZAxNp!FA z!2l-t(LHVo1-~rLxtz2#p91TAuY&YEzd&6;0GC%P+wIo%R6+XX{9QZ?eP0So8~w&b z2R2bMrR<3;MQC0uhRja+cKMeY=59L5vrBK03!=m@N1MCvU6UFG%={0sg!s-svLs|H^-)<48tgRYYvhgZEIP!bM**%EFD#H z?qy}!181ikUt}4UpT#PF)wvGaJRQuTN7rVUu@G_*udrn@?4f>P~CO_x2vi@R~A_)w*dO7#V+ zDcy25xLcIN@OJnZ993q?Cvh;@D&-`W@VA10R$3yfIoe%!b~Ce6=NmZo zGh4^j#kmn;!bnCi8t8i~C$|=z@!ImPIrze^14B}CY|wP)S#2cU)N10C;G&n?MAz+i z5JkJis{Ii!d0kK(Rpnb?g;A=HJWC9~J=sX9jGE_eZU2HjPA;ht_8BUn%>SG)|7UaV zCj|Ry!q$0xFyJlctnB+=28`!T>?vg(iy6Y z92`NGID-mCGVo(8Y|FDdZ*On8q$w^FC5~E9Ik7Ju0}|jX z{PyO(hjVuOMzbxEv>LhQso!KaNjkbw9L*8iX|aXmIuW+T?*boy!nNeQ-UGX= z5|I@?eN9|+vK`hclb1HfAQ7XUYh*}f)?Rg9fN06NnPa(bmv`T!Z8J2BB^DWusZpye z@_}AWB};O#VWB!!Y|?SQfq}nG z^VMza6Emgy$YF@$+q4qduxTWSP)0A$cHs$LwGy(72I92DZB^FB z2wm?&1A>DK9a#@rrumGXCT{*-Ub4GyTwJ&`sv6)stZcc5i&79FAx`sXEP85xUWKw7 z6Ddj>4GfkHKe*qLi1Mp4c zl2el7f1Nbo_8=cwTGGC37fh*`{jN3K@M`{Kf`mC$KqzYnQSoLbdF1}*TnT(8CazJQ z9wT=+UlY{)emSF0h*X94(l_-GyN!K^|CAoSvG^;Uw^@JsV${S%#l+PqdvFxee4bzq z)hSzuCrvMruE2#StE+Q5)rOA8aUm(67}`#9)7HW~>OmOYTm^Zgq}XT0vJRGL$uVxf z{e-E|x25jdx(FVS->h|drhemZ&aKu#SYxUyXmvv131}7L@gd}#u;vOB6KVb%-~^r9 zHS(D4u&&PKO%YXadWE;jd;7lZn@~;E2N_b&wfs(L9l*6V$A{Hlt0vVJ)~%-4{pWIt zJmuErbNyU|U?_iiE;gS>1$|P^J*RonMl*?9^T;h@jiIA?c%|f&CpQ0gI7U^6RcQV( zX|ayamz_L{J!?S)muBqZ$GzvaL7t=asbawX$Sis?pdd<)?6sZSG- zpV#&U%k!94T0`)7z_Z0IDok-&+$TM@iID*i5Ltw#;6=j*3r6(^B7@g9uuE%!@3+)`R)W5v?fio}{j-_F?C35RN;3PjLH>Q|TMnB#w{ zM|_qD?38*2YW0{es$N0Zps^pTp=EWX-YG1wz_L(cKCD^r_cA2E2`QoIZi^gTuGaHb zUCR`_qPmn9rSQBW;O7MA<2dhE;gLGDJxLr|)3Szf27;yo$Gv=+YN69E#k?O>vH0O| zi(Z~}<}jOfS_JKnr1T5>=z#wWWt$qWktw0UZ*(}I5%R<4Np6R+Jf>vN+93ETjT0$% zp=(}?4BR|eI`m$?LifcL~LC( zw4>Gcv`AJqSlxO^?I`xFig&tN0*oP{3Gflvd!%$g?7h4|y>LW3nPY#rEaVD{ioEcc zMV8YnjGz^~^Bo{z1s*>`_yd@gDE5|8AgQK;D%i=H1t>fp(RlT1S(bEaJXcS?8f@a? z7TC-@A5H}-{HpzLug9^OK5=bd;i%%+M;fUiUvL?ndt;Q;NDVDx=Y5p4fO2$l7fSNU zgrHcOYbJP%9{Fd%MFacmL)15e_GU8E3nQjaVNM+n(G^rNy;=z%mtBJ|B0TrH9}$Lvxh`jf12| zrZCl8pzU?|`QXbS6B{U@&A3J<%mJiyQBhI$W2<7i-&s??tzXTDNOA&g7lZsi?lZMp zB_luBtYw=RLFS?(_)&8PG0EXzq+ch~{*o2aa2yh~wP|u71{!q4I_FC`J2RV%aANto zmU|Cc^vf_Wvm4KiKQGFC$~R->E=*?_MriSO`}5_+4#q!j=&=n` z7JxWDirKq8@O+cablIXIfgz*yn;=pf_4&%V!Vfsl>hsEk<1!p(CE64g;OkjvfS^1L zke?C9G1mo+muSTim{GN8oYY^M!(GQRhJ=K0o#BmZ7%@xHQcj6Y45nWDF@KU17bO9% z)=gNKD3(g4wFbP_tqaR#&jTP_G8)H}WWHg(=R8ju8JcL>>KgY2iTHj|)P`nXZb70f zZaU*Y4-QLJl1-=o!5V$=TqhEreEki8fFRwB)6@(CA3Z8c6UrsO&!=*tkof!TD=Uzv z%%*Y77aPq`)`_HK%sF{g^boZZ%7L8%ax<(O^G&`wTjMhwZIEQ>Ypf`+xM| ztXp%=1UplAq340<8d$ONv1xnTYjTy`+6VbD>3P22GK`b~L{C{u1e&vapF=x5l5Et*PF(gMAN>Zay5|m}u%vkB%ZD6}9WS3;h|%-TYX>c%{~WvskXZJ^B;;W_feO zB%NxNJ)MBP3#Hbf`Bs5ZrGRx9Z;Mr5#i&%5Gp=rJxHz@IKf48&3Bzy(RRWvj+T_RD zx`ik4W!xf!V2UQCui7v14;}Z1QZXx-x!&_GrZJfv6c9uO4EgScj&srUAE`x_GRDsT zVG>HC8pSH^UA3*Y|5Um3*_Hdno@reKi@iM7_OhK(32F{go+ZBKPdGHJVN67aq2gEC zA4|IB_n&OkvAx3Un>ba+Qr@d&W67=;7l%15Ifv}7@l9nDT;azqk7PGu15UmF^>v;V z7IGd{vXk)ipMcBmHw)tCH%rbn$}UjO_zYiLg6`%=Q%xjToa{6?o^jOV1lB4>tKw5g zgttq8l6Q9z*zX!>8rODoIfOoHW;0em8hB~Xoj)9^=b;|e%CMf2G~b@`t5!r8w$qyS zNdN`VXo|?y<~X`RIsGvRxRrlD2H+RC`gevglC1T?^0M(6QA|E<&-h1dSxjJBR{YZ`)b zzS?Esn4d;jvW(K$**_*_ZQP!N#T52cqP%EC?T<0|-II&tG2xnIjED4h@} zs!_Hc&Ks{?f+^wzZ&fMN^e3>H-v=>qFbhg&v>|@xT}dtJf36SZFVQ>Clx%tMGi0f?bTJyNEeWJx#o+#@{xux^)7z5$HO?M0M&o zOsR7IuD1r&;Kz3k+F}d2N9t`TMen#Gb6s6uw}i#s>@0ZWxB71qt0*BW9bzMgvkyC&5o()v$tcbB&2o zis@*_(erZ;MwnfJhJbF99W^brYY8D=5W3Wmm__d-&<1D%4X4TGgxnXViLe!n-;-HK zad=B;-PHSfvC*dVeswNkh7Wl$-iqZrnqvs=366DNfS(F@c_iI_{Uy4#<3d z5Zm;XGE{C|uDc5N6GOgu?FQbVwEx>t0E?35{0g0F{{Xr3C(+#%n@GUckfu9jf}2I`+Rt9@RBsWB zKeoNM7DgRr*$|sCT5N33Lv?Q(8JB%jI3#(zL|>zlvb1^Xzj4LF=A4I%lo>hd{K2Bz zKvR_b<5ub54ylc+bv%>^qNMrTTZDIxx60w;WO}DjvXem}Lw=_t-mzBREA3%*wFeV9GyF=Zw-M!sBoJfy491Cg z`(GsV9|W?Ra54JkHpP&6H561lGK+z|weHs?(UaV@Ou0ZKq3UnInGR9s)6F<0 zJ|~EAh(E74jFx{msLhs0$c{I`=U!OS)uYj)1NaJ?>sH&3_9`{)?aMuU!%o=`q@0i?#v`BYDgR&+;j9D^3y7 za`eR7L>^T=6r)yqqOC@#sZ|yh{5+qn&B!h0q6favz>nwOL-&OtE``UQetx+kLL3L5 z%jLb$!X^JJneVPx*ODhkKntsOq$XEbv*(|^>wefyQu=Un2Fgzb)@>Kprxo1b+b~-r z#vuXL*cBQsB&wheD*uHc9v|imba!L~Cu5WdfX$`h{WE+PJ!jnN-r+$T+%(n{>?7I? zmc`+j*4V7y#EG)fq{>sor;(FYxB^5{x^f1zds`D$Mh^^{?M~^Y`YwsZ{>H(wVdO9q z-m;%lXl$gMbQOLcY%nKDnv||;Gl5EtgD_V&q~TEc%(MHiLwtyN@^WGUa_2&{=K?b z3IAWDanEu7&&AA2a_BQprM!{ZV4^4`>%KQ}_WU2mej|-))Ty8j8H-|R ziCkVGvxWVBvC&s4Nm={44anKmz6%ZMr1)X6Ay zW`Yd(pkG-J3dn=3|=frPg`?L0iQM0j4p$e z682l?${kW*&4I-nF9&m3Y2};EY}7pH00xllutok2M}yEQ?g_3C7YdSGh4tQk8b&82NN$$DHO4E6(_EgaSGKU;nBJaGE*q* z2DFnWEw#iA-{|}c{dF*8OKDdwo2(1B}4YE9!D>;xg;4k9}W+#;5#vt&^@H+ z>(sS8S0)I|E0=ujJ^RCp#! zSz|x1Hx*{9e=Q=Cvs2zbE4I(AWGCdW&z{$c5|&WeIJQq0%FO5|SB=*Dh5cF1lkTpJ z-?2H-1cjT}!Sf9PT%oOA7#AU8X65<1%nDUf{O~hhPu<7~mX(e8#Gy zvj6Uwo`nP9<;FI=Y_CU@Q?5JEfpaau&zy*Ah~I)=5<9AU!Xbyp`69Pjj@@JmO+SeT zTo||?XgQgu6>8*crN=_ZZ>tfkSs{k_aat(ol{=xvmLw&0N}=$w$aOjDvD{y;6z3B z%{t8=zHU|+4u0#NJ?(&mtV`36OIEu`tT&h55JY06$qZN4#Tv7CVmSks5XE(}ESqO) zBY|H=t)VA;%RHsSxft9kfc#R1UhXhVDN9Lyn?XOC+gX-56{f_dLA({{JEl|JQvuuyv7^ zZHrz~nWe8pYtJxQyIfj4yPuOF2`;k)Y;+z&5i4j7$ytvYAKH#Z!+n6!W|OEVtq~am z_uVf*>rS>mpXY>p!1<0~O6zE7Cj=!N;d8*ifax!MW?K@<X z(iONR1Q*9{?jVsCRXFQ&-wT#V%iL(iO!Z&mDA&rt7c%N{`c2rgpD+9yKhx^g7tu|_ zw_$X#ry7%oFd>uYg@@4{3f}=_?SjlN7u+c@I5b4SM|mI&tfJG>n5 z-($RltdwvEp4IS3L2@Uo!ky_ zxgrEgHVIsN71WVH5@mFP#Im&7%}XvMZh*Ae`$Icg^KYV>EQ%F;UO7$N+>?Cp!n}X$)XgaKJuCdK$%T=wWP_VkBKITB@Gp= zdVmpib-q+U>mi~#G8Z0^fTM;)V1|J<`a?O!M|hTQ0N(PCSSd_3DL&g=XR?}T8XI!u zWiqWNjMHUF-l(2{CEP^ENBl_Yk030Sc+)4P;lo|oK=lK3!*ba^Do0$JkF~h5%c^~| zdq!*S@O?GYc2-uv&J>>mv{~*er|)#O>>VM|kNNc6m)PdZdo!aMUXN(tB zTM7H|qN5D^*1qpyM3#;`YP`n&<%E1b2cDRKVViM8=I_%}_uPLUXvjKX;ky9_9p3qQ4^&$;iMS!$WLKw{bfgO@gDrcerPvLt*Q!*DY2y)gr`51kkPTO zZ1<_RCab*zR}OwU%a*&sTzs^CGwQ|jSi>~@vIl8;j60DUA}Fwdo~=_4J66BFyK9Nj z!CVkk%8DeHgG3u>gMEmBg-gFmS7r4-ENRxnZiQW$aq7sNHWedjlwX|$?Q~s54&|b9 zwfQ%|;*IGE1Z8Y;1sND&^tcV-olg@d9kHs-r?1%b54u-N@LE7TIc$yMv;k1@W0^N@$6TTrEci9n_{o0u!?GQ#t44iQ{#lqCuW;*z?bK*Sa#!O_=YS)A{I)k-9}i zp(xeWQ?+O*kWRjYL@gVeu{LH-MWtL|(qi#4n7FLUN6M|kxigmk{WqYyy3^rBV_={t zulwjh%rUejRAn~T>A|SyM1J~W{OaEfq@9u@Fsx?%l@-cG!HBI9s19-5AUa>0BpH>b zxVT3V3dk;$3064kQ$)D_Ot(5qOOO)$ui`YX1>LeJ>A2Dnn$i=;?0pPQE#EBdd|g*A z0LMF-2kvJ$m($gr#|DH!6OfRM-3-h&3KHmr?oPyT2P^YYg9+G%)75r#*r#0FF4(@T z$nW0Gj1kQ|i}>hB%&FAH4A@^e^?)+jeG~AybV&YMt&wxMyhl$YbRE*>TpS^&w&cBjg_U)#xDq*_~xo>S}Axh@v1gew6L&)Ihh=BK3!Xh>dCF5h?}L# zX{)52@iC^QsQg1i%qZ=0Nxc}nvaWQzonb7R2m0Lz0U-dDbLj`hhJ(YiHqGac3+=q-8Cra$EE8UZn#wU#kc!Q* z%Gz}%Rlxu$`VrR3TYWDTONDSkx>H4hgPd5}oxMG6C6j&sr3l++1JukVF`mup;%~Qo z1EVUeGdrg@YjYMe1uFvGzb5 zR_{731!p;<63G1Dr?cuWN9lv6SGJzo<I35fS zY9MjASsHq3fMWq68$eGwcxz_YB{!NiTLr{;F6;9TyBO-rSNXJZoE_@hWyUu~7!rJ;!AH2F8!W zU}%SYU>f80<}twnQn{?VQm7PuqM}ZWmT-H!q1?cZ6nbVZSPUAhTRcY0#W(Aro}tX* z%rn6~dqH{M!1>C5qKHR_wICW7@ARzu{HL_2k#lVYD)PZdaO9B&9mIdo0O-`pQ1Wo=}4+zY~7&^Ayt;WQT7_pXS7-3WF%;Z^NER!PN5 ziB2z~H!y_FrSA26ra{Islc<<%5rH_^l2zn@1L z&`L4!I47w8qxHp+%QrF9vrG{-YPC43sCcr9vrKbV9l!8W!E-@}BVB4wwu^8|^zzSA zlyqwz`mK*)#7c{>BE?8n?L5w1i=isg5LyW-pcG2j79O`=kUY!u-~W%_9@j7b@i{C3 zWI*NjeG|{ZVX`fnmfns8d7S3}Pl?+{sxpFSXb6LbBVn+ZS-XO6WHv-h=>%qTJTpOZ z5isLp2Y43fl9lS1B+HbKP~t>yqLkB=bheZdb8xzcfi`IThBD_>BoT9tQ!~xSE<|HZ z%hI;|%@tN6zlaX2wzt63k)yIb_w|X)p|q`PI*gT0cz|5eqUrVVQKSq*kLILy@J~E> z8TeLw^%qksJ&|gB1l$YC@M_Tyc~0KEY(qLsOieZ2U99AFa|vJ0Pt--l3DRlpqQwr3Rq0h0f`sX zp4f50K{)^%aZbN5>z$g1ieK8V_5Pzn69xH126W#KHIwxItYihvP75hwkg>QoIZM)l z38cxN{xg3LkJ<|VCPd<1)~KU$VDZtvyQg$yShLPMu~$-nV$6`)n{-%#uCwMBNV{!l zxC0Lm`Lo}yBQg&GMab3ULq}wJQj27|>f*Wg$QY%Usnys*Hn0Za3adJ*G~=Rf9DpJGZr= zR26nxoi&=uGGw=~vsd8zLjxB-lTu-C$2Q0iQm_3r=yg@Hn*k(|#;L|UwcRJdxw4ej z_24^a)Ee#EFdzOIX2wB02ymV8^ z)zlMDV67 zJO1lieqT!C!)cooJbD>6HS3`rRav;w|^x)_N{sEkhM!tvWJ?}ErV zs_{3B0xu+<5FfB~+8PZ|2SrNX=G309GD`|E)a8xt<7>@p#6uJYI%G8QR3QUId;PsA+GF?Wf$jU`5Rg|Alo8CpppIoHPKP zlrSG-gE6g6CxT1d%_UMqZ)3`(?GOM%D|*EKMKdwN$#uA4t4komw!D@R=+CkB=NoIu zJ(?OD9otE5Id9L?*xYH-&S!s1_m{H5LXSge6920)st&2k1iCq8OiD4?O@mPGV1Cv0v4Sx*CybB;n;F>B zO_for7KQv|+jUzM2l87-&eFt z3ni!3t5Q!75lht3iU&nIs(Mq;6*PvOhcQ!v%k7^=|8h8(!{!w`ye*eKsYdv&?HbDd zS8Ful6tQ~Jl@Kgm7dHG4cqv)cuC?y85x$oZjESKoX^V%!15GbSOe)=H5HG`!|KxLy zn?7chGOm2{odfERQRZAOj&d^L0V8W!&JQc}QJ*H0hh`Y}?K*JBhXq@n-qVI~je)gI zJhfV~1;?o|ZxU<%mkcLNoqr!p&LL6X3Um%N1*thh0ZniUj(cky9?)QrV@LI~y-j5< z{V{@wDF_ymTpfwfRw+e4S17e;Tv2^)$gCA4LLCjuZ{wQ#9Cj35k;8MypS~;b_+(v z)Z!Ua0Gs=?FuvF3v>bAbQh)8H!sC!KV?Z(#auKvZ@kC9K10LkAD0_ z?eFie^x+@~K+D(Ua=>BLA)mFlE02o57^R1P<**$T9%7)`(w*eKpfxugoDJIH(~gU@ zi%%8^(#NkLrETWS#+}5P{Ms5ELV58)yT1}{1-z`H`7=^Wz#4SlhDmAhcWD*TgVidl z`=GVCc3MM}*qT_H!qIV7N#E11v)4$kby=0F<9t+z;4YQeuU7_qNjrD>kk(dKuV|7$1*TX!*>;=P{x5gEo!uiHL5d`x~e%x;_-Q({@Bgl+F4&4>}-O!sV=a z*^VAAvaI0kjSDq1Rj20YLJ|^de-`4jAj=n4r6Iw=A1sw=umY>|VlOD@ru4 zGeI~sr4cx>jqwJU?T#RqWc{E30>m-uwVJg7mtE2K0bH@`y@CN=O$ z5~;s}aU(0WBEwt32l9qigVal)_77r?AQ2@1gxtCy+$ryk@y3I@R{WiNUtXnf#25jL zJWkb=5o1!%6*|%;itJk^xg~lEfv23czo&EE;RYjBO9XBUeYU1@LHsW8~Vf-(kqRy+}ib_JauQcYTU#4(erjebDOi*@w;zDA@5R|t@ zZ(-l3R&I7Fesuxb!6|Fb51#!~#1&$h8I(~jPJ&WWOn4J1DPlL5^Gs8l_A^?g2%H)J zLA(CSNknNBPSp4QXEV$Cao4P$A3n7i4B&MKNda!FtYfm zY4?X)Td9EkjH#&iN_BL9_`nfcSyQt11RcpFqt-465rM`eYs=1t+;3{RXn!9S9~Sch z+yx}7-N7wotysYjjNTyZ#KQKUH!!ilb)X;QIGWMx!sj#3C}mu-O#16`g~lhP-8WEg6V3yUY0by*41{@) z^|y|;)0bwg&F|ZbKH1l}PvdQliS?gr z!wfG4-I#o^Oqx@s8U1fDYlrr|G+9i?3<{PMn9QWT|AFXueQ&f1h+DjRg zTK){$`~TJx*5HAV>k(qBwp|VA!&*20`t{2YzzlXB6B(yr!g#VL5%flM)Y(FY%)K>! z-z96j+tAT8I1cp$#Ozm0ZZl0$s_fbAfE=ZJU1^vDklB^FJnP7sN@)k5u=c(Nh5uPv z|55x@3_tC-bCLOgJ%HYRo}k&Ww3^(F#xk!I4Y2XZOwT~6kP!>ro9XVxMzc=2_5{gU zy?RsXLo)b_-vd0XvJ4cR2+cI39v>f<7gj!?sE(avrjwFPX9Fr(pu6L6^E2?qwjG$r zCXN{EuKnRfEowFDdc!V(Z09TwH7_*A|3EXPyZepDKq|Y@;nBr8g(g0)v948qYO%I^ zY^pLx#3MCqj^GV>0CP(p>YBu!}MivI;kq!Yywp>uB%;oXlQn2Ja(6BBFzp`Wy@@R8N$WeNkH%i>yg!4 zIWEcng;Wf4S)f!=t^PPCE@-J?f_5&Kg8$Z$8JU+G=!sBG#rBLXkz&3EioVY)J*tl*CHPdnV{J#77IDYB@Nc zGTPQ`I~O~N1knZwem!38>5H7*f1(~T7px4l*AmHW7rj`@$dnv*PH8!o%rlK0i{h8% zaZ%{FV6JY5=8*v?=rQ2{yX5MO!rDZsWIADX^=7zPZo=KI5eRZ0#BARkc^s1WDZ6Tu z&Iu)7W)4{L+mDyL(KeMzINz&L?xaVf9_gT}S$63OJE9MP`?y&>;VZ8_t9sK8#C2Y) z$45i2wnV0V#Xgfwbq(pMWJ*NYKSwa{IKzZh4&l3h<913K}mU?+< zaRuotLeRz-0I1UUs1x1HlrlbdB6pXxDyo^3~kX*7`fh2*AM>RF0XsJVhhBS~U zDYQ@8@I@jnE#A-+k>?XB7q+1h%z4csObx-3lhDIHKRC?c)Wn0D0CAD&g*)rE)}5U+ z>R_fI&I3mxk}F_I3EuhKsU=B#SJTXh`*Eb;QAH)wyLjk_sKrrKa{)Jn}F_2Fb!Lj?~_B;6BZPEMRwXoCE5L5MEsz>xs z-gcI_O2a2dx%NRE81qV7*N+qYKb&w2LgeUov&~@?e5#RCQinMWspqgDd`R@D<{1^E8UE=-k{hC?GKffJ)vhX44`-Tfjo&hDFQdNrU?LYT(`5W~p!V5#d$72x0xL_!pF4lFUMq z6Qb)@IYjLF;fIsL*NxlEuL*)Tmp$tN$0gYRWTquBW5psvk^H>w8T=14J(_Pjt|dnN z5^rB%7_zC}3_Ab5UJU@tz{Pbei(9vU3T6End;hYmDQLED9nG^?_UoIG&O^5_}T=859 zzTOSIeHug0C9UwuAuLe$7QaO->;8O&N~B3iG^gdU=J3ZfY!4pm+NLVswyn!m&1lVd z65Lw@E!sU2`bhR~N5!Bx$lo}1p!W+!9mR%UOBvdO~87ErtG)djWzq|4vN-Fd1 z@aoVS=AUd~sN5ef8d%kH(OG6}8R^x15oxAYwD-JAJVMG8t9^hm?R+GIw{RFpB*HT7)6^t96lt}$rQM)+^P6{_ z2|YVg+9nJlA22v>bmk|~jVm4ZUp$AH8^ufx7M9rpgzej~G3(mem)F;UKkw#jo~Z6t zV&guEhGzRGc4j{s#6N1qGiB|rLCwdCUx3PEDe~M_=0LsCQ=E1^1U}g-E97c4b>NZc z>#x^I(}D^U6Ptn~pMgDXw@?DrW?tceNBlfKMq6bVcx(g`gSYLnA{5&e+f3;s>2%^3R!zg`>yPtw!v_g{x6 z@gim?;FznirxTWFfj_7lg(8iwy}9>0TRlj>g2YjkZ9~Fd7jM1kkTB|{0XzG5sMjHD zks2_OJj4r9Un?viDZmQ+LQVrtL)f69rkV4&{HL}9H~sh5TGKx}BoD|^=LPS?qw1gM zuhD&>-tVth+qkHvCmg6EVqfDgrngDy1`DGVNS?0V|6RS`hWs0Ne+_xR`d%av{v7ni zutrnWe|X#!^a}v>MnOfF@*BhTfysDe@S}_U3y@#_%%e@VfdSoh8J{nw(mo6o=Q2(uK^yb)`cTbgQnM zMc1B~C;a*aV5_{f-!3-RD8)ihj~4#DHJFRBjTi@2J-XK0c}o;>Ed|%#wz}{1ugms@ zyzhG!4gE*d6*fO8lK`sydgwHwSzdT57}C|Yt^HcKuvNqBPWW3<`*an2RK#KSRR+KN zO>&$>%zvVgKh`LM*Y#(TaK+<8@6P4Y?Ck9Qz1Qi~j_aeDe0@WD;x(h2X#~T6PVDPX z6ky#F5_#n7j`ptB{=UD5mzS6~j*_fc6U^U?FyEGnbY4y8PWyr$Q9y5d@D687woe{p z|M~~EIT1|FuIBUqjK2R#zXHdTlRp%R@5s>JKP_!=M4!HLUouX9#Sr)5@<)ZDN>r-+ zhV$&h{6F^IGODd^Ya1@KKyiw@mQsql1T9c#p+E~1cY;H3*HWZVyjXF!Vii1r;_jY8 zaEIUl0^!SjKhOBidEW7y_s2P7yuX?;vUgzYy|S-8*IL(Jnb(|ikLrz#8S}2uequ|O zgy-g9%MC%=cUgy#Z*C^^K}uG!;%(yYPMdoNZ(abyD|gP{hp`Nt2NNl-^ZvF4#JWtr zw9j?krKm|Vg%68XyU}N zPw^Xdi74L3N-meQx|D}1$tH(RnA zcYDFNvVZmBwjRo)?ByJLX=6A5WiRts{8^3@{aVhc#^UA*O}3wq+uJ7)D{-aOk>-h? zPq$@$*Fe5cE)T`E=t<7{XtRe}U%fAzj1^G=ksSn$Sp?tRc6Ns~%2@}_O0KQ=&tNdii`|<3YS0ip;aQ|l8 z@!4YQ+!xB=NVgL~q$T#%UdXM#-4~Ph(A(qtxi9 zYkCBGpmk6UliFd#fQ5qwOHx1>-y`S9~h_a+qpWhHir4E#q5S`=Ufr$=eTWL zH$5Ldfo`y%SL2AMHle*+Wetzn`1XRB56nEhJUyq=Y8qtC^KGsS!2$1~-|BWU%4i69 zGN{H7vVqNs6dx)f`|!-kNX2&z@T*OCYzl*?ra47K%`*9K*Kt?8UoTO2TuEMygYJ=> z4y`wDg9p8fYZxtGK_QLqmTEdBKa-Oko??!-;IQE;9%g2a>Qy37p@Ga#Y~$UFTU_`v z*HQ}^#>Z$0){oZ_ojGe&TVMKcAOQ(K(N;m2weOt8oZX(ThiV@bWZm}AB~J6e4uqj? z0KSVr1bAUq(=zFxug@8Q`<6X=s(AZC`exlb%Ed^{*u-R^zeC&hsV;+Er!ni3aZb{M zbrgzEBY*xbK!R@*{TfU|K7t{!~Keoy&mSK#lA zO_v~s(fyW**;c?TK*rY2QOR~lUTnR+FsluaO#76?6u0%~kEmC&O~=b-6FWvL2HT@) zK;NIo(hs=2hm_IzRb`7QCRTZqMv#mjs%+g{1|yY z7=MEBZaS>nP%8oX_xCf$G#*cvj?T_mEClC0zy{AAmo2+@ykvL>{NZGoG-V3%?Ce z+ilS2)4+4jx8BrF)ivIxkN}Blx%(igtMS79SGL*;vH~A})ErN1w~tnyl9-xw_<9JI zMYqT@_EsMnKN_H)WR^AJTv216QilTty3-T-8t`v;-c`@*!SSZDYr?ynmTGJFQQ5c28Ld9X zFiD#$MI9qO+E4XIzU&>O)2PzZE3fP93^$WDT$x~7&Z}?xJRfW^?e?A!JCRy$ZjI(j z0HF4vGD6F8GmqIJ4p~@qK{46#$~)$6kHTUP>d7Kz5jVp-r=2OQjT79Glje6*3GMzZ z98RGH+fFLh75l9!_b)-8=_4xd~kYd|K+wn*?-f7`A@rX<^tq)hrLbbI}a zcqi$m5lqy+v9}t^*DSryhr}cHb^?7sg`P92d2{|C*VIqn=`lxf+saN`obVV;pTw17 z!96!SGB%cMyaf0B&8)%~8s=cxHFQ_Ftq8*MJQ*^C%hiV%!~yN6rFt@lyc>aKv-N<0 z01pGhrdMztt<+bgTC@UK;w49;Mj!$zT`?_Jd|?|=%LabrRhqja zn02OGk2T>OZ7rWb{_qpgwsAsc?WXFptQ+^f9{s#V%T1+kn%CA9eEg&>_%3Md&5gz4st+gI zLt|s(Ce|O`s4MJO_ue)iEGcOyc(hLn#ykFioOn=;By4@)8bmRww2yhaB2SWCw}+ry zS^kK059Yx@RKOnb$Ydb?E;?s`U*rSZ7jfN5G!~~Uild+liUWh)MAP{}X)H8oaa9>-u%-xd$))Wm zB^Xg7-RM`Umn~doWU%udyi$AjZPVI4eAtl01iD)-t+F_=CU{>RGkrC0vuXG&KZm;7!jVDG{0$pIdptH6 zgmZHqbW_wOtd)8!A^Sy=zPAkSWTZ#vRjRp}BJRFdi$c+ux@2Vi(4pxLW7N)`u-i$` zH7hJzV`;8o%swtIGG{o=rO*v>dyfA$rrv4D=uL`+>9RMWm&|0)NPjOL4A?zY!I9a z(VV3oFN>ye+*^h>6_7#9SwN6?{~bj4>|McklKtQTk(Ee*!G6LFaQ39%GV)5do?hWl-BR^JScTT^?zmUy=(?fw_5!LLrB|(~v}7UsaCfUzh88pjJ^NAJ)_hHd z*|sjtJOxCesQnuJDP0Bbs!D`99~6Y^r1 zT`AW}U#5{1=vfQDm44clbK_HXZ5nssnK?;?)f^#2XuYHn)WDwguv6PKhVbXQ`bp7% zW{!o4n^bijM?{Kj7~P$>n6<*jOuqp8Y^j|W1T5w|LhkH0*wrjun=<38-uSsy!{xvo z9I|Bpl)&HN?m)2lySYeUmJH_WDYcL_yLSuw0rTj*SN9U@u#UU}(Uy9ewFKEzp?kG# zdriGdLC%<#@H<2XT+`(RmgA?;lUvgzlW!^o_K@CuxwuSjR4e`{pI+5mFd8LWh-svK~7RdSe zsg6RJt0pW}dxZ2IZ$RFuD|-lW?;>?`Nv)t0Jdfy693w%wyGV41yK$s^V=}6&Kq2{s zECY3D*Zgi4eE0Daqw{>&j@BtUvjY0TEi#*Y%RdmyIW2MiBycO>6b5A`A{0IH&l0J37K;k(BnXm0^i@+kqnv_Ih#L zb$HH@?f7Fb*sTHSq1Ps!jr2>lw~;a`^18ZohCMLZZD{Z=;jvyvpi-JSKfgV)x^Skw zK-PGBo2oDVdX9zM7`#Qm@0P0}XRWuWUZ!AlIO2SwaLm-sb4>G{-Q7_%GrxxBoAtMf zvq_QM+66!zfM`dYX`8KL<@dU`9m2(K(EQ`YH z-X-oo`YL_!{y^qgb!HnRhVoNS`F6IXWWT|O=gjr*hm`xhVd>VFegx?Fty%s}BGZ$l z2`2LjD(5;ctR~eEE?9mur^ZPZh3m;&8_KWN1GSPC@qMSYU0qI%Z@Xk(!r6OZ07lfJ zf!`3kS6stG1`KB$FIB2LrSRFA7odXkb5aYG2b3l?$wnr>zgscjv?!l`P4J>gmRK>1 zg>>MdBpc-{vtB*uHJERxu?F(H&7IWSsS<3osmmo%(SN8Z^pYCH1J7^%whNC+_2dBslSl^6opY(aPh-M?aHJ50Y12jS z#O^VcWUWFF@@%IkS2=U3neLs|qYW|`X+SU`Rk;{GeKN~-0gpLaq?^{QeF*KH`YkzH zdX%=lCyP$}Y1U;7s%AS&SSi52>$jF;+lh)1hIeh-cd72YKEQS_c8$rd#{g1f?2q8o zlwb>9vce8FyF;zSwe|v3)$+T8u@`NVk9yLdy9d}p_V8?Tj{;2D<}Yh-({6f#W8DFQ z6_iB0W)0~9=ovSxqUXwAtwK_40Tu}V8B9##cW#G)edu@ffQQ}>pZ_M{RCx<{Tm!fo z6FSx$4E5KLgU&ezyZdhD7;&l+FT6&t<>S1xGADa>YzednSe&Xm4NViJH_(0Vsx)jn z$dh(fYz(tARueU4ShOPR`KqwN$1*71Q6+TCBgmChUo%VwR4lI^YZ&mcj*mJwN$Auw z=sc>19&=+;^PAcg3u) zfqeUosklWI$=EPe*u=%*VhcL93$V2eLt>cQBdlJ=exkU>AjI=pN{6-pFq7XfL15KbaBY5B&#n4Yz zbNUZwm8_(%8G}d(&$r3pUmMfn;l{b~^cL^BKD&#dYqBTZ>>NPSBy++f!VRaFeI7?= zZ)mck&@6SRoYicJ+~!%D9W)Ab>KySuOZO_NK&Hks1uIv4>fBQZ?}tAfMbBeW?^)9K zT}&d3nQX|GPS#&o|=**hS0AU^3g{ zrIDrLWNRW>^@Psg240k1L;+c6NRMlUowD zO6%G9scaL{>qX?82UbzLzp27|!=$P}_@1%04Flq>7^H=Nr~njw+aE*RA4yzYtBR4E z==|-r=P{&*q|bj=l3mXz+s%d4-g5?X3<7DeX_8GO^)Y1u8G*cIo@M1MO}Id&vXdau zUNY-L*AC0Zi}dJ6Mtr+1Gi7r?#|K>DMQ6)eNbl?=7jJ)WMh=za3)>N#7nz;&`hb_M z>}fehWE?#{LaThjAivd<)j$=^iHpU{ix|7IO-ayRQJfK2+(;7wZ3%}PU|)Z6K;V07 z5wN*@YMbqr{Wh;O3+{;$V~=0RS~~RqdK!v>th;A9vIBt9ACwt8*DK`isONB%3V=%* zlofYMF!_=uUOdY4_1TxuSaQa{vrc(wDCsO2T#FtfpGLlhpRW4H-Oe@`25d^JcMq0d z&2OIBNmI~PSwVdu$ZFTr_MVK0SiqFR*2SuR zcJ1u? z8^rBmaa#@glGF7xyKbY?sZ-0N<}$j^9o};uxON2=BLou;>9#_ot{=+EX4RrRt_#&O zL>Qe3Y=n^r8__4G<}CbK+3lTyHT4_d;T@hDjrR5t&t6v*59?>Y+c6J*DT{eOYA#P! z^VOyt@%S<-018IBRb+lMRN`RIE}buKmH>|rS#BZHd1od^q*EN)Sl@~P*VGI_WU;+z zN$N^->|}lFj!9CqmM}grm3L4u63an%5CNO5+Q+$OWLz%#*|HvaDB?;ukpXKkYBX5G zMO{fh(F&ylj1oTfdFHUEIz*GhC3oCEJLyeRv7c(mLBz^ZyxFhDx%#_Yb z#)94lW{3^Gguci;5|S2+Fnlh43u5vB!-9}e>}{Uv@A4kQP>NuTR9WRt9@81ooX=;e zI@<>`WTM-GrOo9o;I_Wx$i*Olk7__>U5uoWbN-pn3B^^`lCXFT@6BMIee}!V^}=TF z{3P|*`<+)m2T#wv)8x}`M{@$krGJZ{x~TfBzq`hD3T#ZibXi{Nnz$fI{&jRt7Hq5K zO)CaLF2y}uu_v(kI&7(k-|`_6$aA8?T=_eIVnMaxqPdmo;_7r`=l)w|5O0b`uS8YDTt<3u_lD!ObO$kprON4f;{S8aG6e0x5NL?ShEoxeWi zvMC)smYE!4Ysjoikfn_jhsuFcElFWbbH0Vh_h``;n#M*`IMOk^zD}0-Y3-@r<-J?y z3V=ZYG_F%VTi*R__QMqEBUc6K`$*Imqld`>Lk&=+b@1`&mLX%!&YP78E@0e+*%s@~ zkzCIK9h*Bir zAPt`LG{J9jlzV#ux(y&sjbSdk;6pA}n|xnB#&4sZCu~XR0`q96v@I@;mL_;dm@WyP z0l_=pn5t$ll>it-sj>?SmwHwDhyM!iTOof2C>J>2R@D_hE<#-=3Mn^F2jiomRgY_2Sf_ED~1JiwQ0W!bG=cl;tH|A&**66{g zHavtwrB^n4F$=MPUNh(#JT#0j2YXI6eLeNJ3V$(U$85UfU#DH_D&E*EsL;@@opt** z^YR7tW)-1c8vsVF5_0;jJ$|Gi*C-+b>xAD)HKNAZFPR~uCXIL#fEy3W0?@+@{0v8W z+*^zVAvco24X*1WaA5@I_2x=~Jd!-5!57*5HyC3VmOslMTF9 zoF02q>XcT6;9=ZQ=!Fahb~{0dS+5W|i|+z>9~u zS^?hRpxU?>xYX{ypgh`-3m7i+55cIzH@gcT;gCMq+)|DmE!VZDR%pZls!j-^L`NGA zqu72u5{yksUoGEq)~b(hT`D#o%9Y)g`H@MJ8J+31QdU*`7|eR4y9Jc#c+DO#i_Z(f zQr=cJkw@)TZFJCqi z960z5t{nJT@3QAjBZ+&-zWVLmDuF&tp>7du-5^~YsnC`8gx#}rsVRL>S!4HVkhi!| z*hP0XUEwR@oxgnP0;`kVc1hRx^N3NiPNE+dC@SBDR%1<2194LiWFq^PIdl(4`q`8b zl9A%-VwUd_B_|jRUymhm{8Vc^0u0Znh)sFc5}vtpRy+`7mPau96(_>|7SHdN<)j^F zwi}Y<-D=PwNdGR%&If-$i)gVGIkDNie@->}9JP*1t&&&{huukJDbKu2ZyA!+_Ms*ihP); zbYPL;rL}&B*o$q2rS>ATGNg$p@~x+qSJ1&{B=4T^v#suxU`a`c&B07l_wBDNH}N;y z>n|pQS89vCO^yvawmJ{A@lE!h7#e4q8p#CG?Xld_z$d{_CT}l`C7=zDkz(~8GB=)m zwEa?7f$Z*j2fvK&bnZ}OGt?qdK=#Qo#Ctw`f5>gw1W5~{%U;b&zAQQSsw++Lnk2cg zS?~2u`_6AFOD#)C=+*eXb#%x0q28LI`1egd0i{Pl9fKTmRrK8!LA-o-?M7=2zkJxm zgNUjWk*R&9#m3A2m;JI~JQ6ql0TP!L6NsBbzHzUIkk(8p4^y6tqll%>5lgjeHhe41 zd{0x?pdbh|@cMX7HWJ)A+u;g4TF3Qj^mMoicyGMixwRpex#LuDIEohHlvoU;jI^JM zWge!_XxV~!dV>QISEva9=aCC;Zd^km@Q|CtRK8n^=Y}3xou0a^W{+SQ0?^8Cil}ZR z%`lsa_I7t|ul2(2OS2Yy9^vMA2;l13Y|2dLxyD2HcTseNH{QzTs>Pzqm zSlTRc4qPlmKqO{%RD8N_ktSt^VuX!kBP1uywib0$vPt*gSY`TO=;;{qM*IP?3r#8x z;4m3=b-dk^lM|mf`@H9Y>3n#PQCOe(O+FL=BDipEej|3%9VO{<;8!cKgMCL)R1@O? zy5d|(%{>_J#dZm1ILW}J00z@gvhq!Vk4CrBLlsDA_~gEiW3ID3S);f67)4|1Z zxQAf&tRi)ci;J%0JsNq;&c0F&v1&i>$L-Taqx*Z(otENl+1O)rpbCWD;xm9OjIpz6 zPJb`ZZ5_CD*2NPg$>%0@ib63qwSVbw&$wMoL&?QqhSLOtTcT;6E;Ey0cTkB>(x0j# zByuR}pwY}s6HFJ&$=fOvJ%(p_e>pCFxYd_KA-hrK=s7sBDQc(?P62{xh|C3NEv-5< zgtlEw7%Cr&%wN%gUkH_6^V-n1HpM;N9YMry3ED{d(?RcGOFu=s6Zgi>+PO1uWWbuXk#9Jug zxcBu@0VAnU0;L3&W?s+JIlL9M+!J1=UP?`FrI($o=^4WLpK6OM>c>hKiwCOP)nAi2 zH9$K%3!Ps9-zZWHXxBv>lH;&+aC&5xaz7(~Yybo@%pKBK7P8L^l+ryjy{0Qzk3IJ- zOo&sq^N9RLp{$WAeBtn-aD7NS-bT`F11%C9@@4kLO}zI|viZv!ejmN5Y8e%4MW>-o z4g^&w^S$^Y{*{bayJPGHBJG$Hk{y_uSgy=1AV+qNrx8e3fnVojIW1_Q(()yP!oc2n zzKQ|LptWbi5-uoR+$}q!IYdR^FQFv)AXXo*(72ED#Gc>Kps_?Zk9_Jod*{LRbzygV zZHsylGxiq_&)H_j3!|*uwk2oNq2_7*9)q=4<@Pj_x4I%y9E%}AQQNCbb) zEXg)J7N;E89g{2?Y%KuD37>6!bmMU7Q`{qHukZ{X^53%#>Rmjq2t;&O*ss5OFm6d9$L zUysbIVBghDbPf3;FHY9iyW(H7OPP8JA7*b{_hV@dj0Mn8d|js6Lo zSy5%V#p<5v9oLTu7WvMfdlo;OknQBPV_ndRT2iWA-0Wg| z^8*o1KH-O2N^&tyn;pJf50j1xzl~T}-q<_pWoYW8qn z2kTE}rF6`dgiCh{L=81Z;7@5p$7KyfYL{;^T^xm8%OxYbT;Yf2%njNvtFi6u=;`+& z?3M00z$ijlNCk+BY?~diyCt-K?ry(f{>e4EH>v9j=(-z;`Z{+E;aw;9#ZTE@gOl;> z=E#CL@> z0qZ9>G{snttv(shJ$+22!HQ21r4g3SB5%nyG;9QRb$lf@)SBt0(4#0N3Y_%=*V}Ae zUKY_2%)2^9-;`Kt^|fC(OG3B*vj5SFf*4j|9S=8hd_ z9uRsTrym_h(E@zqpE-PSx;2XS({63mYzgXCN<*kpXHt)abiWxU=O?UR_?{*IGX&nwC`bc^4<;%-#&+*R>aiA#59zL9USacN9q2nPei^v_AZj7113VO^a_@*@|?1ddQi-z#?yf^rnBv`Kug2FIO z@}lozr#)lHW47;=(^BsrcA4>f@P;oHk1vKhBvWGDo6M@x{vc}q`(Ee#JXa;!}o=DRaeq_Y$taV=~OxyK|G*jh=A85&#c&@y3Bo9{)cbQy9?j+eB+*2%o-hsDC{-gfKuO%Bl$I@9{th)u^!iu?Xt*ttq zH*3hV96$QvAfzPTeIBnz#aGaA|LtL? zO!s-Zl(@L-p@rZEL*jk#a_qCy-4${Sbw|=+bY==NNoNiJcSYax&IJP{V|21~(v2ph+T_LJo5^#X zv6T(+esR|jP&0e*?OO>9djy?pce-xvmHHWtNE{c9@q7MY-tR1!rR1hRW=r+NDDKhN zN7V!fHh*bog@!MqR#wctwY~X1w9RB3rH*B^hAYkW)CuLlS76GwU%bNI4 zrLoINBVYSMW{G1U!SJzhco&1q>JfoBfZtn)Q8Jv zpB0mtjrmOI4cu4Jg-UW+V#TXNbbS>46I^%qxh?3*-HpCdcBE$*hto69Nb9?v`+dXC z_k3!N&y)J9^H*o-EX`(~(N&|oS~^PWl>i4X^Yhy$Wxk1wKY1yQ-#;6FZ~q;;_`c44 zo?vEqA}nsAqTfB5Dy5s?Y1MatjbELbZ#M>x+Z%CyW)9#}7%Ycu=xND>VjTU`2LSL-k<39Lf{jgstvFUFMMyzg{A1LbN9b~0JYpwS$k+K}=e2V6 z6dGBjd#%MQqs?%e148G^QpDv%UAe2GYr5ivpQuV`gcRF3sjpv8n88}NaZRRMw7+!u z)>F~Q%Gd&>qIiLWmo)K2Or|EChu<(2VqGZo@=qTS<^HtV*kv`a-s96t$jWMc%z*>E zODfS#u8d9L*je!Yq%TfY<^=i>Kxm%w!(wQ$qbJqgQbrBKxOxn>hwa1}p6vX5+EhHm zc-E4)p1Yy`dYp{}gN$)6G8P%`9OjcpPw9A1+5{TqaxNKVltW0%dsbt=N)e`aKKQsEhhf=S9!G0VUb2^V#N8E_PX*Hfrq-(tT}+(j_ATTeBs=8MzmvH4@$_s&}wQ4{>E%B(hGN5@oh?QJ%`t8;;^3({=qh*VhHznzbdi>vxB%H2KhGwhDbAEZYw z=>BB0uEAEM3MyOlk|1-q1mIF7xWM*vy4DB#NxqLGJ{=gg7m`<3p0c(-`<=*M@ zS$_`e5q`oqOaJEB?cg0}vTV9M!d&@C0ztZT^utWVCmlDZO@oP2n|w!e>%Dv}F5^LV zv9C~l_%AJf2`beu5tol<36pD~03&MQU^eG) z%p@_WS1NI$UBC-LQ5|Cqof9&K3aMWq7*rYJltc^ip%Uqsv3V>eG?#Q`l8k4f!nPb0 zB9}r8U(K`Nee0a0#s?xfp$?cEL6{~!`XBU#>odmH$#wX{d-HkBQa)pRTZGt7RhDv( zcwS^U6X<=-oWuwdZDa2#$%;630dnR9q$bH;#2pO?1#YT8xW`IZPVejRieACv!oG~| z(1Rp#U&!z2!ro*lbVb{bg{*XRNyOrqj;%^+eF|IsvrJ;`Kv(vCQrzW;n>e}+GS!?Z zB0J3k0qb(Gm=KPBe9Aul!E}_kuA*6=t58d{ksJ|*c}});{v!@v!B*F27`MZ|@A}ad zNY3~)k%-;hXAI^N+M7XbQFn1LcJLX`Cg5( zja^K|Wf3sZi5k%)#L=25^?dtUNB+ap_t$+w^XMuP*)?)zKEgp1%)nG%(8{mDk_6EzGiHqiSbO*CJ?M zOs2MuJi|*CeKv^6hOrB4>{4p}_^^EUzMa_TuEof8WBVBFCh%|39Wv;pFqWiij7ML! zFMg^*mz7{Yt=tos)}s7H$4}ArU%yVx?Q6Ckg_T7#iBL2@s=Z1g^Z1+kERna+@imIBelGZiIONFXZb#`_UmJr?uK2>Syl92*gf~IA2mP?|G>g? zQk|#YS{4&$4v1wen2TOp@tkTi1YRDoL{Q`R6-{rhuCmJ3z0vDpmACppAYDB29)NAT z9@;1Tdj1#RVEFwurSZdRU7h=xiA;uug5yGMd%>Nb?T^SWc=1R#TXYn9TNHQN%govY zc@9+f2*(hY_ef0Ft~6<2-}$qjK53__SCAn4^scg~%HdRtd5@Tg^K-FHI3FY;T@fuG`rRSf_zFp?FnY%9I8A+v;p!(P9ExGmJ2dw*nU~pTBy6NY44AKSdCC0U2Sz*V5j0jJC*>(TZ z7W<={?X$*l9}kbuChy-NPyr$~-ZMkQOg`^wO6sF;Z_(fI+=}O>va*t?AUxQ`<>*wp z^&=565^vY$AR++t11-OTCjKl7em`)Ee76Mb&)l4Vr9#2qAoSC2buTN4^eA>P)KxRHY4GVjqr3W6LmZycs-~V~(WNrh*F#P!VVevO>4426VPTH!UVE!7n4j{NGpTlXWmH zKzNUzpq(F;HyigHVwV)lZ0d!%k`ro%ss z@P`fmu;Cvz{KJNS*zgY<{$ayEZ1{%_|FGd7HvGeef7tL38~$O#KWzAi4gav=A2$5M zhJV=b4;%hr!~aKYh<&fX9pj{Tm+F6Wzf1hX{jMO-EP%&nY5vz%P2unDtG~Cp%mTbZ z0)irVe6Q7*h0%_Ad1encPqg3s`Di_FhWkE3s=D*(j%x`7TFZ6{y2l+4?{&m5^!py=V=o6IPK%Opt z9sFOH^!J}=#ON<_Gk11(F?RzxTcV`}FaN#+e>L%c6BGyvivP2o0H`VNroi%W(H&1+ zP7Z71fqsKThiOsFjS>_&O1@w8WoNsr72(62t64VNv6yIii=`bw;bh6IpEgbrPZpJp z-$PSI4!R8L4xXE3;GHF6*77*p<6%!T^N4F^`Ai*mlDk3b-EFdnxD<&w+FN!{1{vVc;xAd?BIsa`s zowqOX_|O~Xr?ws*F7A?id}s|nuO-mU!_I-%66D0k`IjNJ(0$s{L-Q{SdoT;|^YaU# z#UTIa)k6O<3_&3QUJ(%yA&LKiLqw2QL*gItmJwFWf|5 zXzKuV6<@mQSm}$~3FwM={|lf({|r?0KL#o!#Lp`%CMYQSKY)q|@Cu6viwgeRKpoLz z7-(hZ{9j1Xf-7@pU%vkuVgG7$3I8)NvHu*Hs1UEPu&{{8{{SW~%quJ?D)H}iM=Lvb zOZ0^FHzqr0FFOw)pOuQZ&l@*qXM5{^VJ?w>M)gnHw*MPVNC*o551yC~G#q{0l(>jQ zaP7{AylOSQCm*s|f7FRtFA#Do(_+xMU02tlaS9Jqf1pn@#9d!uz%#6Z>9-s6RW0ck z*&~kkRx{FFymu`UH+SCNr#7mnr9k+>#pEc{9qQK}%XAQ;c-?TQ`nT5h`32M6^|9>T z;KAK0-SMG9)X%=cA*QxL7VjXy(MxsSyZGSdoyfb(hIrVWR_iS^c=bIW&xYZ_&Sqd# zz)7ww3V^zMwZnwji8irn}2wZ&=U` zDmdH#1iNjEhu>X6(*P%5C=Y)&d33gMuEK~|nms5O7m=IFPz724O9gPZ3-WlB$)xuH zBy;Znvid{7>2!(*@^~v=R-9^p2_%ckjVC!Q_c$1jzjNyhpIU!ki zW69*wscCFEwe8J_4CK;X$bRdudTGL|nFzbPbOp&xOXvBEv8v+)r<(8QKOkbgN7C?{ zoTSFVSx0}alKY1X2&0fZwmZL0TzK5SepfKD7>0o+36**a}?k!e#bt4~oA z7LWYZ$@_qBZ`s&rldI)7=rT>~^L>KPl5G$9BsJo#2aENY>tr=0Ga3453)Ro5(G^6q z8*a-^ZNBhb<%FbOG`$ICnHaG7Y`g}pR)~{y!Z@A(=3djz4I)_{G@_90Zm(syJPB#vjt^JcUHt;$n%| zmBwu!dNwcfR?W2RjbO-a<>%)LbPyMRhxxeu0`Y!I+zH=arFpHvyMIW1FKXL)pNHB| zd-j70Y4mBGEPPru{$xI`kbdpR_4H}37ZvL4?ON0V2cUT=(KF=A1mBq$6|Q`1rt=nx zZx4&Llnsknr~-1EJxq&o0oQ&itVgx#4i*k*zr+TpU4;X751&Jg`qX(ne!MYq;QJH+ zt!!!#Ea(HOlg6}z5`2)-r4;YCB;fQYo!;?QQ%6=D?%w5VE{W{$T(Fzh{ zfQov>FA!M*z8l82%7!9)P7mKeMeBu-!&}O6AtsgZ^P^YCP*>$j0guz7ACuR_aP{S& zH|eJq%%rAS){uJ zsrDBBCN>>r2>x}i;YlOi@>515qm3o0`icck1fTxGWY$1SAokdzw0Oyx8b+SqYm6Da zOmBibCo?ecdN4d3V?7q6cc|x6V7`JRH|vGYV)Vo+n;hzubR`^|-5z#a#C1ouDb`aN z(=4GZo@se`(RpS45{0y|!4GRiH~fOa!H138iEFJx2@O{M84J1(Z#()Zd7B5H)N|k5 zx&~lK!!GO*Wr1r@Df>){c?r|cbFiQ(sQx&kOp63ea-xQs6+v&NiZ0YF41pg)6^{cc z8;H+al$|~zbIie2U2TdSOT;#FAJia&?iBL?M}upL<>F?P*3CwU^1L- zm`w4`?Z>>a`4$p#Xl=ZKH$BX4WRqw8ucl}Nx28jqk;fv_IYVc+0zGent_{@tze!Iov3<~~&OalM%KH;1*K z-4Ptsh?k9v*dLs-J?YrmSiAlFcb0G4FMx^i)%}?74XIdj z?k}Aael;E7c()5|LOH{Ry^hVCZc?zKX9W}5s%z1CHsGRs2Yim-!<=N^h%GM0TYC2f z&0C4JQ+arru+1IH%u{y3YCZ>p7v=8E9t74@HVBo2y&Aaqp(5`Q(-2kRB~#dfb-k(P zqFP?bG`O!cU`BIHh&i4g z`v`Lg-Ss;fFlW|NUg1PvMlTBe*lMc8 z^=}m5Lq`xzZXCkF@NDAosE7HuN z!n+qoGDmzE7-c`5xwwcUPMuiq9|6Lvg1PU$%-r#IE(&jehz+UH2{O|4EG87JJRY{{ zZ8;i_zQaDSx(JZ8!aA7FiTuhOadP-RuA5b12!o-AO6c132Y>`vpT$4+Wve0YUX$2! zcBdbt`4!J_qE(9=boECx6;H?Nh=G0DuqYdzvx$gWfUp)|bg{DM=^krxThXtDL!vA$ z?%BO;oMPk&{g9m9G#}wRwRgUKMV2CqS_mMGT=(zNgjLBYy!5l}@8d7ANDMxX+Y%L! z1b`}|D_cs9BBOh)$PY=~qSGYo5`4w1de10}L@zfnKfHxkNw(d?{+9mo6Qym6n=+AZ z^Dkz_e%j|wVw$$g*^P~Mc9!qtm8Qr=nCzA@Z9d3%0Fyg-vl|X(1@AOm zNnErfHC*w|{gl*t%It&4`XG%}(PCR{@D=F-g7%;WdbQpyyl8mChV?ir{R3Cn8f48KQcH%-r|9vmrB)AuzwyJ>zsA>KIeY#?f37K&%Lhq?!DLAYd?GKwV$qN*+lHCG}l;IGD50A9oa8mtjDw`IDD!fAIcJf4nyJ-xvQ`S6 zIdey=`_G@c+eRlG{OV4ksRI>7KckJ1}rD*5QYqvb#^tojPx-}}eHCS}? zsf<51%pWVib@YM2r5CGx_wtZhzAJkwm8|mHl-p-58di6i|KqQ=-Icf0@+LQm4zJVd zoAEBXdz@bP}x2Neo$$vF08hgX+p@E5yWGuM<8-!|Ct>y&7pgPEVdzVYg& z*D6iwG;GS|D^t$?1uY-jk+VdlTRQywR+rY}&Sh`EdFRVZ@+>NTYk^Oy4_JQhm#<~N z@Zv-D&zE{?zpu-r(!ZR);oDlab>Ux=%LUFh+*0k2+oxt(x24jpKacX&nmV-7^gWT5 z`*w}&_}$f_V;cXy`I!^<&T2n2%h+PMzWnZ$o^!TzT-mJfcLUnr{QgRTs}mj>nCsfc zLA|2iCEs#x>YV8h6~6ZB%o8W`ADaB=TP6R@9i07hffLCuhbPzA`}dTN?;Y=$>Al-3 z6un+<*YGj*CVrf|asCBUHf;9Y$h{>0`Khh?H0(O&?@wku7-`k3QEW%&c}p6+b9c6N zbKh$hSW&far2NV5JFm~E`|P=~&z1e*=K_ldcX{mYua7i*sr5%g&wf4pi&%Cj?s$0J zL&Ns3zWRNaD{oF*RN(Ec$E(epd{3Ss;Y|%jeit3&J6z|D48sb2yCV79+lPKTZSqUo zzkM~dv+k_-PA`4_jnOrNMebU>B4;2+g=rNl`!`Kl*l9(Vb`Rfjyw&S#pTBM2N28KI zJhP&{Hh#+R?$dhRGP3Nki}yYG$w#-@#IstlsJ00(%4dwXQnoq@x!zZdwmDr-8$md>{;LV?8@{}>qlj|9$+On@@l6;^;-U{N45aF`rg^>f9Z9N(CnsDp~2l=Z<{P zKl{tEN;eK>ncKV3sAE;~Hz={7c-h^*RN8xI##YCQ)SYr~&EUF44<)@>WW$qP|NLRy z(g`babsQIxT{m;I2Ht(nxUwwPVlB*Ba z7vV;4js#vb!ERc#ovy=Yqra? zmiv9*hs75^xcbAMrTU%ws^k7@dmH}!%+eR8ML*tKWW%<}+per$`D*UZuUBkerdG{v zS%1o&b;c*r7wW&>a9XE)9g9|nswbOP&+Rnh?IMG#tvFh0d(rQ^uN%BI@@wYnU7qWn zx7?8G9mjs3t@Mf3$B*^gl7Sw>?!MXZVYW zgDUzS>$l+koux~Bo@?avdqyr?aJ{rP@Yj=tf1LIAj{KWG$=tos_-_BqDRg0@ul%(g zgC8t9=1jvuWjg;k?#`zw?7F+icb`Ug4Xv1G5w=I!e@ZvK6%Q^hye*#A$l&8z>J*S`6XRp;t_ z{r3Lm?H6Badg!)yHb2pF=})C|u6t<6>T}PPZMS;U^uC{M?%J~Wli=XSO$-@Lu=V$(y*&$l^LJ5#jf z;8GRg&xje1|2VYaT3?rZT^f#=2kqSn?Tu_dc>JFw^OyT3%aV7d798_=ct}#sgKO&* z>3uEB!FNwpF1hN^u3~Fj^q+aU&E5A8`nJ)|V*8&ukolwc->KANL+!20e#uvE=GVE} zy)vWBZO3P{E7joUj3y-)H(vE=wSQ(TE0FQ!jgvyl>K^D)u1~SLUnjj>^|LH{zxice z+nn3iZ#>lR&YpdetL#2Mb@+nrBdWA}to^5vk#oxps<5U{>0Z%KW0hRtnRU{v0rYL*v!FTSVy{g->~e!b4|N zmYwpCZW=vOc=_O@M)h)U-L!T8k53%GJM+(DzJLG4V$<3;TKrkx`uAJkWM{R?d7obQUpnsj+;yG8?lXjku--P@{<9F}udrg~*cWZt>=ne0#33Afyx zROa3`%_jUX{d%*Pd)#>Ti~1`vckqbj#&vEkMk^|=aux;Q^51y_5clPsBhIKr7OR<~J^{mi6*9RqEJvrt~^1jUj zdrhg(G1u73*XK;_)^uOnE~jTM%iOxCzsdC5vOJTeRGtG`y{ENDDm55ad4{jv$Y$AJ zE%sf`Rh9ew+91co)nk)79+*D8Ua^L^GcDR{GA1WZuAVlp`-nPYp6Yur-@g6N z7rVFU;Ga7_RmR#p3>Ys2O1 z_s+{!Yfk9yT??oE^Z43j_pb~5eCcY|pU3@L<3^|B`41eMs$CfH^jkUqn!B}5uYp;5 z`)|(sd*@Tne&MUM|M?27CpYMve0L=4+~$|7A3EPPN7MBU<_-8L`Kc^5+dY~z_w;kK zw?^}~tFrRvOp8yvm2t)1341>Ntw-(TTb}K7bK>Y6^Qx5XvHa%5-KF|=C_A(E;7j+v z`|R6KZd@_@{__{k6`9@QtC?Rtu{ltA%KGnH91C8*-euJG@pr$T?dsr-tzXKycEg&L zW&att|GBI041E8Mx(nZVvdXo&BY!zwqE4@pLl^fLUohj4M|u^!-tN^eGVXq4OVeEy zI`wX~^R9pId+^;__1}9hcl|^8rWV+o^zW!;TK^$8_kQ(nEK95Vzq)wq{tBJ{`J&AU z?bG9zMlCP#XO^>-%be-@Yu3^k>Q2}bef_SZn=|$=-KF8OyDN;nI%50Lac}HcFf-@- z;oDBQZK)9xD?|M_%4@3m|Czg_3w{bw7@4873dp*8DDRi88S>z_V5RcQCn zi%ZAcJe&RGq{7P{x-qF<=_!@Z@rfaS{5EQ<=G%0@H@Iiudd==v|7g~0%wuO7=dN3{dYgR5OMg-0#Dt7x z&vh%hba~{_)r}v{Tya3&I-PruYgx6*#=j2seXi%6joEK)x4GSrdM}=TcjEYUWlp{D z>$VL=HYfF&J$cQfLI<*+Dt~p`hDV0&+)!j}%{8;DUyk%SyZ*w(yNmsM^4M#=`e|Qp z+dpaZjxwjppD1|hh2QsWIB^61zM~jrP4iFmzP!i@qEyI?QbS?ZsTT zcK&o&(%r95-`(SdlV#5=Ed6-wnpSXTxY_1o``9^dzMu-@yxz47{QzYJS`^y}Zx zT)5h%M~9KSmsZ_*X5TYyFAbXX#iqAcW&7pAiajrMsNBELFV)YKZPmC^x4kz`$6o(> z$kg5I%Rke3N9N}_Y%{mO?k3M=2u^tHsXo$WjAIiI`)yp?R`_u)c(3p>(S%({nqW+=@F0BnKJ**JFZ-5xTg4qd~-_Nr@f!^ zo3eQ?Puu@cor^zC*mR-Pr{@p1?69fXw%1O-);#+IfBoJp@Ku4q=LdfI!2A2^pL%A> zg2|8P%KGXn*T(;~sl}?_%4JFZX7RE%!}^RKx2$-e`>x?Xmfm#F^JiZgI<k4+u-LlBxhWWG1d;YyjeQIZW>+;G<{qOpw zXwn-sOWv&3sQCP6d{dV9Tib4Tj=O)&x@5%Km#2@bJ9F@;^Ba?L*BbIcz7Dmr?Rv2N z>)VbkAOA+iai#aJ*;H(IgB->GTr#Zk?&eL7&3Z;_+H-K0ij59@TxHz5kDl((@AfCR z=BxYB-}z=tKR*OLp|SKia_`5hUfbvO2zcJut-OW%mh zytUZ%x>x%?k?VsF?@W7U!HEVphrbZG`b)t^1-8vByR5_hel>c`2`pIkX^FxA-dBF` zzZVf^peW?13 zoHrhv|9*j2-Z(Pq&&6kM4xcvgo==>%ybc%4K~v`KQb0t9NMjTb5cwdsUmTyGqepNA28IB-@y5hiBv({NuFD z@BDVOScSF=Py8_L`4P!a{Wj~ieVIzFUbK0^{C?GLS+isAnBQx*%YJRum_qs69X*G7bN1|_ z0h0!NJ8IUJd|ci+FHI}DWJa)bk0l+37w-DO=(fJ4 zy#~)1Q7Fgb%f4Jb{h_=a8{}zFGAYZKdA^&Lb#m8Bt2>l@?cvv_R~o+Q;_ug*&!~A% z?tg#UUufgh(DdMyte<~1am2K_fm+|+d-uq@PnVeT;LpQ+$5!9!-~RLRjl*9$y|2#Y zb#G6rbnEsFx$Eyb)#K%o)0&JP()Hdl-?ylC#aC(W+^awK|Hn7r{&q74wT6dUerO(= z^Fz%kzx{Fa=>yA-HeYxy>w#u9%8&o@bfw39tuxfPDZ z?n?$=ZRkJW)Chr^81MYj|L4V+^qiH%vPPuFW#MxO?&SA#Y7sap;zJFT6Kzbk~EmdmQRAU}CSwvadTfxp}5J z+q>u6QoC@G;W-+#>@oY(M_=7_Pu6iqGv2x4fprraUF$!j#z&hT?)3BEcaNSLHDv3^ zCx&(YsnE`R%P!xtI9HR8D=lBQ;Ly+q-+XA)o|_ZDUzN3C<@{6LiB$h0(?i#egjbDP zIV}2Rm1YGu&AaEJ;?rv{+}rfAUs_+RHM`*NJ$~X!dLckM%OF4Hb1-`l3`k8Kt|lS}L0@8pUNU%Yv( zPKh=BHodcLc+*_x?mO{Gou57{uw?)2p-}3!&5~OmSzG(+tlh7i-IF`hs=bA`+&B5T zOVeYS3hi0d{qCN%vNbA`J=;Bv=2pKmX}N#y#|^JmoY12B1M_lrskf)VlNSRgi_fmO zvnx%(%39xPu_m==+U_gc8)K2scQ8X z#y75g@5?i5pB$cN$^B;*-@0&j(N=37?!F{{k*Z&;|7lvE0ar)AR=DOj?=*R|d&A++ zt=@A*%lc&V3KR2|xcc_NyQc~mDB5+YE_YVN!%6KXxQqT=|nPw!rMU}5`~bJ|>g|DpDovNZd&{K*D)ewDQ2=$mC4O|818 za_MJBm&rA}YlW-hR&MO{Z@IDOnt$81_xx@{s~38&TA_AR+Wb0TWb+f>R$uU9)3Fa+ zdG6ch=T9$KeLQ!`l@%YX(ddznlL{ZsReedB;p?aF>Yh2n^Oxqd9XRu&G9NrO=hW!2 zJ^aJIiC%f|LX9%dPf0GHyIz%d4_y*^r9d&9isuQz`_Y;NXUSxT2|+o1NMUE7{~EN}Do zigyg`o^$8pufK5U-<)>e*=G+HXU1+uis=|=e32J3@zMd>hY!pYJAz~ZQqyUl3K=oDA}*elqzMb zEw0yZ+QF=kzmoYt!Io!^b*(w5iI%J8gG;K^`~IuSd-wLJ|9z!Cg?I84qjsL!OaAPCEkotqMcNh~(s0tc!%d%fC(r(U4JKBc zdfQ)v<}F@v>d3)IhkjV7!`E3F&pi2dp6_2B`0afI#?Nkdf6c-zvUTcT{Fm=L?>Sn2 zcZV)#cODIe>`*F?i+Xhu_D`r$N!$ZrS#JM-~BVFQQ_`uzO3j^9zXH* zr7Ig&T~)qGQs9nI;U69wb@5bo}Cc+p9MCXy5uL^ZvMK=hzY7@7Y-AmfW)| zcO0B4!=7Iel2#r@upi2eR@yMnPV31-ZSmgG4t{f|;itYju3dv%a&l_7}-{q2Y&FM%+H2R^?q29zXN<(#G{#6>r&WW324x@X8^# zw)^sdZ(hA;<->V?IC5g{*qiHL{XJjx2hQG=r|Hyob$!bYp9^b?OPBic^b6}AY;UXU&y#{O4g>GPCY%j=jiWhx53bOBI@ScJa9C1v)ps|KY{OD$JWPug>Ga+lF>Mx9-!a6<(fJuwMNm zL&J@Zf8OJf?|M8nqi3w%$V@|fPC2l9+lA{{S~dE%$bwB12F+i5>+0-_U)?gPMy;D! z7vIQJ?P_50rdw9;nfc)2dAHWDTE%y0VYSt{o3?ITx?!`>tEJEF+>x>Qg{-SLEndAR z_wwMie=eNt{#57Jv%mlQ*lbze zzmccc;H@oY_Pt};f>FOmVtaOca_&g`78_#Mi!I+b@z;{c3xBxy%C)}N{%F#o)u2<^ zp1oeH!=-z#=G<1fOO8iYZ$4JK$Nc;|D&&8E$oXeZcl)bNufP5(wDyBH{_;=B_D=tw z#vU(nB>Re%U(R1N_^rN^fA}HyfuFYBIMU~j3*Y>7ZQh(YgV(OD@P5^|Hf>pcJ@~w*P!li>kl9TkFc#%NF*1tLgdcdoSMmZ43XA$cKI3Uia7dH)?k} za_q@%SrS9Z20*zf1mxkOmnzL?l5HdzfDHu=zZkZ&DpO8`gI=> z{dK|91AaVRvBuk(f8UmCY3~w4{`%+N3vZ0O6nS)H{{bB?H+pvJZlE3f()5q2x!!*| z^6!~;^^bjCvBuvw@2c?7nI_NuwQu{A$A5a`>lU|{tD66}3C}*f`PkP-{%JPm*v*UU z|2=reioXAr+%aQ$BAs`1-y}ubp|W*N=B;@3;8i-{i>~ zHvf8|&r`<+U)fusdD*H%Hr!l3;rqgUx-HwcXjtcJ7c2bz)TgUgeP5yUKZC1AH~g4& zdxrfT0^M({soe6{zUMdPzF0P6&#zv|sr~5Nwd}QL|Jk)J&&ZdiANuFnIwyVm8IGl$ zJoTukmz8F;*?>mN2|ue7_URP0rav6*q;Q%P#j%dKhRNi1~ZJbt`_yd|Hk(~F*XNC)TJf);D7OS%t*ES$}@BvpA8n-Gnpwn<2S_P(eN?HZhqpdJo`l!`mRlvnI)f9~Q z;Qw?`6VQgCRbNm{lrMxz3kjw9LPAr%kg$1QNZ7a!XodPOgoJhbLSj(95VjJ+R>Gnc ztIorQeNao*Qr0;TF#k_<9*+6oe_Am93Rc<%aXv7Eqqso9@3je2}%HmKM6J}>u4G`s1TD5?w|0fpYPXdxO{6U5Ib)ZC~ zOe=tktHf`jE?rfSoRX4G{Qm!FS?N23AM^l!gdX5;Ks<&&hG`g;Eyd>P*MMvde+-4e zmf=rq8!7Jyuv_^3KyijYqETJFZZ=nQfAAX{gdcYZpC9)H_=<4n4~WrPQOqA;jS%W? zrl|11e`JM1;h>DTx>HcT{<#29`{55a6_ESmhd;(tz&7B=tw3(Oshx_1CF4$GU)>Rj zV#TIJs->pSrtDU+c2x9-VFuujp~?ur0Q@m@?$)Yx#lp6${}JuL-@xK=2NwSZxeK@v zV-lAq`;Rz0BY(tLg%nUAZOydrm??r$wALTdCH$|ZAqAUus2+Ajzt|bU%WLI_%}M{0 z8rAW!jHbkJ zNbw+=TDUfMPCaD`x+L1gGn^g3{gzXeL%ZUf_#bQ6VV|(0Yv!)rN((|ZCHzs^r+bTx zZ*f|XUEF@l8OWg_u@nCX8ggg_Hhm2@egIGn4tM&WbkPc)7#((FIr2EPB2Jh87g`BJ zr~>{Nt1S|Qz(w4lwXe3+SV)BRF8!7>jzbsXeEJ{g0=ys%c2xb3VFp$YUV{Uz{>RWv z6s!mSq@lgUkw>IZH-+ZKVuG(?0^qAq9efqY1YgBq2twh0?65S;Y005ov2{DNJ5UeM z4aOS!kM!sYp(cSCK8$@Brw0+gXzD|K`NUbYDeRy4NxwK1=l~k`t4wv7j{%6Wxait% z1ZU6@gD&v+4ch{`8IX6cPXxf4p(%{bz;u}yp7Id%7E&I9AC5hS_=bz4p#s|joW#Y@ z1vc6kkle5DfI;O34({E%(|}>Vwy3WPty;H%&&0!@K0Vpp_-OLb`|o{iRT> zd@L9X!}%{9j+Rdf>oKOp?>;rSSD)koojUjE1)0-|-w#4lkW8}zYx zrEH{qpGqF^RFC8#=!%r>o=fpr!L*gb?Vc#T<_#T-TUeW zW!MY*i*fy#)+9caP(~!8m5)UtVVK{9HlFCw2U3!|LDPoq!Q&Ds>)rTtxfV4Vm4iq| zThqu~|Bhd;RDcHO`gb%~M~2bLeg_l=#?=FARhXtN`?Q|7+^bWM-g+eka|tk?Pgraq zNk=$h_2@9x?v)JnH=z1OqrQFcC$M@UzHI~xAMv$~SITHu6V4rvcJqnF4nc{U^=kQ` z;sDGBd{eRy*cFsifd90Zo;e*~Dtb$@jvv-t1?bW6_n=1{td1kLhNG5-14))Oh%rK$ zL;=%VS4jkA2OJ#-l1Rr60I_xau!u}B6`7-e8H`g&1oZ_R9S1Zb zk-p8OeaDdh@9a20I@ZxT?K_4PeP_o((y`-wZ=XYb1GUW|uKYj}ZpwiqbE~0N8t_{> zLbH}hSgXfV*puOBz-$_;&u7>yd=+kiLnJLideR$k)sq-E>~eZfxQ$BJI21{7be&{f z;{g#4m33XGN4LQPpqxGG+s8BK|5(TYujK3fgKi;x%Gljf{><+~SsA9dX4~!YR&?g58 z!H~t80-`CIObBuTjC~s-@e3kIR-QQ5%NnL2=T9sPhmjHk;J_wmT_6F`l&oh?B(Xjm zvlI*yU8!)Joqq#GP(Wu71Sdt1M>h0kwZwwL_>eIh`Zm=R7MXx8=%BjT%Ns+Xt4^JJ z!D4(kxf7IP0^bQdTYYsU{-tT(A@JB%AANVH{{ZiBng8Gzae(g5s%^iS?o0r*S+;!) zWjPxrv#6<*P3=cB!V^k};r5IWSrQ@!C7Xm)_8eyLHAD#Q z=+Z$`Oc7Wf2JPT0j|(A!3(l~a4W4bM^SbSNuKd{m(XS1k+pK`6pS2!3o@BZOS9U85zr2ZVKG`G2qJimvL0+&bBiFHV;Cg}B8Zh9dbX@3 zBx5>s7bOTHm^1F%H*fWnmd?3@QGySmDOu0vtRck|cN8T0IAtREAb!D3%fucGd_V~u zJwymT2nvm?2Wk%{|3;}b&f|;{d=O1}=-J|7An(T^S(M;|Amn;z-z7eTINvEs@Ierf zWIdbqfLB(AJ@EJtCHUavdf715Y}slLIA^{9@}rzuBlzIFQ?~VBvj>;>5aRr@7{Lc| z0WQ;;t!E29#A(*lcZv~wa1yDdl9@zpm8FL`-zi4$K{O?k%$zmk7N9-gU7KUJVgw(= zFSu!$*n@!&D50Z=D8YxYH~%5*@&pp%;)yYW527iVY}6i1hN131h(SAd!Wh8^!EX1^ ze!||Q9%qR0C!zSYHTnnTvE^PLRzHVWmr1e^LgBQO(o z=CB{5ld5BlOmx#A^}AE^z$!+~D3w5;_yt!jTi_g}bQofcK%XFK%37x8fD}`)l;RrW zt^q=fBkNBhi%c{n>p8A1i%fA&DS;$^5`jEnvu;|pE?-jm?d;yfysXYSgf}bPn z$)>%8By#OB&ayv=EHfuBRtmc&@m9BZBo)~u^CwZsRJLrBEMd`d$ry*$pG0h3B7j7&OQLavmK$_z9qkLO z;KCA^6M|nOm?WB#^=xVliG^qh@w^FY2^!gcop}*bOE42J0I#L%HO%<$evN8V_aQvX zB<9XBPlUG;a8g2TGMU;!QmmmZfeXF>O6cr?fDOF)A|JcW5?neJVeV`|*gpYhvStdh znQ5T<&MJoMaLpmF&kCS|peLITn@nyofpee(1YrebNY=ACUqmJz6DSQ${DPa7i6t10 zGcuW+mS9EFpf}E7P{tV)0vRmGFy}Z2teAjJxsWX=h?>ZW!r?NOV8w(Wyu{?ex`Q&- zAd!i4nF+@OoAN9Zj|l;*zlch3(Q?3I3C3(eZ2@uIaacmYiV49aPnZC2kAae1FxA4G zyHD6+*pv&|g2*!zc!$GvT0+o@2|>aBk+n=PA!woA$ae?M7Y!$i!m;q3@v*WHOoijujIO<~ii?dwzXM$VOnBHzGjyn&5w+BI3n(BVPvHk}tuLP6V>pxUT90;DE_n;Jg{anZv=#X2Dzn79L;_sg90S zO*nHwC1;MCU(<<6?h*q%W%4O_L= zIPWV=Em-CE#b?=qN0@BroMqyND@nS>EF&ux5ftT0|5Z!~jzMp{)F84o#ek(A59cNl zvL3c1H7`M94_Z|eXQig|LI@K`R+9hdMr_tzQ`x7Va|#JHFQ}xwng(hiyatin=rB-1 z$_t8L@Tz@tF{iio2@E-_3)#XZHth=+OKqTja9`!SgdaR5#V5G!oKV?`UlxaFiik95OFT_p}oS!5-(UqBcp^{ z9rVVf4GIFRi}Spni}4Yr8a5>pH9p-5Zyks0be##CD<}x4vX+hMMmn=$N9LhAy{DVN zr8mBB&@JEB&qX7n#A#Quc^MsHDU|fzbqQk<9(o)!u5G?)Sj*vrx z-WcFeF$f$17k;tEcxD=*@?lf5MP@7otB&H-@AO>?8eu^NmBdYIp~&S{ZwVT6E374v zwV`COn-*%}uj6nXewUU+fJn(w=d}Od9QHLrDGe$~#y0J{JnU=W^(r+k5id_!zQm}30jzw>Wu9>f1tAEbB?vtT%m%++1cPBLruL|RAF>LI4a$Je znDBt*1}T71b4VOEh)o#LgTITQ0i=ftCjq`1e>dvm1#r6p{FGw54 z;wgIRl7y!cz``p~Y{d+}5CcgfTp;{KSs#XhXjm@~^^9x{$LIsZsZ-MP`9e%V3s2wS zbfG00Oefw!rypT%o1uQM#m=xh7YYbs-UT{lNN~0*K-0(}UYS>7f~_T^#E{UI5d~ii~{?U-(t(*TQw51WUbx@fc zXKcTi6lNHZ;IBAUVcjr--tq^6xG9PD<1GrP$WKqK%>M!B{7|@ z2@BasE)qkX(kSUsH04z!)*;czeiQVTKM*u43Uim46zQF*i5lfPil$^DnW;@dOoTAz z2|d2JJ`<@;W-Js^n{XuD2#AFWg1Br1bUKlR@4`Yk)TSIfW&S~2c1!9(5DD#xLx)9n z<7h6Goot56JcI`I^crkIOBzCuPeXtz@74`TNo%($RT!xYrE=Q_anFKEig-e)meZ6` zcbG9KGrTKRD%mrYDHxnm`Bh5Upxzk$K})^dxLhW6imXyDQbWl&N=AP|sR<7th$VtK zOU0lyn3iOfl7mN3nW4ccmG=h7IU(eY@E?*9{)tk#&<^1}VpB5UF_jv!F#d78OVq_N=M*W{)Pe^yFMXGh6JTm)-YNAA(5bvLQIh;mAR+X2vZW9lJ%TWsyGh| z%)#;UN;N(uwN$I~7ZS+@(h)F9HJv_kDAXteSD6OYKw!0XpTvCw@Y^`!W8x4zc8Jtt z9IGQz0xyABv0OChLLf_~q~Rf$8;8SMNDbSNIJn9>uvtq2V&u5STz6`OcNtRVcqFVP zLH5J(^44N(DN<{(9!5eUZA2!!fom4!;;5aoMoLSDl&J$$sTQ)mT&c`0rbftvA<>jn zq#k{G>ZTg96r;uQ@=7(F1DR3@)hDEk?b&2cI0ACnIdUF6jAB_VAwg1?37^`oxzhpR zPKJ~``qXyKg=IRc6oRGKNgpe#Zft)S;oM%I*q}Y~JHq*1gd=P{p%uisqH5UOJ zLJmOmRFA=@vM7za*Z^sTc@mHn@EXhuUsT1Xaf(Uk)HLYWIe~d zTMNxOgh2_;yER`Mh9e~^*XduwgI;6=D%3U+j%ZbAz+wBOlw!zR3GWax5nXI?OgswS zW+O7`%T%USd^0peL}EiQ0Y8ZwDp}FgP|UN2ayc_`E}#NhMe@cm51A`V*)tRS0ZJz6 zSqBA~GUFy{5jSM;N#pAy5mCc}ui^lfqKT5qm?6=wYy_N%8gySn6HZg5_^&dUcn=mo z4-?ybh_rC_GAOknT&eJPW0yv?I7UGD_92%Ea3MEWMrx?ZYLp}x{$Jzvf)Kph{hqFXbew!5t&rmu1zM%VTsDbZ6)+VU0MB|lZihp zk+@RGEqOX*33Q-_0X^f)RubKX=i{te6Tc{1zQ$n*(_auD(2${n|K_k1AUx%eGCK+5 zN+Eot!Wc1oSb|p%t*Q{SE>nfgfFy?{VnEzsiM+rYQijS*`>`CBunWgJC$zwjl9NkC zvQTs7$jKd+2zM@|jEHg~@rNZs;tVM{xi*m`hb1yg++m3@9Yf0CvaM&az_t%M^yuOBCE^M6DfchQWA=(_AIPox%RjnhZ3ojMB-)-i-Ws`NQ|S^LymUm z_OUK~`z8A-z*EwLd-uWo%Kz=<=>U1oH>4!!+SKHB$#N$xN=#C6%{es*$KXFv6TN8l z#^DZGih0YeiD3l53r^OZPs!ot)MN%M(%+isg}0I$ZL=n~kj31J!23`{O?p!@2Z2+Q ziCF)Enut5BWUm@-l1N2CE^x@8uZE122gAgCA-?`SWV%|k6ZS^z4$Fw$WP9Z9UkFbN zo083o0r+7HuN#N!ynrFhBm4zf%Z7K1%zLr#8iFzS@o;jduE_%i`r4N4)39SQFn>iCt3H#Z}2&UC!Sn)0Ft+akv zR$8A<2DsxY6X(2J!W+WwWb?&o)r^Db^l*g=;k6>`h9%mP&5^mLEDsFec%5sCFs#DLTmYQ?uq6o~ z9OvS>nf)}|HpoNEVQ)PCuwbF5kVZt;6nN^YHN|Fy~+aTq( z!bdufi|x^maLyBg;LbJQ0oyVx4r{$Z@fpM-WGw z`V63fuXr(KsNCUYQu44e$3AiSWeo&j#01VfVmF39*{TZxngyvW+hHuCkjW;{LrzFU zgiw26y^?cQj z0C`*q1N_p4&B8z-%d^>df1qEFm`*HJGb!|fzbNa&m{@YV$v=-BAdl>Ym01}4?PeI0 zAo#GdS)B-PH`%iq{Rjg$@I;fBq~gtsR*Am(-xUW+0<>rKff!LT0- zyETmDU&lHpq_nW0#LF7CiIliKm5aooBH>SkmG1y>BC*?gkdV^C%HsJ{B#}&z!U>En zbMB}>KEZ}P$S0Vn2RtogooQumgSnusQyr&VQ}`p4xv)2Ke^^HDCo(ZNZSaB=kx50? zV`UPqoWp!IvLclPHQQXfU6IVS7`)&?WKyk2Qzr330@_!YXPm*iQKV(nrjD6iVar(B{5+Kc)N#)q_0~U%EXnGz!w~@(*q(IQei=sm9@+%i$@Vc zkqHalq^x0TS(cjWa$sbx$es8$B&YY^@Yj!33B zbFQtbLkhdYfC+UitSk>s0l^YmP^gA;Hb@<>u(E!*DHJ9Hp!?5<8-j#F7FK3E7zS)f zbHLFsD}(qFN|LfoTZxsY&=%*$gvgelpr6#gMTbv(5C}UwIoj$HD;bNd|#VNiNO9;O!tYpA5+TscD@IZ)l_fzt!ZQ7C$ z$LLnVIWmN06jn0iO>J4Y@nN2E4bMXmp;QM7PFwtWg7C+}B4{c@M4Pq}i$Y;r%q0@! zx)YgHK2%&=3GWHV>x37=xeAM_-7=v#Z3)R7OPp}t!UE`|4eJC-vhf-jScnd=@nWil zFN`JtUwQY4u!yliS-+;LEEzdrOjU-_2$ur3eyk^GoO9vt#@3J9G>j~T@Ed_omv2{w z&H5s6XJM!VRGZ>WQkq;Lz~cy3^HLT|VS-}(8Ot|$5!3gg;OqkRi2rH@ZDO@2~SmKVA?>8A1!c_~h7x%W$a9a<#iVM4C zWQQ%~$Wb~cJW!sEGQq)IO_tOK9FDVP%D7VU(Ae5;FoKSqUgYtOXW=DjH4TwF$7sk@+j)g{f zG0J2X;~K%d%h!<-O&K~cH-&UYOj6@5EJh*&9Ro4(4jO$uRF6Xyq;6f<8<#(fOky|7 zg1bkcd=e#@-!LFc#dsX9bE%U@IK#p>lqrj@3K{X9E_E(qL0J(><~=79@7_>ak2jWl z7#ZGf=83xljamJQh+tWJP-o(}p#T}~s*=<#3M=W0W@f!rU>q=8PtcEdvm&+Lm|7>h z8EU0lFg7BH?H*y4>)PB6$r3SqN`vr%<7bwP)gy~2i*A!86A`%q zDcn<0At6TMj1AF`xbR6Bmjnu_lUdSXS*9wR0EzIb!bq9j9m;-_uJyKLU7JQ~Ra?Yh z)y8{Ilz;G>m;F$pBt;{II`(7?sso!%d~u#|0}qTJ05#%C*Q)a`W29(rO??rpTn}Ga z41_xCq$l07Ws0^5>3St{fqN(*Ncz@MEnWI%HWjE)ZtYuH5Iog#GvE)^*-76jvPi1? zX3!sspOU^+mX+$h0eV%a#1YP+G&>oeeq2l!n_yz4P~e^Ptpc4?>xRQx!t;qJiNLgP z!9sVnS#S@mLsfAiw+iPIV4GO}IN}sM0s{)AU`q&85hcZ%%5QnaFpljqx8Z_{cS?~c>=1>lfKgnC-vek&b|pwdaLgqK^C=}O^|!=9O|lDN7`__qU}}ZWSb6YOU@v?%ejllt4oL_bIHDw4Q!UE))f9a- z&ebQ+sz#Iy*Hrh-`Pqaq6;V==Q`k-s!&^P zO-XQ0t=vHl*9fmJ;*A>aMQ*^ggv-L8G=ePt5RX<_1wGZe;qZr$86)24;a+sZ;SZr` zVq-E4;5;Salt4TS^MK&12!i_}7;lEJm=lN_3VaT4n&GSAF(Ii9{w|Odz8apBK@h-2 z0>5Vv1<-i(zZ)KuP?#gg3-9w-tUatOZxxqJj8@>eapU6)<1Gn%HAaRZV2Ioqe@7g) z`)=^^Eg69-nq*wOS;}1DsCCiO`NAz~wf?Znaywz`g&UUJaj1Z1y(?=2CMXJ)G*-L- z1da-7#?c3P1S#w`eU(rYP!ea$B($KU?ei3ch>XAQHw*V;nj`F140_SeaJvdAM~5A{ zSj7=bh3g1kupY`5TWlDA!Bxv*Wr$T|$ZuCJ6h^kT?2YChkJ&7Zc=>#bX5laq|p&o|? zkr$>T%HrlW3zFSG6AR+}L&6%3D03f70}=raoMyh5Ih1?1E_Eeak;;TTcQ>no^E;se z#6u5dOYYNEpPh&@Q-G66xEYRlA`Hxkl4Na@Nh~xsG6lGUIw=_!QF8pv1!-aTqvh;uk&J{%UKH?p0H;vBLWvFXh{HgG{5!d8taDd(niNcT6S z;|U3btr}7K**2*X4x!2#xNs4nenynp0jyL!HV}4XM46>wwrs@)AGoHwz6@r8h3rMQE!LC6m&W&T_KD0XuD+@Kz&AR zRTSjBNJ{lo27Tgsv+S^Z)F(tav`VhCO)A&ezy@*&i!|ak>=&_=YKtJz+kxYRo{PWW z)f#Zdd^jv8HjwIg=zhBC!IE~4&aLjJidlj^$q2F{_JJK5f9DIc!2>|nb*yA`+h$I* z?dDX&N9pMiK^+QXoMEU~O$5+K-v?oY*S6*kgQm$j4upTXi3+4 zTe7aPbbG|YgO4B~8f3DEMbiAe1gO_-8En)WgFI@fYOc@|*kgjG*C zTzz5w2YRv|uA<&Z=us&Novb6qn}&MRL{B>4db1}S?ti2w>v1hAsN=H1l64nFjf89|& zuK-EuV1d2+DD2n?nny(BBQ^CIU`s?Cxa zQf*!sV2@e~%}3+4W9>7?!sdfgp| z&Ip|}DjJjZ%~`NGin-NUG>t5n(14@f>ZeDMMCxkQGZFPLp+I0`GM&XOIDvIIV8=-X zss<2CP$E8K!6_j=XTh+yr461CVsz9SX+A0?%@e1~&mBz&trQz`H5-ZZHV&AX4TA21 zX)J4*SsPxes>AaRX*C-J-NkMr9k*jEHnv5d0lM(j*n*Af>QQ7}JHUkG)kHw&Wff!J=hwzP5w2yZ&-jVB+K zRVuf+1KiP!@My6yk2*toqFbG%l{-MV$5C%Q_o$%cr<6@dR}ptiBM&`eV=|qYmTabE zgBy(lc5Xm~-5XVAEie|0qPd)nG;;?CBRVQHDANet2Q0-H6|pKVZxQNUSzRd6n5^&k zY=|9BxP&-h=WGy8Z`5UJtf+N|LDAgKMq0T8ga?h|k!i%>R9Q~uxSQ%gi?=QY$oSAA z;pcoIEhvvqrb2Z(wwZzJ&@Puk8YWd=qsn9iW9cAA+OPuQAiA8aG;;??P1&e7!h96# zq`NuSaH+3QE!H|;-U#zv`sU75gr64`#p+~6N^Ql1+}sI*kPcB0S>GmPAaNdz#URZ` zku>i^0T>7&Cw*nA2xFD;QuwaoMQP=dkm|QlK@gQ`$Tm9yHC$OG=h&0-w^2d$l=aQ& z%#$0JRxSx4Vn+pAT{do;&fKFP=h%}{wNYge`M5ZAENlCIz!L)Wq(@ zQ^aW(p&&(?(K=)rVO$a;iz#YkFCi{~D}wBJUzE?gfJZ_s3d7q6X~*XCU=b@Bz{poJ zBFEqs85b33-17X0 zkr4q|5avcgCOAa=rijvaF(%lWDP?3ZI3|$PvyUoM2lz~>sKs`j@P!#S*(!)ksSv;y zlPN_%!)H?o8Z%4_7KP>8p`YR64}>U>1D8!#94ajvm(Y@PM4e^%6lp7#y zE(S9FP%hrGzN6mKFrv~l461jCJuq`ab;`vjNCE(MDAOtCYD6v1IiO68O08fTRr3Go zo@(KCDvUA=Ni{0LLrmgLm}D?UMTcGm7f}KGvVB@ProEmB*FEYj4<;(j zgCSVLg=PqmAKQ{m5u>MgLGkoocO**#7r%6{;)oHoq}w5|z?O=O5WWf{^BGEXf;{mO zlrJ$*1C~C(KqiKZ|By_9s4|Pla33sBD@2jd4l>y%hPw<0NJ|?hf-v=?%A6CM$`Y=+ z0vnki4OIBHZePj-BGad{ysv=cbviI4bt0-v58@`nJa@X9jI;`1l0=rMw|60;_-KMS zHz_8AIR-*iYwKhvb7*XK;2Qgx(-M@CCS9wl%cQnzj!p`ttF3)2)4e!L5&MoWYGlMj z})m*7Ff%FmJA7OS$_fM%C0kGP7=cxEaAlXWakd;sz@->9RB+LNW(&2bE1h zygE_TQt80(&Y@4f50beY_4YhR6jPDhfD^}=h1#W7g(|bT9@ccKI}whL*G5R4^r*M@ zIii-lBn9H~uWS10+5*3r3A)hFFg_s^a&q){Ea7af|Fi;R#-we{lL~3YL9|DN}6`h+H=Ip`WMW_qD;wc{|A3kSP zEJuMEWVCu)F>k3=F==WQK}N2!IMf*>)}UWr$h1O{(L>)HGLkfmm?+nt9)0U|2UUKF zUdB)P85U^>!U~1RWZf11`W)FAAcAdKDU>n7AG`@ZL_bx>$Vrv%$^@ zCip9on`HQ#YF%(11fQ3@W-2O^f{MeyPHyofC^!*rSjrmYW z#v-i|w3ssMgw6t{|G3$kILZd_psdTx+glki4}CK?<4`%4^z9P3VwQ|6R2KM%@w6KX z-GtnazbKnSe78P^>1{%#hKP=ZLy}%%%A^~R+eW3)t8Ay>i&Ri=(cHf?NEhW z;B|<@YeGMcDU)pCs!b4NV&bU|Ck7FMa7++uWs-9$72-SRih3vdholWVw{g5-G3*1D zy2*&JEp_6hd3%^6X2~pZZYL&fMG!3+))J6~tyZHF3tlXY&BqX8AU}r+gv}0Ki znsm%tvP#VI-hskgIeaGc*_bki!KPms$PugJ?kWf;7{zd*-7bL=Y$bQNu1nd4O6X2pLrl!<4~XQiDSwK5mMVV=cE%xZ%moRV{SN> z{GAvca$&;wEtk|Zk12C?mX~bht=3v++ z&NV)21jVV)yn5~@8hJfnR)>%=$-#~@3qy{MPo@Ho|tNWO@e2JKczPZgjN?=o& z5|C=Sx!s%)e^C(GO5k>LBWnPa1}2M16b_Rm9PgNjtjT(^N$DDExN=NTY?)Y=%E3-` z-`svq_^2`E;~^%BiI+YwdV|W+H7gdbL$icz8&f_JVxXDjg%BK-^T0zYq{qBv1jM8n z0R;Q~+=fnwe%P4IT;ggICm{rXJ|_V35{WUW4zP^6P&DT}5Kva89y!4u=N#r)2;pd- zWE8}N3S}yxR&1e8sqm3=atL2ErhKAvSlEP;MTw}5G4~-*0oZB@ z%G85Y_suvrP)L;Y?G2Lf^$9oUR*tj*#Y;)w$^$@;K0S3uC1y#8i5WcexGhRu;~FrjT?8+zRlEV2w9N zVg|)OhO-aT!NLTTsESKmi{v9yoTPWx`kSjud>s?}1}o zK}A^0>M(kAwJlh*X9&jc3uc;-6q^VQ6Pi;wF*fsb9Wo4X8zU*Y2%UTL-Yj}h>`EN> z3kpM0{j1<9wUTobEvS@h={zPRk6R!M2l_VxDfDmn(~Q=_nW<)MdTvHuuG zQsF#qv}3%(W}KzLpD=!IyvJsEdf-PG?IFJDDiiC?z6FQLZBZ7iD;C`tVrmjCZH#XE;@K56*-#BFz$e8H zB=!nJLdPsZ9YnGrC?9r7G%ofzvvGF%px7d9+#{MID5S90QN3}&6hbBh1*mosEMWv6 z6j)_S#zQ741?*4q#;%9Y%UoP485d9?R7ImTnMJUY@#J|Zc}nL@f7yhF z4oMkjP`S$cL;!^k3fwm5M%XuiG|pJMV<}W?rn=DwBhx#ADU8oJEd$~ivN8+N8hnR2 z)i)wp+cwV(Iood53PS~i0*XX1Wp;sSP!>MBF=VG;g!~DgQY}NfV2Rb}JZX@n!tep1 zsvQ-~BLWF}e@aJD(m5CZA!J05T(y*Vt;SbU3P?ncQc6~_O})}LEr^6%l!@%m{v;(2 zA1gb-2dxVN8Pv?`P4gO9PRdC2FOJK);V_6hI1zlY>xprlVRqh79IS-L=20>XW zh~<@K;!FBl7U9#vcvZ!d%zf07xC6h1M>zP#bOSK$0{j6i`fd05p@u41{oWqU@Fz)M zk04OVd8334YcwV^5YywaaQxx7gv^XVGu75~uuGF8B$U{pdeb3DHgub9TPkELfPnLL z$@vvDpij1}^SD2XjCR9S&^zY>6FNEc?r~4>&^zbck($B& zBykHNTREwpcW{xI8*k!$`nesOP~KsLDwjLeBV^gFq|zhwt_qx`zIQGNM5+Zt@2VA_ z`rf%H5aG5%?_SZ)H6~~r+7Zq^^zIRnEH_pPOwhQH2cf7#@2Zo7Nkf7KoDka>HA}S6 z@JbVjNVp0ZDh?sELv!f{jC$=g)$-IB_=0MZ6uMQ4ihDw2pXI<}NK(qt0Q#EFt|Hv777Ph*{9T5&o*fV<6cm@F|a|i^(%?q8=K9x^S6H zl%{;6!nUqG^v)bip)MTl-6NuU=pFD}WmFvZ6Drox5qd;j_ao%kpHL@{_U;jNJ@n4! z3XnaKD{uxC{KyDJkFs5xUv!um1Z%|LKEOBT$}-po@Dt&(+LsR$O(g^HmT3d6CY){s zICBI=C|F2)S8YtJBOHGah1~B!QAFCdN5sXn3OB%@7jSdvm5|**Paa)S5503(PDuRF zyGKy;&^v&l5*Rq>BDIJ8Ng}~SX81PX^e{rk6@^-t#5TNT!+<_r2ah=FArxFBy^Gdl zvh$1H$oDa9OW!;(^9R1cbRGR00Rs->B$+GlDUY})&6^>Z$B`d_a7Dxyt;xh^7d@Xj z12rsZ+bSo(VN87dj$X9I(Nf$j~GxE-A|-$N6-? zD6xk93}&S!yCe@2;YlM<=UWY2RsUz({*L8|iySm)3F zA?9QZwfBhSDO023>%@{3} zaWH0MDXZVL@MCn^1W3Vx;$OCavU^lCkDeRSjCsG&E*j@J2B_PrOc*j5J5)4*hK^Yy zm0`goT%*64=Z1PSF_+H`f^u_Ifx0=#mbZzgW+EeYVjf^nu5<@hpm&o|D^o;GV6`NN zf=1cf2B=tuTH{jb#im zGhGorm}EA>2GtXZo|SHa&3Y}afkMw5(o>c*j8UOygI5GgF+RI~_)q@}gCS|oSc4*a zR9POEx`kYG6JVFEPNZx?aItj3h+iLz#BKD@!b* z|3+E1W#|!cWG^vLxZ~p7^o-5CAcHd8qyVU<&7{!81-~*Q!#*jl(V1h|LBTqzIFH_)5Cm%T#1D4-dU_fK2J$ zev#CXKD~2*Oo{A%k4ZRQG|vGtrT+Q7Jq6-v-Z?;~RCm9(*FZe=&H*wdoBNe{E2*|R zmexnf=6;VkJ09kprS(xFIX(uTE;g^<>^cCM63P7@Q%AhW&H*wdlKTb!A$?@$99v2x z_j^n(@gh5ib(Bc%_x3P}mlemA6oe{m#0~J6T;fG`4(lk5-S08E#7pl^tb-C%)CKaG zT;ip7C)Pplgwx^om^k90cZRJ8z0(Mu$HWmYy*n>Cp?B)rcuXAe(z_Gupm!R(@t8Q` zrFSRRLGLsKs7&2R^&ZDm0fgRZ2+(8NiWk|PSO>jR%7Djw5ih+v{W^$4*w(x5o2Sbz z6Lex7^ln@4`hg&Qdgri?GL!utQ#!n8p2IrIO!j+wUB$~D$Gm9^ny2es`JhLtS6qn0 zI!fNfMCk(+VO@yBI*s}^9jP8 z?jt8*CofKCY!iQ8nTC*Rn-6nXXQKpqOu_J=`7nodlwYC0Kh?5FIIN?@Z@)6pAoaa-SVt-Ceq~NZ>U-y~EnO>pjTJQOoi0<&S71Up5v4+fTX^64(n{}aAhh(>U-y~&PEScKC+Pd-Z`wZ@xx>3 z=GR3ytfK^RO+06kE;t|Iu#S>1G>?z3c<^na9M(||rsnNQ6E8R)<*<(OzcsI^9`3!1 zD2H{FEw70bhjf|uD2H{F&aHXP2Js*}hjoIIN@8bWNEdl4_ifa#%+RZAhd~7ujPR)=}QHrcC%qwd^qt z>nPz|Q&!MVeeWFBQF^kb%-=|T?;O_Ic->0Kvlm3n1!|2}#R-gWj$-guct(SKd=iuG?y4v$%o2BYVCgJwY*zgdvRcmr7fCv(iki?;9+ zQyXTD3yjK%c1(7VS>po3M*2UQdH#N^4Wa+UY}qVWfTw-&VROuwzo~!NY#Ea{;U~rm zfAEc|4dbmp_=(vvW-{v^Hph%vvHDL;Z3yQNIz>NBd}GWYdMDy1#th<~Eq-F~w{a&E zKQYFP_%428j2Tf+{|TnL>E9S*#$_q~NsQSR_fCq@BBg#|pE66fts_G8!fnji1-Zo3 zl-WbH3r+UG4NYB&agG74xUY$qI@}BBrFYITpm_|Ml4zZJ**V96<}ql>oS@YA&N&7& zk3sX84&_DjoMR9s2Y*eO*JG32lHH@=D#tj-fF>SjqBWV-#p@1Q#fD@gT*mPcBp#pD zFt0<@9W+(}bE`#D6f}>SRo1b@hhRQ(NtYg6Su@>Jwz{UwWUU3m2alA}uPIY#{)g^4e59Oy zO_?6_KXlIlBqjBuy~*Z2?nPR6UEEK_4sSXLm=&XY0j7h1d7bbRGgSwnK>sZ>X9t&u z_=(}mpf!k}7`_Z@$X*BnN(j&$-ebOv<{{rEiGzAd(bqh_K;)@=4(lmLU-OugYf8xS}I=in3dzHd+r=a{a4LnT8^jgIrygZf6ZfFj;HQ9_@?}S z&0}JYr|voUrU?L=$IKj0-E;6wGXOM^C?dm88+?0!9X|)(GzCEOn49BCdJgqyxqHpy z$<0&u9O}^&1Wg$NNxkx!q%bJyKvB?fX&Gkp6R$~m`RN_6EySvEZnelKf}xv!%a;5#Pmf3u#2CVzKEGAhOndmlbI=o zOHus9jH_U1LjQ~zS21I5s63}nL$eNX9D4E{u zqKQDHJJFbZ4~o&z?sbGnr|x0jQ=aPe3_10O7|$6Bw^2cKy~qSf!TwA@!?zclvqd&a zv|V?-h+061)kYCQ2y0{AJpCIpzKw1a`~=hc;T!Y4CnJKQ1G`a6$-pf5iFuu2Si1fb zK0s|Fu_(z5MwJa%-3b6TRxIcy#kxjmQ#6P2eQ*piWpiaDVSVW%w@oB?90XC4li48h_f z*(zXtUVsp0dD71?{w-WXk=3b8{4!UkhR>Sdxn8P&}6-~7}7}Y5?ykRueCfq)!WOTUV6R_!!j3xr0GF&V=zlN8$rrONC03~(wLK8jkcV)d8SgPUMJ!U87?Iq3_bds*1 z3ifQ<@OAu>jvA}^X?W9Zj+z5iXq)Vgns_Ef*0#-}@H*R#MKRYSP?3u)6=lAaX;65Z zZV1M{>;iI8gz=bBq{&`(!7x2283ERL@d97qcbMr^bWyjW`gE1A4Wq)gd0<2PV`Wkg$Slh1u`mpYWV1gVT$qh zM(lu)))hVh66hZ1F@Z)yvWOdHF;Q2jT0@nkU((7zgIAUaO)%)04$87&fm;9-$#90- zXxJC{>8LxW`BIejm{_ABN5{>KFo9@4JtSab(iy=gku}SkDqXQYI9xe!5DIl^2dffkV0lqpN5&p=gcdOfaGn>H_$gC9)MTAAl& zoW?Y2_oh#Uns(YfIhJW2Q+qVa+X{;L<6l$llL>>zd1a9HAR!2GwCPZ8f^YLbQwQ#Y2cKY6c$ ze5P!!&Mc;;uRE-=spXaXe}eh8EEHwFA8-05=Cg0y0CrK#R~8LOgyL)`0Ra`dPbFfX z`ZwlJ&`uqTj;8Pil+jT8qDx?tVz*)5ch~vl)GqYaWOl(Fe{jsskQhy&33yE03Rv#j zRFZ)MsazEd-2k}sR_U=vne_3Xo%QsGf-&Ng16aUg?p8o#nxU(%5}$MOXeJ4^mI~3h z2)>?rVAUJ00C$aBgPmsPfDxL2wPNN882%dk#H89A*5LCSdT}fxjc8j_R{1dj4l^5! z-2*SOg6(IO0OIwp(K@&g|8wgMu{EG3+y`sbY=s#`9) zLn+bNqfC4wcp1Qy8&i573Mtz=;4u{@ASJ|8>A`B0*2hIsC?y(u^e(*_NgtX!(8oU0E*%wg>S2Gh_a6o#>s23=HTb#Un!6fILl> z!NEvJ4U6DWeS;IKHb-r`+*I#04Je>YMxjn)0LkN`3#V^Etd6_npzLUDOeR=-IVD_G zc)&s2IXR}962Ai;(^~@4hl7Y<+zFHtpRqCTf|>CFI%Aa69q^dB5hRkpAM4@-r^%f{h$dMmP$W3QhAjWR&e5@R+U>FoQ~JP3wnW zrHWiwwBLnEbJTLkMkYI@7 z2glNe6mFtMF>>!}M1q?`jg)^M@R)TJK=!jMjCQdYH5VwYlYo_KbYayTnHI`=QB|w% zM0tos3ZYZgBpw;?nBo*bTDdD#yVzhf7gnvgu<8_uqhxjH4?193mNS7~~_oU67CPWi(U|8krZ=fR0QZ6J?fW3TkA}=}^Fj&XEqnGBmKc(&iq`o=B+pE*4`7{vB<{g;neR zol?~veD=?P82Be#B>FcgM3w1wqb#vx#(PC2DBLX}%xms8=^W;zDW3slH7esS zkA`{KS8pL1ZLtcFCdC_n!3P1I4B%7WM9Hi0*;uFve2htLL@=R5Xjj!UBMpn zMg!8kQIq-&kUZ5uR6^FfJV;Mv)= z3T4M==lb$Xm(F3Aa&}JFr^h$z0`4Ved{HPmMkUuFBwZwjebpg3P3j3KFTGPe=dfWr zJEyLR@@7BPor5Rf?3_AX9^b3;Fz1|$LHQEcm~77ZWh@*%070{+X27he8Nfta{h!1Z ztAAteUPyy*sDtJb29&vkwz;rm6gvG9viNzognT50lP~=Y?`+f0@JC4c84eF<)>A+;4dpFJ~(s`!|N`e2!-kXQz)U{#b9%RZ`6lEw% zWoo)d8OzY5QYua6qPeI@GG!)YtWcEFB%w^DkRenkNt0-hkf9_c`CZq(_vW_O^S;mf z{Ep*0j_;4pKl{Ek~$?yOe#Pg3VUJmAb2fhjaB zYCurcMVl!!tj!b}7BM8=WPHe(}6it0#K*KVK%){>L&d zzt18*q+$vp(8&)^_qS74q15#sr2gfURqg*eW%bYA`|mW(pKtwZ|I2mq{>|C{PSpH4 zX+-;9&T9QPXa74@^XF_E(b4{==Jdx4z@iDe5MQS9wTK4UdjFhxrTs5wx@t4A{9AL0 z`OjZ95{Op)=R5A&|M-qOOS3R1_#e&=qJ=#BpMA)`To~_PaR0j+22h;j&qwT^Mh(B7 z=syF^$V1V5GK@ImGW;o8{+wx~{V!+!YX8@nzf2scK>yv3Mu|PVfmHT`4El0c>fgNd236O^8qhyajiPU{{aT^|M^w^5flGU5T)HAZkFMy-qZ=8Y zw#x*}q5!a(FWdx3n{*WzcuoG-xJ6|908`Q3X5CI$`}$8B|Kx7}qCx93c=qW#OCDK# zbgK1_vvg*7F7y`?%C1&+vwf~`nM{pT%xev#aOhDNCz z*ovOD|FmV^!~MM#?XOK&A7&h3(aVc)FGVl9!B%uW#ugU6%>n;USNNlUqElcD;NM$1 z7W5h!wAZJ==p|-+&Wy@w`J_OP6k$vMJuMoUr<+N`qWlWiA?l!S*irPJw_VKxNTjkRA z=DDI*9Tm8A%(&D`jqrDL8|5->l-4qwUt7A(h&m&2ZcN`{$EAfXS7hudaOw8RrF$hV zJ(Yw@%Wf{+9=UY8|GgEpQ?97}i=PWGg1V1fQJPTTibl(@6+H`F(NuraYE1IRF@Ow*h z6s?US&Jj;capcj@4Ueve$)l@al3UTSc=YqbqvOD%69td9wSI3!?VU%*f!vCoCmuZ- zCr`rIZ{uzx= zw*@}^%<$gA7krTur@*Jz!XdY!b|j!< zCZJ;`p!+HT-9HNGmz`7xnRC_x#sdwRQqJcM0fo3FtMG1oX2epmUdiK9_)wtANg70y>Wf z=(+s@`kVs#c@xmjn}B}a*jpj}{0Zq;3h7u1>3&g2$5co^cS1V0Li+g=($C+oEgf?q z{TvGE*bC|BPDr-_aw}?|Li)M;$1UA7);>bIpApi!OGs-VW((yr=>m0PAL#L;2Hjp^A5n)4 zA4Cy?527X|{z25a148#;OthHoe~ucSkLo3%a4K^G=6whay0eEuwxU)DA4KU2J}?(S zHxwwh%3L~AxLSi*BThp!XoG*hX3VF-{8ptwvw+n*m;vJN z56m5;8R7~bzz7GC^so~?Fudq?0tj>Qj4i7{%NeM2%^dLe2Zk5joM0d36m-J^ggGGH zv;YxBLhJ*r@L+VyoPuswfG~HJ?r8yGu9?o~P#5+W!W>!DMTmF5cwM4kLV!fK0q!vK zfj$6S5{=M(8P+Xi5N2muK0tLo`j$gwTzVh6C&I#g48k0cPHb>I`kujfo!*COIA9ht z$gjVmTQ3xtqW_C|wFc@UF$i-&rg8nhl?b7Y!#q{`{xEhEyjsH`%w1(#q9)S-|KCc4 zaO?iXN`$yG-DpLN@=AlxrlD7|8?aeI&k#jXmAQTVZ#UJ$V~71f7kK@aH&i$ zE-IFfcY}6t-~-)DXff{~Xfgdd`2h+=i`uH#2l_t4YLEC|;(Z%-B%;1eRQnW9%QSyc zZB0a&zEz9qTj^SP_+QL@{q=#?lu(U>x$55^n1Ivz68540oN?e_LNgs_u@7`_M;B9u zlQP*zi%CLSB9S7_44Z<889jR#Y)+=PWjrZB=oa%YKhWKQXtF2Vq5t}U?tew|6{(#G zgw~Pp9wgm0|J?`rc8X@2;c*!K@OK{=UQC8yY&Q6-|6~8fWInpE1Y9AlO{2h zqv-4${3z;>xcE_YDLnir>Xi8SQPf-n@R1ph;73Ml;%7!f;b*!n;0fs=HHbj?O!LK4 z(nD+**}`X`ga8C zyAYBQ?J3}QQ0nlI{Qi6B&EflR(r`QA`|qGb2M*tVhYEB(eE)q5p<{%Hg*rb}8TtK7 z0Y#5~6pWqSoqeF`t9p1YbA)Tae_Cn^zrLb+P=lYuOcuL4lDmn1dNcpMJN&g!O@aAg z?AK8sBpPb)JD8~9i@{J7ANCf-MjX~gSj1c$<|8a3EDj407V#E`;Yt``AO^$BbpVT6 zmN=}5u;>XChv5R5-}A&_xIpITJ#miwl};|0WiT5+9tpRODHr5Fu{_G*G>00;>X78rj?vHjMq&Mr^R8s zZhBlG4pY}n#F9r{H^GvJ(V++CVh7=2bZ8AH4kJstFBFH7B`xB_VPr`U@x@_eNlPVh z7+KQ8e{mRD(t=1FMwaxi1Y$6h`~sL@31!CMcUV#XC%!kbq}7r*j4WxtN*qR(v`P|( zktOY6io?i~)=T0rvZS4QaTr#-bdnT@ktJ>5iNnZ}w)4bbs7nDb!4hg=fWjbH z!a9lo6D*;e1Hi;{3Dd~|CZ0=J4-jCY_krom0293rOrZvt=zU;jFTg|}3#+sN%ziE* z+ak!y{nIE>d# zt7tJ8rriKcu!IRQ023@xLoiBP{2+LNwCWazF$}b36NfPjv?vybkq)iP#bKmFD?M=- z=@4oLObLXESi%eL023^sMlZkwOKl7TA#z{VatqWU!bFQj#la!8 z4-8)rCR!{i4i4>Li=7e{Q2>}=i9&>ViA8*GV96o053K!$F!5ZX5aG}R3-N;>OG5jA z3ymn5}h zmP!GbV2OF2LuemO%<~*V`(PCefY~gu@B+Z>SYojUfY~guE&#mG$ZoM(n9wLH<>{x2SdSd{yV~G=V0VY^#;yod>4^C(}QQ4KyK3Y_ECA1H$QjJ$a zv{)*;(k|ogM+#Q3hP?^x1B<*POt7S~E1`X0t!vzyh$WR>3GD;xVB_9IEUD~DXdn2s z3il>rNhMuE`@k<*xHl0?OuAe``=DX<%d!-^Czy+wH(kYHV96!45BxBOFwtT$7c;NP ziXQ}8ESJzeu<#+m1WQcO%saMX2f-B0CA1GL(+M!4ec(qdgo#-4kR_pgU{y|piCALh zW*l1aD?yfo_JLo?5GI~W%-qZ?!D0u&%*`dV57h5Rn205mT?YG?=wmUVGp`qm9~)T` z+6R7mM3`WS37v78#Selk3GD;R0U%7U#5~Wu$Sigc%=27A`@m102oo$Z&ogg9iys78 z650or^+1^DeK7qquTYB}1XDCKy+a(PPDwnMn4-Ca_5nW^VWP!i=H?RG2W(!136_|m znfI*4uLSQPp?$!iMVQSJykdmeu>|85VfJ$g#x25ZmSEf>%#I}(w+ORYf^my5yN?Cq z7GX9^Fm3@Rv=11!2(zC{Fm4ehSYn>%650ohTZ9RgFfRyTf+bAp1ejn6HA4U4Z;LVlorhIGQT4a#x24`EHV8v6OqLCrcOz)#PrW4v=6wb z2oo$Z{c{QJ19mCG1WU~G%vP8i7*jMOrt!)_W|1xVIr28FL{La0oxH_B9@phndvWL7l`?iM`$0g9T6s2Vq)YG z+6Vkago#+MI)n+9Fhdq#B9=I~<`LQld^&`QSmNNCM`#}~8@&Y2h;OpH82 z`+#YNFu@WtAdk>KV449;Xdf`m5GGh+2ILXG513{M6D%QRg)qSq6C*RDPwYxCG4crQ z0}d9#M2p1?$V>+mI|vT;m}%?cFp?*<5BNp^6WRxSBZLW-RPrKxA25h;Z-OP2r3mc< zvv6^5B9=I+;}O~i=ISC$#F9#0g!bW3$&1iFU=YDU2<-#&e-S2FQaO##K41{x-ULf3 z)e+hU3?kf{U`eGqLi>P0gnJV#@uyy9mZn%NaeT?V*Ch@EOJ**oI1DVAshz)JFo+Ol z_p$I!8^UasU=Sh9?qk6qLYU1G3?hWtEfx$SgxM^?AVQek`+z}&FgufgK?E?NeZU|> zm>o+nh!7@NV$$Uk+6N3Ggb9|IbeT8h#O@#_U1koeIE*X_?E?l8!URi9x_m zp?$z0LYQEQNtc-wD|RKAbeVVf#9?GfXdf_$5GG=YNtaJ(A25gzCSr+6mzjSneoACX zXdf_$04B5#7(@sYEHM`|b9cp#jYC>yDz7+WC5}e< zgzp1x4Z;LVOuBqR`+zM2Frj_GmO+?ciMg0hXdkd;5GGjS*p*LcAFyQ*CSr*xnosyX zV9Ov(v{)Rw@(Jw&whY2V?}M3}nWHUszcF+33GD;648lb3gM(B)p?$z;L73=$aO}z_ zv=1092otfyu`8d@K47#UOvDn!0-w-6V6*^CXdf_I5GG=YVu4R+A23=FCSr*rT|VLa zfYE|55lhq%%$#qr`;8icPxwAyv>;5dL=C|wv=10902A7WiyDGYXdf_I5GG=Y8iJX8 zE_Q*aA^3#$0iy+Bf+cDQX6Cy1L69Y(eW08M!URjy5PU-WK+z3=3GD+$3&KP!(WB-Q z+J}ojBhypp#fF_=v>?oGv0$_y%w`Ej3&QLc3q}jV?B^1U7KGU>!DvC4{ak|4qNX4q zd>=4c5N5LkqXl7hEWv0&nB8K*XhE1@i5h|_x9~e?V6-4iutW{P6lDQxf-u1nH3U-*LhK-@Aq0f>0iy+BB9=IC7ZAP=7%d1Bu|y5Q zRGbh$C9)*64;U=~6WRxi7KDjdqJ|I76R|{7 zfT`;teh_3yXdf_I5GI~W^a_}wAmRr>mW1{JqXl6imMB}8iX!3%L6(H}0iy+B;<-fG zA|SL67%d1Bu|zc^AhZt{EeI1VQOz(VO~ft`)r^49K47#UOt3^X!_-3&I|xb(roNmw zjHe{D54au(6R||EKtO08a6J$vo=a350z&(My@4>%Vo`Aj2;T?n4TK4ns5k_K_5phX zVdA+&#X;BU5Kl0uI0S_D0eb^sB9^E)1cdehdjnx2mZ&(G(l2878x@Cu&^};qAWX1C z#UUWH57-+B6D(122ng*1_6EX4EKzX?2;YZ?ii0UlBX-@WI0S_D0eb^sB9^E)1cdeh zdjnyDB`OX9p?$#KK$u{Oii4?Umf&L`%P^fiS@m?Fpt1k@&HJB~zA290rz5l_D`1r3F*8 zNE`;1ObsJ(7-GqkG7^W8CE@#kkAX13672~gp?$!|K$u{O(t@duBz{U{NoXJNF%TwV ziPAzyXdmz~5GG=Y(t;_lBz8)a7D7V%fRBMN!4jo~kkCHhV<1ehM0-L=_&(rcAWXDa zlomol`+$#uF!5ZXv=9>72Yd{KiRThEgplxkz_37=V2NUZsRbo=t57TmiQl}yfRUQ1*F6dg6UsK{N@E-1HuGL%=1D*`+%u{Fu@Y@ypYg7U@9O?ute8FNccWrDj-b6 z5?u?XR+ShXbS;?DRpKzxA+!&e3J4P{Q9}p`?E~%s!URjy5KMI}u~VXk5E9x4`~ZZB zJ{H9SQ(8;>Ab7tC?E?dUgozf5>0d}_9~j{yOt8fCFC?@NjPMaASYrAY650nw_y`lR z#PrWp{t}~u>7OYCCJrMV!uNp@KEeb`%=1D*`@m2hVS*(lbf(sr*eNlg3klx`2Il}1 z+6M;b2oo&PD-aUe2L|T|vs)|-&JkummoPX-n9ULf=Loa=SQwlm%w`FLbA;J_EDX*O zX2%i+=KvGh2L|T|vsuF69AS2gg~2((1WQclLc;ff!8yVNOHAlOLi@nr9ASbbmCy<8 z1A}win_x*LbVB>U;2icQv=0o<5hhroSHP5r``vtCaE>q$OY{nuLUQ7JBTGX2z~CHV zf+dyE3GD-ebKIL?i3uHR1W?5U#Lo#d0Vkq~ZUNu~QOxOp6Y<2P4md#-vpV2JL@})c zPBdK1>wpt%F|h+qG+oT>fD?Q%&%$&}f-fdozzM$i${XMWU(CRO6MQiR15WV891J+Y z7n3mH1Yi860dRsZW@o?&zL=f?C-~y19p;%5d@*kWPVmLV4LHFU2kw9qd@-W~PVmK) z4miOVb2{JzUrg$N6MQkN15WV8v<^7I7xOwype6WXVh5byi>3kK1Yb<;fD?StHUOO9 zi#Z=~f-fe0zzM$i69(V}UsMBt6MRt)08a2lPXT5I6MRu808a2lp#V6+7i|T=3BD*5 z04MmOg8(?e7c~Un1YZ;pfD?RCMF39lMHvA&!54J|OnD~wqL2Wb;EPHEaDp#N3BU=y zXe9tn@I^5JIKdaq1i%Tts4@U2_@c}JoZyRo0^kH+)E_XHo8XHA1aN{cS_*&@d{LPI zPVhx(0yx1JwF%$^Ulb>Rv-!gCnZnt8Vf;+tY`!pnrf@c27(pXWNGKRWQ#hM1jG-x< z%@+pI6wc-gqi70e^MzqFg|qp>IGVxi~0|1=6MWGH z&;%jE(pNC7rEns?lsAEDKf#yMEl^XH zef^Yf(IoU040NgE5PT`!!W7OGyG}~CKrK=B@hN=*)wu|q;zj5y7}nx>34I0QS_&uP zOX(A)TCe!^P;n&m6%1{u;}G$s^a&KgWM3zxPoVMyfm3lL^c4(m@%V(kg7Gbd6YZJO zCrl+_vFoSw2~-Ls&P%mhLSMlcmpVQXUrM(?1q$LgRJ$eg6%2FnIE21}aV~`u@uhT& zCZVrjq)Y8j@TGK%CZVrjtV``r@TGJMQx93}{!qF_lh9XCRE|0h!I#o4nuNZBkuB~| z=qni7QaHhv(kGgPzJkFmwLig^(kGgPzJlQ`wLig^(kGgPz7kUU1WH)2<4EZfO}4&* z4w#A~TVDZA@n!2Pz$w0LeFZobN4CBKoZ`#YSAbJ-Wa}%yDZXrd1vu4i+4>4bcGUH= z{VBjj*UySC;G*kiJ->ic*U#2hfK%7c_NV}-uAgmE0Zv^%+ob}Wx_-7z1vu3X**+EE z)N{u+svrSUeA)U6aEdQmUja_>W$P=zDZXrd1vtf*?N$L!T|Zl20Zv^%TVDZAT|Zl2 zL87LvpRKO|r>>u^uK=g6pRKO|7hOLQUrNttvRy0KpNbb-Uja_Vi>4_(e)F2an6J$RO9&bd58V+`nA~l3UIuB zDAPggkJk@%I@ma+PoPi-f#dZ^kktquZ5zEG@#z>%*OTVH{2L%v#U zeFZqhm#wb=r}(n<72p(Kwtocz5aR_40W&2lv zQ+(O_3UG=q+rI*w;>*@ofKzc~>np%1zHEI3!kpsE)>nX2eA)gL;1plBe+4+jm#wb= zr}(n<72p(KwtodU#h0zG0H^q}^%dY0U$(vioZ`#&uVBDI@n!2Pz$w0L{|a!5FI!&$ zPVr^?SAbJ|+5Q#a6koQ!0-WN@_OAe^__FmC;1plBz5<-$%l5BeghlaX>np%1zHI*r zaEdQmUja_>W&2lvQ+(O_3I=MT^RoLZs>UDG?q&DSFhs%rgwR(Y{Shbh6-a6dXZO#V zl&*lkt!6B&q3BHsL(IWH}jMS+83BHsL(IWH}l)k6-C-_o2 z1ZtJA??0tOvgubFG1p-dQm(n53LJq&iHPC#h_!9aGij-5w zC-_o2gjokd>^PJT(IWH}jMS*(5PYfMeY6OD1tT@wpU_vDly1=?^c7Vz5cVhdigXL1 zuQWxvh0s?pQlrjG@D=G6LSIq!1mV0yd?{arsC5k^KB_$v`U*yBa9*O?HSCY^B?@l? zj{PA~1{-i}&qN(;z%jl=A#CUdMCT>=Qo4dDg$?_Q&P(v6bOlii8}=8Smw0|D{Xmq% zhVBQS7or|E;MjhMg4lrL{Uj=415WWG^c5`bL+wxSrSt<)6dR61-A_VaX;S)uD2omI zWBY;fD(vT)(ho#oZ0J@gzJ$Kgr1S$(8XNYf_!9a`lhO}FactP1;!Ef&O-ery<*{LZ ziZ7wBG%5YSEZ!^jyi@vtS=&Smr}P6+A{){L#h1`mnv{MZie$t76kkGLX;S)uD3cBQ zQ+x@1rAg@rqEI&MPw^%6l_sShh*H_GKNVj>U%|)-<4))+s(>Nj?0iI3Fa(_4Ur{9t z0cYnUs)ixp?EFg=F$A35o~bH^fV1;2RmKo-_VbHNmgDua`)3%TP&m6iYf*j$Q8pVF zb;A7#eFbYgQ8>Yu(iKGIY&Z^ep9y_M6+eXI6MQLMK@`sh1DNVJ*!~sZ6kkGLQFRgF z_yk`{R}clX;W!ju!oPx*r;sn9uV5i63Mb-A=?bEVHpm~UT@n5jRUQ$JPsEqf4@4bp zI1cq(uwO0*Ty&iTUn=htrL;kIQO_^oUr`kcVX+D#zEplEs%gV*Q%gl%!pUT%nQEh7V42YvhUx_cmA*$I-FT!Eu zybRXX0IfvbMzP&Qi(vh+YK?`@O5df_sx{`Gp0J|55iET{J=ML`e=lfb;<(1g$kAUx zlP8YCg@}F->!ofm1J}J#0K=S8gkr0Mh^j{aaZ0_#K8xKvm*b(9!y+KGdg`S(f>IvQ-EuCgmbC?NdgW*wdX&s0uRcpQR3*a+-C(W zX#Q{)VePWs1TopOub_-FvM${yrmM z-MpeSL1yuby4>So_m{m0GhU#*xN*3a_A>n(*8^RY7BA`AS!sV)z0O_rZ;jg2bzqd# z!2X@X;|9)*d%VkPou=xTXSM})=N8zFC@+1nAnWUb6|UFa4@+JyUYof8zGs8BbdR?U z*RvkgwY2_Nzu}8m ztACvH#cBMlZwocnud6+>zWBZ8qmEIEx|0<-i+w+aHwS)9&wf5lUD3rmuQ7AM0e#N= zuNE1>uFu>Zev}?c(B2|=G@#(~#eB<$I#a&C*xB3d+_0wI6EzhxO(t&nymHTSpX85O zXTL`lP8oIEPhPP!)_3yQqbh52dg^kt6r)!EXe?W6Y5nx)4##s<4W%jTevGNhI@~dI zv2e5dq{_0w;;B;%`z{e|t!weHElO_~aU{@WM}qXj_RfWaLwYEW?p$3x`0n|_pp^Zb z{Xb^h_8Ij#L}uKVIKi%~13hcyHUwX8?IZil+Iq(8kdlHGrzbatrEWW8ocU(DvV?Ku zB)^{zvs|RVY{R5Cwdc(Pq8B`p1&O0&@YbyUfW(aB>KGDp~S`pZ{h(!MuS)^;2fc*a!q z-8&>kHsNJZf7gN1-(+%j9C&xD|Ausf32J(K+(xZFuvF0R(FGlczSeIYuiW~4&&XKO z=C+>G0Z0BJ{hdb!|7_@!b+~$}+(Q56=jW#WY_5CV<1 z#R|?nEI7s?Ym4vP+GDJ8=X{Dr{2qPtPqKXydz=YAW*}=b-6~|xGGYBauYM)dWEQXK zQa@_<;V+r<6LuSqT2Q5;{Yf}%cIj-ZB^})gP90hqvMwVlo?D#uRc1-P+=U^h?Dr~n ztSu=S{88CX^RnbSpCvtI@82B0>a)W}GcSR?;qGDI`l`7b-!U8iY{Aa{*ZSY`{kCe3 z%PG^HXK(R8`tCL_PMqdo>x3vZ}J0zNfY1OA;n|UfE)P`hs0Z^c2f)Z%ef=)NGh8`IDclx-X=#hPzU#er01? zceTU&mwV{z7_B#su+rUr|N4fQ66+j`^N;^pxud+P^2ocTOZN+ulK(0<686@pYiz;S=%n>bg3~I*V@T{NaXeq@9u9RbGrB_mQ34l-*10< z&Vr%UbKi{2-nDFUU!#x_A9rz6de!fT1FLBm>$XQ-lOii+vs?yIUA+g z56$XOj0;(H;z5&YkH$caiQQE0ZQQfTuVc`(P0e*}L+c`4Rv!O3_h4OyeYN)`htl;s zci?0F~SYskI9{R#aH+lJNjnpJ4tSS%Y@@uUiF<1s(0PxGU2Jx z#GlG*GCwa2O8Pu0Rs5->dG+=6tf1mq4^K=@c(k(P<#u8IXX}$4 z#vj9OYQN9@7B^}AU3;_Ybypi}Th&`KGJe!Xt4FT0srcT0zApQbc6O6S9n z{?zlW&XZMD?{|Kdz7>)^B)={D@v8p$!?y%+D$w zw`ciohxm|(=Ys5wvDqIZz z{=JPK@J-@Lr}~yPZEb6MtjU$mv(SB6pY1m8S#jm|kdD05j|z+X1qP}P{;qkw-;u>v z&h1la`Rmz@^heU}!|iTtJG!{bw>SHE6~)_Yzo)EUSam_QH6Zy%n_|e%Hv`8MI(%_x zn^1Vc_ELDm;>C(a^T)0mJ>{I?yz6lu79$R>u+TrJ+rcYbd2~`q?Yw@;Qp*1y{`2LNj!E;PF`lbz1h?aFUpU-^GN8E z7ayM-KG`+a-e$l!^|9mCBIeE$ewsU6bWh^*Tr0;TARl|OL ztW~;esl%%zzkx{~%v2-qRXo&O+6#?ZlYN?|P?>TXE~tb;}P<*59I}A`-W39j6?1Pk-&iXI_>nepXj+ zJ^ql;x7e+IXoAPNTVGA;Q!iFrw03SfbHKuOSU2Cnz3Q$6m`*p5Q2i_1!eQ+$DT7Dp zeJ?9U&@DDTd-3h$lhw7tmiVDf~%6HDqQa(#VP{2VgM z=E;Yh@4Qxz%ZgFUJ+iby(P}cs$Mktk&$?@gx2~2=F}xjeu9vB=wdMB78AaE&7PrNx zzfj(C$2hu-`(^p&Z108bU+x~NJwMPg_Vc4H-Cg@%*VE&ASm&92f83~D9W=IlLUh2J zdG_UIp4=s&Px*__YFAfQ9vzxoQaO}&X|=AiTM9RB!hD%=?!5|g<*e&g8sE$^T)ozN z<+XVKDB~X+j?U>nU`OBE&TA)*_?D@yWwR;d)631VE6QhDDNQw97I{W!T;`wuX2#yL zA$7e?YU~qVe7IYZWcQRaP)5sDr@UxKb>PG7pt1WSuC>m)68!4hql1MNdQJxuZx<&W z@>QIdHq0S8C3NeGo3;nXD#Uymqc=-g>Zkt~U(F#pIa*;3${udpE?YDtd+ht+UT=K6 zn|-TAwxX%eTY0mY3AZ+8OybQhI@3NS>3qhpGjWNAVVNn9D&#L+Tkdeow6B$Kan$G- z!zA116LpMBt?#;Q4J@+ESZ>{H7GOEB>x&}+(+kHcX{>+s)W^C}@~_lg#}e1P+ESu# zZBwK-XINr({@0qmHK|3(u{B>(%J)c@zX!dN+p~}6p@6^AjjY%9E-dLY$9H$RucU4G zuB97iXs=nN>(p!=?#)-8eQf#xNu#g>i91JMbQ-tfc30~@-O4XM_&mgFx#1f50j~_l zs1(`MCXd!1Egdspk5_WyT1(5Mq5CQy$K~92_FECf9kg$W&PBcZ^?CJA#%>sM$IUuv zX_BJ%>20Gg%pYyo**N<7o&&eN!*ZNo6xA%K_3&GL?bgab=@Ig?_ie5ntTpiXz1In^ zwmnx`rWme2(aCg%Kr5RYQFA}1&!f3j#ZjluEh{!zmcC7Cbw!loiz_yh4>WnoP#RhE}2u6Dn-KVYuKRdYGzoMHFN)+}@~@9x{@ zV&j=8jbpwK`UJ=vKd|^w)R9>0JzK7P(vpY$jblaK?I8 zq2(lp;6s1)+&|T~Z2$SvA9c6aapc~dIqh<5eXR2N7WMm5r%XRb&T?-#x7k?D~d?ozEX`r4RY|b$+XMWzF&% znO!p?2UaSbSTps0_ASr*2NR?&Y`b^18z2`rN8&^s{th`@&=*$4~&CSOLS1Nm*`Esm!>9Vfecl?x!$a47k^NLxP!OX)l&4#6l zJgHevZwK_+ajxAzO~GNDAVz9~WyhrG!AfTao67h%Hn|*r?b6zGqp(Y?kA>4Uwd=dC zjU4jH>$HVidt?2WSHs+VdjffBW*sRan;YEH$DZ5(d9UhY)>y)Jgja&8HHrX6y&r8GZ<|FTG*o3X3^sfcktJM9d#Tvq&4`sm?3ZFir9 zs#6a-&y)A_m2)7xX_G|idkS#WGd z;^YvUP{U})k)KPt9R9lTYS*)0p9PW%s5Kpe#iZ$8nJ}S+i!Co4stGnG=g=Zd*JmfBA}bi}U*BMuz(1ox3I4 zr^_zd(5-h(!^7yYG9I>Tighoo?dulV-KcK**)t`DwTowVRICpV>ta!HIlU#_W|zQn zoUG>niL*R|V`m&~!)G+9u8J7)^SXV~lkKT{m1ai-wXV9Durl?1foZmE9+INSl~R%Z^FtXZg17UHtmco7Yz@p4lAhVmr^l zVou4Nj`FJ(7jui`;#c0(@3kj(qhgHK)>zJj{ZgHql{U>=kd*Pp)xBcP6F2p_kLz8p zztO9@75Aua)Y-=_T1P`Q9(~*UIqLJsZLzI(lV_;yT0L%~y0@W~-=tNhp9^l)5AxY| z6x6IjaB0%#c_+Gk?G?IsU-#Y;y>>Z0ulg%CAUqddjyWIGm-ooH?Ti5Qky_}kd&!6{s+ETCSZ-0D9<8G}ew0AU6 z^9>2Q-|;r%>)zZ$VLx_DdbmuP;#$2?CpFXWZF|BH?~9uaI>rU~7k`Rs)ww1UV;ZL8 z84+N$usSu#Y_(;@YrD4v{Of5MwRvYF0<#<}IF@Ix&ORf3$>~VId)FgJ8dOcfHCJ^M z%}$^4;`P+W+-P@`WaaU@BVFrfOj!kjaf03G&l6*gFBN8IW}o*zVUVWz;&ypM$mq7X zZ@j7vM~-jUH~hnsX$J>|tAF&%BemVNeG0VQRG0hBvEGld~?FEcEgQ|e{nt?8nf$VKh=SSlLsr@x){E}JiB-EWS0b) zh0}(Vl*(P1Z+7yrX1D!T!fB%~t6kTq*b-GXYu}W?&YM+6Y*BFzIQ>_If2W9@oJlvn zPnK?#^4s6fU}#uNuK{<}Gm^BoruGX7a>;k>DQBTSc`#pUcI}n6D_%q8ck0N@u3lrc z&dNj8Ltt}hdI(Y@_j+QtSTG)Q%mQR`ax8C`~ zbhdF9-g&!vWci*ojd5I(8$W%_A|(YCcjbVdTW4HXJ7ly;u4k?Oh}+G(6eNznjv4iV_PD>i9>3+$qx&ba;{EbtTZgwrN6wn!-xhl;qH|eUR;TaM7ne^R(3-6t zF)7P+*5~A=%I_btURYT9J<1x%+xt?^b(-*`^223EjkM!V$pxow+S^0n+oHj$8&577 zx^v!~nfZDKcej`wey-rR!+2omfTf)+;+5X0>=dMIelYDuwPfnr8<&%chJQ+HvkjJ& z{Fd5%|CT$qj7{#$UNooXh^!kS;d!35jtB- zRX7dRDzFSo5lF8rJXV-qU~^R7y!>U#&DS*!_van%T@o+9%pm`Pmv#a)RR6UI7NRGnd`4TGjK+ z`DrJM&KN(QWomv%TE(hQN8f=~JGP!Tn7iCM<+ZSK+3U9bSyicqyIetRVb#T< zX(LHCy|GiW$-0E?%N*q4Uj2xQg(bYZgu6nwDX?Z`^wZ?y>0W! zP3ST}Syjbx@A+rDr9+z>X4EL28M{L-qjf@f)Gn#a2~~zG18-XTC`9SoWxjQKq_3wW z<9&SX$^C_EUVRy7zfeW-Xo9=5vDZA0z*8ST$hH}AE00d%pG|ju^y)3wu1lhISKhes zWxg$E``x`BmpEcgs{ccacbzSCCpXD`v=5a`KQgtPyYzMG^|aV3J158YFNEjLK3;d5 zx74QLZu;fs+n4)}&r`QcTkdh^+MPkOrdvFF`p|J>zj*I$w`Bb;*d%Yb-D&&0l-UyL zdn&aG#?R6>-Z;Kzx^&;sDP8C8y}0#uOlex_Ur+Zay*ZzFeBj!8i9?@q1nZxMshiE! z^{!M=R@!J1(^=`V;XK7a)f!>+$rQ_)%tz8M-?{hZ?keBDQEgGsn%LK?CzgGCI$x!t zxl}%6fJroi`Bn%q&^9`7yG)Py@D@7V6}IkanO znBjs$7BcUw->rUUGs*<2cqpHoiRUG>~ zy_=(D{mGT-8u!jtpI+J}vLP;b@ADh4hvj-XdFZdc>LZ^&(?B&|UFBZrlgMPPug&!z zo;~4C)DN98PJirilYv@2y}Axmy?sHgJ}UmUc3$PB^X}E7ldlZer>pvjJMz`(0o9Y9 z9-C`qwMA)=d9BXEVQ>7`6~6y=)JIs9sLMSjW1OcKAG)C_S2y7Ky@GomOup_*dcSt% z?%q=y`g)!V%k;4e9)Bh|x54>2Z^P@hR*PV@FsruKQ#rZ0y8cb8g@b(V3N(TS9z1wq zLsp+l%Dt5zJNX{9o&JJ%S8hf3m_8r+uFg8fHLedWn7VaPtmT;}4iaWJY8^AJMwEti z4KvtkP-JlI;Fc{)Db4fG?wGak^%LWX2YQCZ1Z6($GwZC8QJVcc<*2xV*w^lUS7TMa z3f;E5J#{iO-8X*dCM$_R3HwdjIHj?{Qb^FKugge$!=9a2*l$rh+4Xg} znM_7upv(8;j%PaU{n^QU{qqQ3fZp|0^_#;3ruN&=fQ0wx+Z z$zS%4e-@L|I!q~I-u>1xAH9jCTdS4@8P0rLePeK)?wuLMcZ;26Lkx6=)XY9z-PSxN zM7z(3HScEGTk}?q`!s!2jQO#EwNfWG86N0g{G~QnKcNealUu(&APqMR|ZRh0o=yW0fc_UBIXGnf) zj-1Ici`|88ab8wt%eS7ZS|K4Hzj4>hAjSMKrMxc)Xp%Z^5eB|5f zb7RK1o;6ml4_p#hxicc_%Y$c&Qkq`J{|vW(GFNB$Oh-fA`nPR&x!T4b4kcvXX$nYi zn6T`^*6Wt>DVJ+c^%*qi-3XV6fU*O+!TlGWKb`(QHr@Kjq2zLZ3+I*ti;kZhZ@*Ih z`qh;9f`(+bF}be2{I8#iJ%6vWds=HNe|+SWRSo4C8CTzh)RlVsh z&C6B8_eGnAz1-iktwN_FwKA>H_r{$|!tKZR2}&;2oT{09pk!J>=ILyMB;_+Y+j)f( z41;&(teYvd>_DF>MloCSFCR}cTjFigE>j|PX@`qZeDdtXW_Pa`-7(9rFSE8%Ez-Jv zZv1(bkkO-e`3G7&{T%q!wMz0#&b-axc87j+&fI->p?7_t=E)TYc3ruazu9Zf(dq+| zg5>4)mo>XcEVO=?yUH)~lH*N>M7^GmPM2Rx^>dAmEOoIf&Ra1xBRQ$@(!t4*?e)#M zrD-rs&;#!_|Ltb(?q2m-?Fxt3MH$k$QgZoAULQb2inyEi+Aa7%@C_kZ}FV z7mwd+c~)P#CM*l@V&U>^WqjjnYi)Wm?V5V;0e}d%TDWlCcxmIjm zGecqajg3!*rvk=q+bNOe8N1@;)DBI%?=J$ZvzlK7*cVn=^|&;2J8$8|CEIgsIWzW@ zOFj8%8oQ%4TrFyPq8?eBV55bLR7VBF)j@5P#XABTmd7`=#|-Ct?T zPS4&GX81>sw$ga`F*(-mjmHBkyG!%^?B>h5ZM}ZuT9Vz_fU`-azL$3;o8N4xS|8%K zJ0-aH=j&xohiu%m%kHcgV3%v9{cPkk{f)D@xpRZIYNbdW8)IP^r#o}-6sy4GD1#*t z^T%if_t?-stAD)V(|22y4$SUfC)as{!op9UbDvH~TbO6>VwNcFHtygct=J`>G`}C8 z>t`<5t!)dKRcM?8)? zU$-Z|XSb7|zs}2ccG);8q_6kAqh%7|7rp#4Ro5oUyq*!OIBfFHu3u)~_U>$;vS8)> z1*-+0>u0o`l=Qp$^5(kd$Fs&pdORHbV2x7H&WXn+SlpY(+2l0$YwD1_;fv4u-^h5B zo2%9)lfLK3v5E*I+huhFD+jJ!*~|EIzu1~f{SVJoP7Jkm%y%w}=&Yu8^}f5yk+N7V zQ~ms4`&N6uK+D@o{Vt5%`#HRA_`xIfv0q%1hjoiv(YPga*`97&r}D~Mg7VK7tCg&C z^73nYZ+TJvqetVcjvqOja%@6N9*nDk6bD@T<&f=AnfpP`$=E3OCCP37^%C&zk5r@o(*F>X0{%g6LGlCGq_TIMA6Ic zS}l$RAI4poymUjihWw2m2AV7y-@DN~-J;$@r=}#mA#PTw(in63n5u%d(_fX=YSp_* z`6_Qx?0Fz|uu#4>zF9F^v-q%NQ^iZagS<1-de7?8EWb?e+~UU?E`sG|Lwc9;UwR%4hYJvfF68utsNanU>#q#9xsb5EYx_IwKPh<@e?N~8N{u0xVLvqe`4SI2YZ$^}JJs$z%8W zX}^gzJ63YsK+tCYsS5rVBF)#*Z&v;wJrLqRs5tKC(XZ&PYqx=ZAa=mL5CN>sH;2&wgX?9$aD~DYa^# zsr?bvt78*5$1;2#sn$%mHrOJ`d5T2B@{el+PiOxyH+Qdl5qq=PqhJ2DceBf68!E2| zxEBub+Ad9P3rc%5d&<-zS2fPTph(r zj50bE$6c9_JoCu5`*T+wIDSvrWUA`B>Cg7PeN?ahM&i1z^NQqn8_5BCHjmRtn^yL= zsK3=hGm9WOr8L`Bfq$vpjGx!OYTYdF_}b2?8=JZn49-`rT% z4XoOGe))>*qh$jUiuQ7dUk2q$-R#^6~b3EHa zd-<-7^=TK^x$Ew*ua3N6Qd^c<=9s;p*Xo@bC%5*s%-WTZf6`D(Qd6(W;j@p%dZiBC z_S!XyQzF7_mnDa!-a8*5*m1F+++dBP!|eS^7I=DImi+AAEkFE1r_DDUc1V<8+`;$PX;UB1O&`^6m&@(yB70PR&Aa-373W;8H)fRQmzizLu*mp2;9XO6e%RSs zwQRklwj9frgpXe>Z@<1~9`ELGvIwcJ3rEQ$lO|uVw*wbGAUd_|z3%=$LIlb@WkG1a&c4hro zIzlmI-s3EJot4d(rM2#FA0=gQ{`k^??VW3YbZr|iy zvy5|A#VoJNKEAo%)0u_)6&BnWSR1^vef++q+ontyHOl|(c>f{GCZ3wAlCp2;=y?hX z13pes{}OO2S8{6eEob#N8J}JhE(rY~aa1;Gfx?1sxsr7mpRUQ?%6Mb)(OccMMK?%x zS8(QZPXM{TE&Ja}Ko) zpDwI0ec}-{EaStVQh&doqqB}J%(mNeN&VSuyQD^~M1JWl6LrrP?Q^$X*S~iBzNY7b z^vbch`(*=9_ugB)0~1%L0h1lcu?w)g(J!EM|nyLa|IjW-fw0^VJ}zQF2!$jiop z)EYbeUB`8c)W#eOey9{Z#M{%z(RawSFGI#j)D;h3Q9EU+g@U24zMZ?h#H-@b8CN{l zEqz}xF+?-uskmw?iknE$Q&Z2Yc=|+6=P#x=%H3 zw1JPL|BpdYGao$M+q7j@D%aM~e((d!OKxHLq2a>|ybnx{3(%dt%D2<;YnlTDX);T? z$@V(r_}6?7Ma#S0s{b05zHyOMbfv0%KydWkRkIGyy|l?qKJCOshm@XA>ZeVQv#iur zidHf*9>3{8=-ZxQ)3SZEy7|ngTB7*!RZCj)&F!mFHN8T1Z@FZ(*QDRBNw?i5+TUAj zbxF2Y>xH=!WlWz$`M+IQe{|2>S3?vhoQ+If z9=XIDNp?GHVU)I)7xdCYdc3sGgtL{Wzs}@NJ?s@U<=7`~wSBu|S$$5?y~y3`TI~zR zKMGn?WzgTWqOm%xY=eeZUBAoL`Q;s@H}Wrbal8^SyMt5e?{LcDM^H}PKKH4sPp)6$ zxNzN@y15Nj=R>Oo{cMbq9ymNTdvSH)tOQ4car-ni^JR_>xn~y16?Aj#{xZ_C0>q|4 z(d*Q^tKv`Sa#;C62_M^p;Cqre`!I>0-G@iRWU2BQlb6 z9ys4WbtyjB!r6ST(SXCdZdg5@KdngOWUJ%HEe}jaVUXJF@vl zkLTGxyG-6;zg#nf)2My5YRm9#N&DtUUbxUD{-i)Ta@3WA?1p7iPw_)!3g!&f>6X&- z!{+WApB(O_^(i>lxYIVLMdvbZ&nt5s%Go>ECg^;&{_;~CFZnLBdd-T?E{`f4u%z+W zGK+NQ+djFcweBYmDAtr+Wo+JOPikJ>OZnN^eQ&-}*y&z8aMsMiogNMfHm$aE4Q?nU zk5au=mOWz9Q$P1^1&cQq3`~@Nu4ECgp=OhQgH79G_jBdKvFWdpV>B9%#`n2gF;p#R zwag11|KPK|*T;Pbed6y`@;?1pp7!3r?SW&|6MgpnQ0Av@e)#y=XVa}&3Vo~&ROZO{ zwVGxrF==kM^xcc_`^OzFI1%%BL01Rf z^Cg=zj@W-#-NWvN)+)2Yk@sgw+8P$x?I?V6=!9`Y>frG`PnC@e7}w8kewak;s)}3N z4KABxEpO8+w5j(=F_sNXnr{>(N z`1<6BIVXGa`8kX4L~m#~{$QEGR^xXMLNlZfGz?O)&pdcmDj;07J!Wl9c2J1=$e${8 zhrbmZ?w90|;puBo8#}w~p@&1|f`b5?AaFS%cY|AbYu9_H?O+IY#PX!q`mQeR9=>o=!yhh<-`shv=68#z2q-O&4} z`X|c?st+{eH7+ie&fg*HSmyk}J18=GOw6XsoDnNBAE#Jz%@UoTxfQ)H>fyLUGFVS< zYVi%lJUh8->T>6be4MxNr#^0B+)@k3<7L)GdH#{tuAO}3)~q<|H0`2kQ|fEWJeBaVa=t;`EGCC*^}RQ!&*bDy zT62cUEFL2F{ETqVo%OrwtNi*rZVl)4X?DGFaufHXbH3|}(Cz+jQ)XRB+7umrP%dJ^ z7nhTBx?JdXy#1V%{%rzh~G4z z&zBXKT;t|e7vzMm4c18BBq=9&DDPJ672^>1bfeK53g@BrqD~+SVe9y;eXO{LT zvQ0S^=9tVMp{#`{+z2}*pKGM46*z-{r z7JrV@udKc_iZ2&tn;I9I8LaA>9;LH#>bhLNT6q=ehsSe%G{kMcJ>#0xo-<#vJ62U@ z*1Fw)8@O9$O3JCm?Pu?;cRqXN`&q?H)o(wQdX8^0cAr|FJu&&khK~UOPOq+TR8Q1Z zUD;D3-FoL(m0eYOwN2V%)g-Cs>$@D1v+Z56&AraYPiyW$1~I%$|)8f3FuTB7*kx$irk zM7WgYoVe}IU$fKm@$Q0(D^aI6O}@E+6W!TtgwtowJwM)zf9|fodw21@JNIJ37uDIt zm0W8)R&li??COWnQ`4tKeKY?!Yn}gA<&_Q3;!{excJUbzlQyue+VAd@aKZBMOUwxbA+5c4KMztysioQ zUFsE*ddwZ#udM3Sg!RttrE6q7pWfbjpsK0Ls5)%)@Q(gJB_8Mn#%7v5nz#1b{GV4N z?!J>gP|#RlSQt9GPsjeR5)%ybjhCM~7=QfJ`KDDWzOnH?&y+kEp0llE%ZZ+x=_gK{ zHCeRnbbCg7!Mfw=>%IkcENpb{`2Prd=kQ9Jckg#Hv2AB!+jb_lZQHhOOl;e>ZBCp_ zCbrL--`@L~XJ79*?^)OSqq@4P`mVdG?_R6B>+=mYL-PPSFG|#5{~fGP2jiAE0xj7^ zk1t*HysdvJL3cYIlN2{`_NWku&a5*B(ZlqyCa%lat^Y>$Z5=HkZ`CeSKXzAt05gzs znqXo-rZR3<|rR5ZykQgL|*e4a^d(lZ+<)$?^nV2AEiz&$b4DX13I6CpOA0_1ZG7anQt^cDQBU?e1p$=-;>3xuW+1>ELI5NJxS}6K{%E)){O1K8^ z!H1%IJs`s8brS0Oc2$m_eLtYjr*{kd{nq)T$VVgJZ(pwWSrF)07sW3Br>`c^CmiUT z3g}xdz8h!>zFDSk$7kthM+rw=%eg-b|DG5NcSldehP@p7x}hc`6pz z3JRS*~x-@_M3VgscMx|)5Eaz&GF^#~T`J_t;^*lSN zx_P4cx(Fpl%AW%FYg9q74O6zl47fRc=Q{Z%_&_VPd&p3AR1ZFpFZt206&cwzV)3hUIreV zS)m#{&Q>9e;>FDv&sr^;g0p&~!<67HQ}fZi8g;P3Z%-z#2Z@1$lm>%5Y6PHcJ;xbDFZzO7E4 zt*=)z1{$T^99aIf#niwBEKVlsOxyJI(VP%%JiKciyHXo)H zZMsSvG;7QEm*i@omXKHdHmYWdd7Lue98yuK%K^OB{daM!rMc<4(9@ceeZ!u@Hbbgm zg?NkGc#F1X(m9cO7HL>}3pui3OhHn_Gzig)(9bUJ7|2pDg}A*X?RiMZ>kI-^36=x| zy0To7NZMj>iVZ=&;zp1a*K$GVM7;Uz+3q6a$fn%66tgm+jmoWxcR{Ms#;ZiS#w!L{ zS2Nu{#(r!Kvt^s1n@Vx$HnkVjbNt2t8R*d3pV;fZ^Yh0|c3RNjO?IhhFHN;-9U79R z_UMmJG=M)FX1h#9V=GO3EAwQHbmphP8mnc&G#YAo!C*Axa7{2Y#N@%Bg`n&uUAaXy zmb+=Jl||r3~Bzp;b-h(u|$H-UN}-md3KoI z>A3Az>cm?fyr2=bw1>&nv^Ud)Z+=<-bYQ9r2 zM&IU%!h3mTkBp6V;^;Y5g}|a-E7}zWO>}Z+Jm1=M&o$CAOC zIy9=fYiVjZ39d6gmy*Qm7n-_iz7`z zzEza$^!V8Zi+EwI5?!E`^)@s^d4i5dD6vqsYcz>8Y2Md;mn%b3QctT_YtkrExVEPG zoJ8=QAW;({f%3|2jI=iP#Eh(l-?S6#BQfMv6!`iZOeFzSL=HG7@QT3>{pv*WFgZ`? zI|Ax{-~N=WLibS@=z7lz7!fLp-EG$kZ&>d#gX%_6lYnp5ELZb~3s2Z#8! z;FhE$BJ;>bO-^#i&_X_OCzjzPkuqTeTk%@i0HiXNbxMZVpa2BC5AheN{A1#$>buT6 zSELOJ+}=Y;4MOXLG-?5V5KJVwF>3jupL`Nm?I7^toy=#cE;kQ#v()B!gOv(kfFILj zkUq5D#B*eYsl*aW^yr^%D9{a{(=tQhc?D31x?H&f+%}H zhEfgvf=N!|@}(i`mFVVR%ss5UWF>39H|mZVIpgSk826IRqk@XCJ5*u?=4t;*CXe=T zIwKLt_}bh16$Qk|K+p@6_kuX!toaG{yGrIBtA(-?!^}$B)7kG1Ds;7NQZiG z-?X&uA zD^077^%L-Ug^1$M+QMRm#VRG7A0Y98{j!watNvZ+`V@`_ivmW?%8u)P+65n^7#D~2 z+?0GtM2-2Wbb@>o|22trCmy;P>=EpAxwXqa>FA1XX^=SH1Bs#c*JDD>QHio*_GT|Kt^!vYcwgvtO;n2 z^Xm616(R40IqX-`Dguwn;XzqP6&(=cfrAX&np{86$E4eU?2}N_O;1%wHXoTdJtlQz z($})BYijKKHG+6gG>}?;mn#njcK4TY^ z+~v$srLv_KD;K)$xwOZ}1{-S%s|H?2yYp>#b0zZ3u1e;$I36y&gq7*rP7lhxDqVtF z9f|MRb-899Lg{DODF;HB08IZ0sC%6HAvv zTuN|-19{sx(wCv8zHUV;giki>6!T^bKB7JZF@;}bNTb+d#vldq48z(n_PB<@TIK8HSrH>5@n6GdAPHUO{U~fYGNrvz=9YbLkYHLWu7lZX`Acbixe;1eH zu&$Km^@dG7=CHE)fE$v^d}s+rz4PHED=<7+%#!&%b-P7$xd*AI%<=+@BVERvr@k)V zQG4_EMrty(&&iLCW#7w~VZScDv6S+sl#AYsZ&{>h`{Hy%W(NE^^X$e;DC-Kd+WeBa zXr=kC<{+WHsloz9GIF-^mnzUHSRAo1nRMx8ZFaLPBV}KgRv>y!NI7-8jEK|ksfQKB zfuVo~d9x_VTQBx4rw+6PrHAhVKs@!@(Thj8ea69q>33fu5rL?bjxaB<*>(7VO7M<9 zF^NGrAAGB&-=!^+%Y3UFKr7?KBQ;dac)Gb^xm|`5a48?n8q+`eiBFV|e5R0F?s2vA zCcTwji1#*2;-uv)D+ToX^+13Vxp8bobFUg$4Ix zt$8r7r00jn!UL-KS{eK4;hwBG<98L@1&v0abE~S{6$jSKls!QSuy2FdxT2+qkf2P? z#V-oSCCx=PvbZul8Re{nDh5|Zzt$FS%Tg7VjIA;9=eScS=`J9O#@7^us+D{#JSn-# zPz)R>F=|mQ%3{9-EpaJ<)!J{RB!cWh)68h|veKyNKilzKkO;xE7Oez;lEc(~cx7*|2LP#idXQES_D*#up_7_>-J z)}aU*T_Z}Hwig?Eeto=e{+1=649mAbOjlbHBwXheLkQU@QO$9K^RkUY;Hc#&dK7dF zaesW=dxDe32M%_OlPLu2=;e6Q#*yj{QK&VLgn2Jhpl{MeBcP~T8bEFIEh}~W>mf3B zu&$oEk{;!+mxK4BXojP7Bg6he#a{w;vb-hJ>XZ-BwBw64KD_))8e%FF*K`@+oB_Bj z>Wdo7tJoU11ixS>;2-aPToD;U-kDDu9+${e=qf68ITSBY)RaH4`@eHasg$pLd{ZT+y+^Lc)`ijCdVuzsm~`(t}bO!dH> z3-3_l*;^dpGiILbN2PDDxYq!G74)ga!3#S(78{<}{$}7H&oAEN?w@F)TY7c_x!9ZI zls0vt3P_fsxcoSxp*!|{_G^USV~F==*TUL#m__-Fm16L$m14N9Hc|H3wd@HVq_L1z zK^T(^<;JH?=&OqJ3i2ISHW$&QKZ>#3rLCt=7fL~ZHW&-RClvH6kO}v-V7J722)YVJK%{p%)2>}t97jB7|wj`*; zT$(MwIyuy};Y{8tn)n_Pg3cyA1~aAVQX(9v_bt-TP9ne{spEG_EFMVD*xDiTRGF(&KOO7B( zI0!CL++&=|c?Nt*rc~gNWa^MZ5BgV}OT$%x=Z`!2%8)9Kr(EnKI+!1>Uu-#k>+you z%$$MXI_TS%t}ukn2IGDO4~XIFCG2PrgrNKC$B;ec+4U3Q2b?%P#u>{PvRj8**(i23 zrR@!Q<$jwDv~8!0g2dRKxb`rO^fxi8Yd3Zi>G4!f^|fGm)&UlaOLI+mOSADw6z>pT zON|KDh`W@C3-{-M)>tT&8LOHr_L6%-Vvvxhm3S(Lfpe5*iCPiZNR|qg4i<2h00+)! z-;&y7`U`dTTw~=oh+LIaGN44}VV`OzgdcSRD>YoXhHv&7kB(bn?K4hqPqvE|7lP8# zB_=HL868ncr0n;}9^?4dFZNw}vtof8_XgoQI*sg$)%c6}iZMSTj@zi{u+YP{OCQe; z)s8^ljk`pp1*%Yq1I6Qz+CXY58&h+G1Scs}Li3lNpXU6dhkyO#e=(K^TOhH_BU`cU7zZ{p+(NO>LXa5(mTi(BA%UDB$D@J zf=<*of~QadPZo&KfLb~T?Y=63c4mksfh&-SfV)TnFQg#&fU5<9PM0nOz4%Q%i8xYl z0py?@FQiVSLTxi*eF>72yW;(Ag5zL z*9eB*&ik@G4m=a+F_F15g$6otfty&zO~VVSBQPfAuWmF6hPrDG2&^Lp zwG$}anDikyftfeX^4sZNo&Ky4$P+8WKQDh>A^;De@b;Sr)_Y}7qUxL{;f=|0P|N$~ z<_CD+e%uZs=Nd{DoDYVvvXK>HA^Cd z-jHcf|7LKpfRTU#0U*yu@IG`9BFz8-X^P4j22Q2c6ipajo|5u_fbo;Ba1#b_ZOhoK zs-$a=ncWQc*qbiMYit+SUe=~!ZTXhjml*?khIb9ZB2h)MI@hEhLZbY2YUlp8YG{~s zFE-io4ii$3&|08BLs2LssjD?<;bBT@2X9{B+;^+kOu6~wBY4?*JWU*Y_Hm(yFN`CL z7pER7hRR5c)3npt4QPC2x(+|!y8Uh(vO~DgqqndR86GZ24b!!d(*in&Sp20HK_GBQ z_FHRB;E_Z|y5ne~Oack9!5RoX1(ErEunzkpC#Y#F;&Kd-k$%LUxJTH|gM4^8*>Tq* zz1|If7XfbNeJYFy-eRF~Wik3}$`b|0Y^V)V!cpf=7koLaud42%UC*g!3cjhCIaRsU zVdBAf6vjc_tF%`tkyw`dkw&d>XqAXnb%6+s!3g$_8JE|}GTX|Y0~Es{14(SzwVZ~= zQj`A~`xS8G_)`*!UbKgnrPz0YY@kf{<8}BL+@$~V!pq(9+H%eLti0Uw=uqazhO+z? z7hP*2LO7rt(MV%HwzPz8c|z<#D=y*LF20d_}3 z3)(_;XO+8?>u?`TM&Dr}sA`dhX+z?2dFGN68`tO)@04@T*J-2YpN%L&unbtyKKsT6 z1egPda_Vqhhu;nt)#3IJ={0=vvWlguatx&CF%pXMJ+6IsRj(RlymT^?&xh0BUxY3i(oqz|`lyEePzTI#9eWiZ)YYwOAa z+uw}K;!Wg}aVaMjYNPng=kGLfsy;qkU7T>#Rk@4a2YEIpskiKs1}hUL#L*SS5#6=A zo90@^#WcCM@HFS6| z4Bd4Z5DZoC#qZfMtm6*RYrxz_>eoK0F|eS#Mx3_oO>l!K2-c64PL!!)DneItbhH|O zC@UH!gyR*E#ABbB3?U*mkR>Jdk8@Zxvi+n=3yR&weSd8+sZmF8A}1YeP*TcbW-fEs z#iBo2uKJE)=I8r%uy{LB1*OsyutiLrBM#i%pFnd<~w#WRkZw!fE!se;=R#2;@mWP?4^*> z3naG@&4c&ye0;bmm%9KfQ160MMNy?^;3Ci!4 zsFD*3OTX>qsdd_1`&Ku!Y{@Y{le&Ujj$v*xHb-Zk7VtJ)Hfp1*r2Qs|MkT>EoaA^x z7mG+r=AtxOGJ}jhteJ4@a2kSWCKVVG6Unyl1^CJ^OT}M)&dI^6auJS}W%=iohD0XT=kE(g4j~*_fq<%wJ7O!B2#{&h1S1 zp$dEBqxIJ8;iK=xbYBFT%NIkJwUy(cLO1I}`J*G{rnm&{;&&|fN1$;$i)_;}Qdncx zEaLUh%lcad=VZR|VI)?+PwKbL&DW>V4d3n++-j;uzUA*{5njdFnrh2W%r)wt=h);~ z0_wM0sG7=FfxOsk1A{|gcbJ<$;J2v)acVKb@kf0rd%k@}Q#X`M4x-IS;vI}JbFW5e zHhN2tYY==(A*{d*&vQizgLnYirpFMm0|OSsJ;F^#nw@h0*2zZyq*m~dh zz=L(?Jd7pQ;3|Q>jEsE+EjIb|)#)xC?)9$V#TxfaBoN_~6L8r~2r#M5dT*>pdm|{b zeaSr$MQqmw(NuKI>pK=?y>{19Pfy_CxwbbSntzCq4M?Jy- zx0Rm#K6|_Kquuji;}hp4Ayv`%_NApVi&O)<0+Dk_=*yCVmf*mAY0$6p*tI!*uDdnY z)yGwPRGZ-w03-;PG;PSFIqA6M8_Hlf#IVnS zkuh_qa?1BY)-Rk3=V<*P`AO$SOr|ssgjaTOE&ddd*uRm5TzTk4@a*$DTPu-m^5kOr z@>kbQVM8+8462`^Is7=oGjF=Jl_H~Ikx4bg_dsO4gk$dXix}Z^8FI(3e6alGxN9_8 zb?DY%f>4p1pGh9uW%upwWCmwP)cVIXmLeTh(WI&M)DioP^TYgaS( zNoreH(|p@aqIr&f%Hk2Zhm0ah@jG``QlBK)0;_~PwO<-)gSqM##%0mY2MNq(18nn4OtKQfRcqsZ>}jI$0DQIP#}6c2V5 zrFqf_v_f;Yi za_tO)643Niiib0$GG3HHt#0{<%#-gC{M`Y4oL7KZ0?BF z^2~y=a)aZuWKgq%h7}a;ij#>^!0X>4Ah26u1X56|c?8H#jXe^_1M@XBDUwRc?>~j> z4f8ErNGuCO_qd_hgb&{nRF@EN^Y)c&a{Y)c6bj3{&b6!@iLp2eA<;^6k5ctIx@y@M z;>nGzzi;w<$riMlKmzlKzkukmX9~VEzuS5pbvIpnY?}7`QhGqkyr&iLDv*2Rbn<)< zzitMl&}!ZB4NKaG14{(Qra_kN^Jb1)BfnYBUi|A4NLfChLkGIRHgM+b!q)#JA2GWRl+q3@s%Cwa4#(HDKTWu zKUss2Iq~KN=7c=7E|)@`KQ4$0YR$evr|!!d?m9t(L01oqM!>>_o_xMMh64f3oFV<} zvjEz?g^0`URncYiJ1^opKo~;Y5Aw$sejB3!E{16(((^_Bx>8cRTQh;dDjJF4!~AJK zP%sD);P$bzaO|^v`xvuLTO1}kU#z9{AYL#S1POF@N2C#u@;T=9=qj)h6{QO53cvW` zRg$FS=1muVB?6(NyTjR4USQJ?Qtn$P{+zDRQ{2Jd^d)ky5Jw1~_yKQa7OM}Y!f zAgu^y#W^9%i4h3=!V+^S91;lxJOZMSiOD_1`2+&!#VH{@*tOA*Ap>Ry-1|)gJc6OW z1h^zYe|aR6Ss0dKv>^Qj-ud(m#F{`8(t?Nz5-QFiz-W*3gtARwmbgu7cHq=PZCBAK zjwk>HvJhhnIhME|vk|%N2Ta2I0Z#k`g!mw_xN%P-3c1}X(?*-AZnG?EqMw>fF-p#( z6z5n<*9Q>P!mE_onAtT3;>dJEL;MMx{R<4p_gM4=SP{1Ut8p~sUQ_= z_tRj2N3*wU<&*s)!|g#EMa51|pj~rKug7x^E8beYn#x+X$X-V5 z>92R*%cf{`=|%zfn9wJ6WHGsl5a%KUmDO;im*u6pxC-)G=L(+6T9Y$@v$UW_LscNj z$m6XJ>gftf%JOw^k@_@xRD%%~NC=Lt$X~H>seFpb>}5jjabr&D^9OR_-Z`yi^^4#b za4GLeyTtJ4jRkPbPNhJc?4Zq@g&2>5XeT`6;vn-E<}OJ<>K1g9TFV=BmElj$UsSYJ zhAao1$WS(EHw3JYp;8Muxrv6G#T{BBCTYoujN`-Dt&p+L?_HzP^3AnOmx-M0UTCzq z-o5W`dDt6WXIwwKQYxOUOl8eO`b9G}31@T; zO~bsYBh;|b7;)A2`)ewxel_UW6T6|(xN((f)!oQy$_i)i`kpmpi=Jge3&&>EMhd^S zx+G>fZ47$BFFo$CUtTo4ck3AgmU7Bsj^O3GP&F!emBLHV`_S^v5?RVR`jUj@RAvfmVyWwZCkrcgDV~NpYjuw$L@$38+OdHM3u+8VT9dpIZ%`DAj2Mg33H)X%R=NZm_JQZvz z8YI2Sp`f0LzvM(u2Lvm0#b18(S|>uIQzs=Nlof)ua*IJz@G;KpDq|rsSej>E+aI=X zjm$h)aeDqDk^0`0XEErMY35wZSCB5?+5KUH8=~@A&uiRu=y8mgCXWZ2S0m zBGXQc3+~RVmnns5>#OUfE%mwE$NhcMUDGcUGLUAMNYKUFa<)@HaFEYcPoGDnvts7lQ@OEkU zE$G36xTc;r(dD$eRyDhZ&5_narn4_eJ=IHf9%6pi$C7qLWe*sj*FbEqqxk^ zB!v=dhQo86IY)$+4_qO{n3ohbAG(N&sBb@U+9#?V>F`!+RE1X!gKRhQD66<)OyW88 zF&f&vE`CT=p4wJke0_|Wk63z|^dB$uo1mQxDeN$MPi#nVfBj`nn!&D2uhz?C5_ME~ zMrLx1IvB#;aj_C#+z}M3@-V#=2h3r<>&VEMb$QBh8*~{X`XR)>Us98qk9VwWG@M1R zVe4$4j?Uxlb98x8wPTFF-HB|#voa$3>L2Bc_!%irexIc?4Ms%!VnD;ROBZ#V3i<%b z3$N#^C!z-pJ?@Ws;>PWy0 zMJM2BXl&y|0FbJrWn=@OlK%rZ{ZAGRBLf31KD!4Lo12(*m%t1T+B1 zIxPS%3_$P#)L-an0T@*P1)hU}o)*AnXJpa-uSx*csWIapOzVFbtN#m-`Um>@fAsvn zYW?m1pQ`_1t3uHU>N^_$amN3rBNUwtoZRgIjuMg({!>s1u)zrEAAl8WD<&ZtJN;U~XedK>k0~0GW!; zc6L_A)_*)r{|5!DN}x$kpvlAva5?~6{f8e-Pr%5=M#~O>o&T|%iG>;9)IW-}EG(=5 z-vCPerwl7AD=k3n3_wa};GhQ#4nVve0ElIx1t@a?XuE$?^aL#IOn?^twEef;zx)5@ z{gcuLG)VxEg86$ufc^_W>gAsT1OS~C0P_2<34pc%NN+YqMp_2eKZXD}-kN{+vH}K` z9f00tCSd!gV}Hy3ZIuN8DJ#`e_Q%n<8R*Ia)0;!%Zh*O{JWQfnTeL2 znGG--|K|NG^-mA}3=cg4Gb;yRxBxT#Uq1Tl(!ZAfD+TD=zqbAv%769#pS-{20O!Yl zd-QMWkC*;#{o@;L0>H2XT>Q5(K-5d~Uq=0@_K*Ajmip7&Kkm{7oPY!X81bJ>z%Xk5 zGj#w{0-zP8$;QM=%MQ>yV9+LD0Wj`0|Jw1#D}N96Pf8o$P6j|b^z_<*Gg?^nKXd+X z^!kG#|L=47|3)^5wBTMXrlnPtuu$gQFJlhx=H*TXm+|lVT;#oY}bp+bd`S~4)Plw;s zV}cGHlX%0!Fvt{=-y3GGI6Yftmvp3gxZ{6sQP{0(o&3^j@!zOu;-e3^PKqzjhYFDc ztkSdHf?ytKbS~)cc$nZk;3n!ugH|HAJrI?FGTD%@`_cA=LY*CzMs`;TBj1k%vk0IUr&~zNhS|Vpewbb(j zHL^PKJ;d-5$YC}`=RF1c zTKmHFUhhkndIl<=9@@|>{r~gw@dpO}{}Ms}iGzOvARu`E{{~JG8vuj)Pn`QFJkp5& z&&9(?-^S@rF#W^#X8tdEGQdPovQ@S*{{yc66QBRXqW@o^{a=Rt7uTAB03e{i1_;Lg zw^;&^jbLW`_dH4Vgw|48X?oOo&0=CYhM9~^2Oc128o0vK{|O^2z(E8I^n0PCnywR4wo=!T6>|zWue!z8-ft>QzT4BZG&l6tWtQe-nVz7-ev!R zWyA4vW+8}Jo1pN(^i1Wk^5t!zq$5s;?I^W+0A!(dI{KP2%CvHW*)8(C=3yzwt_iTl ze0V#V=LrAWdv)1n^0N1v+kiOWF`cImS{%L2w))*1PPM=wLMHjook=qyyyk-*J4d^KPRFlP3N6qt%w$v zXfe#Gn%3HG9}_2_bn7STcCz-7TEzml_obpDzx#%x8j;L_qjI{ija=g_8C-mWOQuIU zJF&+o9=%ob(xLiF*Sg4kzM>kvny@Qa!Z2d3I<`kzbs=jof2@0MWAvKnU+ooUDrZ)E zeLIf*o^xmrzfAiXj2`nG*};6;Ya{JNErW+G*Y~q(k+U}gE|m^|L%DC_sF8>l#&G7P zI7cn!#cW7I#~epF@(&Lap%^2X6M_pvD@imB-1qT)hing@#(VZBqf&2GtlBoq$Hq|=1A}+?#Vuv zEu404JzF2=D1s~GNQji>`w}!E1LvXY^6>ADNY!`0{-;WeWUdeUuMuX{4AP54SZ{Gv3lw=%Wu)S`Yjud<@{y>8-$Q8n;k3~|+4 zE!>eM@3wY({a7w|| zLx~eo447W4DqKm;1HNg&b;)WrOd;y#@biyvd@I>*pSL#+4BKMOh8G@MWoNZP;9@-q z2YZ@*cn!RscDOa7-|^;i=h8y*IMh5zVuk~|HpBR4oKe6US1r66R9eiPp&PSj`gE2E zo778HkK;(|zbLL)9(rEkExwEnw?pn|j)F;@kyw7HzxHePYaX~PYQfcOdv23kFUUJ? zMQLQLWu0Zuk$g&tety=ZZG({+CD4tUt{8WI-~P5E=Fa8lZ9W>JHM_eZN*gybhW!~v zIqx{YP2(2R8EN@4HzlSHKc1D)Dx;1ANT=hF~$_w*SlVVAN-BO`@$s$H~Tl^zYlR?f47Ba}Qmh!E&KY zZdu%Ah#0*O54y65Q=>g`Vq@AX3c<$(H4q&ql7pNdJqIK=5ySpJjMAKBRoY>Eg91z6 zv-JGJIo|t(i@W_h!n=h}SAj9w;EgYM=Ye~A=U>~@eVMXK3cBW;3F5$O!F&AC9KMus zB;D$ zc{!92=TbR@n`9KkQfU6U5ZDsI#>NX}ZV}`7{iLVWo^5)~_eS~R(U*1TeS4;UbL$e% z%k@q>ri%!J{j=K6!Rs#A^@pO+6YocL5(Z-qh&s!_DZWwLQmUhA@M7vhgAiF?#fwhH zE-BgW0pwUTk${YwOetBr?A;H9)w7@B4P>+cl1YG=v{kPIolB26e2?3MNQ9B{LZqnT zs28YM_3*bkrE!`fr3G404ZP|fW&&SJ6zU~~= zM>3Mo$;SYXnmHWCOXtfX-Hwgla67O?t|1qN8@0%q*LZ`TUoJO!?e2kAz;hn^W?p?Z z#8&PF#PG9ldMe=_2o*iq*jm{_QCuktsU5%+(M|(5iEyW7;Fr(gs4nQcJ271h!} z(Gu>$TxFY2)>nKK!noxqDB~(LdR9Fm@JSLR^+nyDx<0@?UW9=zpC1hf(=`X=j3G6Q zE|L>?2QBqiK3eLC^2sm9Ya7QV4y$eRqp2gmwy{l1UOiq@Jhn5#veZd0I)8e9LQD{L zNN}-rjrWh?#Fy*fXhiSZd5BHqF)L%)rXr^N4l+SBXIg7~peK)!t=GrIjIwCNq9&es zo~8nZdMIE@Xc+xoMrUDC7F^&!;6P1qu=hG>1471ldivVrqI%*_VMH2tJv}?SxWRIm zC-5-eUcOf43Lp$(;OlkZO7;S@PvD2aCza1!(Fjx=3?t(=Y82Zjv+yVYbpRTeq7-AX zJ?25gx(Zq|BNJ^hXNBEWM##Ig+Qnsxy2;}xs(kzu_0YJ8L?qZh;LV(4O+6j6+o^_Y z$fhYxI$TtO`Na9_%x;ua#cgmqPkiMCM9!h5*{G?#Eb!|MP(tUIudm@r9v{_l;ZKN@OJgRyNsZzBv;7e$_poVe58h3H`-A{qd1Xh zr%vT=nWVbvSvY@72`$okvrTJt2ij>gM$uaLT1C;DxsfoV!E9Kbcub8gh=WN0S}uq4 zf*1llNxjK8EfejTa&bpVPwlFSv-8m$Rx*Q|B@1<LocOx!t3VxBYgl`-C#(Z;!5 zPg#x82pivi%AN9T<8#Dn@H03^=YauFA{Afa6;smuA?Qp+Y^zI<$ZBdslP^9l}T-NU2;t z>{_ulH^YlPO>$ItIgjpp^Tg+&lFPEym0hV56@NOrdk?Tyln~A4CEx4S993#uhC`^2 zqE$M3gC?P<7_a7wNPS{^YCGuztE*&|^oJT@{NU8pc73zmXh$LbIhKQFel=3u4eKmO z1Gbp`gtHWl0#++3%O*4TqGA0)1f;7wcu|p_CA(bJeqVL2k?htK=Is*XR1>ul0rJa2 zeImPk_hMZQ9fL+!@|6M!hmTL;w|y6au-2CR1k^->e0BY=kPX$U@YW9P3cI4J>&A{w z#3o>})`6Ao_CQE12l7X5*5f6OsM$5^^XRJX;gsoz8#gfn%qW~3^+z@%uk&gQOq8}T z!iAsaCA8JR&>Hl8$o+mb#ZWnj-o-$+(2QD=#`zkGhvwku>EzK{VFw<+R91#3>YiYQ zK}lsAut`f#)lg0+ZS35+I_s!>v4*TxWt)>bh*nQ2GT^RBshRjt_us}0fW!`&D>iTcwpA)mEZnAj9*hR6zFeG_?1 zi8h$5u2`DknD)Ba1p;_-kO`%NmK-W1HQ%jxUIlqt!|X*Y&)nUFmDePX;N2^8lT1!`5T!Bgt6k1$;_#z7~@45 zqGOB7G_X4CQWTa6W95BU+*RtH+o}w=>|DVU?TNmLUBMIm%naYWp27htmkbl{USdHk zs0k@jZMgfT)*e%ICeO$Zfb+G$Y5wxkEj(Zfl1i_UQiY5}*gTc!gXrHWH}v3r&u7d> z{;2qcA;uss%AP`9dtm7Cc0D$VZFBs9ns)*${DIH zlRah+8fX1Aln3@K#RZJZHgkV$;*`6!`S9W*Awyc%7G_&RmzVB->#kb;`G=3JvBg@a zo~q`6lC7lMLKK&bO~p^7qp6IYJsCKcWh0s_KCQX+-D(XD7E7Mr7FZf98N6qG85!2N zLunCS#HVgUaDk06?3yFtJ7~4tb+vXJ0{2_)%!{BXu5g|kO!4)@$ZwcwD zvUEPi)(8hO2`wu!B9j3-Z$APNgU`^jq(N3!F2FiGqr5}VS&`n>D zk15+kV~|A#OvW?w(5JtE=Pqp0RV1zQmoWfc7s;6V2_yu3lPeFjrNWYZ@6*$BM=(Ys z3!>J=qrTP%MrsDZ?a*_-b3XxsH0hb>dfBGqYny+gZPtxF_ly@iEtL9UapKI`g;_jh z(ojNIX-%;qO}g)=eTg}{Ue=8PlY7AA0t(!Um-HpGKOtQ(oOJYMGF?mS%DrnvUYGrC zRETZnTw@)RRfI3z1diKvB4w0@34QZrwhLJCWW~4f!}GP}(N?~L)6;{x>e05ER{fTL zWqiQ1`QAGHp2D$V#CPV{V1{x`rHR4P(M7$yq=lTTsg#^0Gcmzq492jgFarlxq0Eth zWr?wh;!F;0YWxOPYC#hWB(`p2)ier2ELt#6o&^pQ9%}{*v><+py}ooOAJ&8;hSUxb z{9xp{$7~^`2{I;v0v@BFDeahTs=gEE49mbRsknX^E-u++1 zgb_q!3`2)ui!WaSThZR6mhLs<8OX(28+!%!yuPr$)TdoUSaQ@Ff1KZp#(Z4=ntx?w z9oMU+tExCr^46;{Kd01sxROR~xMXK=JDYHwjPN<3)JA}rq;V;typ5>GreZn?o$H$O zY{Ni}W8TaM!iI32Z--wvK%3Xe|xl6zP0VsYU zL)TS_nCmJ8?tCppo^2xy4HGyOvc-(i4g`&P( zCP1clidkg@l%KD1GpFG{K18j*=VyI^ZWFGKME~8{d+kENsV0sjk*Z_5a)#vIl|jsQ zazEx_u{gn(!k2Vf!006n)|EwVIw5(GX}pX0+;Ic>teBpfZi4f9x&aG@`SBz9UFpc6 z$To$LOeORK^VW!+a3GP9n`nTBak1f~gt1G^N2%B{o`@!uP#x?COzcMu%;f~S(MvlF z-Po1i8*chVihfh4agz4)>U;0Z4mj)by z<}j1+liEx~1LgN!4DVXsuwryi67y1)jClIKhd}U+=NxkAz%yI9k_zU>B^3(w5wI#m zKU5LvRjAWoagrPZ*=gE-}Kt7{S(Sh5Gw z`9a~GB$lcVB(E-{zQ+Gje3)%ornM#_#_SyuQo|N9KTh z)bBFJR%Ib{T4Ze5k9WXqtD%EedF*}kbX*qXxIaBDTED^*VZExx>F98KfA|kRyi{Ab zY|cP+X3C!Dj9VdRj{9Vd1Md-Cl!}c#yIUubPc)J<#J!lnW!O8mg~cL8kOtk|wR)V0{D? ziuJpQo}7g<-M-yiyz*JS5wm6XW<>bdduGsI?kg?S#o2~Gq3zV*bsUytqpTX{IIoYV zQj(m&I+l+UCZA1IODiLB2v|WEdH?qfP6pl@8X^gos5F*j2l(PwxtK}$x=L%2NN#~8DMvua2M5STDGG!O=SC16Lr>- z(#ib6Em7k53f1(CiF+3YQ{0rJ2ptIvsSD{Nv4dbZ7$SM*h1i}t)2J5dE|h!n5j5Au z(%InIqN5ZVvJ&M)qQFMk4d>_npL$y%Uw~C7n62@l81VL?shI*=*P-=L@RsTL2MdYT zA6DFz0=aZVQIMt}+?w-A*jD931$!ZafIk7MG`Qw-HvG5=Q1)iKUeSr6-)>VO=-RlZ zVgIl%aXTT_tFEx~o;oURX&TrZ>5Q0guul2!V}Ru-Ve{$XYZTEG8nI#&Yj98SGkZI{ zb0PYjZTZS;lYxW6Y4!=NC&cxb@f{N*6b_F3PNgDYLW^Fr$RA;cbBMWBnl>v7S5pP# zMyuJ^3uZoU1vNCVgaLj3b3B#|X5ThY6!e@*yG^L}4%+>Pnf92ug#oC)Rn&RfvSSnA z!ccb3+i7~!P~Pa8=C|YdYUS17GJHc8IFYvW-ovEF&YmPH8%>vldiyU8gQ{NS@OvIq z7j1QP-B1qNCE6lMU5XizbNxWNhB$S{Dd{NueT|KzyigUR~axFwkV6~pIo>*SRoh-muN?JqoOFzJ9wGfp? zu5JOtMO_shgT+`1r&d5rB=ANBxhiHol^sWrI-pWywt^pp-=#gwGR*>1cjDC$)ehM# z!C}8QZil#~BAi|F1T#Ab(+_BPML(d|4YL*TFWH*SVGO|5Vyp6Td-y*HORM&=~X4D{_K{0^W<7|HpFT1vyhXwB75jf^Yg48EH*AS=HTv^&0H*q{G_U2)U+gZ6chXT3Fz52*c<&qETQO~p`o1R^bngxUH(f#y3#g7N5@U^aj`U5TlH(_a)OeA zoW@CNe4N2?N_?`&e28eS)MSUCmE~ul^C~*#3RXqo>g>hNE0!SasXY=0>^Gt87?5g% zh}@miIiyFzDC-?TiO^o}o0gtYGdrar!H$Qf%^UzPOIKg zy71iqGJ4mSV0Ji!q5>UBW2pCuxdSM~0m@-T+h&`0n_ye0qjS#2cpH=TNf~f3LK<M5?fu!agB=Im!E5?Fy0oB&ZY375yO`5thPD8{ZD6n%qRp~9zcJ17t%f?SzdZ91i zt_;2*3>K8VGBi=Wbo*hrtC&wHgSQLMtzV5Cue;i=!qa@h(!V&O-)85oHraV2urr!3 zMt)0w%r@MoOYU`g0eYGfE6TNCgtrXCpiH$ah*hC9E?O6>ST@&>ibb1yoA;z#?lRH1 z_eH3gv1M&!b}+t}G2~W_ZG{{d5rmRji+4QHJH)# z-A=J~QKRNpS&Tp|6Nz>^vQOb$xtDrzy&f>xVV3E+LP)j5x z9ubE-H8MWFL#^LifX@|ku_9j>KdRzYOB0f3uzsC*O%9sZWspnL&X=|lBnl3Kc$<<% z0{(jjDA((3E0-6=rDq{1Amt(wm#1ipX+zC7wYjKIgd!9k7Ja$@kFA#STmhjXk!Tg{+X&2vmp)?MAfNK6HUkhh67^OA41E_Y%Jf zk40WbQ${V=-+0IOM;X9J5#Twu5DKej4idNmya|a4>va~s2^||s*C3n-)h^+OLlJb4 z2eiNs8D?u(dAE{zO)2mqoY=$HZQ-3ADJ(HBjhOBs$LApLGQ;C6dl(^U6Hxb4a1MCy z?H6dgG(4A(-AC-8QVxp5@2kg)5Y@?gfrg(B3FmnS%vi zBnR(@Tn$MFd}3B_ZWB{=PsLb-f3Bcl%ztXqbmapmw+#OvPkHHH#6qR?0ELwa`y|ll z?H=H@HzxiX00|j$+40DXRQN*_Z6U63zt${VU(NTaiDzSK*+ z`734!tCR>k6^(>`ImrBy8kKpyAJz!Cr8zQsXt5E6N&a=~@{3~uV09h^c8S$WR{?xg zTh`m6w(ISjzvk;S5xZTZ(Gm4ZXN+0*W6AsKDs$3kD+r?oz|$0e+kMuGzrC;is&s;0 zas<{{L5|+cls(~51Q!ia#M*8Ibdv>q0gny#<{js|Y(qgkDKKgrTYX1O%DsnvtZtoFI183!Zv^nYWA>cxzBrOsbsbIO?!}pr=fR2s#Dm%aRNW$Wv<0tdu=TXIh zNT7NPaP>O~z_t01{&_EN#u^i2NpC$7wh&mcn&raQG)0B`wk&2jvsvV^-~~0c zvX!c;(`T16a!T)sS18I&Q;=DXVF|`6Z~)3A*kFP&CyHxNkS#gAm!7~J(Kj;irh!aOV5U3eZlS5_f^m&UkMj-@;Bv;%x$k zp}eBZrQ84>(y5r~gUItn*MD%YrVLe|_DlwXG@VVDwG1<};lp)g%1El~Lw8WTCx7)D z9#h{Np@FSzx9RE71`cT{nKHYddR1)xQWKNUtBNK`w8{gFCfAjlM97EN48_Wr|uN^mDO&0bl|BylP! zjf@MDS`v$HTchb1*q<86R|r`CC&+yh z&`{ltUpymbWpw9|;1J`Gec@#m{2p7M7<08Dqoa)z8WHz3S11iDYA&H>Fyl{XP<)Wt z_`V-h6`yq3Yt=&K=E!mOURv8=+~!QH;0+rp;&>`FVeOlzQjm8)R9M|_v6u+nzu9$@u;T)KuE{7X^avcxL-+MxMqy-pjy79Ke=$wj>Opwdm;|0orO;`Xj3^r{ zbcc^ZJ6IsV^LjC&t7bFySIr+pQ}y#r$s%cDZH&9{_<;0%46cX@=BV4SRb5czD9wBaRNV8&x$rM9! zuV$C4S{a#{I2_mkB|k?VMxg`#a47t2QeA|yC@AJ9(H z)HxwWx7EWL7a2a`)q>)X6@{q=oB;O;4;K#HHXd3*>ag;0;+63LizM|iIe_X<=v0B> z5RcjPh`FBaA_)o8iepBJ8x^d9GnsUP-voqCl?a5M)(s=+Z{Iz}m|wCxhBz^oBeu&q5fx|5|p1(@*UT24Vd^M$I zV%83~>BKrYr?}=!Xwx)L$zTrAyxKKh;0h?Y7!~HVyf>@iI-5TZ>hFcYST>z(HDAHs zOhAX#hZ?_($rb0R@Ecc=EiwQV=l*!$my0*35k;N?rcxG%PqJhlKbH>*gN`;aLhY{k zdu|lYvQwQq67&wt2Dj^AD+sphZq|Qtt{S&D-jVQHV`Wn3^l$lL-lj z`2m&4V}pY{V@u89ah4J40muf0DXG%5SR!ZCsVG{Ado*G3klLam^PYUr=sLMIyWIDx%a}l;gpAW&3pUti#p#UTVkB-8ia2sZfJ(-Wqj_<7NzK{o zEhn4oeeCPWkpa1bUfck&ufF(*`Ui*W*?7BP^_y%Bx`%z8la-Cc$sW36`#Ij4iS_%V zUw1uKb{~AdiRb1g94y!8r}jK2Z0@>Y+2-%Evfm_adYcK5Hbxc?6*Jnd_39BcJDe{h z2t>|B(l91z5rRiQXB*TZ7oHXaX^6lX&qPbJvIU^z8*V3%rO|c9t4fNDLRSRjw12Pg zQK8o6GGGlfs|TL(T$7atG|XWh$qkWbiH~=X*wMM-nL8kgD&jX;_q&3gBJ`T;tX4It zcmSBqj#OLXYQW1a@zmSzGX?`{D&fg@J=V;Buv=K_n4jG@b!~MlWn>)#e!as~xGrsw zH?p=$rROjZJA12+d-JaPyk$PIQfr=(K^-15URt%ko>_~6l{$87I8OK7cRYIjj={NW zf!!bD@XL9iNYY_FVHXa%xwA;|pGXy`zar`Y>kRE|lJyksNbT$+rY#!FZyb%oQl-qG zU_nQ~NKh1OIJVQwfDhY&tb$b;Mjk8D6?*?Uk7XrmWAMC2!ZlB4SG2d9sd}!Sg#3YR z5uBiBnaui1&Nd4LU^8g#ZLwW=VF+ce`tUl`@xJ8$yWSUZE5hb_qJm7!NFk!oue7Ol z>%K^w8U$ZR_AE~p?8qq(k=Zxh+d{xKVum_EGf0vE+I%}F3)#JQf>Vt0=i!91AeNj# z?%Nx(3uJ%Sn4!wWk2hGLtoN04MpZVS*JM_3Y+hV#!0q`pX_Dy**YONE13EuuA-I*D zvWupR1nZ5VLQa>VkYi|~OvXJd=ea_eIyPm~M#qs+R?hZpux!)pcVg0?rc`ZkjIb8M zgSU)Rj#Kue%NJbdMJA@rj-_{TcTI|HQOZ-C?2Yr$=2=@7EG&05;re-gF6QfF-_$My zSuWzfcEyC9CSFR`#&S93JA^6lBj^>{NrR4YWY@+^<6*E*b z{Q^RHoFK<2J=8tK03me#*;O|qRwaYBap}*b>15P>nz|^258Oe=UBMZp0bGMJhqRVH zRhbtSv~wF95kK+6U-F^md2&Tcm0OfAYrMK|1&DRkA!1d#v|i+imsKFpAd~=|RRPO` z#Qv;~-6e12OB~l=RTQP|N`b>)q@7z4V21wl(gpJrrlQQ1@wk7nhT)x*7{Vs(_6 z;g*pvV=GzBrjWhqNYA$9*sA4PvCd=;u`{*DT37+XOQXzbwgFqZICt?PWd%eXk_7`t z_yFp@KM$?rh%ZWKZz9lKtGn7cU;clR+rA5PJTOOeSdzqE8+05x)s zD>OZ9AyEFYUE}gRH;YPqr#L8zJ)v;bQjMQ+-!{g5FvgkS$`XHTQYE@`D6u0?y!m5A zKr}>5WiOyg%;7v4MHz0N{u}MxQ~M!Sy=Q1@vRy`88`DlJ_+!6!FoaoO6_>9)BdBmx z?&8rSVKsX-Rb26`_<*EwaC0Cp-G$1IzQvOVV1xv^)r|V?c=Mi@6M$3AsOUl%Fxp=AhcZ{LjSs&Q+M%Twh==vIt$J>%>Zfw?NTkHJQ zRY&TBsjL%(ub(YHlA=UPF2TvjCi#f=RA4NGn);S1?2BSmej`iWpu5Gq9`Wr$Nw37J zmGg(9nt08+^&`G0x?^L_(FIH$!Z31w^6sFcg0r7jj1PsKUNN93dX3hboh;rfJY!&^ zgQE%c1f_MQSm6oh6i>%U4sWT_2zj}ai0AW{O(&yZuAuf$LqIJ4_=h#m z*IeyzQG|$mMM*-9;sDmRse_amVQ7Eny!VLo^l$tf*!I}pZ9(PvjcU|WKOR*O>+$Sa zNLQ#l8cX17V6c|a=H;vode08R3?)b51M|x$Yr^9QYYW=u)RT@W#x=T=D{raGYQ?0= zpcmOGQm1djzmv1}=C`riN1AMb-dHf-w8e3_g-c?;WReX^K~_Aibz_B-<2Y%P&P=?a z*|}lPf%zSRnpUj@5EwH|`F5j5pev^QdZ6h-hz9Y2H5hzSz`Wgerl1aHJ362vi-kE= z^o}4JTypZTN%LOAa>=x`a5ULI>J34@4oE)|6}5+8QC3X5&yD;ug_=Dc?L%l>>UwT2 z)myP~)!q&+tYdgd4<@as$*r>Eb(+ldR4y)^Ef#keJ1=6l<_umcc?yY=S}l}q_Sev( zpB|R^7X#K)fagwGT8$1<_5%SyRh`cHIME1 za8Y))(6PA5v!2%R7=|mD#f|EmUoe~Dwry@`+Z^?R^x-%SF}Cp6%v5ZrcY@Uh2UU~S zEk46@BKPLXF0qt={X?Hk&c1pnhIeQwVdHL!Gf%@G*crBSCO~ z)c)rO7H|yWSZ;gUQI4?s`+dEwY#FwkzctJ@)4OmtcnFkLBUnGQP>C2)W9XP zar=F*C2q$td!W$*I)4#Ys2>D;D-MvBS9c6!m=Kc&ECxT2j0kx=0BJVfz~ey)i+w2D zn6^yNUHD9r8(DmS&Ys&AURqn4K9mX@&?tY1%*rR$dcRQx8IHl14`S0fI<_$@a}`&IvMI4bM6jAW%}V`ct-%u(stm}uzO{-T!u38b93(u_$RFT?*`;w9P9r-EcKfSep|r* zWfQ+`;5QBY7y0{#GW?e}{I{a??@P4*2Ppmj4oLqY8S(z+p8q0}e>=y2K-9mH=YP8T zU%K}1e*X1=|3O6mTQ>TQAKAX`W0_ zM(OBT{zHT^{-d-1AwvIG^FO5M-{0NeZ})fCf3w=Z&;8@*|Acn3|NUe5@6aA29rHiQ zo_74SO&}fg(3LwRZo42z5uYjqzVii%{R(dM1%R2sZ!tn4eD3QPan4W zL_tTZDu}p_7x`wiJXRIYtf5F%a8fQzN(P9vGP`IqRly@6gk6^$K-lODQF-Mbqn;Bo zz0-ATXE#Bv1nv(Qo%N<_-Z*P$t*A#`_I#Ll$j&erZ_lMiQ=Lvg0s6r1+Th#pUW ze;L~lHzZl9k6seiulf%XVrOE9Gnhgh-9`5^zF^8%(+R$cm1-b(uo# z|4A7LxCyAV{qq3e^`{tayu(IX1@+3%*Su_DrMP%#&-&8F398wPw>Bz^^}kNU|8^Gs zOP&8u+x}ln=YKc#{NIP2e@%S~|2ypb>lXM=GbH_AO89@ykpF_6EDZGjSFn@*J6YhL zcS*Jfgcg$O?<@5R58aA<)I9&o67v>N3^SKFniLyMeskm`;UalEX<(3O$%27jLQw(? z>1l)EGLOzy(hR)=Wr+t<(k2PwmlFq@oURF#>BP2|L?l}iMkzuWPuZtKW+v`ePrtwa z23I;xJ$ZlKQJ3GZ0xCM=%lXZ7HjF)+L zxxYYxk8TD3UQ_O`w8eT!XAFpQp%ifNasC>ilMs+NeuE&=e}Gw6>AZPPRtSnR1po8l zHL3U2^XIGN3uHeuztamwsjPkEDPIff&jd4TjLqUZ0U-!Jg@EJ|>eJ_oO;8d> z&@X2>(Re_3BR)41(A%g-pDh0XK3=#7z}q~VV)o+C{zoVbajCrN2;r9B zE3po?`{HWIdsj!DbV3^E;%~DQ33)r=S&9gKh%td(t=gQ%_8)s9L&0hT=UH5mI7z;FWr{*8#ZLXr3NHy17pKTUmS{EWO0DIQi=<4(8CRCxYhcdR zb{C;%lHN6+S$aqz{eU&e@3V$2|_^BHlc%9+Ad9@@u$De;w^v=L&jY&8dr(;=kah z<572;M0dyV;)aG|-2>o78gg84{btP>Cd0OlJ%Y$P4{^%@w4vB{zs%s_k_e_uNyRV8 z)BupAoWaX0$Bh>70k`J6D}MXAleic=V0lr7Hlqa$P7^eHmhVH{WXlJnK+8$tcmE{P zsEch2-&7@%sh|8Yv!DB99mEvX!hfdWW(sq!$7w)(PQZCyKwysTVm<)i23kyii@ywQ zTbtyf%{}1=#MO zY*}#gXWmKfWbAY6bL$Ls-XAG4s?AzaRc5oW%%2(hEC(5$PAA*_?_XcECHu2?$H@2J zTRJdK+?!apoH*CQaX_fF-#A0Jgk%djXVC9|aNNs=aKr3xQ2n_C^}dJmeTLYXSGfnD z@WhOIV$g^g<|hpDS8XjIPvacOKG2D5DTuuxzsFE1z+REQ^k?3c(9~<0=x&m^#5QY(TC!nI7{ zmhKSaz7tiu0azJ*>RHF+zoLow-WnoRh+V*vcj$QxQhvE}-rhiZLdPzMq!)e_WXYoi zWcFh_A|{`-z_LJe7HB2*!;ImT)QErGoi{y}i81%~DIw4=LuCa9;GT0~0CNC<_)p0V zYChKbkw4b@7x1lBDv)tYU@p(~$$akILoW7vRL48I&jF*=N7Yf|!}o*y#1h%C)BT>P z3*Rr2@yA))!O!-q#qhko9WnX>u;Q+&le7(eON+`cKWx!9bN_oh~+VMkF{6Eo?ErZic*vb>qbjk3tn!6hN3 zLnY7U>30UFN(MH3Zt&~6(4B0L1_#16=fNXTLSI=|ZPPi0ifWX{OmBYzVp<=?EC>({q`Gx3b(Xr=K(KK# zfPFqC>9q{FuGwI%gGQV!Q@*UE)W zdcri7ML3xtH@uhUKy%vWVDKjV>IMA5?B={X!hXNDCmgl_j5&3D!eDm1orbEU(GLcK z@hE-~F-~(47;VBr!otkW^U(ct_yd>Nm_9`cG3vND&&N=8fOb(4QPDl-YtST-&CKF< zPa`1@cu8Brv>zcj0F+pC< zImeSvChS%cqCoj;=PQ&Yg0+Smk$~f_TtWLD#Z=h(jM)Qw0aaWc1%6dnop4vGfAFzr#O_7vCFn=dt8AZdlF%@}JYjSXy z@uvIwyvL9ORD-uOe@9?`8fU|=eQzRD{Ca-=4C}=nb!HKEX#FCAAj6G1;LLo7XT@wb zo?Ud;=*mG5bxYl8iuLvP!#XOKt*JeUT^`ZuLk%+q>e;%v@tem%gNuEVos6osTLU?I z7LPXZT7kn7$(M1nv^XpdToT)fsR{e36Ii)F0IJtYM00);^;5N{s|43#XZpxVNdr5i zW|b%3cOl9Tz6W-vyuTNmmyNgpSuQM!`aCN6!Yud!34!~v1{|U><*t#s1a^smW!>T7 zp$@TVwc(c|S6^EOSeDPuP4DN(3S`eb2MJ{9&)JXfp@<&o)!r5)~ zqrP5hrv0I?Lb)HHH1k3J_{%65q5&G>k%APuf9QtuWA}MGg;|`=uM>|K!D(1%8y2Gg zg2BL7OXM?A7{{%U7n(q0ohY1k&mLAZYAU4i)@b~;R(pfI6Tz3-z$z;5dhA&fKDIl2 z(&{NTG}Ay*&yXF}B}Zf{J(5)NV(F-3C)<^|e(F%9M>)l}!%WZ z02Tb#_$vF#pdTpKSSR>Adl5QeQGI8laebq)zN@LR7k)h`3)a!CuOXUgDKiT+A5DQB z`FZw$M0;N059G%mMp-b;cCjPckYa#zS{24})@9AE29y~WFymndYafBqH$GKfn|WM; ziiUPBOz4z-Y|;Fch2!vV$OnjKEyJWCtVmJiy{jarfYLvlfkWae&}b9U4llB&_)SwC zqqzw}IMA)5xDitKC*s_2QkCDFi!IYYtOQ`qa;WJ{L;!8hnkS+slE+jddu^Fmr&-pA zk*87y_pR(qz4(ABZDa62_3P*Kl3jS$r>FRMtqfLX=X`K@$s??2YxUP%HdeXlF10q) zDIY*#93q`LGbsU@cTyfh0=(o*U`Vr{AA?DSz25dNr{)0#9@p17W#OeT`eC$58S|^} zny{^cl_b@uD~&)nDeK}<`1$c4T60j~F%mV{%LOQEv--p;6epJSn;aqrPJ>oC0G+j} zWRgx-;EIx(K;58U*KKk2Zrj={C*6KU>SLw*6JCcBuBd};*e_)d2$h7FWd*{(H#hn( zzNvN6s?ZufIPih8><7GG><4VW2rKv_Nz^&QGW59ec~OZ5lhWTV z$^)u9B{W#%DCZ`O&($mh2tvEp_UhZQL&uO9#G34R7Fs^X(B|3%tYGgG&lWp@4Fr%R z5oUm_8VBaI-UJ;{A2TQzHv1W=9Ng*4UKIyX$ksk7h}*-nlpsbn#-$`L#Y5J{APCwV z`CqRZzqM~%)_jalg}^x-CIsE^`rPlPM0dX*e{bvQ{(MBmZ1sAc#qEt9#80zrWYR53 z3!|xAL;>1K>YBkg`YPMw3^2P;zdy;<*WXfwNCKL9xgjZqF?l}MV1p>Yn$OCSQ0P=nnTjhT7l z{^@sNFl;D#1B8X}=@c%{36t3Fx!K7!3jo9&o;=H{-{e`c3_!;+>DA{90E09MuQ*I! z(`R|ZB1Qir_}Y`4rnK@HMS?sdqwSr5^Rs9aZ4kVY>f{1sjH0u%b5I!Nd@$2&wVd(_ z?IluoO}`^k|A3_nleoa@KxBPD_>T(~9Tk0?pG$ZO(|G$qQM!vf!NKZXSQ_dWAsOn? zpTj>Tg)jy5MnofF(L(|E_(cdxLW?PZ>kh9DVlp;0jP63Tt})l6Bd(*vMlUW`L+a%= zL7ZyQTU*hC!eyx+b@9h_jDWJ`84oUh zsNKifV!ypi%{656a=LuU4pUGL`()gxk}!s?z_-Rc6#_31tKb8%patO<$gR*V8RFXX zd%FSR_LJ6O8D{g<@r8_{d~;TV@d^MQe#cfF1b-_?X=oyh#fo^^|M*_|kJG(p|GnN45Xc~H5;sjr+^SD_In ziLypZvre^6NvQ0?WwB{Utf}x=9G5BeCVfD1=fkL8*>?uAL9E9EVrpD$T}SQ($xy^r z`U68wrY~eb2x$sy3TwP5J^iY#Uj~3LJuVMhJYj!gHCXr7gO91R&LmJMfT#dry2`F7 zx3wyUHd0b3M_ZI%2oD{b)HRLdjuh9&$=366<1^!Si?7Q|f*h8+$>w4|^DO1u_ux1! z``ya%i_rD5&H1Whtyp>Keys*W@T{x%v|#I|=FfKa2Dgjl4o!)z3eaRA9t84S0c^ch zwN>W1U(}_7L9v2=Xj6l@16B+CtYru=tYa9a{Iy54^!|6jLAGenN@E7-gXfNfEk77< z+>d>Ygh4 z6>RG72x=!atuB>%X?s5Y<+0XLxRDbs$=2X!L{0?pkTPaqMur*CM9O)6%!YO4pJasd z?(^*=77WN0tXe9&u1cs%L@mNvgf5s+FrW`eyMg60~7~@fn#UV$e)TEV3`Xjo)j&Kw@DEmqs$FB%hl z*_%3*S4wTTAsIOVvmpR$nG{IeH@S_waLA0hFvyHx{7&AIIk7mBp8Ama&9Pq+^?|;i zJ1ftR5s8YL=nk?8QbgQNnpvcASKX{)v8KmV07I&!=A?hXapkcrtX*@;G#w(oc!O3+ zQ$bV7ro1&0huw$Kp1pEWEKc|efyk16e>?Zf0AK_XA=LwYm_hbpx2=1 zZAzwS2cwgvgr%nDkQ8>w9PL1MOI=%YATA>BW!H~^pXS`|c?++EeBI9ZwE`vW4!1br zdv}jp%>h-ZSMO!&Wk!h|gA%QhsM67eM&do|(h|PQd-Ng=r0riNV#jaCviW1~leFz) zP1}pUfFT_NRDl6#G3(UfwR$cEp?83eMrnVt{Z?%-Qi|Q2ed<~xU1dCx#CSrPp%xWs z61Nf~N*azVOQAV(BOF$o3X6xP1!S(%qG22}){u!aY}@FF%=B9vqd#FJA#t&^k3<17 zBm?`sKHOw$Ynu%A$T4r6H|!_-w)wVM3w1ONbqx0QQskEZYlI(rA-q#UORUjZNd`O1 z!t3<{sCNID_8N8mt5CWbjZLPG$TD`v^?K^qX6x(E_;D>+VO$Pb2l({v5_*5*jF3o9Jr^ivUZ zHo`(O=GIJif?;ELbW+KY6G`dG=EqTUn_MdWB`ci@1LzbxYWkOi{D^c1CzzVv*$8q& z0@>1EOye+sKcGngOYqP1>~Ji3y-cK;z;HLYn3s;tu*^<>RX5VTp2QQP@@V}cKUO=w z*u?%Fpgh@n?{+g;N$Pp)=Bu(kDMH76?P*<+we*v`&wosGM~n_kb*LsH&+TIin*{M)F$ouWp9QN4bp(^Ei-)$j?b5TKx53`)fifLllE1BMne0 zr&J#S*(#4#pU#|=3j1=%WjScPS)65rYL?X%>^oIN0L&qEtBH)(GbHVa*a!dtoW$-{ zB7aQi&9`3c+5TU9y}VpY_FWG1jG3+6_jkE*BZ#xgs93xd0H__JGucIN*X$=*p7rq-X2@SS9_#xHsChH&yMdPI6e|JaEivb zzaw^|GikIz=)r>_z_JMJg0ODxe{wTq3&zO6$xXb)inL$Fdc^i|=ma}Y_&bx$YSsJw zOc%%>^2$Qh%7wcE+>Uy^{>f&B6j`D*qsj${a|0ozE`j#!Ve$+VO)d?t;|H-Vfs?M| z5_7qe6Gg(s_F2Q5RJEX?IUnnw{JmTbzsqFDa_*sYH~gQJ_&=0CX$=g2T=obnVdu6mPN+ES3z3 zsf@P17?KBB$x7}@8SY?lSfG}-1cofZUoNDlybzF4wy42=VX}r5Am0XQ8-JCE$gbj5 zEnHc_=Z?{Vu$+cc4XoNScXr9Fq>LYj!3V7uva;#_r$=1wAy52dc=jN4I-9T=R|I)L z)`bV%`R?BSsU;|6Cg9!7{VkLnB_GdZX+p&w}wZO{ecP^;bHWqD@O73yNnd@FePOtSM~uhKMiXwMXdVdxB){QKV@Ae2_qx3 zuR0DwqGBL8a!I2~^_ZW=eD%0oMVy4f>T+aO0G?;WSkb*+#e|W>xDheTN}p6U3vG1C zRKw7|^RU~#3y|vuw4Tn)Flg=aq#97mv_2ViEm>{csI!_(HWIXyO3P|OjC7P@_{oYv zOOoosZiG-RfB}~P-o^~OQ!JL7RLMM4M34}4_kOAjCACGgN~t_4xvZ}kSjX9I=OD5% z2$1@$`}5nYmaM&ku(iB-uf|n!VF#~8{lxSb?c*$??UsU$zK5Dt-;3Z+X;Bmdnt>2pjyW;k^?|sAR z%H(>nx*t!}9?$K6-=8+Pok%z?oGqo}BY0gtKC<%$^p}`m*Z@;tz@y}Fz$l*3@{x%> zgtFS^c<`GALSu`L$F>WD4(Rn`2Y>?HEZ72j`^D+6-?Wj0w2@2~&qo9~KT%)pofT=f z(-X&&>7JVYJRx{!csM-(BF%F%RWC6xfF}Nt^BK+Nz(tRAKBe&z zq@=iwJ~p5Wq4R9s@mW&d~7p@zt_i%0D^p7UWL{^5T|QphWbT2~jDL(t#zD zC7mQ3W!qKTm8E5#6Ab3=%MP;+t9@@&&s+ziG~+?RYE&xLPeG??r$G^2g?;rS)Z)^J zdu95k^styH)?&ZfFbsao?c0DFwXrXy30{OWYhB4VEtpYMKX-7&G@vkh+Gu zCg@b?*5VW4=R?CXBi5Gr(U68f43DOQfQE{1K++@_p4lUXkG1^^0fe4Z-61C3wu4t( z4{pZ<`oji{ZS>hPJGk>;5?ADpt%1DQ{BaXTHi>qRv+eCC zg_pxX-;Yavm)|9U@{z^zj>3`ecXU7@34&$dLkC?u@LeW+wi}Fn6C(lvldMRch(lT) za!an)v{oJIwI&R0zL~2)j~Y*0!pFu@YAY};qOf9nZC?*QY|w;_jDG8FAZ5Udg`&dS zZX{bdJUKE;Q>!dTJy@p{w3MXbF4u;}JtPSwRB}`D3SB))d_O_jRgmf|)+pX6#Epx~ z=`C#@7bbKE0`6AXIM-QGzx_t@jK#y@S)-NuKq7NIbE0r#16ICQFQx<^)E@`w0Ce$T ziE}eQ_J#@91TGAdbVE|+bGLrPSnv%go0^1M$i$*nv6jS_HudwJh0t2wPWnt}kwz#! z4zO|O1tTWMyN8qCQA1R=j`|46#VpP?8BaSmE%l-6y!9$gswq@eE~8Ur6reFxzWb9M zCtq3}-uhFk5&1P^HTW^Glt@bv!GDS`m>*3q)qVB+VH}yG$1AH}&qZqawYqygZb!}Z z&GIKuaj4Js>blBGoo9bsKeF#w1BorfNc6JW#K9tDbX;r!&|2F+vMqC(e@9a*(AzSu zvaCO@eW#C~_rQv_X_`Ri4b%%Iq#;X)hyLWVq<|bHGh8Chg|kUep={gY9+LWARO2+2 zbz9|09yNBLoj-@T&m{c;!|P*wUrr!EHn?q=^6GAq*;YWx+Wq({dD7Jt65>3`&OT{* z=B+==&rr}E?$cx>EFqj9sQBA5aCM{DOjRS9eXya0_SOErfA^|}hDPn=}a6fHoMCbhlI~-->Bqds?E8gGj+}SM}L2RL(Gch%`)>2 zclX5vLR%o%Ayb~c1OPCW1L3p5l#-~&D1YcRg*nBBt{|0tXFXr#wA9Rl%s-xgvLYmR zTO9YXQqe{P^MSe2?XU{Yf*9Vki256l6ajC879e|(1?>6gq_ns_LM|MT;b~eVdonmB zCQxk6Rm@eiTqSWaO$-NDtp!t2d7CaoO>ZvNacD@;c7CL}fjTBh`KGauZXD}wpF4mo zzYNw*e|9!|uS6w^y(A!e>4^Iy@V+Y>xYR9GA23K(C|<+#4=*F3R(l(q9lQ3qL&E@H zfG`2GJ^H%XFpuv^<=w2?deQmj_AYm2s64mTHtHzfiH zH2NQ%nz#(G6&6e=1uH8RQ;Z1Y>C*_1MGL5_cMv8KT;uNsoH8P#8|r8ExB=b9;Bxq2 z=RN57x`lj^SdbXoixuflEQA-v?S)h=Mc+|)93`9KAPqP_)u6w8P7SqqllHZC){SC1 zBg4{^=M$BYWp@L9wHX>XD?5B_&PSe%DGb#9Q>%dB|z<`Ct4s+2Go}7Tf{U5}AWmuKl)~ErZh@gUiN+>ESy?QOu zKn0|`LrM?{0Ra&V1OzGRMx{d(kdO}P?vNHFq)VDRm;0Q(<$XQp`|h86(dR+OGjq(* zbIf<(k6ibSFQ#rDCujM1@W7pqd>m(2o{YXlYkEse2?smt)){FJF!a_13(K+NZ z;k7}TA*>>v=JXUzF(cf%*vy@lqCMCZ_euJ0>gBUtwBjbpXM5%wIa#B zw~8Bye+sYhz0+-aGTS`zis(%d*NfJb*23|(L)Z_`ao4Ng7-KH}+GbHTYzrv0yBDFEc}DzHNwWKIHDeeGY8s35SwGVo zj*xCLeSH0j!GK@=kQvp}z~pPLQqlP#Hc@huPAiEaHsxHg*kBpbv$9Z!C$6xcO(X09Dq9?)Cid0ICLHW(v57q3SMQP18)s#}o zL(Za3ioC0s%;FQv@Q|h0x&QE7kGR>JkCsL(qUK5m1T1@Qb4q>GJhE8*v!|n7t)L*A zGklv%BfPmq`TUq=Et_YzW$pc;y;7ES(oeq0qPBG6dIo#rha|)!)!LRj_Y88q?2z>zWd$C* z{2t936_;I4bFB>hfGvggqI2>6dnKIC%IB2A%rXWPa zc4or$$wSwo39l##?Zc8@+k)%O4Yw5a#!?^aRW^Xa^?Dy{J(}m$tuA*KJ4;h0-Eg|o zdgTaZ8%N^VAALF9eWR@D9F`q{DGn;?iTgV*&0!xs-N!kk9v-GPCV?Z7E~U>o>-=^} z{H&3$lT|XhFJ^Qv z?ZVRgs9vPGl|yXuPRQ1|fr-ZCp1GrC17lBxs72ac_Pw)Do_ct4NY>->i`!UM>acnp z#RKxswdIZ^K1^hl53doYizR=qSv_^1!l^$@K=e7u7y5GijF6*5{Ds0Yyq}@9#zvuj zdE>noB%qjKf#i)<@X6!m8v(eHW_y~+xcXas(F}I653H8o#l+-R#C^(rb|p}(p<@mI zhMSt>{)Ha)hy6Y@e5Z0to_7X(dp-Qsy}EZew)}j?zOh)H6B2JL!FXTWqJ} zyG>S#*hjUV7-;XyjFIEYFjyVRto1etjWQRP>qvi>^hlql^XupPsX3OT;Za51SjX!b zGiU8|bnS=eW=L^uoy=Wb9<{33HZ-a~6tjESCQ)rJz3cCM33d~1F5&CX)&?GN)MvMt zaU@vX^#ULFRXK7^bMR(GbOtJDLTl}zIR$U|g0<*ZzY4#*vR<-u{?*5ix7g~R(f1v4 zi+On{RogwGgH(oGviSvv0V%nTLDjM>JsZz^sxNtc7CUaF)8hFv{a=t~ccz2~?gl=- zA;+fuI_US`pBRo;u{R-}_+?6983mG=!5d;JN4qR5bK)M<%RO+s2f zgeJn)rfx;u^U_Uy^fM#UYwy6_%RlDalEX5zR#o@MwQ;J_jraFO)+93D4K(>dfCX05?{r~T)+o2<9SC#T~tB`;T(+~aYJ`1(oR z-n8|>a<73hJ@w1tI>%fwI+_ z491DkQ#50hvp2pvzQDMXL|&JDe2nWbVJp%ZJBY&gIw0^h&Z;u64;s8~W50%h_t$G1LA)`P6}L{OX?B zx+{$mbmcm>^(0l7uKU**)Rio7pn@Cv3W!9w0c(slc z&#N1n-ey96KO5gGzFd*toG)O9=H}Ll$`y;_Ky^96Z1xvNrtTZ=cRS!M6+1@AQI4{qwkbJ`UQuWUr?Q9O2M8(VKQ@r#g zJEqHDHMo@G?x%99?pfG0mAz%FqIxwoqx)slOD;@<^>^Aho1dJbtPW@TM$hz}zM5-n zrOFUlTV6<_Fm!))Pn;SJK4dM8?VZ1zvp8p&aJ3Anx9y3MmkiG}FKEU*^?Y|%=6JMh zHP4YgRa?E0*A$Pc30|e4q{|;4i61%KvA`dYTwJ0s_vqB3d_HYcbjwB6iLf`Lk5((l zpD!&t3f*>JbYInYo;mWB*S{-K&y;h~gxM|fRpA1gAT8sXQn>eGzlYc0t+|l9)YTVr z?@~Eht$Vi$k>)-*qS#N$WQyqFU^Qu;ZS`9fTJbr5kjIlk?}U%&DfWu;a!vc~ojI=l z_>xneI&|L0R!g{+=^jah8HilJh`xvxj=n6m&2s2OJ(FMsLlE1=+u6c9FBAHF)3}{d>iYui&jiIGTgINAn-P5;mRsel!F6V!c(H#3`=!C` za;w#33ilG1cXB=WE)%QzMfESErJ`ErpE#^P;@p2c=1J94?N4ly0>N&+58Ni*)3343 zmw493%pUeN#)_7(DmPUQ{7?y&E2@gfOE}vZtfV!^r0D3!*c?li*D(}1*&ny>4Pu}u zh1@2nksZxgckeW%uy-eCqK~a?VH@3+X{+=l<}GHYQi`MS+;jvQf%qo@oS2Dz=2v;T ze;&vD{z&LL^pTK+nW@>o-v@z*KL09L2kNA8VGsli>faTItcWjp{#8#7B)|lSr5BhhNIxG*K3y;Tw=RtqZ4tX8)E7N^< z?mMx9-T&rw&@UYAdL8s1F!6Uz|Nr}kK?G1H4d9rE01BpookQz-A%3e$_+KA?V0PE_ z@~sDtKaReb<#+a;IJ?i|tmg}#g;o)U_2?GCJ!wHSiS)HT`^~hzopqBx?;~h$P*BFp z?_VjKeeST32{-#Gl~!YYqwx=l$N5@g+ppGz7?0-o?9`-Uua4KXqdnRJawnYl4LLTg z^2+XB%<4(p7MHrZYI>quQLAfmLzye&}G>y2-H@1R~@9$?`I`?OB1$;HD zG@9n8D(}>LY0-$teO>Ubq|MjlJvYtBYkTs*s9rgenD(MA+q8(&YjSGbQsMmWw(_>T z&nP2@>7=Ur{nWxmO$06^#``Qxi zALA#c<5%S$i#jtbntbQ8V$RQ3{b4Y}9m>4I|6Q?liz~FhE_H2de>ux%(?9Sd;8os zQR1$y0*&C$!lKPjexHnFFIrFD9!AThNw9KHXmen!gm1AiPU`XMUVeBjOvt3C=b@M( z=H2O%=cnluZ&+dPC}nZIce+;M%$Q($!2OIVN#;2gau)1-9(SVd+vj|S7DZ(aV|-%~ zMfO@;FX)dkM$?JDWgp}Ia(uQR)6VPV7WwSB-UVExnQOo67Wvf3NXt7>9j;ZTK-D_V zIvGAf$&-o&+V~GA9&4rWzFcjsst#QEoT#NavwGk$_3Vb2IlcYl;z!g+W)20~APm*= z@y}8^7vc>sT29p8IxO5n-tje{cOm>iWY95hbEM&efX(Wr;v+1h8mo@MVH(OQ5oZqf z(#!@)Yn`40AJ7wP)4JwBW`q)cW+79A$h$^4JaR!X`B^l&sC>c7y)Z^`^#-b$%jvUK z7kPIA>5Zs!PnGqvbFY7!Ebm#KOb<<=vZvdmMR3oLY+HYMtlYQu4W%D6ZccNjYKAj6 zvpxQ~qUh9Z=VD5I#D}fTho4{H7b;@U&j^Z)np@hr>7AIhu^3i6zS8Kf z@?O}!*juEG`7YHZj$ysG@&c?qCl1*Mn~rbiSuhz~X4h?YUF<;Inp_o5&)iUW|4mdY zBiWuO*sfUmeZ!cl16|(itL$|qD&Bz<%~N-nW5oJemB}{LM!MuoI~ZUec|#Asjk8sYK?No zUb7ZTa^DeO!g?o|V2#5(Czo?teVBTane-}4zAaJo)4s-e)~)SGk8!XDN8fwNdG5oD z5b@p-(McDkXHp{tO--!dPvjnCU1}>5=Y1LaF3(ozHYtC`$JAjC+G7!}53f>2Nv+RP zKj=nDbX!}>Ka>0#LG_*eEA>(n>0G!*^Ow}dJ3sePiN0pJ;qGrQ*3sp=YIg4I-#->K z{tCvjZXdP=EJgnQ=}j))8GT>0=NXHI_a7u2`p+Wn&lZR9UlxawzNw70j;V@~s=g_x zZ2NDM*r3FtBkA!^zk^8oA?ZDe95rt)UsbVv~-$`Py2bbpRRgY1+C7PZoedB z^ZvMK_G}GtdDTH3Eov?SiL00+PaWy3CGyKAnw^i$`a9~oP8qqh8sbEROc0LWp8F5J z>!D?kL{4;nq02Zk{yf4SR4Cg}2^OlXWI8t4qEuvLVxDtT_w|wbgwR*=hwJ_1lYM%H zw%$}!JD#Mq>9ZbAO?KTF7VJj_?bsaF#~D=11xi03IT$&Y6;FRBZeeY&6qDKAKd=Yp zH$D41mHd6wMBuIxp#O+Ajdl`ba9`+2ior%|xaN;Cz$=h4=!$Fc^~ zADUMR72#Q+Lm;+w4z4$Xo2RxjZoa`UE9jp;6PDO~CG3GP-n@QO;Adv>yKNm7H$-G3 zZnn?zNw|H(=h=d71?@c__fa}gMyqAHsCl<*BMx>x#3AIXGs>c6v70g9?A+Y>tg=KWRGgiu>3ss=EU?POjL-d;lq5SfXkvXHO04B z-G`^z_SB9xRrK6$onoYS-9K1j@x3llhvE>I`j8LbyOqtu=5M!6QW+}*qIR$ucOP+$ zYRpQ9R)l^3LYh!>>q`eIgBl(AMg_L6{IeD}=jykJg50br^R4Vz0hz2BI^{$yxiV(Q z`#W!Xq`1_#PJLsXSAWn>2rDfkWrWXDiI22DOr4Gv9*X|B&QU9HvHLd98G-8^`*d$jI}6JcBV#(5d=$#= zGGxvA-FP-lD?&GLX}S0SYoFb9+Ii2}=Nlmmcb}08Aeg(fYm=TPDcXlH?#F!(Zl7~2 zt6U2dpyCu?%*h-z4T>{AAvWKilxV|KJ(QnT-xX(R-Lalg$3VJLf-B-()|8PtHB(}b z@JOJ3nD}#+q>j$Sg>Raz>r{u~2@^)C_%!Xjz!ZybmuRL~3^!#&$|&lFjU>t(J=#4Y zIc*)!=Bv)P^;o3PNnzdMtLD*$<_@Q_u8}J>4p*I7uP>%qxfpTceU8%tbA>|Qe0|uL zkPxA@_qRS!FqAe6cNfo8Bz7Ib@KYIr}W1%IpJU`Lqi1 zK=&f*jBv}O;PRyQF!l#zpKe5ajDPrRR-nv{c9a3C*aKM9l5l zN6~NRLdjD1ZZo03r~VL~PEzt$Z>ljB{C5B8euen_N7X+lp46WYKF&rqGI{p)O5@k# z!Zw_aUW)P49s>6lZ~H2^7(4lfY$kCWB8fGi)PAgU`f6gBz42!csv$#$Y^N4|Hl^$I zQYu<&f|(9E4XR5HW*aZg_U*mR`u)CPX_kdhwo0zU`Ae_roDZz9+#KUJ9hmWZ`jsZ^ zuxEqx=88{c%B3;Jp*QLV3-Jm*-sY#dte->;wzRi#>r~amWn516co?PARhZIxy5XmM zvHe1~orC6n8+FqK?(hd<;!J_%tNXv$eGrLRdGN}6w$AKrM?g{)eW;~3w5{U#Jwk_k}20y%vr28Q!y0GMd9VTSKx5Mo@;TD(Dk0`nnaz? zc+WxGb}{|A;YK=3EW-j<(jl=Ak0?$A+k9rba`MEJOJ|Z#z3$=5{d9a()#%Q#Zo0O# zW$#xeX(QJ=cn9pl6OoNq!prR+brq{{JEk^ha7wC93Yxe@1Q(3Y>y!yoMLvGq#p|iH zvYr;%>VYyj&+PXz?uS`<683`E@aI9!;GOyD^?|!y!Yr>v&L4N%^=raxvP#4E{MP=6 zPQuHgO)9eaC}#o3F)bF7t4IIGzc$W(pG%(bImdpid^r0@ShR#G>$^P&}6BmjMYi7=L}R;dh0L{O#Ke|7_#0fZRWu0bj5AwclL^BWzcH zn-Bl*BU5SsgWz*AXe9XZ3LgK*s`JR-f{_2+JlthUX!z6;&BGf%x5+ufs)1N-pj=(b|7we?Tw z-VOWj3p=TAr)oItYL1KfFqBYh{-n8HCod=@K4JEU0`UmU|8;-}MhpLI!|)dYLcbyM z>#TM;Hpt)NsQ)$$5eOs}@W+2UOdJNa>q9g3c89HKIs*nlV!--`RO7_<^-nRW+ai;S z*=@2o-=hbuMK54DPrdD+I{#7n@cH@d^XFgQH#zsU3tvjFt2<1=bp5y#Yu2~7&TgI& zZaM}9qWKmF9&UzIi(+})P!}_vIeFt&8oHjYC}xtBJ~Xgt3=uF)URUU|DVpuG8F;^O ze&36us1Ozk(JUL%>-JcoJg1|!2hyrN`3_VDH_{*4*m2*o$IV32kO@hKvj{J8oJI2> zvy3XgG4|q-L3xGt``ztXPK()7w>g7uD|qA*IAq!Y+_EpjiDw9$RL_Q0X$w-oFwUT1l)xj7e4 zag^5dZoKug@^d}pYWs|&T6M&vwa`u8-Lr1{*jI0w2rY}Z`B_61Y%D(-G@ksd!1mFc zWa-YfSW3ngFSuquiO-~(TaG&FDtRHiJ}N@Ce=JI!v~!?f+uu}7=_PGIb1b)u!~V!( znPW4JIXsv5<*jShZYm+Kp{yA&#>!%ek?E5uwCW0;8c5X>)rV&KPTxC|a{sB^_{=xD zoxO%xFYK?(dl)-6h^mh9>s;XI_AooW{_O0j5#w`Cdeq(59{R|nhxJNGzUi!Da6CBw z^;i+gGiqx(XvQZ32QPjhNGWN5nhpIH zFg8zPQC0U=U1(V89REYPiy;maTB^N4^sy9<;dUT=iJs)H|p0{((f@ z{L2{fF%41U`Oo9*nJ;n6FS93%gzIjO6j0mvu$+CzIKLxSc5QVa$S+OEWyA8KEOw|r zQaF?@_VFs^(0IW7s~GB0*EvQxYZCc;HY`e{*F5hU@)epH1xwqPttzI>DC)Dfo&5B! zQ%zd!-1k<+7D>gk4`0;?y}U2W7>yibTY>w1zstoOa3nRot$ z;Iu-QZk4qT4%>d^Mdp(OtJ5Myl77su{YFUEp4RyYT^uOmE_GbE^qCnk5H&W^zxQ?c zg&nv27ZF9Ql~pAlI;sTrgp63XW%-4(aQmDa3DcXDTDX6~wOZ@#vi10oD3YY;DcMn* z1MdYT;&g%^lk=Ki4OTz9^E_~8U**#62a)-n=8OiVU%6H<+J^DF=?=IwcFx&}m$Z0S zqaA#EMTNAPuAJ7YJo*0Cl28ImV;S$1fCy`QKPW-p%uTT%6F#ctV{ckNSTUPJX0St6 zowE`&ayH-*O|iy@|Q z$nQnxyhYoO)k~8$Qw5JU*^X#37Uce%tWF;L@L(j}TqQR=hyS77WctmWJgQd=MOzYW zB|8UV288c>J;|l94ll6UZYjU*VFhXr70}dMZ)WS$**g|^Ong2l-uNL{g=|M~Znm*d z%5cE-+iXeR6RlbNM)n-e?f9*Q`ZQd8zg`Tg8l`I(jLH~0zZFs^?f-;x;grDska)>F zM#HB;p^ir%%zY5n{Jc&cEfrTGyX4m9CeKzbUaiF8JD&dqd} zcCKw4uGGp|-FJ`QqIcHE>j$UI!hwUrdxk(|4UEB=@Zy`I`ibJ_r@e=bp6Hu1wJ-cd&EpEZ0!7K`7aj zj0k^0Jd?~fKTs#Tf67CVuOdxU_rkLTydvS|tu&j9S&yrxs}GN@+$|ILKA^BUN;xf zy`%vl%TFeUzTi}>oXkh(bbF5Cp9jwty6&6UyN{BLd5CPafWLO}YGDNPDAhdOnu_M> ztGx=5Cok~m@26}irbhK?I6m3*c$kHXY+>z)9c-4j2wL#x?TABr$B8udSQnu7c>ff5 zJa@*3%_IJrMnR&Ujut=W#nYHQat9AOqp&S)I0E8x?FV(A123PH&MK9N7Lk{dgh(HJ zbNoc;LhxL?j32ovizg`w>)b2kgwzhr)Qjg!)Bz56Iv-7~SFgK?248u9m)A2``u*w& zO(c#%A@j)=Ns{X_Ic?k9%XBr8BVwEm1p<8<5sYpt3isK+v8(FVMswCbkc*}Qhd%C_=$kJnh1aa*Fyy z9@#NO&YsueZZF;Y8~l#@v4z?4#lHwYr#0x`65b*qdGyO8SuLicYQ1+R$LdWzx-uCH z4l=$*pgDt1Yrl5>H&RD=%|1dt|1AkK}GA~Tw_-loL z%bwvaNo?huHBHrfEm+M>*V9n@x_y?yTzaoN*(}8cU-geLP>qZK8PBop-`E$v(6^|= z)$ka9!W@?!v+3SpJ0`(5uf}?|{KR2Xi*;&oBhjA$wb{A{#&|;S3{k&(Dq}UfWYxxb zGv2S&$^I(26mfA_ZT|ZTfu)==bx}PLGZW&k zl~1h9{Ai*@ln1;~lQw?4=cYRgk~4vEF@B=+1mCGkX?pI~rt;C_Mi$xU#~kx; zWAFB*@%y;1wcZ}^Tzh+RuaUW_r>X&)( z^dvd-1LV$swvc2yVPd4n@rtvx`uoyR8jTsR{!UTbm6ke|=4~H(j` ze^PqJFoTdaX#p) zGL^L1kFR>>bw(;WoegR^@#Bl8vEjOp%#|1PH;Vh@y&L_rlwBpRxF#!KkPn+I*Zk;b zXUcH1=3*8Fu5teI)>r=rV)*JbyZfhNUp*QL?&}^C*BagHu4mD}BQ{PGU-4a39AU8U zi;R5qI~uL;YzXd^T-QE_nfg0oVoPk6a=p=y>>5rcHI8*8ZDjTDGkhENlDc}4u{wvl0%dCZN%!XSTX`KT zgoDCqRvBmE>n_Ko9@|?#u3I<2IqZ`z_;clcq~ywFgrv#%vCXUG zy+_6wZOSO5JumB`s?W#(R^HKPYJ=}&4qEffp1UVF9S*ZUx|S83bvs%s7t zKiNIea*DvZ<@iq~9RW=qE*lD4mt9yy4CqPgFOSQqdM>MOU6!8HdDSXA^$8!AXj`_w zvA3&k`SFS@YQr*IPk8O?zQ~rE;1}|r+D`vWT|{bL=Ht$)v@gD05b#LQfOC$9gH4;< zzvj@P)xz@=o`Lk7RUB{PP#MgkC$mbsj9XtCWlvPHcEmIp9yy7)^PFPu-}Zm{$CmF2&xf!3H#w9pN#0O6JL9^rF4u*tuzaEK2^?gG24#_kDAg^sD$(Gn$#J z-cK>kVSXZ|rsku8zCMFx!N@yIYQnwDSMxbne$-gV6x8ZpJT>0-X{{zjP%A|05<7dw z#-PA}t6*-WP4TTThd#l{MbfU~cULUm@D)oQ@FI~Uqu15ecJD!agqT+Mp)tH9_v=y?(68XKHJ^P6l0$_5hh-tU{I>Uj14J1`YSx zUfxr=&-_a0k>bcb6r^wX_SEm4BN?RHYsGnMB zz@T?h4|Bth1+rrLr)I-12joa2gXu)RCQ>|2a8FCp>(N%7=*oA$F=^hyk6RAk_GQyM zv$t#Eb)9~Svhbbk2a>u_@(8Vc9>`-eWvQn{QRry_IOUf*&o znxn0opZ)a0(uv%k^$5k)$n&pQiG5Q<=Z;LnE=EPSaFK-J&#rYpz$h|p@ORflt(y7Zw!6^|b-2pnO` zp&ilB&PEPeb2sYrZ<}x%c)NGknh^5bMPgnt1g>|p-3y3!M|^*ZXpNj`)XU-=$k;4? zU?5ff?D(YT`s0r0Hzn{jugoUw7(MT=rO-;&^G!B`4)UAwkcs+2BFx|1NAn-sLAJG13t81ljVp-v4 zAGxHQY6V{%E_LfmUM_oKR|w->iWIv!FXMun$!2QRdG+mmw;A82PFpkPP-qbiQrFxyw<~({iYnKrs>4T$lLc=~?&G z?9msegL_hVbPYbuEFlBfG(RM2%3p0i(K7h1c<4((-`;}ie*0NBPkS#nhVr8>4Xsh* zNQzUdh0Vow!+oc%TE4j0N(QpGC}o)B=&DFItWPyDQd#>CoVMFEq~iLT-!FYEwW-WT zu#wHPePg+!|3=C8g{l1)wi^2~-xgRnO|fbItgp@k-$Y4%^b@J(E~6n{Ief|d8q)2P7FYZgp*$xGUd+2&tK9{EuaOA)n(a0Eid#a1{faEqTfQjfijX5d zl((d2FQ3+&6r;eQ#D*Dl2X7<4V{ixnTOhCehBej<| zxa!%CinP+)+&5eLXN5WT#G~6B-p`)zd*mxrE2oKEK=ezVVMbHbla0T?x2q;9vP*L& z>vQYa#o9UeFO;f4!k* zUPn#-N|V6tTZ-$L&<}DoPv4uUOblMHX}DvSqC?h=O@CqKJ0NEBK0!?_JJaj(!!pIw zQ?1uDAiIU zn9Ma}|HLq~hZ;@x<+>Zg&x29>8K$C`5-<*x>Gv)@G_=nw4#9i6&k=0p8Ezb9^=il2n6q6FKXXT=PB3JzRZ5o1ff_quZj(`+FL@pCPEdoWPX)uY{{pk z?2tgrD>Cc1Eth3geAX^y?FrnQBfV{*?xac~FYYjC9`UeGdHHAj!04CRCp#Ipr+gcq zc<@bkBvi(%8XvIQBT5;UbC}`&SaAvI=Wo5DGaR^DBOXV-L(I(v22GLM5s#syP|@@ERVvTYy~-@*2>%(I=@g@=}Ec;YnOXB$Da7rtC6-@oNt zJQeb+)9uMh3wus=pRs@`x^j}ESj4lbJExfUti;)^n(Igx`| zFJ>s4r9}kU%4kpK>R);tjcl*|sOl)}sIYxy+i*=zB|69fxrIBqt>R)htdmOt4T+>(d2JG zQE%UH(W;u$J*gQml!s(^J#_43Q|SR~{(9sKy}2rFzj>a6PyC0jpA_^N;yfu?JC{!( zRr675G|0f!U+20!ql)T2*A=b8GtXJg)2V8BE|*p1AEG&`U*-QSV5rq@o4GLz&uhkV z|BapLWHuuH*7I`%pP$};JuIcqP_&S-pZ7_=Xerp zc*Cuv#B6!FjkY11Mn4av$(DMcueqqpVKyl-{V>^X7kMnh?1lEns%3jmOawhkkd(L` zA>CJW>w?0&q8kDEBS~UH?ALRr3RR9ixe;6VCOC?HaR*&ScX*q-ZBwgc>w;tKNab@O zdandR*KsfP&+kVDo=|oS99K~2*W65Y+w*Ftckq3o>LPU!^DBFULVWp$FkhPhsmJ&& zH@PU|v`NjXTi(63lbO9W?bczuKkD5%$3C?twM*_7pqU;+%{aZOICNrl3SC|`` zrUk4|qY5fjRVK#1O%H9m@}&wjT74dV5F2>7jWhFrk|N#X`}}Q;7D9w+6}1Nr!>nfG zUJi_%MX@7_C)s0<8o2PM`1|^rP?hR+7b11VBJ`u#OhnIpqU;u zt+!zq`~4r!`hC9pl{)e5NJez+6*D#lI}=d(*lb#P(omwBQ@-T5K8X1>j5|U=!X5Mne$>rtSzGC|G{ijfR zt~m>o-pVV&Cpp;{4_+fPL_esJ;l4CThVJ67qjUN;dDTpP;+@tD_UEcBW$(LqN zb^OmrC;7FI_ntcTZHUGBrW!)gi49@g(r;ZIy=*X_HJX>3_h~>CKkzYdFc`8Nq{oW@x%QQLhpWbAS8lL1ue)90q z!5Yr39s2$~jf3IS3)GJn>~F=b=vhx^QgSSuB6*)Re%N|&^P-T3%ulinPMue(3L9pO zA?+=^DM#-09rmgibGK)=KX9aX>*wff-vgz&_%)#d@Ad$N??H6wj~rvvOzNXunbudo zxu(vhai#ey+zohA^dYjKG*vsuNA}Wd6B`;+?wBJtlHKq6c+X95YHlBGv=HN*_h>$T zj=^@ErAPeYgka6+=Qm$IeO-F#R*l+wc`paYg4nZiX5-~OI%fxhQ}=kBRE$P|&n+H1 zr;fh%rOTAxEdQ>a=kX{vR}^!}aW^-6vG+_;m$$_X1&Zw%BHy^qi`e$J1&8)&|53>m8qW$MAPsoW#{0z*^UFul+8J}$OAzOaVHeV|>y>-L7kpAZ*6iM`a za<^$LZge4;tkBL?mn%%@^tptN(TUh+-+um}=-c12%IH}-(|UNZfIZ9L)#DMPy2UBq zANFE=?mhNpTU6Ff%bl8q0vXAK2qs}EuVbaA#mmR4WD+e%j_p&lCh1EW`$}@>g#YtY z>P7kReWnk2Ca0CJykZrM>y*1HLVo68$elR#ddj-TWz)Z*tmm);%TVppCdL zg7>9N;*VqSC>x@Q@b%03aV37FASHa0{)6TCbKaZr;%Z};Y82+W38V|#_dKI9f~x88mgBOS%ht9<`;l+su7j(R?WeUKR`d=?hZ|pt@xG5araT@gWqhlG zY0@H#hQQ%iTRfDoMfbtesE$>D{)?;@t<|>PV0YSq_bbO-!g4QGDXKq_nVM0JGIL0|J_RBsPjLQ~Mf>j@3M~HbCqV=r z3>OlILW3*ee^MzB2rlr}hX=d>`YWLVfk1O1F(9oLWbyu!SOHRYxd?bX5)Afxk}l`3 z5*471&$Vl2wrA8hksysF zx!!%3{U6dVVM)5bkhLr4;=iNh|7QXQ3Jb80LWATJVn)f|b!jxtpou9Npqdg755W4b z+Bo0=)jx$~aHunCf4BY(4#xO*rJ=t@{QG}@4+h}>j6{!NYmVv!4OxxpvvdyW$fNDTH{Mu^SzUbB6MGPa``J31vURuHdFn$HrD$BrI5S|icp-jS_1>nv!KTi8Z}xndDkBLIw%(}byBSFxvt;LUeB=Kh1Tg<0 zN&Ro~B?^XJ>Bs+_?Em+n4y z-!NhZJ@My^=`R?9hX;v6gQT$EV8nm^N~VFr2q2r~cNiKxSinNYLxQdZK&!vCLm&}Y z6aj4FHy95Z4W0)8jQ$1#YXNT|q3tjz95M0xw{|>e3<{3|N!U;r4sh{q7#fd<^~E4@ zyVnQC0}Kg=f#;IY@h}9`?lptHSb#xjJ1h?l4nttzFbpyMfA^ZP1RTiu+6}{@P>?f1 zV{lj$Y|S_V9Dg_hVfPtP z50DkS9RUZ$9|6S!;Tht_5NOz%Q5a(Bz1{moVgJw<4>%ms4$T8!9~u-LgtbG#=S71D z%CL6C=fluBfJTGDfP#YI00RnQ!P)^rfWgo(Iwb({vb!&lhCuB^XkP*v3mFfr1P$eL z0K-Fh5CbYFq9J$&uwRLzzvCXjFi^TD!XUDa2fzpz2%a%KfL!|!g#g8}W}>my*Hx*N2E>0}HFFf~->04jj$P|yx8OHe>> zL3tX5K%#fk5Dx~0z`|$)g&^?2`XT{!K=1-i2nRiL6cPoIr(g~w4y2#&=4lilU07cf z0){^z#i2G528F^x~7GKO7#;M?gYA?J%G~5iogxBcLE>&I8(^A?Hhkf#ZbW z6u1UZ9|E`rC{THK_gNC%1sDw2*-%*w;!{MwbQc}qfh`3+b36i=Vz732EEM;6pcr7| zA)&Sk4+ak&4#C^u;p;)khxaAGc#wc6 zRv!O-zeJp(p|&!X`1u_OUVtNsgU$;O0D=m;#^V7nH00cfFdQ+^_&W{&3>XM-7y&|m zSfc9(hvA@n3B(@{H0A+dKzKsu0DjqS9DwzKxCMkJ0SsoJVu9rY_45D>xahm)AmS7U zrBf^tM1P@kpm^}GH3J<0mAgRG!t5&m!$bW+00RPM*IK~0B!I~U;TZsf*{1*o1RJz3 z3JH~AKm`D825SfN?Lj*{ly(7(0KpYl9}uUzc?;kV2a{Le%^@rn1R_;1y9vOsFxo|d zunLq8z{4k~JjJ4ctqjEh8aP+bb3+5W7)rZnpsJyCg$5=t6!$>FLTxUf8WB)`2EdT8 zeV{@38@3jp&v&ndh(B?SX#5oTjNmCP1kVHl5&^|2fT1uDx&kl^26Aoy zhJ(f<01Ozi(6s=bhS3P@N3s06e`LFGLs~VowrbU?;oB18auLA!0jd9E1pi#>0p(93-YdgrOiZ zn+QWgc#8(!K%^|_ya3A(JB-*D3!@=01@W76yY>P4LShu4FHj4xd67tn4kfn3gL_QK zct9k=@Qj4o=)}G_h+ZYaun;>Iz)(9YKWs0S72>9S+3{8V!-1pf9-Kg5eJ+ba-E=O-<|z)jdQQ0dfyUgh6#95e8gV z*!rM%JH&QC0z%sXB?X5;UeDBUB0qJhJpF#xbPB4a}50Ky5@7r2+O zb^y^Z7zk&>U_g|>$HPM60$?q`O@W>-66jE<%>Y~>Nc@V}7fu^Qbq<>ss75#pTwp?R zfWkrI#b6GQ)&%d1hT|SMa8RBBfnb;%2U~;L#lZT5*@Q?CwuRvZWQjm|1_`cu;qyXc z>tG+?3KupW@Y-Q`2DUtGzhEhF7&tj7{(!##mCs0!)B)=YOib9kAd&=wVZi4ep>yDY zISPe=yFeHYfJX?2!Sw>rZZO>qTx^KH5AX+KeK7oi>mE1^0h6a7Vg%Z`p_Vk8M+p51rG0v zhsj-HEEk3YAU0rY0rz>Z@j%!N-WLr&OOWjcJ2#*jp)wmq3<^T`0b+e{7&O-aoCokz z;OBvZ<%pm#f8ap^9%c`rz||t`EJ0`vwia-Y1Dh8MlK7ze0Cx#+7&Lza>;v4h!*CB$ zSYYRih34!K`@(%DaMKHm=YZHc%vg z59qvrd*LwPZa{H>27Ul^UU1g|vx|u-W6-|fo&-JzxJ-bp52R|q)(509bUffO!Tf1( zn*x*1z;uN9=irtT=93UvA2tWLAcUR=CQ3q?r{ei|oO#1 zp$Rw`Z-Kly7+-?KYdHOZs}Jb8VZieM=zc-u3nrU@`3&=2!0iG|#sW_l=9dAsgxwi} zPz%g<1PR74f0~%W2c-=R2!}z>7q|v6TLl9yK;V7hat*vXf#ezxoh@*!4n1=abc6B? zNdATKFR`Qy!(;@AI>Kxf;9oq$G?s zK=KjHF9S)gaGn9j20L@&3jxTyz&(QTFYv73cm_lXJ4=8-_#EIcp>u#F4CsEr6mS?& zp)fuNsun&T0lpSMFfe(5$HD3J|Fm`Qx^^5#6ozv?g%ZUAOdWC`Ku~4_jttmOpuh&4 zn1Ia4Pw%hj#9aSm8;zOiTXkJlt?Dh@TD^-Lnt1vR1tVt_wKnthZ+=-9K5N^GGf1^{ zFY$A-R&rh$v-qfO#a`b~2r_0Ao6PN19>81b#>g%kpYgr?dC=@R5?|~aNVR95ecN|= ze>oq>oWrp;7Vc!`Cf%5|zq08WA3A2R>o=5`T^B5^U>O^h7KHb$OR5hVUNcsKJEr|kM288P#~d0#zrDx&Y!H^a6VJ}{XF!>ztLB4hdh zaj!1`J&o<5)?&**^~rS@aeRv-6lN^euWiepG!MC=)!AqTi8)2T@k@@dm-Pb~<$D~l ztP7RhcM0^I^G}~7Q@8C6fR(nl;Dl-c;seWGCiYX!IowO@LU^-p$9CR+Envn%0Q>IN z@?0NVdx(iG2#bu%+ouihA?pIZ>T@=3$1E<3jsR_D%&^UzBN$%R0CW?*3#!WgKG-M` zQ@=-bW-M$}`sJ==4M0n2Q!be`5JvTT4`U9u+rHry^n1;3eU@(AHJ}Z0W@I1}yI@bo zhH^{dtJw1RG@eR+OJz{@h=&>7E>jf$#c7MJ{d`v(j9h(2dsum48I#K*y1^$^5k&4k zi%HUl^zX{9%zN}M*gJC1i-_(tlIUGgO3ttBbYdI`clY;!FL3GKm6t1>TN%ebjXjbn zir(dAN3ZE2`igtn`J$Gs+=B|D6G8uJgB%9C@xPOm4dwf*54gbbUsPr!PN8z5n^buP zZ$jg)AHh)Pym5ZE4eKE>1j&v3NioMZLKzZk$i~Mm(59USg|NB_q!m9*9a`m?z+_F8 z%0!0zyY~95PC{k;3eoobD)rd40?lD`S5Nzy~@wCM=vTT{R$Cxt(e-x zF6sgkr=W~wt)$w5!K>&B|M{iPYh_ZkWO7Q%1LDhrl@o)#9&7+4GI9WUP2S*AhFybK z;&`i<*Z}$x-Nb!~U*~khXLx-iyd(Fj%Oa;QiL0EMD_+`nFeDBBs zQ=4^`Z`?D@YQ;8kJ7eFhO7cQi>XAO^=k&pG>iG8V4*SMd^n2w;xMm{0@{0r0cgrdA zUw5&CD$=9>M1wtp4ny|bL6404U~~k5&R(7%?4G}n^S13>l%2MRb#`%Io_pY>X{s*a zT4Wv%d^5D>t}|RJ{h|f!8lXw{%slY$FzFJPp%p}zxT`6;M5RLfzjsj3p0_KbichGh zW@QM}7hUoW&)&7VJDu{b^g^HeIsVm^Wpym~-{#-f&%Coe`5rsdci-bvTY=4Gfnvg6V&$b?k9|-9SblrV{sW==0QbdeA1j*Kj7=0K^gVnv3IXk#sWlcAK~Q5+uk{VB%|Ub>&L;GF)Mj2r&p>s zwifyvy+*C|EC@EzFA7HHX2{udmuSphn#aR)9Fx53`n7o%@V|BWsw&UG?fRWT-!_m| z=0Q>BT{-%``=B>;JhGw8wfQa5w|c`G?7cX*zrmIcx#_tis3R}lbyLju^VJr7S6l9< zVFC6&8DqI3%Kcty((k#wgX!9Wy=sd+(iVJ8TYSPJsju8?OKpp`;LqB^nb0OdxN}oz zllj{6k#R&de%!vx=N}pJTzJjef`e#F?VPr7iM7RVr<=l2*Cr6%@u|zt+>q7gEO-}V zYTmWVYmZbFB__F~!`eJ;dnW?fVD{&nYYUd4E!c?fsc@X}K^fMU_wL?bqF;B>WWLgV zyKgc|*~OXBDu#GI_$0{S{1(Zjy+2SW`=t zvA~;F4ycmF$b2vP4{f62-6O$$$CrEQEY{u~qv;jjQJZVAwvTgyw@tZF=Jt9mF2H~! z51}o2t8eA|S(kS#wCVSh?6xrs>%W}g$~5XJWl-X)jwoNBt9%Nt(K0&3&x7nNk2W5$HQ8cQFE zLp`_mbiiIv5z_}4Wc)Bo^&sQSLgr>kGY{#!_7U!zK7yBML+aSMm6vPVQk$zSwFTO| zobO@NrLBI>)zN1jeCn(fQegT(&PyM<&00y5q>sBiX2%BtZ6DzeeG}dEfjE*r*rW6z zR7)R-0GWrSY9GNyzFlR}K2nD!iJdxJZNWgV8f>{j+LHIv=CXrbKgpuZ!}ew#eEzHz zAU*Q{Hm48ZaQdL?(gz#RKElbTCWGnUwI7Q&0djdTJ6~}?`pBJ>^nth{^ALz;9`6!O z=>x!)w%q4&>TlzeyV4}*{O*t4K9p$3N0J>(tc!k{bADG??L1IdW8;-H#Kxm7ZC)IT zWY9BTjN|x@f8dtHR`B`PZb7A@H<*BpSM~cjHb7}c*F|Av`j!99nl_)zq!5^$+goFe zt0B*GXq$UJEJ5tA5GQ&_#;|Mufaie25*t9O7E{GE;Ee7(S_A004v#)U!)|Ewhy8fIk=*geXjot zAed=v@R94CKFXu@?t}b+WZG|WZ>41MxzwfR?5hurFV7rpK2MS!`0UBL3|hU zb+Zkj-1UR~N7jT#k#St1$XfHn`Y5JAt8H$_bE&@+f=R0H_&)C)*cX<$EjG_3hvvE5 z_oZ#`HT6BIiO946BZ$19x?~L`^fG4joUHQ^re@4iN}X?UZ|6gBns<}KV9XnnxP>_w z3TQLB1O+2DStdH`f{GnK7Bw$^30JCTp*2oAO-}fb@O}@4YW)&kPIRoJA3qGssLz4$ zR`03_jxR5a?{hGUyi1X1kM6>Z-8aW~&(_h_SJq^w`v=D4!SNp z{xfS?dBL5@+!U~8ZVE8>EXWjf% zdSzUkoOclr(ua_9_fk4Ec;a1cxNE8mEq3+N#CXh z_^w~V0EAO13JpJ2Tkz5SlXkr&Ez@3CeV<*h~^fC}QPTxhy}lQs_i^h?+Mzi<2X z_uu?m=I Date: Fri, 19 Jul 2024 13:44:20 +0530 Subject: [PATCH 30/85] fix: deployed new IR --- deploy/002-interest-rate-model.ts | 28 +- .../bscmainnet/InterestRateModelVBNB.json | 59 +-- .../f3ebf9e67e90c643d9aab2ce73e7b9f3.json | 362 ++++++++++++++++++ 3 files changed, 413 insertions(+), 36 deletions(-) create mode 100644 deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index 3ce7e3865..5a5f1bf87 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -7,25 +7,33 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployer } = await getNamedAccounts(); - await deploy("InterestRateModelVUSDC", { - contract: "JumpRateModel", - from: deployer, - log: true, - autoMine: true, - args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"], - }); + // await deploy("InterestRateModelVUSDC", { + // contract: "JumpRateModel", + // from: deployer, + // log: true, + // autoMine: true, + // args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"], + // }); + + // await deploy("InterestRateModelVETH", { + // contract: "JumpRateModel", + // from: deployer, + // log: true, + // autoMine: true, + // args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], + // }); - await deploy("InterestRateModelVETH", { + await deploy("InterestRateModelVBNB", { contract: "JumpRateModel", from: deployer, log: true, autoMine: true, - args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], + args: [0, "225000000000000000", "6800000000000000000", "700000000000000000"], }); }; func.tags = ["InterestRateModel"]; // These contracts are not deployed on a live network so we only want to try and deploy them locally -func.skip = async hre => hre.network.name !== "hardhat"; +// func.skip = async hre => hre.network.name !== "hardhat"; export default func; diff --git a/deployments/bscmainnet/InterestRateModelVBNB.json b/deployments/bscmainnet/InterestRateModelVBNB.json index e16b95958..a89bb0632 100644 --- a/deployments/bscmainnet/InterestRateModelVBNB.json +++ b/deployments/bscmainnet/InterestRateModelVBNB.json @@ -1,5 +1,5 @@ { - "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", "abi": [ { "inputs": [ @@ -248,36 +248,43 @@ "type": "function" } ], - "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", + "transactionHash": "0x3dbfb3c0dd7f688a48e578fe68ba130be6037d6b6367ac7867ade50bd2669db5", "receipt": { "to": null, - "from": "0xA6575f1D5Bd6545fBd34BE05259D9d6ae60641f2", - "contractAddress": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", - "transactionIndex": 220, + "from": "0x8BDA9f9E1fEF0DFd404Fef338D9fE4c543d172e1", + "contractAddress": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", + "transactionIndex": 142, "gasUsed": "468712", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000001080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2e26f3fd3a2baf7076b8190ded4cd88d84c9430ccf9e7cae9aa257197e481dd3", - "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000080000000000000000000000000000000000000100400000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x37b5ab4063f8bec8ae68ca2f8495b111cadd563fd2c263dccc35ba89ad1f414a", + "transactionHash": "0x3dbfb3c0dd7f688a48e578fe68ba130be6037d6b6367ac7867ade50bd2669db5", "logs": [ { - "transactionIndex": 220, - "blockNumber": 36583930, - "transactionHash": "0x5f81b937ba3fad34d28ec5b5d44e330c490495095cd5f62c998c60f33ae62506", - "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", - "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], - "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fbc8cb15000000000000000000000000000000000000000000000000000000969d09c0b40000000000000000000000000000000000000000000000000b1a2bc2ec500000", - "logIndex": 440, - "blockHash": "0x2e26f3fd3a2baf7076b8190ded4cd88d84c9430ccf9e7cae9aa257197e481dd3" + "transactionIndex": 142, + "blockNumber": 40603987, + "transactionHash": "0x3dbfb3c0dd7f688a48e578fe68ba130be6037d6b6367ac7867ade50bd2669db5", + "address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", + "topics": [ + "0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fbc8cb15000000000000000000000000000000000000000000000000000000969d09c0b400000000000000000000000000000000000000000000000009b6e64a8ec60000", + "logIndex": 416, + "blockHash": "0x37b5ab4063f8bec8ae68ca2f8495b111cadd563fd2c263dccc35ba89ad1f414a" } ], - "blockNumber": 36583930, - "cumulativeGasUsed": "20317034", + "blockNumber": 40603987, + "cumulativeGasUsed": "16249455", "status": 1, "byzantium": true }, - "args": [0, "225000000000000000", "6800000000000000000", "800000000000000000"], - "numDeployments": 1, - "solcInputHash": "c3599fe405114938035c0ee8ddf55b7c", + "args": [ + 0, + "225000000000000000", + "6800000000000000000", + "700000000000000000" + ], + "numDeployments": 2, + "solcInputHash": "f3ebf9e67e90c643d9aab2ce73e7b9f3", "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", @@ -337,7 +344,7 @@ "storageLayout": { "storage": [ { - "astId": 8756, + "astId": 9110, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "multiplierPerBlock", "offset": 0, @@ -345,7 +352,7 @@ "type": "t_uint256" }, { - "astId": 8758, + "astId": 9112, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "baseRatePerBlock", "offset": 0, @@ -353,7 +360,7 @@ "type": "t_uint256" }, { - "astId": 8760, + "astId": 9114, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "jumpMultiplierPerBlock", "offset": 0, @@ -361,7 +368,7 @@ "type": "t_uint256" }, { - "astId": 8762, + "astId": 9116, "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", "label": "kink", "offset": 0, @@ -377,4 +384,4 @@ } } } -} +} \ No newline at end of file diff --git a/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json b/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json new file mode 100644 index 000000000..c436d54e3 --- /dev/null +++ b/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json @@ -0,0 +1,362 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" + }, + "@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /**\n * @dev Retrieves the current slot\n * @return Current slot\n */\n function() view returns (uint256) private _getCurrentSlot;\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[48] private __gap;\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n isInitialized = true;\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "contracts/Comptroller/ComptrollerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerLensInterface.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address. Defaults to zero which corresponds to unlimited borrowing.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" + }, + "contracts/Comptroller/Diamond/Diamond.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" + }, + "contracts/Comptroller/Diamond/facets/FacetBase.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n\n ensureListed(markets[vToken]);\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 borrowCap = borrowCaps[vToken];\n // Borrow cap of 0 corresponds to unlimited borrowing\n if (borrowCap != 0) {\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows < borrowCap, \"market borrow cap reached\");\n }\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to unlimited borrowing\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to unlimited borrowing\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" + }, + "contracts/Comptroller/Unitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Governance/VTreasury.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" + }, + "contracts/InterestRateModels/InterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" + }, + "contracts/InterestRateModels/JumpRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/Lens/ComptrollerLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" + }, + "contracts/Lens/SnapshotLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Lens/VenusLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Oracle/PriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" + }, + "contracts/test/BEP20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/ComptrollerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" + }, + "contracts/test/ComptrollerMock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerMockR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMockR1 is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n event MarketListed(address vToken);\n event NewCollateralFactor(address vToken, uint256 oldCollateralFactorMantissa, uint256 newCollateralFactorMantissa);\n event MarketEntered(address vToken, address account);\n event MarketExited(address vToken, address account);\n\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerScenario.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" + }, + "contracts/test/DiamondHarness.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" + }, + "contracts/test/EvilToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/EvilXDelegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/test/EvilXToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" + }, + "contracts/test/Fauceteer.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" + }, + "contracts/test/FaucetToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" + }, + "contracts/test/FeeToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/FixedPriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" + }, + "contracts/test/InterestRateModelHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" + }, + "contracts/test/MockDeflationaryToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" + }, + "contracts/test/MockVBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/SimplePriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/test/VAIControllerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" + }, + "contracts/test/VAIHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" + }, + "contracts/test/VBep20Harness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" + }, + "contracts/test/VBep20MockDelegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" + }, + "contracts/test/VRTConverterHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" + }, + "contracts/test/VRTVaultHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" + }, + "contracts/test/XVSHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" + }, + "contracts/test/XVSVaultScenario.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" + }, + "contracts/test/XVSVestingHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" + }, + "contracts/Tokens/EIP20Interface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/EIP20NonStandardInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/Prime/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" + }, + "contracts/Tokens/VAI/lib.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" + }, + "contracts/Tokens/VAI/VAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint256) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint256 wad);\n event Transfer(address indexed src, address indexed dst, uint256 wad);\n\n // --- Math ---\n function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint256 wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint256 wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint256 wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint256 wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint256(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint256 wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint256 wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint256 wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint256 wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint256 wad = allowed ? uint256(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAIControllerInterface } from \"./VAIControllerInterface.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerInterface, VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint256 public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint256 mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint256 repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint256 repayAmount,\n address vTokenCollateral,\n uint256 seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint256 feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint256 oldFloatRateMantissa, uint256 newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint256 oldMintCap, uint256 newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @dev If the Comptroller address is not set, minting is a no-op and the function returns the success code.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint256 mintVAIAmount) external nonReentrant returns (uint256) {\n if (address(comptroller) == address(0)) {\n return uint256(Error.NO_ERROR);\n }\n\n _ensureNonzeroAmount(mintVAIAmount);\n _ensureNotPaused();\n accrueVAIInterest();\n\n uint256 err;\n address minter = msg.sender;\n address _vai = vai;\n uint256 vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n\n uint256 vaiNewTotalSupply = add_(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n uint256 accountMintableVAI;\n (err, accountMintableVAI) = getMintableVAI(minter);\n require(err == uint256(Error.NO_ERROR), \"could not compute mintable amount\");\n\n // check that user have sufficient mintableVAI balance\n require(mintVAIAmount <= accountMintableVAI, \"minting more than allowed\");\n\n // Calculate the minted balance based on interest index\n uint256 totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint256 remainedAmount = sub_(repayAmount, totalMintedVAI);\n pastVAIInterest[minter] = add_(pastVAIInterest[minter], remainedAmount);\n totalMintedVAI = repayAmount;\n }\n\n uint256 accountMintVAINew = add_(totalMintedVAI, mintVAIAmount);\n err = comptroller.setMintedVAIOf(minter, accountMintVAINew);\n require(err == uint256(Error.NO_ERROR), \"comptroller rejection\");\n\n uint256 remainedAmount;\n if (treasuryPercent != 0) {\n uint256 feeAmount = div_(mul_(mintVAIAmount, treasuryPercent), 1e18);\n remainedAmount = sub_(mintVAIAmount, feeAmount);\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = mintVAIAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice The repay function transfers VAI interest into the protocol and burns the rest,\n * reducing the borrower's borrow balance. Before repaying VAI, users must first approve\n * VAIController to access their VAI balance.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAI(uint256 amount) external nonReentrant returns (uint256, uint256) {\n return _repayVAI(msg.sender, amount);\n }\n\n /**\n * @notice The repay on behalf function transfers VAI interest into the protocol and burns the rest,\n * reducing the borrower's borrow balance. Borrowed VAIs are repaid by another user (possibly the borrower).\n * Before repaying VAI, the payer must first approve VAIController to access their VAI balance.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param borrower The account to repay the debt for.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAIBehalf(address borrower, uint256 amount) external nonReentrant returns (uint256, uint256) {\n _ensureNonzeroAddress(borrower);\n return _repayVAI(borrower, amount);\n }\n\n /**\n * @dev Checks the parameters and the protocol state, accrues interest, and invokes repayVAIFresh.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param borrower The account to repay the debt for.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function _repayVAI(address borrower, uint256 amount) internal returns (uint256, uint256) {\n if (address(comptroller) == address(0)) {\n return (0, 0);\n }\n _ensureNonzeroAmount(amount);\n _ensureNotPaused();\n\n accrueVAIInterest();\n return repayVAIFresh(msg.sender, borrower, amount);\n }\n\n /**\n * @dev Repay VAI, expecting interest to be accrued\n * @dev Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being repaid\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAIFresh(address payer, address borrower, uint256 repayAmount) internal returns (uint256, uint256) {\n (uint256 burn, uint256 partOfCurrentInterest, uint256 partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint256 vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n\n uint256 accountVAINew = sub_(sub_(vaiBalanceBorrower, burn), partOfPastInterest);\n pastVAIInterest[borrower] = sub_(pastVAIInterest[borrower], partOfPastInterest);\n\n uint256 error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n // We have to revert upon error since side-effects already happened at this point\n require(error == uint256(Error.NO_ERROR), \"comptroller rejection\");\n\n uint256 repaidAmount = add_(burn, partOfCurrentInterest);\n emit RepayVAI(payer, borrower, repaidAmount);\n\n return (uint256(Error.NO_ERROR), repaidAmount);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint256, uint256) {\n _ensureNotPaused();\n\n uint256 error = vTokenCollateral.accrueInterest();\n if (error != uint256(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @dev If the Comptroller address is not set, liquidation is a no-op and the function returns the success code.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint256, uint256) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint256 allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint256(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint256 repayBorrowError, uint256 actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint256(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint256 amountSeizeError, uint256 seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint256(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint256 seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint256(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint256(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint256) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint256) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint256(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint256 oErr;\n MathError mErr;\n uint256 sumSupply;\n uint256 marketSupply;\n uint256 sumBorrowPlusEffects;\n uint256 vTokenBalance;\n uint256 borrowBalance;\n uint256 exchangeRateMantissa;\n uint256 oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol for details)\n * @return Mintable amount (with 18 decimals)\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint256, uint256) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint256(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint256 accountMintableVAI;\n uint256 i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n uint256 marketsCount = enteredMarkets.length;\n for (i = 0; i < marketsCount; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint256(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint256(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (, uint256 collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n }\n\n uint256 totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.REJECTION), 0);\n }\n\n return (uint256(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint256 Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint256) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint256 oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint256 delta;\n uint256 rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint256 Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint256) {\n uint256 yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint256 rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint256 Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint256) {\n uint256 storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint256) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint256) {\n MathError mErr;\n uint256 delta;\n\n uint256 amount = comptroller.mintedVAIs(account);\n uint256 interest = pastVAIInterest[account];\n uint256 totalMintedVAI;\n uint256 newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return Amount of VAI to be burned\n * @return Amount of VAI the user needs to pay in current interest\n * @return Amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(\n address borrower,\n uint256 repayAmount\n ) public view returns (uint256, uint256, uint256) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint256 currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint256 burn;\n uint256 partOfCurrentInterest = currentInterest;\n uint256 partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint256 delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint256 totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint256 delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCRUE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCRUE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint256 newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint256 old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint256 newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint256 old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n _ensureNonzeroAddress(newReceiver);\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint256 _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint256 old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint256) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @dev Reverts if the protocol is paused\n function _ensureNotPaused() private view {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n }\n\n /// @dev Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @dev Reverts if the passed amount is zero\n function _ensureNonzeroAmount(uint256 amount) private pure {\n require(amount > 0, \"amount can't be zero\");\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function mintVAI(uint256 mintVAIAmount) external returns (uint256);\n\n function repayVAI(uint256 amount) external returns (uint256, uint256);\n\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\n\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256, uint256);\n\n function getMintableVAI(address minter) external view returns (uint256, uint256);\n\n function getVAIAddress() external view returns (address);\n\n function getVAIRepayAmount(address account) external view returns (uint256);\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint256) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint256 public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint256 public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint256 public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint256 internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint256) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint256) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint256 public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" + }, + "contracts/Tokens/VAI/VAIUnitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint256) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint256) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint256) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint256) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRT.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverter.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VBep20R1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VTokenR1, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VTokenR1.sol\";\nimport { EIP20Interface } from \"../../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20R1 is VTokenR1, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../../InterestRateModels/InterestRateModel.sol\";\n\ncontract VTokenInterfaceR1 is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VTokenR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../../Utils/ErrorReporter.sol\";\nimport \"../../../Utils/Exponential.sol\";\nimport \"../../../Tokens/EIP20Interface.sol\";\nimport \"../../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../../InterestRateModels/InterestRateModel.sol\";\nimport \"../VTokenInterfaces.sol\";\nimport { VTokenInterfaceR1 } from \"./VTokenInterfaceR1.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VTokenR1 is VTokenInterfaceR1, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VBep20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Immutable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VTokenInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" + }, + "contracts/Tokens/XVS/IXVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" + }, + "contracts/Tokens/XVS/XVS.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" + }, + "contracts/Utils/Address.sol": { + "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/Utils/CarefulMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" + }, + "contracts/Utils/Context.sol": { + "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "contracts/Utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" + }, + "contracts/Utils/ErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/Utils/Exponential.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" + }, + "contracts/Utils/ExponentialNoError.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" + }, + "contracts/Utils/IBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" + }, + "contracts/Utils/Ownable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/Utils/Owned.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" + }, + "contracts/Utils/SafeBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Utils/SafeCast.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/Utils/SafeMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "contracts/Utils/Tokenlock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" + }, + "contracts/VAIVault/VAIVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" + }, + "contracts/VRTVault/VRTVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" + }, + "contracts/XVSVault/XVSStore.sol": { + "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" + }, + "contracts/XVSVault/XVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport \"@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol\";\n\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) public totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file From 0a62f538b78e4f39b460861ff1fcbda4d8b81a4f Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Fri, 19 Jul 2024 13:45:24 +0530 Subject: [PATCH 31/85] fix: uncommented code --- deploy/002-interest-rate-model.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index 5a5f1bf87..911956826 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -7,21 +7,21 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployer } = await getNamedAccounts(); - // await deploy("InterestRateModelVUSDC", { - // contract: "JumpRateModel", - // from: deployer, - // log: true, - // autoMine: true, - // args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"], - // }); + await deploy("InterestRateModelVUSDC", { + contract: "JumpRateModel", + from: deployer, + log: true, + autoMine: true, + args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"], + }); - // await deploy("InterestRateModelVETH", { - // contract: "JumpRateModel", - // from: deployer, - // log: true, - // autoMine: true, - // args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], - // }); + await deploy("InterestRateModelVETH", { + contract: "JumpRateModel", + from: deployer, + log: true, + autoMine: true, + args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], + }); await deploy("InterestRateModelVBNB", { contract: "JumpRateModel", @@ -34,6 +34,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.tags = ["InterestRateModel"]; // These contracts are not deployed on a live network so we only want to try and deploy them locally -// func.skip = async hre => hre.network.name !== "hardhat"; +func.skip = async hre => hre.network.name !== "hardhat"; export default func; From 1ed823169723d2762ceb81d887f4a887801a0244 Mon Sep 17 00:00:00 2001 From: narayanprusty Date: Fri, 19 Jul 2024 08:17:21 +0000 Subject: [PATCH 32/85] feat: updating deployment files --- deployments/bscmainnet.json | 2 +- deployments/bscmainnet/InterestRateModelVBNB.json | 13 +++---------- .../f3ebf9e67e90c643d9aab2ce73e7b9f3.json | 6 ++---- deployments/bscmainnet_addresses.json | 2 +- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index 7f91cf91f..abff685ef 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -8816,7 +8816,7 @@ ] }, "InterestRateModelVBNB": { - "address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", "abi": [ { "inputs": [ diff --git a/deployments/bscmainnet/InterestRateModelVBNB.json b/deployments/bscmainnet/InterestRateModelVBNB.json index a89bb0632..d0edc77df 100644 --- a/deployments/bscmainnet/InterestRateModelVBNB.json +++ b/deployments/bscmainnet/InterestRateModelVBNB.json @@ -264,9 +264,7 @@ "blockNumber": 40603987, "transactionHash": "0x3dbfb3c0dd7f688a48e578fe68ba130be6037d6b6367ac7867ade50bd2669db5", "address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", - "topics": [ - "0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d" - ], + "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004fbc8cb15000000000000000000000000000000000000000000000000000000969d09c0b400000000000000000000000000000000000000000000000009b6e64a8ec60000", "logIndex": 416, "blockHash": "0x37b5ab4063f8bec8ae68ca2f8495b111cadd563fd2c263dccc35ba89ad1f414a" @@ -277,12 +275,7 @@ "status": 1, "byzantium": true }, - "args": [ - 0, - "225000000000000000", - "6800000000000000000", - "700000000000000000" - ], + "args": [0, "225000000000000000", "6800000000000000000", "700000000000000000"], "numDeployments": 2, "solcInputHash": "f3ebf9e67e90c643d9aab2ce73e7b9f3", "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", @@ -384,4 +377,4 @@ } } } -} \ No newline at end of file +} diff --git a/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json b/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json index c436d54e3..5ffcacc24 100644 --- a/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json +++ b/deployments/bscmainnet/solcInputs/f3ebf9e67e90c643d9aab2ce73e7b9f3.json @@ -350,13 +350,11 @@ "userdoc", "evm.gasEstimates" ], - "": [ - "ast" - ] + "": ["ast"] } }, "metadata": { "useLiteralContent": true } } -} \ No newline at end of file +} diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index dde7070f3..1c0064109 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -24,7 +24,7 @@ "FIL": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "FIL_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", "FIL_Proxy": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", - "InterestRateModelVBNB": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1", + "InterestRateModelVBNB": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", From 9124f4fd4f97437bff9f819a02f05622bd51fbee Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Fri, 19 Jul 2024 16:12:46 +0530 Subject: [PATCH 33/85] fix: use solidity 0.8 --- .../InterestRateModelV8.sol | 34 ++++ .../TwoKinksInterestRateModel.sol | 184 ++++++++++-------- .../TwoKinksInterestRateModel.ts | 32 +-- 3 files changed, 149 insertions(+), 101 deletions(-) create mode 100644 contracts/InterestRateModels/InterestRateModelV8.sol diff --git a/contracts/InterestRateModels/InterestRateModelV8.sol b/contracts/InterestRateModels/InterestRateModelV8.sol new file mode 100644 index 000000000..264a4b5e7 --- /dev/null +++ b/contracts/InterestRateModels/InterestRateModelV8.sol @@ -0,0 +1,34 @@ +pragma solidity 0.8.25; + +/** + * @title Venus's InterestRateModelV8 Interface + * @author Venus + */ +abstract contract InterestRateModelV8 { + /// @notice Indicator that this is an InterestRateModel contract (for inspection) + bool public constant isInterestRateModel = true; + + /** + * @notice Calculates the current borrow interest rate per block + * @param cash The total amount of cash the market has + * @param borrows The total amount of borrows the market has outstanding + * @param reserves The total amnount of reserves the market has + * @return The borrow rate per block (as a percentage, and scaled by 1e18) + */ + function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) external view virtual returns (uint256); + + /** + * @notice Calculates the current supply interest rate per block + * @param cash The total amount of cash the market has + * @param borrows The total amount of borrows the market has outstanding + * @param reserves The total amnount of reserves the market has + * @param reserveFactorMantissa The current reserve factor the market has + * @return The supply rate per block (as a percentage, and scaled by 1e18) + */ + function getSupplyRate( + uint256 cash, + uint256 borrows, + uint256 reserves, + uint256 reserveFactorMantissa + ) external view virtual returns (uint256); +} diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 3858d412b..1f1787bd2 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -1,94 +1,126 @@ -pragma solidity ^0.5.16; +// SPDX-License-Identifier: BSD-3-Clause +pragma solidity 0.8.25; -import "../Utils/SafeMath.sol"; -import "../Utils/SignedSafeMath.sol"; -import "./InterestRateModel.sol"; +import { InterestRateModelV8 } from "./InterestRateModelV8.sol"; /** - * @title Venus's TwoKinksInterestRateModel Contract + * @title TwoKinksInterestRateModel * @author Venus + * @notice An interest rate model with two different steep increase each after a certain utilization threshold called **kink** is reached. */ -contract TwoKinksInterestRateModel is InterestRateModel { - using SafeMath for uint256; - using SignedSafeMath for int256; - - /** - * @notice The approximate number of blocks per year that is assumed by the interest rate model - */ - int256 public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks) +contract TwoKinksInterestRateModel is InterestRateModelV8 { + int256 public constant BLOCKS_PER_YEAR = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks) ////////////////////// SLOPE 1 ////////////////////// /** - * @notice The multiplier of utilization rate per block or second that gives the slope 1 of the interest rate + * @notice The multiplier of utilization rate per block that gives the slope 1 of the interest rate */ - int256 public multiplierPerBlock; + int256 public immutable MULTIPLIER_PER_BLOCK; /** - * @notice The base interest rate per block or second which is the y-intercept when utilization rate is 0 + * @notice The base interest rate per block which is the y-intercept when utilization rate is 0 */ - int256 public baseRatePerBlock; + int256 public immutable BASE_RATE_PER_BLOCK; ////////////////////// SLOPE 2 ////////////////////// /** * @notice The utilization point at which the multiplier2 is applied */ - int256 public kink1; + int256 public immutable KINK_1; /** - * @notice The multiplier of utilization rate per block or second that gives the slope 2 of the interest rate + * @notice The multiplier of utilization rate per block that gives the slope 2 of the interest rate */ - int256 public multiplier2PerBlock; + int256 public immutable MULTIPLIER_2_PER_BLOCK; /** - * @notice The base interest rate per block or second which is the y-intercept when utilization rate hits kink1 + * @notice The base interest rate per block which is the y-intercept when utilization rate hits KINK_1 */ - int256 public baseRate2PerBlock; + int256 public immutable BASE_RATE_2_PER_BLOCK; ////////////////////// SLOPE 3 ////////////////////// /** * @notice The utilization point at which the jump multiplier is applied */ - int256 public kink2; + int256 public immutable KINK_2; + + /** + * @notice The multiplier per block after hitting KINK_2 + */ + int256 public immutable JUMP_MULTIPLIER_PER_BLOCK; + + /// @notice Base unit for computations, usually used in scaling (multiplications, divisions) + uint256 internal constant EXP_SCALE = 1e18; /** - * @notice The multiplier per block or second after hitting kink2 + * @notice Thrown when a negative value is not allowed */ - int256 public jumpMultiplierPerBlock; + error NegativeValueNotAllowed(); /** * @notice Construct an interest rate model - * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18) - * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18) + * @param baseRatePerYear_ The approximate target base APR, as a mantissa (scaled by EXP_SCALE) + * @param multiplierPerYear_ The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE) * @param kink1_ The utilization point at which the multiplier2 is applied - * @param multiplier2PerYear The multiplier after hitting kink1 - * @param baseRate2PerYear The base rate after hitting kink1 + * @param multiplier2PerYear_ The rate of increase in interest rate wrt utilization after hitting KINK_1 (scaled by EXP_SCALE) + * @param baseRate2PerYear_ The approximate target base APR after hitting KINK_1, as a mantissa (scaled by EXP_SCALE) * @param kink2_ The utilization point at which the jump multiplier is applied - * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point + * @param jumpMultiplierPerYear_ The multiplier after hitting KINK_2 */ constructor( - int256 baseRatePerYear, - int256 multiplierPerYear, + int256 baseRatePerYear_, + int256 multiplierPerYear_, int256 kink1_, - int256 multiplier2PerYear, - int256 baseRate2PerYear, + int256 multiplier2PerYear_, + int256 baseRate2PerYear_, int256 kink2_, - int256 jumpMultiplierPerYear - ) public { - require(baseRatePerYear > 0, "baseRatePerYear must be greater than zero"); - require(baseRate2PerYear > 0, "baseRate2PerYear must be greater than zero"); - require(kink1_ > 0, "kink1 must be greater than zero"); - require(kink2_ > 0, "kink2 must be greater than zero"); - - multiplierPerBlock = multiplierPerYear.div(blocksPerYear); - baseRatePerBlock = baseRatePerYear.div(blocksPerYear); - kink1 = kink1_; - multiplier2PerBlock = multiplier2PerYear.div(blocksPerYear); - baseRate2PerBlock = baseRate2PerYear.div(blocksPerYear); - kink2 = kink2_; - jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear); + int256 jumpMultiplierPerYear_ + ) { + if (baseRatePerYear_ < 0 || baseRate2PerYear_ < 0 || kink1_ < 0 || kink2_ < 0) { + revert NegativeValueNotAllowed(); + } + + BASE_RATE_PER_BLOCK = baseRatePerYear_ / BLOCKS_PER_YEAR; + MULTIPLIER_PER_BLOCK = multiplierPerYear_ / BLOCKS_PER_YEAR; + KINK_1 = kink1_; + MULTIPLIER_2_PER_BLOCK = multiplier2PerYear_ / BLOCKS_PER_YEAR; + BASE_RATE_2_PER_BLOCK = baseRate2PerYear_ / BLOCKS_PER_YEAR; + KINK_2 = kink2_; + JUMP_MULTIPLIER_PER_BLOCK = jumpMultiplierPerYear_ / BLOCKS_PER_YEAR; + } + + /** + * @notice Calculates the current borrow rate per slot (block) + * @param cash The amount of cash in the market + * @param borrows The amount of borrows in the market + * @param reserves The amount of reserves in the market + * @return The borrow rate percentage per slot (block) as a mantissa (scaled by 1e18) + */ + function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) external view override returns (uint256) { + return _getBorrowRate(cash, borrows, reserves); + } + + /** + * @notice Calculates the current supply rate per slot (block) + * @param cash The amount of cash in the market + * @param borrows The amount of borrows in the market + * @param reserves The amount of reserves in the market + * @param reserveFactorMantissa The current reserve factor for the market + * @return The supply rate percentage per slot (block) as a mantissa (scaled by EXP_SCALE) + */ + function getSupplyRate( + uint256 cash, + uint256 borrows, + uint256 reserves, + uint256 reserveFactorMantissa + ) public view virtual override returns (uint256) { + uint256 oneMinusReserveFactor = EXP_SCALE - reserveFactorMantissa; + uint256 borrowRate = _getBorrowRate(cash, borrows, reserves); + uint256 rateToPool = (borrowRate * oneMinusReserveFactor) / EXP_SCALE; + return (utilizationRate(cash, borrows, reserves) * rateToPool) / EXP_SCALE; } /** @@ -96,7 +128,7 @@ contract TwoKinksInterestRateModel is InterestRateModel { * @param cash The amount of cash in the market * @param borrows The amount of borrows in the market * @param reserves The amount of reserves in the market (currently unused) - * @return The utilization rate as a mantissa between [0, 1e18] + * @return The utilization rate as a mantissa between [0, EXP_SCALE] */ function utilizationRate(uint256 cash, uint256 borrows, uint256 reserves) public pure returns (uint256) { // Utilization rate is 0 when there are no borrows @@ -104,52 +136,34 @@ contract TwoKinksInterestRateModel is InterestRateModel { return 0; } - return borrows.mul(1e18).div(cash.add(borrows).sub(reserves)); + return (borrows * EXP_SCALE) / (cash + borrows - reserves); } /** - * @notice Calculates the current borrow rate per block, with the error code expected by the market + * @notice Calculates the current borrow rate per slot (block), with the error code expected by the market * @param cash The amount of cash in the market * @param borrows The amount of borrows in the market * @param reserves The amount of reserves in the market - * @return The borrow rate percentage per block as a mantissa (scaled by 1e18) + * @return The borrow rate percentage per slot (block) as a mantissa (scaled by EXP_SCALE) */ - function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) public view returns (uint256) { + function _getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) internal view returns (uint256) { int256 util = int256(utilizationRate(cash, borrows, reserves)); - int256 expScale = int256(1e18); - - if (util < kink1) { - return _max(0, util.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock)); - } else if (util < kink2) { - int256 rate1 = kink1.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); - int256 rate2 = util.sub(kink1).mul(multiplier2PerBlock).div(expScale).add(baseRate2PerBlock); - return _max(0, rate1.add(rate2)); + int256 expScale = int256(EXP_SCALE); + + if (util < KINK_1) { + return _max(0, ((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); + } else if (util < KINK_2) { + int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); + int256 rate2 = (((util - KINK_1) * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; + + return _max(0, rate1 + rate2); } else { - int256 rate1 = kink1.mul(multiplierPerBlock).div(expScale).add(baseRatePerBlock); - int256 rate2 = kink2.sub(kink1).mul(multiplier2PerBlock).div(expScale).add(baseRate2PerBlock); - int256 rate3 = util.sub(kink2).mul(jumpMultiplierPerBlock).div(expScale); - return _max(0, rate1.add(rate2).add(rate3)); - } - } + int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); + int256 rate2 = (((KINK_2 - KINK_1) * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; + int256 rate3 = (((util - KINK_2) * JUMP_MULTIPLIER_PER_BLOCK) / expScale); - /** - * @notice Calculates the current supply rate per block - * @param cash The amount of cash in the market - * @param borrows The amount of borrows in the market - * @param reserves The amount of reserves in the market - * @param reserveFactorMantissa The current reserve factor for the market - * @return The supply rate percentage per block as a mantissa (scaled by 1e18) - */ - function getSupplyRate( - uint256 cash, - uint256 borrows, - uint256 reserves, - uint256 reserveFactorMantissa - ) public view returns (uint256) { - uint256 oneMinusReserveFactor = uint256(1e18).sub(reserveFactorMantissa); - uint256 borrowRate = getBorrowRate(cash, borrows, reserves); - uint256 rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18); - return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18); + return _max(0, rate1 + rate2 + rate3); + } } /** diff --git a/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts b/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts index cbfbf839d..6f5b60c84 100644 --- a/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts +++ b/tests/hardhat/InterestRateModels/TwoKinksInterestRateModel.ts @@ -66,8 +66,8 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const borrows = convertToUnit("1", 19); const reserves = convertToUnit("2", 19); - const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); - const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.MULTIPLIER_PER_BLOCK()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.BASE_RATE_PER_BLOCK()).toString(); const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.lt(new BigNumber(kink1).toNumber()); @@ -84,10 +84,10 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const borrows = convertToUnit("3", 19); const reserves = convertToUnit("1", 19); - const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); - const multiplier2PerBlock = (await twoKinksInterestRateModel.multiplier2PerBlock()).toString(); - const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const baseRate2PerBlock = (await twoKinksInterestRateModel.baseRate2PerBlock()).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.MULTIPLIER_PER_BLOCK()).toString(); + const multiplier2PerBlock = (await twoKinksInterestRateModel.MULTIPLIER_2_PER_BLOCK()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.BASE_RATE_PER_BLOCK()).toString(); + const baseRate2PerBlock = (await twoKinksInterestRateModel.BASE_RATE_2_PER_BLOCK()).toString(); const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink1).toNumber()); @@ -115,11 +115,11 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const borrows = convertToUnit("80", 19); const reserves = convertToUnit("1", 19); - const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); - const multiplier2PerBlock = (await twoKinksInterestRateModel.multiplier2PerBlock()).toString(); - const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const baseRate2PerBlock = (await twoKinksInterestRateModel.baseRate2PerBlock()).toString(); - const jumpMultiplierPerBlock = (await twoKinksInterestRateModel.jumpMultiplierPerBlock()).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.MULTIPLIER_PER_BLOCK()).toString(); + const multiplier2PerBlock = (await twoKinksInterestRateModel.MULTIPLIER_2_PER_BLOCK()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.BASE_RATE_PER_BLOCK()).toString(); + const baseRate2PerBlock = (await twoKinksInterestRateModel.BASE_RATE_2_PER_BLOCK()).toString(); + const jumpMultiplierPerBlock = (await twoKinksInterestRateModel.JUMP_MULTIPLIER_PER_BLOCK()).toString(); const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink2).toNumber()); @@ -167,11 +167,11 @@ describe(`Two Kinks Interest Rate Model Tests`, async () => { const borrows = convertToUnit("45", 19); const reserves = convertToUnit("1", 19); - const multiplierPerBlock = (await twoKinksInterestRateModel.multiplierPerBlock()).toString(); - const multiplier2PerBlock = (await twoKinksInterestRateModel.multiplier2PerBlock()).toString(); - const baseRatePerBlock = (await twoKinksInterestRateModel.baseRatePerBlock()).toString(); - const baseRate2PerBlock = (await twoKinksInterestRateModel.baseRate2PerBlock()).toString(); - const jumpMultiplierPerBlock = (await twoKinksInterestRateModel.jumpMultiplierPerBlock()).toString(); + const multiplierPerBlock = (await twoKinksInterestRateModel.MULTIPLIER_PER_BLOCK()).toString(); + const multiplier2PerBlock = (await twoKinksInterestRateModel.MULTIPLIER_2_PER_BLOCK()).toString(); + const baseRatePerBlock = (await twoKinksInterestRateModel.BASE_RATE_PER_BLOCK()).toString(); + const baseRate2PerBlock = (await twoKinksInterestRateModel.BASE_RATE_2_PER_BLOCK()).toString(); + const jumpMultiplierPerBlock = (await twoKinksInterestRateModel.JUMP_MULTIPLIER_PER_BLOCK()).toString(); const utilizationRate = (await twoKinksInterestRateModel.utilizationRate(cash, borrows, reserves)).toString(); expect(new BigNumber(utilizationRate).toNumber()).to.be.gt(new BigNumber(kink2).toNumber()); From 2864022a634434331fbded9848539a07640d500d Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 22 Jul 2024 11:53:42 +0530 Subject: [PATCH 34/85] fix: removed SignedSafeMath --- contracts/Utils/SignedSafeMath.sol | 60 ------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 contracts/Utils/SignedSafeMath.sol diff --git a/contracts/Utils/SignedSafeMath.sol b/contracts/Utils/SignedSafeMath.sol deleted file mode 100644 index 819298d83..000000000 --- a/contracts/Utils/SignedSafeMath.sol +++ /dev/null @@ -1,60 +0,0 @@ -pragma solidity ^0.5.2; - -/** - * @title SignedSafeMath - * @dev Signed math operations with safety checks that revert on error - */ -library SignedSafeMath { - int256 private constant INT256_MIN = -2 ** 255; - - /** - * @dev Multiplies two signed integers, reverts on overflow. - */ - function mul(int256 a, int256 b) internal pure returns (int256) { - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - if (a == 0) { - return 0; - } - - require(!(a == -1 && b == INT256_MIN)); // This is the only case of overflow not detected by the check below - - int256 c = a * b; - require(c / a == b); - - return c; - } - - /** - * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero. - */ - function div(int256 a, int256 b) internal pure returns (int256) { - require(b != 0); // Solidity only automatically asserts when dividing by 0 - require(!(b == -1 && a == INT256_MIN)); // This is the only case of overflow - - int256 c = a / b; - - return c; - } - - /** - * @dev Subtracts two signed integers, reverts on overflow. - */ - function sub(int256 a, int256 b) internal pure returns (int256) { - int256 c = a - b; - require((b >= 0 && c <= a) || (b < 0 && c > a)); - - return c; - } - - /** - * @dev Adds two signed integers, reverts on overflow. - */ - function add(int256 a, int256 b) internal pure returns (int256) { - int256 c = a + b; - require((b >= 0 && c >= a) || (b < 0 && c < a)); - - return c; - } -} From 21f12bd16a5a84afc2de562f82ff53a59f55e443 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 22 Jul 2024 12:46:12 +0530 Subject: [PATCH 35/85] fix: fixed deploy script --- deploy/002-interest-rate-model.ts | 51 ++++++++++++++++--------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/deploy/002-interest-rate-model.ts b/deploy/002-interest-rate-model.ts index 911956826..b49710239 100644 --- a/deploy/002-interest-rate-model.ts +++ b/deploy/002-interest-rate-model.ts @@ -2,38 +2,41 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - const { deployments, getNamedAccounts } = hre; + const { deployments, getNamedAccounts, network } = hre; const { deploy } = deployments; const { deployer } = await getNamedAccounts(); - await deploy("InterestRateModelVUSDC", { - contract: "JumpRateModel", - from: deployer, - log: true, - autoMine: true, - args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"], - }); + if (!network.live) { + await deploy("InterestRateModelVUSDC", { + contract: "JumpRateModel", + from: deployer, + log: true, + autoMine: true, + args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"], + }); - await deploy("InterestRateModelVETH", { - contract: "JumpRateModel", - from: deployer, - log: true, - autoMine: true, - args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], - }); + await deploy("InterestRateModelVETH", { + contract: "JumpRateModel", + from: deployer, + log: true, + autoMine: true, + args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"], + }); + } - await deploy("InterestRateModelVBNB", { - contract: "JumpRateModel", - from: deployer, - log: true, - autoMine: true, - args: [0, "225000000000000000", "6800000000000000000", "700000000000000000"], - }); + if (network.name === "bscmainnet") { + await deploy("InterestRateModelVBNB", { + contract: "JumpRateModel", + from: deployer, + log: true, + autoMine: true, + args: [0, "225000000000000000", "6800000000000000000", "700000000000000000"], + }); + } }; func.tags = ["InterestRateModel"]; -// These contracts are not deployed on a live network so we only want to try and deploy them locally -func.skip = async hre => hre.network.name !== "hardhat"; +func.skip = async hre => hre.network.name !== "hardhat" && hre.network.name !== "bscmainnet"; export default func; From 35c832eed9a773fe0f4bdaed1ab9d6e696201cad Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Mon, 22 Jul 2024 16:45:54 +0530 Subject: [PATCH 36/85] fix: max utilisation rate --- .../InterestRateModels/TwoKinksInterestRateModel.sol | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 1f1787bd2..bf2820084 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -136,7 +136,13 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { return 0; } - return (borrows * EXP_SCALE) / (cash + borrows - reserves); + uint256 rate = (borrows * EXP_SCALE) / (cash + borrows - reserves); + + if (rate > EXP_SCALE) { + rate = EXP_SCALE; + } + + return rate; } /** From e9aee5ce51795cc4ec35588bb9af3190070f8746 Mon Sep 17 00:00:00 2001 From: Narayan Prusty <7037606+narayanprusty@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:48:45 +0530 Subject: [PATCH 37/85] fix: fix comment Co-authored-by: Kirill Kuvshinov --- contracts/InterestRateModels/TwoKinksInterestRateModel.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index bf2820084..5b97f6056 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -127,7 +127,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)` * @param cash The amount of cash in the market * @param borrows The amount of borrows in the market - * @param reserves The amount of reserves in the market (currently unused) + * @param reserves The amount of reserves in the market * @return The utilization rate as a mantissa between [0, EXP_SCALE] */ function utilizationRate(uint256 cash, uint256 borrows, uint256 reserves) public pure returns (uint256) { From 70ddf3f034036327523ab45c806b6a65d31d02fb Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sat, 20 Jul 2024 12:00:19 +0200 Subject: [PATCH 38/85] docs: fix typos --- README.md | 4 ++-- docs/CONTRIBUTING.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6cbb2fff6..8fae0e32e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Venus Protocol -The Venus Protocol is a BNB Chain collection of smart contract for supplying or borrowing assets. Through the vToken contracts, accounts on the blockchain _supply_ capital (BNB or BEP-20 tokens) to receive vTokens or _borrow_ assets from the protocol (holding other assets as collateral). The protocol will also enable the minting of VAI, which is the first synthetic stablecoin on Venus that aims to be pegged to 1 USD. VAI is minted by the same collateral that is supplied to the protocol. The Venus vToken contracts track these balances and algorithmically set interest rates for borrowers and suppliers. +The Venus Protocol is a BNB Chain collection of smart contracts for supplying or borrowing assets. Through the vToken contracts, accounts on the blockchain _supply_ capital (BNB or BEP-20 tokens) to receive vTokens or _borrow_ assets from the protocol (holding other assets as collateral). The protocol will also enable the minting of VAI, which is the first synthetic stablecoin on Venus that aims to be pegged to 1 USD. VAI is minted by the same collateral that is supplied to the protocol. The Venus vToken contracts track these balances and algorithmically set interest rates for borrowers and suppliers. Before getting started with this repo, please read: @@ -58,7 +58,7 @@ We detail a few of the core contracts in the Venus protocol. ### Documentation -- Public documentation site: https://docs.venus.io, including autogernated documentation, guides, addresses of the deployment contracts and more content. +- Public documentation site: https://docs.venus.io, including autogenerated documentation, guides, addresses of the deployment contracts and more content. - Documentation autogenerated using [solidity-docgen](https://github.com/OpenZeppelin/solidity-docgen). - To generate the documentation from the natspec comments embedded in the contracts, use `yarn docgen` diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index afe53794a..bab418d1a 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -20,9 +20,9 @@ By default, git merges the upstream changes into your local branch on pull. This 2. Prefer short and descriptive names for branches (good: `polynomial-interest-curve`, bad: `fix-rate`). 3. Use lowercase words separated by dashes (good: `xvs-vault`, bad: `XVSVault`). 4. You may include work type into the branch name (ok: `feature/polynomial-interest-curve`). -5. Make sure no-one else works in your feature branch. +5. Make sure no one else works in your feature branch. -## Make commmits +## Make commits 1. The commits should be self-contained and solve one specific problem. Avoid commits incorporating several completely unrelated changes. You can use `git add -p ` to stage just a part of the file. 1. The commit messages should have a header and a body. Forget about commit -m. @@ -45,7 +45,7 @@ When you rewrite your history, GitHub will refuse to accept your changes. This i 1. Every feature branch should have one active maintainer. No-one else is allowed to directly commit to your feature branch. 2. You can safely force-push to your feature branch. If your colleague wants to contribute, ask them to push their changes into a separate branch, and then cherry-pick. If you want to help your colleague, push your changes to a separate branch and let your colleague cherry-pick. This would help you to avoid any potential conflicts stemming from force-pushing. 3. **Always** use `--force-with-lease` and not `--force`/`-f` to force-push. Things happen, and someone may violate the “one active maintainer” rule. Force with lease would save you the trouble of recovering someone's work :) -4. **Never** force-push to master or any branch that has several maintainers. The only exception to this rule is when a secret (API key, private key, etc.) is accidentially committed, in which case you should immediately wipe it out and notify the security team as soon as possible. +4. **Never** force-push to master or any branch that has several maintainers. The only exception to this rule is when a secret (API key, private key, etc.) is accidentally committed, in which case you should immediately wipe it out and notify the security team as soon as possible. ## Make a pull request @@ -61,7 +61,7 @@ When you rewrite your history, GitHub will refuse to accept your changes. This i ## Closing thoughts -This policy may require some time and effort: writing lenghty commit messages and doing an interactive rebase isn't as straightforward as `git commit -am`. This pays out quickly, however. When you do `git bisect` to find a bug, you'd really appreciate descriptive commits instead of just "Update file" or "Some fixes". When you're reviewing a PR, you can limit the mental burden by looking at individual commits instead of diving straight into 40 files changed. When you're a newcomer and wonder why a function you wanted to use suddenly disappeared before you fully understood the code, you'll be happy to see the reason straight in `git log`. The same goes for when you `git blame` to understand why a certain line of code is written the way it is. +This policy may require some time and effort: writing lengthy commit messages and doing an interactive rebase isn't as straightforward as `git commit -am`. This pays out quickly, however. When you do `git bisect` to find a bug, you'd really appreciate descriptive commits instead of just "Update file" or "Some fixes". When you're reviewing a PR, you can limit the mental burden by looking at individual commits instead of diving straight into 40 files changed. When you're a newcomer and wonder why a function you wanted to use suddenly disappeared before you fully understood the code, you'll be happy to see the reason straight in `git log`. The same goes for when you `git blame` to understand why a certain line of code is written the way it is. If we were to summarize everything written above into just three bullet points, we'd go with: From 57aba60f61cdbac448af1dfa1e65a3fcbcd3fdf1 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Mon, 22 Jul 2024 15:11:45 -0300 Subject: [PATCH 39/85] fix: fix type error which fails build --- deploy/006-deploy-swaprouter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/006-deploy-swaprouter.ts b/deploy/006-deploy-swaprouter.ts index 8f679145c..34c913e6f 100644 --- a/deploy/006-deploy-swaprouter.ts +++ b/deploy/006-deploy-swaprouter.ts @@ -33,6 +33,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.tags = ["SwapRouter"]; // Pancake Factory is not deployed on the local network -func.skip = skipRemoteNetworks({ hardhat: false }); +func.skip = skipRemoteNetworks(); export default func; From 6c81b493f0426b5ce7ba300d06bd67f14f29cd08 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Mon, 22 Jul 2024 18:32:10 +0000 Subject: [PATCH 40/85] chore(release): 9.2.0-dev.2 [skip ci] ## [9.2.0-dev.2](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.1...v9.2.0-dev.2) (2024-07-22) ### Features * updating deployment files ([1ed8231](https://github.com/VenusProtocol/venus-protocol/commit/1ed823169723d2762ceb81d887f4a887801a0244)) ### Bug Fixes * deploy proxy and set implementation ([0112a0f](https://github.com/VenusProtocol/venus-protocol/commit/0112a0f122333b6bef5b3b46f295765f620cbc97)) * deploy Vai controller on hardhat ([6706439](https://github.com/VenusProtocol/venus-protocol/commit/6706439b904f13ce86abf5ba3af68bb4d36f3694)) * deploy XVS on all networks ([6481a2c](https://github.com/VenusProtocol/venus-protocol/commit/6481a2cbeee2c90569fec1834ba7a3c76e8d0162)) * deployed new IR ([dbfa635](https://github.com/VenusProtocol/venus-protocol/commit/dbfa6350fee1316613e9827f7dfa4db4fae7943a)) * fix type error which fails build ([57aba60](https://github.com/VenusProtocol/venus-protocol/commit/57aba60f61cdbac448af1dfa1e65a3fcbcd3fdf1)) * fixed deploy script ([21f12bd](https://github.com/VenusProtocol/venus-protocol/commit/21f12bd16a5a84afc2de562f82ff53a59f55e443)) * uncommented code ([0a62f53](https://github.com/VenusProtocol/venus-protocol/commit/0a62f538b78e4f39b460861ff1fcbda4d8b81a4f)) --- CHANGELOG.md | 18 ++++++++++++++++++ package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 921496186..41bce9b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## [9.2.0-dev.2](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.1...v9.2.0-dev.2) (2024-07-22) + + +### Features + +* updating deployment files ([1ed8231](https://github.com/VenusProtocol/venus-protocol/commit/1ed823169723d2762ceb81d887f4a887801a0244)) + + +### Bug Fixes + +* deploy proxy and set implementation ([0112a0f](https://github.com/VenusProtocol/venus-protocol/commit/0112a0f122333b6bef5b3b46f295765f620cbc97)) +* deploy Vai controller on hardhat ([6706439](https://github.com/VenusProtocol/venus-protocol/commit/6706439b904f13ce86abf5ba3af68bb4d36f3694)) +* deploy XVS on all networks ([6481a2c](https://github.com/VenusProtocol/venus-protocol/commit/6481a2cbeee2c90569fec1834ba7a3c76e8d0162)) +* deployed new IR ([dbfa635](https://github.com/VenusProtocol/venus-protocol/commit/dbfa6350fee1316613e9827f7dfa4db4fae7943a)) +* fix type error which fails build ([57aba60](https://github.com/VenusProtocol/venus-protocol/commit/57aba60f61cdbac448af1dfa1e65a3fcbcd3fdf1)) +* fixed deploy script ([21f12bd](https://github.com/VenusProtocol/venus-protocol/commit/21f12bd16a5a84afc2de562f82ff53a59f55e443)) +* uncommented code ([0a62f53](https://github.com/VenusProtocol/venus-protocol/commit/0a62f538b78e4f39b460861ff1fcbda4d8b81a4f)) + ## [9.2.0-dev.1](https://github.com/VenusProtocol/venus-protocol/compare/v9.1.0...v9.2.0-dev.1) (2024-06-25) diff --git a/package.json b/package.json index 9ccae55ff..ba465e52a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.1", + "version": "9.2.0-dev.2", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 7bd3491ac6282606926749d49b6ae8be8fda5cd5 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Mon, 22 Jul 2024 15:52:49 -0300 Subject: [PATCH 41/85] fix: add missing import --- contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol b/contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol index 7a058dbb0..82c6352e6 100644 --- a/contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol +++ b/contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol @@ -2,6 +2,7 @@ pragma solidity ^0.5.16; import "../../../Comptroller/ComptrollerInterface.sol"; import "../../../InterestRateModels/InterestRateModel.sol"; +import "../VTokenInterfaces.sol"; contract VTokenInterfaceR1 is VTokenStorage { /** From 696b120085cdbcd08b97a6784353395cfd6acd59 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Tue, 23 Jul 2024 13:42:54 +0000 Subject: [PATCH 42/85] chore(release): 9.2.0-dev.3 [skip ci] ## [9.2.0-dev.3](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.2...v9.2.0-dev.3) (2024-07-23) ### Bug Fixes * add missing import ([7bd3491](https://github.com/VenusProtocol/venus-protocol/commit/7bd3491ac6282606926749d49b6ae8be8fda5cd5)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41bce9b0a..bd59bbcf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [9.2.0-dev.3](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.2...v9.2.0-dev.3) (2024-07-23) + + +### Bug Fixes + +* add missing import ([7bd3491](https://github.com/VenusProtocol/venus-protocol/commit/7bd3491ac6282606926749d49b6ae8be8fda5cd5)) + ## [9.2.0-dev.2](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.1...v9.2.0-dev.2) (2024-07-22) diff --git a/package.json b/package.json index ba465e52a..d4d80bde6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.2", + "version": "9.2.0-dev.3", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 6b6338d370242310d16d0a9594ebce79bce576a6 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 23 Jul 2024 11:55:09 -0300 Subject: [PATCH 43/85] refactor: improve token deployments to work on hardhat --- .../VTokens/legacy/VBep20DelegateR1.sol | 45 ++ .../VTokens/legacy/VBep20DelegatorR1.sol | 528 ++++++++++++++++++ deploy/003-deploy-VBep20.ts | 3 +- deploy/004-support-markets.ts | 5 +- deploy/011-deploy-markets.ts | 12 +- helpers/deploymentConfig.ts | 38 ++ 6 files changed, 624 insertions(+), 7 deletions(-) create mode 100644 contracts/Tokens/VTokens/legacy/VBep20DelegateR1.sol create mode 100644 contracts/Tokens/VTokens/legacy/VBep20DelegatorR1.sol diff --git a/contracts/Tokens/VTokens/legacy/VBep20DelegateR1.sol b/contracts/Tokens/VTokens/legacy/VBep20DelegateR1.sol new file mode 100644 index 000000000..f6f7da2c3 --- /dev/null +++ b/contracts/Tokens/VTokens/legacy/VBep20DelegateR1.sol @@ -0,0 +1,45 @@ +pragma solidity ^0.5.16; + +import "../VTokenInterfaces.sol"; +import { VBep20R1 } from "./VBep20R1.sol"; +import { VDelegateInterface } from "./VTokenInterfaceR1.sol"; + +/** + * @title Venus's VBep20Delegate Contract + * @notice VTokens which wrap an EIP-20 underlying and are delegated to + * @author Venus + */ +contract VBep20DelegateR1 is VBep20R1, VDelegateInterface { + /** + * @notice Construct an empty delegate + */ + constructor() public {} + + /** + * @notice Called by the delegator on a delegate to initialize it for duty + * @param data The encoded bytes data for any initialization + */ + function _becomeImplementation(bytes memory data) public { + // Shh -- currently unused + data; + + // Shh -- we don't ever want this hook to be marked pure + if (false) { + implementation = address(0); + } + + require(msg.sender == admin, "only the admin may call _becomeImplementation"); + } + + /** + * @notice Called by the delegator on a delegate to forfeit its responsibility + */ + function _resignImplementation() public { + // Shh -- we don't ever want this hook to be marked pure + if (false) { + implementation = address(0); + } + + require(msg.sender == admin, "only the admin may call _resignImplementation"); + } +} diff --git a/contracts/Tokens/VTokens/legacy/VBep20DelegatorR1.sol b/contracts/Tokens/VTokens/legacy/VBep20DelegatorR1.sol new file mode 100644 index 000000000..b3d8fcb57 --- /dev/null +++ b/contracts/Tokens/VTokens/legacy/VBep20DelegatorR1.sol @@ -0,0 +1,528 @@ +pragma solidity ^0.5.16; +import "../VTokenInterfaces.sol"; +import "./VTokenInterfaceR1.sol"; + +/** + * @title Venus's VBep20Delegator Contract + * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation + * @author Venus + */ +contract VBep20DelegatorR1 is VTokenInterfaceR1, VBep20Interface, VDelegatorInterface { + /** + * @notice Construct a new money market + * @param underlying_ The address of the underlying asset + * @param comptroller_ The address of the comptroller + * @param interestRateModel_ The address of the interest rate model + * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 + * @param name_ BEP-20 name of this token + * @param symbol_ BEP-20 symbol of this token + * @param decimals_ BEP-20 decimal precision of this token + * @param admin_ Address of the administrator of this token + * @param implementation_ The address of the implementation the contract delegates to + * @param becomeImplementationData The encoded args for becomeImplementation + */ + constructor( + address underlying_, + ComptrollerInterface comptroller_, + InterestRateModel interestRateModel_, + uint initialExchangeRateMantissa_, + string memory name_, + string memory symbol_, + uint8 decimals_, + address payable admin_, + address implementation_, + bytes memory becomeImplementationData + ) public { + // Creator of the contract is admin during initialization + admin = msg.sender; + + // First delegate gets to initialize the delegator (i.e. storage contract) + delegateTo( + implementation_, + abi.encodeWithSignature( + "initialize(address,address,address,uint256,string,string,uint8)", + underlying_, + comptroller_, + interestRateModel_, + initialExchangeRateMantissa_, + name_, + symbol_, + decimals_ + ) + ); + + // New implementations always get set via the settor (post-initialize) + _setImplementation(implementation_, false, becomeImplementationData); + + // Set the proper admin now that initialization is done + admin = admin_; + } + + /** + * @notice Delegates execution to an implementation contract + * @dev It returns to the external caller whatever the implementation returns or forwards reverts + */ + function() external payable { + require(msg.value == 0, "VBep20Delegator:fallback: cannot send value to fallback"); + + // delegate all other functions to current implementation + (bool success, ) = implementation.delegatecall(msg.data); + + assembly { + let free_mem_ptr := mload(0x40) + returndatacopy(free_mem_ptr, 0, returndatasize) + + switch success + case 0 { + revert(free_mem_ptr, returndatasize) + } + default { + return(free_mem_ptr, returndatasize) + } + } + } + + /** + * @notice Sender supplies assets into the market and receives vTokens in exchange + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param mintAmount The amount of the underlying asset to supply + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function mint(uint mintAmount) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("mint(uint256)", mintAmount)); + return abi.decode(data, (uint)); + } + + /** + * @notice Sender supplies assets into the market and receiver receives vTokens in exchange + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param mintAmount The amount of the underlying asset to supply + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function mintBehalf(address receiver, uint mintAmount) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("mintBehalf(address,uint256)", receiver, mintAmount) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Sender redeems vTokens in exchange for the underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemTokens The number of vTokens to redeem into underlying asset + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function redeem(uint redeemTokens) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeem(uint256)", redeemTokens)); + return abi.decode(data, (uint)); + } + + /** + * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset + * @dev Accrues interest whether or not the operation succeeds, unless reverted + * @param redeemAmount The amount of underlying to redeem + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function redeemUnderlying(uint redeemAmount) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("redeemUnderlying(uint256)", redeemAmount) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Sender borrows assets from the protocol to their own address + * @param borrowAmount The amount of the underlying asset to borrow + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function borrow(uint borrowAmount) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrow(uint256)", borrowAmount)); + return abi.decode(data, (uint)); + } + + /** + * @notice Sender repays their own borrow + * @param repayAmount The amount to repay + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function repayBorrow(uint repayAmount) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("repayBorrow(uint256)", repayAmount)); + return abi.decode(data, (uint)); + } + + /** + * @notice Sender repays a borrow belonging to another borrower + * @param borrower The account with the debt being payed off + * @param repayAmount The amount to repay + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("repayBorrowBehalf(address,uint256)", borrower, repayAmount) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice The sender liquidates the borrowers collateral. + * The collateral seized is transferred to the liquidator. + * @param borrower The borrower of this vToken to be liquidated + * @param vTokenCollateral The market in which to seize collateral from the borrower + * @param repayAmount The amount of the underlying borrowed asset to repay + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function liquidateBorrow( + address borrower, + uint repayAmount, + VTokenInterface vTokenCollateral + ) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("liquidateBorrow(address,uint256,address)", borrower, repayAmount, vTokenCollateral) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Transfer `amount` tokens from `msg.sender` to `dst` + * @param dst The address of the destination account + * @param amount The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transfer(address dst, uint amount) external returns (bool) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("transfer(address,uint256)", dst, amount)); + return abi.decode(data, (bool)); + } + + /** + * @notice Transfer `amount` tokens from `src` to `dst` + * @param src The address of the source account + * @param dst The address of the destination account + * @param amount The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transferFrom(address src, address dst, uint256 amount) external returns (bool) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("transferFrom(address,address,uint256)", src, dst, amount) + ); + return abi.decode(data, (bool)); + } + + /** + * @notice Approve `spender` to transfer up to `amount` from `src` + * @dev This will overwrite the approval amount for `spender` + * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) + * @param spender The address of the account which may transfer tokens + * @param amount The number of tokens that are approved (-1 means infinite) + * @return Whether or not the approval succeeded + */ + function approve(address spender, uint256 amount) external returns (bool) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("approve(address,uint256)", spender, amount) + ); + return abi.decode(data, (bool)); + } + + /** + * @notice Get the underlying balance of the `owner` + * @dev This also accrues interest in a transaction + * @param owner The address of the account to query + * @return The amount of underlying owned by `owner` + */ + function balanceOfUnderlying(address owner) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("balanceOfUnderlying(address)", owner)); + return abi.decode(data, (uint)); + } + + /** + * @notice Returns the current total borrows plus accrued interest + * @return The total borrows with interest + */ + function totalBorrowsCurrent() external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("totalBorrowsCurrent()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex + * @param account The address whose balance should be calculated after updating borrowIndex + * @return The calculated balance + */ + function borrowBalanceCurrent(address account) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrowBalanceCurrent(address)", account)); + return abi.decode(data, (uint)); + } + + /** + * @notice Transfers collateral tokens (this market) to the liquidator. + * @dev Will fail unless called by another vToken during the process of liquidation. + * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter. + * @param liquidator The account receiving seized collateral + * @param borrower The account having collateral seized + * @param seizeTokens The number of vTokens to seize + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("seize(address,address,uint256)", liquidator, borrower, seizeTokens) + ); + return abi.decode(data, (uint)); + } + + /*** Admin Functions ***/ + + /** + * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @param newPendingAdmin New pending admin. + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("_setPendingAdmin(address)", newPendingAdmin) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh + * @dev Admin function to accrue interest and set a new reserve factor + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("_setReserveFactor(uint256)", newReserveFactorMantissa) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin + * @dev Admin function for pending admin to accept role and update admin + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _acceptAdmin() external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("_acceptAdmin()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Accrues interest and adds reserves by transferring from admin + * @param addAmount Amount of reserves to add + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _addReserves(uint addAmount) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("_addReserves(uint256)", addAmount)); + return abi.decode(data, (uint)); + } + + /** + * @notice Accrues interest and reduces reserves by transferring to admin + * @param reduceAmount Amount of reduction to reserves + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _reduceReserves(uint reduceAmount) external returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("_reduceReserves(uint256)", reduceAmount)); + return abi.decode(data, (uint)); + } + + /** + * @notice Get cash balance of this vToken in the underlying asset + * @return The quantity of underlying asset owned by this contract + */ + function getCash() external view returns (uint) { + bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getCash()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Get the current allowance from `owner` for `spender` + * @param owner The address of the account which owns the tokens to be spent + * @param spender The address of the account which may transfer tokens + * @return The number of tokens allowed to be spent (-1 means infinite) + */ + function allowance(address owner, address spender) external view returns (uint) { + bytes memory data = delegateToViewImplementation( + abi.encodeWithSignature("allowance(address,address)", owner, spender) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Get the token balance of the `owner` + * @param owner The address of the account to query + * @return The number of tokens owned by `owner` + */ + function balanceOf(address owner) external view returns (uint) { + bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("balanceOf(address)", owner)); + return abi.decode(data, (uint)); + } + + /** + * @notice Get a snapshot of the account's balances and the cached exchange rate + * @dev This is used by comptroller to more efficiently perform liquidity checks. + * @param account Address of the account to snapshot + * @return (possible error, token balance, borrow balance, exchange rate mantissa) + */ + function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) { + bytes memory data = delegateToViewImplementation( + abi.encodeWithSignature("getAccountSnapshot(address)", account) + ); + return abi.decode(data, (uint, uint, uint, uint)); + } + + /** + * @notice Returns the current per-block borrow interest rate for this vToken + * @return The borrow interest rate per block, scaled by 1e18 + */ + function borrowRatePerBlock() external view returns (uint) { + bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowRatePerBlock()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Returns the current per-block supply interest rate for this vToken + * @return The supply interest rate per block, scaled by 1e18 + */ + function supplyRatePerBlock() external view returns (uint) { + bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("supplyRatePerBlock()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Called by the admin to update the implementation of the delegator + * @param implementation_ The address of the new implementation for delegation + * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation + * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation + */ + // @custom:access Only callable by admin + function _setImplementation( + address implementation_, + bool allowResign, + bytes memory becomeImplementationData + ) public { + require(msg.sender == admin, "VBep20Delegator::_setImplementation: Caller must be admin"); + + if (allowResign) { + delegateToImplementation(abi.encodeWithSignature("_resignImplementation()")); + } + + address oldImplementation = implementation; + implementation = implementation_; + + delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData)); + + emit NewImplementation(oldImplementation, implementation); + } + + /** + * @notice Accrue interest then return the up-to-date exchange rate + * @return Calculated exchange rate scaled by 1e18 + */ + function exchangeRateCurrent() public returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("exchangeRateCurrent()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Applies accrued interest to total borrows and reserves. + * @dev This calculates interest accrued from the last checkpointed block + * up to the current block and writes new checkpoint to storage. + */ + function accrueInterest() public returns (uint) { + bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Sets a new comptroller for the market + * @dev Admin function to set a new comptroller + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("_setComptroller(address)", newComptroller) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh` + * @dev Admin function to accrue interest and update the interest rate model + * @param newInterestRateModel The new interest rate model to use + * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details). + */ + function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) { + bytes memory data = delegateToImplementation( + abi.encodeWithSignature("_setInterestRateModel(address)", newInterestRateModel) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Delegates execution to the implementation contract + * @dev It returns to the external caller whatever the implementation returns or forwards reverts + * @param data The raw data to delegatecall + * @return The returned bytes from the delegatecall + */ + function delegateToImplementation(bytes memory data) public returns (bytes memory) { + return delegateTo(implementation, data); + } + + /** + * @notice Delegates execution to an implementation contract + * @dev It returns to the external caller whatever the implementation returns or forwards reverts + * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop. + * @param data The raw data to delegatecall + * @return The returned bytes from the delegatecall + */ + function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) { + (bool success, bytes memory returnData) = address(this).staticcall( + abi.encodeWithSignature("delegateToImplementation(bytes)", data) + ); + assembly { + if eq(success, 0) { + revert(add(returnData, 0x20), returndatasize) + } + } + return abi.decode(returnData, (bytes)); + } + + /** + * @notice Return the borrow balance of account based on stored data + * @param account The address whose balance should be calculated + * @return The calculated balance + */ + function borrowBalanceStored(address account) public view returns (uint) { + bytes memory data = delegateToViewImplementation( + abi.encodeWithSignature("borrowBalanceStored(address)", account) + ); + return abi.decode(data, (uint)); + } + + /** + * @notice Calculates the exchange rate from the underlying to the VToken + * @dev This function does not accrue interest before calculating the exchange rate + * @return Calculated exchange rate scaled by 1e18 + */ + function exchangeRateStored() public view returns (uint) { + bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("exchangeRateStored()")); + return abi.decode(data, (uint)); + } + + /** + * @notice Internal method to delegate execution to another contract + * @dev It returns to the external caller whatever the implementation returns or forwards reverts + * @param callee The contract to delegatecall + * @param data The raw data to delegatecall + * @return The returned bytes from the delegatecall + */ + function delegateTo(address callee, bytes memory data) internal returns (bytes memory) { + (bool success, bytes memory returnData) = callee.delegatecall(data); + assembly { + if eq(success, 0) { + revert(add(returnData, 0x20), returndatasize) + } + } + return returnData; + } +} diff --git a/deploy/003-deploy-VBep20.ts b/deploy/003-deploy-VBep20.ts index bbd494cd3..5beb1e7cc 100644 --- a/deploy/003-deploy-VBep20.ts +++ b/deploy/003-deploy-VBep20.ts @@ -1,5 +1,6 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { onlyHardhat } from "../helpers/deploymentConfig"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre; @@ -95,6 +96,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { func.tags = ["VBep20"]; // The deployed contracts are mocks so we only run this locally -func.skip = async hre => hre.network.name !== "hardhat"; +func.skip = onlyHardhat(); export default func; diff --git a/deploy/004-support-markets.ts b/deploy/004-support-markets.ts index 5fcd28eef..03c1917a4 100644 --- a/deploy/004-support-markets.ts +++ b/deploy/004-support-markets.ts @@ -1,5 +1,6 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { onlyHardhat } from "../helpers/deploymentConfig"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts, ethers } = hre; @@ -8,16 +9,18 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const vUSDC = await deployments.get("vUSDC"); const vETH = await deployments.get("vETH"); + const vBNB = await deployments.get("vBNB"); const comptrollerDeployment = await deployments.get("Unitroller"); const comptroller = await ethers.getContractAt("ComptrollerMock", comptrollerDeployment.address); await comptroller.connect(deployerSigner)._supportMarket(vUSDC.address); await comptroller.connect(deployerSigner)._supportMarket(vETH.address); + await comptroller.connect(deployerSigner)._supportMarket(vBNB.address); }; func.tags = ["VBep20"]; // This script configures local mocked markets -func.skip = async hre => hre.network.name !== "hardhat"; +func.skip = onlyHardhat(); export default func; diff --git a/deploy/011-deploy-markets.ts b/deploy/011-deploy-markets.ts index a45caf909..0df7b0eb1 100644 --- a/deploy/011-deploy-markets.ts +++ b/deploy/011-deploy-markets.ts @@ -1,6 +1,7 @@ import { BigNumber, BigNumberish } from "ethers"; import { parseUnits } from "ethers/lib/utils"; import { ethers } from "hardhat"; +import { network } from "hardhat"; import { DeployFunction, DeployResult } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; @@ -64,9 +65,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } const underlyingDecimals = Number(await tokenContract.decimals()); - - console.log(`Deploying VBep20 Proxy for ${symbol} with Implementation ${preconfiguredAddresses.VTokenImpl}`); - + const normalTimelock = await ethers.getContract("NormalTimelock") + const vBep20DelegateDeployment = await deploy("VBep20Delegate", { from: deployer }) + console.log(`Deploying VBep20 Proxy for ${symbol} with Implementation ${vBep20DelegateDeployment.address}`); + await deploy(`${symbol}`, { contract: "VBep20Delegator", from: deployer, @@ -78,8 +80,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { name, symbol, VTOKEN_DECIMALS, - preconfiguredAddresses.NormalTimelock, - preconfiguredAddresses.VTokenImpl, + network.live ? normalTimelock.address : deployer, + vBep20DelegateDeployment.address, EMPTY_BYTES_ARRAY, ], log: true, diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 1ecc8a930..75ee35ecd 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -166,6 +166,40 @@ export const globalConfig: NetworkConfig = { borrowCap: convertToUnit(4_400_000, 18), vTokenReceiver: venusProtocolBscMainnet.VTreasury, }, + { + name: "Venus DOGE", + asset: "DOGE", + symbol: "vDOGE", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: venusProtocolBscMainnet.VTreasury, + }, + { + name: "Venus USDT", + asset: "USDT", + symbol: "vUSDT", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: venusProtocolBscMainnet.VTreasury, + }, ], preconfiguredAddresses: preconfiguredAddresses.bscmainnet, }, @@ -205,6 +239,10 @@ export const getContractAddressOrNullAddress = async (deployments: DeploymentsEx } }; +export const onlyHardhat = () => async (hre: HardhatRuntimeEnvironment) => { + return hre.network.name !== "hardhat"; +}; + export const skipRemoteNetworks = () => async (hre: HardhatRuntimeEnvironment) => { return hre.network.name !== "bscmainnet" && hre.network.name !== "bsctestnet" && hre.network.name !== "hardhat"; }; From 2c7542ff97a991692e2e8459a285336b50a5676c Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Tue, 23 Jul 2024 15:45:30 +0000 Subject: [PATCH 44/85] chore(release): 9.2.0-dev.4 [skip ci] ## [9.2.0-dev.4](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.3...v9.2.0-dev.4) (2024-07-23) ### Features * updating deployment files ([7e37125](https://github.com/VenusProtocol/venus-protocol/commit/7e37125afa710bbb76b9851db9d09bbcbb87bed6)) * updating deployment files ([d89969a](https://github.com/VenusProtocol/venus-protocol/commit/d89969ae25a6715016af56d62cc4a55d773d19a8)) * updating deployment files ([caa262f](https://github.com/VenusProtocol/venus-protocol/commit/caa262fb249a0e59b8513a9dcc0a98c574bd3161)) * updating deployment files ([3aaa586](https://github.com/VenusProtocol/venus-protocol/commit/3aaa586fd93ca72c6662d97762b2f00d698e52e6)) * updating deployment files ([c492d3b](https://github.com/VenusProtocol/venus-protocol/commit/c492d3bec451b46dad120170dcd684ebc92a8b10)) ### Bug Fixes * added function to update IR ([7514bbc](https://github.com/VenusProtocol/venus-protocol/commit/7514bbc04b21ad07a7170b5fc13434582280c2c3)) * deployed new IR ([300d0af](https://github.com/VenusProtocol/venus-protocol/commit/300d0af1e050ae9211b8fd8ba2f0b1b447c894f6)) * deployed new IR ([f0724dd](https://github.com/VenusProtocol/venus-protocol/commit/f0724ddb17f7a47ce85c0913ca73736a60b077a4)) * deployed new vbnb admin implementation ([34fbc1a](https://github.com/VenusProtocol/venus-protocol/commit/34fbc1a5790256d024c5ffb8da79f33534b46e48)) * deployed on testnet ([613418c](https://github.com/VenusProtocol/venus-protocol/commit/613418cf1e29b35ac777364757c6de0816940ad1)) * redeployed with acm signature fix ([a13820f](https://github.com/VenusProtocol/venus-protocol/commit/a13820f72c811cb4d8197af4ad730a9984e1efb7)) * remove deployment from script ([29af8c6](https://github.com/VenusProtocol/venus-protocol/commit/29af8c617e6148849170cefab61d23e41e0ad005)) * removed files ([373a93d](https://github.com/VenusProtocol/venus-protocol/commit/373a93d5b9a777252bc24844e259f2e9830cd88b)) * removed ir deployment ([9cd374c](https://github.com/VenusProtocol/venus-protocol/commit/9cd374ca00ae1501aab3c501e7e590312f6da17e)) * resolved conflict ([c3aac43](https://github.com/VenusProtocol/venus-protocol/commit/c3aac4319648cc393f6ae3c085d6dfb2c9b9deed)) * uncomment test ([5f97c2c](https://github.com/VenusProtocol/venus-protocol/commit/5f97c2c48a0016471eb6e022b3282bf7d54b9de6)) * use public and return code ([c0bab52](https://github.com/VenusProtocol/venus-protocol/commit/c0bab5227dc5ea11a0e56e31dfeffa7e7c89dfc1)) --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd59bbcf4..02eae1e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +## [9.2.0-dev.4](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.3...v9.2.0-dev.4) (2024-07-23) + + +### Features + +* updating deployment files ([7e37125](https://github.com/VenusProtocol/venus-protocol/commit/7e37125afa710bbb76b9851db9d09bbcbb87bed6)) +* updating deployment files ([d89969a](https://github.com/VenusProtocol/venus-protocol/commit/d89969ae25a6715016af56d62cc4a55d773d19a8)) +* updating deployment files ([caa262f](https://github.com/VenusProtocol/venus-protocol/commit/caa262fb249a0e59b8513a9dcc0a98c574bd3161)) +* updating deployment files ([3aaa586](https://github.com/VenusProtocol/venus-protocol/commit/3aaa586fd93ca72c6662d97762b2f00d698e52e6)) +* updating deployment files ([c492d3b](https://github.com/VenusProtocol/venus-protocol/commit/c492d3bec451b46dad120170dcd684ebc92a8b10)) + + +### Bug Fixes + +* added function to update IR ([7514bbc](https://github.com/VenusProtocol/venus-protocol/commit/7514bbc04b21ad07a7170b5fc13434582280c2c3)) +* deployed new IR ([300d0af](https://github.com/VenusProtocol/venus-protocol/commit/300d0af1e050ae9211b8fd8ba2f0b1b447c894f6)) +* deployed new IR ([f0724dd](https://github.com/VenusProtocol/venus-protocol/commit/f0724ddb17f7a47ce85c0913ca73736a60b077a4)) +* deployed new vbnb admin implementation ([34fbc1a](https://github.com/VenusProtocol/venus-protocol/commit/34fbc1a5790256d024c5ffb8da79f33534b46e48)) +* deployed on testnet ([613418c](https://github.com/VenusProtocol/venus-protocol/commit/613418cf1e29b35ac777364757c6de0816940ad1)) +* redeployed with acm signature fix ([a13820f](https://github.com/VenusProtocol/venus-protocol/commit/a13820f72c811cb4d8197af4ad730a9984e1efb7)) +* remove deployment from script ([29af8c6](https://github.com/VenusProtocol/venus-protocol/commit/29af8c617e6148849170cefab61d23e41e0ad005)) +* removed files ([373a93d](https://github.com/VenusProtocol/venus-protocol/commit/373a93d5b9a777252bc24844e259f2e9830cd88b)) +* removed ir deployment ([9cd374c](https://github.com/VenusProtocol/venus-protocol/commit/9cd374ca00ae1501aab3c501e7e590312f6da17e)) +* resolved conflict ([c3aac43](https://github.com/VenusProtocol/venus-protocol/commit/c3aac4319648cc393f6ae3c085d6dfb2c9b9deed)) +* uncomment test ([5f97c2c](https://github.com/VenusProtocol/venus-protocol/commit/5f97c2c48a0016471eb6e022b3282bf7d54b9de6)) +* use public and return code ([c0bab52](https://github.com/VenusProtocol/venus-protocol/commit/c0bab5227dc5ea11a0e56e31dfeffa7e7c89dfc1)) + ## [9.2.0-dev.3](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.2...v9.2.0-dev.3) (2024-07-23) diff --git a/package.json b/package.json index d4d80bde6..882d7233f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.3", + "version": "9.2.0-dev.4", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 93934c765dbc4adae507fa41b7d6413f04a0cf97 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Wed, 24 Jul 2024 12:06:29 -0300 Subject: [PATCH 45/85] refactor: better multinetwork support --- deploy/003-deploy-VBep20.ts | 1 + deploy/004-support-markets.ts | 1 + deploy/011-deploy-markets.ts | 8 +- helpers/deploymentConfig.ts | 331 ++++++++++++++++++---------------- 4 files changed, 184 insertions(+), 157 deletions(-) diff --git a/deploy/003-deploy-VBep20.ts b/deploy/003-deploy-VBep20.ts index 5beb1e7cc..d1358c335 100644 --- a/deploy/003-deploy-VBep20.ts +++ b/deploy/003-deploy-VBep20.ts @@ -1,5 +1,6 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; + import { onlyHardhat } from "../helpers/deploymentConfig"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { diff --git a/deploy/004-support-markets.ts b/deploy/004-support-markets.ts index 03c1917a4..485f0e011 100644 --- a/deploy/004-support-markets.ts +++ b/deploy/004-support-markets.ts @@ -1,5 +1,6 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; + import { onlyHardhat } from "../helpers/deploymentConfig"; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { diff --git a/deploy/011-deploy-markets.ts b/deploy/011-deploy-markets.ts index 0df7b0eb1..6a06e59f0 100644 --- a/deploy/011-deploy-markets.ts +++ b/deploy/011-deploy-markets.ts @@ -19,7 +19,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deploy } = deployments; const { deployer } = await getNamedAccounts(); - const { tokensConfig, marketsConfig, preconfiguredAddresses } = await getConfig(hre.network.name); + const { tokensConfig, marketsConfig } = await getConfig(hre.network.name); const comptrollerDeployment = await deployments.get("Unitroller"); @@ -65,10 +65,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } const underlyingDecimals = Number(await tokenContract.decimals()); - const normalTimelock = await ethers.getContract("NormalTimelock") - const vBep20DelegateDeployment = await deploy("VBep20Delegate", { from: deployer }) + const normalTimelock = await ethers.getContract("NormalTimelock"); + const vBep20DelegateDeployment = await deploy("VBep20Delegate", { from: deployer }); console.log(`Deploying VBep20 Proxy for ${symbol} with Implementation ${vBep20DelegateDeployment.address}`); - + await deploy(`${symbol}`, { contract: "VBep20Delegator", from: deployer, diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index 75ee35ecd..d78bbc2ad 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -1,10 +1,7 @@ -import { contracts as governanceBscMainnet } from "@venusprotocol/governance-contracts/deployments/bscmainnet.json"; -import { contracts as governanceBscTestnet } from "@venusprotocol/governance-contracts/deployments/bsctestnet.json"; +import { ethers } from "hardhat"; import { DeploymentsExtension } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { addresses as venusProtocolBscMainnet } from "../deployments/bscmainnet_addresses.json"; -import { addresses as venusProtocolBscTestnet } from "../deployments/bsctestnet_addresses.json"; import { convertToUnit } from "./utils"; export enum InterestRateModels { @@ -43,12 +40,9 @@ export type VTokenConfig = { vTokenReceiver: string; }; -export type PreconfiguredAddresses = { [contract: string]: string }; - export type DeploymentConfig = { tokensConfig: TokenConfig[]; marketsConfig: VTokenConfig[]; - preconfiguredAddresses: PreconfiguredAddresses; }; export type NetworkConfig = { @@ -57,155 +51,186 @@ export type NetworkConfig = { bscmainnet: DeploymentConfig; }; -const preconfiguredAddresses = { - hardhat: { - VTreasury: "account:deployer", - }, - bsctestnet: { - VTreasury: venusProtocolBscTestnet.VTreasury, - NormalTimelock: governanceBscTestnet.NormalTimelock.address, - VTokenImpl: "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - }, - bscmainnet: { - VTreasury: venusProtocolBscMainnet.VTreasury, - NormalTimelock: governanceBscMainnet.NormalTimelock.address, - VTokenImpl: "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - }, -}; - -export const globalConfig: NetworkConfig = { - hardhat: { - tokensConfig: [ - { - isMock: true, - name: "First Digital USD", - symbol: "FDUSD", - decimals: 18, - }, - { - isMock: true, - name: "Wrapped BNB", - symbol: "WBNB", - decimals: 18, - }, - ], - marketsConfig: [ - { - name: "Venus FDUSD", - asset: "FDUSD", - symbol: "vFDUSD", - rateModel: InterestRateModels.JumpRate.toString(), - baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), - jumpMultiplierPerYear: convertToUnit("2.5", 18), - kink_: convertToUnit("0.8", 18), - collateralFactor: convertToUnit("0.75", 18), - liquidationThreshold: convertToUnit("0.8", 18), - reserveFactor: convertToUnit("0.1", 18), - initialSupply: convertToUnit(9000, 18), - supplyCap: convertToUnit(5_500_000, 18), - borrowCap: convertToUnit(4_400_000, 18), - vTokenReceiver: venusProtocolBscTestnet.VTreasury, - }, - ], - preconfiguredAddresses: preconfiguredAddresses.bsctestnet, - }, - bsctestnet: { - tokensConfig: [ - { - isMock: true, - name: "First Digital USD", - symbol: "FDUSD", - decimals: 18, - }, - ], - marketsConfig: [ - { - name: "Venus FDUSD", - asset: "FDUSD", - symbol: "vFDUSD", - rateModel: InterestRateModels.JumpRate.toString(), - baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), - jumpMultiplierPerYear: convertToUnit("2.5", 18), - kink_: convertToUnit("0.8", 18), - collateralFactor: convertToUnit("0.75", 18), - liquidationThreshold: convertToUnit("0.8", 18), - reserveFactor: convertToUnit("0.1", 18), - initialSupply: convertToUnit(9000, 18), - supplyCap: convertToUnit(5_500_000, 18), - borrowCap: convertToUnit(4_400_000, 18), - vTokenReceiver: venusProtocolBscTestnet.VTreasury, - }, - ], - preconfiguredAddresses: preconfiguredAddresses.bsctestnet, - }, - bscmainnet: { - tokensConfig: [ - { - isMock: false, - symbol: "FDUSD", - tokenAddress: "0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409", - }, - ], - marketsConfig: [ - { - name: "Venus FDUSD", - asset: "FDUSD", - symbol: "vFDUSD", - rateModel: InterestRateModels.JumpRate.toString(), - baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), - jumpMultiplierPerYear: convertToUnit("2.5", 18), - kink_: convertToUnit("0.8", 18), - collateralFactor: convertToUnit("0.75", 18), - liquidationThreshold: convertToUnit("0.8", 18), - reserveFactor: convertToUnit("0.1", 18), - initialSupply: convertToUnit(9000, 18), - supplyCap: convertToUnit(5_500_000, 18), - borrowCap: convertToUnit(4_400_000, 18), - vTokenReceiver: venusProtocolBscMainnet.VTreasury, - }, - { - name: "Venus DOGE", - asset: "DOGE", - symbol: "vDOGE", - rateModel: InterestRateModels.JumpRate.toString(), - baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), - jumpMultiplierPerYear: convertToUnit("2.5", 18), - kink_: convertToUnit("0.8", 18), - collateralFactor: convertToUnit("0.75", 18), - liquidationThreshold: convertToUnit("0.8", 18), - reserveFactor: convertToUnit("0.1", 18), - initialSupply: convertToUnit(9000, 18), - supplyCap: convertToUnit(5_500_000, 18), - borrowCap: convertToUnit(4_400_000, 18), - vTokenReceiver: venusProtocolBscMainnet.VTreasury, - }, - { - name: "Venus USDT", - asset: "USDT", - symbol: "vUSDT", - rateModel: InterestRateModels.JumpRate.toString(), - baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), - jumpMultiplierPerYear: convertToUnit("2.5", 18), - kink_: convertToUnit("0.8", 18), - collateralFactor: convertToUnit("0.75", 18), - liquidationThreshold: convertToUnit("0.8", 18), - reserveFactor: convertToUnit("0.1", 18), - initialSupply: convertToUnit(9000, 18), - supplyCap: convertToUnit(5_500_000, 18), - borrowCap: convertToUnit(4_400_000, 18), - vTokenReceiver: venusProtocolBscMainnet.VTreasury, - }, - ], - preconfiguredAddresses: preconfiguredAddresses.bscmainnet, - }, +export const getGlobalConfig: () => Promise = async () => { + const vTreasuryAddress = (await ethers.getContract("VTreasuryV8")).address; + return { + hardhat: { + tokensConfig: [ + { + isMock: true, + name: "First Digital USD", + symbol: "FDUSD", + decimals: 18, + }, + { + isMock: true, + name: "Wrapped BNB", + symbol: "WBNB", + decimals: 18, + }, + { + isMock: true, + name: "DOGE", + symbol: "DOGE", + decimals: 18, + }, + { + isMock: true, + name: "USDT", + symbol: "USDT", + decimals: 18, + }, + ], + marketsConfig: [ + { + name: "Venus FDUSD", + asset: "FDUSD", + symbol: "vFDUSD", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: vTreasuryAddress, + }, + { + name: "Venus DOGE", + asset: "DOGE", + symbol: "vDOGE", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.9", 18), + liquidationThreshold: convertToUnit("0.95", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit("9000", 18), + supplyCap: convertToUnit("5500000000", 18), + borrowCap: convertToUnit("4400000000", 18), + vTokenReceiver: vTreasuryAddress, + }, + { + name: "Venus USDT", + asset: "USDT", + symbol: "vUSDT", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.9", 18), + liquidationThreshold: convertToUnit("0.95", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit("9000", 18), + supplyCap: convertToUnit("5500000", 18), + borrowCap: convertToUnit("4400000", 18), + vTokenReceiver: vTreasuryAddress, + }, + ], + }, + bsctestnet: { + tokensConfig: [ + { + isMock: true, + name: "First Digital USD", + symbol: "FDUSD", + decimals: 18, + }, + ], + marketsConfig: [ + { + name: "Venus FDUSD", + asset: "FDUSD", + symbol: "vFDUSD", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: vTreasuryAddress, + }, + ], + }, + bscmainnet: { + tokensConfig: [ + { + isMock: false, + symbol: "FDUSD", + tokenAddress: "0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409", + }, + ], + marketsConfig: [ + { + name: "Venus FDUSD", + asset: "FDUSD", + symbol: "vFDUSD", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: vTreasuryAddress, + }, + { + name: "Venus DOGE", + asset: "DOGE", + symbol: "vDOGE", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: vTreasuryAddress, + }, + { + name: "Venus USDT", + asset: "USDT", + symbol: "vUSDT", + rateModel: InterestRateModels.JumpRate.toString(), + baseRatePerYear: "0", + multiplierPerYear: convertToUnit("0.06875", 18), + jumpMultiplierPerYear: convertToUnit("2.5", 18), + kink_: convertToUnit("0.8", 18), + collateralFactor: convertToUnit("0.75", 18), + liquidationThreshold: convertToUnit("0.8", 18), + reserveFactor: convertToUnit("0.1", 18), + initialSupply: convertToUnit(9000, 18), + supplyCap: convertToUnit(5_500_000, 18), + borrowCap: convertToUnit(4_400_000, 18), + vTokenReceiver: vTreasuryAddress, + }, + ], + }, + }; }; export async function getConfig(networkName: string): Promise { + const globalConfig = await getGlobalConfig(); switch (networkName) { case "hardhat": return globalConfig.hardhat; From 45b42ce826f6e1ab64c396678afd9c48e75b7e54 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Wed, 24 Jul 2024 22:43:15 +0530 Subject: [PATCH 46/85] feat: add config for zksync --- .eslinttsconfigrc | 2 +- .github/workflows/ci.yml | 4 + deploy/005-deploy-VTreasuryV8.ts | 12 +- hardhat.config.ts | 30 +- hardhat.config.zksync.ts | 159 ++++++++ package.json | 20 +- yarn.lock | 635 +++++++++++++++++++++++++------ 7 files changed, 710 insertions(+), 152 deletions(-) create mode 100644 hardhat.config.zksync.ts diff --git a/.eslinttsconfigrc b/.eslinttsconfigrc index d85fba71a..7400ccd12 100644 --- a/.eslinttsconfigrc +++ b/.eslinttsconfigrc @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "include": ["./typechain", "./deploy", "./tests", "./script", "./scenario", "saddle.config.js", "docgen-templates", "commitlint.config.js"] + "include": ["./typechain", "./deploy", "./tests", "./script", "./scenario", "saddle.config.js", "docgen-templates", "commitlint.config.js", "./hardhat.config.zksync.ts"] } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d6c1c1d3..18ca8cd89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,6 +143,10 @@ jobs: EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done + for NETWORK in zksyncsepolia; do + EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json --config hardhat.config.zksync.ts + jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json + done yarn prettier - uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/deploy/005-deploy-VTreasuryV8.ts b/deploy/005-deploy-VTreasuryV8.ts index 7f58367f4..8e21e1d1f 100644 --- a/deploy/005-deploy-VTreasuryV8.ts +++ b/deploy/005-deploy-VTreasuryV8.ts @@ -38,6 +38,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { hardhat: deployer, }; + const deployerSigner = await hre.ethers.getSigner(deployer); + const treasuryInstance = await deploy("VTreasuryV8", { contract: "VTreasuryV8", from: deployer, @@ -51,10 +53,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const VTreasuryV8 = await ethers.getContractAt("VTreasuryV8", treasuryInstance.address); - console.log("Transferring owner to venus admin account"); - const tx = await VTreasuryV8.transferOwnership(adminAccount); - tx.wait(); - console.log("Ownership Transferred to: ", await VTreasuryV8.pendingOwner()); + if ((await VTreasuryV8.owner()).toLowerCase() != adminAccount.toLowerCase()) { + console.log("Transferring owner to venus admin account"); + const tx = await VTreasuryV8.connect(deployerSigner).transferOwnership(adminAccount); + tx.wait(); + console.log("Ownership Transferred to: ", await VTreasuryV8.pendingOwner()); + } }; func.tags = ["VTreasuryV8"]; diff --git a/hardhat.config.ts b/hardhat.config.ts index 1610855dc..711d34061 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,10 +1,10 @@ import "module-alias/register"; -import "@matterlabs/hardhat-zksync-deploy"; -import "@matterlabs/hardhat-zksync-solc"; -import "@matterlabs/hardhat-zksync-verify"; import "@nomicfoundation/hardhat-chai-matchers"; +import "@nomicfoundation/hardhat-toolbox"; import "@nomiclabs/hardhat-ethers"; +import "@nomiclabs/hardhat-etherscan"; +import "@openzeppelin/hardhat-upgrades"; import "@typechain/hardhat"; import fs from "fs"; import "hardhat-deploy"; @@ -104,10 +104,6 @@ task("run-script", "Runs a hardhard script by name") const config: HardhatUserConfig = { defaultNetwork: "hardhat", - zksolc: { - version: "1.5.0", - settings: {}, - }, solidity: { compilers: [ { @@ -150,20 +146,17 @@ const config: HardhatUserConfig = { gasPrice: 10000000000, // 10 gwei gasMultiplier: 10, timeout: 12000000, - zksync: false, }, bscmainnet: { url: process.env.ARCHIVE_NODE_bscmainnet || "https://bsc-dataseed.binance.org/", chainId: 56, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, sepolia: { url: process.env.ARCHIVE_NODE_sepolia || "https://ethereum-sepolia.blockpi.network/v1/rpc/public", chainId: 11155111, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, ethereum: { url: process.env.ARCHIVE_NODE_ethereum || "https://ethereum.blockpi.network/v1/rpc/public", @@ -171,57 +164,42 @@ const config: HardhatUserConfig = { live: true, timeout: 1200000, // 20 minutes accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, opbnbtestnet: { url: process.env.ARCHIVE_NODE_opbnbtestnet || "https://opbnb-testnet-rpc.bnbchain.org", chainId: 5611, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, opbnbmainnet: { url: process.env.ARCHIVE_NODE_opbnbmainnet || "https://opbnb-mainnet-rpc.bnbchain.org", chainId: 204, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, arbitrumsepolia: { url: process.env.ARCHIVE_NODE_arbitrumsepolia || "https://sepolia-rollup.arbitrum.io/rpc", chainId: 421614, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, arbitrumone: { url: process.env.ARCHIVE_NODE_arbitrumone || "https://arb1.arbitrum.io/rpc", chainId: 42161, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, xlayertestnet: { url: process.env.ARCHIVE_NODE_xlayertestnet || "https://testrpc.xlayer.tech/", chainId: 195, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, }, xlayermainnet: { url: process.env.ARCHIVE_NODE_xlayermainnet || "https://rpc.xlayer.tech/", chainId: 196, live: true, accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: false, - }, - zksyncsepolia: { - url: process.env.ARCHIVE_NODE_zksyncsepolia || "https://sepolia.era.zksync.dev", - ethNetwork: "sepolia", - live: true, - verifyURL: "https://explorer.sepolia.era.zksync.dev/contract_verification", - accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], - zksync: true, }, }, etherscan: { @@ -383,4 +361,4 @@ function isFork() { }; } -export default config; +export default config; \ No newline at end of file diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts new file mode 100644 index 000000000..b458e2b59 --- /dev/null +++ b/hardhat.config.zksync.ts @@ -0,0 +1,159 @@ +import "module-alias/register"; + +import "@matterlabs/hardhat-zksync"; +import "@matterlabs/hardhat-zksync-deploy"; +import "@matterlabs/hardhat-zksync-solc"; +import "@matterlabs/hardhat-zksync-verify"; +import "@nomicfoundation/hardhat-chai-matchers"; +import "@typechain/hardhat"; + +import "hardhat-deploy"; +import { HardhatUserConfig,extendConfig } from "hardhat/config"; +import { HardhatConfig } from "hardhat/types"; + +import "solidity-coverage"; +import "solidity-docgen"; + +require("hardhat-contract-sizer"); + +require("dotenv").config(); + +const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY; + +extendConfig((config: HardhatConfig) => { + if (process.env.EXPORT !== "true") { + config.external = { + ...config.external, + deployments: { + zksyncsepolia: [], + }, + }; + } +}); + +const config: HardhatUserConfig = { + defaultNetwork: "hardhat", + zksolc: { + version: "1.5.1", + compilerSource: "binary", + settings: { + metadata: { + // do not include the metadata hash, since this is machine dependent + // and we want all generated code to be deterministic + // https://docs.soliditylang.org/en/v0.7.6/metadata.html + bytecodeHash: "none", + }, + }, + }, + solidity: { + compilers: [ + { + version: "0.5.16", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, + { + version: "0.8.25", + settings: { + optimizer: { + enabled: true, + runs: 10000, + }, + evmVersion: "paris", + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, + ], + }, + zksolc: { + version: "1.5.0", + settings: {}, + }, + networks: { + hardhat: isFork(), + zksyncsepolia: { + url: process.env.ARCHIVE_NODE_zksyncsepolia || "https://sepolia.era.zksync.dev", + ethNetwork: "sepolia", + verifyURL: "https://explorer.sepolia.era.zksync.dev/contract_verification", + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: true, + live: true, + }, + }, + paths: { + sources: "./contracts", + tests: "./tests/hardhat", + cache: "./cache-zk", + artifacts: "./artifacts-zk", + }, + mocha: { + timeout: 200000000, + }, + typechain: { + outDir: "typechain", + target: "ethers-v5", + }, + // Hardhat deploy + namedAccounts: { + deployer: { + default: 0, // here this will by default take the first account as deployer + }, + }, + external: { + contracts: [ + { + artifacts: "node_modules/@venusprotocol/governance-contracts/artifacts-zk", + }, + { + artifacts: "node_modules/@venusprotocol/oracle/artifacts-zk", + }, + { + artifacts: "node_modules/@venusprotocol/protocol-reserve/artifacts-zk", + }, + ], + deployments: {}, + }, + docgen: { + outputDir: "./docgen-docs", + pages: "files", + templates: "docgen-templates", + }, +}; + +function isFork() { + return process.env.FORK === "true" + ? { + allowUnlimitedContractSize: false, + loggingEnabled: false, + forking: { + url: process.env[`ARCHIVE_NODE_${process.env.FORKED_NETWORK}`] || "https://sepolia.era.zksync.dev", + blockNumber: 21068448, // TODO: change this + }, + accounts: { + accountsBalance: "1000000000000000000", + }, + live: false, + zksync: true, + } + : { + allowUnlimitedContractSize: true, + loggingEnabled: false, + live: false, + zksync: true, + }; +} + +export default config; diff --git a/package.json b/package.json index 6293ca783..d656e30d8 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,10 @@ "deployments" ], "scripts": { - "compile": "hardhat compile", + "compile": "hardhat compile && hardhat compile --config hardhat.config.zksync.ts", "coverage": "hardhat coverage", "test": "hardhat test", - "build": "rm -rf dist && tsc --declaration && hardhat compile", + "build": "rm -rf dist && tsc --declaration && hardhat compile && hardhat compile --config hardhat.config.zksync.ts", "lint": "yarn lint:ts && yarn lint:sol && yarn prettier:check", "lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .", "lint:sol": "solhint \"contracts/**/*.sol\"", @@ -27,7 +27,8 @@ "prettier": "prettier --write \"**/*.{js,json,md,ts,yaml,yml,sol}\"", "prettier:check": "prettier --check \"**/*.{js,json,md,ts,yaml,yml,sol}\"", "docgen": "hardhat docgen", - "prepare": "husky install" + "prepare": "husky install", + "clean": "hardhat clean && hardhat clean --config hardhat.config.zksync.ts" }, "dependencies": { "@nomicfoundation/hardhat-ethers": "^3.0.0", @@ -50,9 +51,10 @@ "@ethersproject/abstract-signer": "^5", "@ethersproject/bytes": "^5.0.0", "@ethersproject/providers": "^5.6.8", - "@matterlabs/hardhat-zksync-deploy": "^1.5.0", + "@matterlabs/hardhat-zksync": "^0.2.0", + "@matterlabs/hardhat-zksync-deploy": "^0.11.0", "@matterlabs/hardhat-zksync-solc": "^1.2.1", - "@matterlabs/hardhat-zksync-verify": "^1.6.0", + "@matterlabs/hardhat-zksync-verify": "0.7.0", "@nomicfoundation/hardhat-chai-matchers": "^1.0.3", "@nomicfoundation/hardhat-network-helpers": "^1.0.10", "@nomicfoundation/hardhat-toolbox": "^2.0.0", @@ -75,11 +77,11 @@ "chai": "^4.3.6", "eslint": "^8.25.0", "eslint-config-prettier": "^8.5.0", - "ethers": "^6.10.0", + "ethers": "^5.7.0", "hardhat": "^2.19.2", "hardhat-contract-sizer": "^2.8.0", - "hardhat-deploy": "^0.11.14", - "hardhat-deploy-ethers": "^0.4.2", + "hardhat-deploy": "^0.12.4", + "hardhat-deploy-ethers": "^0.3.0-beta.13", "hardhat-gas-reporter": "^1.0.8", "husky": "^8.0.1", "prettier": "^2.7.1", @@ -92,7 +94,7 @@ "typechain": "^8.1.0", "typescript": "^4.7.4", "web3-utils": "^1.7.5", - "zksync-ethers": "^6.10.0" + "zksync-ethers": "^5.9.1" }, "_moduleAliases": { "@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers" diff --git a/yarn.lock b/yarn.lock index df4051171..2074fb33f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,13 +12,6 @@ __metadata: languageName: node linkType: hard -"@adraffy/ens-normalize@npm:1.10.1": - version: 1.10.1 - resolution: "@adraffy/ens-normalize@npm:1.10.1" - checksum: 0836f394ea256972ec19a0b5e78cb7f5bcdfd48d8a32c7478afc94dd53ae44c04d1aa2303d7f3077b4f3ac2323b1f557ab9188e8059978748fdcd83e04a80dcc - languageName: node - linkType: hard - "@ampproject/remapping@npm:^2.1.0": version: 2.2.1 resolution: "@ampproject/remapping@npm:2.2.1" @@ -1297,9 +1290,9 @@ __metadata: languageName: node linkType: hard -"@matterlabs/hardhat-zksync-deploy@npm:^1.5.0": - version: 1.5.0 - resolution: "@matterlabs/hardhat-zksync-deploy@npm:1.5.0" +"@matterlabs/hardhat-zksync-deploy@npm:^0.11.0": + version: 0.11.0 + resolution: "@matterlabs/hardhat-zksync-deploy@npm:0.11.0" dependencies: "@matterlabs/hardhat-zksync-solc": ^1.2.0 chai: ^4.3.4 @@ -1311,10 +1304,30 @@ __metadata: sinon-chai: ^3.7.0 ts-morph: ^22.0.0 peerDependencies: - ethers: ^6.12.2 - hardhat: ^2.22.5 - zksync-ethers: ^6.8.0 - checksum: ad36aa28e7f89958b3bcecede71f658f019582485b377cc3107f191a85aa482be7aae2adcd11651a845b54bbb26406584c89370df25fcf498f33fa341d2e7484 + ethers: ~5.7.2 + hardhat: ^2.14.0 + zksync-ethers: ^5.8.0 + checksum: 82305a8b9426bce5a4b59944ebfa88909d4dff37c7bcbd28866c62eb3ca3858c20686155ed3cb69217bfb9774ede07ed9df2126bb4d34249b36e1424c389fe56 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-node@npm:^0.2.0": + version: 0.2.0 + resolution: "@matterlabs/hardhat-zksync-node@npm:0.2.0" + dependencies: + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + axios: ^1.7.2 + chai: ^4.3.4 + chalk: ^4.1.2 + fs-extra: ^11.2.0 + proxyquire: ^2.1.3 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + undici: ^6.18.2 + peerDependencies: + hardhat: ^2.14.0 + zksync-ethers: ^5.8.0 + checksum: 9c769b069f841dfc7ce66c01169842f9b159d6b9cb424dd5c44b44b3c7acc1e83a158c48cce124e7084c08880f8e13e453be8e57c447928c042840c07457f3e0 languageName: node linkType: hard @@ -1339,26 +1352,92 @@ __metadata: languageName: node linkType: hard -"@matterlabs/hardhat-zksync-verify@npm:^1.6.0": - version: 1.6.0 - resolution: "@matterlabs/hardhat-zksync-verify@npm:1.6.0" +"@matterlabs/hardhat-zksync-upgradable@npm:^0.5.0": + version: 0.5.1 + resolution: "@matterlabs/hardhat-zksync-upgradable@npm:0.5.1" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@openzeppelin/upgrades-core": ~1.29.0 + chalk: ^4.1.2 + compare-versions: ^6.1.0 + dockerode: ^3.3.4 + ethereumjs-util: ^7.1.5 + ethers: ~5.7.2 + fs-extra: ^11.2.0 + hardhat: ^2.14.0 + proper-lockfile: ^4.1.2 + solidity-ast: ^0.4.56 + zksync-ethers: ^5.8.0 + peerDependencies: + "@openzeppelin/contracts-upgradeable": ^4.9.2 + checksum: 00ae82ad8cf3e64479a36898253dac2edb8ca9e51b3cbb9d16cb61c41218d259a6136cd2ede4366c8934ab3b27635133ca4b4000f51ab8dc1321ae42eedbfefb + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-verify@npm:0.7.0, @matterlabs/hardhat-zksync-verify@npm:^0.7.0": + version: 0.7.0 + resolution: "@matterlabs/hardhat-zksync-verify@npm:0.7.0" dependencies: "@ethersproject/abi": ^5.7.0 "@ethersproject/address": 5.7.0 - "@matterlabs/hardhat-zksync-solc": ^1.2.1 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 "@nomicfoundation/hardhat-verify": ^2.0.8 + "@openzeppelin/contracts": ^4.9.2 axios: ^1.7.2 cbor: ^9.0.2 chai: ^4.3.4 chalk: ^4.1.2 debug: ^4.3.5 - semver: ^7.6.2 + hardhat: ^2.14.0 sinon: ^18.0.0 sinon-chai: ^3.7.0 + zksync-ethers: ^5.8.0 peerDependencies: "@nomicfoundation/hardhat-verify": ^2.0.8 - hardhat: ^2.22.5 - checksum: 289f380abcfeeee71524d504754507f39cdb2d1214914f9e178522b6187edfa59e0e48eb3d3efb745a0f613492af4fbea972d34637d2e96823c7a7e4c63b50a2 + checksum: 58223280b58bc33a49e600f499d5ea902bf135d3b9ebde61a8a25b63cb16d266195e43df8d645d8ed48098dfd148e7b623db3ead0563944548088f72ad7de698 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync@npm:^0.2.0": + version: 0.2.0 + resolution: "@matterlabs/hardhat-zksync@npm:0.2.0" + dependencies: + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-node": ^0.2.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@matterlabs/hardhat-zksync-upgradable": ^0.5.0 + "@matterlabs/hardhat-zksync-verify": ^0.7.0 + "@matterlabs/zksync-contracts": ^0.6.1 + "@nomicfoundation/hardhat-verify": ^2.0.8 + "@nomiclabs/hardhat-ethers": ^2.2.1 + "@openzeppelin/contracts": ^4.9.2 + "@openzeppelin/contracts-upgradeable": ^4.9.2 + "@openzeppelin/upgrades-core": ^1.27.0 + chai: ^4.3.7 + ethers: ~5.7.2 + hardhat: ^2.14.0 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + zksync-ethers: ^5.8.0 + peerDependencies: + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-node": ^0.2.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@matterlabs/hardhat-zksync-upgradable": ^0.5.0 + "@matterlabs/hardhat-zksync-verify": ^0.7.0 + checksum: 124e545e8b6e23313669352cadc4047cb738064595f9722707bd841a15b7d0ba14a3992e62e9847f445b0f18569f81b37274f1a66bf294949d6c6dcc1326f958 + languageName: node + linkType: hard + +"@matterlabs/zksync-contracts@npm:^0.6.1": + version: 0.6.2 + resolution: "@matterlabs/zksync-contracts@npm:0.6.2" + peerDependencies: + "@openzeppelin/contracts": 4.6.0 + "@openzeppelin/contracts-upgradeable": 4.6.0 + checksum: 971249b1c05590254df5544ae0a9d0b9e6956d565311daff2c515c829d8bd43838d486f76d483241f86183fe80a1d35029758d6c756c23c3bbfb249870ec7ea7 languageName: node linkType: hard @@ -1384,15 +1463,6 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.2.0": - version: 1.2.0 - resolution: "@noble/curves@npm:1.2.0" - dependencies: - "@noble/hashes": 1.3.2 - checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 - languageName: node - linkType: hard - "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -1407,7 +1477,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.2, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": +"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": version: 1.3.2 resolution: "@noble/hashes@npm:1.3.2" checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 @@ -1448,6 +1518,70 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/edr-darwin-arm64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.4.2" + checksum: 7835e998c2ef83924efac0694bb4392f6abf770dc7f935dd28abc1a291f830cade14750d83a46a3205338e4ddff943dda60a9849317cf42edd38d7a2ce843588 + languageName: node + linkType: hard + +"@nomicfoundation/edr-darwin-x64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" + checksum: 94daa26610621e85cb025feb37bb93e9b89c59f908bf3eae70720d2b86632dbb1236420ae3ae6f685d563ba52519d5f860e68ccd898fa1fced831961dea2c08a + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" + checksum: a7181e237f6ece8bd97e0f75972044dbf584c506bbac5bef586d9f7d627a2c07a279a2d892837bbedc80ea3dfb39fa66becc297238b5d715a942eed2a50745cd + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" + checksum: 5a849484b7a104a7e1497774c4117afc58f64d57d30889d4f6f676dddb5c695192c0789b8be0b71171a2af770167a28aa301ae3ece7a2a156d82d94388639b66 + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" + checksum: 0520dd9a583976fd0f49dfe6c23227f03cd811a395dc5eed1a2922b4358d7c71fdcfea8f389d4a0e23b4ec53e1435959a544380f94e48122a75f94a42b177ac7 + languageName: node + linkType: hard + +"@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" + checksum: 80c3b4346d8c27539bc005b09db233dedd8930310d1a049827661e69a8e03be9cbac27eb620a6ae9bfd46a2fbe22f83cee5af8d9e63178925d74d9c656246708 + languageName: node + linkType: hard + +"@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" + checksum: 736fb866fd5c2708560cbd5ae72815b5fc96e650cd74bc8bab0a1cb0e8baede4f595fdceb445c159814a6a7e8e691de227a5db49f61b3cd0ddfafd5715b397ab + languageName: node + linkType: hard + +"@nomicfoundation/edr@npm:^0.4.1": + version: 0.4.2 + resolution: "@nomicfoundation/edr@npm:0.4.2" + dependencies: + "@nomicfoundation/edr-darwin-arm64": 0.4.2 + "@nomicfoundation/edr-darwin-x64": 0.4.2 + "@nomicfoundation/edr-linux-arm64-gnu": 0.4.2 + "@nomicfoundation/edr-linux-arm64-musl": 0.4.2 + "@nomicfoundation/edr-linux-x64-gnu": 0.4.2 + "@nomicfoundation/edr-linux-x64-musl": 0.4.2 + "@nomicfoundation/edr-win32-x64-msvc": 0.4.2 + checksum: 8c8457257b59ed9a29d88b7492e98e974d24e8318903e876a14dc0f6d5dc77948cd9053937d9730f54f920ba82ce3d244cab518d068359bcc20df88623f171ef + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-block@npm:4.2.2": version: 4.2.2 resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" @@ -1538,6 +1672,15 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-common@npm:4.0.4": + version: 4.0.4 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" + dependencies: + "@nomicfoundation/ethereumjs-util": 9.0.4 + checksum: ce3f6e4ae15b976efdb7ccda27e19aadb62b5ffee209f9503e68b4fd8633715d4d697c0cc10ccd35f5e4e977edd05100d0f214e28880ec64fff77341dc34fcdf + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-ethash@npm:2.0.5": version: 2.0.5 resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.5" @@ -1616,6 +1759,15 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-rlp@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" + bin: + rlp: bin/rlp.cjs + checksum: ee2c2e5776c73801dc5ed636f4988b599b4563c2d0037da542ea57eb237c69dd1ac555f6bcb5e06f70515b6459779ba0d68252a6e105132b4659ab4bf62919b0 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5": version: 1.0.5 resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5" @@ -1696,6 +1848,23 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-tx@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-rlp": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 + ethereum-cryptography: 0.1.3 + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 0f1c87716682ccbcf4d92ffc6cf8ab557e658b90319d82be3219a091a736859f8803c73c98e4863682e3e86d264751c472d33ff6d3c3daf4e75b5f01d0af8fa3 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-util@npm:8.0.6, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": version: 8.0.6 resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.6" @@ -1717,6 +1886,21 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-util@npm:9.0.4": + version: 9.0.4 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" + dependencies: + "@nomicfoundation/ethereumjs-rlp": 5.0.4 + ethereum-cryptography: 0.1.3 + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 754439f72b11cad2d8986707ad020077dcc763c4055f73e2668a0b4cadb22aa4407faa9b3c587d9eb5b97ac337afbe037eb642bc1d5a16197284f83db3462cbe + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-vm@npm:7.0.2": version: 7.0.2 resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" @@ -1981,7 +2165,7 @@ __metadata: languageName: node linkType: hard -"@nomiclabs/hardhat-ethers@npm:^2.2.3": +"@nomiclabs/hardhat-ethers@npm:^2.2.1, @nomiclabs/hardhat-ethers@npm:^2.2.3": version: 2.2.3 resolution: "@nomiclabs/hardhat-ethers@npm:2.2.3" peerDependencies: @@ -2397,6 +2581,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts-upgradeable@npm:^4.9.2": + version: 4.9.6 + resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.6" + checksum: 481075e7222cab025ae55304263fca69a2d04305521957bc16d2aece9fa2b86b6914711724822493e3d04df7e793469cd0bcb1e09f0ddd10cb4e360ac7eed12a + languageName: node + linkType: hard + "@openzeppelin/contracts@npm:3.4.2-solc-0.7": version: 3.4.2-solc-0.7 resolution: "@openzeppelin/contracts@npm:3.4.2-solc-0.7" @@ -2418,6 +2609,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:^4.9.2": + version: 4.9.6 + resolution: "@openzeppelin/contracts@npm:4.9.6" + checksum: 274b6e968268294f12d5ca4f0278f6e6357792c8bb4d76664f83dbdc325f780541538a127e6a6e97e4f018088b42f65952014dec9c745c0fa25081f43ef9c4bf + languageName: node + linkType: hard + "@openzeppelin/defender-base-client@npm:^1.46.0": version: 1.52.0 resolution: "@openzeppelin/defender-base-client@npm:1.52.0" @@ -2486,6 +2684,24 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/upgrades-core@npm:~1.29.0": + version: 1.29.0 + resolution: "@openzeppelin/upgrades-core@npm:1.29.0" + dependencies: + cbor: ^9.0.0 + chalk: ^4.1.0 + compare-versions: ^6.0.0 + debug: ^4.1.1 + ethereumjs-util: ^7.0.3 + minimist: ^1.2.7 + proper-lockfile: ^4.1.1 + solidity-ast: ^0.4.26 + bin: + openzeppelin-upgrades-core: dist/cli/cli.js + checksum: 99dea5d180b56670ff01d0f4fd99f19def5904b0d764b5c79106878d866c7fd6576c1523661a71170947ef06ab83fbb189cd65747bfcd6b20c8ea29adcea8a0a + languageName: node + linkType: hard + "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -3084,13 +3300,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:18.15.13": - version: 18.15.13 - resolution: "@types/node@npm:18.15.13" - checksum: 79cc5a2b5f98e8973061a4260a781425efd39161a0e117a69cd089603964816c1a14025e1387b4590c8e82d05133b7b4154fa53a7dffb3877890a66145e76515 - languageName: node - linkType: hard - "@types/node@npm:20.5.1": version: 20.5.1 resolution: "@types/node@npm:20.5.1" @@ -3534,9 +3743,10 @@ __metadata: "@ethersproject/abstract-signer": ^5 "@ethersproject/bytes": ^5.0.0 "@ethersproject/providers": ^5.6.8 - "@matterlabs/hardhat-zksync-deploy": ^1.5.0 + "@matterlabs/hardhat-zksync": ^0.2.0 + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 "@matterlabs/hardhat-zksync-solc": ^1.2.1 - "@matterlabs/hardhat-zksync-verify": ^1.6.0 + "@matterlabs/hardhat-zksync-verify": 0.7.0 "@nomicfoundation/hardhat-chai-matchers": ^1.0.3 "@nomicfoundation/hardhat-ethers": ^3.0.0 "@nomicfoundation/hardhat-network-helpers": ^1.0.10 @@ -3567,11 +3777,11 @@ __metadata: dotenv: ^16.0.1 eslint: ^8.25.0 eslint-config-prettier: ^8.5.0 - ethers: ^6.10.0 + ethers: ^5.7.0 hardhat: ^2.19.2 hardhat-contract-sizer: ^2.8.0 - hardhat-deploy: ^0.11.14 - hardhat-deploy-ethers: ^0.4.2 + hardhat-deploy: ^0.12.4 + hardhat-deploy-ethers: ^0.3.0-beta.13 hardhat-gas-reporter: ^1.0.8 husky: ^8.0.1 module-alias: ^2.2.2 @@ -3585,7 +3795,7 @@ __metadata: typechain: ^8.1.0 typescript: ^4.7.4 web3-utils: ^1.7.5 - zksync-ethers: ^6.10.0 + zksync-ethers: ^5.9.1 languageName: unknown linkType: soft @@ -3765,13 +3975,6 @@ __metadata: languageName: node linkType: hard -"aes-js@npm:4.0.0-beta.5": - version: 4.0.0-beta.5 - resolution: "aes-js@npm:4.0.0-beta.5" - checksum: cc2ea969d77df939c32057f7e361b6530aa6cb93cb10617a17a45cd164e6d761002f031ff6330af3e67e58b1f0a3a8fd0b63a720afd591a653b02f649470e15b - languageName: node - linkType: hard - "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -3853,6 +4056,15 @@ __metadata: languageName: node linkType: hard +"ansi-align@npm:^3.0.0": + version: 3.0.1 + resolution: "ansi-align@npm:3.0.1" + dependencies: + string-width: ^4.1.0 + checksum: 6abfa08f2141d231c257162b15292467081fa49a208593e055c866aa0455b57f3a86b5a678c190c618faa79b4c59e254493099cb700dd9cf2293c6be2c8f5d8d + languageName: node + linkType: hard + "ansi-colors@npm:4.1.1": version: 4.1.1 resolution: "ansi-colors@npm:4.1.1" @@ -4358,6 +4570,22 @@ __metadata: languageName: node linkType: hard +"boxen@npm:^5.1.2": + version: 5.1.2 + resolution: "boxen@npm:5.1.2" + dependencies: + ansi-align: ^3.0.0 + camelcase: ^6.2.0 + chalk: ^4.1.0 + cli-boxes: ^2.2.1 + string-width: ^4.2.2 + type-fest: ^0.20.2 + widest-line: ^3.1.0 + wrap-ansi: ^7.0.0 + checksum: 82d03e42a72576ff235123f17b7c505372fe05c83f75f61e7d4fa4bcb393897ec95ce766fecb8f26b915f0f7a7227d66e5ec7cef43f5b2bd9d3aeed47ec55877 + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -4641,7 +4869,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.0.0": +"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d @@ -4741,6 +4969,21 @@ __metadata: languageName: node linkType: hard +"chai@npm:^4.3.7": + version: 4.4.1 + resolution: "chai@npm:4.4.1" + dependencies: + assertion-error: ^1.1.0 + check-error: ^1.0.3 + deep-eql: ^4.1.3 + get-func-name: ^2.0.2 + loupe: ^2.3.6 + pathval: ^1.1.1 + type-detect: ^4.0.8 + checksum: 9ab84f36eb8e0b280c56c6c21ca4da5933132cd8a0c89c384f1497f77953640db0bc151edd47f81748240a9fab57b78f7d925edfeedc8e8fc98016d71f40c36e + languageName: node + linkType: hard + "chalk@npm:^2.3.2, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -4865,6 +5108,13 @@ __metadata: languageName: node linkType: hard +"cli-boxes@npm:^2.2.1": + version: 2.2.1 + resolution: "cli-boxes@npm:2.2.1" + checksum: be79f8ec23a558b49e01311b39a1ea01243ecee30539c880cf14bf518a12e223ef40c57ead0cb44f509bffdffc5c129c746cd50d863ab879385370112af4f585 + languageName: node + linkType: hard + "cli-columns@npm:^4.0.0": version: 4.0.0 resolution: "cli-columns@npm:4.0.0" @@ -5059,6 +5309,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^8.1.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 0f82321821fc27b83bd409510bb9deeebcfa799ff0bf5d102128b500b7af22872c0c92cb6a0ebc5a4cf19c6b550fba9cedfa7329d18c6442a625f851377bacf0 + languageName: node + linkType: hard + "common-ancestor-path@npm:^1.0.1": version: 1.0.1 resolution: "common-ancestor-path@npm:1.0.1" @@ -5083,6 +5340,13 @@ __metadata: languageName: node linkType: hard +"compare-versions@npm:^6.1.0": + version: 6.1.1 + resolution: "compare-versions@npm:6.1.1" + checksum: 73fe6c4f52d22efe28f0a3be10df2afd704e10b3593360cd963e86b33a7a263c263b41a1361b69c30a0fe68bfa70fef90860c1cf2ef41502629d4402890fcd57 + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -5621,6 +5885,18 @@ __metadata: languageName: node linkType: hard +"docker-modem@npm:^3.0.0": + version: 3.0.8 + resolution: "docker-modem@npm:3.0.8" + dependencies: + debug: ^4.1.1 + readable-stream: ^3.5.0 + split-ca: ^1.0.1 + ssh2: ^1.11.0 + checksum: e3675c9b1ad800be8fb1cb9c5621fbef20a75bfedcd6e01b69808eadd7f0165681e4e30d1700897b788a67dbf4769964fcccd19c3d66f6d2499bb7aede6b34df + languageName: node + linkType: hard + "docker-modem@npm:^5.0.3": version: 5.0.3 resolution: "docker-modem@npm:5.0.3" @@ -5644,6 +5920,17 @@ __metadata: languageName: node linkType: hard +"dockerode@npm:^3.3.4": + version: 3.3.5 + resolution: "dockerode@npm:3.3.5" + dependencies: + "@balena/dockerignore": ^1.0.2 + docker-modem: ^3.0.0 + tar-fs: ~2.0.1 + checksum: 7f6650422b07fa7ea9d5801f04b1a432634446b5fe37b995b8302b953b64e93abf1bb4596c2fb574ba47aafee685ef2ab959cc86c9654add5a26d09541bbbcc6 + languageName: node + linkType: hard + "dockerode@npm:^4.0.2": version: 4.0.2 resolution: "dockerode@npm:4.0.2" @@ -6210,7 +6497,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.0.3, ethereumjs-util@npm:^7.1.4": +"ethereumjs-util@npm:^7.0.3, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -6223,7 +6510,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2": +"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -6261,21 +6548,6 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^6.10.0": - version: 6.13.1 - resolution: "ethers@npm:6.13.1" - dependencies: - "@adraffy/ens-normalize": 1.10.1 - "@noble/curves": 1.2.0 - "@noble/hashes": 1.3.2 - "@types/node": 18.15.13 - aes-js: 4.0.0-beta.5 - tslib: 2.4.0 - ws: 8.17.1 - checksum: beef4b6d117f64c369f44be631e0f666b966374eac0cc0446fa7abe114b11d6b3019060022eec65c031f150711f4913d249de507ff3da3204e654635db80a07e - languageName: node - linkType: hard - "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -6422,6 +6694,16 @@ __metadata: languageName: node linkType: hard +"fill-keys@npm:^1.0.2": + version: 1.0.2 + resolution: "fill-keys@npm:1.0.2" + dependencies: + is-object: ~1.0.1 + merge-descriptors: ~1.0.0 + checksum: 6ac5ff60ff08f2f44d19e919c9ca579f4efaaa8c88232b4aab5a5b5522aeb8ec91501956e780cb2b44574fe4a4a337e9b43187829267d0b66a6bfedbafae893f + languageName: node + linkType: hard + "fill-range@npm:^7.0.1": version: 7.0.1 resolution: "fill-range@npm:7.0.1" @@ -7170,17 +7452,6 @@ __metadata: languageName: node linkType: hard -"hardhat-deploy-ethers@npm:^0.4.2": - version: 0.4.2 - resolution: "hardhat-deploy-ethers@npm:0.4.2" - peerDependencies: - "@nomicfoundation/hardhat-ethers": ^3.0.2 - hardhat: ^2.16.0 - hardhat-deploy: ^0.12.0 - checksum: 38c06f6b1d482cff92f31f1daf4cc4b6be943e1f62148e29cdddfc481d040470b9d6f233e0d61517fd02cc259f9f77ebd4512ea79624a893c72c90d70eff3f65 - languageName: node - linkType: hard - "hardhat-deploy@npm:^0.10.5": version: 0.10.6 resolution: "hardhat-deploy@npm:0.10.6" @@ -7246,6 +7517,38 @@ __metadata: languageName: node linkType: hard +"hardhat-deploy@npm:^0.12.4": + version: 0.12.4 + resolution: "hardhat-deploy@npm:0.12.4" + dependencies: + "@ethersproject/abi": ^5.7.0 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/contracts": ^5.7.0 + "@ethersproject/providers": ^5.7.2 + "@ethersproject/solidity": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + "@ethersproject/wallet": ^5.7.0 + "@types/qs": ^6.9.7 + axios: ^0.21.1 + chalk: ^4.1.2 + chokidar: ^3.5.2 + debug: ^4.3.2 + enquirer: ^2.3.6 + ethers: ^5.7.0 + form-data: ^4.0.0 + fs-extra: ^10.0.0 + match-all: ^1.2.6 + murmur-128: ^0.2.1 + qs: ^6.9.4 + zksync-ethers: ^5.0.0 + checksum: 995a20a7ae8d10d2b961690e0903cd2a4a07198bc3d20a15d4734f2d9aade261b6f0ffb9e01b8fc013de34b687e401ed0c90dfc4d592571576f133ce8cbf3003 + languageName: node + linkType: hard + "hardhat-gas-reporter@npm:^1.0.6, hardhat-gas-reporter@npm:^1.0.8": version: 1.0.9 resolution: "hardhat-gas-reporter@npm:1.0.9" @@ -7259,6 +7562,67 @@ __metadata: languageName: node linkType: hard +"hardhat@npm:^2.14.0": + version: 2.22.6 + resolution: "hardhat@npm:2.22.6" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@metamask/eth-sig-util": ^4.0.0 + "@nomicfoundation/edr": ^0.4.1 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-tx": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 + "@nomicfoundation/solidity-analyzer": ^0.1.0 + "@sentry/node": ^5.18.1 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": ^5.1.0 + adm-zip: ^0.4.16 + aggregate-error: ^3.0.0 + ansi-escapes: ^4.3.0 + boxen: ^5.1.2 + chalk: ^2.4.2 + chokidar: ^3.4.0 + ci-info: ^2.0.0 + debug: ^4.1.1 + enquirer: ^2.3.0 + env-paths: ^2.2.0 + ethereum-cryptography: ^1.0.3 + ethereumjs-abi: ^0.6.8 + find-up: ^2.1.0 + fp-ts: 1.19.3 + fs-extra: ^7.0.1 + glob: 7.2.0 + immutable: ^4.0.0-rc.12 + io-ts: 1.10.4 + keccak: ^3.0.2 + lodash: ^4.17.11 + mnemonist: ^0.38.0 + mocha: ^10.0.0 + p-map: ^4.0.0 + raw-body: ^2.4.1 + resolve: 1.17.0 + semver: ^6.3.0 + solc: 0.8.26 + source-map-support: ^0.5.13 + stacktrace-parser: ^0.1.10 + tsort: 0.0.1 + undici: ^5.14.0 + uuid: ^8.3.2 + ws: ^7.4.6 + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: 5aec1824db3575d63754de18c2629bcd820bc836d836f8a6346bcd9aa2ae4c397e090c43ea482ee765b704e018001015b5c84c5ded301a6a1144129c1a4c509b + languageName: node + linkType: hard + "hardhat@npm:^2.16.1": version: 2.18.1 resolution: "hardhat@npm:2.18.1" @@ -8071,6 +8435,13 @@ __metadata: languageName: node linkType: hard +"is-object@npm:~1.0.1": + version: 1.0.2 + resolution: "is-object@npm:1.0.2" + checksum: 971219c4b1985b9751f65e4c8296d3104f0457b0e8a70849e848a4a2208bc47317d73b3b85d4a369619cb2df8284dc22584cb2695a7d99aca5e8d0aa64fc075a + languageName: node + linkType: hard + "is-path-cwd@npm:^2.2.0": version: 2.2.0 resolution: "is-path-cwd@npm:2.2.0" @@ -9129,6 +9500,13 @@ __metadata: languageName: node linkType: hard +"merge-descriptors@npm:~1.0.0": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -9501,6 +9879,13 @@ __metadata: languageName: node linkType: hard +"module-not-found-error@npm:^1.0.1": + version: 1.0.1 + resolution: "module-not-found-error@npm:1.0.1" + checksum: ebd65339d4d5980dd55cd32dbf112ec02b8e33f30866312b94caeee4783322259f18cf2270e9d2e600df3bd1876c35612b87f5c2525c21885fb1f83e85a9b9b0 + languageName: node + linkType: hard + "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -10634,6 +11019,17 @@ __metadata: languageName: node linkType: hard +"proxyquire@npm:^2.1.3": + version: 2.1.3 + resolution: "proxyquire@npm:2.1.3" + dependencies: + fill-keys: ^1.0.2 + module-not-found-error: ^1.0.1 + resolve: ^1.11.1 + checksum: a320f1a04d65aeb41625bfd6bbf848492523b730b07926b6c1ed48f9342f2a30c4a4c0b399e07391e76691b65f604773327767c33a8578e5e4ab19299ba46a02 + languageName: node + linkType: hard + "pump@npm:^1.0.0": version: 1.0.3 resolution: "pump@npm:1.0.3" @@ -10997,7 +11393,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0": +"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.11.1": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -11026,7 +11422,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin": +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.11.1#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" dependencies: @@ -11556,6 +11952,23 @@ __metadata: languageName: node linkType: hard +"solc@npm:0.8.26": + version: 0.8.26 + resolution: "solc@npm:0.8.26" + dependencies: + command-exists: ^1.2.8 + commander: ^8.1.0 + follow-redirects: ^1.12.1 + js-sha3: 0.8.0 + memorystream: ^0.3.1 + semver: ^5.5.0 + tmp: 0.0.33 + bin: + solcjs: solc.js + checksum: e3eaeac76e60676377b357af8f3919d4c8c6a74b74112b49279fe8c74a3dfa1de8afe4788689fc307453bde336edc8572988d2cf9e909f84d870420eb640400c + languageName: node + linkType: hard + "solhint@npm:^3.3.7": version: 3.6.2 resolution: "solhint@npm:3.6.2" @@ -11587,6 +12000,15 @@ __metadata: languageName: node linkType: hard +"solidity-ast@npm:^0.4.26, solidity-ast@npm:^0.4.56": + version: 0.4.56 + resolution: "solidity-ast@npm:0.4.56" + dependencies: + array.prototype.findlast: ^1.2.2 + checksum: 124cd54dc187860c83f4e8a3cbc41f890fbd0aaad4695356763034bdc782046eac414b161b7f354e423e075dba303d6bef213682df8932fee5d143d52135cd4e + languageName: node + linkType: hard + "solidity-ast@npm:^0.4.38, solidity-ast@npm:^0.4.51": version: 0.4.53 resolution: "solidity-ast@npm:0.4.53" @@ -11769,7 +12191,7 @@ __metadata: languageName: node linkType: hard -"ssh2@npm:^1.15.0": +"ssh2@npm:^1.11.0, ssh2@npm:^1.15.0": version: 1.15.0 resolution: "ssh2@npm:1.15.0" dependencies: @@ -11837,7 +12259,7 @@ __metadata: languageName: node linkType: hard -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -12388,13 +12810,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.4.0": - version: 2.4.0 - resolution: "tslib@npm:2.4.0" - checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 - languageName: node - linkType: hard - "tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -12979,6 +13394,15 @@ __metadata: languageName: node linkType: hard +"widest-line@npm:^3.1.0": + version: 3.1.0 + resolution: "widest-line@npm:3.1.0" + dependencies: + string-width: ^4.0.0 + checksum: 03db6c9d0af9329c37d74378ff1d91972b12553c7d72a6f4e8525fe61563fa7adb0b9d6e8d546b7e059688712ea874edd5ded475999abdeedf708de9849310e0 + languageName: node + linkType: hard + "word-wrap@npm:~1.2.3": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" @@ -13064,21 +13488,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.17.1": - version: 8.17.1 - resolution: "ws@npm:8.17.1" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf - languageName: node - linkType: hard - "ws@npm:^7.4.6": version: 7.5.9 resolution: "ws@npm:7.5.9" @@ -13206,12 +13615,14 @@ __metadata: languageName: node linkType: hard -"zksync-ethers@npm:^6.10.0": - version: 6.10.0 - resolution: "zksync-ethers@npm:6.10.0" +"zksync-ethers@npm:^5.0.0, zksync-ethers@npm:^5.8.0, zksync-ethers@npm:^5.9.1": + version: 5.9.1 + resolution: "zksync-ethers@npm:5.9.1" + dependencies: + ethers: ~5.7.0 peerDependencies: - ethers: ^6.7.1 - checksum: ab1699b63d6b1b0bc9a5a1af6243a2a5b33797fd8aef30a297684570a5e4615bdfbee0259a2f00f900525c0b2062e09fb4378ad16364c7819604c16bc575128d + ethers: ~5.7.0 + checksum: c9e54677de296b328805c617e8e39aee8abe74c906a335f6431687301f06b30e70337b9b2136e5eece8b275f3523404e3e78956f4f8a82b47a638a08347ce459 languageName: node linkType: hard From 637b94d44d000cadae133973d8fff23811e23915 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Wed, 24 Jul 2024 22:55:03 +0530 Subject: [PATCH 47/85] fix: remove zksyncsepolia in ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18ca8cd89..b43e7b982 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,7 @@ jobs: - name: Export deployments run: | - for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone xlayertestnet xlayermainnet zksyncsepolia; do + for NETWORK in bsctestnet bscmainnet ethereum sepolia opbnbtestnet opbnbmainnet arbitrumsepolia arbitrumone xlayertestnet xlayermainnet; do EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done From 648d454c7148526a8b6728f13a54892dffca86a3 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:18:08 +0530 Subject: [PATCH 48/85] chore: add zk artifacts and cache in .prettierignore --- .prettierignore | 2 ++ hardhat.config.ts | 2 +- hardhat.config.zksync.ts | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.prettierignore b/.prettierignore index 03a0d7eb2..d69216c60 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,8 +4,10 @@ **/.coverage_cache **/.coverage_contracts **/artifacts +**/artifacts-zk **/build **/cache +**/cache-zk **/coverage **/dist **/node_modules diff --git a/hardhat.config.ts b/hardhat.config.ts index 711d34061..71c89dc08 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -361,4 +361,4 @@ function isFork() { }; } -export default config; \ No newline at end of file +export default config; diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts index b458e2b59..d5d4b6e65 100644 --- a/hardhat.config.zksync.ts +++ b/hardhat.config.zksync.ts @@ -6,11 +6,9 @@ import "@matterlabs/hardhat-zksync-solc"; import "@matterlabs/hardhat-zksync-verify"; import "@nomicfoundation/hardhat-chai-matchers"; import "@typechain/hardhat"; - import "hardhat-deploy"; -import { HardhatUserConfig,extendConfig } from "hardhat/config"; +import { HardhatUserConfig, extendConfig } from "hardhat/config"; import { HardhatConfig } from "hardhat/types"; - import "solidity-coverage"; import "solidity-docgen"; From f339105dbce91c202beed6d6a14fcf75efb29058 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Thu, 25 Jul 2024 18:02:09 +0530 Subject: [PATCH 49/85] fix: vpb-03 --- .../InterestRateModels/TwoKinksInterestRateModel.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index bf2820084..2d8cab41b 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -60,6 +60,11 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { */ error NegativeValueNotAllowed(); + /** + * @notice Thrown when the kink points are not in the correct order + */ + error InvalidKink(); + /** * @notice Construct an interest rate model * @param baseRatePerYear_ The approximate target base APR, as a mantissa (scaled by EXP_SCALE) @@ -83,6 +88,10 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { revert NegativeValueNotAllowed(); } + if (kink2_ <= kink1_ || kink1_ <= 0) { + revert InvalidKink(); + } + BASE_RATE_PER_BLOCK = baseRatePerYear_ / BLOCKS_PER_YEAR; MULTIPLIER_PER_BLOCK = multiplierPerYear_ / BLOCKS_PER_YEAR; KINK_1 = kink1_; From b5df8d29db3e3d9e86ac01e82b5c3ab39b9222e4 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Thu, 25 Jul 2024 18:07:17 +0530 Subject: [PATCH 50/85] fix: vpb-05 --- .../InterestRateModels/TwoKinksInterestRateModel.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 75a76d140..203907e27 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -6,7 +6,7 @@ import { InterestRateModelV8 } from "./InterestRateModelV8.sol"; /** * @title TwoKinksInterestRateModel * @author Venus - * @notice An interest rate model with two different steep increase each after a certain utilization threshold called **kink** is reached. + * @notice An interest rate model with two different slope increase or decrease each after a certain utilization threshold called **kink** is reached. */ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 public constant BLOCKS_PER_YEAR = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks) @@ -48,7 +48,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 public immutable KINK_2; /** - * @notice The multiplier per block after hitting KINK_2 + * @notice The multiplier of utilization rate per block that gives the slope 3 of interest rate */ int256 public immutable JUMP_MULTIPLIER_PER_BLOCK; @@ -68,10 +68,10 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { /** * @notice Construct an interest rate model * @param baseRatePerYear_ The approximate target base APR, as a mantissa (scaled by EXP_SCALE) - * @param multiplierPerYear_ The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE) + * @param multiplierPerYear_ The rate of increase or decrease in interest rate wrt utilization (scaled by EXP_SCALE) * @param kink1_ The utilization point at which the multiplier2 is applied - * @param multiplier2PerYear_ The rate of increase in interest rate wrt utilization after hitting KINK_1 (scaled by EXP_SCALE) - * @param baseRate2PerYear_ The approximate target base APR after hitting KINK_1, as a mantissa (scaled by EXP_SCALE) + * @param multiplier2PerYear_ The rate of increase or decrease in interest rate wrt utilization after hitting KINK_1 (scaled by EXP_SCALE) + * @param baseRate2PerYear_ The additional base APR after hitting KINK_1, as a mantissa (scaled by EXP_SCALE) * @param kink2_ The utilization point at which the jump multiplier is applied * @param jumpMultiplierPerYear_ The multiplier after hitting KINK_2 */ @@ -106,7 +106,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { * @param cash The amount of cash in the market * @param borrows The amount of borrows in the market * @param reserves The amount of reserves in the market - * @return The borrow rate percentage per slot (block) as a mantissa (scaled by 1e18) + * @return The borrow rate percentage per slot (block) as a mantissa (scaled by EXP_SCALE) */ function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) external view override returns (uint256) { return _getBorrowRate(cash, borrows, reserves); From 0afc4253b38db7b6f3f9fce988c89f5bfad307c1 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Mon, 29 Jul 2024 17:04:43 +0530 Subject: [PATCH 51/85] feat: deployment of XVSVault on zksyncsepolia --- .env.example | 2 +- .eslinttsconfigrc | 2 +- .github/workflows/ci.yml | 4 + .gitignore | 2 + .prettierignore | 2 + deploy/008-deploy-vaults.ts | 6 + deploy/009-configure-vaults.ts | 2 + deployments/zksyncsepolia/.chainId | 1 + deployments/zksyncsepolia/XVSStore.json | 487 +++ deployments/zksyncsepolia/XVSVaultProxy.json | 465 +++ .../XVSVaultProxy_Implementation.json | 2647 +++++++++++++++++ .../44f09e5a32172287e0699190adfae104.json | 351 +++ hardhat.config.zksync.ts | 157 + package.json | 19 +- 14 files changed, 4139 insertions(+), 8 deletions(-) create mode 100644 deployments/zksyncsepolia/.chainId create mode 100644 deployments/zksyncsepolia/XVSStore.json create mode 100644 deployments/zksyncsepolia/XVSVaultProxy.json create mode 100644 deployments/zksyncsepolia/XVSVaultProxy_Implementation.json create mode 100644 deployments/zksyncsepolia/solcInputs/44f09e5a32172287e0699190adfae104.json create mode 100644 hardhat.config.zksync.ts diff --git a/.env.example b/.env.example index 9181e4eef..7a7fc043e 100644 --- a/.env.example +++ b/.env.example @@ -18,7 +18,7 @@ DEPLOYER_PRIVATE_KEY= #ARCHIVE_NODE_arbitrumsepolia=https://sepolia-rollup.arbitrum.io/rpc #ARCHIVE_NODE_xlayertestnet=https://rpc.ankr.com/xlayer_testnet/ #ARCHIVE_NODE_xlayermainnet=https://rpc.ankr.com/xlayer - +#ARCHIVE_NODE_zksyncsepolia=https://zksync-sepolia.g.alchemy.com/v2/ ETHERSCAN_API_KEY= REPORT_GAS= \ No newline at end of file diff --git a/.eslinttsconfigrc b/.eslinttsconfigrc index d85fba71a..7400ccd12 100644 --- a/.eslinttsconfigrc +++ b/.eslinttsconfigrc @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "include": ["./typechain", "./deploy", "./tests", "./script", "./scenario", "saddle.config.js", "docgen-templates", "commitlint.config.js"] + "include": ["./typechain", "./deploy", "./tests", "./script", "./scenario", "saddle.config.js", "docgen-templates", "commitlint.config.js", "./hardhat.config.zksync.ts"] } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3bed78e7..b43e7b982 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,6 +143,10 @@ jobs: EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done + for NETWORK in zksyncsepolia; do + EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json --config hardhat.config.zksync.ts + jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json + done yarn prettier - uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/.gitignore b/.gitignore index fc0a2ab9c..62e02dcb0 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,9 @@ junit.xml # hardhat typechain artifacts +artifacts-zk cache +cache-zk # OZ .openzeppelin/ diff --git a/.prettierignore b/.prettierignore index 03a0d7eb2..d69216c60 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,8 +4,10 @@ **/.coverage_cache **/.coverage_contracts **/artifacts +**/artifacts-zk **/build **/cache +**/cache-zk **/coverage **/dist **/node_modules diff --git a/deploy/008-deploy-vaults.ts b/deploy/008-deploy-vaults.ts index 884f4e8bc..7e6e3310c 100644 --- a/deploy/008-deploy-vaults.ts +++ b/deploy/008-deploy-vaults.ts @@ -12,6 +12,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [], log: true, autoMine: true, + skipIfAlreadyDeployed: true, + maxFeePerGas: "200000000", }); await deploy("XVSVaultProxy", { @@ -19,6 +21,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [], log: true, autoMine: true, + skipIfAlreadyDeployed: true, + maxFeePerGas: "200000000", }); await deploy("XVSStore", { @@ -26,6 +30,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [], log: true, autoMine: true, + skipIfAlreadyDeployed: true, + maxFeePerGas: "200000000", }); }; diff --git a/deploy/009-configure-vaults.ts b/deploy/009-configure-vaults.ts index 625eefab3..d1c35ef34 100644 --- a/deploy/009-configure-vaults.ts +++ b/deploy/009-configure-vaults.ts @@ -23,6 +23,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { sepolia: 2_628_000, // 12 sec per block arbitrumsepolia: 0, // time based deployment arbitrumone: 0, // time based deployment + zksyncsepolia: 0, // time based deployment bscmainnet: 10_512_000, ethereum: 2_628_000, hardhat: 100, @@ -35,6 +36,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2", // ARBITRUM SEPOLIA MULTISIG arbitrumone: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0", // ARBITRUM ONE MULTISIG + zksyncsepolia: "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866", // ZKSYNC SEPOLIA MULTISIG bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"), bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"), hardhat: deployer, diff --git a/deployments/zksyncsepolia/.chainId b/deployments/zksyncsepolia/.chainId new file mode 100644 index 000000000..f1efb2054 --- /dev/null +++ b/deployments/zksyncsepolia/.chainId @@ -0,0 +1 @@ +300 \ No newline at end of file diff --git a/deployments/zksyncsepolia/XVSStore.json b/deployments/zksyncsepolia/XVSStore.json new file mode 100644 index 000000000..23b33b367 --- /dev/null +++ b/deployments/zksyncsepolia/XVSStore.json @@ -0,0 +1,487 @@ +{ + "address": "0xf0DaEFE5f5df4170426F88757EcdF45430332d88", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "emergencyRewardWithdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeRewardTransfer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "setNewOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "setRewardToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0xf0DaEFE5f5df4170426F88757EcdF45430332d88", + "transactionIndex": 0, + "gasUsed": "357010692", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657", + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x00000000000000000000000000000000000000000000000001395ff6729e3600", + "logIndex": 0, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + }, + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000ca0fb171581df6", + "logIndex": 1, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + }, + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x0000000000000000000000000000000000008008", + "topics": ["0x27fe8c0b49f49507b9d4fe5968c9f49edfe5c9df277d433a07a0717ede97638d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000d70000000000000000000000000000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000800e7f671a0eba90827e6de52685d91cccf193bf655d9f601dc5e3f08fdca348a726", + "logIndex": 2, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + }, + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x0000000000000000000000000000000000008008", + "topics": [ + "0x3a36e47291f4201faf137fab081d92295bce2d53be2c6ca68ba82c7faa9ce241", + "0x000000000000000000000000000000000000000000000000000000000000800e", + "0x7f671a0eba90827e6de52685d91cccf193bf655d9f601dc5e3f08fdca348a726" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001aea02420000000000000000ffffffffffffffff000000ea01008041000000000101043b0000000000320435000000ea0210009c000000400100043d000000c0011002100000000001000414000003a400010430000000800010043f0000000102200190000000000301001903a2039d0000040f000000eb01100197000000c40010043f000003880000813d000003a30001042e0000002001000039000003880000c13d000000000001042d000000400300043d00000001020000390000000000120435000000000121019f03a203980000040f000000b90000613d000000400010043f000000f701000041000000a40010043f000000840010043f000000f5010000410000000001000019000000040110037002000000000000000000000004020019000001000440008900000003044002100001000000010355000001770000613d00000060011002100000000000210435000000ea030080410000000003000414000003880000613d00000024021000390000004402100039000000000201004b000002ff0000613d0000800202000039000000ff011001c700000000001004390000800d02000039000000000200041a536166654245503200000000ffffffff00000000010204330000000402000029000003880000a13d000000000202004b000000000474019f000000000545022f000000000747022f00000000074701cf000000ea0010019d0000006001100270000000010220018f000000ea0400804100000000014100490000000602000029000000400400043d0000000000430435000000000445019f000000000565016f00000000060304330000000004040433000000000101004b000000400200043d00000020030000390000000402100039000000f5020000410000000603000029000001030110009c000001020100004100000101011001c70000010001100197000000000106004b000000000223013f0000000003000411000001180220009c000000240230008a000000000101041a000600000004001d000000eb03300197000000eb022001976f6e6c792061646d0000000002000019000001fb0000613d000000c002300210000000ea0230009c0000004002400210000000ea0240009c0000000001120019000000000001042f000000040550008c0000000605000029000000010550008a000000000464016f000000000650004900000005040000290000000005006019000000000404004b000000010550020f00000100055000890000000305400210000500000006001d000000200540008c000000200440008a000000000353043600000000650604340000000506000029000000200320008c000000000202043300000004001004430000000601000029000500000002001d0000000002230436000400000003001d00000000023200490000000505500210000000000968004b0000000008980436000000007907043c0000000505500272000001770000c13d00000000010104330000001f0220008c000000000302004b0000000002030433000000000046043500000000044501cf000000000505043b00000000070604330000000006610019000000000565034f0000000506600210000000000704004b000000000a79004b0000000009a90436000000008a08043c0000000009010019000000000805034f000000000771001900000005076002100000000506600272000000010500036700000000016304360000001f0460018f000000000113001900000118011001970000003f0160003900000080010000390000006003000039000000ea06100197000000000141019f00000000060000310000000005070019000000000363019f0000000e01000039000000ea0310009c00000000012100490000801002000039000000fc011001c70000000303000039000000c003300210000000ea0430009c0000000101200190000000f801000041000000ff01100190000001520000c13d000000eb04200197000001740000013d000001120400004100000111011001c7000000a00010043f000000000414019f000000000203041a00000001030000390000013e0000c13d000000eb0120019803a2038b0000040f000000200010043f00000003010000390000000000100435000000000303041a0000000203000039000000000332004b0000000002000411000001160220009c000000440230008a000000ec0220019700000000010004110000000201000039000003880000413d000000040230008c000000ea033001970000006003300270b2d68c9316dddf64abfa910dfab78b0783470a1054b0c1a62446455c561ac286ffffffffffffffa0ffffffffffffffe0ffffffffffffff00ffffffffffffffc0e32e0adf67e79ec62578a8825d4c45b5000e9d45e6cc2d66f8ccb027dfcd135e696e00000000000064696e672061646d6f6e6c792070656ee7720646a95b16a99e54ec8142f9b09399413412fb94012fca4f2f25d0898edd0000004000000080696e2063616e00006c206661696c65646576656c2063616c303a206c6f772d6c6f6e20646964206e206f706572617469303a20424550323065640000000000006f742073756363656f6e747261637400746f206e6f6e2d63303a2063616c6c2065722063616e00006f6e6c79206f776e0000000026782247000000000e18b681000000008da5cb5b00000000804e523e000000004dd18bf5000000004dd18bf46e2063616e00000061726420746f6b656f6e6c79207265777bfad8045d85a470e500b653ca82273b927e7db2dcc703c0c5d2460186f7233c45c64697555efe0ea063a94b6d404b2fea1b3ecd64121a3fe03fe177bb050a40a9059cbb0000000000000024000000000200000200000000023a8d90e8508b8302500962caba6a1568e884a7374b41e01806aa1896bbf26570a082310000000000000040000000006472657373000000207a65726f20616472206973207468656e6577206f776e65bbdc1d40ff6533c9e41b7731c84b926f0d714d2c22b867908934ce4adea8d9ce0000000000000080000000200000008000000064000000806e65722063616e00696e206f72206f7708c379a00000000000000000f5a1f5b4000000009ad99e6800000000fb66fb4d00000000f851a44000000000f5ab16cc00000000f5ab16cb9ad99e680000000000000040000001000000000200000000ffffffff00000000000003a200000432000003a0002104230000039b00210421000003960000613d0000020e0000013d0000001f0110008c0000000302000029000000000035043500000000033401cf000000000434022f0000010003300089000000000404043b000000000636022f00000000063601cf000000000605043300000003033002100000000305500029000000000454034f0000037c0000613d000000000603004b000003690000c13d000000000704034f0000000006680019000000030800002900000005065002100000036d0000613d0000000104000367000300000004001d00000000045104360000001f0350018f000000400030043f000000000331001900000118031001970000003f015000390000020b0000013d000003520000613d0000033f0000c13d000003430000613d0000037c0000013d00000060010000390000035a0000c13d000000000105004b000000ea05100197000003520000013d000003310000c13d0000032d0000013d0000000005000031000003190000c13d000002e30000813d000002e90000413d00000005030000290000006001300210000000000151019f00000000014101cf000000000141022f000000000121034f00000000054501cf0000000005020433000002b90000613d000000000504004b000002a80000c13d000000000726004b0000000006760436000000005705043c0000000006000019000000000501034f000002ac0000613d000000050220021000000005023002720000001f0430018f000003140000013d000003000000c13d000002860000813d0000028c0000413d000002bb0000a13d000000050430006b0000000003030433000000440230003900000064013000390000002401300039000000200130008c000002a20000613d000000000003001f000000000045043500000000044601cf000000000646022f000000000606043b00000000070504330000000205500029000000000651034f000002500000613d000000000604004b0000023d0000c13d000000000701034f00000020068000390000000208000029000002410000613d0000001f0450018f00000000050340190000002005000039000000200430008c000000000434019f0000006004500210000000ea05008041000000ea0450009c00000040033002100000000003044019000000ea03000041000000ea0340009c000000240530003900000001034000690000000204000029000001360000013d00000084011000390000002a030000390000010e030000410000010d030000410000006402100039000001320000013d0000010f03000041000002060000c13d000001f90000613d000001e60000c13d000001ea0000613d000001f90000013d000001d80000c13d000000000131019f0000004004400210000000ea0540009c000000ea0510009c0000000001170019000001d30000013d000001c00000c13d000000040520008c000000010560008a000000000454016f00000000056000490000000006006019000000000505004b000000010660020f00000100066000890000000306500210000001a60000813d000000200650008c000000200550008a00000000036304360000000046040434000001ab0000013d000001a40000813d000000200370008c000000a004000039000000800700043d000002540000013d0000000003000031000002210000c13d00000000020300190000000400300443000000fe01000041000200000001001d0000000402200039000100000002001d0000000001000410000000fd01000041000000000103004b000000fa04000041000000f9011001c7000000eb05200197000000000031041b000000ec03200197000000000201041a000000f60100004100000017010000390000010b010000410000011301000041000000120100003900000110010000410000004002200210000000ea02008041000000ea0320009c000000640110003900000015030000390000010403000041000001790000c13d000600000003001d000300000005001d0000000000300435000500000004001d000400000006001d000000eb03100197000000eb06300197000000000303043b0000002403100370000000000403043b0000004403100370000000000202041a0000000202000039000001190220009c000000640230008a0000011504000041000000eb06200197000000eb0530019700000114011001c7000000000113019f0000004001100210000000a00000043f000000000023041b000000000040041b000000ec04400197000000000400041a000001480000c13d000000000441004b000000000100041a000000010100c039000000200020043f00000003020000390000012d0000013d0000001f030000390000010c030000410000019c0000c13d0000000400400443000000a00100043d000000e4010000390000004401000039000000a40020043f0000002401100370000000000202043b0000000402100370000000800020043f000000000043041b000000ec04200197000000eb02200198000000fb010000410000001d01000039000001660000c13d000000eb06100197000000f40220009c000001020000613d000000f30420009c000000d20000013d00000001010000390000010a0120009c000000d60000613d000001090120009c000000000021041b000000010220c1bf000000060300006b0000011702300197000000000301041a0000015c0000c13d000000000232004b000000440000613d000000000300041a000000000402043b0000002402100370000000f20220009c000000d10000613d000000f10420009c000000c00000613d000000f00420009c000000580000a13d000000ef0420009c000000ed0100004100000120000004430000010000100443000000000010041b000000000112019f000000000104004b000000560000013d000001080120009c0000008e0000613d000001070420009c000000730000613d000001060420009c000000510000a13d000001050420009c0000002a0000813d000000ee0440009c000000e002400270000000000401043b000000000204004b0000001d0000c13d0000000004000416000000400050043f000000800500003900010000003103550006000000000002000200000000000202410240000c00ce00cd023f023e023d023c000b023b023a001300cc00cb0239023802370236023502340233023202310230022f001300ca022e022d001300c9000e003500c8022c022b0012022a0229022800110227022602250224022302220221001300c700c600100220021f0021000300c5005e021e005d00c4021d00c300c2005d021c021b000e00c100c000bf005c00be021a02190218021702160020001102150214021300130212005b02110210020f020e0013005a0059001000350058005700210003020d00bd00bc0056020c001f000a0012001e020b001d020a000f001c0009005a00590010003500580057020900bc00210003000e00bb00ba020800b90207005e020600b8000800050002000700b7003400b600b500c700c600100205020400b400c5005e00c300c2005d00c400b3020300030202000f0201000a0200001b01ff0055005400b800530033005c01fe000800050002000700320031000d000b00300003002f001a005201fd0006002e01fc0004002d01fb01fa005a005900100021000301f901f8000e00c100be005b00b2002001f7000a00b1001101f6000e000a00b1001100c9000e00bb00ba00b401f501f401f3005c01f200b901f100c801f0000a01ef000800050002000700b7003400b6001900b0002c00060005000201ee0035002b00af002a00ae01ed01ec005101eb01ea003400ad01e900b501e801e7001001e601e50058005701e401e301e201e101e00021000301df00bd00b301de01dd01dc00c000bf000800050002000700ac00ab01db01da000d000b002c0003005b00b201d90006002e01d80004002d01d7000400500029004f004e0004004d00aa01d600a90002002801d501d401d300180009001f000a0012001e00a8001d01d2000f001c0009001f000a0012001e01d1001d01d0000f001c0009001f000a0012001e00a8001d01cf000f001c0009001f000a0012001e01ce001d01cd000f001c000900ca01cc01cb00a701ca000801c900050002000701c8003400ad01c7001900b0002c00200011005101c60027004d01c5001701c4000e01c301c20017000601c101c0003301bf000800050002000700320031000d000b00300003004c0051002c000800cc01be01bd01bc01bb000601ba01b901b801b700a6000c01b6000c00a601b501b401b301b201b101b001af01ae01ad01ac004b01ab01aa01a9004a0049004800470046002b004501a801a7001600a501a601a5004401a40002002801a3004301a200a400af002a00ae01a10019004200260041004000a3005601a000a200a1019f00a0009f0015009e001b009d009c009b009a019e0099009800970096009500940093019d0092019c00910090008f0025008e003f003e008d0024003d008c003c008b003b019b0006002e019a000400500029002d004e0004004f0199008a008900270088003a0087004c00860006019801970004002e01960004002d0195000400500029004f004e0004004d00aa01940193019201910190018f018e018d018c018b018a0189018800a90002000700a4000d000c00ce00cd018701860185018400850183018201810180008400830082017f017e017d0081017c017b0025017a003f003e0179002401780177003c017601750026000b0174017300cb001501720039002901710170016f016e016d000400150080007f007e001b003800550054007d001700530033007c007b000800050002000700320031000d000b00300003002f001a0052001a00060039007a00790023000c016c000c002300780077007600750074016b0073007200710070006f006e006d004b006c006b006a004a0049004800470046002b00690068016a001600a50169016801670166016501640163016201610160015f015e015d0025015c015b003d015a000300240159015801570017015600090155000400150080007f007e001b003800550054007d001700530033007c007b000800050002000700320031000d000b00300003002f001a0052001a00060039007a00790023000c0154000c00230078007700760075007401530073007200710070006f006e006d004b006c006b006a004a0049004800470046002b00690068015200160151015000670066004400050002002800650043006400180063002a0062001800450019004200260041004000a30056014f00a200a1014e0066004400050002002800650043006400180063002a00620018004500190042002600410040014d014c014b014a014900a0009f0015009e001b009d009c009b009a0148009900980097009600950094009301470092014600910090008f0025008e003f003e008d0024003d008c003c008b003b0061008a008900270088003a0145014401430006014201410140013f013e013d0085013c013b013a01390138008400830082013701360135008101340133013201310130012f012e012d012c012b00a7012a003b00610087002f012900270128003a0038004c00860127002000090067000800050002000700ac00ab000d000b0126000300140020000901250016001400600014012400160014006000140123001100090000000000000000000000000037000000370001000100010122000000000121000001200000011f000000000000000000000000011e000000000000011d000000000000011c000000000000011b000000000000011a00000000000001190118000000000000005f011701160000000000000115000000000000011400000022000001130000011201110110010f010e010d010c010b00220000010a0000010900000000000001080107010601050104000001030000003700010001000101020000000000000101010000ff00fe00fd00fc00fb00fa00f900f800f7000000000000000000f600000000000000f500000000000000f400000000000000f300000000000000f200000000000000f100f000ef00000000003600ee00ed00ec00eb00ea00000000003600e900e800e7003600e600e500e4005f00e3000000000022000000e2000000e100e000df00de00dd00dc00db0000002200000000000000da00d900d800d700010001000100d600010001000100d500010001000100d400010001000100d300d200d100d000cf00000000000000000000000000000000000000000000", + "logIndex": 3, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + }, + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x0000000000000000000000000000000000008004", + "topics": [ + "0xc94722ff13eacf53547c4741dab5228353a05938ffcdd5d4a2d533ae0e618287", + "0x0100011ba9d8a15f702b5be77529b2fdcc735829a7288d8f53311ba3d928228f", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + }, + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0100011ba9d8a15f702b5be77529b2fdcc735829a7288d8f53311ba3d928228f", + "0x000000000000000000000000f0daefe5f5df4170426f88757ecdf45430332d88" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + }, + { + "transactionIndex": 0, + "blockNumber": 3545781, + "transactionHash": "0xf70d984b6ed71937f3c18ec1c6a40cb7e3ad3f5e3c511368bdf520f54eccee14", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x0000000000000000000000000000000000000000000000000015350c383e2612", + "logIndex": 6, + "blockHash": "0x5cd0bace86f3a75a8581c54007081140d3e161c48964a09fc00f0e027e9ee657" + } + ], + "blockNumber": 3545781, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "44f09e5a32172287e0699190adfae104", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.b9534989\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnerTransferred\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"emergencyRewardWithdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"safeRewardTransfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"setNewOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"setRewardToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"emergencyRewardWithdraw(address,uint256)\":{\"params\":{\"_amount\":\"Amount of token to withdraw\",\"_tokenAddress\":\"Reward token address to withdraw\"}},\"safeRewardTransfer(address,address,uint256)\":{\"details\":\"Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\",\"params\":{\"_amount\":\"Amount to transfer\",\"_to\":\"Destination address of the reward\",\"token\":\"Reward token to transfer\"}},\"setNewOwner(address)\":{\"params\":{\"_owner\":\"The address of the owner to set Only callable admin\"}},\"setPendingAdmin(address)\":{\"params\":{\"_admin\":\"Propose an account as admin of the XVS store\"}},\"setRewardToken(address,bool)\":{\"params\":{\"_tokenAddress\":\"The address of a token to set as active or inactive\",\"status\":\"Set whether a reward token is active or not\"}}},\"title\":\"XVS Store\"},\"userdoc\":{\"methods\":{\"acceptAdmin()\":{\"notice\":\"Allows an account that is pending as admin to accept the role nly calllable by the pending admin\"},\"emergencyRewardWithdraw(address,uint256)\":{\"notice\":\"Security function to allow the owner of the contract to withdraw from the contract\"},\"safeRewardTransfer(address,address,uint256)\":{\"notice\":\"Safely transfer rewards. Only active reward tokens can be sent using this function. Only callable by owner\"},\"setNewOwner(address)\":{\"notice\":\"Set the contract owner\"},\"setPendingAdmin(address)\":{\"notice\":\"Allows the admin to propose a new admin Only callable admin\"},\"setRewardToken(address,bool)\":{\"notice\":\"Set or disable a reward token\"}},\"notice\":\"XVS Store responsible for distributing XVS rewards\"}},\"settings\":{\"compilationTarget\":{\"contracts/XVSVault/XVSStore.sol\":\"XVSStore\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Utils/Address.sol\":{\"keccak256\":\"0x3c2ef780599a2ae6913282b982633f07e405a4a9c8511590df571e2b773aef9d\",\"urls\":[\"bzz-raw://a771f035082a019892582d2c304e00bdb054d904cf7889eb6aa28e515b12c54e\",\"dweb:/ipfs/QmZr6j1hHr6wLdmU9PujaaNvDraYSN2fpNWyDrVChCSJSW\"]},\"contracts/Utils/IBEP20.sol\":{\"keccak256\":\"0x839b08895eb1ad83502d3631e8e9e3a856d2a8c63c46f070d604af7b26c62c07\",\"urls\":[\"bzz-raw://5908d7afba215ef2350294a7b6220394b25ea51e3e878de8d16be93a5b815153\",\"dweb:/ipfs/QmeDMMMHDZ5jBDUYgTQXpktwjvMv5pvfAYTVjtgrNCEMmj\"]},\"contracts/Utils/SafeBEP20.sol\":{\"keccak256\":\"0x540ef6ddc47232a59d3ab0e95537f7a7d1c8a36f8dba315b010e60c6487bd768\",\"urls\":[\"bzz-raw://7acd695f71c1006c7f17f021381503e99b3baf395f8d8dae8d3829a524679298\",\"dweb:/ipfs/QmVhGHQZxo8J9bGpH9vgTD4px4jdEie3WnbHognBf6ABPP\"]},\"contracts/Utils/SafeMath.sol\":{\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\",\"urls\":[\"bzz-raw://84233cdf4579e66aeb99788758f8cc750816c15ea495495c4fbb446f74da2469\",\"dweb:/ipfs/QmfPGduxT3Ty4uCcYCppy5E2ED5pwypwoaMrkC98i9Szyq\"]},\"contracts/XVSVault/XVSStore.sol\":{\"keccak256\":\"0x8082f92b13448bd4fa982c93c763439f10fe016a5f3be6d613dfe3cca68501ef\",\"urls\":[\"bzz-raw://1e2d8ee8ab3f170c35c83776b850ed024df7ce2da5fc7ce8bf46caca98fc820d\",\"dweb:/ipfs/QmPD2Q11LUCvdwqoWkiCKEXE621tfVv2pVRmcwxBPxCLS4\"]}},\"version\":1}", + "solc_version": "0.5.16", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0002000000000002000600000000000200000000030100190000006003300270000000ea0330019700010000003103550000008005000039000000400050043f000000000400041600000001022001900000001d0000c13d000000000204004b000003880000c13d000000040230008c000003880000413d000000000401043b000000e002400270000000ee0440009c0000002a0000813d000001050420009c000000510000a13d000001060420009c000000730000613d000001070420009c0000008e0000613d000001080120009c000003880000c13d0000000201000039000000560000013d000000000104004b000003880000c13d0000000001000411000000eb01100197000000000200041a000000ec02200197000000000112019f000000000010041b000000200100003900000100001004430000012000000443000000ed01000041000003a30001042e000000ef0420009c000000580000a13d000000f00420009c000000c00000613d000000f10420009c000000d10000613d000000f20220009c000003880000c13d000000440230008a000001160220009c000003880000813d0000002402100370000000000402043b0000000401100370000000000101043b0000000002000411000000eb02200197000000000300041a000000eb03300197000000000332004b000000440000613d0000000203000039000000000303041a000000eb03300197000000000232004b0000015c0000c13d000000eb0110019700000000001004350000000301000039000000200010043f000600000004001d03a2038b0000040f000000000301041a0000011702300197000000060300006b000000010220c1bf000000000021041b0000000001000019000003a30001042e000001090120009c000000d60000613d0000010a0120009c000003880000c13d0000000101000039000000000101041a000000d20000013d000000f30420009c000001020000613d000000f40220009c000003880000c13d000000240230008a000001180220009c000003880000813d000000000200041a0000000003000411000000000223013f0000000401100370000000000101043b000000eb06100197000000eb012001980000013e0000c13d000000000106004b000001660000c13d000000f501000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f000000fb01000041000000c40010043f000000f701000041000003a400010430000000240230008a000001180220009c000003880000813d000000000200041a0000000003000411000000000223013f000000eb022001980000013e0000c13d0000000401100370000000000101043b000000eb011001970000000103000039000000000203041a000000ec04200197000000000414019f000000000043041b000000eb02200197000000800020043f000000a00010043f0000000001000414000000ea0210009c000000ea01008041000000c00110021000000111011001c70000800d020000390000011204000041000001740000013d000000440230008a000001160220009c000003880000813d0000000402100370000000000202043b000000eb042001970000000002000411000000eb022001970000000203000039000000000303041a000000eb03300197000000000332004b000001520000c13d0000002401100370000000000101043b000000a40020043f000000c40010043f0000004401000039000000800010043f000000e401000039000000400010043f000000a00100043d000001000110019700000101011001c7000000a00010043f00000102010000410000000000100439000600000004001d00000004004004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c0000019c0000c13d000000400100043d00000044021000390000010c03000041000000000032043500000024021000390000001f030000390000012d0000013d000000240230008a000001180220009c000003880000813d0000000401100370000000000101043b0000000302000039000000200020043f000000eb01100197000000000010043503a2038b0000040f000000000101041a000000ff011001900000000001000019000000010100c039000000800010043f000000f801000041000003a30001042e000000000100041a000000eb01100197000000800010043f000000f801000041000003a30001042e0000000001000411000000eb011001970000000103000039000000000203041a000000eb04200197000000000441004b000001480000c13d000000000400041a000600000004001d000000ec04400197000000000414019f000000000040041b000000ec02200197000000000023041b000000800010043f000000a00000043f0000000001000414000000ea0210009c000000ea01008041000000c00110021000000111011001c70000800d02000039000001120400004103a203980000040f0000000101200190000003880000613d000000400100043d000000ea0210009c000000ea010080410000004001100210000000000200041a0000000003000414000000ea0430009c000000ea03008041000000c003300210000000000113019f00000114011001c70000000603000029000000eb05300197000000eb062001970000800d0200003900000003030000390000011504000041000001740000013d000000640230008a000001190220009c000003880000813d0000000202000039000000000202041a0000000003000411000000000223013f0000004403100370000000000403043b0000002403100370000000000303043b000000eb063001970000000401100370000000000101043b000000eb03100197000000eb01200198000001520000c13d000400000006001d000500000004001d00000000003004350000000301000039000000200010043f0000000001000414000000ea0210009c000000ea01008041000000c001100210000000fc011001c70000801002000039000300000005001d000600000003001d03a2039d0000040f0000000102200190000003880000613d000000000101043b000000000101041a000000ff01100190000001790000c13d000000400100043d000000440210003900000104030000410000000000320435000000240210003900000015030000390000000000320435000000f5020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000006401100039000000ea0310009c000000ea010080410000006001100210000000ea0320009c000000ea020080410000004002200210000000000121019f000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000011001000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000001201000039000000a40010043f0000011301000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000010b01000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000001701000039000000a40010043f000000f601000041000000c40010043f000000f701000041000003a4000104300000000201000039000000000201041a000000ec03200197000000000363019f000000000031041b0000000001000414000000eb05200197000000ea0210009c000000ea01008041000000c001100210000000f9011001c70000800d020000390000000303000039000000fa0400004103a203980000040f0000000101200190000003880000613d0000000001000019000003a30001042e0000000603000029000000000103004b000001770000613d000000400200043d000000fd0100004100000000001204350000000001000410000000eb01100197000100000002001d00000004022000390000000000120435000000400100043d000200000001001d000000fe01000041000000000010043900000004003004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000101004b0000000603000029000003880000613d0000000001000414000000040230008c0000000002030019000002210000c13d0000000003000031000002540000013d000000400100043d000000800700043d000000a004000039000000200370008c000001a40000813d00000000050700190000000003010019000001ab0000013d0000000003010019000000000507001900000000460404340000000003630436000000200550008a000000200650008c000001a60000813d00000003065002100000010006600089000000010660020f000000000505004b000000000600601900000000040404330000000005600049000000000454016f000000010560008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000602000029000000040520008c000001c00000c13d00000001020000390000000006000031000001d30000013d00000000011700190000000001410049000000ea0510009c000000ea010080410000006001100210000000ea0540009c000000ea040080410000004004400210000000000141019f000000ea0430009c000000ea03008041000000c003300210000000000131019f03a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea06100197000000000106004b000001d80000c13d00000060030000390000008001000039000001f90000013d0000003f016000390000011801100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000001050003670000000506600272000001ea0000613d00000005076002100000000007710019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b000001e60000c13d000000000704004b000001f90000613d0000000506600210000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000002060000c13d000000400100043d00000044021000390000010f030000410000000000320435000000f50200004100000000002104350000002402100039000000200300003900000000003204350000000402100039000001320000013d0000000002030433000000000302004b000001770000613d0000001f0220008c000003880000a13d0000000001010433000000000101004b000001770000c13d000000400100043d00000064021000390000010d03000041000000000032043500000044021000390000010e03000041000000000032043500000024021000390000002a030000390000000000320435000000f5020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000008401100039000001360000013d000000020400002900000001034000690000002405300039000000ea0340009c000000ea0300004100000000030440190000004003300210000000ea0450009c000000ea050080410000006004500210000000000434019f000000ea0310009c000000ea01008041000000c001100210000000000141019f03a2039d0000040f00000000030100190000006003300270000000ea03300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000002410000613d00000002080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000023d0000c13d000000000604004b000002500000613d0000000505500210000000000651034f00000002055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000000000003001f00010000000103550000000102200190000002a20000613d000000200130008c000003880000413d000000400300043d000000240130003900000004020000290000000000210435000000640130003900000044023000390000000003030433000000050430006b000002bb0000a13d0000000000320435000000400300043d0000000002320049000400000003001d0000000002230436000000400010043f0000000001020433000001000110019700000101011001c7000500000002001d000000000012043500000102010000410000000000100439000000060100002900000004001004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c000000b90000613d000000400100043d00000004020000290000000002020433000000200320008c000000000402001900000000030100190000028c0000413d00000000030100190000000004020019000000050600002900000000650604340000000003530436000000200440008a000000200540008c000002860000813d000500000006001d00000003054002100000010005500089000000010550020f000000000404004b0000000005006019000000050400002900000000040404330000000006500049000000000464016f000000010550008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000605000029000000040550008c000003000000c13d00000001020000390000000006000031000003140000013d0000001f0430018f00000005023002720000000502200210000002ac0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000002a80000c13d000000000504004b000002b90000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001204350000006001300210000003a40001043000000005030000290000000000320435000000400300043d0000000002320049000400000003001d0000000002230436000000400010043f0000000001020433000001000110019700000101011001c7000500000002001d000000000012043500000102010000410000000000100439000000060100002900000004001004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c000000b90000613d000000400100043d00000004020000290000000002020433000000200320008c00000000040200190000000003010019000002e90000413d00000000030100190000000004020019000000050600002900000000650604340000000003530436000000200440008a000000200540008c000002e30000813d000500000006001d00000003054002100000010005500089000000010550020f000000000404004b0000000005006019000000050400002900000000040404330000000006500049000000000464016f000000010550008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000605000029000000040550008c000003190000c13d000000010200003900000000050000310000032d0000013d000000000001042f00000000011200190000000001410049000000ea0210009c000000ea010080410000006001100210000000ea0240009c000000ea040080410000004002400210000000000121019f000000ea0230009c000000ea03008041000000c002300210000000000121019f000000060200002903a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea06100197000000000106004b000003310000c13d00000060030000390000008001000039000003520000013d00000000011200190000000001410049000000ea0210009c000000ea010080410000006001100210000000ea0240009c000000ea040080410000004002400210000000000121019f000000ea0230009c000000ea03008041000000c002300210000000000121019f000000060200002903a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea05100197000000000105004b0000035a0000c13d00000060010000390000037c0000013d0000003f016000390000011801100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000001050003670000000506600272000003430000613d00000005076002100000000007710019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b0000033f0000c13d000000000704004b000003520000613d0000000506600210000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000001fb0000613d0000000002030433000000000302004b000001770000613d0000001f0220008c000003880000a13d0000020b0000013d0000003f015000390000011803100197000000400100043d0000000003310019000000400030043f0000001f0350018f0000000004510436000300000004001d000000010400036700000005055002720000036d0000613d000000050650021000000003080000290000000006680019000000000704034f000000007907043c0000000008980436000000000968004b000003690000c13d000000000603004b0000037c0000613d0000000505500210000000000454034f00000003055000290000000303300210000000000605043300000000063601cf000000000636022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000363019f0000000000350435000000000202004b000001fb0000613d0000000001010433000000000201004b0000000302000029000001770000613d0000001f0110008c000003880000a13d0000000001020433000000000101004b000001770000c13d0000020e0000013d0000000001000019000003a400010430000000000001042f0000000001000414000000ea0210009c000000ea01008041000000c001100210000000fc011001c7000080100200003903a2039d0000040f0000000102200190000003960000613d000000000101043b000000000001042d0000000001000019000003a4000104300000039b002104210000000102000039000000000001042d0000000002000019000000000001042d000003a0002104230000000102000039000000000001042d0000000002000019000000000001042d000003a200000432000003a30001042e000003a40001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000000400000010000000000000000009ad99e680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f5ab16cb00000000000000000000000000000000000000000000000000000000f5ab16cc00000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000000000000000000000fb66fb4d000000000000000000000000000000000000000000000000000000009ad99e6800000000000000000000000000000000000000000000000000000000f5a1f5b408c379a0000000000000000000000000000000000000000000000000000000006f6e6c792061646d696e206f72206f776e65722063616e0000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000002000000080000000000000000002000000000000000000000000000000000000000000008000000000000000008934ce4adea8d9ce0d714d2c22b86790e41b7731c84b926fbbdc1d40ff6533c96e6577206f776e657220697320746865207a65726f2061646472657373000000020000000000000000000000000000000000004000000000000000000000000070a08231000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9059cbb00000000000000000000000000000000000000000000000000000000e03fe177bb050a40ea1b3ecd64121a3fa063a94b6d404b2f45c64697555efe0ec5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706f6e6c792072657761726420746f6b656e2063616e0000000000000000000000000000000000000000000000000000000000000000000000000000004dd18bf4000000000000000000000000000000000000000000000000000000004dd18bf500000000000000000000000000000000000000000000000000000000804e523e000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000000000000000000000000000000000000e18b68100000000000000000000000000000000000000000000000000000000267822476f6e6c79206f776e65722063616e0000000000000000000000000000000000005361666542455032303a2063616c6c20746f206e6f6e2d636f6e7472616374006f742073756363656564000000000000000000000000000000000000000000005361666542455032303a204245503230206f7065726174696f6e20646964206e5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65646f6e6c792061646d696e2063616e0000000000000000000000000000000000000200000000000000000000000000000000000040000000800000000000000000ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a96f6e6c792070656e64696e672061646d696e00000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000f8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa02446455c561ac28683470a1054b0c1a6abfa910dfab78b07b2d68c9316dddf64", + "deployedBytecode": "0x0002000000000002000600000000000200000000030100190000006003300270000000ea0330019700010000003103550000008005000039000000400050043f000000000400041600000001022001900000001d0000c13d000000000204004b000003880000c13d000000040230008c000003880000413d000000000401043b000000e002400270000000ee0440009c0000002a0000813d000001050420009c000000510000a13d000001060420009c000000730000613d000001070420009c0000008e0000613d000001080120009c000003880000c13d0000000201000039000000560000013d000000000104004b000003880000c13d0000000001000411000000eb01100197000000000200041a000000ec02200197000000000112019f000000000010041b000000200100003900000100001004430000012000000443000000ed01000041000003a30001042e000000ef0420009c000000580000a13d000000f00420009c000000c00000613d000000f10420009c000000d10000613d000000f20220009c000003880000c13d000000440230008a000001160220009c000003880000813d0000002402100370000000000402043b0000000401100370000000000101043b0000000002000411000000eb02200197000000000300041a000000eb03300197000000000332004b000000440000613d0000000203000039000000000303041a000000eb03300197000000000232004b0000015c0000c13d000000eb0110019700000000001004350000000301000039000000200010043f000600000004001d03a2038b0000040f000000000301041a0000011702300197000000060300006b000000010220c1bf000000000021041b0000000001000019000003a30001042e000001090120009c000000d60000613d0000010a0120009c000003880000c13d0000000101000039000000000101041a000000d20000013d000000f30420009c000001020000613d000000f40220009c000003880000c13d000000240230008a000001180220009c000003880000813d000000000200041a0000000003000411000000000223013f0000000401100370000000000101043b000000eb06100197000000eb012001980000013e0000c13d000000000106004b000001660000c13d000000f501000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f000000fb01000041000000c40010043f000000f701000041000003a400010430000000240230008a000001180220009c000003880000813d000000000200041a0000000003000411000000000223013f000000eb022001980000013e0000c13d0000000401100370000000000101043b000000eb011001970000000103000039000000000203041a000000ec04200197000000000414019f000000000043041b000000eb02200197000000800020043f000000a00010043f0000000001000414000000ea0210009c000000ea01008041000000c00110021000000111011001c70000800d020000390000011204000041000001740000013d000000440230008a000001160220009c000003880000813d0000000402100370000000000202043b000000eb042001970000000002000411000000eb022001970000000203000039000000000303041a000000eb03300197000000000332004b000001520000c13d0000002401100370000000000101043b000000a40020043f000000c40010043f0000004401000039000000800010043f000000e401000039000000400010043f000000a00100043d000001000110019700000101011001c7000000a00010043f00000102010000410000000000100439000600000004001d00000004004004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c0000019c0000c13d000000400100043d00000044021000390000010c03000041000000000032043500000024021000390000001f030000390000012d0000013d000000240230008a000001180220009c000003880000813d0000000401100370000000000101043b0000000302000039000000200020043f000000eb01100197000000000010043503a2038b0000040f000000000101041a000000ff011001900000000001000019000000010100c039000000800010043f000000f801000041000003a30001042e000000000100041a000000eb01100197000000800010043f000000f801000041000003a30001042e0000000001000411000000eb011001970000000103000039000000000203041a000000eb04200197000000000441004b000001480000c13d000000000400041a000600000004001d000000ec04400197000000000414019f000000000040041b000000ec02200197000000000023041b000000800010043f000000a00000043f0000000001000414000000ea0210009c000000ea01008041000000c00110021000000111011001c70000800d02000039000001120400004103a203980000040f0000000101200190000003880000613d000000400100043d000000ea0210009c000000ea010080410000004001100210000000000200041a0000000003000414000000ea0430009c000000ea03008041000000c003300210000000000113019f00000114011001c70000000603000029000000eb05300197000000eb062001970000800d0200003900000003030000390000011504000041000001740000013d000000640230008a000001190220009c000003880000813d0000000202000039000000000202041a0000000003000411000000000223013f0000004403100370000000000403043b0000002403100370000000000303043b000000eb063001970000000401100370000000000101043b000000eb03100197000000eb01200198000001520000c13d000400000006001d000500000004001d00000000003004350000000301000039000000200010043f0000000001000414000000ea0210009c000000ea01008041000000c001100210000000fc011001c70000801002000039000300000005001d000600000003001d03a2039d0000040f0000000102200190000003880000613d000000000101043b000000000101041a000000ff01100190000001790000c13d000000400100043d000000440210003900000104030000410000000000320435000000240210003900000015030000390000000000320435000000f5020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000006401100039000000ea0310009c000000ea010080410000006001100210000000ea0320009c000000ea020080410000004002200210000000000121019f000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000011001000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000001201000039000000a40010043f0000011301000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000010b01000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000001701000039000000a40010043f000000f601000041000000c40010043f000000f701000041000003a4000104300000000201000039000000000201041a000000ec03200197000000000363019f000000000031041b0000000001000414000000eb05200197000000ea0210009c000000ea01008041000000c001100210000000f9011001c70000800d020000390000000303000039000000fa0400004103a203980000040f0000000101200190000003880000613d0000000001000019000003a30001042e0000000603000029000000000103004b000001770000613d000000400200043d000000fd0100004100000000001204350000000001000410000000eb01100197000100000002001d00000004022000390000000000120435000000400100043d000200000001001d000000fe01000041000000000010043900000004003004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000101004b0000000603000029000003880000613d0000000001000414000000040230008c0000000002030019000002210000c13d0000000003000031000002540000013d000000400100043d000000800700043d000000a004000039000000200370008c000001a40000813d00000000050700190000000003010019000001ab0000013d0000000003010019000000000507001900000000460404340000000003630436000000200550008a000000200650008c000001a60000813d00000003065002100000010006600089000000010660020f000000000505004b000000000600601900000000040404330000000005600049000000000454016f000000010560008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000602000029000000040520008c000001c00000c13d00000001020000390000000006000031000001d30000013d00000000011700190000000001410049000000ea0510009c000000ea010080410000006001100210000000ea0540009c000000ea040080410000004004400210000000000141019f000000ea0430009c000000ea03008041000000c003300210000000000131019f03a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea06100197000000000106004b000001d80000c13d00000060030000390000008001000039000001f90000013d0000003f016000390000011801100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000001050003670000000506600272000001ea0000613d00000005076002100000000007710019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b000001e60000c13d000000000704004b000001f90000613d0000000506600210000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000002060000c13d000000400100043d00000044021000390000010f030000410000000000320435000000f50200004100000000002104350000002402100039000000200300003900000000003204350000000402100039000001320000013d0000000002030433000000000302004b000001770000613d0000001f0220008c000003880000a13d0000000001010433000000000101004b000001770000c13d000000400100043d00000064021000390000010d03000041000000000032043500000044021000390000010e03000041000000000032043500000024021000390000002a030000390000000000320435000000f5020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000008401100039000001360000013d000000020400002900000001034000690000002405300039000000ea0340009c000000ea0300004100000000030440190000004003300210000000ea0450009c000000ea050080410000006004500210000000000434019f000000ea0310009c000000ea01008041000000c001100210000000000141019f03a2039d0000040f00000000030100190000006003300270000000ea03300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000002410000613d00000002080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000023d0000c13d000000000604004b000002500000613d0000000505500210000000000651034f00000002055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000000000003001f00010000000103550000000102200190000002a20000613d000000200130008c000003880000413d000000400300043d000000240130003900000004020000290000000000210435000000640130003900000044023000390000000003030433000000050430006b000002bb0000a13d0000000000320435000000400300043d0000000002320049000400000003001d0000000002230436000000400010043f0000000001020433000001000110019700000101011001c7000500000002001d000000000012043500000102010000410000000000100439000000060100002900000004001004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c000000b90000613d000000400100043d00000004020000290000000002020433000000200320008c000000000402001900000000030100190000028c0000413d00000000030100190000000004020019000000050600002900000000650604340000000003530436000000200440008a000000200540008c000002860000813d000500000006001d00000003054002100000010005500089000000010550020f000000000404004b0000000005006019000000050400002900000000040404330000000006500049000000000464016f000000010550008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000605000029000000040550008c000003000000c13d00000001020000390000000006000031000003140000013d0000001f0430018f00000005023002720000000502200210000002ac0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000002a80000c13d000000000504004b000002b90000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001204350000006001300210000003a40001043000000005030000290000000000320435000000400300043d0000000002320049000400000003001d0000000002230436000000400010043f0000000001020433000001000110019700000101011001c7000500000002001d000000000012043500000102010000410000000000100439000000060100002900000004001004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c000000b90000613d000000400100043d00000004020000290000000002020433000000200320008c00000000040200190000000003010019000002e90000413d00000000030100190000000004020019000000050600002900000000650604340000000003530436000000200440008a000000200540008c000002e30000813d000500000006001d00000003054002100000010005500089000000010550020f000000000404004b0000000005006019000000050400002900000000040404330000000006500049000000000464016f000000010550008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000605000029000000040550008c000003190000c13d000000010200003900000000050000310000032d0000013d000000000001042f00000000011200190000000001410049000000ea0210009c000000ea010080410000006001100210000000ea0240009c000000ea040080410000004002400210000000000121019f000000ea0230009c000000ea03008041000000c002300210000000000121019f000000060200002903a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea06100197000000000106004b000003310000c13d00000060030000390000008001000039000003520000013d00000000011200190000000001410049000000ea0210009c000000ea010080410000006001100210000000ea0240009c000000ea040080410000004002400210000000000121019f000000ea0230009c000000ea03008041000000c002300210000000000121019f000000060200002903a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea05100197000000000105004b0000035a0000c13d00000060010000390000037c0000013d0000003f016000390000011801100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000001050003670000000506600272000003430000613d00000005076002100000000007710019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b0000033f0000c13d000000000704004b000003520000613d0000000506600210000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000001fb0000613d0000000002030433000000000302004b000001770000613d0000001f0220008c000003880000a13d0000020b0000013d0000003f015000390000011803100197000000400100043d0000000003310019000000400030043f0000001f0350018f0000000004510436000300000004001d000000010400036700000005055002720000036d0000613d000000050650021000000003080000290000000006680019000000000704034f000000007907043c0000000008980436000000000968004b000003690000c13d000000000603004b0000037c0000613d0000000505500210000000000454034f00000003055000290000000303300210000000000605043300000000063601cf000000000636022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000363019f0000000000350435000000000202004b000001fb0000613d0000000001010433000000000201004b0000000302000029000001770000613d0000001f0110008c000003880000a13d0000000001020433000000000101004b000001770000c13d0000020e0000013d0000000001000019000003a400010430000000000001042f0000000001000414000000ea0210009c000000ea01008041000000c001100210000000fc011001c7000080100200003903a2039d0000040f0000000102200190000003960000613d000000000101043b000000000001042d0000000001000019000003a4000104300000039b002104210000000102000039000000000001042d0000000002000019000000000001042d000003a0002104230000000102000039000000000001042d0000000002000019000000000001042d000003a200000432000003a30001042e000003a40001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000000400000010000000000000000009ad99e680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f5ab16cb00000000000000000000000000000000000000000000000000000000f5ab16cc00000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000000000000000000000fb66fb4d000000000000000000000000000000000000000000000000000000009ad99e6800000000000000000000000000000000000000000000000000000000f5a1f5b408c379a0000000000000000000000000000000000000000000000000000000006f6e6c792061646d696e206f72206f776e65722063616e0000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000002000000080000000000000000002000000000000000000000000000000000000000000008000000000000000008934ce4adea8d9ce0d714d2c22b86790e41b7731c84b926fbbdc1d40ff6533c96e6577206f776e657220697320746865207a65726f2061646472657373000000020000000000000000000000000000000000004000000000000000000000000070a08231000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9059cbb00000000000000000000000000000000000000000000000000000000e03fe177bb050a40ea1b3ecd64121a3fa063a94b6d404b2f45c64697555efe0ec5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706f6e6c792072657761726420746f6b656e2063616e0000000000000000000000000000000000000000000000000000000000000000000000000000004dd18bf4000000000000000000000000000000000000000000000000000000004dd18bf500000000000000000000000000000000000000000000000000000000804e523e000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000000000000000000000000000000000000e18b68100000000000000000000000000000000000000000000000000000000267822476f6e6c79206f776e65722063616e0000000000000000000000000000000000005361666542455032303a2063616c6c20746f206e6f6e2d636f6e7472616374006f742073756363656564000000000000000000000000000000000000000000005361666542455032303a204245503230206f7065726174696f6e20646964206e5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65646f6e6c792061646d696e2063616e0000000000000000000000000000000000000200000000000000000000000000000000000040000000800000000000000000ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a96f6e6c792070656e64696e672061646d696e00000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000f8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa02446455c561ac28683470a1054b0c1a6abfa910dfab78b07b2d68c9316dddf64", + "devdoc": { + "author": "Venus", + "methods": { + "emergencyRewardWithdraw(address,uint256)": { + "params": { + "_amount": "Amount of token to withdraw", + "_tokenAddress": "Reward token address to withdraw" + } + }, + "safeRewardTransfer(address,address,uint256)": { + "details": "Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.", + "params": { + "_amount": "Amount to transfer", + "_to": "Destination address of the reward", + "token": "Reward token to transfer" + } + }, + "setNewOwner(address)": { + "params": { + "_owner": "The address of the owner to set Only callable admin" + } + }, + "setPendingAdmin(address)": { + "params": { + "_admin": "Propose an account as admin of the XVS store" + } + }, + "setRewardToken(address,bool)": { + "params": { + "_tokenAddress": "The address of a token to set as active or inactive", + "status": "Set whether a reward token is active or not" + } + } + }, + "title": "XVS Store" + }, + "userdoc": { + "methods": { + "acceptAdmin()": { + "notice": "Allows an account that is pending as admin to accept the role nly calllable by the pending admin" + }, + "emergencyRewardWithdraw(address,uint256)": { + "notice": "Security function to allow the owner of the contract to withdraw from the contract" + }, + "safeRewardTransfer(address,address,uint256)": { + "notice": "Safely transfer rewards. Only active reward tokens can be sent using this function. Only callable by owner" + }, + "setNewOwner(address)": { + "notice": "Set the contract owner" + }, + "setPendingAdmin(address)": { + "notice": "Allows the admin to propose a new admin Only callable admin" + }, + "setRewardToken(address,bool)": { + "notice": "Set or disable a reward token" + } + }, + "notice": "XVS Store responsible for distributing XVS rewards" + }, + "storageLayout": { + "storage": [ + { + "astId": 35423, + "contract": "contracts/XVSVault/XVSStore.sol:XVSStore", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 35425, + "contract": "contracts/XVSVault/XVSStore.sol:XVSStore", + "label": "pendingAdmin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 35427, + "contract": "contracts/XVSVault/XVSStore.sol:XVSStore", + "label": "owner", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 35431, + "contract": "contracts/XVSVault/XVSStore.sol:XVSStore", + "label": "rewardTokens", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_bool)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + } + } + }, + "factoryDeps": [ + "0x0002000000000002000600000000000200000000030100190000006003300270000000ea0330019700010000003103550000008005000039000000400050043f000000000400041600000001022001900000001d0000c13d000000000204004b000003880000c13d000000040230008c000003880000413d000000000401043b000000e002400270000000ee0440009c0000002a0000813d000001050420009c000000510000a13d000001060420009c000000730000613d000001070420009c0000008e0000613d000001080120009c000003880000c13d0000000201000039000000560000013d000000000104004b000003880000c13d0000000001000411000000eb01100197000000000200041a000000ec02200197000000000112019f000000000010041b000000200100003900000100001004430000012000000443000000ed01000041000003a30001042e000000ef0420009c000000580000a13d000000f00420009c000000c00000613d000000f10420009c000000d10000613d000000f20220009c000003880000c13d000000440230008a000001160220009c000003880000813d0000002402100370000000000402043b0000000401100370000000000101043b0000000002000411000000eb02200197000000000300041a000000eb03300197000000000332004b000000440000613d0000000203000039000000000303041a000000eb03300197000000000232004b0000015c0000c13d000000eb0110019700000000001004350000000301000039000000200010043f000600000004001d03a2038b0000040f000000000301041a0000011702300197000000060300006b000000010220c1bf000000000021041b0000000001000019000003a30001042e000001090120009c000000d60000613d0000010a0120009c000003880000c13d0000000101000039000000000101041a000000d20000013d000000f30420009c000001020000613d000000f40220009c000003880000c13d000000240230008a000001180220009c000003880000813d000000000200041a0000000003000411000000000223013f0000000401100370000000000101043b000000eb06100197000000eb012001980000013e0000c13d000000000106004b000001660000c13d000000f501000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f000000fb01000041000000c40010043f000000f701000041000003a400010430000000240230008a000001180220009c000003880000813d000000000200041a0000000003000411000000000223013f000000eb022001980000013e0000c13d0000000401100370000000000101043b000000eb011001970000000103000039000000000203041a000000ec04200197000000000414019f000000000043041b000000eb02200197000000800020043f000000a00010043f0000000001000414000000ea0210009c000000ea01008041000000c00110021000000111011001c70000800d020000390000011204000041000001740000013d000000440230008a000001160220009c000003880000813d0000000402100370000000000202043b000000eb042001970000000002000411000000eb022001970000000203000039000000000303041a000000eb03300197000000000332004b000001520000c13d0000002401100370000000000101043b000000a40020043f000000c40010043f0000004401000039000000800010043f000000e401000039000000400010043f000000a00100043d000001000110019700000101011001c7000000a00010043f00000102010000410000000000100439000600000004001d00000004004004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c0000019c0000c13d000000400100043d00000044021000390000010c03000041000000000032043500000024021000390000001f030000390000012d0000013d000000240230008a000001180220009c000003880000813d0000000401100370000000000101043b0000000302000039000000200020043f000000eb01100197000000000010043503a2038b0000040f000000000101041a000000ff011001900000000001000019000000010100c039000000800010043f000000f801000041000003a30001042e000000000100041a000000eb01100197000000800010043f000000f801000041000003a30001042e0000000001000411000000eb011001970000000103000039000000000203041a000000eb04200197000000000441004b000001480000c13d000000000400041a000600000004001d000000ec04400197000000000414019f000000000040041b000000ec02200197000000000023041b000000800010043f000000a00000043f0000000001000414000000ea0210009c000000ea01008041000000c00110021000000111011001c70000800d02000039000001120400004103a203980000040f0000000101200190000003880000613d000000400100043d000000ea0210009c000000ea010080410000004001100210000000000200041a0000000003000414000000ea0430009c000000ea03008041000000c003300210000000000113019f00000114011001c70000000603000029000000eb05300197000000eb062001970000800d0200003900000003030000390000011504000041000001740000013d000000640230008a000001190220009c000003880000813d0000000202000039000000000202041a0000000003000411000000000223013f0000004403100370000000000403043b0000002403100370000000000303043b000000eb063001970000000401100370000000000101043b000000eb03100197000000eb01200198000001520000c13d000400000006001d000500000004001d00000000003004350000000301000039000000200010043f0000000001000414000000ea0210009c000000ea01008041000000c001100210000000fc011001c70000801002000039000300000005001d000600000003001d03a2039d0000040f0000000102200190000003880000613d000000000101043b000000000101041a000000ff01100190000001790000c13d000000400100043d000000440210003900000104030000410000000000320435000000240210003900000015030000390000000000320435000000f5020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000006401100039000000ea0310009c000000ea010080410000006001100210000000ea0320009c000000ea020080410000004002200210000000000121019f000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000011001000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000001201000039000000a40010043f0000011301000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000010b01000041000000c40010043f000000f701000041000003a400010430000000f501000041000000800010043f0000002001000039000000840010043f0000001701000039000000a40010043f000000f601000041000000c40010043f000000f701000041000003a4000104300000000201000039000000000201041a000000ec03200197000000000363019f000000000031041b0000000001000414000000eb05200197000000ea0210009c000000ea01008041000000c001100210000000f9011001c70000800d020000390000000303000039000000fa0400004103a203980000040f0000000101200190000003880000613d0000000001000019000003a30001042e0000000603000029000000000103004b000001770000613d000000400200043d000000fd0100004100000000001204350000000001000410000000eb01100197000100000002001d00000004022000390000000000120435000000400100043d000200000001001d000000fe01000041000000000010043900000004003004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000101004b0000000603000029000003880000613d0000000001000414000000040230008c0000000002030019000002210000c13d0000000003000031000002540000013d000000400100043d000000800700043d000000a004000039000000200370008c000001a40000813d00000000050700190000000003010019000001ab0000013d0000000003010019000000000507001900000000460404340000000003630436000000200550008a000000200650008c000001a60000813d00000003065002100000010006600089000000010660020f000000000505004b000000000600601900000000040404330000000005600049000000000454016f000000010560008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000602000029000000040520008c000001c00000c13d00000001020000390000000006000031000001d30000013d00000000011700190000000001410049000000ea0510009c000000ea010080410000006001100210000000ea0540009c000000ea040080410000004004400210000000000141019f000000ea0430009c000000ea03008041000000c003300210000000000131019f03a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea06100197000000000106004b000001d80000c13d00000060030000390000008001000039000001f90000013d0000003f016000390000011801100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000001050003670000000506600272000001ea0000613d00000005076002100000000007710019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b000001e60000c13d000000000704004b000001f90000613d0000000506600210000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000002060000c13d000000400100043d00000044021000390000010f030000410000000000320435000000f50200004100000000002104350000002402100039000000200300003900000000003204350000000402100039000001320000013d0000000002030433000000000302004b000001770000613d0000001f0220008c000003880000a13d0000000001010433000000000101004b000001770000c13d000000400100043d00000064021000390000010d03000041000000000032043500000044021000390000010e03000041000000000032043500000024021000390000002a030000390000000000320435000000f5020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000008401100039000001360000013d000000020400002900000001034000690000002405300039000000ea0340009c000000ea0300004100000000030440190000004003300210000000ea0450009c000000ea050080410000006004500210000000000434019f000000ea0310009c000000ea01008041000000c001100210000000000141019f03a2039d0000040f00000000030100190000006003300270000000ea03300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000002410000613d00000002080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000023d0000c13d000000000604004b000002500000613d0000000505500210000000000651034f00000002055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000000000003001f00010000000103550000000102200190000002a20000613d000000200130008c000003880000413d000000400300043d000000240130003900000004020000290000000000210435000000640130003900000044023000390000000003030433000000050430006b000002bb0000a13d0000000000320435000000400300043d0000000002320049000400000003001d0000000002230436000000400010043f0000000001020433000001000110019700000101011001c7000500000002001d000000000012043500000102010000410000000000100439000000060100002900000004001004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c000000b90000613d000000400100043d00000004020000290000000002020433000000200320008c000000000402001900000000030100190000028c0000413d00000000030100190000000004020019000000050600002900000000650604340000000003530436000000200440008a000000200540008c000002860000813d000500000006001d00000003054002100000010005500089000000010550020f000000000404004b0000000005006019000000050400002900000000040404330000000006500049000000000464016f000000010550008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000605000029000000040550008c000003000000c13d00000001020000390000000006000031000003140000013d0000001f0430018f00000005023002720000000502200210000002ac0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000002a80000c13d000000000504004b000002b90000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001204350000006001300210000003a40001043000000005030000290000000000320435000000400300043d0000000002320049000400000003001d0000000002230436000000400010043f0000000001020433000001000110019700000101011001c7000500000002001d000000000012043500000102010000410000000000100439000000060100002900000004001004430000000001000414000000ea0210009c000000ea01008041000000c001100210000000ff011001c7000080020200003903a2039d0000040f0000000102200190000002ff0000613d000000000101043b000000000201004b000000b90000613d000001030110009c000000b90000613d000000400100043d00000004020000290000000002020433000000200320008c00000000040200190000000003010019000002e90000413d00000000030100190000000004020019000000050600002900000000650604340000000003530436000000200440008a000000200540008c000002e30000813d000500000006001d00000003054002100000010005500089000000010550020f000000000404004b0000000005006019000000050400002900000000040404330000000006500049000000000464016f000000010550008a0000000006030433000000000565016f000000000445019f0000000000430435000000400400043d00000000030004140000000605000029000000040550008c000003190000c13d000000010200003900000000050000310000032d0000013d000000000001042f00000000011200190000000001410049000000ea0210009c000000ea010080410000006001100210000000ea0240009c000000ea040080410000004002400210000000000121019f000000ea0230009c000000ea03008041000000c002300210000000000121019f000000060200002903a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea06100197000000000106004b000003310000c13d00000060030000390000008001000039000003520000013d00000000011200190000000001410049000000ea0210009c000000ea010080410000006001100210000000ea0240009c000000ea040080410000004002400210000000000121019f000000ea0230009c000000ea03008041000000c002300210000000000121019f000000060200002903a203980000040f000000010220018f00010000000103550000006001100270000000ea0010019d000000ea05100197000000000105004b0000035a0000c13d00000060010000390000037c0000013d0000003f016000390000011801100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000001050003670000000506600272000003430000613d00000005076002100000000007710019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b0000033f0000c13d000000000704004b000003520000613d0000000506600210000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000001fb0000613d0000000002030433000000000302004b000001770000613d0000001f0220008c000003880000a13d0000020b0000013d0000003f015000390000011803100197000000400100043d0000000003310019000000400030043f0000001f0350018f0000000004510436000300000004001d000000010400036700000005055002720000036d0000613d000000050650021000000003080000290000000006680019000000000704034f000000007907043c0000000008980436000000000968004b000003690000c13d000000000603004b0000037c0000613d0000000505500210000000000454034f00000003055000290000000303300210000000000605043300000000063601cf000000000636022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000363019f0000000000350435000000000202004b000001fb0000613d0000000001010433000000000201004b0000000302000029000001770000613d0000001f0110008c000003880000a13d0000000001020433000000000101004b000001770000c13d0000020e0000013d0000000001000019000003a400010430000000000001042f0000000001000414000000ea0210009c000000ea01008041000000c001100210000000fc011001c7000080100200003903a2039d0000040f0000000102200190000003960000613d000000000101043b000000000001042d0000000001000019000003a4000104300000039b002104210000000102000039000000000001042d0000000002000019000000000001042d000003a0002104230000000102000039000000000001042d0000000002000019000000000001042d000003a200000432000003a30001042e000003a40001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000002000000000000000000000000000000400000010000000000000000009ad99e680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f5ab16cb00000000000000000000000000000000000000000000000000000000f5ab16cc00000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000000000000000000000fb66fb4d000000000000000000000000000000000000000000000000000000009ad99e6800000000000000000000000000000000000000000000000000000000f5a1f5b408c379a0000000000000000000000000000000000000000000000000000000006f6e6c792061646d696e206f72206f776e65722063616e0000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000002000000080000000000000000002000000000000000000000000000000000000000000008000000000000000008934ce4adea8d9ce0d714d2c22b86790e41b7731c84b926fbbdc1d40ff6533c96e6577206f776e657220697320746865207a65726f2061646472657373000000020000000000000000000000000000000000004000000000000000000000000070a08231000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9059cbb00000000000000000000000000000000000000000000000000000000e03fe177bb050a40ea1b3ecd64121a3fa063a94b6d404b2f45c64697555efe0ec5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706f6e6c792072657761726420746f6b656e2063616e0000000000000000000000000000000000000000000000000000000000000000000000000000004dd18bf4000000000000000000000000000000000000000000000000000000004dd18bf500000000000000000000000000000000000000000000000000000000804e523e000000000000000000000000000000000000000000000000000000008da5cb5b000000000000000000000000000000000000000000000000000000000e18b68100000000000000000000000000000000000000000000000000000000267822476f6e6c79206f776e65722063616e0000000000000000000000000000000000005361666542455032303a2063616c6c20746f206e6f6e2d636f6e7472616374006f742073756363656564000000000000000000000000000000000000000000005361666542455032303a204245503230206f7065726174696f6e20646964206e5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c65646f6e6c792061646d696e2063616e0000000000000000000000000000000000000200000000000000000000000000000000000040000000800000000000000000ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a96f6e6c792070656e64696e672061646d696e00000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000f8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa02446455c561ac28683470a1054b0c1a6abfa910dfab78b07b2d68c9316dddf64" + ] +} diff --git a/deployments/zksyncsepolia/XVSVaultProxy.json b/deployments/zksyncsepolia/XVSVaultProxy.json new file mode 100644 index 000000000..129247371 --- /dev/null +++ b/deployments/zksyncsepolia/XVSVaultProxy.json @@ -0,0 +1,465 @@ +{ + "address": "0x825f9EE3b2b1C159a5444A111A70607f3918564e", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "_setPendingImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingXVSVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x825f9EE3b2b1C159a5444A111A70607f3918564e", + "transactionIndex": 0, + "gasUsed": "212100808", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893", + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x00000000000000000000000000000000000000000000000000bda4fd9f068600", + "logIndex": 0, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + }, + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000007a47f466e2c846", + "logIndex": 1, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + }, + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x0000000000000000000000000000000000008008", + "topics": ["0x27fe8c0b49f49507b9d4fe5968c9f49edfe5c9df277d433a07a0717ede97638d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000d60000000000000000000000000000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000800e7fbf768ec4b96f6a3b5bd42682a72ad908633f946f717c3fc16f844db09f1975", + "logIndex": 2, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + }, + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x0000000000000000000000000000000000008008", + "topics": [ + "0x3a36e47291f4201faf137fab081d92295bce2d53be2c6ca68ba82c7faa9ce241", + "0x000000000000000000000000000000000000000000000000000000000000800e", + "0x7fbf768ec4b96f6a3b5bd42682a72ad908633f946f717c3fc16f844db09f1975" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000f9a014e00000000000000000000008a01008041ffffffffffffffff000001e60000c13d000000000101004b000000000100041600000000010004140000000103000039000000800010043f0000008b01100197000000400500043d0000008a020080410000800d02000039000000c0011002100000008a0210009c000000a00010043f0000000003010019000002250001042e0000000101200190000000000001042d000000c00000043f00000001010000390224021a0000040f00000097011001c7000000000101043b000000000706004b0000008a030080410000008a05008041000001050000c13d00000001020000390200000000000000000002030000013d000000000121019f0000008a0320009c000000400100043d000000400200043d0000000301000039000001e60000613d000000000100041a0000022600010430000000000706043300000060011002100000008a0410009c000000000112019f00000000010004110000008b02200197000000020200003900000000ffffffff00000000020000190000008a0420009c000000000103041a00000099011001c7000000c002200210000000000200041400000040011002100000008a0310009c00000060022002100000004002200039000000000212004900000000001204350000000101000029000000000101041a0000008c011001970000008b02100197000000800020043f000000000042041b000000000414019f0000008c04300197000000000302041a00000004013003700000008b01100198000000000112013f0000000002000411000001e60000213d000000a30110009c000000240140008a000000000202004b000000000113019f00000040035002100000008a0350009c00000060013002100000008a0130009c0000000000160435000000000171019f00000000014101cf000000000141022f0000010004400089000000000747022f00000000074701cf00000003044002100000000006650019000000000161034f000000000704004b000000000a79004b0000000009a90436000000008a08043c0000000009050019000000000801034f000000000765001900000005066002100000000000750435000000000797019f00000000077801cf000000000878022f0000010007700089000000000808043b000000000979022f00000000097901cf000000000905043300000003074002100000000005750019000000000871034f000000000804004b000000000b8a004b000000000aba0436000000009b09043c000000000a050019000000000901034f000000000875001900000005076002100000000005350436000000400070043f0000000007570019000000a2077001970000003f0730003900000005063002700000001f0430018f000000000403004b0000008a033001970000008a0030019d0000006003300270000000010220018f0224021f0000040f000000000131019f000000c0033002100000008a0430009c000000000141019f00000040045002100000008a0450009c00000080011000390000000001540049000001880000013d0000000201000039000000000200041a0000000003000031000000040620008c0000000003000414000000800030043f00000000035301cf000000000353022f000000000303043b0000010005500089000000000202041a00010000000000024c452c5925f0998dfcf20ef63554cd6daecfbf4a36920bfd4c164be905e99014ffffffffffffffdfffffffffffffffe01f7ed54befbca97acb2160c906d1076d138079ec1b82d533d604de94d45953f9000000005c60da1b000000002678224700000000c1e8033400000000b71d1a0c00000000b71d1a0bf0ea57c5c3e1d81519ec1fcbd4f4cab43f9b8aa8ca94ea42e945ccee5d701fc8e7720646a95b16a99e54ec8142f9b09399413412fb94012fca4f2f25d0898edde8146d8519b417dc6a6c66a54b7f21c49321725bcb43fb07f9ffabca9c8276e90000004000000080ff9ea4e40a969aa061235052c5a1aadf581b197e84bbada845b96fe4426302640000006000000080000000200000008000000000e992a04100000000de0368b200000000f851a44000000000e9c714f200000000e9c714f1de0368b20000000000000040000001000000000200000000ffffffff00000000000002240000043200000222002104250000021d002104210000004002200210000000200110003900000000012100490000000000310435000000960400004100000095011001c7000000a00000043f00000000010000190000020d0000c13d00000000030000190000009a04000041000000000014043500000020042000390000009804000041000000a00040043f000100000004001d0000008b01200197000000000013041b000000000030041b000000000343019f0000008c03200197000001ff0000c13d000000000224004b0000008b04100197000001e00000013d000000000043041b0000008c04200197000000000203041a000001f70000c13d0000009401000041000000bb0000013d000000980000613d000001750000613d000001630000c13d000001670000613d0000015c0000613d0000014a0000c13d0000014e0000613d0000015d0000613d0000013b0000013d000001270000c13d0000000000360435000000000373019f000000000757022f00000000075701cf00000080067000390000000305600210000000000373034f000001200000613d000000000506004b0000010e0000c13d000000000a85004b0000000005a50436000000009a09043c000000000903034f0000008008700039000001120000613d000000050770021000000005074002720000001f0640018f000001890000013d000000910220009c000001a90000613d000000900620009c000001e20000013d0000009b0400004100000000001304350000002003200039000000a104000041000000a00050043f000100000005001d0000008b01300197000000000016041b000000000454019f000001e80000c13d000000000225004b000000000106041a00000003060000390000008b051001970000009e0220009c0000018d0000613d0000009d0620009c000000f80000013d0000008b023001970000000302000039000001ef0000c13d000000930220009c000001840000613d000000920620009c000000fc0000213d0000008f0620009c000000bb0000c13d0000008f0000613d0000007d0000c13d000000810000613d000000760000613d000000640000c13d000000680000613d000000770000613d000000a00220009c0000017f0000613d0000009f0620009c000000bc0000213d0000009c0620009c000000990000813d0000008e0660009c000000e002600270000000000603043b0000008d01000041000001200000044300000100001004430000002001000039000000000010041b0000008c02200197000000550000013d000000410000c13d000000000363019f0000000003300350000000000656022f00000000065601cf000000800600043d00000003054002100000001d0000613d000000000504004b000000320000813d000000040240008c000000000143034f000000240000c13d0000008a0410019700000060011002700000000001030019000000400050043f0000008005000039000000000301034f00990099014d014c014b014a0149014800120147014601450144002e0098002d0143014201410140013f013e0097013d009600950094013c0093000a00920091013b001d0090013a000500040003002c0009008f0139002b0138013701360135013400110133013201310130012f012e012d012c012b001c000500040003008e008d008c008b002a00010029008a001b008900880087001a00860085008400830010008200810080000a007f007e007d012a007c007b007a00790078001900770129007600750074007300720071012800700127006f006e006d006c006b006a006900680067006600650064000a001900630126006200610060005f005e005d0125005c0124005b005a00590028005800570018005600550054005300520051001a0050004f001b004e004d004c01230027012201210120011f011e001c004b004a00490005000400030026004800470046011d004500180009011c0044004300420041011b0040000f0006000e0001000d0017011a0011011901180117001c000500040003002c011601150114003f01130112002e0044004301110041003e0110010f0008010e010d0006000e0001000d0017000c0007010c0016001200250024003d00090023010b010a003c003b0022003a00390021000b0038003700010036002b00350021000b003400200033000c000701090108010701060105001c000500040003002601040103002e0098002d01020101010000ff00fe00fd00fc00fb00fa00f900f800f700f600f5002800f400f3009600970095009400f200f1000a0092009100f0001d009000ef008c008b002a00010029008a001b008900880087001a00860085008400830010008200810080000a007f007e007d00ee007c007b007a007900780019007700ed00760075007400730072007100ec007000eb006f006e006d006c006b006a006900680067006600650064000a0019006300ea006200610060005f005e005d00e9005c00e8005b005a00590028005800570018005600550054005300520051001a0050004f001b004e004d004c00e700e60005000400030015008d0005000400030024003d0009000800e50011004b004a0049000500040003002600480047004600e4004500180009000700e300e2004200e1002d0040000f0006000e0001000d001700e0000500040003002c00df00070032003f00de00dd008f00dc00db00da003e000700d900d8000800d700d60006000e0001000d0017000c00d5001600120025000700320009002300d400d3003c003b0022003a00390031000b0038002a00010036002b00350031000b003400200033000c00d20016001200d100d000cf002700150008000f001000140006001f0015000800100024000f00140006001f001500080010008e000f00140006001f009300ce00140006000e0001000d00cd000c00cc0016000700120025002200cb002300ca00c90037000100290021000b00c80020001100c7001d00130030001300c6001d00130030001300c5001100270000000000000000002f0000002f00020002000200c40000000000c3000000c2000000c100000000000000000000000000c000000000000000bf00000000000000be00000000000000bd00000000000000bc0000000000bb0000001e000000ba000000b900b800b700b6001e000000b5000000b400b300b200b1001e00000000000000b000af00ae00ad00ac00ab00aa00a900000000000000a800000000000000a700000000000000a600000000000000a500000000000000a400a300a200a100a0000200020002009f000200020002009e009d009c009b009a000000000000", + "logIndex": 3, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + }, + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x0000000000000000000000000000000000008004", + "topics": [ + "0xc94722ff13eacf53547c4741dab5228353a05938ffcdd5d4a2d533ae0e618287", + "0x010000a50c094014ac4211206128b9f47809c49ca6dd7a9931fe508d93c2ca8a", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + }, + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010000a50c094014ac4211206128b9f47809c49ca6dd7a9931fe508d93c2ca8a", + "0x000000000000000000000000825f9ee3b2b1c159a5444a111a70607f3918564e" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + }, + { + "transactionIndex": 0, + "blockNumber": 3545780, + "transactionHash": "0x6e17ba9f01af013f258dfe5a11c59290b8d8e938a0cce85668db5ac0c222c40e", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000000dd4c02d58334a", + "logIndex": 6, + "blockHash": "0xfae6754ef6ab894fc2ff6719d6844debbced5f4ebdd9365e587f58bcd0eeb893" + } + ], + "blockNumber": 3545780, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "44f09e5a32172287e0699190adfae104", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.b9534989\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"error\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"info\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"detail\",\"type\":\"uint256\"}],\"name\":\"Failure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"NewImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingImplementation\",\"type\":\"address\"}],\"name\":\"NewPendingImplementation\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"_acceptImplementation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingImplementation\",\"type\":\"address\"}],\"name\":\"_setPendingImplementation\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingXVSVaultImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"return\":\"uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\"},\"_acceptImplementation()\":{\"details\":\"Admin function for new implementation to accept it's role as implementation\",\"return\":\"uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\"},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"return\":\"uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\"}},\"title\":\"XVS Vault Proxy\"},\"userdoc\":{\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. msg.sender must be pendingAdmin\"},\"_acceptImplementation()\":{\"notice\":\"Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setPendingImplementation(address)\":{\"notice\":\"* Admin Functions **\"}},\"notice\":\"XVS Vault Proxy contract\"}},\"settings\":{\"compilationTarget\":{\"contracts/XVSVault/XVSVaultProxy.sol\":\"XVSVaultProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Tokens/Prime/IPrime.sol\":{\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\",\"urls\":[\"bzz-raw://24d9dc4fc1b4f74df60329f42b3d1c904c02c2164257496959582400b820ec31\",\"dweb:/ipfs/Qmf7SJNV34KqiJ6dibiHv4oWDB9gd9jTpomYngBnDTLLRc\"]},\"contracts/Utils/IBEP20.sol\":{\"keccak256\":\"0x839b08895eb1ad83502d3631e8e9e3a856d2a8c63c46f070d604af7b26c62c07\",\"urls\":[\"bzz-raw://5908d7afba215ef2350294a7b6220394b25ea51e3e878de8d16be93a5b815153\",\"dweb:/ipfs/QmeDMMMHDZ5jBDUYgTQXpktwjvMv5pvfAYTVjtgrNCEMmj\"]},\"contracts/Utils/SafeMath.sol\":{\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\",\"urls\":[\"bzz-raw://84233cdf4579e66aeb99788758f8cc750816c15ea495495c4fbb446f74da2469\",\"dweb:/ipfs/QmfPGduxT3Ty4uCcYCppy5E2ED5pwypwoaMrkC98i9Szyq\"]},\"contracts/XVSVault/XVSVaultErrorReporter.sol\":{\"keccak256\":\"0xa79877a281d024f0d03dbf1842a36a972ee6c1aa36ba93e3d646726d40684a26\",\"urls\":[\"bzz-raw://8b16cb72902db250dc2f43815874664129901d9214ea55bb5ecee0f6a8bb0efd\",\"dweb:/ipfs/QmRUFQV2uS7i7kZNNhZD2aqYCJiFPrEJmEC9Y2f7L2j92E\"]},\"contracts/XVSVault/XVSVaultProxy.sol\":{\"keccak256\":\"0xb39af917833659fe38f2f76924deda420babed8259b27741dc6cb402ade4d124\",\"urls\":[\"bzz-raw://ff79e8d65251827957467bb8d1db0dc298834d51c777f272e19a4ccb358daaee\",\"dweb:/ipfs/QmXf8EVMrgWdc2jL36kDWgie1MbLda8daEPFUbUyiHnsQJ\"]},\"contracts/XVSVault/XVSVaultStorage.sol\":{\"keccak256\":\"0xb09f9295c41bdac1350a3607f2b4ea326cb295a6d08f4145bc33ff87844cd02b\",\"urls\":[\"bzz-raw://aa827450b37c9ca75f3c8cd262cced5cb6b727a3439f5b584a5bb62ba76dd096\",\"dweb:/ipfs/QmZMFNKUnYzd6azYoFgvP24za6D5XCXKRR73Xpgw2Ryc5A\"]}},\"version\":1}", + "solc_version": "0.5.16", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x00010000000000020001000000000002000000000301034f0000008005000039000000400050043f000000000103001900000060011002700000008a041001970000000101200190000000240000c13d000000000143034f000000040240008c000000320000813d0000000202000039000000000202041a0000008b02200197000000000504004b0000001d0000613d0000000305400210000000800600043d00000000065601cf000000000656022f00000100055000890000000003300350000000000303043b000000000353022f00000000035301cf000000000363019f000000800030043f000000400500043d0000000003000414000000040620008c000000410000c13d00000001020000390000000003000031000000550000013d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b01100197000000000200041a0000008c02200197000000000112019f000000000010041b0000002001000039000001000010044300000120000004430000008d01000041000002250001042e000000000603043b000000e0026002700000008e0660009c000000990000813d0000009c0620009c000000bc0000213d0000009f0620009c0000017f0000613d000000a00220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d0000000201000039000001880000013d000000000154004900000080011000390000008a0410009c0000008a0100804100000060011002100000008a0450009c0000008a050080410000004004500210000000000141019f0000008a0430009c0000008a03008041000000c003300210000000000131019f0224021f0000040f000000010220018f000000000301001900000060033002700000008a0030019d0000008a03300197000000400500043d000000000403004b0000001f0430018f0000000506300270000000770000613d0000003f07300039000000a2077001970000000007570019000000400070043f0000000005350436000000000706004b0000000507600210000000680000613d0000000008750019000000000901034f000000000a050019000000009b09043c000000000aba0436000000000b8a004b000000640000c13d000000000804004b000000760000613d000000000871034f00000000057500190000000307400210000000000905043300000000097901cf000000000979022f000000000808043b0000010007700089000000000878022f00000000077801cf000000000797019f0000000000750435000000400500043d000000000706004b0000000506600210000000810000613d0000000007650019000000000801034f0000000009050019000000008a08043c0000000009a90436000000000a79004b0000007d0000c13d000000000704004b0000008f0000613d000000000161034f00000000066500190000000304400210000000000706043300000000074701cf000000000747022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000171019f00000000001604350000008a0130009c0000008a0300804100000060013002100000008a0350009c0000008a050080410000004003500210000000000113019f000000000202004b000000bb0000c13d00000226000104300000008f0620009c000000fc0000213d000000920620009c000001840000613d000000930220009c000001050000c13d000000240140008a000000a30110009c000001e60000213d0000000001000416000000000101004b000001e60000c13d000000000100041a0000000002000411000000000112013f0000008b01100198000001ef0000c13d0000000401300370000000000101043b0000008b011001970000000302000039000000000302041a0000008c04300197000000000414019f000000000042041b0000008b02300197000000800020043f000000a00010043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c7000000f80000013d000002250001042e0000009d0620009c0000018d0000613d0000009e0220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b051001970000000306000039000000000106041a0000008b02100197000000000225004b000001e80000c13d0000000202000039000000000302041a0000008c04300197000000000454019f000000000042041b0000008c01100197000000000016041b0000008b01300197000000800010043f000100000005001d000000a00050043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c70000800d020000390000000103000039000000a1040000410224021a0000040f0000000101200190000001e60000613d0000000301000039000000000101041a0000008b01100197000000400200043d0000002003200039000000000013043500000001010000290000000000120435000000400100043d000000000212004900000040022000390000008a0320009c0000008a0200804100000060022002100000008a0310009c0000008a010080410000004001100210000000000112019f00000000020004140000008a0320009c0000008a02008041000000c002200210000000000121019f00000099011001c70000800d0200003900000001030000390000009b04000041000001e20000013d000000900620009c000001a90000613d000000910220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d000000000100041a000001890000013d0000001f0640018f0000000202000039000000000202041a0000008b0220019700000005074002720000000507700210000001120000613d0000008008700039000000000903034f000000009a09043c0000000005a50436000000000a85004b0000010e0000c13d000000000506004b000001200000613d000000000373034f00000003056002100000008006700039000000000706043300000000075701cf000000000757022f000000000303043b0000010005500089000000000353022f00000000035301cf000000000373019f0000000000360435000000400500043d0000000003000414000000040620008c000001270000c13d000000010200003900000000030000310000013b0000013d000000000154004900000080011000390000008a0410009c0000008a0100804100000060011002100000008a0450009c0000008a050080410000004004500210000000000141019f0000008a0430009c0000008a03008041000000c003300210000000000131019f0224021f0000040f000000010220018f000000000301001900000060033002700000008a0030019d0000008a03300197000000400500043d000000000403004b0000001f0430018f00000005063002700000015d0000613d0000003f07300039000000a2077001970000000007570019000000400070043f0000000005350436000000000706004b00000005076002100000014e0000613d0000000008750019000000000901034f000000000a050019000000009b09043c000000000aba0436000000000b8a004b0000014a0000c13d000000000804004b0000015c0000613d000000000871034f00000000057500190000000307400210000000000905043300000000097901cf000000000979022f000000000808043b0000010007700089000000000878022f00000000077801cf000000000797019f0000000000750435000000400500043d000000000706004b0000000506600210000001670000613d0000000007650019000000000801034f0000000009050019000000008a08043c0000000009a90436000000000a79004b000001630000c13d000000000704004b000001750000613d000000000161034f00000000066500190000000304400210000000000706043300000000074701cf000000000747022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000171019f00000000001604350000008a0130009c0000008a0300804100000060013002100000008a0350009c0000008a050080410000004003500210000000000113019f000000000202004b000000980000613d000000bb0000013d0000000001000416000000000101004b000001e60000c13d0000000101000039000001880000013d0000000001000416000000000101004b000001e60000c13d0000000301000039000000000101041a0000008b01100197000000800010043f0000009401000041000002250001042e000000240140008a000000a30110009c000001e60000213d0000000001000416000000000101004b000001e60000c13d000000000100041a0000000002000411000000000112013f0000008b01100198000001f70000c13d0000000401300370000000000101043b0000008b011001970000000103000039000000000203041a0000008c04200197000000000414019f000000000043041b0000008b02200197000000800020043f000000a00010043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c7000001e00000013d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b041001970000000103000039000000000103041a0000008b02100197000000000224004b000001ff0000c13d000000000200041a0000008c03200197000000000343019f000000000030041b0000008c011001970000000103000039000000000013041b0000008b01200197000000800010043f000100000004001d000000a00040043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c70000800d0200003900000098040000410224021a0000040f0000000101200190000001e60000613d0000000103000039000000000103041a0000008b01100197000000400200043d0000002004200039000000000014043500000001010000290000000000120435000000400100043d000000000212004900000040022000390000008a0420009c0000008a0200804100000060022002100000008a0410009c0000008a010080410000004001100210000000000112019f00000000020004140000008a0420009c0000008a02008041000000c002200210000000000121019f00000099011001c70000800d020000390000009a040000410224021a0000040f000000010120019000000000030000190000020d0000c13d000000000100001900000226000104300000000101000039000000800010043f000000a00010043f0000000003010019000000c00000043f0000000001000414000002030000013d0000000101000039000000800010043f00000000030100190000000301000039000000a00010043f000000c00000043f0000000001000414000002030000013d0000000101000039000000800010043f00000000030100190000000201000039000000a00010043f000000c00000043f0000000001000414000002030000013d000000800030043f000000a00000043f000000c00000043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000095011001c70000800d0200003900000096040000410224021a0000040f00000001030000390000000101200190000001e60000613d000000400100043d0000000000310435000000400200043d000000000121004900000020011000390000008a0310009c0000008a0100804100000060011002100000008a0320009c0000008a020080410000004002200210000000000121019f000002250001042e0000021d002104210000000102000039000000000001042d0000000002000019000000000001042d00000222002104250000000102000039000000000001042d0000000002000019000000000001042d0000022400000432000002250001042e0000022600010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000de0368b20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9c714f100000000000000000000000000000000000000000000000000000000e9c714f200000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000000000000000000000de0368b200000000000000000000000000000000000000000000000000000000e992a0410000000000000000000000000000000000000020000000800000000000000000020000000000000000000000000000000000006000000080000000000000000045b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa00200000000000000000000000000000000000040000000800000000000000000f9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc0200000000000000000000000000000000000000000000000000000000000000ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9e945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d81500000000000000000000000000000000000000000000000000000000b71d1a0b00000000000000000000000000000000000000000000000000000000b71d1a0c00000000000000000000000000000000000000000000000000000000c1e803340000000000000000000000000000000000000000000000000000000026782247000000000000000000000000000000000000000000000000000000005c60da1bd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf4c164be905e99014aecfbf4a36920bfdfcf20ef63554cd6d4c452c5925f0998d", + "deployedBytecode": "0x00010000000000020001000000000002000000000301034f0000008005000039000000400050043f000000000103001900000060011002700000008a041001970000000101200190000000240000c13d000000000143034f000000040240008c000000320000813d0000000202000039000000000202041a0000008b02200197000000000504004b0000001d0000613d0000000305400210000000800600043d00000000065601cf000000000656022f00000100055000890000000003300350000000000303043b000000000353022f00000000035301cf000000000363019f000000800030043f000000400500043d0000000003000414000000040620008c000000410000c13d00000001020000390000000003000031000000550000013d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b01100197000000000200041a0000008c02200197000000000112019f000000000010041b0000002001000039000001000010044300000120000004430000008d01000041000002250001042e000000000603043b000000e0026002700000008e0660009c000000990000813d0000009c0620009c000000bc0000213d0000009f0620009c0000017f0000613d000000a00220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d0000000201000039000001880000013d000000000154004900000080011000390000008a0410009c0000008a0100804100000060011002100000008a0450009c0000008a050080410000004004500210000000000141019f0000008a0430009c0000008a03008041000000c003300210000000000131019f0224021f0000040f000000010220018f000000000301001900000060033002700000008a0030019d0000008a03300197000000400500043d000000000403004b0000001f0430018f0000000506300270000000770000613d0000003f07300039000000a2077001970000000007570019000000400070043f0000000005350436000000000706004b0000000507600210000000680000613d0000000008750019000000000901034f000000000a050019000000009b09043c000000000aba0436000000000b8a004b000000640000c13d000000000804004b000000760000613d000000000871034f00000000057500190000000307400210000000000905043300000000097901cf000000000979022f000000000808043b0000010007700089000000000878022f00000000077801cf000000000797019f0000000000750435000000400500043d000000000706004b0000000506600210000000810000613d0000000007650019000000000801034f0000000009050019000000008a08043c0000000009a90436000000000a79004b0000007d0000c13d000000000704004b0000008f0000613d000000000161034f00000000066500190000000304400210000000000706043300000000074701cf000000000747022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000171019f00000000001604350000008a0130009c0000008a0300804100000060013002100000008a0350009c0000008a050080410000004003500210000000000113019f000000000202004b000000bb0000c13d00000226000104300000008f0620009c000000fc0000213d000000920620009c000001840000613d000000930220009c000001050000c13d000000240140008a000000a30110009c000001e60000213d0000000001000416000000000101004b000001e60000c13d000000000100041a0000000002000411000000000112013f0000008b01100198000001ef0000c13d0000000401300370000000000101043b0000008b011001970000000302000039000000000302041a0000008c04300197000000000414019f000000000042041b0000008b02300197000000800020043f000000a00010043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c7000000f80000013d000002250001042e0000009d0620009c0000018d0000613d0000009e0220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b051001970000000306000039000000000106041a0000008b02100197000000000225004b000001e80000c13d0000000202000039000000000302041a0000008c04300197000000000454019f000000000042041b0000008c01100197000000000016041b0000008b01300197000000800010043f000100000005001d000000a00050043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c70000800d020000390000000103000039000000a1040000410224021a0000040f0000000101200190000001e60000613d0000000301000039000000000101041a0000008b01100197000000400200043d0000002003200039000000000013043500000001010000290000000000120435000000400100043d000000000212004900000040022000390000008a0320009c0000008a0200804100000060022002100000008a0310009c0000008a010080410000004001100210000000000112019f00000000020004140000008a0320009c0000008a02008041000000c002200210000000000121019f00000099011001c70000800d0200003900000001030000390000009b04000041000001e20000013d000000900620009c000001a90000613d000000910220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d000000000100041a000001890000013d0000001f0640018f0000000202000039000000000202041a0000008b0220019700000005074002720000000507700210000001120000613d0000008008700039000000000903034f000000009a09043c0000000005a50436000000000a85004b0000010e0000c13d000000000506004b000001200000613d000000000373034f00000003056002100000008006700039000000000706043300000000075701cf000000000757022f000000000303043b0000010005500089000000000353022f00000000035301cf000000000373019f0000000000360435000000400500043d0000000003000414000000040620008c000001270000c13d000000010200003900000000030000310000013b0000013d000000000154004900000080011000390000008a0410009c0000008a0100804100000060011002100000008a0450009c0000008a050080410000004004500210000000000141019f0000008a0430009c0000008a03008041000000c003300210000000000131019f0224021f0000040f000000010220018f000000000301001900000060033002700000008a0030019d0000008a03300197000000400500043d000000000403004b0000001f0430018f00000005063002700000015d0000613d0000003f07300039000000a2077001970000000007570019000000400070043f0000000005350436000000000706004b00000005076002100000014e0000613d0000000008750019000000000901034f000000000a050019000000009b09043c000000000aba0436000000000b8a004b0000014a0000c13d000000000804004b0000015c0000613d000000000871034f00000000057500190000000307400210000000000905043300000000097901cf000000000979022f000000000808043b0000010007700089000000000878022f00000000077801cf000000000797019f0000000000750435000000400500043d000000000706004b0000000506600210000001670000613d0000000007650019000000000801034f0000000009050019000000008a08043c0000000009a90436000000000a79004b000001630000c13d000000000704004b000001750000613d000000000161034f00000000066500190000000304400210000000000706043300000000074701cf000000000747022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000171019f00000000001604350000008a0130009c0000008a0300804100000060013002100000008a0350009c0000008a050080410000004003500210000000000113019f000000000202004b000000980000613d000000bb0000013d0000000001000416000000000101004b000001e60000c13d0000000101000039000001880000013d0000000001000416000000000101004b000001e60000c13d0000000301000039000000000101041a0000008b01100197000000800010043f0000009401000041000002250001042e000000240140008a000000a30110009c000001e60000213d0000000001000416000000000101004b000001e60000c13d000000000100041a0000000002000411000000000112013f0000008b01100198000001f70000c13d0000000401300370000000000101043b0000008b011001970000000103000039000000000203041a0000008c04200197000000000414019f000000000043041b0000008b02200197000000800020043f000000a00010043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c7000001e00000013d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b041001970000000103000039000000000103041a0000008b02100197000000000224004b000001ff0000c13d000000000200041a0000008c03200197000000000343019f000000000030041b0000008c011001970000000103000039000000000013041b0000008b01200197000000800010043f000100000004001d000000a00040043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c70000800d0200003900000098040000410224021a0000040f0000000101200190000001e60000613d0000000103000039000000000103041a0000008b01100197000000400200043d0000002004200039000000000014043500000001010000290000000000120435000000400100043d000000000212004900000040022000390000008a0420009c0000008a0200804100000060022002100000008a0410009c0000008a010080410000004001100210000000000112019f00000000020004140000008a0420009c0000008a02008041000000c002200210000000000121019f00000099011001c70000800d020000390000009a040000410224021a0000040f000000010120019000000000030000190000020d0000c13d000000000100001900000226000104300000000101000039000000800010043f000000a00010043f0000000003010019000000c00000043f0000000001000414000002030000013d0000000101000039000000800010043f00000000030100190000000301000039000000a00010043f000000c00000043f0000000001000414000002030000013d0000000101000039000000800010043f00000000030100190000000201000039000000a00010043f000000c00000043f0000000001000414000002030000013d000000800030043f000000a00000043f000000c00000043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000095011001c70000800d0200003900000096040000410224021a0000040f00000001030000390000000101200190000001e60000613d000000400100043d0000000000310435000000400200043d000000000121004900000020011000390000008a0310009c0000008a0100804100000060011002100000008a0320009c0000008a020080410000004002200210000000000121019f000002250001042e0000021d002104210000000102000039000000000001042d0000000002000019000000000001042d00000222002104250000000102000039000000000001042d0000000002000019000000000001042d0000022400000432000002250001042e0000022600010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000de0368b20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9c714f100000000000000000000000000000000000000000000000000000000e9c714f200000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000000000000000000000de0368b200000000000000000000000000000000000000000000000000000000e992a0410000000000000000000000000000000000000020000000800000000000000000020000000000000000000000000000000000006000000080000000000000000045b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa00200000000000000000000000000000000000040000000800000000000000000f9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc0200000000000000000000000000000000000000000000000000000000000000ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9e945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d81500000000000000000000000000000000000000000000000000000000b71d1a0b00000000000000000000000000000000000000000000000000000000b71d1a0c00000000000000000000000000000000000000000000000000000000c1e803340000000000000000000000000000000000000000000000000000000026782247000000000000000000000000000000000000000000000000000000005c60da1bd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf4c164be905e99014aecfbf4a36920bfdfcf20ef63554cd6d4c452c5925f0998d", + "devdoc": { + "author": "Venus", + "methods": { + "_acceptAdmin()": { + "details": "Admin function for pending admin to accept role and update admin", + "return": "uint 0=success, otherwise a failure (see ErrorReporter.sol for details)" + }, + "_acceptImplementation()": { + "details": "Admin function for new implementation to accept it's role as implementation", + "return": "uint 0=success, otherwise a failure (see ErrorReporter.sol for details)" + }, + "_setPendingAdmin(address)": { + "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.", + "params": { + "newPendingAdmin": "New pending admin." + }, + "return": "uint 0=success, otherwise a failure (see ErrorReporter.sol for details)" + } + }, + "title": "XVS Vault Proxy" + }, + "userdoc": { + "methods": { + "_acceptAdmin()": { + "notice": "Accepts transfer of admin rights. msg.sender must be pendingAdmin" + }, + "_acceptImplementation()": { + "notice": "Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation" + }, + "_setPendingAdmin(address)": { + "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer." + }, + "_setPendingImplementation(address)": { + "notice": "* Admin Functions **" + } + }, + "notice": "XVS Vault Proxy contract" + }, + "storageLayout": { + "storage": [ + { + "astId": 39069, + "contract": "contracts/XVSVault/XVSVaultProxy.sol:XVSVaultProxy", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 39071, + "contract": "contracts/XVSVault/XVSVaultProxy.sol:XVSVaultProxy", + "label": "pendingAdmin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 39073, + "contract": "contracts/XVSVault/XVSVaultProxy.sol:XVSVaultProxy", + "label": "implementation", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 39075, + "contract": "contracts/XVSVault/XVSVaultProxy.sol:XVSVaultProxy", + "label": "pendingXVSVaultImplementation", + "offset": 0, + "slot": "3", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + }, + "factoryDeps": [ + "0x00010000000000020001000000000002000000000301034f0000008005000039000000400050043f000000000103001900000060011002700000008a041001970000000101200190000000240000c13d000000000143034f000000040240008c000000320000813d0000000202000039000000000202041a0000008b02200197000000000504004b0000001d0000613d0000000305400210000000800600043d00000000065601cf000000000656022f00000100055000890000000003300350000000000303043b000000000353022f00000000035301cf000000000363019f000000800030043f000000400500043d0000000003000414000000040620008c000000410000c13d00000001020000390000000003000031000000550000013d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b01100197000000000200041a0000008c02200197000000000112019f000000000010041b0000002001000039000001000010044300000120000004430000008d01000041000002250001042e000000000603043b000000e0026002700000008e0660009c000000990000813d0000009c0620009c000000bc0000213d0000009f0620009c0000017f0000613d000000a00220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d0000000201000039000001880000013d000000000154004900000080011000390000008a0410009c0000008a0100804100000060011002100000008a0450009c0000008a050080410000004004500210000000000141019f0000008a0430009c0000008a03008041000000c003300210000000000131019f0224021f0000040f000000010220018f000000000301001900000060033002700000008a0030019d0000008a03300197000000400500043d000000000403004b0000001f0430018f0000000506300270000000770000613d0000003f07300039000000a2077001970000000007570019000000400070043f0000000005350436000000000706004b0000000507600210000000680000613d0000000008750019000000000901034f000000000a050019000000009b09043c000000000aba0436000000000b8a004b000000640000c13d000000000804004b000000760000613d000000000871034f00000000057500190000000307400210000000000905043300000000097901cf000000000979022f000000000808043b0000010007700089000000000878022f00000000077801cf000000000797019f0000000000750435000000400500043d000000000706004b0000000506600210000000810000613d0000000007650019000000000801034f0000000009050019000000008a08043c0000000009a90436000000000a79004b0000007d0000c13d000000000704004b0000008f0000613d000000000161034f00000000066500190000000304400210000000000706043300000000074701cf000000000747022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000171019f00000000001604350000008a0130009c0000008a0300804100000060013002100000008a0350009c0000008a050080410000004003500210000000000113019f000000000202004b000000bb0000c13d00000226000104300000008f0620009c000000fc0000213d000000920620009c000001840000613d000000930220009c000001050000c13d000000240140008a000000a30110009c000001e60000213d0000000001000416000000000101004b000001e60000c13d000000000100041a0000000002000411000000000112013f0000008b01100198000001ef0000c13d0000000401300370000000000101043b0000008b011001970000000302000039000000000302041a0000008c04300197000000000414019f000000000042041b0000008b02300197000000800020043f000000a00010043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c7000000f80000013d000002250001042e0000009d0620009c0000018d0000613d0000009e0220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b051001970000000306000039000000000106041a0000008b02100197000000000225004b000001e80000c13d0000000202000039000000000302041a0000008c04300197000000000454019f000000000042041b0000008c01100197000000000016041b0000008b01300197000000800010043f000100000005001d000000a00050043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c70000800d020000390000000103000039000000a1040000410224021a0000040f0000000101200190000001e60000613d0000000301000039000000000101041a0000008b01100197000000400200043d0000002003200039000000000013043500000001010000290000000000120435000000400100043d000000000212004900000040022000390000008a0320009c0000008a0200804100000060022002100000008a0310009c0000008a010080410000004001100210000000000112019f00000000020004140000008a0320009c0000008a02008041000000c002200210000000000121019f00000099011001c70000800d0200003900000001030000390000009b04000041000001e20000013d000000900620009c000001a90000613d000000910220009c000001050000c13d0000000001000416000000000101004b000001e60000c13d000000000100041a000001890000013d0000001f0640018f0000000202000039000000000202041a0000008b0220019700000005074002720000000507700210000001120000613d0000008008700039000000000903034f000000009a09043c0000000005a50436000000000a85004b0000010e0000c13d000000000506004b000001200000613d000000000373034f00000003056002100000008006700039000000000706043300000000075701cf000000000757022f000000000303043b0000010005500089000000000353022f00000000035301cf000000000373019f0000000000360435000000400500043d0000000003000414000000040620008c000001270000c13d000000010200003900000000030000310000013b0000013d000000000154004900000080011000390000008a0410009c0000008a0100804100000060011002100000008a0450009c0000008a050080410000004004500210000000000141019f0000008a0430009c0000008a03008041000000c003300210000000000131019f0224021f0000040f000000010220018f000000000301001900000060033002700000008a0030019d0000008a03300197000000400500043d000000000403004b0000001f0430018f00000005063002700000015d0000613d0000003f07300039000000a2077001970000000007570019000000400070043f0000000005350436000000000706004b00000005076002100000014e0000613d0000000008750019000000000901034f000000000a050019000000009b09043c000000000aba0436000000000b8a004b0000014a0000c13d000000000804004b0000015c0000613d000000000871034f00000000057500190000000307400210000000000905043300000000097901cf000000000979022f000000000808043b0000010007700089000000000878022f00000000077801cf000000000797019f0000000000750435000000400500043d000000000706004b0000000506600210000001670000613d0000000007650019000000000801034f0000000009050019000000008a08043c0000000009a90436000000000a79004b000001630000c13d000000000704004b000001750000613d000000000161034f00000000066500190000000304400210000000000706043300000000074701cf000000000747022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000171019f00000000001604350000008a0130009c0000008a0300804100000060013002100000008a0350009c0000008a050080410000004003500210000000000113019f000000000202004b000000980000613d000000bb0000013d0000000001000416000000000101004b000001e60000c13d0000000101000039000001880000013d0000000001000416000000000101004b000001e60000c13d0000000301000039000000000101041a0000008b01100197000000800010043f0000009401000041000002250001042e000000240140008a000000a30110009c000001e60000213d0000000001000416000000000101004b000001e60000c13d000000000100041a0000000002000411000000000112013f0000008b01100198000001f70000c13d0000000401300370000000000101043b0000008b011001970000000103000039000000000203041a0000008c04200197000000000414019f000000000043041b0000008b02200197000000800020043f000000a00010043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c7000001e00000013d0000000001000416000000000101004b000001e60000c13d00000000010004110000008b041001970000000103000039000000000103041a0000008b02100197000000000224004b000001ff0000c13d000000000200041a0000008c03200197000000000343019f000000000030041b0000008c011001970000000103000039000000000013041b0000008b01200197000000800010043f000100000004001d000000a00040043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000097011001c70000800d0200003900000098040000410224021a0000040f0000000101200190000001e60000613d0000000103000039000000000103041a0000008b01100197000000400200043d0000002004200039000000000014043500000001010000290000000000120435000000400100043d000000000212004900000040022000390000008a0420009c0000008a0200804100000060022002100000008a0410009c0000008a010080410000004001100210000000000112019f00000000020004140000008a0420009c0000008a02008041000000c002200210000000000121019f00000099011001c70000800d020000390000009a040000410224021a0000040f000000010120019000000000030000190000020d0000c13d000000000100001900000226000104300000000101000039000000800010043f000000a00010043f0000000003010019000000c00000043f0000000001000414000002030000013d0000000101000039000000800010043f00000000030100190000000301000039000000a00010043f000000c00000043f0000000001000414000002030000013d0000000101000039000000800010043f00000000030100190000000201000039000000a00010043f000000c00000043f0000000001000414000002030000013d000000800030043f000000a00000043f000000c00000043f00000000010004140000008a0210009c0000008a01008041000000c00110021000000095011001c70000800d0200003900000096040000410224021a0000040f00000001030000390000000101200190000001e60000613d000000400100043d0000000000310435000000400200043d000000000121004900000020011000390000008a0310009c0000008a0100804100000060011002100000008a0320009c0000008a020080410000004002200210000000000121019f000002250001042e0000021d002104210000000102000039000000000001042d0000000002000019000000000001042d00000222002104250000000102000039000000000001042d0000000002000019000000000001042d0000022400000432000002250001042e0000022600010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000200000000000000000000000000000040000001000000000000000000de0368b20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9c714f100000000000000000000000000000000000000000000000000000000e9c714f200000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000000000000000000000de0368b200000000000000000000000000000000000000000000000000000000e992a0410000000000000000000000000000000000000020000000800000000000000000020000000000000000000000000000000000006000000080000000000000000045b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa00200000000000000000000000000000000000040000000800000000000000000f9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc0200000000000000000000000000000000000000000000000000000000000000ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9e945ccee5d701fc83f9b8aa8ca94ea4219ec1fcbd4f4cab4f0ea57c5c3e1d81500000000000000000000000000000000000000000000000000000000b71d1a0b00000000000000000000000000000000000000000000000000000000b71d1a0c00000000000000000000000000000000000000000000000000000000c1e803340000000000000000000000000000000000000000000000000000000026782247000000000000000000000000000000000000000000000000000000005c60da1bd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97affffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdf4c164be905e99014aecfbf4a36920bfdfcf20ef63554cd6d4c452c5925f0998d" + ] +} diff --git a/deployments/zksyncsepolia/XVSVaultProxy_Implementation.json b/deployments/zksyncsepolia/XVSVaultProxy_Implementation.json new file mode 100644 index 000000000..dc8bbaaab --- /dev/null +++ b/deployments/zksyncsepolia/XVSVaultProxy_Implementation.json @@ -0,0 +1,2647 @@ +{ + "address": "0x553d7bd61c4D9E1c23bcdcCA49e859a77FE6aa67", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChangedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChangedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ExecutedWithdrawal", + "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": "contract IPrime", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IPrime", + "name": "newPrimeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldPrimeRewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPrimeRewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldPrimePoolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPrimePoolId", + "type": "uint256" + } + ], + "name": "NewPrimeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoints", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardPerBlockOrSecond", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" + } + ], + "name": "PoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldAllocPoints", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAllocPoints", + "type": "uint256" + } + ], + "name": "PoolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RequestedWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldReward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReward", + "type": "uint256" + } + ], + "name": "RewardAmountUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldXvs", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldStore", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newXvs", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStore", + "type": "address" + } + ], + "name": "StoreUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldOwedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newOwedAmount", + "type": "uint256" + } + ], + "name": "VaultDebtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "VaultPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "VaultResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPeriod", + "type": "uint256" + } + ], + "name": "WithdrawalLockingPeriodUpdated", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_LOCK_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SECONDS_PER_YEAR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract XVSVaultProxy", + "name": "xvsVaultProxy", + "type": "address" + } + ], + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV5", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardPerBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockPeriod", + "type": "uint256" + } + ], + "name": "add", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlockOrSecond", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "executeWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getEligibleWithdrawalAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "withdrawalAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumberOrSecond", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getRequestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingWithdrawals", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getWithdrawalRequests", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "lockedUntil", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "afterUpgrade", + "type": "uint128" + } + ], + "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bool", + "name": "timeBased_", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "blocksPerYear_", + "type": "uint256" + } + ], + "name": "initializeTimeManager", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isStakedToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingRewardTransfers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingWithdrawalsBeforeUpgrade", + "outputs": [ + { + "internalType": "uint256", + "name": "beforeUpgradeWithdrawalAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingXVSVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfos", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardPerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primePoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primeRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primeToken", + "outputs": [ + { + "internalType": "contract IPrime", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "requestWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + } + ], + "name": "set", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "setAccessControl", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract IPrime", + "name": "_primeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_primeRewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_primePoolId", + "type": "uint256" + } + ], + "name": "setPrimeToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardAmount", + "type": "uint256" + } + ], + "name": "setRewardAmountPerBlockOrSecond", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newPeriod", + "type": "uint256" + } + ], + "name": "setWithdrawalLockingPeriod", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_xvs", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsStore", + "type": "address" + } + ], + "name": "setXvsStore", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalAllocPoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "totalPendingWithdrawals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vaultPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsStore", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x1a9170a9ae2eba8ab86aa39bad58f22e99ece502fde751701c8f871626545ad8", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x553d7bd61c4D9E1c23bcdcCA49e859a77FE6aa67", + "transactionIndex": 0, + "gasUsed": "5939567", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x45e2cc9dd52fd267bf06d87c188ab99fa53bd69b546ce90137743d093fa9125e", + "transactionHash": "0x1a9170a9ae2eba8ab86aa39bad58f22e99ece502fde751701c8f871626545ad8", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3545779, + "transactionHash": "0x1a9170a9ae2eba8ab86aa39bad58f22e99ece502fde751701c8f871626545ad8", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x00000000000000000000000000000000000000000000000000069d5e111f1400", + "logIndex": 0, + "blockHash": "0x45e2cc9dd52fd267bf06d87c188ab99fa53bd69b546ce90137743d093fa9125e" + }, + { + "transactionIndex": 0, + "blockNumber": 3545779, + "transactionHash": "0x1a9170a9ae2eba8ab86aa39bad58f22e99ece502fde751701c8f871626545ad8", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000000443de40bccf94", + "logIndex": 1, + "blockHash": "0x45e2cc9dd52fd267bf06d87c188ab99fa53bd69b546ce90137743d093fa9125e" + }, + { + "transactionIndex": 0, + "blockNumber": 3545779, + "transactionHash": "0x1a9170a9ae2eba8ab86aa39bad58f22e99ece502fde751701c8f871626545ad8", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010010b735df407ba304b440080884ef652984df70cdd55a8fc955459e7d6d89", + "0x000000000000000000000000553d7bd61c4d9e1c23bcdcca49e859a77fe6aa67" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x45e2cc9dd52fd267bf06d87c188ab99fa53bd69b546ce90137743d093fa9125e" + }, + { + "transactionIndex": 0, + "blockNumber": 3545779, + "transactionHash": "0x1a9170a9ae2eba8ab86aa39bad58f22e99ece502fde751701c8f871626545ad8", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x0000000000000000000000000000000000000000000000000000d9bb2f2f3a4a", + "logIndex": 3, + "blockHash": "0x45e2cc9dd52fd267bf06d87c188ab99fa53bd69b546ce90137743d093fa9125e" + } + ], + "blockNumber": 3545779, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "44f09e5a32172287e0699190adfae104", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.b9534989\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChangedV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChangedV2\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ExecutedWithdrawal\",\"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\":\"contract IPrime\",\"name\":\"oldPrimeToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"contract IPrime\",\"name\":\"newPrimeToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPrimeRewardToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPrimeRewardToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPrimePoolId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPrimePoolId\",\"type\":\"uint256\"}],\"name\":\"NewPrimeToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"allocPoints\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rewardPerBlockOrSecond\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lockPeriod\",\"type\":\"uint256\"}],\"name\":\"PoolAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldAllocPoints\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAllocPoints\",\"type\":\"uint256\"}],\"name\":\"PoolUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"RequestedWithdrawal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"}],\"name\":\"RewardAmountUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldXvs\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldStore\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newXvs\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newStore\",\"type\":\"address\"}],\"name\":\"StoreUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"userAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldOwedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newOwedAmount\",\"type\":\"uint256\"}],\"name\":\"VaultDebtUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"VaultPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"VaultResumed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"pid\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldPeriod\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPeriod\",\"type\":\"uint256\"}],\"name\":\"WithdrawalLockingPeriodUpdated\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DELEGATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOMAIN_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"MAX_LOCK_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"SECONDS_PER_YEAR\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract XVSVaultProxy\",\"name\":\"xvsVaultProxy\",\"type\":\"address\"}],\"name\":\"_become\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV5\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"contract IBEP20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rewardPerBlockOrSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_lockPeriod\",\"type\":\"uint256\"}],\"name\":\"add\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksOrSecondsPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"name\":\"checkpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fromBlockOrSecond\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"votes\",\"type\":\"uint96\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"claim\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"executeWithdrawal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getBlockNumberOrTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getCurrentVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getEligibleWithdrawalAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"withdrawalAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumberOrSecond\",\"type\":\"uint256\"}],\"name\":\"getPriorVotes\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getRequestedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getUserInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pendingWithdrawals\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"getWithdrawalRequests\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"lockedUntil\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"afterUpgrade\",\"type\":\"uint128\"}],\"internalType\":\"struct XVSVaultStorageV1.WithdrawalRequest[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bool\",\"name\":\"timeBased_\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"blocksPerYear_\",\"type\":\"uint256\"}],\"name\":\"initializeTimeManager\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isStakedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isTimeBased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"numCheckpoints\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"pendingRewardTransfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_user\",\"type\":\"address\"}],\"name\":\"pendingWithdrawalsBeforeUpgrade\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"beforeUpgradeWithdrawalAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"pendingXVSVaultImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"poolInfos\",\"outputs\":[{\"internalType\":\"contract IBEP20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allocPoint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastRewardBlockOrSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"accRewardPerShare\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockPeriod\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"}],\"name\":\"poolLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"primePoolId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"primeRewardToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"primeToken\",\"outputs\":[{\"internalType\":\"contract IPrime\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"resume\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"}],\"name\":\"rewardTokenAmountsPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardTokenAmountsPerBlockOrSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_allocPoint\",\"type\":\"uint256\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"setAccessControl\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contract IPrime\",\"name\":\"_primeToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_primeRewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_primePoolId\",\"type\":\"uint256\"}],\"name\":\"setPrimeToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_rewardAmount\",\"type\":\"uint256\"}],\"name\":\"setRewardAmountPerBlockOrSecond\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_newPeriod\",\"type\":\"uint256\"}],\"name\":\"setWithdrawalLockingPeriod\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_xvs\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_xvsStore\",\"type\":\"address\"}],\"name\":\"setXvsStore\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"totalAllocPoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"totalPendingWithdrawals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pid\",\"type\":\"uint256\"}],\"name\":\"updatePool\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"vaultPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"xvsAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"xvsStore\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"add(address,uint256,address,uint256,uint256)\":{\"details\":\"This vault DOES NOT support deflationary tokens \\u2014 it expects that the amount of transferred tokens would equal the actually deposited amount. In practice this means that this vault DOES NOT support USDT and similar tokens (that do not provide these guarantees).\",\"params\":{\"_allocPoint\":\"Number of allocation points assigned to this pool\",\"_lockPeriod\":\"A period between withdrawal request and a moment when it's executable\",\"_rewardPerBlockOrSecond\":\"Initial reward per block or second, in terms of _rewardToken\",\"_rewardToken\":\"Reward token address\",\"_token\":\"Staked token\"}},\"claim(address,address,uint256)\":{\"params\":{\"_account\":\"The account for which to claim rewards\",\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\"}},\"delegate(address)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\"}},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"delegatee\":\"The address to delegate votes to\",\"expiry\":\"The time at which to expire the signature\",\"nonce\":\"The contract state required to match the signature\",\"r\":\"Half of the ECDSA signature pair\",\"s\":\"Half of the ECDSA signature pair\",\"v\":\"The recovery byte of the signature\"}},\"deposit(address,uint256,uint256)\":{\"params\":{\"_amount\":\"The amount to deposit to vault\",\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\"}},\"executeWithdrawal(address,uint256)\":{\"params\":{\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\"}},\"getBlockNumberOrTimestamp()\":{\"details\":\"Function to simply retrieve block number or block timestamp\",\"return\":\"Current block number or block timestamp\"},\"getCurrentVotes(address)\":{\"params\":{\"account\":\"The address to get votes balance\"},\"return\":\"The number of current votes for `account`\"},\"getEligibleWithdrawalAmount(address,uint256,address)\":{\"params\":{\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\",\"_user\":\"The User Address\"},\"return\":\"withdrawalAmount Amount that the user can withdraw\"},\"getPriorVotes(address,uint256)\":{\"params\":{\"account\":\"The address of the account to check\",\"blockNumberOrSecond\":\"The block number or second to get the vote balance at\"},\"return\":\"The balance that user staked\"},\"getRequestedAmount(address,uint256,address)\":{\"params\":{\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\",\"_user\":\"The User Address\"},\"return\":\"Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\"},\"getUserInfo(address,uint256,address)\":{\"params\":{\"_pid\":\"Pool index\",\"_rewardToken\":\"Reward token address\",\"_user\":\"User address\"},\"return\":\"amount Deposited amountrewardDebt Reward debt (technical value used to track past payouts)pendingWithdrawals Requested but not yet executed withdrawals\"},\"getWithdrawalRequests(address,uint256,address)\":{\"params\":{\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\",\"_user\":\"The User Address\"},\"return\":\"An array of withdrawal requests\"},\"initializeTimeManager(bool,uint256)\":{\"details\":\"Initializes the contract to use either blocks or seconds\",\"params\":{\"blocksPerYear_\":\"The number of blocks per year\",\"timeBased_\":\"A boolean indicating whether the contract is based on time or block If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\"}},\"pendingReward(address,uint256,address)\":{\"params\":{\"_pid\":\"Pool index\",\"_rewardToken\":\"Reward token address\",\"_user\":\"User address\"},\"return\":\"Reward the user is eligible for in this pool, in terms of _rewardToken\"},\"pendingWithdrawalsBeforeUpgrade(address,uint256,address)\":{\"params\":{\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\",\"_user\":\"The address of the user\"},\"return\":\"beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\"},\"poolLength(address)\":{\"params\":{\"rewardToken\":\"Reward token address\"},\"return\":\"Number of pools that distribute the specified token as a reward\"},\"requestWithdrawal(address,uint256,uint256)\":{\"params\":{\"_amount\":\"The amount to withdraw from the vault\",\"_pid\":\"The Pool Index\",\"_rewardToken\":\"The Reward Token Address\"}},\"rewardTokenAmountsPerBlock(address)\":{\"params\":{\"_rewardToken\":\"Reward token address\"},\"return\":\"Number of reward tokens created per block or second\"},\"set(address,uint256,uint256)\":{\"params\":{\"_allocPoint\":\"Number of allocation points assigned to this pool\",\"_pid\":\"Pool index\",\"_rewardToken\":\"Reward token address\"}},\"setAccessControl(address)\":{\"details\":\"Admin function to set the access control address\",\"params\":{\"newAccessControlAddress\":\"New address for the access control\"}},\"setPrimeToken(address,address,uint256)\":{\"params\":{\"_primePoolId\":\"pool id for reward\",\"_primeRewardToken\":\"address of reward token\",\"_primeToken\":\"address of the prime token contract\"}},\"setRewardAmountPerBlockOrSecond(address,uint256)\":{\"params\":{\"_rewardAmount\":\"Number of allocation points assigned to this pool\",\"_rewardToken\":\"Reward token address\"}},\"setWithdrawalLockingPeriod(address,uint256,uint256)\":{\"params\":{\"_newPeriod\":\"New lock period\",\"_pid\":\"Pool index\",\"_rewardToken\":\"Reward token address\"}},\"updatePool(address,uint256)\":{\"params\":{\"_pid\":\"Pool index\",\"_rewardToken\":\"Reward token address\"}}},\"title\":\"XVS Vault\"},\"userdoc\":{\"methods\":{\"_become(address)\":{\"notice\":\"* Admin Functions **\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"add(address,uint256,address,uint256,uint256)\":{\"notice\":\"Add a new token pool\"},\"claim(address,address,uint256)\":{\"notice\":\"Claim rewards for pool\"},\"constructor\":\"XVSVault constructor\",\"delegate(address)\":{\"notice\":\"Delegate votes from `msg.sender` to `delegatee`\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Delegates votes from signatory to `delegatee`\"},\"deposit(address,uint256,uint256)\":{\"notice\":\"Deposit XVSVault for XVS allocation\"},\"executeWithdrawal(address,uint256)\":{\"notice\":\"Execute withdrawal to XVSVault for XVS allocation\"},\"getCurrentVotes(address)\":{\"notice\":\"Gets the current votes balance for `account`\"},\"getEligibleWithdrawalAmount(address,uint256,address)\":{\"notice\":\"Get unlocked withdrawal amount\"},\"getPriorVotes(address,uint256)\":{\"notice\":\"Determine the xvs stake balance for an account\"},\"getRequestedAmount(address,uint256,address)\":{\"notice\":\"Get requested amount\"},\"getUserInfo(address,uint256,address)\":{\"notice\":\"Get user info with reward token address and pid\"},\"getWithdrawalRequests(address,uint256,address)\":{\"notice\":\"Returns the array of withdrawal requests that have not been executed yet\"},\"pause()\":{\"notice\":\"Pauses vault\"},\"pendingReward(address,uint256,address)\":{\"notice\":\"View function to see pending XVSs on frontend\"},\"pendingWithdrawalsBeforeUpgrade(address,uint256,address)\":{\"notice\":\"Gets the total pending withdrawal amount of a user before upgrade\"},\"poolLength(address)\":{\"notice\":\"Returns the number of pools with the specified reward token\"},\"requestWithdrawal(address,uint256,uint256)\":{\"notice\":\"Request withdrawal to XVSVault for XVS allocation\"},\"resume()\":{\"notice\":\"Resume vault\"},\"rewardTokenAmountsPerBlock(address)\":{\"notice\":\"Returns the number of reward tokens created per block or second\"},\"set(address,uint256,uint256)\":{\"notice\":\"Update the given pool's reward allocation point\"},\"setAccessControl(address)\":{\"notice\":\"Sets the address of the access control of this contract\"},\"setPrimeToken(address,address,uint256)\":{\"notice\":\"Sets the address of the prime token contract\"},\"setRewardAmountPerBlockOrSecond(address,uint256)\":{\"notice\":\"Update the given reward token's amount per block or second\"},\"setWithdrawalLockingPeriod(address,uint256,uint256)\":{\"notice\":\"Update the lock period after which a requested withdrawal can be executed\"},\"updatePool(address,uint256)\":{\"notice\":\"Update reward variables of the given pool to be up-to-date\"}},\"notice\":\"The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\"}},\"settings\":{\"compilationTarget\":{\"contracts/XVSVault/XVSVault.sol\":\"XVSVault\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\":{\"keccak256\":\"0x4b724928650b944935bc91713782a8cf5bbd9cdb98b3e3fedf31e611c7e6df19\",\"urls\":[\"bzz-raw://63539a3c7dfa2d00498d288d0239d1cf5c34252998cd7086c92caf1920ec3b04\",\"dweb:/ipfs/QmSyfv9PvpBGTFGzZVHCAYxHCNoeHBaFPYFsDGGV8i3FZz\"]},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\":{\"keccak256\":\"0x3563db4c75f7aa0b8a982bab591907dda192438a2368511b62a9c587a3e54226\",\"urls\":[\"bzz-raw://909fce56705c50c12b0cc4583caea97b97d7a31216c08681a0c5190ec3a996b4\",\"dweb:/ipfs/Qmd9Xfrk53zNDCmt1CUk6PqdZjPHe67ECYNL9FwpBYtEgf\"]},\"@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol\":{\"keccak256\":\"0x0d35813e9a6d4fe7cf466466573ca12b6b378cad8f6da0b36b13e0d428a757f0\",\"urls\":[\"bzz-raw://8dde1bb08d2d9b76d9c9a21c1e050b7c2c5a123ddf6888e5dc8c8927cdd1af17\",\"dweb:/ipfs/QmQVPsp3tuqpiNtRSkjr7H7N3sFwW9W2eSvfTBFcBDYZHW\"]},\"contracts/Tokens/Prime/IPrime.sol\":{\"keccak256\":\"0x58861c0c05b8757f1a5d50b107eff479c8680878e6aa51bc93af420caf73f500\",\"urls\":[\"bzz-raw://24d9dc4fc1b4f74df60329f42b3d1c904c02c2164257496959582400b820ec31\",\"dweb:/ipfs/Qmf7SJNV34KqiJ6dibiHv4oWDB9gd9jTpomYngBnDTLLRc\"]},\"contracts/Utils/Address.sol\":{\"keccak256\":\"0x3c2ef780599a2ae6913282b982633f07e405a4a9c8511590df571e2b773aef9d\",\"urls\":[\"bzz-raw://a771f035082a019892582d2c304e00bdb054d904cf7889eb6aa28e515b12c54e\",\"dweb:/ipfs/QmZr6j1hHr6wLdmU9PujaaNvDraYSN2fpNWyDrVChCSJSW\"]},\"contracts/Utils/ECDSA.sol\":{\"keccak256\":\"0xf27d7ad488b72c627370afa6e9acc520d4834a082363d1dc46b5573ac40a2d0a\",\"urls\":[\"bzz-raw://60141bfbc60f7bb8d3e404388c3beaab374863ba30faa1655d5ccc132d3c41a7\",\"dweb:/ipfs/QmbPFGPZQif3skRKbmh9QaqwVytukSAnztDEBqNtVEt1fR\"]},\"contracts/Utils/IBEP20.sol\":{\"keccak256\":\"0x839b08895eb1ad83502d3631e8e9e3a856d2a8c63c46f070d604af7b26c62c07\",\"urls\":[\"bzz-raw://5908d7afba215ef2350294a7b6220394b25ea51e3e878de8d16be93a5b815153\",\"dweb:/ipfs/QmeDMMMHDZ5jBDUYgTQXpktwjvMv5pvfAYTVjtgrNCEMmj\"]},\"contracts/Utils/SafeBEP20.sol\":{\"keccak256\":\"0x540ef6ddc47232a59d3ab0e95537f7a7d1c8a36f8dba315b010e60c6487bd768\",\"urls\":[\"bzz-raw://7acd695f71c1006c7f17f021381503e99b3baf395f8d8dae8d3829a524679298\",\"dweb:/ipfs/QmVhGHQZxo8J9bGpH9vgTD4px4jdEie3WnbHognBf6ABPP\"]},\"contracts/Utils/SafeCast.sol\":{\"keccak256\":\"0xe6222292bd226980fd73c00eaf3a102c8638777aa3f9c7cd9b0d0fb621da0661\",\"urls\":[\"bzz-raw://07d81c2182085c669c100aa448f68a2d1381ef5eba4416df8da0328f51bbb436\",\"dweb:/ipfs/QmRDquLhAeRCjspUKCeei4hi3XMhE9V8WRsv5qphvQrE3R\"]},\"contracts/Utils/SafeMath.sol\":{\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\",\"urls\":[\"bzz-raw://84233cdf4579e66aeb99788758f8cc750816c15ea495495c4fbb446f74da2469\",\"dweb:/ipfs/QmfPGduxT3Ty4uCcYCppy5E2ED5pwypwoaMrkC98i9Szyq\"]},\"contracts/XVSVault/XVSStore.sol\":{\"keccak256\":\"0x8082f92b13448bd4fa982c93c763439f10fe016a5f3be6d613dfe3cca68501ef\",\"urls\":[\"bzz-raw://1e2d8ee8ab3f170c35c83776b850ed024df7ce2da5fc7ce8bf46caca98fc820d\",\"dweb:/ipfs/QmPD2Q11LUCvdwqoWkiCKEXE621tfVv2pVRmcwxBPxCLS4\"]},\"contracts/XVSVault/XVSVault.sol\":{\"keccak256\":\"0xb60ac3238f6c088bc105fd784fb15e7e8d3e7c8fd14640f1945563c0ecd1a68c\",\"urls\":[\"bzz-raw://e0a5c67edd8dcd7b83ff1915f2856b4f198e7990cf473c76e3f4dd03d167e3ce\",\"dweb:/ipfs/QmUBsmCTYdkPW7Rsm1c2LV34m1gWYGEhMyYpBaEbrMy1F1\"]},\"contracts/XVSVault/XVSVaultErrorReporter.sol\":{\"keccak256\":\"0xa79877a281d024f0d03dbf1842a36a972ee6c1aa36ba93e3d646726d40684a26\",\"urls\":[\"bzz-raw://8b16cb72902db250dc2f43815874664129901d9214ea55bb5ecee0f6a8bb0efd\",\"dweb:/ipfs/QmRUFQV2uS7i7kZNNhZD2aqYCJiFPrEJmEC9Y2f7L2j92E\"]},\"contracts/XVSVault/XVSVaultProxy.sol\":{\"keccak256\":\"0xb39af917833659fe38f2f76924deda420babed8259b27741dc6cb402ade4d124\",\"urls\":[\"bzz-raw://ff79e8d65251827957467bb8d1db0dc298834d51c777f272e19a4ccb358daaee\",\"dweb:/ipfs/QmXf8EVMrgWdc2jL36kDWgie1MbLda8daEPFUbUyiHnsQJ\"]},\"contracts/XVSVault/XVSVaultStorage.sol\":{\"keccak256\":\"0xb09f9295c41bdac1350a3607f2b4ea326cb295a6d08f4145bc33ff87844cd02b\",\"urls\":[\"bzz-raw://aa827450b37c9ca75f3c8cd262cced5cb6b727a3439f5b584a5bb62ba76dd096\",\"dweb:/ipfs/QmZMFNKUnYzd6azYoFgvP24za6D5XCXKRR73Xpgw2Ryc5A\"]}},\"version\":1}", + "solc_version": "0.5.16", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x00040000000000020000000003010019000000600330027000000fc7043001970003000000410355000200000001035500000fc70030019d00000001012001900000000b0000c13d00000000010000193f16001d0000040f0000008001000039000000400010043f0000000001000416000000000101004b0000001b0000c13d000000000100041100000fc801100197000000000200041a00000fc902200197000000000112019f000000000010041b00000020010000390000010000100443000001200000044300000fca0100004100003f170001042e000000000100001900003f180001043000110000000000020000008006000039000000400060043f0000000002000416000000000101004b000000300000613d000000000102004b000000350000c13d000000000100041100000fc801100197000000000200041a00000fc902200197000000000112019f000000000010041b00000020010000390000010000100443000001200000044300000fca0100004100003f170001042e000000000102004b000000350000c13d0000000002000031000000030120008c000000370000213d000000000100001900003f18000104300000000201000367000000000401043b000000e00340027000000fcb0540009c000000d50000813d000010520540009c0000016e0000813d0000107f0540009c0000019a0000813d000010890440009c000002d20000813d000010a20430009c000007460000613d000010a30430009c000006aa0000613d000010a40330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000f0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000502043b0000002401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000b00000005001d000c00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d0000000f0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000900000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000800000001001d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000c0200002900070005202000cd000000000101043b0000000701100029001000000001001d0000000201100039000e00000001001d000000000101041a001100000001001d0000007a01000039000000000101041a000000ff01100190000018030000c13d00000fe30100004100000000001004390000000001000414000018060000013d00000fcc0540009c000001850000813d0000100a0540009c000001ae0000813d0000103a0440009c000002f40000813d0000104a0430009c000007700000613d0000104b0430009c000006df0000613d0000104c0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b000e0fc80020019b00000fc80220009c000000350000213d0000004401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000b00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d0000000e0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b0200002900080005202000cd000000000101043b0000000801100029000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000019fa0000c13d00000fe30100004100000000001004390000000001000414000019fd0000013d000010530540009c000001ef0000813d000010710440009c000003980000813d0000107a0430009c000007aa0000613d0000107b0430009c000007200000613d0000107c0330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d0000001201000039000003bc0000013d00000fcd0540009c000002a90000813d00000ffa0440009c000003a00000813d000010070430009c000007d70000613d000010080430009c000007220000613d000010090330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000000801000039000001ac0000013d000010800440009c000003a80000813d000010860430009c000007d90000613d000010870430009c0000072c0000613d000010880330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000000601000039000000200010043f000009f70000013d0000100b0440009c000003c70000813d000010370430009c000007db0000613d000010380430009c0000072e0000613d000010390330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a001100000001001d00000fc701100198000000000100001900000a860000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000000ff60110019700000a860000013d000010540440009c000004620000813d000010620430009c000007dd0000613d000010630430009c000007300000613d000010640330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000c0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000a00000006001d000b00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000c0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000c0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000800000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000700000001001d0000000c0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000301043b000000000103041a000000000201004b000e00000000001d000d00000000001d000018340000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe80200004100000000002104350000001b0200003900000000002304350000000d040000290010000e0040002d000000100240006b00000000040000190000000104004039000000400200043d0000000104400190000019d80000613d00000fde0400004100000000004204350000000404200039000000200500003900000000005404350000000003030433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b0000029f0000413d000000000134004b0000127f0000a13d0000127d0000013d00000fce0440009c000004a00000813d00000ff20430009c000007e50000613d00000ff30430009c000007440000613d00000ff40330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d00000ff50110009c000000350000813d0000001001000039000000200010043f0000000000200435000000400200003900000000010000193f163ef70000040f000000200010043f00000011010000290000000000100435000000000100001900000040020000393f163ef70000040f000000000101041a00000fc702100197000000800020043f000000200110027000000ff601100197000000a00010043f00000ff70100004100003f170001042e0000108a0430009c000004a80000213d0000108d0430009c000007ef0000613d0000108e0330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000201043b00000fc80120019700000fd60220009c000000350000813d000000000200041a0000000003000411000000000223013f00000fc80220019800000a930000c13d000000000201004b00000c130000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f0000109801000041000000c40010043f0000109901000041000000e40010043f000010060100004100003f18000104300000103b0430009c000004b50000213d0000103e0430009c0000080a0000613d0000103f0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b001000000002001d0000004401100370000000000101043b000f0fc80010019b00000fc80110009c000000350000213d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000100220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000e00000001001d000000110100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c90000000e02200029000000000101043b000c00000001001d000e00000002001d0000000301200039000000000101041a000d00000001001d000000110100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000800000001001d0000000e01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000900000003001d00000004033000390000000000230435000000400200043d000a00000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040220008c000018c70000c13d0000000103000031000018fb0000013d000010720430009c000005030000213d000010750430009c000008450000613d000010760130009c000000350000c13d0000007901000039000009fa0000013d00000ffb0430009c0000051a0000213d00000ffe0430009c0000087b0000613d00000fff0130009c000000350000c13d0000000301000039000008a00000013d000010810430009c000005220000213d000010840430009c0000089f0000613d000010850330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d00000fc80110009c000000350000213d0000001501000039000000200010043f0000000000200435000000400200003900000000010000193f163ef70000040f000000200010043f0000001101000029000000000010043500000000010000190000004002000039000009f90000013d0000100c0430009c000005350000213d0000100f0430009c000008a50000613d000010100330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b00100fc80010019b00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000400300043d0000002002300039000f00000001001d000000000401041a0000000501400210000d00000002001d0000000001120019000000400010043f000c00000003001d0000000000430435000e00000004001d000000000104004b000004450000613d0011000d0000002d001000000000001d0000000f010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000400200043d0000006003200039000000400030043f000000100600002900000001036002100000000001310019000000000301041a00000000033204360000000101100039000000000101041a0000008004100270000000400520003900000000004504350000103101100197000000000013043500000011010000290000000001210436001100000001001d0000000106600039001000000006001d0000000e0160006c000004230000413d000000400100043d000000200200003900000000032104360000000c02000029000000000202043300000000002304350000004001100039000000000302004b0000045f0000613d00000000030000190000000d070000290000000074070434000000006504043400000000055104360000000006060433000010310660019700000000006504350000004004400039000000000404043300001031044001970000004005100039000000000045043500000060011000390000000103300039000000000423004b000004500000413d000000400200043d0000000001210049000004fb0000013d000010550430009c000006640000213d000010580430009c000008dd0000613d000010590330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000500000002001d0000002401100370000000000101043b000600000001001d000000c001000039000000400010043f0000001c01000039000000800010043f0000105e02000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f000001400000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000cb30000c13d000000010300003100000cda0000013d00000fcf0430009c000006a40000213d00000fd20130009c000008e70000613d00000fd30130009c000000350000c13d000000000100041a000008a10000013d0000108b0430009c000008eb0000613d0000108c0130009c000000350000c13d0000101101000041000000800010043f0000101201000041000000a00010043f0000101301000041000000c00010043f00000080010000390000004302000039000007eb0000013d0000103c0430009c0000090c0000613d0000103d0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000501043b000000000105041a000000000201004b001000000000001d000011090000c13d000000400100043d00000010020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f00003f170001042e000010730430009c000009310000613d000010740330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000001102000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000000000101041a00000fc701100197000000800010043f00000fd40100004100003f170001042e00000ffc0130009c000009dc0000613d00000ffd0130009c000000350000c13d0000100001000041000000800010043f00000fd40100004100003f170001042e000010820430009c000009ec0000613d000010830330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000f02000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000008a00000013d0000100d0430009c000009fe0000613d0000100e0330009c000000350000c13d00000fd50320009c000000350000213d000000c30220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000f00000002001d0000002402100370000000000202043b001000000002001d0000006402100370000000000202043b000e00000002001d000001000220008c000000350000813d000000a402100370000000000202043b000d00000002001d0000008401100370000000000101043b000c00000001001d0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000101101000041000000800010043f0000101201000041000000a00010043f0000101301000041000000c00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001014011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000b00000001001d000000c001000039000000400010043f0000000801000039000000800010043f0000101501000041000000a00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001016011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d00001017010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000400300043d0000006002300039000000000012043500000040013000390000000a02000029000000000021043500000020013000390000000b020000290000000000210435000000000100041000000fc80110019700000080023000390000000000120435000000400100043d00000000021200490000000002210436000b00000003001d000000a003300039000a00000003001d000000400030043f00000fc70320009c00000fc7020080410000004002200210000000000101043300000fc70310009c00000fc7010080410000006001100210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d00000ff8010000410000000a0200002900000000001204350000000b04000029000000c00140003900000ff9020000410000000000210435000000400300043d0000000001340049000000da0110003900000fc70210009c00000fc701008041000000600110021000000fc70230009c000b00000003001d00000fc70200004100000000020340190000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b040000290000006002400039000000100300002900000000003204350000004002400039000000110300002900000000003204350000002002400039000000000012043500000080014000390000000f020000290000000000210435000000400200043d00000000012100490000000001120436000000a003400039000000400030043f00000fc70310009c00000fc7010080410000004001100210000000000202043300000fc70320009c00000fc7020080410000006002200210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b04000029000000c00240003900001018030000410000000000320435000000c20240003900000009030000290000000000320435000000e2024000390000000000120435000000400100043d000000000212004900000000022104360000010203400039000000400030043f00000fc70320009c00000fc7020080410000004002200210000000000101043300000fc70310009c00000fc7010080410000006001100210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000400200043d000000000101043b0000000d03000029000010190330009c000014dd0000813d0000000e03000029000000ff0330018f0000001b0430008a000000010440008c000016520000213d0000000004020436000000400040043f00000080052000390000000d06000029000000000065043500000060052000390000000c060000290000000000650435000000400520003900000000003504350000000000140435000000400300043d000e00000003001d0000000001320049000000a00110003900000fc70210009c00000fc701008041000000600110021000000fc70230009c00000fc70200004100000000020340190000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000001020000393f163f110000040f0000000e03000029000000200430008a0000000003010019000000600330027000000fc703300197000000200530008c000000200600003900000000060340190000001f0560018f0000000506600272000006490000613d0000002007400039000000000801034f0000000009040019000000008a08043c0000000009a90436000000000a79004b000006450000c13d000000000705004b000006580000613d0000000506600210000000000761034f00000000046400190000000305500210000000000604043300000000065601cf000000000656022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000565019f0000000000540435000100000003001f00030000000103550000000102200190000019250000613d000000400100043d000000200210008a0000000002020433000c0fc80020019c00001bfb0000c13d00000044021000390000103003000041000012850000013d000010560430009c00000a0d0000613d000010570330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002401100370000000000201043b0000001301000039000000000101041a000000ff0110019000000bc30000c13d001000000002001d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000100220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c9000000000101043b0000000001210019000e00000001001d0000000201100039000d00000001001d000000000101041a000f00000001001d0000007a01000039000000000101041a000000ff01100190000011630000c13d00000fe30100004100000000001004390000000001000414000011660000013d00000fd00430009c00000a370000613d00000fd10130009c000000350000c13d0000001601000039000008a00000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000701000039000000200010043f000000400200003900000000010000193f163ef70000040f00000011020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f00000010020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f0000000201100039000000000101041a00000a860000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000701000039000000200010043f000000400200003900000000010000193f163ef70000040f00000011020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f00000010020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f0000000102100039000000000202041a000000000301041a0000000201100039000000000101041a000000400400043d00000040054000390000000000150435000000200140003900000000002104350000000000340435000000400100043d0000000002140049000000600220003900000a8b0000013d0000000201000039000008a00000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000602000039000009f50000013d0000000101000039000008a00000013d0000004701000039000008a00000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000101043b000d00000001001d0000007a01000039000000000101041a000000ff0110019000000a9d0000c13d00000fe3010000410000000000100439000000000100041400000aa00000013d0000001801000039000009fa0000013d000000c001000039000000400010043f0000000801000039000000800010043f000010b002000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197001000000004001d000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f0000012c0000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000b130000c13d000000010300003100000b3a0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d0000000801000039000000200010043f0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000200200003900000000010000193f163ef70000040f000000110200002900000005322000c900000000012100190000000102100039000000000202041a0000000203100039000000000303041a0000000304100039000000000404041a000000000501041a0000000401100039000000000101041a000000400600043d0000008007600039000000000017043500000060016000390000000000410435000000400160003900000000003104350000002001600039000000000021043500000fc8015001970000000000160435000000400100043d0000000002160049000000a00220003900000a8b0000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b000d0fc80010019b00000fd60110009c000000350000813d0000001301000039000000000101041a000000ff0110019000000bc30000c13d000000000100041100000fc801100197000c00000001001d00000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000b0fc80010019b0000000501000039000000000101041a00000fc80110019800000c2e0000c13d000000400100043d00000064021000390000107d03000041000000000032043500000044021000390000107e0300004100000000003204350000002402100039000000300300003900000bd60000013d0000007a01000039000007de0000013d0000000401000039000008a00000013d0000001701000039000008a00000013d0000001301000039000000000101041a000000ff011001900000000001000019000000010100c039000000800010043f00000fd40100004100003f170001042e00000ff801000041000000800010043f00000ff901000041000000a00010043f00000080010000390000003a020000393f163ef70000040f000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000f0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000502043b0000002401100370000000000401043b0000000301000039000000000201041a0000104d0320019800000ba10000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000000a01000039000000a40010043f000010ae01000041000000c40010043f000010030100004100003f180001043000000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000e00000002001d0000002401100370000000000101043b000f00000001001d000000e001000039000000400010043f0000003301000039000000800010043f0000104502000041000000a00020043f0000104603000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001770000043f00000fda01000041000000000010043900000fc801400197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040320008c00000e770000c13d000000010300003100000e9e0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002401100370000000000301043b00000fc80130019700000fc80330009c000000350000213d000000000300041a0000000004000411000000000334013f00000fc80330019800000a930000c13d000000000302004b00000ca90000613d000000000301004b00000ca90000613d0000000503000039000000000403041a00000fc805400198000010c40000c13d00000fc904400197000000000424019f0000000405000039000000000605041a000000000043041b00000fc903600197000000000313019f000000000035041b0000000303000039000000000403041a0000104e0440019700000fd6044001c7000000000043041b00000fc803600197000000800000043f000000a00030043f000000c00020043f000000e00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001078011001c70000800d020000390000000103000039000010790400004100000c230000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b00100fc80020019b00000fd60220009c000000350000813d000000000200041a0000000003000411000000000223013f0000004401100370000000000301043b00000fc80120019800000a930000c13d000f00000003001d000000110100006b00000eef0000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000002201000039000000a40010043f0000100401000041000000c40010043f0000100501000041000000e40010043f000010060100004100003f18000104300000000501000039000000000101041a00000fc801100197000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000101043b000600000001001d000000e001000039000000400010043f0000003001000039000000800010043f0000103202000041000000a00020043f0000103303000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001740000043f00000fda01000041000000000010043900000fc801400197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000efb0000c13d000000010300003100000f220000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000e02000039000009f50000013d00000ff101000041000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00110fc80010019b00000fd60110009c000000350000813d0000108f01000041000000800010043f00000fda01000041000000000010043900000011010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00000f540000c13d000000010300003100000f7c0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000300041a0000000004000411000000000434013f0000002401100370000000000301043b00000fc80140019800000a930000c13d0000007a01000039000000000401041a0000ff000540019000000c240000c13d00000000053201a000000e6d0000613d000000000502004b00000fa70000613d000000000503004b00000fa70000613d00000fde01000041000000800010043f0000002001000039000000840010043f000000a40010043f0000104401000041000000c40010043f000010030100004100003f180001043000000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b00100fc80010019b00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a001100000001001d0000000004000019000f00000004001d0000001103000029000000000103004b000012890000613d00110001003000920000001002000029000000000102041a000000110110006b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000e00000001001d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000110300002900000001043002100000000e024000290000000102200039000000000202041a0000103102200197000000000101043b000000000112004b000012890000213d000e00000004001d0000001002000029000000000102041a000000000113004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e01100029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b0400003900000000004204350000000f04300029000000000334004b0000000003000019000000010300403900000001033001900000097c0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000009d20000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110019000000a7a0000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d00000a850000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000902000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000000000101041a000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000001402000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000007de0000013d000000c001000039000000400010043f0000000701000039000000800010043f0000105a02000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197001000000004001d000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f0000012b0000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000b550000c13d000000010300003100000b7c0000013d00000fd50320009c000000350000213d000000a30220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b000500000002001d0000004402100370000000000202043b000a0fc80020019b00000fd60220009c000000350000813d0000008402100370000000000202043b000300000002001d0000006401100370000000000101043b000400000001001d000000e001000039000000400010043f0000002c01000039000000800010043f00000fd702000041000000a00020043f00000fd803000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001700000043f00000fda01000041000000000010043900000fc801400197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00000fcc0000c13d000000010300003100000ff40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000400200043d0000000000120435000000400100043d0000000002120049000000200220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f00003f170001042e00000fde01000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000109501000041000000c40010043f000010030100004100003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d0110006b00000bcd0000813d0000000e0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a00110fc70010019c000000000100001900000a860000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000010220008a001100000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000e0200002900000000002004350000001002000039000000200020043f00000fc7011001970000000d0110006c000012190000a13d000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000000000435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f00000011030000290000000102200190000000350000613d000000000101043b000000000101041a00000fc7011001970000000d0110006c000000000100001900000a860000213d000000000103004b0000000002000019000015910000c13d001100000002001d0000000e0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f0000000001000414000012270000013d00000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000b270000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000b230000c13d000000000604004b00000b360000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000be00000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000001302000039000000000302041a000000ff04300190000010ce0000c13d0000004403100039000010b204000041000000000043043500000024031000390000000000230435000010800000013d00000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000b690000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000b650000c13d000000000604004b00000b780000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000bfa0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000001302000039000000000302041a000000ff04300190000010e20000c13d000010b40330019700000001033001bf000000000032041b00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d0200003900000002030000390000105d04000041000010dc0000013d000b00000005001d000c00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110006b000010790000813d0000000b0100006b000011940000c13d000000400100043d0000004402100039000010a103000041000000000032043500000024021000390000001f030000390000107f0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000000f01000039000000a40010043f000010a501000041000000c40010043f000010030100004100003f1800010430000000400100043d00000064021000390000106e03000041000000000032043500000044021000390000106f03000041000000000032043500000024021000390000002b03000039000000000032043500000fde020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000008401100039000010880000013d0000001f0430018f000000050230027200000bea0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00000be60000c13d000000000504004b00000bf80000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000000050220021000000c040000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00000c000000c13d000000000504004b00000c110000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000004702000039000000000302041a00000fc904300197000000000414019f000000000042041b00000fc802300197000000800020043f000000a00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001096011001c70000800d0200003900000001030000390000109704000041000010dd0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f0000104101000041000000c40010043f000010030100004100003f180001043000000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d000000000101041a000e00000001001d000000000101004b001100000000001d000010e80000c13d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a00000fc9022001970000000d07000029000000000272019f000000000021041b000000400100043d00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d02000039000000040300003900001022040000410000000c050000290000000b060000293f163f0c0000040f0000000101200190000000350000613d0000000b020000290000000d0120006c000010e00000613d000000110100006b000010e00000613d0000000b0100006b000012a50000c13d0000000d0100006b000010e00000613d0000000d0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000f00000001001d000e0fc70010019c001000000000001d000016730000c13d000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b0300003900000000003204350000001004000029000000110340002900110ff60030019b000000110340006b0000193e0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00000c9f0000413d000000000124004b000011e60000a13d000011e40000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001801000039000000a40010043f00000ff001000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000cc70000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000cc30000c13d000000000604004b00000cd60000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000fb20000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000c00000002001d000000060120006b000010790000813d001100000000001d00000d040000013d00000011020000290000000102200039001100000002001d0000000c0120006c000015f80000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff0110019000000d300000613d00000fe1010000410000000000100439000000000100041400000d330000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c00000cff0000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000a00000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c00000d610000c13d000000010300003100000d930000013d00000010040000290000000a03400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c00000020050000390000000005034019000000050450027200000d800000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00000d7c0000c13d0000001f0550019000000d8f0000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f0003000000010355000000010220019000001a2b0000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b000018b00000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b00000dd00000c13d000000000101004b00000dd70000613d00000fe1010000410000000000100439000000000100041400000e610000013d000900000005001d000000000101004b00000ddb0000613d00000fe1010000410000000000100439000000000100041400000dde0000013d00000fe3010000410000000000100439000000000100041400000e610000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000a00000005001d000000000345004b00001a450000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000700000002001d000000000101043b000000000101041a000800000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b030000290000000a04000029000000000234004b000000000200001900000fe6060000410000001a07000039000000080500002900000e2b0000613d0000000002340049000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00000e2a0000613d00000007321000b900000000311200d9000000070110006c00000e2b0000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000000006104350000000000730435000000000405004b00001a5c0000613d000000000125004b000000000300001900000e3b0000213d00000000215200d900000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000009020000290000001005200069000000400100043d0000004002100039000000400020043f0000002002100039000000000062043500000000007104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b00000000050000190000000105004039000000010550019000001a730000c13d000000000034041b0000007a01000039000000000101041a000000ff0110019000000e5e0000613d00000fe1010000410000000000100439000000000100041400000e610000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000cff0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001701000039000000a40010043f0000104201000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c00110021000000fdc011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000e8b0000613d000000000601034f000000006706043c0000000008780436000001000780008c00000e870000c13d000000000604004b00000e9a0000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010160000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000f0220006b000010790000813d0000000e02000029000000010220008a000010470220009c000012dd0000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f0600002900000005326000c900000000011200190000000401100039000000000201041a0000000e04000029000000000041041b000000400100043d000000200310003900000000004304350000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000030300003900001049040000410000001105000029000010dd0000013d000000100100006b000010300000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f0000100201000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c00110021000000fdc011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000f0f0000613d000000000601034f000000006706043c0000000008780436000001000780008c00000f0b0000c13d000000000604004b00000f1e0000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010900000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000003020433000000000203004b0000000002000019000000010200c039000000000223004b000000350000c13d001100240010003d0000000402100039000000000303004b000012010000613d0000000403000039000000000303041a000010340400004100000000004104350000000e010000290000000000120435000000400100043d000f00000001001d00000fda01000041000000000010043900000fc801300197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c000012e40000c13d0000000103000031000013170000013d00000fc70210009c00000fc701008041000000c00110021000001090011001c700000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200000f690000613d0000008006000039000000000701034f000000007807043c0000000006860436000000a00860008c00000f650000c13d000000000604004b00000f780000613d0000000505500210000000000651034f00000003044002100000008005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010aa0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d000000000202043300000fd60320009c000000350000813d0000000003000411000000000223013f001000040010003d00000fc8022001980000120b0000c13d00001093020000410000000000210435000000400100043d000f00000001001d00000fda01000041000000000010043900000011010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000013640000c13d0000000103000031000013970000013d000000000502004b000010000300c0410000007905000039000000000035041b000010b5022001970000104303400197000000000223019f00000100022001bf000000000021041b000000000100001900003f170001042e0000001f0430018f000000050230027200000fbc0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00000fb80000c13d000000000504004b00000fca0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fc70210009c00000fc701008041000000c00110021000000fdc011001c700000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000fe10000613d000000000601034f000000006706043c0000000008780436000001000780008c00000fdd0000c13d000000000604004b00000ff00000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000011e80000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000000e0200006b000012830000613d0000000a0200006b000012830000613d0000000402000039000000000202041a00000fc802200198000013a90000c13d000000440210003900000fef0300004100000bbf0000013d000000440210003900000fdd03000041000000000032043500000024021000390000000c030000390000107f0000013d0000001f0430018f0000000502300272000010200000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000101c0000c13d000000000504004b0000102e0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000100100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000f0110006b000010790000813d0000001601000039000000000101041a0000001702000039000000000202041a0000001803000039000000000303041a000000400400043d00000060054000390000000f0600002900000000006504350000004005400039000000000035043500000020034000390000001005000029000000000053043500000fc8022001970000000000240435000000400200043d0000000003240049000000800330003900000fc70430009c00000fc703008041000000600330021000000fc70420009c00000fc7020080410000004002200210000000000223019f000000000300041400000fc70430009c00000fc703008041000000c003300210000000000232019f00000fc80510019700000fec012001c70000800d020000390000000303000039000010010400004100000011060000293f163f0c0000040f0000000101200190000000350000613d0000001603000039000000000103041a00000fc90110019700000011011001af000000000013041b0000001703000039000000000103041a00000fc90110019700000010011001af000000000013041b0000000f010000290000001802000039000000000012041b000000000100001900003f170001042e000000400100043d0000004402100039000010af03000041000000000032043500000024021000390000001303000039000000000032043500000fde020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d0000000001210049000000640110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f00003f18000104300000001f0430018f00000005023002720000109a0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000010960000c13d000000000504004b000010a80000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000010b40000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000010b00000c13d000000000504004b000010c20000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fde01000041000000800010043f0000002001000039000000840010043f0000001301000039000000a40010043f0000107701000041000000c40010043f000010030100004100003f1800010430000010b403300197000000000032041b00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d020000390000000203000039000010b10400004100000010050000293f163f0c0000040f0000000101200190000000350000613d000000000100001900003f170001042e00000044021000390000105c030000410000000000320435000000240210003900000017030000390000107f0000013d00000000040000190000000f02000029000000000102041a001100000004001d000000000114004b00003c330000813d0000000501000039000000000101041a001000000001001d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110400002900000005324000c9000000000101043b0000000001210019000000000101041a000000100110014f00000fc801100198000012300000613d00000001044000390000000e0140006c0000000f02000029000010ea0000413d001100000000001d00000c410000013d0000000007010019000e00000000001d001000000000001d000f00000005001d000011100000013d000000000207004b000004f50000613d000000010770008a000000000117004b00003c330000813d001100000007001d0000000000500435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011070000290000000102700210000000000101043b00000000022100190000000f05000029000000000105041a0000000103200039000000000303041a0000102a03300197000010400330009c0000113b0000c13d000000000317004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80600004100000000006204350000001b060000390000000000630435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000110e0000613d0000128c0000013d000000000317004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80600004100000000006204350000001b060000390000000000630435001000100040002d000000100440006b0000000004000019000000010400403900000001044001900000110e0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000013b10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000011590000413d000000000214004b000013b10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000f0110006c000010e00000a13d0000000e01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000b00000003001d00000004033000390000000000230435000000400200043d000c00000002001d00000fda02000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c000013b70000c13d0000000103000031000013eb0000013d0000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000a00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000201100039000800000001001d000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000b03400029000000000443004b000000000400001900000001040040390000000104400190000014340000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000011db0000413d000000000124004b000011e60000a13d000000000132001900000000000104350000001f01200039000013b20000013d0000001f0430018f00000005023002720000000502200210000011f20000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000011ee0000c13d000000000504004b000011ff0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fde030000410000000000310435000000200300003900000000003204350000000c0200003900000011030000290000000000230435000000440210003900000fdd03000041000010840000013d00000fde0200004100000000002104350000002002000039000000100300002900000000002304350000006402100039000010910300004100000000003204350000004402100039000010920300004100000000003204350000002402100039000000220300003900000bdb0000013d000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f00000001022001900000001102000029000000350000613d000000000101043b0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000001ea0000013d0000000501000039000000000101041a00000fc80110019700000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a0000000201100039000000000401041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50200004100000000002104350000001e020000390000000000250435000000400200043d000000000643004b000015d40000813d00000fde0300004100000000003204350000000403200039000000200400003900000000004304350000000003050433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000012740000413d000000000134004b0000127f0000a13d000000000123001900000000000104350000001f01300039000010b3011001970000000001210019000013b40000013d000000440210003900000ff0030000410000000000320435000000240210003900000018030000390000107f0000013d000000400100043d0000000f02000029000004f70000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000013b10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000012990000413d000000000214004b000013b10000a13d00000000023100190000000000020435000013b10000013d0000000b0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000f00000001001d000e0fc70010019c001000000000001d000015720000c13d000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c0300003900000000003204350000001004000029000000110340006c0000166b0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000012d30000413d000000000124004b000011e60000a13d000011e40000013d000000400100043d00000044021000390000104803000041000000000032043500000024021000390000001a030000390000107f0000013d0000000f04000029000000110240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013040000613d0000000f080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013000000c13d000000000604004b000013130000613d0000000505500210000000000651034f0000000f055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000143f0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b0000164c0000613d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000c00000001001d000000000101004b00001a8a0000c13d0000000e0100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000604000029000000000041041b000000400100043d000000200310003900000000004304350000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000020300003900001036040000410000000e05000029000010dd0000013d0000000f04000029000000100240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013840000613d0000000f080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013800000c13d000000000604004b000013930000613d0000000505500210000000000651034f0000000f055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000014590000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000202004b000010e00000613d000000440210003900001094030000410000000000320435000000240210003900000015030000390000107f0000013d000000050200006b000014730000c13d000000440210003900000fee03000041000000000032043500000024021000390000001d030000390000107f0000013d0000001f01100039000010b3011001970000000001310019000000400200043d0000000001210049000010880000013d0000000c040000290000000b02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013d80000613d0000000c080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013d40000c13d000000000604004b000013e70000613d0000000505500210000000000651034f0000000c055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000014e30000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000f00000001001d000000110100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435001000000004001d0000000f0340006b000019cc0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000142a0000413d000000000124004b000011e60000a13d000019240000013d0000000901000029000000000101041a000000000131004b000014fd0000813d000000400100043d0000004402100039000010a003000041000000000032043500000024021000390000001b030000390000107f0000013d0000001f0430018f0000000502300272000014490000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000014450000c13d000000000504004b000014570000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000014630000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000145f0000c13d000000000504004b000014710000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000c00000001001d000000000101004b000016920000c13d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000201043b000000000102041a000f00000001001d000000000101004b001000000002001d00001cd80000c13d0000000a0100002900000000001004350000001401000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000ff0110019000001e1f0000c13d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435001100050030002d000000110330006b000000000300001900000001030040390000000103300190000021040000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000014d30000413d000000000124004b000011e60000a13d000019240000013d00000064012000390000101a03000041000000000031043500000044012000390000101b03000041000016570000013d0000001f0430018f0000000502300272000014ed0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000014e90000c13d000000000504004b000014fb0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000700000001001d0000000f0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000000201004b000021360000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000c02000029000e0005202000cd000000000101043b0000000e01100029000d00000001001d0000000201100039000600000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000025d40000c13d00000fe30100004100000000001004390000000001000414000025d70000013d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000012b80000013d001000000000001d000000400100043d0000004002100039000000400020043f0000002002100039000000000002043500000000000104350000000e0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f001000100000002d0000001104000029000000100340006a00001070033001970000000102200190000000350000613d00000001023002700000000002240049000000000101043b000f00000002001d00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c70000801002000039001100000004001d3f163f110000040f00000011050000290000000102200190000000350000613d000000000101043b000000400300043d0000004002300039000000400020043f000000000101041a00000fc7021001970000000003230436000000200110027000000ff60110019700000000001304350000000d04000029000000000342004b00000a860000613d0000000f03000029000000010130008a000000000242004b0000000005018019001100000005001d000000100300802900000fc70230019700000fc701500197000000000121004b001000000003001d000015920000213d00000aff0000013d0000006001200039000000400010043f00000040012000390000101f05000041000000000051043500000028010000390000000001120436000010200500004100000000005104350000000003430049001100000003001d000010210330009c00000c410000413d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000015ee0000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000060110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000060200002900000005322000c9000f00010020003d0000000f01100029000000000101041a001000000001001d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400400043d0000004001400039000000400010043f000000200140003900000fe50200004100000000002104350000001e020000390000000000240435000000400200043d000000100530006c00001f860000813d00000fde0300004100000000003204350000000403200039000000200500003900000000005304350000000003040433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000016420000413d000000000134004b0000127f0000a13d0000127d0000013d000000440210003900001035030000410000000000320435000000240210003900000014030000390000107f0000013d00000064012000390000101a03000041000000000031043500000044012000390000101c03000041000000000031043500000024012000390000002203000039000000000031043500000fde010000410000000000120435000000040120003900000020030000390000000000310435000000400100043d0000000002120049000000840220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f00003f18000104300000007a01000039000000000101041a000000ff01100190000019460000c13d00000fe30100004100000000001004390000000001000414000019490000013d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b00000c820000013d001100000000001d000016a70000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000011020000290000000102200039001100000002001d0000000c0120006c000014850000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000016d30000613d00000fe10100004100000000001004390000000001000414000016d60000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c000016a20000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000900000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c000017040000c13d0000000103000031000017360000013d00000010040000290000000903400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000000504500272000017230000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000171f0000c13d0000001f05500190000017320000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000102200190000020990000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b00001f6f0000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b000017730000c13d000000000101004b000016940000613d00000fe10100004100000000001004390000000001000414000016970000013d000700000005001d000000000101004b0000177a0000613d00000fe101000041000000000010043900000000010004140000177d0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000900000005001d000000000345004b000020bf0000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000600000002001d000000000101043b000000000101041a000800000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000009030000290000000b0230006c0000000002000019000017c70000613d00000009030000290000000b0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000017c60000613d00000006321000b900000000311200d9000000060110006c000017c70000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a0400003900000000004304350000000805000029000000000405004b000020d60000613d000000000125004b0000000003000019000017da0000213d00000008212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000007020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe60400004100000000004204350000001a0200003900000000002104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b000000000500001900000001050040390000000105500190000020ed0000c13d000000000034041b0000007a01000039000000000101041a000000ff01100190000017ff0000613d00000fe10100004100000000001004390000000001000414000016970000013d00000fe30100004100000000001004390000000001000414000016970000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000110110006c000026350000a13d0000001001000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000600000003001d00000004033000390000000000230435000000400200043d000d00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00001ef20000c13d000000010300003100001f260000013d0000000004010019000d00000000001d000e00000000001d001000000003001d000000010440008a000000000114004b00003c330000813d001100000004001d0000000000300435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000110300002900000001043002100000000f024000290000000102200039000000000202041a0000103102200197000000000101043b000000000112004b000002830000213d000f00000004001d0000001002000029000000000102041a000000000113004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f011000290000001005000029000000000305041a0000000102100039000000000202041a0000102a02200197000010400220009c000f00000003001d000018870000c13d000000110230006b00003c330000813d000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000d000d0030002d0000000d0330006b000000000300001900000001030040390000000103300190000018980000613d00001faa0000013d000000110230006b00003c330000813d000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000e000e0030002d0000000e0330006b00000000030000190000000103004039000000010330019000001fc10000c13d0000000000500435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000201043b0000000f01000029000000010110008a00000001031002100000000002320019000000000002041b0000000102200039000000000002041b0000001003000029000000000013041b0000001104000029000000000204004b000018380000c13d000002830000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000018bd0000413d000000000124004b000011e60000a13d000011e40000013d0000000a040000290000000902400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000b020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000018e80000613d0000000a080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000018e40000c13d000000000604004b000018f70000613d0000000505500210000000000651034f0000000a055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000001c270000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d00000000040104330000004001200039000000400010043f0000001e01000039000000000112043600000fe5030000410000000000310435000b00000004001d000000080340006c00001cf40000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000191b0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f000000050230027200000005022002100000192f0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b0000192b0000c13d000000000504004b0000193c0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000007a01000039000000000101041a000000ff0110019000001c410000c13d00000fe3010000410000000000100439000000000100041400001c440000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000c00000004001d00000ff50340009c00001cc10000813d0000001002000029000a0011002000720000000e0100006b00001d220000c13d000000400200043d0000004001200039000000400010043f0000000c01000029000900000002001d00000000021204360000000a0100002900000ff601100197000a00000001001d000c00000002001d00000000001204350000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000902000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000b0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000a03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000b050000293f163f0c0000040f0000000101200190000000350000613d00000c6d0000013d0000007a01000039000000000101041a000000ff0110018f00000010030000290000000f0230006b00001cfc0000c13d000000000101004b00001d680000c13d00000fe3010000410000000000100439000000000100041400001d6b0000013d00000007010000290000000203100039000000000403041a0000004001200039000000400010043f0000001e01000039000000000112043600000fe5050000410000000000510435000000100540006c00001d020000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000019f00000413d000000000124004b000011e60000a13d000011e40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c000028a30000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000700000003001d00000004033000390000000000230435000000400200043d000c00000002001d00000fda02000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c000020020000c13d0000000103000031000020360000013d0000001f0430018f000000050230027200001a350000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00001a310000c13d000000000504004b00001a430000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a520000413d000000000124004b000011e60000a13d000011e40000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a690000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a800000413d000000000124004b000011e60000a13d000011e40000013d001100000000001d00001a9f0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000011020000290000000102200039001100000002001d0000000c0120006c0000133a0000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff0110019000001acb0000613d00000fe1010000410000000000100439000000000100041400001ace0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c00001a9a0000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000a00000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c00001afc0000c13d000000010300003100001b2e0000013d00000010040000290000000a03400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c00000020050000390000000005034019000000050450027200001b1b0000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00001b170000c13d0000001f0550019000001b2a0000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000102200190000022d60000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b0000221f0000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b00001b6b0000c13d000000000101004b00001a8c0000613d00000fe1010000410000000000100439000000000100041400001a8f0000013d000800000005001d000000000101004b00001b720000613d00000fe1010000410000000000100439000000000100041400001b750000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000a00000005001d000000000345004b000022f00000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000700000002001d000000000101043b000000000101041a000900000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a030000290000000b0230006c000000000200001900001bbf0000613d0000000a030000290000000b0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00001bbe0000613d00000007321000b900000000311200d9000000070110006c00001bbf0000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a0400003900000000004304350000000905000029000000000405004b000023070000613d000000000125004b000000000300001900001bd20000213d00000009212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000008020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe60400004100000000004204350000001a0200003900000000002104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000231e0000c13d000000000034041b0000007a01000039000000000101041a000000ff0110019000001bf70000613d00000fe1010000410000000000100439000000000100041400001a8f0000013d00000fe3010000410000000000100439000000000100041400001a8f0000013d0000000c0100002900000000001004350000000e01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000103200039000000000031041b000000100120006b00001e230000c13d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000b00000001001d0000000f0110006c000021900000a13d000000400100043d00000064021000390000102e03000041000000000032043500000044021000390000102f03000041000000000032043500000024021000390000002a0300003900000bd60000013d0000001f0430018f000000050230027200001c310000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00001c2d0000c13d000000000504004b00001c3f0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000c00000004001d00000ff50340009c00001d0b0000813d0000000e0100006b00001e2d0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000001101000029000b00000002001d00000000001204350000000c01000029000a00000003001d00000000001304350000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a02000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000b03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000d0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000001103000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000d05000029000010dd0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001cce0000413d000000000124004b000011e60000a13d000011e40000013d0000000004000019000000000102041a001100000004001d000000000114004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110400002900000005324000c9000000000101043b0000000001210019000000000101041a00000fc8011001970000000a0110006c00001e6f0000613d00000001044000390000000f0140006c000000100200002900001cd90000413d000014980000013d0000007a01000039000000000101041a000000ff0110019000001d780000c13d00000fe3010000410000000000100439000000000100041400001d7b0000013d000000000101004b00001de60000c13d00000fe3010000410000000000100439000000000100041400001de90000013d000000100140006a000000000013041b0000000d020000290000000e012001b000001e170000c13d000000400100043d00000044021000390000106d030000410000107c0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001d180000413d000000000124004b000011e60000a13d000011e40000013d0000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc702200197000900000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc701100198000019670000c13d0000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a0400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b000a0ff60040019b000019ae0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b000000000100001900003f170001042e00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000a00000001001d000000110100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000202200039000000000302041a000900000003001d0000000a0230006b000023b50000a13d0000000b03000029000000080230006c000023b50000613d000000000101041a000700000001001d000000400100043d0000004002100039000000400020043f000000200210003900000fe50300004100000000003204350000001e020000390000000000210435000000110100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000009030000290000000a0230006900000007342000b900000000322400d90000000e030000290000000103300039000000000503041a000000000101043b000000070220006c00003d610000c13d000000000201041a000000000104004b000000000300001900001dc50000613d00000000134500a900000000414300d9000000000151004b00003d610000c13d000000400500043d0000004001500039000000400010043f000000200150003900000fe60400004100000000004104350000001a040000390000000000450435000000000602004b0000237e0000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200400003900000000004204350000000002050433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ddc0000413d000000000124004b000011e60000a13d000019240000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000c00000004001d000b00000005001d000000000345004b00001e760000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001e0d0000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100006b00001ec90000613d0000000d0100006b00001ec90000613d000000400100043d0000004402100039000010650300004100001e720000013d000000400100043d000000440210003900000fea03000041000012e00000013d000000400100043d00000064021000390000101d03000041000000000032043500000044021000390000101e0300004100000000003204350000002402100039000000260300003900000bd60000013d0000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc702200197000b00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc70110019800001c600000c13d0000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011020000290000002002200210000000000101043b000000000301041a000010290330019700001ca40000013d000000400100043d000000440210003900000fe9030000410000000000320435000000240210003900000012030000390000107f0000013d000000110100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e020000290000000102200039000000000202041a000a00000002001d000000000101043b000000000101041a001100000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b030000290000000c0230006c000000000200001900001ea80000613d0000000b030000290000000c0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900001ea80000613d0000000a321000b900000000311200d90000000a0110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000110500006b000023350000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ebf0000413d000000000124004b000011e60000a13d000011e40000013d0000000b0100002900000005121000c9001100000002001d000f00090020002d0000000e0100006b00001fd80000c13d0000000701000029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50400004100000000004104350000001e0400003900000000004204350000000d0430006c000022360000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ee80000413d000000000124004b000011e60000a13d000011e40000013d0000000d040000290000000602400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200001f130000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00001f0f0000c13d000000000604004b00001f220000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000207f0000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001100000001001d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000d00000004001d000000110340006b0000236f0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001f650000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001f7c0000413d000000000124004b000011e60000a13d000019240000013d0000004001200039000000400010043f0000001b01000039000000000112043600000fe8040000410000000000410435000000100330006a001000050030002d000000100330006b000000000300001900000001030040390000000103300190000020b30000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fa00000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fb70000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fce0000413d000000000124004b000011e60000a13d000011e40000013d0000000c0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001101100029000d00000001001d0000000201100039000900000001001d000000000101041a001100000001001d0000007a01000039000000000101041a000000ff01100190000025450000c13d00000fe30100004100000000001004390000000001000414000025480000013d0000000c040000290000000702400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000020230000613d0000000c080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000201f0000c13d000000000604004b000020320000613d0000000505500210000000000651034f0000000c055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000022770000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000c00000004001d000000100340006b000024b90000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020750000413d000000000124004b000011e60000a13d000019240000013d0000001f0430018f0000000502300272000020890000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000020850000c13d000000000504004b000020970000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000020a30000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000209f0000c13d000000000504004b000020b10000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000100100006b000022910000c13d000000400100043d00000064021000390000106003000041000000000032043500000044021000390000106103000041000000000032043500000024021000390000002e0300003900000bd60000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020cc0000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020e30000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020fa0000413d000000000124004b000011e60000a13d000019240000013d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000000021041b0000000e0100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000402000029000000000021041b000000400300043d000000a001300039000000400010043f00000020023000390000000501000029000f00000002001d00000000001204350000000a01000029001100000003001d00000000001304350000007a01000039000000000101041a000000ff01100190000024070000c13d00000fe301000041000000000010043900000000010004140000240a0000013d0000000006010019000d00000000001d000e00000000001d0000213c0000013d000000000206004b0000237b0000613d000000010660008a000000000116004b00003c330000813d001000000006001d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010060000290000000102600210000000000101043b00000000022100190000001101000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000021680000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b0000000004000019000000010400403900000001044001900000213a0000613d000024cb0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000213a0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000025d30000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000021860000413d000000000214004b000025d30000a13d000012a20000013d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000a0fc80010019b0000000501000039000000000101041a00000fc801100198000007cd0000613d00000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d000000000101041a000d00000001001d000000000101004b001000000000001d000026050000c13d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a00000fc9022001970000001107000029000000000272019f000000000021041b000000400100043d00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d02000039000000040300003900001022040000410000000c050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d0000000a02000029000000110120006c000010e00000613d000000100100006b000010e00000613d0000000a0100006b00002cf10000c13d000000110100006b000010e00000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c000f00000000001d000031090000c13d000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b0300003900000000003204350000000f04000029000000100340002900100ff60030019b000000100340006b000031660000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000022150000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000222c0000413d000000000124004b000011e60000a13d000019240000013d0000000d0130006a0000000702000029000000000012041b0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435001100000004001d0000000d0340006c000025760000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000226d0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000022810000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000227d0000c13d000000000504004b0000228f0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001101000029000000000101041a000000060110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000001102000029000000000202041a000000060220006b00003c330000813d000000000101043b0000000f01100029000000000201041a001100000002001d0000000502000029000000000021041b0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001002000029000000000021041b000000400100043d00000020021000390000000503000029000000000032043500000011020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000105f040000410000000e050000290000000606000029000010dd0000013d0000001f0430018f0000000502300272000022e00000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000022dc0000c13d000000000504004b000022ee0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000022fd0000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023140000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000232b0000413d000000000124004b000011e60000a13d000019240000013d000000110120006b00000000030000190000233d0000213d00000011212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000010020000290000000f05200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000004104350000000e010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000253c0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023650000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110018f0000000d03000029000000110230006b000024c50000c13d000000000101004b000026270000c13d00000fe301000041000000000010043900000000010004140000262a0000013d0000000e0100006b000015460000613d000029990000013d000000000132004b0000000005000019000023860000213d00000000212300d900000fe7251000d100000000211500d900000fe70110009c00003d610000c13d0000000b02000029000000080320006a000000400100043d0000004002100039000000400020043f000000200210003900000fe60600004100000000006204350000000000410435000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b04000039000000000042043500000000433500d9000d000d0030002d0000000d0330006b000000000300001900000001030040390000000103300190000023b50000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023ab0000413d000000000124004b000011e60000a13d000019240000013d000000110100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a000000000201004b000f00000000001d000024e20000c13d0000000c01000029000000000401041a0000000101100039000000000101041a000000400300043d0000004002300039000000400020043f000000200230003900000fe50500004100000000005204350000001e0500003900000000005304350000000f0540006c0000284c0000813d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002aa10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000023fd0000413d000000000214004b00002aa10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d00000011020000290000004003200039000000000101043b000c00000003001d000000000013043500000080032000390000000301000029000d00000003001d00000000001304350000006001200039000b00000001001d00000000000104350000001002000029000000000102041a000900000001001d0000000101100039000000000012041b0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090200002900000005322000c9000000000101043b0000000001210019000000000201041a00000fc9022001970000001103000029000000000303043300000fc803300197000000000232019f000000000021041b0000000f0200002900000000020204330000000103100039000000000023041b0000000c0200002900000000020204330000000203100039000000000023041b0000000b0200002900000000020204330000000303100039000000000023041b00000004011000390000000d020000290000000002020433000000000021041b0000000a0100002900000000001004350000001401000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000010b40220019700000001022001bf000000000021041b0000000401000039000000000101041a0000000102000039000000400400043d0000002403400039000000000023043500000feb020000410000000000240435000f00000004001d00000004024000390000000e03000029000000000032043500000fda02000041000000400300043d000d00000003001d000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000024940000613d0000000d040000290000000f02400069000000440220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000002ece0000613d0000001001000029000000000101041a000000400200043d00000040032000390000000304000029000000000043043500000020032000390000000404000029000000000043043500000005030000290000000000320435000000400300043d0000000002320049000000600220003900000fc70420009c00000fc702008041000000600220021000000fc70430009c00000fc7030080410000004003300210000000000232019f000000000300041400000fc70430009c00000fc703008041000000c003300210000000000232019f000000010610008a00000fec012001c70000800d02000039000000040300003900000fed040000410000000e050000290000000a070000293f163f0c0000040f0000000101200190000000350000613d000010e00000013d0000007a01000039000000000101041a000000ff0110018f0000000c03000029000000100230006b000028150000c13d000000000101004b000028950000c13d00000fe30100004100000000001004390000000001000414000028980000013d000000000101004b0000281b0000c13d00000fe301000041000000000010043900000000010004140000281e0000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000025d30000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000024d80000413d000000000214004b000025d30000a13d000012a20000013d001100000001001d000f00000000001d000e00000000001d000024e80000013d000000110200006b000023e20000613d00000011020000290011000100200092000000110110006b00003c330000813d00000010010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011020000290000000102200210000000000101043b00000000022100190000001001000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000025140000c13d000000110310006b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000f000f0040002d0000000f0440006b000000000400001900000001040040390000000104400190000024e60000613d00002b430000013d000000110310006b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b000000000400001900000001040040390000000104400190000024e60000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002c730000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000025320000413d000000000214004b00002c730000a13d000012a20000013d000000000034041b0000007a01000039000000000101041a000000ff011001900000287e0000c13d00000fe3010000410000000000100439000000000100041400001d6b0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000110110006c000033f50000a13d0000000d01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000500000003001d00000004033000390000000000230435000000400200043d000600000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00002c740000c13d000000010300003100002ca80000013d0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d050000290000001102500069000000000101043b000000000021041b0000000f01000029000000000101041a000000400200043d00000024032000390000000804000029000000000043043500000044032000390000000000530435000000400400043d0000000003430049000d00000004001d00000000033404360000006402200039000000400020043f0000000002030433000010660220019700001067022001c7001100000003001d00000000002304350000106802000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000026920000613d000000400100043d0000000d020000290000000002020433000000000302004b000025cb0000613d000000000300001900000000041300190000001105300029000000000505043300000000005404350000002003300039000000000423004b000025c00000413d000000000323004b000025cb0000a13d00000000031200190000000000030435000000400400043d00000000030004140000000f05000029000000040550008c00002ee70000c13d0000000102000039000000010600003100002efb0000013d000013b10000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c0000358c0000a13d0000000d01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000400000003001d00000004033000390000000000230435000000400200043d000500000002001d00000fda02000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c00002d470000c13d000000010300003100002d7b0000013d001000000000001d0000000f01000029000000000101041a000000100110006b00003c330000813d0000000501000039000000000101041a000e00000001001d0000000f010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c9000000000101043b0000000001210019000000000101041a0000000e0110014f00000fc80110019800002aa20000613d00000010010000290000000101100039001000000001001d0000000d0110006c000026060000413d001000000000001d000021b70000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000e02000029000000000012041b0000000f0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000000201004b000026960000c13d00000007020000290011000a0020002d0000000801000029000000000301041a000000000103004b000026f00000c13d0000001101000029000000000101041a000000000200041000000fc802200197000000400300043d0000004404300039000000000024043500000024023000390000000904000029000000000042043500000064023000390000000b040000290000000000420435000000400400043d0000000002420049000e00000004001d00000000042404360000008402300039000000400020043f00000000020404330000106602200197000010a7022001c7000d00000004001d00000000002404350000106802000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000027740000c13d000000400100043d0000004402100039000010a80300004100000bbf0000013d0000000006010019000d00000000001d000e00000000001d0000269c0000013d000000000206004b0000274c0000613d000000010660008a000000000116004b00003c330000813d001000000006001d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010060000290000000102600210000000000101043b00000000022100190000001101000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000026c80000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b0000000004000019000000010400403900000001044001900000269a0000613d0000278e0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000269a0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000027a50000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000026e60000413d000000000214004b000027a50000a13d000012a20000013d00000008020000290000000201200039000000000601041a00000011010000290000000301100039000000000501041a0000000101200039000000000101041a001000000001001d000000400400043d0000004001400039000000400010043f000000200140003900000fe50200004100000000002104350000001e020000390000000000240435000000000763004b0000271a0000813d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000027100000413d000000000124004b000011e60000a13d000011e40000013d000000000163004b0000000004000019000027220000613d000000000163004900000000345100a900000000311400d9000000000151004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60500004100000000005304350000001a030000390000000000310435000000400300043d0000004001300039000000400010043f000000200130003900000fe5050000410000000000510435000000000023043500000fe72440012a000e00000004001d000000100240006c0000274f0000813d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000027420000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100006b000026610000613d000029990000013d0000000e02000029000000100120006c000026670000613d0000000401000039000000000101041a000000400300043d00000fe402000041000000000023043500000fc802100197000a00000003001d0000000401300039000700000002001d0000000000210435000000400100043d000d00000001001d00000fda0100004100000000001004390000000f010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c00002bef0000c13d000000010300003100002c230000013d000000400100043d0000000e020000290000000002020433000000000302004b000027860000613d00000000030000190000000d0600002900000000041300190000000005630019000000000505043300000000005404350000002003300039000000000423004b0000277b0000413d000000000323004b000027860000a13d00000000031200190000000000030435000000400400043d00000000030004140000001005000029000000040550008c000027a60000c13d00000001020000390000000106000031000027ba0000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000027a50000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000279b0000413d000000000214004b000027a50000a13d000012a20000013d000013b10000013d0000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f00000010020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc706100197000000000106004b000027bf0000c13d00000060030000390000008001000039000027df0000013d0000003f01600039000010b301100197000000400300043d0000000001130019000000400010043f0000001f0460018f0000000001630436000000030500036700000005066002720000000506600210000027d10000613d0000000007610019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b000027cd0000c13d000000000704004b000027df0000613d000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000027ec0000c13d000000400100043d0000004402100039000010ad03000041000000000032043500000fde0200004100000000002104350000002402100039000000200300003900000000003204350000000402100039000010840000013d0000000002030433000000000302004b000028820000c13d000000400100043d0000000802000029000000000302041a0000004002100039000000400020043f0000001b02000039000000000221043600000fe80400004100000000004204350000000b04300029000000000334004b00000000050000190000000105004039000000400300043d000000010550019000002a7b0000613d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000001010433000000240430003900000000001404350000004403300039000000000401004b000028140000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000280b0000413d000000000214004b000012a20000213d000013b10000013d000000000101004b000029f20000c13d00000fe30100004100000000001004390000000001000414000029f50000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000e02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000600000004001d000500000005001d000000000345004b00002a230000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000028420000413d000000000124004b000011e60000a13d000011e40000013d0000000f0240006c0000000003000019000028540000613d0000000f0240006a0000000d432000b900000000422300d90000000d0220006c00003d610000c13d000000400200043d0000004004200039000000400040043f000000200420003900000fe60500004100000000005404350000001a040000390000000000420435000000400500043d0000004002500039000000400020043f000000200250003900000fe50400004100000000004204350000001e040000390000000000450435000000400400043d00000fe76330012a000000000613004b00002a760000813d00000fde0100004100000000001404350000000401400039000000200300003900000000003104350000000001050433000000240340003900000000001304350000004403400039000000000401004b00002aa10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000028740000413d000000000214004b00002aa10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400001d6b0000013d00000fd50320009c000000350000213d0000001f0220008c000000350000a13d0000000002010433000000000102004b0000000001000019000000010100c039000000000112004b000000350000c13d000000400100043d000000000202004b000027f00000c13d00000064021000390000106a03000041000000000032043500000044021000390000106b0300004100001c230000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b0000000e0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a000000000201004b000028da0000c13d0000000901000029000000000201041a000000000102004b000029340000c13d0000000301000039000000000201041a0000104e0220019700000fd6022001c7000000000021041b000000000100001900003f170001042e0000000006010019000c00000000001d000d00000000001d000028e00000013d000000000206004b000029970000613d000000010660008a000000000116004b00003c330000813d000f00000006001d00000010010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f060000290000000102600210000000000101043b00000000022100190000001001000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c0000290c0000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000c000c0040002d0000000c0440006b000000000400001900000001040040390000000104400190000028de0000613d000029da0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b000000000400001900000001040040390000000104400190000028de0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000029f10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000292a0000413d000000000214004b000029f10000a13d000012a20000013d00000008030000290000000a013000290000000301100039000000000301041a00000009050000290000000201500039000000000401041a0000000101500039000000000501041a001000000005001d000000400700043d0000004005700039000000400050043f000000200670003900000fe50500004100000000005604350000001e050000390000000000570435000000000842004b000029620000813d000000400200043d00000fde0100004100000000001204350000000401200039000000200300003900000000003104350000000001070433000000240320003900000000001304350000004402200039000000000301004b000029950000613d000000000300001900000000042300190000000005630019000000000505043300000000005404350000002003300039000000000413004b000029550000413d000000000313004b000029950000a13d000000000321001900000000000304350000001f01100039000012800000013d000000000642004b00000000080000190000296a0000613d000000000642004900000000783600a900000000766800d9000000000636004b00003d610000c13d000000400700043d0000004006700039000000400060043f000000200670003900000fe60900004100000000009604350000001a060000390000000000670435000000400900043d0000004007900039000000400070043f000000200790003900000fe50a0000410000000000a70435000000000059043500000fe78a80012a000f0000000a001d0000001008a0006c0000299d0000813d000000400200043d00000fde0100004100000000001204350000000401200039000000200300003900000000003104350000000001090433000000240320003900000000001304350000004402200039000000000301004b000029950000613d000000000300001900000000042300190000000005730019000000000505043300000000005404350000002003300039000000000413004b0000298a0000413d000000000313004b000029950000a13d000000000321001900000000000304350000001f01100039000012800000013d0000000d0100006b000028cf0000613d000000400100043d0000004402100039000010a603000041000012e00000013d0000000f08000029000000100780006c000028d30000613d000000400700043d0000004008700039000000400080043f000000200870003900000fe50900004100000000009804350000000000570435000000000542004b0000000005000019000029af0000613d000000000242004900000000453200a900000000422500d9000000000232004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe6040000410000000000430435000000000062043500000fe73250012a000000000021041b0000000401000039000000000101041a000000400300043d00000fe402000041000000000023043500000fc802100197000c00000003001d0000000401300039000a00000002001d000000000021043500000fda01000041000000400200043d000d00000002001d00000000001004390000000e010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000e02000029000000040220008c00002dde0000c13d000000010300003100002e120000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000029f10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000029e70000413d000000000214004b000029f10000a13d000012a20000013d000013b10000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000700000004001d000600000005001d000000000345004b00002af00000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a190000413d000000000124004b000011e60000a13d000019240000013d0000000f0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010020000290000000102200039000000000202041a000300000002001d000000000101043b000000000101041a000400000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000503000029000000060230006c000000000200001900002a550000613d0000000503000029000000060230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900002a550000613d00000003321000b900000000311200d9000000030110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000040500006b00002e7b0000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a6c0000413d000000000124004b000011e60000a13d000011e40000013d00000000011300490000000000140435000000400100043d000000000214004900000a8a0000013d0000000801000029000000000041041b0000000201100039000000000501041a00000011010000290000000301100039000000000201041a0000004001300039000000400010043f0000001e01000039000000000113043600000fe5060000410000000000610435000000000654004b00002b5a0000813d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a970000413d000000000124004b000011e60000a13d000011e40000013d000013b10000013d0000000501000039000000000101041a00000fc80110019700000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a0000000201100039000000000401041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50200004100000000002104350000001e020000390000000000250435000000400200043d000000000643004b00002f9a0000813d00000fde0300004100000000003204350000000403200039000000200400003900000000004304350000000003050433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b00002ae60000413d000000000134004b0000127f0000a13d0000127d0000013d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000400000002001d000000000101043b000000000101041a000500000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000603000029000000070230006c000000000200001900002b220000613d0000000603000029000000070230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900002b220000613d00000004321000b900000000311200d9000000040110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000050500006b00002f600000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002b390000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002c730000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b00002b500000413d000000000214004b00002c730000a13d000012a20000013d000000000154004b000000000100001900002b620000613d000000000354004900000000412300a900000000433100d9000000000223004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a00000008020000290000000102200039000000000012041b0000000501000039000000000101041a0000001102000029000000000202041a000000000112013f00000fc8011001980000396e0000c13d000000090100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000006001200039000000400010043f0000004001200039000010a90400004100000000004104350000002001200039000010ab0400004100000000004104350000002104000039000000000042043500110fc80030019b0000000b03000029000010210330009c00002fd50000813d000000110100006b0000396e0000613d0000000b0100006b0000396e0000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c001000000000001d00002bc80000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b03000039000000000032043500000010040000290000000b03400029000a0ff60030019b0000000a0340006b0000382d0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002be50000413d000000000124004b000011e60000a13d000011e40000013d0000000d040000290000000a02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002c100000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002c0c0000c13d000000000604004b00002c1f0000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002dc40000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000d00000001001d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e03000029000a001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000a03500029001000000003001d000e00000005001d000000000353004b000000000300001900000001030040390000000103300190000030780000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002c690000413d000000000124004b000011e60000a13d000011e40000013d000013b10000013d00000006040000290000000502400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002c950000613d00000006080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002c910000c13d000000000604004b00002ca40000613d0000000505500210000000000651034f00000006055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002e620000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001100000001001d0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000600000004001d000000110340006b000031410000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002ce70000413d000000000124004b000011e60000a13d000011e40000013d0000000a0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c000f00000000001d00002d220000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000002001100270000f0ff60010019b000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c0300003900000000003204350000000f04000029000000100340006c00002fec0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002d3d0000413d000000000124004b000011e60000a13d000019240000013d00000005040000290000000402400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002d680000613d00000005080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002d640000c13d000000000604004b00002d770000613d0000000505500210000000000651034f00000005055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002eb50000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000500000004001d000000100340006b0000315a0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002dba0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f000000050230027200002dce0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00002dca0000c13d000000000504004b00002ddc0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000d040000290000000c02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000e020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002dff0000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002dfb0000c13d000000000604004b00002e0e0000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002f470000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000d00000001001d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f03000029000c001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000c03500029001000000003001d000f00000005001d000000000353004b0000000003000019000000010300403900000001033001900000325b0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002e580000413d000000000124004b000011e60000a13d000019240000013d0000001f0430018f0000000502300272000000050220021000002e6c0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002e680000c13d000000000504004b00002e790000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000040120006b000000000300001900002e830000213d00000004212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d0000000d020000290000001105200069000000400100043d0000004002100039000000400020043f000000200210003900000fe6060000410000000000620435000000000041043500000010010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b00000000050000190000000105004039000000010550019000002fcc0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002eab0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000002ebf0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002ebb0000c13d000000000504004b00002ecc0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000000050220021000002ed80000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002ed40000c13d000000000504004b00002ee50000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f0000000f020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc706100197000000000106004b00002f000000c13d0000006003000039000000800100003900002f200000013d0000003f01600039000010b301100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000003050003670000000506600272000000050660021000002f120000613d0000000007610019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b00002f0e0000c13d000000000704004b00002f200000613d000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000027e10000613d0000000002030433000000000302004b00002fbe0000c13d000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b030000390000000000320435000000400300043d00000010050000290000000e0450006c000031280000813d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002f3d0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000002f510000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002f4d0000c13d000000000504004b00002f5e0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000050120006b000000000300001900002f680000213d00000005212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d0000000c020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000004104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000314d0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002f900000413d000000000124004b000011e60000a13d000019240000013d0000006001200039000000400010043f00000040012000390000101f05000041000000000051043500000028010000390000000001120436000010200500004100000000005104350000000003430049001000000003001d000010210330009c000021b70000413d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002fb40000413d000000000124004b000011e60000a13d000019240000013d00000fd50320009c000000350000213d0000001f0220008c000000350000a13d0000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000000350000c13d000000000101004b00002f250000c13d000000400100043d0000288f0000013d000000000034041b0000007a01000039000000000101041a000000ff01100190000031560000c13d00000fe301000041000000000010043900000000010004140000262a0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002fe20000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff01100190000c000b0000002d00002ffe0000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000c00000001001d000000400200043d0000008001200039000000400010043f000000600120003900001025030000410000000000310435000000400120003900001026030000410000000000310435000000200120003900001027030000410000000000310435000000420300003900000000003204350000000c0300002900000ff50330009c000032440000813d0000000f0200002900090010002000720000000d0100006b0000334c0000c13d000000400200043d0000004001200039000000400010043f0000000c01000029000800000002001d0000000002120436000000090100002900000ff601100197000900000001001d000c00000002001d00000000001204350000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000802000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000a0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d0000002002100039000000090300002900000000003204350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000a050000293f163f0c0000040f0000000101200190000021e30000c13d000000350000013d00000010020000290000000d0120006c000031eb0000a13d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000d0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000e020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f0500002900000009060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000d02000029000000000021043500000024013000390000000902000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000007010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000702000029000000040220008c000032270000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000007020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000032270000c13d0000001f0430018f00000005023002720000000502200210000030fa0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000030f60000c13d000000000504004b000031070000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000002001100270000f0ff60010019b000021f80000013d00000010010000290000000000130435000000400100043d0000000002130049000000200220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000004030000390000106c0400004100000008050000290000000c060000290000000b07000029000039c70000013d0000007a01000039000000000101041a000000ff0110018f0000000603000029000000110230006b000032ec0000c13d000000000101004b000033e70000c13d00000fe30100004100000000001004390000000001000414000033ea0000013d000000000034041b0000007a01000039000000000101041a000000ff01100190000032f20000c13d00000fe30100004100000000001004390000000001000414000028980000013d00000fe101000041000000000010043900000000010004140000262a0000013d0000007a01000039000000000101041a000000ff0110018f0000000503000029000000100230006b000032f60000c13d000000000101004b0000357e0000c13d00000fe30100004100000000001004390000000001000414000035810000013d0000007a01000039000000000101041a000000ff01100190000031770000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000b00000001001d000000400200043d0000008001200039000000400010043f000000600120003900001025030000410000000000310435000000400120003900001026030000410000000000310435000000200120003900001027030000410000000000310435000000420300003900000000003204350000000b0300002900000ff50330009c000033350000813d0000000d0100006b0000376e0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000001001000029000c00000002001d00000000001204350000000b01000029000a00000003001d0000000000130435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a02000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d0000002002100039000000100300002900000000003204350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000001105000029000010dd0000013d0000000e0100006b000032fc0000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000000902000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000007010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000702000029000000040220008c000032270000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000007020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003a350000613d000000400100043d0000000a020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010510400004100000009050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000026670000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000032510000413d000000000124004b000011e60000a13d000019240000013d00000010020000290000000d0120006c000033920000a13d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000d0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000e0500002900000011060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000d02000029000000000021043500000024013000390000001102000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000e020000290000000000210435000000400100043d000f00000001001d00000fda0100004100000000001004390000000a010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000a02000029000000040220008c000033ce0000613d0000000f040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000a020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000033ce0000c13d0000001f0430018f00000005023002720000000502200210000032dd0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000032d90000c13d000000000504004b000032ea0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000000101004b000035020000c13d00000fe30100004100000000001004390000000001000414000035050000013d00000fe10100004100000000001004390000000001000414000028980000013d000000000101004b000036ab0000c13d00000fe30100004100000000001004390000000001000414000036ae0000013d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000e0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f0500002900000009060000293f163f0c0000040f0000000101200190000000350000613d000031ed0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000033420000413d000000000124004b000011e60000a13d000019240000013d0000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000800000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc701100198000030130000c13d0000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b00090ff60040019b0000305a0000013d0000000f0100006b000037b00000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000001102000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000e020000290000000000210435000000400100043d000f00000001001d00000fda0100004100000000001004390000000a010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000a02000029000000040220008c000033ce0000613d0000000f040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000a020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003aeb0000613d000000400100043d0000000c020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010510400004100000011050000290000000e060000290000313f0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000902000029000000000012041b0000000f01000029000d00030010003d00000007010000290000000102100039000900000002001d000000000202041a000000000101041a000000000301004b0000000004000019000034050000613d0000000d03000029000000000303041a00000000541300a900000000511400d9000000000131004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60500004100000000005304350000001a030000390000000000310435000000400500043d0000004001500039000000400010043f000000200350003900000fe50100004100000000001304350000001e010000390000000000150435000000400700043d00000044017000390000002406700039001100000007001d000000040770003900000fe78440012a000000000824004b000034360000813d00000fde02000041000000110400002900000000002404350000002002000039000000000027043500000000020504330000000000260435000000000402004b000034320000613d000000000400001900000000051400190000000006340019000000000606043300000000006504350000002004400039000000000524004b000034270000413d000000000324004b000034320000a13d000000000312001900000000000304350000001f02200039000010b3022001970000000001120019000013b40000013d0000000403000039000000000303041a0000105005000041000000110800002900000000005804350000000c0500002900000000005704350000000805000029000000000056043500000000022400490000000000210435000000400100043d000500000001001d00000fda01000041000000000010043900000fc801300197000600000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000602000029000000040220008c0000346f0000613d00000005040000290000001102400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000006020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000034e90000613d0000000701000029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50400004100000000004104350000001e0400003900000000004204350000000e0430006c000034920000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000034880000413d000000000124004b000011e60000a13d000011e40000013d0000000e0230006a0000000704000029000000000024041b0000000e0130006c00000000010000190000349e0000613d0000000d01000029000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a0000000902000029000000000012041b0000000f01000029000000000101041a000000400200043d00000024032000390000000804000029000000000043043500000044032000390000000e040000290000000000430435000000400400043d0000000003430049000d00000004001d00000000033404360000006402200039000000400020043f0000000002030433000010660220019700001067022001c7001100000003001d00000000002304350000106802000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000026920000613d000000400100043d0000000d020000290000000002020433000000000302004b000034e10000613d000000000300001900000000041300190000001105300029000000000505043300000000005404350000002003300039000000000423004b000034d60000413d000000000323004b000034e10000a13d00000000031200190000000000030435000000400400043d00000000030004140000000f05000029000000040550008c000035330000c13d00000001020000390000000105000031000035470000013d0000001f0430018f00000005023002720000000502200210000034f30000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000034ef0000c13d000000000504004b000035000000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000902000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000500000004001d000400000005001d000000000345004b000037e90000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000035290000413d000000000124004b000011e60000a13d000011e40000013d0000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f0000000f020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc705100197000000000105004b0000354b0000c13d00000060010000390000356d0000013d0000003f01500039000010b303100197000000400100043d0000000003310019000000400030043f0000001f0350018f0000000004510436000a00000004001d000000030400036700000005055002720000355e0000613d00000005065002100000000a080000290000000006680019000000000704034f000000007907043c0000000008980436000000000968004b0000355a0000c13d000000000603004b0000356d0000613d0000000505500210000000000454034f0000000a055000290000000303300210000000000605043300000000063601cf000000000636022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000363019f0000000000350435000000000202004b000027e10000613d0000000001010433000000000201004b00002f250000613d00000fd50210009c0000000a02000029000000350000213d0000001f0110008c000000350000a13d0000000001020433000000000201004b0000000002000019000000010200c039000000000221004b00002fc80000613d000000350000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000602000029000000000012041b0000000e0200002900000007022000290000000801000029000000000301041a0000000901000029000000000501041a0000000101100039000600000002001d0000000302200039000400000002001d000000000402041a000500000001001d000000000101041a001000000001001d000000400200043d0000004001200039000000400010043f000000200120003900000fe50600004100000000006104350000001e060000390000000000620435000000000635004b000035bb0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000035b10000413d000000000124004b000011e60000a13d000011e40000013d000000000135004b0000000002000019000035c30000613d000000000135004900000000324100a900000000311200d9000000000141004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60400004100000000004304350000001a030000390000000000310435000000400300043d0000004001300039000000400010043f000000200130003900000fe50400004100000000004104350000001e040000390000000000430435000000400400043d000e00240040003d000000040540003900000fe72620012a000d00000006001d000000100260006c000035ef0000813d00000fde0200004100000000002404350000002002000039000000000025043500000000030304330000000e0200002900000000003204350000004402400039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000035e50000413d000000000134004b0000127d0000213d0000127f0000013d0000000401000039000000000101041a00000fe402000041000000000024043500000fc801100197000300000001001d0000000000150435000000400100043d000700000001001d00000fda0100004100000000001004390000000f010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c0000360e0000c13d0000000103000031000036410000013d00000007040000290000000e0240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f00000005055002720000362e0000613d00000007080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000362a0000c13d000000000604004b0000363d0000613d0000000505500210000000000651034f00000007055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000036910000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000e00000001001d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d030000290002001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000203500029001000000003001d000d00000005001d000000000353004b000000000300001900000001030040390000000103300190000036dc0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000036870000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f00000005023002720000369b0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000036970000c13d000000000504004b000036a90000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000602000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000400000004001d000300000005001d000000000345004b000038350000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000036d20000413d000000000124004b000011e60000a13d000011e40000013d00000010020000290000000e0120006c000038790000a13d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000e0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000d020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000e02000029000000000021043500000024013000390000000a02000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000003010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000302000029000000040220008c000038b50000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000003020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000038b50000c13d0000001f0430018f00000005023002720000375e0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000375a0000c13d000000000504004b0000376c0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000c00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000b0110014f00000fc7011001980000318a0000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010020000290000002002200210000000000101043b000000000301041a0000102903300197000031ce0000013d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000f0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000e0500002900000011060000293f163f0c0000040f0000000101200190000033940000c13d000000350000013d0000000c0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d020000290000000102200039000000000202041a000200000002001d000000000101043b000000000101041a000300000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000403000029000000050230006c000000000200001900003a4f0000c13d000000400400043d0000004001400039000000400010043f000000200140003900000fe60300004100000000003104350000001a030000390000000000340435000000030500006b00003ab10000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000038230000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff01100190000038ec0000c13d00000fe30100004100000000001004390000000001000414000038ef0000013d0000000f0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d020000290000000102200039000000000202041a000100000002001d000000000101043b000000000101041a000200000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000303000029000000040230006c000000000200001900003aa10000c13d000000400400043d0000004001400039000000400010043f000000200140003900000fe60300004100000000003104350000001a030000390000000000340435000000020500006b00003b040000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000386f0000413d000000000124004b000011e60000a13d000011e40000013d0000000d0100006b000039e50000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000000a02000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000003010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000302000029000000040220008c000038b50000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000003020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003b500000613d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000501043b00000006010000290000000401100039000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000300000005001d000700000053001d000000070330006b00000000030000190000000103004039000000400400043d000e00000004001d000000010330019000003b6a0000613d00000fde030000410000000e0500002900000000003504350000000403500039000000200400003900000000004304350000000002020433000000240350003900000000002304350000004403500039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000038e20000413d000000000124004b000011e60000a13d000011e40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000800000004001d00000ff50340009c00003a1e0000813d0000000d0100006b00003a5f0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000000a01000029000700000002001d00000000001204350000000801000029000600000003001d0000000000130435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000602000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000703000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000a03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c0400004100000011050000293f163f0c0000040f0000000101200190000000350000613d0000001701000039000000000101041a00000fc8011001970000000f0110006c000039ae0000c13d0000001801000039000000000101041a0000000c0110006b000039ae0000c13d0000001601000039000000000101041a000000400300043d0000109e020000410000000000230435001000000003001d000000040230003900000009030000290000000000320435000000400200043d000e00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000039ae0000613d0000000e040000290000001002400069000000240220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000039cb0000613d000000400100043d0000000b020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010ac0400004100000009050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000028d30000013d0000001f0430018f0000000502300272000039d50000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000039d10000c13d000000000504004b000039e30000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000d0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d0000387b0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003a2b0000413d000000000124004b000011e40000213d000011e60000013d0000001f0430018f000000050230027200003a3f0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00003a3b0000c13d000000000504004b00003a4d0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000403000029000000050230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00000000020000190000380c0000613d00000002321000b900000000311200d9000000020110006c0000380c0000613d00003d610000013d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000700000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000080110014f00000fc7011001980000390b0000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a020000290000002002200210000000000101043b000000000301041a00001029033001970000394f0000013d0000000303000029000000040230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b0000000002000019000038580000613d00000001321000b900000000311200d9000000010110006c000038580000613d00003d610000013d000000030120006b000000000400001900003ab90000213d00000003212000fa00000fe7241000d100000000211400d900000fe70110009c00003d610000c13d00000006020000290000001105200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000003104350000000d010000290000000303100039000000000603041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000545400d90000000004460019000000000564004b00000000050000190000000105004039000000010550019000003b3e0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003ae10000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000003af50000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00003af10000c13d000000000504004b00003b020000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000020120006b000000000400001900003b0c0000213d00000002212000fa00000fe7241000d100000000211400d900000fe70110009c00003d610000c13d00000005020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000003104350000000d010000290000000303100039000000000603041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000545400d90000000004460019000000000564004b00000000050000190000000105004039000000010550019000003b470000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003b340000413d000000000124004b000011e60000a13d000011e40000013d000000000043041b0000007a01000039000000000101041a000000ff0110019000003c360000c13d00000fe30100004100000000001004390000000001000414000033ea0000013d000000000043041b0000007a01000039000000000101041a000000ff0110019000003c3a0000c13d00000fe30100004100000000001004390000000001000414000035810000013d0000001f0430018f000000050230027200003b5a0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00003b560000c13d000000000504004b00003b680000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001102000029000000000302041a0000000e040000290000006001400039000000400010043f00000040054000390000000101000039000d00000005001d00000000001504350000000001040436000100000001001d0000000000010435001000000003001d0000000101300039000000000012041b0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001004000029000000010240021000000000012100190000000e020000290000000002020433000000000021041b0000000102000029000000000202043300001031022001970000000d0300002900000000030304330000008003300210000000000223019f0000000101100039000000000021041b000000000104004b000e00000000001d00003bee0000c13d000000400200043d0000006001200039000000400010043f0000000b01000029001000000002001d0000000001120436000d00000001001d0000000701000029000010400110009c00003c3e0000813d000000100100002900000040021000390000000101000039000100000002001d000000000012043500000007010000290000000d0200002900000000001204350000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e020000290000000102200210000000000101043b000000000121001900000010020000290000000002020433000000000021041b0000000d0200002900000000020204330000103102200197000000010300002900000000030304330000008003300210000000000223019f0000000101100039000000000021041b0000000801000029000000000401041a000000400200043d0000004001200039000000400010043f00000fe803000041000000200120003900000000003104350000001b0300003900000000003204350000000b03400029000000000443004b00000000040000190000000104004039000000010440019000003c4a0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003be40000413d000000000124004b000011e60000a13d000011e40000013d0000001001000029000e0001001000920000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000d000100200218000000000101043b0000000d011000290000000101100039000000000101041a0000103101100197000000070110006c00003c480000213d0000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000001102000029000000000202041a000000100220006b00003c330000813d00000010020000290000000102200210000000000101043b00000000022100190000000d01100029000000000301041a000000000032041b0000000101100039000000000301041a00001031033001970000000102200039000000000402041a0000102a04400197000000000434019f000000000042041b000000000101041a0000102a01100197000000000131019f000000000012041b0000000e0100006b0010000e0000002d00003bee0000c13d000e00000000001d00003b960000013d000000010100008a0000000000010435000000000000043100000fe10100004100000000001004390000000001000414000033ea0000013d00000fe10100004100000000001004390000000001000414000035810000013d000000400100043d00000064021000390000109a03000041000000000032043500000044021000390000109b0300004100000000003204350000002402100039000000270300003900000bd60000013d000e00100000002d00003b960000013d0000000801000029000000000031041b0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b0400003900000000004204350011000b0030002d000000110330006b00000000030000190000000103004039000000010330019000003c8d0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003c830000413d000000000124004b000011e60000a13d000011e40000013d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000000021041b0000000901000029000000000301041a0000000801000029000000000401041a0000000401000029000000000201041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50600004100000000006104350000001e060000390000000000650435000000000643004b00003cd10000813d000000400300043d00000fde0200004100000000002304350000000402300039000000200400003900000000004204350000000002050433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003cc70000413d000000000124004b000011e60000a13d000011e40000013d000000000143004b000000000100001900003cd90000613d000000000343004900000000412300a900000000433100d9000000000223004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a0000000502000029000000000012041b0000000501000039000000000101041a0000000602000029000000000202041a000000000112013f00000fc80110019800003e680000c13d0000000a0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000006001200039000000400010043f00000040012000390000109c04000041000000000041043500000020012000390000109d0400004100000000004104350000002b04000039000000000042043500110fc80030019b0000000b03000029000010210330009c00003d6b0000813d000000110100006b00003e680000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e0fc70010019c000800000001001d000d000100100092001000000000001d00003d3c0000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d0200002900000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c03000039000000000032043500000010040000290000000b0340006c00003d820000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003d570000413d000000000124004b000011e60000a13d000011e40000013d000000400100043d0000006402100039000010a90300004100000000003204350000004402100039000010aa0300004100000000003204350000002402100039000000210300003900000bd60000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003d780000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110019000003d930000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000300000001001d000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000000030300002900000ff50330009c00003ded0000813d00000010020000290009000b002000720000000e0100006b00003e040000613d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d0200002900000fc702200197000d00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000030110014f00000fc70110019800003e040000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b000d0ff60040019b00003e4b0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003dfa0000413d000000000124004b000011e60000a13d000011e40000013d000000400200043d0000004001200039000000400010043f0000000301000029000700000002001d0000000002120436000000090100002900000ff601100197000d00000001001d000900000002001d0000000000120435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000702000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000903000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000802000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000d03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c0400004100000011050000293f163f0c0000040f0000000101200190000000350000613d0000001701000039000000000101041a00000fc8011001970000000f0110006c00003ea80000c13d0000001801000039000000000101041a0000000c0110006b00003ea80000c13d0000001601000039000000000101041a000000400300043d0000109e020000410000000000230435001000000003001d00000004023000390000000a030000290000000000320435000000400200043d000e00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00003ea80000613d0000000e040000290000001002400069000000240220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003edd0000613d000000400100043d00000002020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000040300003900001051040000410000000a050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000000400100043d0000000b020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000004030000390000109f040000410000000a05000029000039c50000013d000000000001042f0000001f0430018f0000000502300272000000050220021000003ee70000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00003ee30000c13d000000000504004b00003ef40000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000000001042f00000fc70310009c00000fc701008041000000400110021000000fc70320009c00000fc7020080410000006002200210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f000000010220019000003f0a0000613d000000000101043b000000000001042d000000000100001900003f180001043000003f0f002104210000000102000039000000000001042d0000000002000019000000000001042d00003f14002104230000000102000039000000000001042d0000000002000019000000000001042d00003f160000043200003f170001042e00003f180001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000092e3500000000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000f55401620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fba1b1f800000000000000000000000000000000000000000000000000000000fba1b1f900000000000000000000000000000000000000000000000000000000fe5a451a00000000000000000000000000000000000000000000000000000000f554016200000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000200000008000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000001000000000000000000000000000000000000000061646428616464726573732c75696e743235362c616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000018c5e8ab000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a4000000e00000000000000000556e617574686f72697a6564000000000000000000000000000000000000000008c379a00000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd170a0823100000000000000000000000000000000000000000000000000000000536166654d6174683a207375627472616374696f6e206f766572666c6f770000536166654d6174683a206469766973696f6e206279207a65726f000000000000000000000000000000000000000000000000000000000000000000e8d4a51000536166654d6174683a206164646974696f6e206f766572666c6f770000000000506f6f6c20616c72656164792061646465640000000000000000000000000000546f6b656e2065786973747320696e206f7468657220706f6f6c000000000000fb66fb4d000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000d7fa4bff1cd2253c0789c3291a786a6f6b1a3b4569a75af683a15d52abb6a0bf416c6c6f6320706f696e7473206d757374206e6f74206265207a65726f00000053746f726520636f6e7472616374206164647265737320697320656d707479007a65726f2061646472657373206e6f7420616c6c6f77656400000000000000000000000000000000000000000000000000000000000000000000000012cc030000000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000e8f2be6f00000000000000000000000000000000000000000000000000000000f1127ed800000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000004000000080000000000000000044656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929000000000000dae66bbe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e1d146fa00000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000e6a69ab800000000000000000000000000000000000000000000000000000000dae66bbe00000000000000000000000000000000000000000000000000000000de0368b20000000000000000000000000000000000000000000000000000000001e133808def9436d6e31b89ed00948ba91d0cb6936eada5154cb1b45b55683fb9e492377265776172642063616e6e6f74206265207a65726f206164647265737300000000000000000000000000000000000000000000640000008000000000000000007072696d6520746f6b656e2063616e6e6f74206265207a65726f2061646472657373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000000000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000cd9b94e700000000000000000000000000000000000000000000000000000000d7ae45e2add8933700000000000000000000000000000000000000000000000000000000b6a5fd2f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3c754a700000000000000000000000000000000000000000000000000000000c3c754a800000000000000000000000000000000000000000000000000000000c3cda52000000000000000000000000000000000000000000000000000000000b6a5fd2f00000000000000000000000000000000000000000000000000000000c2102596454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000430000008000000000000000005856535661756c740000000000000000000000000000000000000000000000000200000000000000000000000000000000000008000000a000000000000000009a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b19010000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1756500000000000000000000000000000000000000000000000000000000000045434453413a20696e76616c6964207369676e6174757265202773272076616c45434453413a20696e76616c6964207369676e6174757265202776272076616c206e6f6e636500000000000000000000000000000000000000000000000000005856535661756c743a3a64656c656761746542795369673a20696e76616c69646f766572666c6f770000000000000000000000000000000000000000000000005856535661756c743a3a6765745374616b65416d6f756e743a20766f7465732000000000000000000000000000000000000000010000000000000000000000000cc323ffec3ea49cbcddc0de1480978126d350c6a45dff33ad2f1cda6ae992617420756e646572666c6f777300000000000000000000000000000000000000005856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e74730000000000000000000000000000000000000000000000000000000000006b206e756d626572206f72207365636f6e6420657863656564732033322062695856535661756c743a3a5f7772697465436865636b706f696e743a20626c6f6300000000000000000000000000000000ffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000006adb589fed1e8542fb7a6b10f00a85e02265e77f9ae3ca8ff93b22983e1af9a074206f766572666c6f777300000000000000000000000000000000000000000072652065787069726564000000000000000000000000000000000000000000005856535661756c743a3a64656c656761746542795369673a207369676e61747545434453413a20696e76616c6964207369676e6174757265000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff736574526577617264416d6f756e74506572426c6f636b4f725365636f6e6428616464726573732c75696e743235362900000000000000000000000000000000f5ab16cc00000000000000000000000000000000000000000000000000000000496e76616c69642072657761726420746f6b656e000000000000000000000000ad96cee0d692f0250b98e085504f399da6733854908215f6203fe3c69366d9f500000000000000000000000000000000000000000000000000000000add8933700000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000b4b5ea579e2b6c4d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a699776100000000000000000000000000000000000000000000000000000000a699776200000000000000000000000000000000000000000000000000000000a9d69a69000000000000000000000000000000000000000000000000000000009e2b6c4d00000000000000000000000000000000000000000000000000000000a09eab7a0000000000000000000000000000000100000000000000000000000000000000416c726561647920696e697469616c697a65642054696d654d616e6167657200496e76616c696420626c6f636b73207065722079656172000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000496e76616c69642074696d6520626173656420636f6e66696775726174696f6e7365745769746864726177616c4c6f636b696e67506572696f6428616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000000000000000000000000000000000000000000000012cc02ff496e76616c6964206e6577206c6f636b696e6720706572696f640000000000000bcf80c5060ccf99b7a993c57a94b232fc2c5c04bd74c7c7d174595fee6bc31f0000000000000000000000000000000000000000000000000000000092e350000000000000000000000000000000000000000000000000000000000098e1b31b00000000000000000000000000000000000000000000000000000000996cba680000000000000000000000ff0000000000000000000000000000000000000000ffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6bdfd5e51d01475945224d3d37965916fd8df699ef9e8888af4359aa862221609ad99e6800000000000000000000000000000000000000000000000000000000865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e946455c19a95c0000000000000000000000000000000000000000000000000000000073d025d6000000000000000000000000000000000000000000000000000000007ecebe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008456cb58000000000000000000000000000000000000000000000000000000008456cb59000000000000000000000000000000000000000000000000000000008ed7333d000000000000000000000000000000000000000000000000000000007ecebe00000000000000000000000000000000000000000000000000000000008308d7e970617573652829000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000c000000000000000005661756c7420697320616c726561647920706175736564000000000000000000dffada2889ebfab9224c24069d833f3de835d8cf99872d49e7b7ba5fccb7a46f73657428616464726573732c75696e743235362c75696e7432353629000000006ee09c6cb801194690c195c69f465aaf7c80255cbeafaab9600f47ed79de2ca97374206e6f74206265207a65726f000000000000000000000000000000000000416c6c6f6320706f696e7473207065722072657761726420746f6b656e206d750000000000000000000000000000000000000000000000000000000073d025d600000000000000000000000000000000000000000000000000000000782d6fe1000000000000000000000000000000000000000000000000000000007ac92456696e636f6e73697374656e74207374617465000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9059cbb00000000000000000000000000000000000000000000000000000000e03fe177bb050a40ea1b3ecd64121a3fa063a94b6d404b2f45c64697555efe0ec5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706f742073756363656564000000000000000000000000000000000000000000005361666542455032303a204245503230206f7065726174696f6e20646964206ee31da05fae6db869f5ea51f4b638aa6884070b6c87f18f63bd2291a12cb2f5186e6f7468696e6720746f207769746864726177000000000000000000000000002064657465726d696e65640000000000000000000000000000000000000000005856535661756c743a3a6765745072696f72566f7465733a206e6f742079657400000000000000000000000000000000000000000000000000000000fffffffe5ff5631500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006dd77cbc000000000000000000000000000000000000000000000000000000006dd77cbd000000000000000000000000000000000000000000000000000000006fcfff45000000000000000000000000000000000000000000000000000000005ff56315000000000000000000000000000000000000000000000000000000006857249c616c726561647920696e697469616c697a6564000000000000000000000000000200000000000000000000000000000000000080000000800000000000000000559f314bb90394a4a9ceb724f365b36a53587d894352c43d12901fd680101456000000000000000000000000000000000000000000000000000000005c19a95c000000000000000000000000000000000000000000000000000000005c60da1b000000000000000000000000000000000000000000000000000000005f14e7006472657373206973206e6f7420736574000000000000000000000000000000005856535661756c743a3a6765745374616b65416d6f756e743a2078767320616424f52bbf00000000000000000000000000000000000000000000000000000000358ae03600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004298bdbc000000000000000000000000000000000000000000000000000000004298bdbd00000000000000000000000000000000000000000000000000000000587cde1e00000000000000000000000000000000000000000000000000000000358ae036000000000000000000000000000000000000000000000000000000003d4180f90000000000000000000000000000000000000000000000000000000024f52bbf0000000000000000000000000000000000000000000000000000000026782247000000000000000000000000000000000000000000000000000000002eda5c6c115b512f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d504dc5000000000000000000000000000000000000000000000000000000001d504dc60000000000000000000000000000000000000000000000000000000020606b7000000000000000000000000000000000000000000000000000000000115b512f0000000000000000000000000000000000000000000000000000000019129e5af851a4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000006e730000000000000000000000000000000000000000000000000000000000006f6e6c792070726f78792061646d696e2063616e206368616e67652062726169c1e80334000000000000000000000000000000000000000000000000000000006368616e6765206e6f7420617574686f72697a656400000000000000000000006f6e6c792061646d696e2063616e000000000000000000000000000000000000020000000000000000000000000000000000004000000080000000000000000066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0696e76616c696420616365737320636f6e74726f6c206d616e616765722061646472657373000000000000000000000000000000000000000000000000000000323820626974730000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e20316573206f766572666c6f770000000000000000000000000000000000000000005856535661756c743a3a726571756573745769746864726177616c3a20766f7437f23cd30000000000000000000000000000000000000000000000000000000088a254a0ef28a0b9e957ff600beae69870f6f924065147f3627c3f814e60ec1172657175657374656420616d6f756e7420697320696e76616c6964000000000072657175657374656420616d6f756e742063616e6e6f74206265207a65726f0000000000000000000000000000000000000000000000000000000000046f7da2000000000000000000000000000000000000000000000000000000000af13728000000000000000000000000000000000000000000000000000000000efe6a8b5661756c74206973207061757365640000000000000000000000000000000000657865637574652070656e64696e67207769746864726177616c00000000000023b872dd000000000000000000000000000000000000000000000000000000005361666542455032303a2063616c6c20746f206e6f6e2d636f6e7472616374007700000000000000000000000000000000000000000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f5856535661756c743a3a6465706f7369743a20766f746573206f766572666c6fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d75361666542455032303a206c6f772d6c6576656c2063616c6c206661696c656472652d656e7465726564000000000000000000000000000000000000000000007661756c743a20706f6f6c206578697374733f00000000000000000000000000726573756d652829000000000000000000000000000000000000000000000000d2619572a1464e0df0bb351d834fd47f3350984d7bfdb1ab69cfcb0b8e4214155661756c74206973206e6f742070617573656400000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0001beba02ab62eea76adc759b4e16024b96ecb05987b77d0db148c87b4921e51b0f", + "deployedBytecode": "0x00040000000000020000000003010019000000600330027000000fc7043001970003000000410355000200000001035500000fc70030019d00000001012001900000000b0000c13d00000000010000193f16001d0000040f0000008001000039000000400010043f0000000001000416000000000101004b0000001b0000c13d000000000100041100000fc801100197000000000200041a00000fc902200197000000000112019f000000000010041b00000020010000390000010000100443000001200000044300000fca0100004100003f170001042e000000000100001900003f180001043000110000000000020000008006000039000000400060043f0000000002000416000000000101004b000000300000613d000000000102004b000000350000c13d000000000100041100000fc801100197000000000200041a00000fc902200197000000000112019f000000000010041b00000020010000390000010000100443000001200000044300000fca0100004100003f170001042e000000000102004b000000350000c13d0000000002000031000000030120008c000000370000213d000000000100001900003f18000104300000000201000367000000000401043b000000e00340027000000fcb0540009c000000d50000813d000010520540009c0000016e0000813d0000107f0540009c0000019a0000813d000010890440009c000002d20000813d000010a20430009c000007460000613d000010a30430009c000006aa0000613d000010a40330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000f0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000502043b0000002401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000b00000005001d000c00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d0000000f0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000900000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000800000001001d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000c0200002900070005202000cd000000000101043b0000000701100029001000000001001d0000000201100039000e00000001001d000000000101041a001100000001001d0000007a01000039000000000101041a000000ff01100190000018030000c13d00000fe30100004100000000001004390000000001000414000018060000013d00000fcc0540009c000001850000813d0000100a0540009c000001ae0000813d0000103a0440009c000002f40000813d0000104a0430009c000007700000613d0000104b0430009c000006df0000613d0000104c0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b000e0fc80020019b00000fc80220009c000000350000213d0000004401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000b00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d0000000e0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b0200002900080005202000cd000000000101043b0000000801100029000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000019fa0000c13d00000fe30100004100000000001004390000000001000414000019fd0000013d000010530540009c000001ef0000813d000010710440009c000003980000813d0000107a0430009c000007aa0000613d0000107b0430009c000007200000613d0000107c0330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d0000001201000039000003bc0000013d00000fcd0540009c000002a90000813d00000ffa0440009c000003a00000813d000010070430009c000007d70000613d000010080430009c000007220000613d000010090330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000000801000039000001ac0000013d000010800440009c000003a80000813d000010860430009c000007d90000613d000010870430009c0000072c0000613d000010880330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000000601000039000000200010043f000009f70000013d0000100b0440009c000003c70000813d000010370430009c000007db0000613d000010380430009c0000072e0000613d000010390330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a001100000001001d00000fc701100198000000000100001900000a860000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000000ff60110019700000a860000013d000010540440009c000004620000813d000010620430009c000007dd0000613d000010630430009c000007300000613d000010640330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000c0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000a00000006001d000b00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000c0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000c0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000800000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000700000001001d0000000c0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000301043b000000000103041a000000000201004b000e00000000001d000d00000000001d000018340000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe80200004100000000002104350000001b0200003900000000002304350000000d040000290010000e0040002d000000100240006b00000000040000190000000104004039000000400200043d0000000104400190000019d80000613d00000fde0400004100000000004204350000000404200039000000200500003900000000005404350000000003030433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b0000029f0000413d000000000134004b0000127f0000a13d0000127d0000013d00000fce0440009c000004a00000813d00000ff20430009c000007e50000613d00000ff30430009c000007440000613d00000ff40330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d00000ff50110009c000000350000813d0000001001000039000000200010043f0000000000200435000000400200003900000000010000193f163ef70000040f000000200010043f00000011010000290000000000100435000000000100001900000040020000393f163ef70000040f000000000101041a00000fc702100197000000800020043f000000200110027000000ff601100197000000a00010043f00000ff70100004100003f170001042e0000108a0430009c000004a80000213d0000108d0430009c000007ef0000613d0000108e0330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000201043b00000fc80120019700000fd60220009c000000350000813d000000000200041a0000000003000411000000000223013f00000fc80220019800000a930000c13d000000000201004b00000c130000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f0000109801000041000000c40010043f0000109901000041000000e40010043f000010060100004100003f18000104300000103b0430009c000004b50000213d0000103e0430009c0000080a0000613d0000103f0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b001000000002001d0000004401100370000000000101043b000f0fc80010019b00000fc80110009c000000350000213d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000100220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000e00000001001d000000110100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c90000000e02200029000000000101043b000c00000001001d000e00000002001d0000000301200039000000000101041a000d00000001001d000000110100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000800000001001d0000000e01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000900000003001d00000004033000390000000000230435000000400200043d000a00000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040220008c000018c70000c13d0000000103000031000018fb0000013d000010720430009c000005030000213d000010750430009c000008450000613d000010760130009c000000350000c13d0000007901000039000009fa0000013d00000ffb0430009c0000051a0000213d00000ffe0430009c0000087b0000613d00000fff0130009c000000350000c13d0000000301000039000008a00000013d000010810430009c000005220000213d000010840430009c0000089f0000613d000010850330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d00000fc80110009c000000350000213d0000001501000039000000200010043f0000000000200435000000400200003900000000010000193f163ef70000040f000000200010043f0000001101000029000000000010043500000000010000190000004002000039000009f90000013d0000100c0430009c000005350000213d0000100f0430009c000008a50000613d000010100330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b00100fc80010019b00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000400300043d0000002002300039000f00000001001d000000000401041a0000000501400210000d00000002001d0000000001120019000000400010043f000c00000003001d0000000000430435000e00000004001d000000000104004b000004450000613d0011000d0000002d001000000000001d0000000f010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000400200043d0000006003200039000000400030043f000000100600002900000001036002100000000001310019000000000301041a00000000033204360000000101100039000000000101041a0000008004100270000000400520003900000000004504350000103101100197000000000013043500000011010000290000000001210436001100000001001d0000000106600039001000000006001d0000000e0160006c000004230000413d000000400100043d000000200200003900000000032104360000000c02000029000000000202043300000000002304350000004001100039000000000302004b0000045f0000613d00000000030000190000000d070000290000000074070434000000006504043400000000055104360000000006060433000010310660019700000000006504350000004004400039000000000404043300001031044001970000004005100039000000000045043500000060011000390000000103300039000000000423004b000004500000413d000000400200043d0000000001210049000004fb0000013d000010550430009c000006640000213d000010580430009c000008dd0000613d000010590330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000500000002001d0000002401100370000000000101043b000600000001001d000000c001000039000000400010043f0000001c01000039000000800010043f0000105e02000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f000001400000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000cb30000c13d000000010300003100000cda0000013d00000fcf0430009c000006a40000213d00000fd20130009c000008e70000613d00000fd30130009c000000350000c13d000000000100041a000008a10000013d0000108b0430009c000008eb0000613d0000108c0130009c000000350000c13d0000101101000041000000800010043f0000101201000041000000a00010043f0000101301000041000000c00010043f00000080010000390000004302000039000007eb0000013d0000103c0430009c0000090c0000613d0000103d0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000501043b000000000105041a000000000201004b001000000000001d000011090000c13d000000400100043d00000010020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f00003f170001042e000010730430009c000009310000613d000010740330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000001102000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000000000101041a00000fc701100197000000800010043f00000fd40100004100003f170001042e00000ffc0130009c000009dc0000613d00000ffd0130009c000000350000c13d0000100001000041000000800010043f00000fd40100004100003f170001042e000010820430009c000009ec0000613d000010830330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000f02000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000008a00000013d0000100d0430009c000009fe0000613d0000100e0330009c000000350000c13d00000fd50320009c000000350000213d000000c30220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000f00000002001d0000002402100370000000000202043b001000000002001d0000006402100370000000000202043b000e00000002001d000001000220008c000000350000813d000000a402100370000000000202043b000d00000002001d0000008401100370000000000101043b000c00000001001d0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000101101000041000000800010043f0000101201000041000000a00010043f0000101301000041000000c00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001014011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000b00000001001d000000c001000039000000400010043f0000000801000039000000800010043f0000101501000041000000a00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001016011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d00001017010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000400300043d0000006002300039000000000012043500000040013000390000000a02000029000000000021043500000020013000390000000b020000290000000000210435000000000100041000000fc80110019700000080023000390000000000120435000000400100043d00000000021200490000000002210436000b00000003001d000000a003300039000a00000003001d000000400030043f00000fc70320009c00000fc7020080410000004002200210000000000101043300000fc70310009c00000fc7010080410000006001100210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d00000ff8010000410000000a0200002900000000001204350000000b04000029000000c00140003900000ff9020000410000000000210435000000400300043d0000000001340049000000da0110003900000fc70210009c00000fc701008041000000600110021000000fc70230009c000b00000003001d00000fc70200004100000000020340190000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b040000290000006002400039000000100300002900000000003204350000004002400039000000110300002900000000003204350000002002400039000000000012043500000080014000390000000f020000290000000000210435000000400200043d00000000012100490000000001120436000000a003400039000000400030043f00000fc70310009c00000fc7010080410000004001100210000000000202043300000fc70320009c00000fc7020080410000006002200210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b04000029000000c00240003900001018030000410000000000320435000000c20240003900000009030000290000000000320435000000e2024000390000000000120435000000400100043d000000000212004900000000022104360000010203400039000000400030043f00000fc70320009c00000fc7020080410000004002200210000000000101043300000fc70310009c00000fc7010080410000006001100210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000400200043d000000000101043b0000000d03000029000010190330009c000014dd0000813d0000000e03000029000000ff0330018f0000001b0430008a000000010440008c000016520000213d0000000004020436000000400040043f00000080052000390000000d06000029000000000065043500000060052000390000000c060000290000000000650435000000400520003900000000003504350000000000140435000000400300043d000e00000003001d0000000001320049000000a00110003900000fc70210009c00000fc701008041000000600110021000000fc70230009c00000fc70200004100000000020340190000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000001020000393f163f110000040f0000000e03000029000000200430008a0000000003010019000000600330027000000fc703300197000000200530008c000000200600003900000000060340190000001f0560018f0000000506600272000006490000613d0000002007400039000000000801034f0000000009040019000000008a08043c0000000009a90436000000000a79004b000006450000c13d000000000705004b000006580000613d0000000506600210000000000761034f00000000046400190000000305500210000000000604043300000000065601cf000000000656022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000565019f0000000000540435000100000003001f00030000000103550000000102200190000019250000613d000000400100043d000000200210008a0000000002020433000c0fc80020019c00001bfb0000c13d00000044021000390000103003000041000012850000013d000010560430009c00000a0d0000613d000010570330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002401100370000000000201043b0000001301000039000000000101041a000000ff0110019000000bc30000c13d001000000002001d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000100220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c9000000000101043b0000000001210019000e00000001001d0000000201100039000d00000001001d000000000101041a000f00000001001d0000007a01000039000000000101041a000000ff01100190000011630000c13d00000fe30100004100000000001004390000000001000414000011660000013d00000fd00430009c00000a370000613d00000fd10130009c000000350000c13d0000001601000039000008a00000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000701000039000000200010043f000000400200003900000000010000193f163ef70000040f00000011020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f00000010020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f0000000201100039000000000101041a00000a860000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000701000039000000200010043f000000400200003900000000010000193f163ef70000040f00000011020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f00000010020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f0000000102100039000000000202041a000000000301041a0000000201100039000000000101041a000000400400043d00000040054000390000000000150435000000200140003900000000002104350000000000340435000000400100043d0000000002140049000000600220003900000a8b0000013d0000000201000039000008a00000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000602000039000009f50000013d0000000101000039000008a00000013d0000004701000039000008a00000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000101043b000d00000001001d0000007a01000039000000000101041a000000ff0110019000000a9d0000c13d00000fe3010000410000000000100439000000000100041400000aa00000013d0000001801000039000009fa0000013d000000c001000039000000400010043f0000000801000039000000800010043f000010b002000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197001000000004001d000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f0000012c0000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000b130000c13d000000010300003100000b3a0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d0000000801000039000000200010043f0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000200200003900000000010000193f163ef70000040f000000110200002900000005322000c900000000012100190000000102100039000000000202041a0000000203100039000000000303041a0000000304100039000000000404041a000000000501041a0000000401100039000000000101041a000000400600043d0000008007600039000000000017043500000060016000390000000000410435000000400160003900000000003104350000002001600039000000000021043500000fc8015001970000000000160435000000400100043d0000000002160049000000a00220003900000a8b0000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b000d0fc80010019b00000fd60110009c000000350000813d0000001301000039000000000101041a000000ff0110019000000bc30000c13d000000000100041100000fc801100197000c00000001001d00000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000b0fc80010019b0000000501000039000000000101041a00000fc80110019800000c2e0000c13d000000400100043d00000064021000390000107d03000041000000000032043500000044021000390000107e0300004100000000003204350000002402100039000000300300003900000bd60000013d0000007a01000039000007de0000013d0000000401000039000008a00000013d0000001701000039000008a00000013d0000001301000039000000000101041a000000ff011001900000000001000019000000010100c039000000800010043f00000fd40100004100003f170001042e00000ff801000041000000800010043f00000ff901000041000000a00010043f00000080010000390000003a020000393f163ef70000040f000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000f0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000502043b0000002401100370000000000401043b0000000301000039000000000201041a0000104d0320019800000ba10000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000000a01000039000000a40010043f000010ae01000041000000c40010043f000010030100004100003f180001043000000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000e00000002001d0000002401100370000000000101043b000f00000001001d000000e001000039000000400010043f0000003301000039000000800010043f0000104502000041000000a00020043f0000104603000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001770000043f00000fda01000041000000000010043900000fc801400197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040320008c00000e770000c13d000000010300003100000e9e0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002401100370000000000301043b00000fc80130019700000fc80330009c000000350000213d000000000300041a0000000004000411000000000334013f00000fc80330019800000a930000c13d000000000302004b00000ca90000613d000000000301004b00000ca90000613d0000000503000039000000000403041a00000fc805400198000010c40000c13d00000fc904400197000000000424019f0000000405000039000000000605041a000000000043041b00000fc903600197000000000313019f000000000035041b0000000303000039000000000403041a0000104e0440019700000fd6044001c7000000000043041b00000fc803600197000000800000043f000000a00030043f000000c00020043f000000e00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001078011001c70000800d020000390000000103000039000010790400004100000c230000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b00100fc80020019b00000fd60220009c000000350000813d000000000200041a0000000003000411000000000223013f0000004401100370000000000301043b00000fc80120019800000a930000c13d000f00000003001d000000110100006b00000eef0000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000002201000039000000a40010043f0000100401000041000000c40010043f0000100501000041000000e40010043f000010060100004100003f18000104300000000501000039000000000101041a00000fc801100197000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000101043b000600000001001d000000e001000039000000400010043f0000003001000039000000800010043f0000103202000041000000a00020043f0000103303000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001740000043f00000fda01000041000000000010043900000fc801400197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000efb0000c13d000000010300003100000f220000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000e02000039000009f50000013d00000ff101000041000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00110fc80010019b00000fd60110009c000000350000813d0000108f01000041000000800010043f00000fda01000041000000000010043900000011010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00000f540000c13d000000010300003100000f7c0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000300041a0000000004000411000000000434013f0000002401100370000000000301043b00000fc80140019800000a930000c13d0000007a01000039000000000401041a0000ff000540019000000c240000c13d00000000053201a000000e6d0000613d000000000502004b00000fa70000613d000000000503004b00000fa70000613d00000fde01000041000000800010043f0000002001000039000000840010043f000000a40010043f0000104401000041000000c40010043f000010030100004100003f180001043000000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b00100fc80010019b00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a001100000001001d0000000004000019000f00000004001d0000001103000029000000000103004b000012890000613d00110001003000920000001002000029000000000102041a000000110110006b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000e00000001001d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000110300002900000001043002100000000e024000290000000102200039000000000202041a0000103102200197000000000101043b000000000112004b000012890000213d000e00000004001d0000001002000029000000000102041a000000000113004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e01100029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b0400003900000000004204350000000f04300029000000000334004b0000000003000019000000010300403900000001033001900000097c0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000009d20000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110019000000a7a0000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d00000a850000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000902000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000000000101041a000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000001402000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000007de0000013d000000c001000039000000400010043f0000000701000039000000800010043f0000105a02000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197001000000004001d000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f0000012b0000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000b550000c13d000000010300003100000b7c0000013d00000fd50320009c000000350000213d000000a30220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b000500000002001d0000004402100370000000000202043b000a0fc80020019b00000fd60220009c000000350000813d0000008402100370000000000202043b000300000002001d0000006401100370000000000101043b000400000001001d000000e001000039000000400010043f0000002c01000039000000800010043f00000fd702000041000000a00020043f00000fd803000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001700000043f00000fda01000041000000000010043900000fc801400197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00000fcc0000c13d000000010300003100000ff40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000400200043d0000000000120435000000400100043d0000000002120049000000200220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f00003f170001042e00000fde01000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000109501000041000000c40010043f000010030100004100003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d0110006b00000bcd0000813d0000000e0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a00110fc70010019c000000000100001900000a860000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000010220008a001100000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000e0200002900000000002004350000001002000039000000200020043f00000fc7011001970000000d0110006c000012190000a13d000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000000000435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f00000011030000290000000102200190000000350000613d000000000101043b000000000101041a00000fc7011001970000000d0110006c000000000100001900000a860000213d000000000103004b0000000002000019000015910000c13d001100000002001d0000000e0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f0000000001000414000012270000013d00000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000b270000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000b230000c13d000000000604004b00000b360000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000be00000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000001302000039000000000302041a000000ff04300190000010ce0000c13d0000004403100039000010b204000041000000000043043500000024031000390000000000230435000010800000013d00000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000b690000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000b650000c13d000000000604004b00000b780000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000bfa0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000001302000039000000000302041a000000ff04300190000010e20000c13d000010b40330019700000001033001bf000000000032041b00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d0200003900000002030000390000105d04000041000010dc0000013d000b00000005001d000c00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110006b000010790000813d0000000b0100006b000011940000c13d000000400100043d0000004402100039000010a103000041000000000032043500000024021000390000001f030000390000107f0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000000f01000039000000a40010043f000010a501000041000000c40010043f000010030100004100003f1800010430000000400100043d00000064021000390000106e03000041000000000032043500000044021000390000106f03000041000000000032043500000024021000390000002b03000039000000000032043500000fde020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000008401100039000010880000013d0000001f0430018f000000050230027200000bea0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00000be60000c13d000000000504004b00000bf80000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000000050220021000000c040000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00000c000000c13d000000000504004b00000c110000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000004702000039000000000302041a00000fc904300197000000000414019f000000000042041b00000fc802300197000000800020043f000000a00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001096011001c70000800d0200003900000001030000390000109704000041000010dd0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f0000104101000041000000c40010043f000010030100004100003f180001043000000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d000000000101041a000e00000001001d000000000101004b001100000000001d000010e80000c13d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a00000fc9022001970000000d07000029000000000272019f000000000021041b000000400100043d00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d02000039000000040300003900001022040000410000000c050000290000000b060000293f163f0c0000040f0000000101200190000000350000613d0000000b020000290000000d0120006c000010e00000613d000000110100006b000010e00000613d0000000b0100006b000012a50000c13d0000000d0100006b000010e00000613d0000000d0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000f00000001001d000e0fc70010019c001000000000001d000016730000c13d000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b0300003900000000003204350000001004000029000000110340002900110ff60030019b000000110340006b0000193e0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00000c9f0000413d000000000124004b000011e60000a13d000011e40000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001801000039000000a40010043f00000ff001000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000cc70000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000cc30000c13d000000000604004b00000cd60000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000fb20000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000c00000002001d000000060120006b000010790000813d001100000000001d00000d040000013d00000011020000290000000102200039001100000002001d0000000c0120006c000015f80000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff0110019000000d300000613d00000fe1010000410000000000100439000000000100041400000d330000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c00000cff0000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000a00000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c00000d610000c13d000000010300003100000d930000013d00000010040000290000000a03400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c00000020050000390000000005034019000000050450027200000d800000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00000d7c0000c13d0000001f0550019000000d8f0000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f0003000000010355000000010220019000001a2b0000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b000018b00000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b00000dd00000c13d000000000101004b00000dd70000613d00000fe1010000410000000000100439000000000100041400000e610000013d000900000005001d000000000101004b00000ddb0000613d00000fe1010000410000000000100439000000000100041400000dde0000013d00000fe3010000410000000000100439000000000100041400000e610000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000a00000005001d000000000345004b00001a450000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000700000002001d000000000101043b000000000101041a000800000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b030000290000000a04000029000000000234004b000000000200001900000fe6060000410000001a07000039000000080500002900000e2b0000613d0000000002340049000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00000e2a0000613d00000007321000b900000000311200d9000000070110006c00000e2b0000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000000006104350000000000730435000000000405004b00001a5c0000613d000000000125004b000000000300001900000e3b0000213d00000000215200d900000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000009020000290000001005200069000000400100043d0000004002100039000000400020043f0000002002100039000000000062043500000000007104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b00000000050000190000000105004039000000010550019000001a730000c13d000000000034041b0000007a01000039000000000101041a000000ff0110019000000e5e0000613d00000fe1010000410000000000100439000000000100041400000e610000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000cff0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001701000039000000a40010043f0000104201000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c00110021000000fdc011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000e8b0000613d000000000601034f000000006706043c0000000008780436000001000780008c00000e870000c13d000000000604004b00000e9a0000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010160000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000f0220006b000010790000813d0000000e02000029000000010220008a000010470220009c000012dd0000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f0600002900000005326000c900000000011200190000000401100039000000000201041a0000000e04000029000000000041041b000000400100043d000000200310003900000000004304350000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000030300003900001049040000410000001105000029000010dd0000013d000000100100006b000010300000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f0000100201000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c00110021000000fdc011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000f0f0000613d000000000601034f000000006706043c0000000008780436000001000780008c00000f0b0000c13d000000000604004b00000f1e0000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010900000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000003020433000000000203004b0000000002000019000000010200c039000000000223004b000000350000c13d001100240010003d0000000402100039000000000303004b000012010000613d0000000403000039000000000303041a000010340400004100000000004104350000000e010000290000000000120435000000400100043d000f00000001001d00000fda01000041000000000010043900000fc801300197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c000012e40000c13d0000000103000031000013170000013d00000fc70210009c00000fc701008041000000c00110021000001090011001c700000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200000f690000613d0000008006000039000000000701034f000000007807043c0000000006860436000000a00860008c00000f650000c13d000000000604004b00000f780000613d0000000505500210000000000651034f00000003044002100000008005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010aa0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d000000000202043300000fd60320009c000000350000813d0000000003000411000000000223013f001000040010003d00000fc8022001980000120b0000c13d00001093020000410000000000210435000000400100043d000f00000001001d00000fda01000041000000000010043900000011010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000013640000c13d0000000103000031000013970000013d000000000502004b000010000300c0410000007905000039000000000035041b000010b5022001970000104303400197000000000223019f00000100022001bf000000000021041b000000000100001900003f170001042e0000001f0430018f000000050230027200000fbc0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00000fb80000c13d000000000504004b00000fca0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fc70210009c00000fc701008041000000c00110021000000fdc011001c700000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000fe10000613d000000000601034f000000006706043c0000000008780436000001000780008c00000fdd0000c13d000000000604004b00000ff00000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000011e80000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000000e0200006b000012830000613d0000000a0200006b000012830000613d0000000402000039000000000202041a00000fc802200198000013a90000c13d000000440210003900000fef0300004100000bbf0000013d000000440210003900000fdd03000041000000000032043500000024021000390000000c030000390000107f0000013d0000001f0430018f0000000502300272000010200000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000101c0000c13d000000000504004b0000102e0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000100100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000f0110006b000010790000813d0000001601000039000000000101041a0000001702000039000000000202041a0000001803000039000000000303041a000000400400043d00000060054000390000000f0600002900000000006504350000004005400039000000000035043500000020034000390000001005000029000000000053043500000fc8022001970000000000240435000000400200043d0000000003240049000000800330003900000fc70430009c00000fc703008041000000600330021000000fc70420009c00000fc7020080410000004002200210000000000223019f000000000300041400000fc70430009c00000fc703008041000000c003300210000000000232019f00000fc80510019700000fec012001c70000800d020000390000000303000039000010010400004100000011060000293f163f0c0000040f0000000101200190000000350000613d0000001603000039000000000103041a00000fc90110019700000011011001af000000000013041b0000001703000039000000000103041a00000fc90110019700000010011001af000000000013041b0000000f010000290000001802000039000000000012041b000000000100001900003f170001042e000000400100043d0000004402100039000010af03000041000000000032043500000024021000390000001303000039000000000032043500000fde020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d0000000001210049000000640110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f00003f18000104300000001f0430018f00000005023002720000109a0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000010960000c13d000000000504004b000010a80000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000010b40000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000010b00000c13d000000000504004b000010c20000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fde01000041000000800010043f0000002001000039000000840010043f0000001301000039000000a40010043f0000107701000041000000c40010043f000010030100004100003f1800010430000010b403300197000000000032041b00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d020000390000000203000039000010b10400004100000010050000293f163f0c0000040f0000000101200190000000350000613d000000000100001900003f170001042e00000044021000390000105c030000410000000000320435000000240210003900000017030000390000107f0000013d00000000040000190000000f02000029000000000102041a001100000004001d000000000114004b00003c330000813d0000000501000039000000000101041a001000000001001d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110400002900000005324000c9000000000101043b0000000001210019000000000101041a000000100110014f00000fc801100198000012300000613d00000001044000390000000e0140006c0000000f02000029000010ea0000413d001100000000001d00000c410000013d0000000007010019000e00000000001d001000000000001d000f00000005001d000011100000013d000000000207004b000004f50000613d000000010770008a000000000117004b00003c330000813d001100000007001d0000000000500435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011070000290000000102700210000000000101043b00000000022100190000000f05000029000000000105041a0000000103200039000000000303041a0000102a03300197000010400330009c0000113b0000c13d000000000317004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80600004100000000006204350000001b060000390000000000630435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000110e0000613d0000128c0000013d000000000317004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80600004100000000006204350000001b060000390000000000630435001000100040002d000000100440006b0000000004000019000000010400403900000001044001900000110e0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000013b10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000011590000413d000000000214004b000013b10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000f0110006c000010e00000a13d0000000e01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000b00000003001d00000004033000390000000000230435000000400200043d000c00000002001d00000fda02000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c000013b70000c13d0000000103000031000013eb0000013d0000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000a00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000201100039000800000001001d000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000b03400029000000000443004b000000000400001900000001040040390000000104400190000014340000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000011db0000413d000000000124004b000011e60000a13d000000000132001900000000000104350000001f01200039000013b20000013d0000001f0430018f00000005023002720000000502200210000011f20000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000011ee0000c13d000000000504004b000011ff0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fde030000410000000000310435000000200300003900000000003204350000000c0200003900000011030000290000000000230435000000440210003900000fdd03000041000010840000013d00000fde0200004100000000002104350000002002000039000000100300002900000000002304350000006402100039000010910300004100000000003204350000004402100039000010920300004100000000003204350000002402100039000000220300003900000bdb0000013d000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f00000001022001900000001102000029000000350000613d000000000101043b0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000001ea0000013d0000000501000039000000000101041a00000fc80110019700000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a0000000201100039000000000401041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50200004100000000002104350000001e020000390000000000250435000000400200043d000000000643004b000015d40000813d00000fde0300004100000000003204350000000403200039000000200400003900000000004304350000000003050433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000012740000413d000000000134004b0000127f0000a13d000000000123001900000000000104350000001f01300039000010b3011001970000000001210019000013b40000013d000000440210003900000ff0030000410000000000320435000000240210003900000018030000390000107f0000013d000000400100043d0000000f02000029000004f70000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000013b10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000012990000413d000000000214004b000013b10000a13d00000000023100190000000000020435000013b10000013d0000000b0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000f00000001001d000e0fc70010019c001000000000001d000015720000c13d000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c0300003900000000003204350000001004000029000000110340006c0000166b0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000012d30000413d000000000124004b000011e60000a13d000011e40000013d000000400100043d00000044021000390000104803000041000000000032043500000024021000390000001a030000390000107f0000013d0000000f04000029000000110240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013040000613d0000000f080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013000000c13d000000000604004b000013130000613d0000000505500210000000000651034f0000000f055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000143f0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b0000164c0000613d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000c00000001001d000000000101004b00001a8a0000c13d0000000e0100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000604000029000000000041041b000000400100043d000000200310003900000000004304350000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000020300003900001036040000410000000e05000029000010dd0000013d0000000f04000029000000100240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013840000613d0000000f080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013800000c13d000000000604004b000013930000613d0000000505500210000000000651034f0000000f055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000014590000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000202004b000010e00000613d000000440210003900001094030000410000000000320435000000240210003900000015030000390000107f0000013d000000050200006b000014730000c13d000000440210003900000fee03000041000000000032043500000024021000390000001d030000390000107f0000013d0000001f01100039000010b3011001970000000001310019000000400200043d0000000001210049000010880000013d0000000c040000290000000b02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013d80000613d0000000c080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013d40000c13d000000000604004b000013e70000613d0000000505500210000000000651034f0000000c055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000014e30000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000f00000001001d000000110100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435001000000004001d0000000f0340006b000019cc0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000142a0000413d000000000124004b000011e60000a13d000019240000013d0000000901000029000000000101041a000000000131004b000014fd0000813d000000400100043d0000004402100039000010a003000041000000000032043500000024021000390000001b030000390000107f0000013d0000001f0430018f0000000502300272000014490000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000014450000c13d000000000504004b000014570000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000014630000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000145f0000c13d000000000504004b000014710000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000c00000001001d000000000101004b000016920000c13d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000201043b000000000102041a000f00000001001d000000000101004b001000000002001d00001cd80000c13d0000000a0100002900000000001004350000001401000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000ff0110019000001e1f0000c13d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435001100050030002d000000110330006b000000000300001900000001030040390000000103300190000021040000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000014d30000413d000000000124004b000011e60000a13d000019240000013d00000064012000390000101a03000041000000000031043500000044012000390000101b03000041000016570000013d0000001f0430018f0000000502300272000014ed0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000014e90000c13d000000000504004b000014fb0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000700000001001d0000000f0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000000201004b000021360000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000c02000029000e0005202000cd000000000101043b0000000e01100029000d00000001001d0000000201100039000600000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000025d40000c13d00000fe30100004100000000001004390000000001000414000025d70000013d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000012b80000013d001000000000001d000000400100043d0000004002100039000000400020043f0000002002100039000000000002043500000000000104350000000e0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f001000100000002d0000001104000029000000100340006a00001070033001970000000102200190000000350000613d00000001023002700000000002240049000000000101043b000f00000002001d00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c70000801002000039001100000004001d3f163f110000040f00000011050000290000000102200190000000350000613d000000000101043b000000400300043d0000004002300039000000400020043f000000000101041a00000fc7021001970000000003230436000000200110027000000ff60110019700000000001304350000000d04000029000000000342004b00000a860000613d0000000f03000029000000010130008a000000000242004b0000000005018019001100000005001d000000100300802900000fc70230019700000fc701500197000000000121004b001000000003001d000015920000213d00000aff0000013d0000006001200039000000400010043f00000040012000390000101f05000041000000000051043500000028010000390000000001120436000010200500004100000000005104350000000003430049001100000003001d000010210330009c00000c410000413d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000015ee0000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000060110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000060200002900000005322000c9000f00010020003d0000000f01100029000000000101041a001000000001001d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400400043d0000004001400039000000400010043f000000200140003900000fe50200004100000000002104350000001e020000390000000000240435000000400200043d000000100530006c00001f860000813d00000fde0300004100000000003204350000000403200039000000200500003900000000005304350000000003040433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000016420000413d000000000134004b0000127f0000a13d0000127d0000013d000000440210003900001035030000410000000000320435000000240210003900000014030000390000107f0000013d00000064012000390000101a03000041000000000031043500000044012000390000101c03000041000000000031043500000024012000390000002203000039000000000031043500000fde010000410000000000120435000000040120003900000020030000390000000000310435000000400100043d0000000002120049000000840220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f00003f18000104300000007a01000039000000000101041a000000ff01100190000019460000c13d00000fe30100004100000000001004390000000001000414000019490000013d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b00000c820000013d001100000000001d000016a70000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000011020000290000000102200039001100000002001d0000000c0120006c000014850000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000016d30000613d00000fe10100004100000000001004390000000001000414000016d60000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c000016a20000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000900000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c000017040000c13d0000000103000031000017360000013d00000010040000290000000903400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000000504500272000017230000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000171f0000c13d0000001f05500190000017320000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000102200190000020990000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b00001f6f0000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b000017730000c13d000000000101004b000016940000613d00000fe10100004100000000001004390000000001000414000016970000013d000700000005001d000000000101004b0000177a0000613d00000fe101000041000000000010043900000000010004140000177d0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000900000005001d000000000345004b000020bf0000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000600000002001d000000000101043b000000000101041a000800000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000009030000290000000b0230006c0000000002000019000017c70000613d00000009030000290000000b0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000017c60000613d00000006321000b900000000311200d9000000060110006c000017c70000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a0400003900000000004304350000000805000029000000000405004b000020d60000613d000000000125004b0000000003000019000017da0000213d00000008212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000007020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe60400004100000000004204350000001a0200003900000000002104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b000000000500001900000001050040390000000105500190000020ed0000c13d000000000034041b0000007a01000039000000000101041a000000ff01100190000017ff0000613d00000fe10100004100000000001004390000000001000414000016970000013d00000fe30100004100000000001004390000000001000414000016970000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000110110006c000026350000a13d0000001001000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000600000003001d00000004033000390000000000230435000000400200043d000d00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00001ef20000c13d000000010300003100001f260000013d0000000004010019000d00000000001d000e00000000001d001000000003001d000000010440008a000000000114004b00003c330000813d001100000004001d0000000000300435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000110300002900000001043002100000000f024000290000000102200039000000000202041a0000103102200197000000000101043b000000000112004b000002830000213d000f00000004001d0000001002000029000000000102041a000000000113004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f011000290000001005000029000000000305041a0000000102100039000000000202041a0000102a02200197000010400220009c000f00000003001d000018870000c13d000000110230006b00003c330000813d000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000d000d0030002d0000000d0330006b000000000300001900000001030040390000000103300190000018980000613d00001faa0000013d000000110230006b00003c330000813d000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000e000e0030002d0000000e0330006b00000000030000190000000103004039000000010330019000001fc10000c13d0000000000500435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000201043b0000000f01000029000000010110008a00000001031002100000000002320019000000000002041b0000000102200039000000000002041b0000001003000029000000000013041b0000001104000029000000000204004b000018380000c13d000002830000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000018bd0000413d000000000124004b000011e60000a13d000011e40000013d0000000a040000290000000902400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000b020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000018e80000613d0000000a080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000018e40000c13d000000000604004b000018f70000613d0000000505500210000000000651034f0000000a055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000001c270000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d00000000040104330000004001200039000000400010043f0000001e01000039000000000112043600000fe5030000410000000000310435000b00000004001d000000080340006c00001cf40000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000191b0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f000000050230027200000005022002100000192f0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b0000192b0000c13d000000000504004b0000193c0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000007a01000039000000000101041a000000ff0110019000001c410000c13d00000fe3010000410000000000100439000000000100041400001c440000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000c00000004001d00000ff50340009c00001cc10000813d0000001002000029000a0011002000720000000e0100006b00001d220000c13d000000400200043d0000004001200039000000400010043f0000000c01000029000900000002001d00000000021204360000000a0100002900000ff601100197000a00000001001d000c00000002001d00000000001204350000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000902000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000b0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000a03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000b050000293f163f0c0000040f0000000101200190000000350000613d00000c6d0000013d0000007a01000039000000000101041a000000ff0110018f00000010030000290000000f0230006b00001cfc0000c13d000000000101004b00001d680000c13d00000fe3010000410000000000100439000000000100041400001d6b0000013d00000007010000290000000203100039000000000403041a0000004001200039000000400010043f0000001e01000039000000000112043600000fe5050000410000000000510435000000100540006c00001d020000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000019f00000413d000000000124004b000011e60000a13d000011e40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c000028a30000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000700000003001d00000004033000390000000000230435000000400200043d000c00000002001d00000fda02000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c000020020000c13d0000000103000031000020360000013d0000001f0430018f000000050230027200001a350000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00001a310000c13d000000000504004b00001a430000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a520000413d000000000124004b000011e60000a13d000011e40000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a690000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a800000413d000000000124004b000011e60000a13d000011e40000013d001100000000001d00001a9f0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000011020000290000000102200039001100000002001d0000000c0120006c0000133a0000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff0110019000001acb0000613d00000fe1010000410000000000100439000000000100041400001ace0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c00001a9a0000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000a00000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c00001afc0000c13d000000010300003100001b2e0000013d00000010040000290000000a03400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c00000020050000390000000005034019000000050450027200001b1b0000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00001b170000c13d0000001f0550019000001b2a0000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000102200190000022d60000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b0000221f0000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b00001b6b0000c13d000000000101004b00001a8c0000613d00000fe1010000410000000000100439000000000100041400001a8f0000013d000800000005001d000000000101004b00001b720000613d00000fe1010000410000000000100439000000000100041400001b750000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000a00000005001d000000000345004b000022f00000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000700000002001d000000000101043b000000000101041a000900000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a030000290000000b0230006c000000000200001900001bbf0000613d0000000a030000290000000b0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00001bbe0000613d00000007321000b900000000311200d9000000070110006c00001bbf0000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a0400003900000000004304350000000905000029000000000405004b000023070000613d000000000125004b000000000300001900001bd20000213d00000009212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000008020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe60400004100000000004204350000001a0200003900000000002104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000231e0000c13d000000000034041b0000007a01000039000000000101041a000000ff0110019000001bf70000613d00000fe1010000410000000000100439000000000100041400001a8f0000013d00000fe3010000410000000000100439000000000100041400001a8f0000013d0000000c0100002900000000001004350000000e01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000103200039000000000031041b000000100120006b00001e230000c13d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000b00000001001d0000000f0110006c000021900000a13d000000400100043d00000064021000390000102e03000041000000000032043500000044021000390000102f03000041000000000032043500000024021000390000002a0300003900000bd60000013d0000001f0430018f000000050230027200001c310000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00001c2d0000c13d000000000504004b00001c3f0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000c00000004001d00000ff50340009c00001d0b0000813d0000000e0100006b00001e2d0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000001101000029000b00000002001d00000000001204350000000c01000029000a00000003001d00000000001304350000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a02000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000b03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000d0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000001103000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000d05000029000010dd0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001cce0000413d000000000124004b000011e60000a13d000011e40000013d0000000004000019000000000102041a001100000004001d000000000114004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110400002900000005324000c9000000000101043b0000000001210019000000000101041a00000fc8011001970000000a0110006c00001e6f0000613d00000001044000390000000f0140006c000000100200002900001cd90000413d000014980000013d0000007a01000039000000000101041a000000ff0110019000001d780000c13d00000fe3010000410000000000100439000000000100041400001d7b0000013d000000000101004b00001de60000c13d00000fe3010000410000000000100439000000000100041400001de90000013d000000100140006a000000000013041b0000000d020000290000000e012001b000001e170000c13d000000400100043d00000044021000390000106d030000410000107c0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001d180000413d000000000124004b000011e60000a13d000011e40000013d0000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc702200197000900000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc701100198000019670000c13d0000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a0400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b000a0ff60040019b000019ae0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b000000000100001900003f170001042e00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000a00000001001d000000110100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000202200039000000000302041a000900000003001d0000000a0230006b000023b50000a13d0000000b03000029000000080230006c000023b50000613d000000000101041a000700000001001d000000400100043d0000004002100039000000400020043f000000200210003900000fe50300004100000000003204350000001e020000390000000000210435000000110100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000009030000290000000a0230006900000007342000b900000000322400d90000000e030000290000000103300039000000000503041a000000000101043b000000070220006c00003d610000c13d000000000201041a000000000104004b000000000300001900001dc50000613d00000000134500a900000000414300d9000000000151004b00003d610000c13d000000400500043d0000004001500039000000400010043f000000200150003900000fe60400004100000000004104350000001a040000390000000000450435000000000602004b0000237e0000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200400003900000000004204350000000002050433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ddc0000413d000000000124004b000011e60000a13d000019240000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000c00000004001d000b00000005001d000000000345004b00001e760000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001e0d0000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100006b00001ec90000613d0000000d0100006b00001ec90000613d000000400100043d0000004402100039000010650300004100001e720000013d000000400100043d000000440210003900000fea03000041000012e00000013d000000400100043d00000064021000390000101d03000041000000000032043500000044021000390000101e0300004100000000003204350000002402100039000000260300003900000bd60000013d0000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc702200197000b00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc70110019800001c600000c13d0000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011020000290000002002200210000000000101043b000000000301041a000010290330019700001ca40000013d000000400100043d000000440210003900000fe9030000410000000000320435000000240210003900000012030000390000107f0000013d000000110100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e020000290000000102200039000000000202041a000a00000002001d000000000101043b000000000101041a001100000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b030000290000000c0230006c000000000200001900001ea80000613d0000000b030000290000000c0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900001ea80000613d0000000a321000b900000000311200d90000000a0110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000110500006b000023350000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ebf0000413d000000000124004b000011e60000a13d000011e40000013d0000000b0100002900000005121000c9001100000002001d000f00090020002d0000000e0100006b00001fd80000c13d0000000701000029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50400004100000000004104350000001e0400003900000000004204350000000d0430006c000022360000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ee80000413d000000000124004b000011e60000a13d000011e40000013d0000000d040000290000000602400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200001f130000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00001f0f0000c13d000000000604004b00001f220000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000207f0000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001100000001001d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000d00000004001d000000110340006b0000236f0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001f650000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001f7c0000413d000000000124004b000011e60000a13d000019240000013d0000004001200039000000400010043f0000001b01000039000000000112043600000fe8040000410000000000410435000000100330006a001000050030002d000000100330006b000000000300001900000001030040390000000103300190000020b30000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fa00000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fb70000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fce0000413d000000000124004b000011e60000a13d000011e40000013d0000000c0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001101100029000d00000001001d0000000201100039000900000001001d000000000101041a001100000001001d0000007a01000039000000000101041a000000ff01100190000025450000c13d00000fe30100004100000000001004390000000001000414000025480000013d0000000c040000290000000702400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000020230000613d0000000c080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000201f0000c13d000000000604004b000020320000613d0000000505500210000000000651034f0000000c055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000022770000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000c00000004001d000000100340006b000024b90000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020750000413d000000000124004b000011e60000a13d000019240000013d0000001f0430018f0000000502300272000020890000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000020850000c13d000000000504004b000020970000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000020a30000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000209f0000c13d000000000504004b000020b10000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000100100006b000022910000c13d000000400100043d00000064021000390000106003000041000000000032043500000044021000390000106103000041000000000032043500000024021000390000002e0300003900000bd60000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020cc0000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020e30000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020fa0000413d000000000124004b000011e60000a13d000019240000013d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000000021041b0000000e0100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000402000029000000000021041b000000400300043d000000a001300039000000400010043f00000020023000390000000501000029000f00000002001d00000000001204350000000a01000029001100000003001d00000000001304350000007a01000039000000000101041a000000ff01100190000024070000c13d00000fe301000041000000000010043900000000010004140000240a0000013d0000000006010019000d00000000001d000e00000000001d0000213c0000013d000000000206004b0000237b0000613d000000010660008a000000000116004b00003c330000813d001000000006001d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010060000290000000102600210000000000101043b00000000022100190000001101000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000021680000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b0000000004000019000000010400403900000001044001900000213a0000613d000024cb0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000213a0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000025d30000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000021860000413d000000000214004b000025d30000a13d000012a20000013d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000a0fc80010019b0000000501000039000000000101041a00000fc801100198000007cd0000613d00000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d000000000101041a000d00000001001d000000000101004b001000000000001d000026050000c13d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a00000fc9022001970000001107000029000000000272019f000000000021041b000000400100043d00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d02000039000000040300003900001022040000410000000c050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d0000000a02000029000000110120006c000010e00000613d000000100100006b000010e00000613d0000000a0100006b00002cf10000c13d000000110100006b000010e00000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c000f00000000001d000031090000c13d000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b0300003900000000003204350000000f04000029000000100340002900100ff60030019b000000100340006b000031660000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000022150000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000222c0000413d000000000124004b000011e60000a13d000019240000013d0000000d0130006a0000000702000029000000000012041b0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435001100000004001d0000000d0340006c000025760000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000226d0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000022810000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000227d0000c13d000000000504004b0000228f0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001101000029000000000101041a000000060110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000001102000029000000000202041a000000060220006b00003c330000813d000000000101043b0000000f01100029000000000201041a001100000002001d0000000502000029000000000021041b0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001002000029000000000021041b000000400100043d00000020021000390000000503000029000000000032043500000011020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000105f040000410000000e050000290000000606000029000010dd0000013d0000001f0430018f0000000502300272000022e00000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000022dc0000c13d000000000504004b000022ee0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000022fd0000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023140000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000232b0000413d000000000124004b000011e60000a13d000019240000013d000000110120006b00000000030000190000233d0000213d00000011212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000010020000290000000f05200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000004104350000000e010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000253c0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023650000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110018f0000000d03000029000000110230006b000024c50000c13d000000000101004b000026270000c13d00000fe301000041000000000010043900000000010004140000262a0000013d0000000e0100006b000015460000613d000029990000013d000000000132004b0000000005000019000023860000213d00000000212300d900000fe7251000d100000000211500d900000fe70110009c00003d610000c13d0000000b02000029000000080320006a000000400100043d0000004002100039000000400020043f000000200210003900000fe60600004100000000006204350000000000410435000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b04000039000000000042043500000000433500d9000d000d0030002d0000000d0330006b000000000300001900000001030040390000000103300190000023b50000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023ab0000413d000000000124004b000011e60000a13d000019240000013d000000110100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a000000000201004b000f00000000001d000024e20000c13d0000000c01000029000000000401041a0000000101100039000000000101041a000000400300043d0000004002300039000000400020043f000000200230003900000fe50500004100000000005204350000001e0500003900000000005304350000000f0540006c0000284c0000813d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002aa10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000023fd0000413d000000000214004b00002aa10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d00000011020000290000004003200039000000000101043b000c00000003001d000000000013043500000080032000390000000301000029000d00000003001d00000000001304350000006001200039000b00000001001d00000000000104350000001002000029000000000102041a000900000001001d0000000101100039000000000012041b0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090200002900000005322000c9000000000101043b0000000001210019000000000201041a00000fc9022001970000001103000029000000000303043300000fc803300197000000000232019f000000000021041b0000000f0200002900000000020204330000000103100039000000000023041b0000000c0200002900000000020204330000000203100039000000000023041b0000000b0200002900000000020204330000000303100039000000000023041b00000004011000390000000d020000290000000002020433000000000021041b0000000a0100002900000000001004350000001401000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000010b40220019700000001022001bf000000000021041b0000000401000039000000000101041a0000000102000039000000400400043d0000002403400039000000000023043500000feb020000410000000000240435000f00000004001d00000004024000390000000e03000029000000000032043500000fda02000041000000400300043d000d00000003001d000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000024940000613d0000000d040000290000000f02400069000000440220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000002ece0000613d0000001001000029000000000101041a000000400200043d00000040032000390000000304000029000000000043043500000020032000390000000404000029000000000043043500000005030000290000000000320435000000400300043d0000000002320049000000600220003900000fc70420009c00000fc702008041000000600220021000000fc70430009c00000fc7030080410000004003300210000000000232019f000000000300041400000fc70430009c00000fc703008041000000c003300210000000000232019f000000010610008a00000fec012001c70000800d02000039000000040300003900000fed040000410000000e050000290000000a070000293f163f0c0000040f0000000101200190000000350000613d000010e00000013d0000007a01000039000000000101041a000000ff0110018f0000000c03000029000000100230006b000028150000c13d000000000101004b000028950000c13d00000fe30100004100000000001004390000000001000414000028980000013d000000000101004b0000281b0000c13d00000fe301000041000000000010043900000000010004140000281e0000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000025d30000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000024d80000413d000000000214004b000025d30000a13d000012a20000013d001100000001001d000f00000000001d000e00000000001d000024e80000013d000000110200006b000023e20000613d00000011020000290011000100200092000000110110006b00003c330000813d00000010010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011020000290000000102200210000000000101043b00000000022100190000001001000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000025140000c13d000000110310006b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000f000f0040002d0000000f0440006b000000000400001900000001040040390000000104400190000024e60000613d00002b430000013d000000110310006b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b000000000400001900000001040040390000000104400190000024e60000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002c730000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000025320000413d000000000214004b00002c730000a13d000012a20000013d000000000034041b0000007a01000039000000000101041a000000ff011001900000287e0000c13d00000fe3010000410000000000100439000000000100041400001d6b0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000110110006c000033f50000a13d0000000d01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000500000003001d00000004033000390000000000230435000000400200043d000600000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00002c740000c13d000000010300003100002ca80000013d0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d050000290000001102500069000000000101043b000000000021041b0000000f01000029000000000101041a000000400200043d00000024032000390000000804000029000000000043043500000044032000390000000000530435000000400400043d0000000003430049000d00000004001d00000000033404360000006402200039000000400020043f0000000002030433000010660220019700001067022001c7001100000003001d00000000002304350000106802000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000026920000613d000000400100043d0000000d020000290000000002020433000000000302004b000025cb0000613d000000000300001900000000041300190000001105300029000000000505043300000000005404350000002003300039000000000423004b000025c00000413d000000000323004b000025cb0000a13d00000000031200190000000000030435000000400400043d00000000030004140000000f05000029000000040550008c00002ee70000c13d0000000102000039000000010600003100002efb0000013d000013b10000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c0000358c0000a13d0000000d01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000400000003001d00000004033000390000000000230435000000400200043d000500000002001d00000fda02000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c00002d470000c13d000000010300003100002d7b0000013d001000000000001d0000000f01000029000000000101041a000000100110006b00003c330000813d0000000501000039000000000101041a000e00000001001d0000000f010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c9000000000101043b0000000001210019000000000101041a0000000e0110014f00000fc80110019800002aa20000613d00000010010000290000000101100039001000000001001d0000000d0110006c000026060000413d001000000000001d000021b70000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000e02000029000000000012041b0000000f0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000000201004b000026960000c13d00000007020000290011000a0020002d0000000801000029000000000301041a000000000103004b000026f00000c13d0000001101000029000000000101041a000000000200041000000fc802200197000000400300043d0000004404300039000000000024043500000024023000390000000904000029000000000042043500000064023000390000000b040000290000000000420435000000400400043d0000000002420049000e00000004001d00000000042404360000008402300039000000400020043f00000000020404330000106602200197000010a7022001c7000d00000004001d00000000002404350000106802000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000027740000c13d000000400100043d0000004402100039000010a80300004100000bbf0000013d0000000006010019000d00000000001d000e00000000001d0000269c0000013d000000000206004b0000274c0000613d000000010660008a000000000116004b00003c330000813d001000000006001d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010060000290000000102600210000000000101043b00000000022100190000001101000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000026c80000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b0000000004000019000000010400403900000001044001900000269a0000613d0000278e0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000269a0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000027a50000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000026e60000413d000000000214004b000027a50000a13d000012a20000013d00000008020000290000000201200039000000000601041a00000011010000290000000301100039000000000501041a0000000101200039000000000101041a001000000001001d000000400400043d0000004001400039000000400010043f000000200140003900000fe50200004100000000002104350000001e020000390000000000240435000000000763004b0000271a0000813d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000027100000413d000000000124004b000011e60000a13d000011e40000013d000000000163004b0000000004000019000027220000613d000000000163004900000000345100a900000000311400d9000000000151004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60500004100000000005304350000001a030000390000000000310435000000400300043d0000004001300039000000400010043f000000200130003900000fe5050000410000000000510435000000000023043500000fe72440012a000e00000004001d000000100240006c0000274f0000813d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000027420000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100006b000026610000613d000029990000013d0000000e02000029000000100120006c000026670000613d0000000401000039000000000101041a000000400300043d00000fe402000041000000000023043500000fc802100197000a00000003001d0000000401300039000700000002001d0000000000210435000000400100043d000d00000001001d00000fda0100004100000000001004390000000f010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c00002bef0000c13d000000010300003100002c230000013d000000400100043d0000000e020000290000000002020433000000000302004b000027860000613d00000000030000190000000d0600002900000000041300190000000005630019000000000505043300000000005404350000002003300039000000000423004b0000277b0000413d000000000323004b000027860000a13d00000000031200190000000000030435000000400400043d00000000030004140000001005000029000000040550008c000027a60000c13d00000001020000390000000106000031000027ba0000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000027a50000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000279b0000413d000000000214004b000027a50000a13d000012a20000013d000013b10000013d0000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f00000010020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc706100197000000000106004b000027bf0000c13d00000060030000390000008001000039000027df0000013d0000003f01600039000010b301100197000000400300043d0000000001130019000000400010043f0000001f0460018f0000000001630436000000030500036700000005066002720000000506600210000027d10000613d0000000007610019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b000027cd0000c13d000000000704004b000027df0000613d000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000027ec0000c13d000000400100043d0000004402100039000010ad03000041000000000032043500000fde0200004100000000002104350000002402100039000000200300003900000000003204350000000402100039000010840000013d0000000002030433000000000302004b000028820000c13d000000400100043d0000000802000029000000000302041a0000004002100039000000400020043f0000001b02000039000000000221043600000fe80400004100000000004204350000000b04300029000000000334004b00000000050000190000000105004039000000400300043d000000010550019000002a7b0000613d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000001010433000000240430003900000000001404350000004403300039000000000401004b000028140000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000280b0000413d000000000214004b000012a20000213d000013b10000013d000000000101004b000029f20000c13d00000fe30100004100000000001004390000000001000414000029f50000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000e02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000600000004001d000500000005001d000000000345004b00002a230000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000028420000413d000000000124004b000011e60000a13d000011e40000013d0000000f0240006c0000000003000019000028540000613d0000000f0240006a0000000d432000b900000000422300d90000000d0220006c00003d610000c13d000000400200043d0000004004200039000000400040043f000000200420003900000fe60500004100000000005404350000001a040000390000000000420435000000400500043d0000004002500039000000400020043f000000200250003900000fe50400004100000000004204350000001e040000390000000000450435000000400400043d00000fe76330012a000000000613004b00002a760000813d00000fde0100004100000000001404350000000401400039000000200300003900000000003104350000000001050433000000240340003900000000001304350000004403400039000000000401004b00002aa10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000028740000413d000000000214004b00002aa10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400001d6b0000013d00000fd50320009c000000350000213d0000001f0220008c000000350000a13d0000000002010433000000000102004b0000000001000019000000010100c039000000000112004b000000350000c13d000000400100043d000000000202004b000027f00000c13d00000064021000390000106a03000041000000000032043500000044021000390000106b0300004100001c230000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b0000000e0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a000000000201004b000028da0000c13d0000000901000029000000000201041a000000000102004b000029340000c13d0000000301000039000000000201041a0000104e0220019700000fd6022001c7000000000021041b000000000100001900003f170001042e0000000006010019000c00000000001d000d00000000001d000028e00000013d000000000206004b000029970000613d000000010660008a000000000116004b00003c330000813d000f00000006001d00000010010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f060000290000000102600210000000000101043b00000000022100190000001001000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c0000290c0000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000c000c0040002d0000000c0440006b000000000400001900000001040040390000000104400190000028de0000613d000029da0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b000000000400001900000001040040390000000104400190000028de0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000029f10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000292a0000413d000000000214004b000029f10000a13d000012a20000013d00000008030000290000000a013000290000000301100039000000000301041a00000009050000290000000201500039000000000401041a0000000101500039000000000501041a001000000005001d000000400700043d0000004005700039000000400050043f000000200670003900000fe50500004100000000005604350000001e050000390000000000570435000000000842004b000029620000813d000000400200043d00000fde0100004100000000001204350000000401200039000000200300003900000000003104350000000001070433000000240320003900000000001304350000004402200039000000000301004b000029950000613d000000000300001900000000042300190000000005630019000000000505043300000000005404350000002003300039000000000413004b000029550000413d000000000313004b000029950000a13d000000000321001900000000000304350000001f01100039000012800000013d000000000642004b00000000080000190000296a0000613d000000000642004900000000783600a900000000766800d9000000000636004b00003d610000c13d000000400700043d0000004006700039000000400060043f000000200670003900000fe60900004100000000009604350000001a060000390000000000670435000000400900043d0000004007900039000000400070043f000000200790003900000fe50a0000410000000000a70435000000000059043500000fe78a80012a000f0000000a001d0000001008a0006c0000299d0000813d000000400200043d00000fde0100004100000000001204350000000401200039000000200300003900000000003104350000000001090433000000240320003900000000001304350000004402200039000000000301004b000029950000613d000000000300001900000000042300190000000005730019000000000505043300000000005404350000002003300039000000000413004b0000298a0000413d000000000313004b000029950000a13d000000000321001900000000000304350000001f01100039000012800000013d0000000d0100006b000028cf0000613d000000400100043d0000004402100039000010a603000041000012e00000013d0000000f08000029000000100780006c000028d30000613d000000400700043d0000004008700039000000400080043f000000200870003900000fe50900004100000000009804350000000000570435000000000542004b0000000005000019000029af0000613d000000000242004900000000453200a900000000422500d9000000000232004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe6040000410000000000430435000000000062043500000fe73250012a000000000021041b0000000401000039000000000101041a000000400300043d00000fe402000041000000000023043500000fc802100197000c00000003001d0000000401300039000a00000002001d000000000021043500000fda01000041000000400200043d000d00000002001d00000000001004390000000e010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000e02000029000000040220008c00002dde0000c13d000000010300003100002e120000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000029f10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000029e70000413d000000000214004b000029f10000a13d000012a20000013d000013b10000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000700000004001d000600000005001d000000000345004b00002af00000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a190000413d000000000124004b000011e60000a13d000019240000013d0000000f0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010020000290000000102200039000000000202041a000300000002001d000000000101043b000000000101041a000400000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000503000029000000060230006c000000000200001900002a550000613d0000000503000029000000060230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900002a550000613d00000003321000b900000000311200d9000000030110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000040500006b00002e7b0000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a6c0000413d000000000124004b000011e60000a13d000011e40000013d00000000011300490000000000140435000000400100043d000000000214004900000a8a0000013d0000000801000029000000000041041b0000000201100039000000000501041a00000011010000290000000301100039000000000201041a0000004001300039000000400010043f0000001e01000039000000000113043600000fe5060000410000000000610435000000000654004b00002b5a0000813d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a970000413d000000000124004b000011e60000a13d000011e40000013d000013b10000013d0000000501000039000000000101041a00000fc80110019700000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a0000000201100039000000000401041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50200004100000000002104350000001e020000390000000000250435000000400200043d000000000643004b00002f9a0000813d00000fde0300004100000000003204350000000403200039000000200400003900000000004304350000000003050433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b00002ae60000413d000000000134004b0000127f0000a13d0000127d0000013d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000400000002001d000000000101043b000000000101041a000500000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000603000029000000070230006c000000000200001900002b220000613d0000000603000029000000070230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900002b220000613d00000004321000b900000000311200d9000000040110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000050500006b00002f600000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002b390000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002c730000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b00002b500000413d000000000214004b00002c730000a13d000012a20000013d000000000154004b000000000100001900002b620000613d000000000354004900000000412300a900000000433100d9000000000223004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a00000008020000290000000102200039000000000012041b0000000501000039000000000101041a0000001102000029000000000202041a000000000112013f00000fc8011001980000396e0000c13d000000090100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000006001200039000000400010043f0000004001200039000010a90400004100000000004104350000002001200039000010ab0400004100000000004104350000002104000039000000000042043500110fc80030019b0000000b03000029000010210330009c00002fd50000813d000000110100006b0000396e0000613d0000000b0100006b0000396e0000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c001000000000001d00002bc80000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b03000039000000000032043500000010040000290000000b03400029000a0ff60030019b0000000a0340006b0000382d0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002be50000413d000000000124004b000011e60000a13d000011e40000013d0000000d040000290000000a02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002c100000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002c0c0000c13d000000000604004b00002c1f0000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002dc40000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000d00000001001d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e03000029000a001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000a03500029001000000003001d000e00000005001d000000000353004b000000000300001900000001030040390000000103300190000030780000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002c690000413d000000000124004b000011e60000a13d000011e40000013d000013b10000013d00000006040000290000000502400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002c950000613d00000006080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002c910000c13d000000000604004b00002ca40000613d0000000505500210000000000651034f00000006055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002e620000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001100000001001d0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000600000004001d000000110340006b000031410000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002ce70000413d000000000124004b000011e60000a13d000011e40000013d0000000a0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c000f00000000001d00002d220000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000002001100270000f0ff60010019b000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c0300003900000000003204350000000f04000029000000100340006c00002fec0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002d3d0000413d000000000124004b000011e60000a13d000019240000013d00000005040000290000000402400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002d680000613d00000005080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002d640000c13d000000000604004b00002d770000613d0000000505500210000000000651034f00000005055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002eb50000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000500000004001d000000100340006b0000315a0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002dba0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f000000050230027200002dce0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00002dca0000c13d000000000504004b00002ddc0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000d040000290000000c02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000e020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002dff0000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002dfb0000c13d000000000604004b00002e0e0000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002f470000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000d00000001001d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f03000029000c001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000c03500029001000000003001d000f00000005001d000000000353004b0000000003000019000000010300403900000001033001900000325b0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002e580000413d000000000124004b000011e60000a13d000019240000013d0000001f0430018f0000000502300272000000050220021000002e6c0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002e680000c13d000000000504004b00002e790000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000040120006b000000000300001900002e830000213d00000004212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d0000000d020000290000001105200069000000400100043d0000004002100039000000400020043f000000200210003900000fe6060000410000000000620435000000000041043500000010010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b00000000050000190000000105004039000000010550019000002fcc0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002eab0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000002ebf0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002ebb0000c13d000000000504004b00002ecc0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000000050220021000002ed80000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002ed40000c13d000000000504004b00002ee50000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f0000000f020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc706100197000000000106004b00002f000000c13d0000006003000039000000800100003900002f200000013d0000003f01600039000010b301100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000003050003670000000506600272000000050660021000002f120000613d0000000007610019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b00002f0e0000c13d000000000704004b00002f200000613d000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000027e10000613d0000000002030433000000000302004b00002fbe0000c13d000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b030000390000000000320435000000400300043d00000010050000290000000e0450006c000031280000813d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002f3d0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000002f510000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002f4d0000c13d000000000504004b00002f5e0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000050120006b000000000300001900002f680000213d00000005212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d0000000c020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000004104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000314d0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002f900000413d000000000124004b000011e60000a13d000019240000013d0000006001200039000000400010043f00000040012000390000101f05000041000000000051043500000028010000390000000001120436000010200500004100000000005104350000000003430049001000000003001d000010210330009c000021b70000413d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002fb40000413d000000000124004b000011e60000a13d000019240000013d00000fd50320009c000000350000213d0000001f0220008c000000350000a13d0000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000000350000c13d000000000101004b00002f250000c13d000000400100043d0000288f0000013d000000000034041b0000007a01000039000000000101041a000000ff01100190000031560000c13d00000fe301000041000000000010043900000000010004140000262a0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002fe20000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff01100190000c000b0000002d00002ffe0000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000c00000001001d000000400200043d0000008001200039000000400010043f000000600120003900001025030000410000000000310435000000400120003900001026030000410000000000310435000000200120003900001027030000410000000000310435000000420300003900000000003204350000000c0300002900000ff50330009c000032440000813d0000000f0200002900090010002000720000000d0100006b0000334c0000c13d000000400200043d0000004001200039000000400010043f0000000c01000029000800000002001d0000000002120436000000090100002900000ff601100197000900000001001d000c00000002001d00000000001204350000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000802000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000a0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d0000002002100039000000090300002900000000003204350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000a050000293f163f0c0000040f0000000101200190000021e30000c13d000000350000013d00000010020000290000000d0120006c000031eb0000a13d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000d0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000e020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f0500002900000009060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000d02000029000000000021043500000024013000390000000902000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000007010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000702000029000000040220008c000032270000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000007020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000032270000c13d0000001f0430018f00000005023002720000000502200210000030fa0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000030f60000c13d000000000504004b000031070000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000002001100270000f0ff60010019b000021f80000013d00000010010000290000000000130435000000400100043d0000000002130049000000200220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000004030000390000106c0400004100000008050000290000000c060000290000000b07000029000039c70000013d0000007a01000039000000000101041a000000ff0110018f0000000603000029000000110230006b000032ec0000c13d000000000101004b000033e70000c13d00000fe30100004100000000001004390000000001000414000033ea0000013d000000000034041b0000007a01000039000000000101041a000000ff01100190000032f20000c13d00000fe30100004100000000001004390000000001000414000028980000013d00000fe101000041000000000010043900000000010004140000262a0000013d0000007a01000039000000000101041a000000ff0110018f0000000503000029000000100230006b000032f60000c13d000000000101004b0000357e0000c13d00000fe30100004100000000001004390000000001000414000035810000013d0000007a01000039000000000101041a000000ff01100190000031770000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000b00000001001d000000400200043d0000008001200039000000400010043f000000600120003900001025030000410000000000310435000000400120003900001026030000410000000000310435000000200120003900001027030000410000000000310435000000420300003900000000003204350000000b0300002900000ff50330009c000033350000813d0000000d0100006b0000376e0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000001001000029000c00000002001d00000000001204350000000b01000029000a00000003001d0000000000130435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a02000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d0000002002100039000000100300002900000000003204350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000001105000029000010dd0000013d0000000e0100006b000032fc0000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000000902000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000007010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000702000029000000040220008c000032270000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000007020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003a350000613d000000400100043d0000000a020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010510400004100000009050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000026670000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000032510000413d000000000124004b000011e60000a13d000019240000013d00000010020000290000000d0120006c000033920000a13d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000d0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000e0500002900000011060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000d02000029000000000021043500000024013000390000001102000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000e020000290000000000210435000000400100043d000f00000001001d00000fda0100004100000000001004390000000a010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000a02000029000000040220008c000033ce0000613d0000000f040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000a020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000033ce0000c13d0000001f0430018f00000005023002720000000502200210000032dd0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000032d90000c13d000000000504004b000032ea0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000000101004b000035020000c13d00000fe30100004100000000001004390000000001000414000035050000013d00000fe10100004100000000001004390000000001000414000028980000013d000000000101004b000036ab0000c13d00000fe30100004100000000001004390000000001000414000036ae0000013d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000e0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f0500002900000009060000293f163f0c0000040f0000000101200190000000350000613d000031ed0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000033420000413d000000000124004b000011e60000a13d000019240000013d0000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000800000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc701100198000030130000c13d0000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b00090ff60040019b0000305a0000013d0000000f0100006b000037b00000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000001102000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000e020000290000000000210435000000400100043d000f00000001001d00000fda0100004100000000001004390000000a010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000a02000029000000040220008c000033ce0000613d0000000f040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000a020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003aeb0000613d000000400100043d0000000c020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010510400004100000011050000290000000e060000290000313f0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000902000029000000000012041b0000000f01000029000d00030010003d00000007010000290000000102100039000900000002001d000000000202041a000000000101041a000000000301004b0000000004000019000034050000613d0000000d03000029000000000303041a00000000541300a900000000511400d9000000000131004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60500004100000000005304350000001a030000390000000000310435000000400500043d0000004001500039000000400010043f000000200350003900000fe50100004100000000001304350000001e010000390000000000150435000000400700043d00000044017000390000002406700039001100000007001d000000040770003900000fe78440012a000000000824004b000034360000813d00000fde02000041000000110400002900000000002404350000002002000039000000000027043500000000020504330000000000260435000000000402004b000034320000613d000000000400001900000000051400190000000006340019000000000606043300000000006504350000002004400039000000000524004b000034270000413d000000000324004b000034320000a13d000000000312001900000000000304350000001f02200039000010b3022001970000000001120019000013b40000013d0000000403000039000000000303041a0000105005000041000000110800002900000000005804350000000c0500002900000000005704350000000805000029000000000056043500000000022400490000000000210435000000400100043d000500000001001d00000fda01000041000000000010043900000fc801300197000600000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000602000029000000040220008c0000346f0000613d00000005040000290000001102400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000006020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000034e90000613d0000000701000029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50400004100000000004104350000001e0400003900000000004204350000000e0430006c000034920000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000034880000413d000000000124004b000011e60000a13d000011e40000013d0000000e0230006a0000000704000029000000000024041b0000000e0130006c00000000010000190000349e0000613d0000000d01000029000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a0000000902000029000000000012041b0000000f01000029000000000101041a000000400200043d00000024032000390000000804000029000000000043043500000044032000390000000e040000290000000000430435000000400400043d0000000003430049000d00000004001d00000000033404360000006402200039000000400020043f0000000002030433000010660220019700001067022001c7001100000003001d00000000002304350000106802000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000026920000613d000000400100043d0000000d020000290000000002020433000000000302004b000034e10000613d000000000300001900000000041300190000001105300029000000000505043300000000005404350000002003300039000000000423004b000034d60000413d000000000323004b000034e10000a13d00000000031200190000000000030435000000400400043d00000000030004140000000f05000029000000040550008c000035330000c13d00000001020000390000000105000031000035470000013d0000001f0430018f00000005023002720000000502200210000034f30000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000034ef0000c13d000000000504004b000035000000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000902000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000500000004001d000400000005001d000000000345004b000037e90000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000035290000413d000000000124004b000011e60000a13d000011e40000013d0000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f0000000f020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc705100197000000000105004b0000354b0000c13d00000060010000390000356d0000013d0000003f01500039000010b303100197000000400100043d0000000003310019000000400030043f0000001f0350018f0000000004510436000a00000004001d000000030400036700000005055002720000355e0000613d00000005065002100000000a080000290000000006680019000000000704034f000000007907043c0000000008980436000000000968004b0000355a0000c13d000000000603004b0000356d0000613d0000000505500210000000000454034f0000000a055000290000000303300210000000000605043300000000063601cf000000000636022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000363019f0000000000350435000000000202004b000027e10000613d0000000001010433000000000201004b00002f250000613d00000fd50210009c0000000a02000029000000350000213d0000001f0110008c000000350000a13d0000000001020433000000000201004b0000000002000019000000010200c039000000000221004b00002fc80000613d000000350000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000602000029000000000012041b0000000e0200002900000007022000290000000801000029000000000301041a0000000901000029000000000501041a0000000101100039000600000002001d0000000302200039000400000002001d000000000402041a000500000001001d000000000101041a001000000001001d000000400200043d0000004001200039000000400010043f000000200120003900000fe50600004100000000006104350000001e060000390000000000620435000000000635004b000035bb0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000035b10000413d000000000124004b000011e60000a13d000011e40000013d000000000135004b0000000002000019000035c30000613d000000000135004900000000324100a900000000311200d9000000000141004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60400004100000000004304350000001a030000390000000000310435000000400300043d0000004001300039000000400010043f000000200130003900000fe50400004100000000004104350000001e040000390000000000430435000000400400043d000e00240040003d000000040540003900000fe72620012a000d00000006001d000000100260006c000035ef0000813d00000fde0200004100000000002404350000002002000039000000000025043500000000030304330000000e0200002900000000003204350000004402400039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000035e50000413d000000000134004b0000127d0000213d0000127f0000013d0000000401000039000000000101041a00000fe402000041000000000024043500000fc801100197000300000001001d0000000000150435000000400100043d000700000001001d00000fda0100004100000000001004390000000f010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c0000360e0000c13d0000000103000031000036410000013d00000007040000290000000e0240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f00000005055002720000362e0000613d00000007080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000362a0000c13d000000000604004b0000363d0000613d0000000505500210000000000651034f00000007055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000036910000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000e00000001001d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d030000290002001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000203500029001000000003001d000d00000005001d000000000353004b000000000300001900000001030040390000000103300190000036dc0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000036870000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f00000005023002720000369b0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000036970000c13d000000000504004b000036a90000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000602000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000400000004001d000300000005001d000000000345004b000038350000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000036d20000413d000000000124004b000011e60000a13d000011e40000013d00000010020000290000000e0120006c000038790000a13d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000e0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000d020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000e02000029000000000021043500000024013000390000000a02000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000003010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000302000029000000040220008c000038b50000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000003020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000038b50000c13d0000001f0430018f00000005023002720000375e0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000375a0000c13d000000000504004b0000376c0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000c00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000b0110014f00000fc7011001980000318a0000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010020000290000002002200210000000000101043b000000000301041a0000102903300197000031ce0000013d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000f0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000e0500002900000011060000293f163f0c0000040f0000000101200190000033940000c13d000000350000013d0000000c0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d020000290000000102200039000000000202041a000200000002001d000000000101043b000000000101041a000300000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000403000029000000050230006c000000000200001900003a4f0000c13d000000400400043d0000004001400039000000400010043f000000200140003900000fe60300004100000000003104350000001a030000390000000000340435000000030500006b00003ab10000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000038230000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff01100190000038ec0000c13d00000fe30100004100000000001004390000000001000414000038ef0000013d0000000f0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d020000290000000102200039000000000202041a000100000002001d000000000101043b000000000101041a000200000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000303000029000000040230006c000000000200001900003aa10000c13d000000400400043d0000004001400039000000400010043f000000200140003900000fe60300004100000000003104350000001a030000390000000000340435000000020500006b00003b040000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000386f0000413d000000000124004b000011e60000a13d000011e40000013d0000000d0100006b000039e50000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000000a02000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000003010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000302000029000000040220008c000038b50000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000003020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003b500000613d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000501043b00000006010000290000000401100039000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000300000005001d000700000053001d000000070330006b00000000030000190000000103004039000000400400043d000e00000004001d000000010330019000003b6a0000613d00000fde030000410000000e0500002900000000003504350000000403500039000000200400003900000000004304350000000002020433000000240350003900000000002304350000004403500039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000038e20000413d000000000124004b000011e60000a13d000011e40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000800000004001d00000ff50340009c00003a1e0000813d0000000d0100006b00003a5f0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000000a01000029000700000002001d00000000001204350000000801000029000600000003001d0000000000130435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000602000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000703000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000a03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c0400004100000011050000293f163f0c0000040f0000000101200190000000350000613d0000001701000039000000000101041a00000fc8011001970000000f0110006c000039ae0000c13d0000001801000039000000000101041a0000000c0110006b000039ae0000c13d0000001601000039000000000101041a000000400300043d0000109e020000410000000000230435001000000003001d000000040230003900000009030000290000000000320435000000400200043d000e00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000039ae0000613d0000000e040000290000001002400069000000240220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000039cb0000613d000000400100043d0000000b020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010ac0400004100000009050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000028d30000013d0000001f0430018f0000000502300272000039d50000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000039d10000c13d000000000504004b000039e30000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000d0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d0000387b0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003a2b0000413d000000000124004b000011e40000213d000011e60000013d0000001f0430018f000000050230027200003a3f0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00003a3b0000c13d000000000504004b00003a4d0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000403000029000000050230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00000000020000190000380c0000613d00000002321000b900000000311200d9000000020110006c0000380c0000613d00003d610000013d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000700000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000080110014f00000fc7011001980000390b0000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a020000290000002002200210000000000101043b000000000301041a00001029033001970000394f0000013d0000000303000029000000040230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b0000000002000019000038580000613d00000001321000b900000000311200d9000000010110006c000038580000613d00003d610000013d000000030120006b000000000400001900003ab90000213d00000003212000fa00000fe7241000d100000000211400d900000fe70110009c00003d610000c13d00000006020000290000001105200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000003104350000000d010000290000000303100039000000000603041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000545400d90000000004460019000000000564004b00000000050000190000000105004039000000010550019000003b3e0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003ae10000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000003af50000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00003af10000c13d000000000504004b00003b020000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000020120006b000000000400001900003b0c0000213d00000002212000fa00000fe7241000d100000000211400d900000fe70110009c00003d610000c13d00000005020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000003104350000000d010000290000000303100039000000000603041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000545400d90000000004460019000000000564004b00000000050000190000000105004039000000010550019000003b470000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003b340000413d000000000124004b000011e60000a13d000011e40000013d000000000043041b0000007a01000039000000000101041a000000ff0110019000003c360000c13d00000fe30100004100000000001004390000000001000414000033ea0000013d000000000043041b0000007a01000039000000000101041a000000ff0110019000003c3a0000c13d00000fe30100004100000000001004390000000001000414000035810000013d0000001f0430018f000000050230027200003b5a0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00003b560000c13d000000000504004b00003b680000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001102000029000000000302041a0000000e040000290000006001400039000000400010043f00000040054000390000000101000039000d00000005001d00000000001504350000000001040436000100000001001d0000000000010435001000000003001d0000000101300039000000000012041b0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001004000029000000010240021000000000012100190000000e020000290000000002020433000000000021041b0000000102000029000000000202043300001031022001970000000d0300002900000000030304330000008003300210000000000223019f0000000101100039000000000021041b000000000104004b000e00000000001d00003bee0000c13d000000400200043d0000006001200039000000400010043f0000000b01000029001000000002001d0000000001120436000d00000001001d0000000701000029000010400110009c00003c3e0000813d000000100100002900000040021000390000000101000039000100000002001d000000000012043500000007010000290000000d0200002900000000001204350000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e020000290000000102200210000000000101043b000000000121001900000010020000290000000002020433000000000021041b0000000d0200002900000000020204330000103102200197000000010300002900000000030304330000008003300210000000000223019f0000000101100039000000000021041b0000000801000029000000000401041a000000400200043d0000004001200039000000400010043f00000fe803000041000000200120003900000000003104350000001b0300003900000000003204350000000b03400029000000000443004b00000000040000190000000104004039000000010440019000003c4a0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003be40000413d000000000124004b000011e60000a13d000011e40000013d0000001001000029000e0001001000920000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000d000100200218000000000101043b0000000d011000290000000101100039000000000101041a0000103101100197000000070110006c00003c480000213d0000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000001102000029000000000202041a000000100220006b00003c330000813d00000010020000290000000102200210000000000101043b00000000022100190000000d01100029000000000301041a000000000032041b0000000101100039000000000301041a00001031033001970000000102200039000000000402041a0000102a04400197000000000434019f000000000042041b000000000101041a0000102a01100197000000000131019f000000000012041b0000000e0100006b0010000e0000002d00003bee0000c13d000e00000000001d00003b960000013d000000010100008a0000000000010435000000000000043100000fe10100004100000000001004390000000001000414000033ea0000013d00000fe10100004100000000001004390000000001000414000035810000013d000000400100043d00000064021000390000109a03000041000000000032043500000044021000390000109b0300004100000000003204350000002402100039000000270300003900000bd60000013d000e00100000002d00003b960000013d0000000801000029000000000031041b0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b0400003900000000004204350011000b0030002d000000110330006b00000000030000190000000103004039000000010330019000003c8d0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003c830000413d000000000124004b000011e60000a13d000011e40000013d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000000021041b0000000901000029000000000301041a0000000801000029000000000401041a0000000401000029000000000201041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50600004100000000006104350000001e060000390000000000650435000000000643004b00003cd10000813d000000400300043d00000fde0200004100000000002304350000000402300039000000200400003900000000004204350000000002050433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003cc70000413d000000000124004b000011e60000a13d000011e40000013d000000000143004b000000000100001900003cd90000613d000000000343004900000000412300a900000000433100d9000000000223004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a0000000502000029000000000012041b0000000501000039000000000101041a0000000602000029000000000202041a000000000112013f00000fc80110019800003e680000c13d0000000a0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000006001200039000000400010043f00000040012000390000109c04000041000000000041043500000020012000390000109d0400004100000000004104350000002b04000039000000000042043500110fc80030019b0000000b03000029000010210330009c00003d6b0000813d000000110100006b00003e680000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e0fc70010019c000800000001001d000d000100100092001000000000001d00003d3c0000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d0200002900000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c03000039000000000032043500000010040000290000000b0340006c00003d820000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003d570000413d000000000124004b000011e60000a13d000011e40000013d000000400100043d0000006402100039000010a90300004100000000003204350000004402100039000010aa0300004100000000003204350000002402100039000000210300003900000bd60000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003d780000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110019000003d930000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000300000001001d000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000000030300002900000ff50330009c00003ded0000813d00000010020000290009000b002000720000000e0100006b00003e040000613d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d0200002900000fc702200197000d00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000030110014f00000fc70110019800003e040000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b000d0ff60040019b00003e4b0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003dfa0000413d000000000124004b000011e60000a13d000011e40000013d000000400200043d0000004001200039000000400010043f0000000301000029000700000002001d0000000002120436000000090100002900000ff601100197000d00000001001d000900000002001d0000000000120435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000702000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000903000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000802000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000d03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c0400004100000011050000293f163f0c0000040f0000000101200190000000350000613d0000001701000039000000000101041a00000fc8011001970000000f0110006c00003ea80000c13d0000001801000039000000000101041a0000000c0110006b00003ea80000c13d0000001601000039000000000101041a000000400300043d0000109e020000410000000000230435001000000003001d00000004023000390000000a030000290000000000320435000000400200043d000e00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00003ea80000613d0000000e040000290000001002400069000000240220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003edd0000613d000000400100043d00000002020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000040300003900001051040000410000000a050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000000400100043d0000000b020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000004030000390000109f040000410000000a05000029000039c50000013d000000000001042f0000001f0430018f0000000502300272000000050220021000003ee70000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00003ee30000c13d000000000504004b00003ef40000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000000001042f00000fc70310009c00000fc701008041000000400110021000000fc70320009c00000fc7020080410000006002200210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f000000010220019000003f0a0000613d000000000101043b000000000001042d000000000100001900003f180001043000003f0f002104210000000102000039000000000001042d0000000002000019000000000001042d00003f14002104230000000102000039000000000001042d0000000002000019000000000001042d00003f160000043200003f170001042e00003f180001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000092e3500000000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000f55401620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fba1b1f800000000000000000000000000000000000000000000000000000000fba1b1f900000000000000000000000000000000000000000000000000000000fe5a451a00000000000000000000000000000000000000000000000000000000f554016200000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000200000008000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000001000000000000000000000000000000000000000061646428616464726573732c75696e743235362c616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000018c5e8ab000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a4000000e00000000000000000556e617574686f72697a6564000000000000000000000000000000000000000008c379a00000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd170a0823100000000000000000000000000000000000000000000000000000000536166654d6174683a207375627472616374696f6e206f766572666c6f770000536166654d6174683a206469766973696f6e206279207a65726f000000000000000000000000000000000000000000000000000000000000000000e8d4a51000536166654d6174683a206164646974696f6e206f766572666c6f770000000000506f6f6c20616c72656164792061646465640000000000000000000000000000546f6b656e2065786973747320696e206f7468657220706f6f6c000000000000fb66fb4d000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000d7fa4bff1cd2253c0789c3291a786a6f6b1a3b4569a75af683a15d52abb6a0bf416c6c6f6320706f696e7473206d757374206e6f74206265207a65726f00000053746f726520636f6e7472616374206164647265737320697320656d707479007a65726f2061646472657373206e6f7420616c6c6f77656400000000000000000000000000000000000000000000000000000000000000000000000012cc030000000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000e8f2be6f00000000000000000000000000000000000000000000000000000000f1127ed800000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000004000000080000000000000000044656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929000000000000dae66bbe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e1d146fa00000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000e6a69ab800000000000000000000000000000000000000000000000000000000dae66bbe00000000000000000000000000000000000000000000000000000000de0368b20000000000000000000000000000000000000000000000000000000001e133808def9436d6e31b89ed00948ba91d0cb6936eada5154cb1b45b55683fb9e492377265776172642063616e6e6f74206265207a65726f206164647265737300000000000000000000000000000000000000000000640000008000000000000000007072696d6520746f6b656e2063616e6e6f74206265207a65726f2061646472657373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000000000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000cd9b94e700000000000000000000000000000000000000000000000000000000d7ae45e2add8933700000000000000000000000000000000000000000000000000000000b6a5fd2f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3c754a700000000000000000000000000000000000000000000000000000000c3c754a800000000000000000000000000000000000000000000000000000000c3cda52000000000000000000000000000000000000000000000000000000000b6a5fd2f00000000000000000000000000000000000000000000000000000000c2102596454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000430000008000000000000000005856535661756c740000000000000000000000000000000000000000000000000200000000000000000000000000000000000008000000a000000000000000009a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b19010000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1756500000000000000000000000000000000000000000000000000000000000045434453413a20696e76616c6964207369676e6174757265202773272076616c45434453413a20696e76616c6964207369676e6174757265202776272076616c206e6f6e636500000000000000000000000000000000000000000000000000005856535661756c743a3a64656c656761746542795369673a20696e76616c69646f766572666c6f770000000000000000000000000000000000000000000000005856535661756c743a3a6765745374616b65416d6f756e743a20766f7465732000000000000000000000000000000000000000010000000000000000000000000cc323ffec3ea49cbcddc0de1480978126d350c6a45dff33ad2f1cda6ae992617420756e646572666c6f777300000000000000000000000000000000000000005856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e74730000000000000000000000000000000000000000000000000000000000006b206e756d626572206f72207365636f6e6420657863656564732033322062695856535661756c743a3a5f7772697465436865636b706f696e743a20626c6f6300000000000000000000000000000000ffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000006adb589fed1e8542fb7a6b10f00a85e02265e77f9ae3ca8ff93b22983e1af9a074206f766572666c6f777300000000000000000000000000000000000000000072652065787069726564000000000000000000000000000000000000000000005856535661756c743a3a64656c656761746542795369673a207369676e61747545434453413a20696e76616c6964207369676e6174757265000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff736574526577617264416d6f756e74506572426c6f636b4f725365636f6e6428616464726573732c75696e743235362900000000000000000000000000000000f5ab16cc00000000000000000000000000000000000000000000000000000000496e76616c69642072657761726420746f6b656e000000000000000000000000ad96cee0d692f0250b98e085504f399da6733854908215f6203fe3c69366d9f500000000000000000000000000000000000000000000000000000000add8933700000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000b4b5ea579e2b6c4d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a699776100000000000000000000000000000000000000000000000000000000a699776200000000000000000000000000000000000000000000000000000000a9d69a69000000000000000000000000000000000000000000000000000000009e2b6c4d00000000000000000000000000000000000000000000000000000000a09eab7a0000000000000000000000000000000100000000000000000000000000000000416c726561647920696e697469616c697a65642054696d654d616e6167657200496e76616c696420626c6f636b73207065722079656172000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000496e76616c69642074696d6520626173656420636f6e66696775726174696f6e7365745769746864726177616c4c6f636b696e67506572696f6428616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000000000000000000000000000000000000000000000012cc02ff496e76616c6964206e6577206c6f636b696e6720706572696f640000000000000bcf80c5060ccf99b7a993c57a94b232fc2c5c04bd74c7c7d174595fee6bc31f0000000000000000000000000000000000000000000000000000000092e350000000000000000000000000000000000000000000000000000000000098e1b31b00000000000000000000000000000000000000000000000000000000996cba680000000000000000000000ff0000000000000000000000000000000000000000ffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6bdfd5e51d01475945224d3d37965916fd8df699ef9e8888af4359aa862221609ad99e6800000000000000000000000000000000000000000000000000000000865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e946455c19a95c0000000000000000000000000000000000000000000000000000000073d025d6000000000000000000000000000000000000000000000000000000007ecebe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008456cb58000000000000000000000000000000000000000000000000000000008456cb59000000000000000000000000000000000000000000000000000000008ed7333d000000000000000000000000000000000000000000000000000000007ecebe00000000000000000000000000000000000000000000000000000000008308d7e970617573652829000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000c000000000000000005661756c7420697320616c726561647920706175736564000000000000000000dffada2889ebfab9224c24069d833f3de835d8cf99872d49e7b7ba5fccb7a46f73657428616464726573732c75696e743235362c75696e7432353629000000006ee09c6cb801194690c195c69f465aaf7c80255cbeafaab9600f47ed79de2ca97374206e6f74206265207a65726f000000000000000000000000000000000000416c6c6f6320706f696e7473207065722072657761726420746f6b656e206d750000000000000000000000000000000000000000000000000000000073d025d600000000000000000000000000000000000000000000000000000000782d6fe1000000000000000000000000000000000000000000000000000000007ac92456696e636f6e73697374656e74207374617465000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9059cbb00000000000000000000000000000000000000000000000000000000e03fe177bb050a40ea1b3ecd64121a3fa063a94b6d404b2f45c64697555efe0ec5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706f742073756363656564000000000000000000000000000000000000000000005361666542455032303a204245503230206f7065726174696f6e20646964206ee31da05fae6db869f5ea51f4b638aa6884070b6c87f18f63bd2291a12cb2f5186e6f7468696e6720746f207769746864726177000000000000000000000000002064657465726d696e65640000000000000000000000000000000000000000005856535661756c743a3a6765745072696f72566f7465733a206e6f742079657400000000000000000000000000000000000000000000000000000000fffffffe5ff5631500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006dd77cbc000000000000000000000000000000000000000000000000000000006dd77cbd000000000000000000000000000000000000000000000000000000006fcfff45000000000000000000000000000000000000000000000000000000005ff56315000000000000000000000000000000000000000000000000000000006857249c616c726561647920696e697469616c697a6564000000000000000000000000000200000000000000000000000000000000000080000000800000000000000000559f314bb90394a4a9ceb724f365b36a53587d894352c43d12901fd680101456000000000000000000000000000000000000000000000000000000005c19a95c000000000000000000000000000000000000000000000000000000005c60da1b000000000000000000000000000000000000000000000000000000005f14e7006472657373206973206e6f7420736574000000000000000000000000000000005856535661756c743a3a6765745374616b65416d6f756e743a2078767320616424f52bbf00000000000000000000000000000000000000000000000000000000358ae03600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004298bdbc000000000000000000000000000000000000000000000000000000004298bdbd00000000000000000000000000000000000000000000000000000000587cde1e00000000000000000000000000000000000000000000000000000000358ae036000000000000000000000000000000000000000000000000000000003d4180f90000000000000000000000000000000000000000000000000000000024f52bbf0000000000000000000000000000000000000000000000000000000026782247000000000000000000000000000000000000000000000000000000002eda5c6c115b512f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d504dc5000000000000000000000000000000000000000000000000000000001d504dc60000000000000000000000000000000000000000000000000000000020606b7000000000000000000000000000000000000000000000000000000000115b512f0000000000000000000000000000000000000000000000000000000019129e5af851a4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000006e730000000000000000000000000000000000000000000000000000000000006f6e6c792070726f78792061646d696e2063616e206368616e67652062726169c1e80334000000000000000000000000000000000000000000000000000000006368616e6765206e6f7420617574686f72697a656400000000000000000000006f6e6c792061646d696e2063616e000000000000000000000000000000000000020000000000000000000000000000000000004000000080000000000000000066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0696e76616c696420616365737320636f6e74726f6c206d616e616765722061646472657373000000000000000000000000000000000000000000000000000000323820626974730000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e20316573206f766572666c6f770000000000000000000000000000000000000000005856535661756c743a3a726571756573745769746864726177616c3a20766f7437f23cd30000000000000000000000000000000000000000000000000000000088a254a0ef28a0b9e957ff600beae69870f6f924065147f3627c3f814e60ec1172657175657374656420616d6f756e7420697320696e76616c6964000000000072657175657374656420616d6f756e742063616e6e6f74206265207a65726f0000000000000000000000000000000000000000000000000000000000046f7da2000000000000000000000000000000000000000000000000000000000af13728000000000000000000000000000000000000000000000000000000000efe6a8b5661756c74206973207061757365640000000000000000000000000000000000657865637574652070656e64696e67207769746864726177616c00000000000023b872dd000000000000000000000000000000000000000000000000000000005361666542455032303a2063616c6c20746f206e6f6e2d636f6e7472616374007700000000000000000000000000000000000000000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f5856535661756c743a3a6465706f7369743a20766f746573206f766572666c6fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d75361666542455032303a206c6f772d6c6576656c2063616c6c206661696c656472652d656e7465726564000000000000000000000000000000000000000000007661756c743a20706f6f6c206578697374733f00000000000000000000000000726573756d652829000000000000000000000000000000000000000000000000d2619572a1464e0df0bb351d834fd47f3350984d7bfdb1ab69cfcb0b8e4214155661756c74206973206e6f742070617573656400000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0001beba02ab62eea76adc759b4e16024b96ecb05987b77d0db148c87b4921e51b0f", + "devdoc": { + "author": "Venus", + "methods": { + "add(address,uint256,address,uint256,uint256)": { + "details": "This vault DOES NOT support deflationary tokens — it expects that the amount of transferred tokens would equal the actually deposited amount. In practice this means that this vault DOES NOT support USDT and similar tokens (that do not provide these guarantees).", + "params": { + "_allocPoint": "Number of allocation points assigned to this pool", + "_lockPeriod": "A period between withdrawal request and a moment when it's executable", + "_rewardPerBlockOrSecond": "Initial reward per block or second, in terms of _rewardToken", + "_rewardToken": "Reward token address", + "_token": "Staked token" + } + }, + "claim(address,address,uint256)": { + "params": { + "_account": "The account for which to claim rewards", + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address" + } + }, + "delegate(address)": { + "params": { + "delegatee": "The address to delegate votes to" + } + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "params": { + "delegatee": "The address to delegate votes to", + "expiry": "The time at which to expire the signature", + "nonce": "The contract state required to match the signature", + "r": "Half of the ECDSA signature pair", + "s": "Half of the ECDSA signature pair", + "v": "The recovery byte of the signature" + } + }, + "deposit(address,uint256,uint256)": { + "params": { + "_amount": "The amount to deposit to vault", + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address" + } + }, + "executeWithdrawal(address,uint256)": { + "params": { + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address" + } + }, + "getBlockNumberOrTimestamp()": { + "details": "Function to simply retrieve block number or block timestamp", + "return": "Current block number or block timestamp" + }, + "getCurrentVotes(address)": { + "params": { + "account": "The address to get votes balance" + }, + "return": "The number of current votes for `account`" + }, + "getEligibleWithdrawalAmount(address,uint256,address)": { + "params": { + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address", + "_user": "The User Address" + }, + "return": "withdrawalAmount Amount that the user can withdraw" + }, + "getPriorVotes(address,uint256)": { + "params": { + "account": "The address of the account to check", + "blockNumberOrSecond": "The block number or second to get the vote balance at" + }, + "return": "The balance that user staked" + }, + "getRequestedAmount(address,uint256,address)": { + "params": { + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address", + "_user": "The User Address" + }, + "return": "Total amount of requested but not yet executed withdrawals (including both executable and locked ones)" + }, + "getUserInfo(address,uint256,address)": { + "params": { + "_pid": "Pool index", + "_rewardToken": "Reward token address", + "_user": "User address" + }, + "return": "amount Deposited amountrewardDebt Reward debt (technical value used to track past payouts)pendingWithdrawals Requested but not yet executed withdrawals" + }, + "getWithdrawalRequests(address,uint256,address)": { + "params": { + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address", + "_user": "The User Address" + }, + "return": "An array of withdrawal requests" + }, + "initializeTimeManager(bool,uint256)": { + "details": "Initializes the contract to use either blocks or seconds", + "params": { + "blocksPerYear_": "The number of blocks per year", + "timeBased_": "A boolean indicating whether the contract is based on time or block If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR" + } + }, + "pendingReward(address,uint256,address)": { + "params": { + "_pid": "Pool index", + "_rewardToken": "Reward token address", + "_user": "User address" + }, + "return": "Reward the user is eligible for in this pool, in terms of _rewardToken" + }, + "pendingWithdrawalsBeforeUpgrade(address,uint256,address)": { + "params": { + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address", + "_user": "The address of the user" + }, + "return": "beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade" + }, + "poolLength(address)": { + "params": { + "rewardToken": "Reward token address" + }, + "return": "Number of pools that distribute the specified token as a reward" + }, + "requestWithdrawal(address,uint256,uint256)": { + "params": { + "_amount": "The amount to withdraw from the vault", + "_pid": "The Pool Index", + "_rewardToken": "The Reward Token Address" + } + }, + "rewardTokenAmountsPerBlock(address)": { + "params": { + "_rewardToken": "Reward token address" + }, + "return": "Number of reward tokens created per block or second" + }, + "set(address,uint256,uint256)": { + "params": { + "_allocPoint": "Number of allocation points assigned to this pool", + "_pid": "Pool index", + "_rewardToken": "Reward token address" + } + }, + "setAccessControl(address)": { + "details": "Admin function to set the access control address", + "params": { + "newAccessControlAddress": "New address for the access control" + } + }, + "setPrimeToken(address,address,uint256)": { + "params": { + "_primePoolId": "pool id for reward", + "_primeRewardToken": "address of reward token", + "_primeToken": "address of the prime token contract" + } + }, + "setRewardAmountPerBlockOrSecond(address,uint256)": { + "params": { + "_rewardAmount": "Number of allocation points assigned to this pool", + "_rewardToken": "Reward token address" + } + }, + "setWithdrawalLockingPeriod(address,uint256,uint256)": { + "params": { + "_newPeriod": "New lock period", + "_pid": "Pool index", + "_rewardToken": "Reward token address" + } + }, + "updatePool(address,uint256)": { + "params": { + "_pid": "Pool index", + "_rewardToken": "Reward token address" + } + } + }, + "title": "XVS Vault" + }, + "userdoc": { + "methods": { + "_become(address)": { + "notice": "* Admin Functions **" + }, + "accessControlManager()": { + "notice": "Returns the address of the access control manager contract" + }, + "add(address,uint256,address,uint256,uint256)": { + "notice": "Add a new token pool" + }, + "claim(address,address,uint256)": { + "notice": "Claim rewards for pool" + }, + "constructor": "XVSVault constructor", + "delegate(address)": { + "notice": "Delegate votes from `msg.sender` to `delegatee`" + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "notice": "Delegates votes from signatory to `delegatee`" + }, + "deposit(address,uint256,uint256)": { + "notice": "Deposit XVSVault for XVS allocation" + }, + "executeWithdrawal(address,uint256)": { + "notice": "Execute withdrawal to XVSVault for XVS allocation" + }, + "getCurrentVotes(address)": { + "notice": "Gets the current votes balance for `account`" + }, + "getEligibleWithdrawalAmount(address,uint256,address)": { + "notice": "Get unlocked withdrawal amount" + }, + "getPriorVotes(address,uint256)": { + "notice": "Determine the xvs stake balance for an account" + }, + "getRequestedAmount(address,uint256,address)": { + "notice": "Get requested amount" + }, + "getUserInfo(address,uint256,address)": { + "notice": "Get user info with reward token address and pid" + }, + "getWithdrawalRequests(address,uint256,address)": { + "notice": "Returns the array of withdrawal requests that have not been executed yet" + }, + "pause()": { + "notice": "Pauses vault" + }, + "pendingReward(address,uint256,address)": { + "notice": "View function to see pending XVSs on frontend" + }, + "pendingWithdrawalsBeforeUpgrade(address,uint256,address)": { + "notice": "Gets the total pending withdrawal amount of a user before upgrade" + }, + "poolLength(address)": { + "notice": "Returns the number of pools with the specified reward token" + }, + "requestWithdrawal(address,uint256,uint256)": { + "notice": "Request withdrawal to XVSVault for XVS allocation" + }, + "resume()": { + "notice": "Resume vault" + }, + "rewardTokenAmountsPerBlock(address)": { + "notice": "Returns the number of reward tokens created per block or second" + }, + "set(address,uint256,uint256)": { + "notice": "Update the given pool's reward allocation point" + }, + "setAccessControl(address)": { + "notice": "Sets the address of the access control of this contract" + }, + "setPrimeToken(address,address,uint256)": { + "notice": "Sets the address of the prime token contract" + }, + "setRewardAmountPerBlockOrSecond(address,uint256)": { + "notice": "Update the given reward token's amount per block or second" + }, + "setWithdrawalLockingPeriod(address,uint256,uint256)": { + "notice": "Update the lock period after which a requested withdrawal can be executed" + }, + "updatePool(address,uint256)": { + "notice": "Update reward variables of the given pool to be up-to-date" + } + }, + "notice": "The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS." + }, + "storageLayout": { + "storage": [ + { + "astId": 39069, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "admin", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 39071, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "pendingAdmin", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 39073, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "implementation", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 39075, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "pendingXVSVaultImplementation", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 39080, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "_notEntered", + "offset": 20, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 39082, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "xvsStore", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 39084, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "xvsAddress", + "offset": 0, + "slot": "5", + "type": "t_address" + }, + { + "astId": 39088, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "rewardTokenAmountsPerBlockOrSecond", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 39121, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "userInfos", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_mapping(t_address,t_struct(UserInfo)39095_storage)))" + }, + { + "astId": 39126, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "poolInfos", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_array(t_struct(PoolInfo)39106_storage)dyn_storage)" + }, + { + "astId": 39130, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "totalAllocPoints", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 39139, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "withdrawalRequests", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_mapping(t_address,t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage)))" + }, + { + "astId": 39143, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__oldDelegatesSlot", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 39154, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__oldCheckpointsSlot", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39148_storage))" + }, + { + "astId": 39158, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__oldNumCheckpointsSlot", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_uint32)" + }, + { + "astId": 39162, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "nonces", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 39179, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "delegates", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 39185, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "checkpoints", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39148_storage))" + }, + { + "astId": 39189, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "numCheckpoints", + "offset": 0, + "slot": "17", + "type": "t_mapping(t_address,t_uint32)" + }, + { + "astId": 39195, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "totalPendingWithdrawals", + "offset": 0, + "slot": "18", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" + }, + { + "astId": 39197, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "vaultPaused", + "offset": 0, + "slot": "19", + "type": "t_bool" + }, + { + "astId": 39201, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "isStakedToken", + "offset": 0, + "slot": "20", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 39207, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "pendingRewardTransfers", + "offset": 0, + "slot": "21", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 39209, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "primeToken", + "offset": 0, + "slot": "22", + "type": "t_contract(IPrime)12297" + }, + { + "astId": 39211, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "primeRewardToken", + "offset": 0, + "slot": "23", + "type": "t_address" + }, + { + "astId": 39213, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "primePoolId", + "offset": 0, + "slot": "24", + "type": "t_uint256" + }, + { + "astId": 39217, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__gap", + "offset": 0, + "slot": "25", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 4, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "_accessControlManager", + "offset": 0, + "slot": "71", + "type": "t_contract(IAccessControlManagerV5)1917" + }, + { + "astId": 8, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__gap", + "offset": 0, + "slot": "72", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1924, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "blocksOrSecondsPerYear", + "offset": 0, + "slot": "121", + "type": "t_uint256" + }, + { + "astId": 1926, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "isTimeBased", + "offset": 0, + "slot": "122", + "type": "t_bool" + }, + { + "astId": 1928, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "isInitialized", + "offset": 1, + "slot": "122", + "type": "t_bool" + }, + { + "astId": 1930, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__deprecatedSlot1", + "offset": 2, + "slot": "122", + "type": "t_bytes8" + }, + { + "astId": 1934, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "__gap", + "offset": 0, + "slot": "123", + "type": "t_array(t_uint256)48_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(PoolInfo)39106_storage)dyn_storage": { + "base": "t_struct(PoolInfo)39106_storage", + "encoding": "dynamic_array", + "label": "struct XVSVaultStorageV1.PoolInfo[]", + "numberOfBytes": "32" + }, + "t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage": { + "base": "t_struct(WithdrawalRequest)39113_storage", + "encoding": "dynamic_array", + "label": "struct XVSVaultStorageV1.WithdrawalRequest[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)48_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes8": { + "encoding": "inplace", + "label": "bytes8", + "numberOfBytes": "8" + }, + "t_contract(IAccessControlManagerV5)1917": { + "encoding": "inplace", + "label": "contract IAccessControlManagerV5", + "numberOfBytes": "20" + }, + "t_contract(IBEP20)32362": { + "encoding": "inplace", + "label": "contract IBEP20", + "numberOfBytes": "20" + }, + "t_contract(IPrime)12297": { + "encoding": "inplace", + "label": "contract IPrime", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_array(t_struct(PoolInfo)39106_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct XVSVaultStorageV1.PoolInfo[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(PoolInfo)39106_storage)dyn_storage" + }, + "t_mapping(t_address,t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct XVSVaultStorageV1.WithdrawalRequest[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_mapping(t_address,t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage)))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => mapping(address => struct XVSVaultStorageV1.WithdrawalRequest[])))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_mapping(t_address,t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage))" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_mapping(t_address,t_struct(UserInfo)39095_storage)))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => mapping(address => struct XVSVaultStorageV1.UserInfo)))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_mapping(t_address,t_struct(UserInfo)39095_storage))" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_uint256)" + }, + "t_mapping(t_address,t_mapping(t_uint32,t_struct(Checkpoint)39148_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint32 => struct XVSVaultStorageV1.Checkpoint))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint32,t_struct(Checkpoint)39148_storage)" + }, + "t_mapping(t_address,t_struct(UserInfo)39095_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct XVSVaultStorageV1.UserInfo)", + "numberOfBytes": "32", + "value": "t_struct(UserInfo)39095_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_address,t_uint32)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => struct XVSVaultStorageV1.WithdrawalRequest[]))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_array(t_struct(WithdrawalRequest)39113_storage)dyn_storage)" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(UserInfo)39095_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => struct XVSVaultStorageV1.UserInfo))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_struct(UserInfo)39095_storage)" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint32,t_struct(Checkpoint)39148_storage)": { + "encoding": "mapping", + "key": "t_uint32", + "label": "mapping(uint32 => struct XVSVaultStorageV1.Checkpoint)", + "numberOfBytes": "32", + "value": "t_struct(Checkpoint)39148_storage" + }, + "t_struct(Checkpoint)39148_storage": { + "encoding": "inplace", + "label": "struct XVSVaultStorageV1.Checkpoint", + "members": [ + { + "astId": 39145, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "fromBlockOrSecond", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 39147, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "votes", + "offset": 4, + "slot": "0", + "type": "t_uint96" + } + ], + "numberOfBytes": "32" + }, + "t_struct(PoolInfo)39106_storage": { + "encoding": "inplace", + "label": "struct XVSVaultStorageV1.PoolInfo", + "members": [ + { + "astId": 39097, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "token", + "offset": 0, + "slot": "0", + "type": "t_contract(IBEP20)32362" + }, + { + "astId": 39099, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "allocPoint", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 39101, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "lastRewardBlockOrSecond", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 39103, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "accRewardPerShare", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 39105, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "lockPeriod", + "offset": 0, + "slot": "4", + "type": "t_uint256" + } + ], + "numberOfBytes": "160" + }, + "t_struct(UserInfo)39095_storage": { + "encoding": "inplace", + "label": "struct XVSVaultStorageV1.UserInfo", + "members": [ + { + "astId": 39090, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "amount", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 39092, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "rewardDebt", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 39094, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "pendingWithdrawals", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(WithdrawalRequest)39113_storage": { + "encoding": "inplace", + "label": "struct XVSVaultStorageV1.WithdrawalRequest", + "members": [ + { + "astId": 39108, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "amount", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 39110, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "lockedUntil", + "offset": 0, + "slot": "1", + "type": "t_uint128" + }, + { + "astId": 39112, + "contract": "contracts/XVSVault/XVSVault.sol:XVSVault", + "label": "afterUpgrade", + "offset": 16, + "slot": "1", + "type": "t_uint128" + } + ], + "numberOfBytes": "64" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + }, + "factoryDeps": [ + "0x00040000000000020000000003010019000000600330027000000fc7043001970003000000410355000200000001035500000fc70030019d00000001012001900000000b0000c13d00000000010000193f16001d0000040f0000008001000039000000400010043f0000000001000416000000000101004b0000001b0000c13d000000000100041100000fc801100197000000000200041a00000fc902200197000000000112019f000000000010041b00000020010000390000010000100443000001200000044300000fca0100004100003f170001042e000000000100001900003f180001043000110000000000020000008006000039000000400060043f0000000002000416000000000101004b000000300000613d000000000102004b000000350000c13d000000000100041100000fc801100197000000000200041a00000fc902200197000000000112019f000000000010041b00000020010000390000010000100443000001200000044300000fca0100004100003f170001042e000000000102004b000000350000c13d0000000002000031000000030120008c000000370000213d000000000100001900003f18000104300000000201000367000000000401043b000000e00340027000000fcb0540009c000000d50000813d000010520540009c0000016e0000813d0000107f0540009c0000019a0000813d000010890440009c000002d20000813d000010a20430009c000007460000613d000010a30430009c000006aa0000613d000010a40330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000f0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000502043b0000002401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000b00000005001d000c00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d0000000f0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000900000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000800000001001d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000c0200002900070005202000cd000000000101043b0000000701100029001000000001001d0000000201100039000e00000001001d000000000101041a001100000001001d0000007a01000039000000000101041a000000ff01100190000018030000c13d00000fe30100004100000000001004390000000001000414000018060000013d00000fcc0540009c000001850000813d0000100a0540009c000001ae0000813d0000103a0440009c000002f40000813d0000104a0430009c000007700000613d0000104b0430009c000006df0000613d0000104c0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b000e0fc80020019b00000fc80220009c000000350000213d0000004401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000b00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d0000000e0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b0200002900080005202000cd000000000101043b0000000801100029000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000019fa0000c13d00000fe30100004100000000001004390000000001000414000019fd0000013d000010530540009c000001ef0000813d000010710440009c000003980000813d0000107a0430009c000007aa0000613d0000107b0430009c000007200000613d0000107c0330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d0000001201000039000003bc0000013d00000fcd0540009c000002a90000813d00000ffa0440009c000003a00000813d000010070430009c000007d70000613d000010080430009c000007220000613d000010090330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000000801000039000001ac0000013d000010800440009c000003a80000813d000010860430009c000007d90000613d000010870430009c0000072c0000613d000010880330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000000601000039000000200010043f000009f70000013d0000100b0440009c000003c70000813d000010370430009c000007db0000613d000010380430009c0000072e0000613d000010390330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d00000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a001100000001001d00000fc701100198000000000100001900000a860000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000000ff60110019700000a860000013d000010540440009c000004620000813d000010620430009c000007dd0000613d000010630430009c000007300000613d000010640330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000c0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000401043b0000000301000039000000000201041a0000104d03200198000008000000613d000a00000006001d000b00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000c0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000c0100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000800000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000700000001001d0000000c0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000301043b000000000103041a000000000201004b000e00000000001d000d00000000001d000018340000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe80200004100000000002104350000001b0200003900000000002304350000000d040000290010000e0040002d000000100240006b00000000040000190000000104004039000000400200043d0000000104400190000019d80000613d00000fde0400004100000000004204350000000404200039000000200500003900000000005404350000000003030433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b0000029f0000413d000000000134004b0000127f0000a13d0000127d0000013d00000fce0440009c000004a00000813d00000ff20430009c000007e50000613d00000ff30430009c000007440000613d00000ff40330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d00000ff50110009c000000350000813d0000001001000039000000200010043f0000000000200435000000400200003900000000010000193f163ef70000040f000000200010043f00000011010000290000000000100435000000000100001900000040020000393f163ef70000040f000000000101041a00000fc702100197000000800020043f000000200110027000000ff601100197000000a00010043f00000ff70100004100003f170001042e0000108a0430009c000004a80000213d0000108d0430009c000007ef0000613d0000108e0330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000201043b00000fc80120019700000fd60220009c000000350000813d000000000200041a0000000003000411000000000223013f00000fc80220019800000a930000c13d000000000201004b00000c130000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f0000109801000041000000c40010043f0000109901000041000000e40010043f000010060100004100003f18000104300000103b0430009c000004b50000213d0000103e0430009c0000080a0000613d0000103f0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b001000000002001d0000004401100370000000000101043b000f0fc80010019b00000fc80110009c000000350000213d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000100220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000e00000001001d000000110100002900000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c90000000e02200029000000000101043b000c00000001001d000e00000002001d0000000301200039000000000101041a000d00000001001d000000110100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000800000001001d0000000e01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000900000003001d00000004033000390000000000230435000000400200043d000a00000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040220008c000018c70000c13d0000000103000031000018fb0000013d000010720430009c000005030000213d000010750430009c000008450000613d000010760130009c000000350000c13d0000007901000039000009fa0000013d00000ffb0430009c0000051a0000213d00000ffe0430009c0000087b0000613d00000fff0130009c000000350000c13d0000000301000039000008a00000013d000010810430009c000005220000213d000010840430009c0000089f0000613d000010850330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d00000fc80110009c000000350000213d0000001501000039000000200010043f0000000000200435000000400200003900000000010000193f163ef70000040f000000200010043f0000001101000029000000000010043500000000010000190000004002000039000009f90000013d0000100c0430009c000005350000213d0000100f0430009c000008a50000613d000010100330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b00100fc80010019b00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000400300043d0000002002300039000f00000001001d000000000401041a0000000501400210000d00000002001d0000000001120019000000400010043f000c00000003001d0000000000430435000e00000004001d000000000104004b000004450000613d0011000d0000002d001000000000001d0000000f010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000400200043d0000006003200039000000400030043f000000100600002900000001036002100000000001310019000000000301041a00000000033204360000000101100039000000000101041a0000008004100270000000400520003900000000004504350000103101100197000000000013043500000011010000290000000001210436001100000001001d0000000106600039001000000006001d0000000e0160006c000004230000413d000000400100043d000000200200003900000000032104360000000c02000029000000000202043300000000002304350000004001100039000000000302004b0000045f0000613d00000000030000190000000d070000290000000074070434000000006504043400000000055104360000000006060433000010310660019700000000006504350000004004400039000000000404043300001031044001970000004005100039000000000045043500000060011000390000000103300039000000000423004b000004500000413d000000400200043d0000000001210049000004fb0000013d000010550430009c000006640000213d000010580430009c000008dd0000613d000010590330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000500000002001d0000002401100370000000000101043b000600000001001d000000c001000039000000400010043f0000001c01000039000000800010043f0000105e02000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f000001400000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000cb30000c13d000000010300003100000cda0000013d00000fcf0430009c000006a40000213d00000fd20130009c000008e70000613d00000fd30130009c000000350000c13d000000000100041a000008a10000013d0000108b0430009c000008eb0000613d0000108c0130009c000000350000c13d0000101101000041000000800010043f0000101201000041000000a00010043f0000101301000041000000c00010043f00000080010000390000004302000039000007eb0000013d0000103c0430009c0000090c0000613d0000103d0330009c000000350000c13d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000501043b000000000105041a000000000201004b001000000000001d000011090000c13d000000400100043d00000010020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f00003f170001042e000010730430009c000009310000613d000010740330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000001102000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000000000101041a00000fc701100197000000800010043f00000fd40100004100003f170001042e00000ffc0130009c000009dc0000613d00000ffd0130009c000000350000c13d0000100001000041000000800010043f00000fd40100004100003f170001042e000010820430009c000009ec0000613d000010830330009c000000350000c13d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000f02000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000008a00000013d0000100d0430009c000009fe0000613d0000100e0330009c000000350000c13d00000fd50320009c000000350000213d000000c30220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000f00000002001d0000002402100370000000000202043b001000000002001d0000006402100370000000000202043b000e00000002001d000001000220008c000000350000813d000000a402100370000000000202043b000d00000002001d0000008401100370000000000101043b000c00000001001d0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000101101000041000000800010043f0000101201000041000000a00010043f0000101301000041000000c00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001014011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000b00000001001d000000c001000039000000400010043f0000000801000039000000800010043f0000101501000041000000a00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001016011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000a00000001001d00001017010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000400300043d0000006002300039000000000012043500000040013000390000000a02000029000000000021043500000020013000390000000b020000290000000000210435000000000100041000000fc80110019700000080023000390000000000120435000000400100043d00000000021200490000000002210436000b00000003001d000000a003300039000a00000003001d000000400030043f00000fc70320009c00000fc7020080410000004002200210000000000101043300000fc70310009c00000fc7010080410000006001100210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d00000ff8010000410000000a0200002900000000001204350000000b04000029000000c00140003900000ff9020000410000000000210435000000400300043d0000000001340049000000da0110003900000fc70210009c00000fc701008041000000600110021000000fc70230009c000b00000003001d00000fc70200004100000000020340190000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b040000290000006002400039000000100300002900000000003204350000004002400039000000110300002900000000003204350000002002400039000000000012043500000080014000390000000f020000290000000000210435000000400200043d00000000012100490000000001120436000000a003400039000000400030043f00000fc70310009c00000fc7010080410000004001100210000000000202043300000fc70320009c00000fc7020080410000006002200210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b04000029000000c00240003900001018030000410000000000320435000000c20240003900000009030000290000000000320435000000e2024000390000000000120435000000400100043d000000000212004900000000022104360000010203400039000000400030043f00000fc70320009c00000fc7020080410000004002200210000000000101043300000fc70310009c00000fc7010080410000006001100210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000400200043d000000000101043b0000000d03000029000010190330009c000014dd0000813d0000000e03000029000000ff0330018f0000001b0430008a000000010440008c000016520000213d0000000004020436000000400040043f00000080052000390000000d06000029000000000065043500000060052000390000000c060000290000000000650435000000400520003900000000003504350000000000140435000000400300043d000e00000003001d0000000001320049000000a00110003900000fc70210009c00000fc701008041000000600110021000000fc70230009c00000fc70200004100000000020340190000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000001020000393f163f110000040f0000000e03000029000000200430008a0000000003010019000000600330027000000fc703300197000000200530008c000000200600003900000000060340190000001f0560018f0000000506600272000006490000613d0000002007400039000000000801034f0000000009040019000000008a08043c0000000009a90436000000000a79004b000006450000c13d000000000705004b000006580000613d0000000506600210000000000761034f00000000046400190000000305500210000000000604043300000000065601cf000000000656022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000565019f0000000000540435000100000003001f00030000000103550000000102200190000019250000613d000000400100043d000000200210008a0000000002020433000c0fc80020019c00001bfb0000c13d00000044021000390000103003000041000012850000013d000010560430009c00000a0d0000613d000010570330009c000000350000c13d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002401100370000000000201043b0000001301000039000000000101041a000000ff0110019000000bc30000c13d001000000002001d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000100220006b000010790000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c9000000000101043b0000000001210019000e00000001001d0000000201100039000d00000001001d000000000101041a000f00000001001d0000007a01000039000000000101041a000000ff01100190000011630000c13d00000fe30100004100000000001004390000000001000414000011660000013d00000fd00430009c00000a370000613d00000fd10130009c000000350000c13d0000001601000039000008a00000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000701000039000000200010043f000000400200003900000000010000193f163ef70000040f00000011020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f00000010020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f0000000201100039000000000101041a00000a860000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b001000000001001d00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000701000039000000200010043f000000400200003900000000010000193f163ef70000040f00000011020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f00000010020000290000000000200435000000200010043f000000000100001900000040020000393f163ef70000040f0000000102100039000000000202041a000000000301041a0000000201100039000000000101041a000000400400043d00000040054000390000000000150435000000200140003900000000002104350000000000340435000000400100043d0000000002140049000000600220003900000a8b0000013d0000000201000039000008a00000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000602000039000009f50000013d0000000101000039000008a00000013d0000004701000039000008a00000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000101043b000d00000001001d0000007a01000039000000000101041a000000ff0110019000000a9d0000c13d00000fe3010000410000000000100439000000000100041400000aa00000013d0000001801000039000009fa0000013d000000c001000039000000400010043f0000000801000039000000800010043f000010b002000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197001000000004001d000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f0000012c0000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000b130000c13d000000010300003100000b3a0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b00000fd60320009c000000350000813d0000002401100370000000000101043b001100000001001d0000000801000039000000200010043f0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000200200003900000000010000193f163ef70000040f000000110200002900000005322000c900000000012100190000000102100039000000000202041a0000000203100039000000000303041a0000000304100039000000000404041a000000000501041a0000000401100039000000000101041a000000400600043d0000008007600039000000000017043500000060016000390000000000410435000000400160003900000000003104350000002001600039000000000021043500000fc8015001970000000000160435000000400100043d0000000002160049000000a00220003900000a8b0000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b000d0fc80010019b00000fd60110009c000000350000813d0000001301000039000000000101041a000000ff0110019000000bc30000c13d000000000100041100000fc801100197000c00000001001d00000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000b0fc80010019b0000000501000039000000000101041a00000fc80110019800000c2e0000c13d000000400100043d00000064021000390000107d03000041000000000032043500000044021000390000107e0300004100000000003204350000002402100039000000300300003900000bd60000013d0000007a01000039000007de0000013d0000000401000039000008a00000013d0000001701000039000008a00000013d0000001301000039000000000101041a000000ff011001900000000001000019000000010100c039000000800010043f00000fd40100004100003f170001042e00000ff801000041000000800010043f00000ff901000041000000a00010043f00000080010000390000003a020000393f163ef70000040f000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b000f0fc80020019b00000fd60220009c000000350000813d0000004402100370000000000502043b0000002401100370000000000401043b0000000301000039000000000201041a0000104d0320019800000ba10000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000000a01000039000000a40010043f000010ae01000041000000c40010043f000010030100004100003f180001043000000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000004402100370000000000202043b000e00000002001d0000002401100370000000000101043b000f00000001001d000000e001000039000000400010043f0000003301000039000000800010043f0000104502000041000000a00020043f0000104603000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001770000043f00000fda01000041000000000010043900000fc801400197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040320008c00000e770000c13d000000010300003100000e9e0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002401100370000000000301043b00000fc80130019700000fc80330009c000000350000213d000000000300041a0000000004000411000000000334013f00000fc80330019800000a930000c13d000000000302004b00000ca90000613d000000000301004b00000ca90000613d0000000503000039000000000403041a00000fc805400198000010c40000c13d00000fc904400197000000000424019f0000000405000039000000000605041a000000000043041b00000fc903600197000000000313019f000000000035041b0000000303000039000000000403041a0000104e0440019700000fd6044001c7000000000043041b00000fc803600197000000800000043f000000a00030043f000000c00020043f000000e00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001078011001c70000800d020000390000000103000039000010790400004100000c230000013d00000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000202043b00110fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b00100fc80020019b00000fd60220009c000000350000813d000000000200041a0000000003000411000000000223013f0000004401100370000000000301043b00000fc80120019800000a930000c13d000f00000003001d000000110100006b00000eef0000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000002201000039000000a40010043f0000100401000041000000c40010043f0000100501000041000000e40010043f000010060100004100003f18000104300000000501000039000000000101041a00000fc801100197000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002401100370000000000101043b000600000001001d000000e001000039000000400010043f0000003001000039000000800010043f0000103202000041000000a00020043f0000103303000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001740000043f00000fda01000041000000000010043900000fc801400197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000efb0000c13d000000010300003100000f220000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000e02000039000009f50000013d00000ff101000041000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00110fc80010019b00000fd60110009c000000350000813d0000108f01000041000000800010043f00000fda01000041000000000010043900000011010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00000f540000c13d000000010300003100000f7c0000013d00000fd50320009c000000350000213d000000430220008c000000350000a13d0000000402100370000000000202043b000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000300041a0000000004000411000000000434013f0000002401100370000000000301043b00000fc80140019800000a930000c13d0000007a01000039000000000401041a0000ff000540019000000c240000c13d00000000053201a000000e6d0000613d000000000502004b00000fa70000613d000000000503004b00000fa70000613d00000fde01000041000000800010043f0000002001000039000000840010043f000000a40010043f0000104401000041000000c40010043f000010030100004100003f180001043000000fd50320009c000000350000213d000000630220008c000000350000a13d0000000402100370000000000302043b00000fc80230019700000fd60330009c000000350000813d0000002403100370000000000303043b001100000003001d0000004401100370000000000101043b00100fc80010019b00000fc80110009c000000350000213d00000000002004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000110110006b000010790000813d0000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a001100000001001d0000000004000019000f00000004001d0000001103000029000000000103004b000012890000613d00110001003000920000001002000029000000000102041a000000110110006b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000e00000001001d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000110300002900000001043002100000000e024000290000000102200039000000000202041a0000103102200197000000000101043b000000000112004b000012890000213d000e00000004001d0000001002000029000000000102041a000000000113004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e01100029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b0400003900000000004204350000000f04300029000000000334004b0000000003000019000000010300403900000001033001900000097c0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000009d20000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110019000000a7a0000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d00000a850000013d00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000000902000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000000000101041a000000800010043f00000fd40100004100003f170001042e00000fd50320009c000000350000213d000000230220008c000000350000a13d0000000401100370000000000101043b00000fd60210009c000000350000813d0000001402000039000000200020043f0000000000100435000000400200003900000000010000193f163ef70000040f000007de0000013d000000c001000039000000400010043f0000000701000039000000800010043f0000105a02000041000000a00020043f0000004703000039000000000303041a00000fd904000041000000c00040043f000000000400041100000fc804400197001000000004001d000000c40040043f0000004004000039000000e40040043f000001040010043f000001240020043f0000012b0000043f00000fda01000041000000000010043900000fc801300197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040320008c00000b550000c13d000000010300003100000b7c0000013d00000fd50320009c000000350000213d000000a30220008c000000350000a13d0000000402100370000000000202043b000e0fc80020019b00000fd60220009c000000350000813d0000002402100370000000000202043b000500000002001d0000004402100370000000000202043b000a0fc80020019b00000fd60220009c000000350000813d0000008402100370000000000202043b000300000002001d0000006401100370000000000101043b000400000001001d000000e001000039000000400010043f0000002c01000039000000800010043f00000fd702000041000000a00020043f00000fd803000041000000c00030043f0000004704000039000000000404041a00000fd905000041000000e00050043f000000000500041100000fc805500197000000e40050043f0000004005000039000001040050043f000001240010043f000001440020043f000001640030043f000001700000043f00000fda01000041000000000010043900000fc801400197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00000fcc0000c13d000000010300003100000ff40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000400200043d0000000000120435000000400100043d0000000002120049000000200220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f00003f170001042e00000fde01000041000000800010043f0000002001000039000000840010043f0000000e01000039000000a40010043f0000109501000041000000c40010043f000010030100004100003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d0110006b00000bcd0000813d0000000e0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a00110fc70010019c000000000100001900000a860000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000010220008a001100000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000e0200002900000000002004350000001002000039000000200020043f00000fc7011001970000000d0110006c000012190000a13d000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000000000435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f00000011030000290000000102200190000000350000613d000000000101043b000000000101041a00000fc7011001970000000d0110006c000000000100001900000a860000213d000000000103004b0000000002000019000015910000c13d001100000002001d0000000e0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f0000000001000414000012270000013d00000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000b270000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000b230000c13d000000000604004b00000b360000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000be00000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000001302000039000000000302041a000000ff04300190000010ce0000c13d0000004403100039000010b204000041000000000043043500000024031000390000000000230435000010800000013d00000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000b690000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000b650000c13d000000000604004b00000b780000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000bfa0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000001302000039000000000302041a000000ff04300190000010e20000c13d000010b40330019700000001033001bf000000000032041b00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d0200003900000002030000390000105d04000041000010dc0000013d000b00000005001d000c00000004001d0000104e02200197000000000021041b0000001301000039000000000101041a000000ff0110019000000bc30000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110006b000010790000813d0000000b0100006b000011940000c13d000000400100043d0000004402100039000010a103000041000000000032043500000024021000390000001f030000390000107f0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000000f01000039000000a40010043f000010a501000041000000c40010043f000010030100004100003f1800010430000000400100043d00000064021000390000106e03000041000000000032043500000044021000390000106f03000041000000000032043500000024021000390000002b03000039000000000032043500000fde020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d00000000012100490000008401100039000010880000013d0000001f0430018f000000050230027200000bea0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00000be60000c13d000000000504004b00000bf80000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000000050220021000000c040000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00000c000000c13d000000000504004b00000c110000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000004702000039000000000302041a00000fc904300197000000000414019f000000000042041b00000fc802300197000000800020043f000000a00010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000001096011001c70000800d0200003900000001030000390000109704000041000010dd0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f0000104101000041000000c40010043f000010030100004100003f180001043000000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d000000000101041a000e00000001001d000000000101004b001100000000001d000010e80000c13d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a00000fc9022001970000000d07000029000000000272019f000000000021041b000000400100043d00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d02000039000000040300003900001022040000410000000c050000290000000b060000293f163f0c0000040f0000000101200190000000350000613d0000000b020000290000000d0120006c000010e00000613d000000110100006b000010e00000613d0000000b0100006b000012a50000c13d0000000d0100006b000010e00000613d0000000d0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000f00000001001d000e0fc70010019c001000000000001d000016730000c13d000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b0300003900000000003204350000001004000029000000110340002900110ff60030019b000000110340006b0000193e0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00000c9f0000413d000000000124004b000011e60000a13d000011e40000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001801000039000000a40010043f00000ff001000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c0011002100000105b011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000c00800003900000cc70000613d000000000601034f000000006706043c0000000008780436000000e00780008c00000cc30000c13d000000000604004b00000cd60000613d0000000505500210000000000651034f0000000304400210000000c005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000000fb20000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000c00000002001d000000060120006b000010790000813d001100000000001d00000d040000013d00000011020000290000000102200039001100000002001d0000000c0120006c000015f80000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff0110019000000d300000613d00000fe1010000410000000000100439000000000100041400000d330000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c00000cff0000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000a00000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c00000d610000c13d000000010300003100000d930000013d00000010040000290000000a03400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c00000020050000390000000005034019000000050450027200000d800000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00000d7c0000c13d0000001f0550019000000d8f0000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f0003000000010355000000010220019000001a2b0000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b000018b00000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b00000dd00000c13d000000000101004b00000dd70000613d00000fe1010000410000000000100439000000000100041400000e610000013d000900000005001d000000000101004b00000ddb0000613d00000fe1010000410000000000100439000000000100041400000dde0000013d00000fe3010000410000000000100439000000000100041400000e610000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000a00000005001d000000000345004b00001a450000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000700000002001d000000000101043b000000000101041a000800000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b030000290000000a04000029000000000234004b000000000200001900000fe6060000410000001a07000039000000080500002900000e2b0000613d0000000002340049000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00000e2a0000613d00000007321000b900000000311200d9000000070110006c00000e2b0000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000000006104350000000000730435000000000405004b00001a5c0000613d000000000125004b000000000300001900000e3b0000213d00000000215200d900000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000009020000290000001005200069000000400100043d0000004002100039000000400020043f0000002002100039000000000062043500000000007104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b00000000050000190000000105004039000000010550019000001a730000c13d000000000034041b0000007a01000039000000000101041a000000ff0110019000000e5e0000613d00000fe1010000410000000000100439000000000100041400000e610000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000cff0000013d00000fde01000041000000800010043f0000002001000039000000840010043f0000001701000039000000a40010043f0000104201000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c00110021000000fdc011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000e8b0000613d000000000601034f000000006706043c0000000008780436000001000780008c00000e870000c13d000000000604004b00000e9a0000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010160000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d000000110100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000f0220006b000010790000813d0000000e02000029000000010220008a000010470220009c000012dd0000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f0600002900000005326000c900000000011200190000000401100039000000000201041a0000000e04000029000000000041041b000000400100043d000000200310003900000000004304350000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000030300003900001049040000410000001105000029000010dd0000013d000000100100006b000010300000c13d00000fde01000041000000800010043f0000002001000039000000840010043f0000001d01000039000000a40010043f0000100201000041000000c40010043f000010030100004100003f180001043000000fc70310009c00000fc701008041000000c00110021000000fdc011001c73f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000f0f0000613d000000000601034f000000006706043c0000000008780436000001000780008c00000f0b0000c13d000000000604004b00000f1e0000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010900000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000003020433000000000203004b0000000002000019000000010200c039000000000223004b000000350000c13d001100240010003d0000000402100039000000000303004b000012010000613d0000000403000039000000000303041a000010340400004100000000004104350000000e010000290000000000120435000000400100043d000f00000001001d00000fda01000041000000000010043900000fc801300197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c000012e40000c13d0000000103000031000013170000013d00000fc70210009c00000fc701008041000000c00110021000001090011001c700000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200000f690000613d0000008006000039000000000701034f000000007807043c0000000006860436000000a00860008c00000f650000c13d000000000604004b00000f780000613d0000000505500210000000000651034f00000003044002100000008005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000010aa0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d000000000202043300000fd60320009c000000350000813d0000000003000411000000000223013f001000040010003d00000fc8022001980000120b0000c13d00001093020000410000000000210435000000400100043d000f00000001001d00000fda01000041000000000010043900000011010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000013640000c13d0000000103000031000013970000013d000000000502004b000010000300c0410000007905000039000000000035041b000010b5022001970000104303400197000000000223019f00000100022001bf000000000021041b000000000100001900003f170001042e0000001f0430018f000000050230027200000fbc0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00000fb80000c13d000000000504004b00000fca0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fc70210009c00000fc701008041000000c00110021000000fdc011001c700000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000000e00800003900000fe10000613d000000000601034f000000006706043c0000000008780436000001000780008c00000fdd0000c13d000000000604004b00000ff00000613d0000000505500210000000000651034f0000000304400210000000e005500039000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000011e80000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b000010100000613d0000000e0200006b000012830000613d0000000a0200006b000012830000613d0000000402000039000000000202041a00000fc802200198000013a90000c13d000000440210003900000fef0300004100000bbf0000013d000000440210003900000fdd03000041000000000032043500000024021000390000000c030000390000107f0000013d0000001f0430018f0000000502300272000010200000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000101c0000c13d000000000504004b0000102e0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000100100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000f0110006b000010790000813d0000001601000039000000000101041a0000001702000039000000000202041a0000001803000039000000000303041a000000400400043d00000060054000390000000f0600002900000000006504350000004005400039000000000035043500000020034000390000001005000029000000000053043500000fc8022001970000000000240435000000400200043d0000000003240049000000800330003900000fc70430009c00000fc703008041000000600330021000000fc70420009c00000fc7020080410000004002200210000000000223019f000000000300041400000fc70430009c00000fc703008041000000c003300210000000000232019f00000fc80510019700000fec012001c70000800d020000390000000303000039000010010400004100000011060000293f163f0c0000040f0000000101200190000000350000613d0000001603000039000000000103041a00000fc90110019700000011011001af000000000013041b0000001703000039000000000103041a00000fc90110019700000010011001af000000000013041b0000000f010000290000001802000039000000000012041b000000000100001900003f170001042e000000400100043d0000004402100039000010af03000041000000000032043500000024021000390000001303000039000000000032043500000fde020000410000000000210435000000040210003900000020030000390000000000320435000000400200043d0000000001210049000000640110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f00003f18000104300000001f0430018f00000005023002720000109a0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000010960000c13d000000000504004b000010a80000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000010b40000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000010b00000c13d000000000504004b000010c20000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fde01000041000000800010043f0000002001000039000000840010043f0000001301000039000000a40010043f0000107701000041000000c40010043f000010030100004100003f1800010430000010b403300197000000000032041b00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d020000390000000203000039000010b10400004100000010050000293f163f0c0000040f0000000101200190000000350000613d000000000100001900003f170001042e00000044021000390000105c030000410000000000320435000000240210003900000017030000390000107f0000013d00000000040000190000000f02000029000000000102041a001100000004001d000000000114004b00003c330000813d0000000501000039000000000101041a001000000001001d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110400002900000005324000c9000000000101043b0000000001210019000000000101041a000000100110014f00000fc801100198000012300000613d00000001044000390000000e0140006c0000000f02000029000010ea0000413d001100000000001d00000c410000013d0000000007010019000e00000000001d001000000000001d000f00000005001d000011100000013d000000000207004b000004f50000613d000000010770008a000000000117004b00003c330000813d001100000007001d0000000000500435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011070000290000000102700210000000000101043b00000000022100190000000f05000029000000000105041a0000000103200039000000000303041a0000102a03300197000010400330009c0000113b0000c13d000000000317004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80600004100000000006204350000001b060000390000000000630435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000110e0000613d0000128c0000013d000000000317004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80600004100000000006204350000001b060000390000000000630435001000100040002d000000100440006b0000000004000019000000010400403900000001044001900000110e0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000013b10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000011590000413d000000000214004b000013b10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000f0110006c000010e00000a13d0000000e01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000b00000003001d00000004033000390000000000230435000000400200043d000c00000002001d00000fda02000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c000013b70000c13d0000000103000031000013eb0000013d0000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000200041100000fc802200197000a00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000900000001001d0000000201100039000800000001001d000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000b03400029000000000443004b000000000400001900000001040040390000000104400190000014340000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000011db0000413d000000000124004b000011e60000a13d000000000132001900000000000104350000001f01200039000013b20000013d0000001f0430018f00000005023002720000000502200210000011f20000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000011ee0000c13d000000000504004b000011ff0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fde030000410000000000310435000000200300003900000000003204350000000c0200003900000011030000290000000000230435000000440210003900000fdd03000041000010840000013d00000fde0200004100000000002104350000002002000039000000100300002900000000002304350000006402100039000010910300004100000000003204350000004402100039000010920300004100000000003204350000002402100039000000220300003900000bdb0000013d000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f00000001022001900000001102000029000000350000613d000000000101043b0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000001ea0000013d0000000501000039000000000101041a00000fc80110019700000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a0000000201100039000000000401041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50200004100000000002104350000001e020000390000000000250435000000400200043d000000000643004b000015d40000813d00000fde0300004100000000003204350000000403200039000000200400003900000000004304350000000003050433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000012740000413d000000000134004b0000127f0000a13d000000000123001900000000000104350000001f01300039000010b3011001970000000001210019000013b40000013d000000440210003900000ff0030000410000000000320435000000240210003900000018030000390000107f0000013d000000400100043d0000000f02000029000004f70000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000013b10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000012990000413d000000000214004b000013b10000a13d00000000023100190000000000020435000013b10000013d0000000b0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000f00000001001d000e0fc70010019c001000000000001d000015720000c13d000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c0300003900000000003204350000001004000029000000110340006c0000166b0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000012d30000413d000000000124004b000011e60000a13d000011e40000013d000000400100043d00000044021000390000104803000041000000000032043500000024021000390000001a030000390000107f0000013d0000000f04000029000000110240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013040000613d0000000f080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013000000c13d000000000604004b000013130000613d0000000505500210000000000651034f0000000f055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000143f0000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000000350000c13d000000000202004b0000164c0000613d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000c00000001001d000000000101004b00001a8a0000c13d0000000e0100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000604000029000000000041041b000000400100043d000000200310003900000000004304350000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000020300003900001036040000410000000e05000029000010dd0000013d0000000f04000029000000100240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013840000613d0000000f080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013800000c13d000000000604004b000013930000613d0000000505500210000000000651034f0000000f055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000014590000613d0000001f01300039000010b301100197000000400200043d0000000001210019000000400010043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d0000000002020433000000000202004b000010e00000613d000000440210003900001094030000410000000000320435000000240210003900000015030000390000107f0000013d000000050200006b000014730000c13d000000440210003900000fee03000041000000000032043500000024021000390000001d030000390000107f0000013d0000001f01100039000010b3011001970000000001310019000000400200043d0000000001210049000010880000013d0000000c040000290000000b02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000013d80000613d0000000c080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000013d40000c13d000000000604004b000013e70000613d0000000505500210000000000651034f0000000c055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000014e30000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000f00000001001d000000110100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435001000000004001d0000000f0340006b000019cc0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000142a0000413d000000000124004b000011e60000a13d000019240000013d0000000901000029000000000101041a000000000131004b000014fd0000813d000000400100043d0000004402100039000010a003000041000000000032043500000024021000390000001b030000390000107f0000013d0000001f0430018f0000000502300272000014490000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000014450000c13d000000000504004b000014570000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000014630000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000145f0000c13d000000000504004b000014710000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000c00000001001d000000000101004b000016920000c13d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000201043b000000000102041a000f00000001001d000000000101004b001000000002001d00001cd80000c13d0000000a0100002900000000001004350000001401000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000ff0110019000001e1f0000c13d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435001100050030002d000000110330006b000000000300001900000001030040390000000103300190000021040000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000014d30000413d000000000124004b000011e60000a13d000019240000013d00000064012000390000101a03000041000000000031043500000044012000390000101b03000041000016570000013d0000001f0430018f0000000502300272000014ed0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000014e90000c13d000000000504004b000014fb0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000700000001001d0000000f0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000000201004b000021360000c13d0000000f0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000c0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000c02000029000e0005202000cd000000000101043b0000000e01100029000d00000001001d0000000201100039000600000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000025d40000c13d00000fe30100004100000000001004390000000001000414000025d70000013d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000012b80000013d001000000000001d000000400100043d0000004002100039000000400020043f0000002002100039000000000002043500000000000104350000000e0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f001000100000002d0000001104000029000000100340006a00001070033001970000000102200190000000350000613d00000001023002700000000002240049000000000101043b000f00000002001d00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c70000801002000039001100000004001d3f163f110000040f00000011050000290000000102200190000000350000613d000000000101043b000000400300043d0000004002300039000000400020043f000000000101041a00000fc7021001970000000003230436000000200110027000000ff60110019700000000001304350000000d04000029000000000342004b00000a860000613d0000000f03000029000000010130008a000000000242004b0000000005018019001100000005001d000000100300802900000fc70230019700000fc701500197000000000121004b001000000003001d000015920000213d00000aff0000013d0000006001200039000000400010043f00000040012000390000101f05000041000000000051043500000028010000390000000001120436000010200500004100000000005104350000000003430049001100000003001d000010210330009c00000c410000413d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000015ee0000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000060110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000060200002900000005322000c9000f00010020003d0000000f01100029000000000101041a001000000001001d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400400043d0000004001400039000000400010043f000000200140003900000fe50200004100000000002104350000001e020000390000000000240435000000400200043d000000100530006c00001f860000813d00000fde0300004100000000003204350000000403200039000000200500003900000000005304350000000003040433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000016420000413d000000000134004b0000127f0000a13d0000127d0000013d000000440210003900001035030000410000000000320435000000240210003900000014030000390000107f0000013d00000064012000390000101a03000041000000000031043500000044012000390000101c03000041000000000031043500000024012000390000002203000039000000000031043500000fde010000410000000000120435000000040120003900000020030000390000000000310435000000400100043d0000000002120049000000840220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f00003f18000104300000007a01000039000000000101041a000000ff01100190000019460000c13d00000fe30100004100000000001004390000000001000414000019490000013d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b00000c820000013d001100000000001d000016a70000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000011020000290000000102200039001100000002001d0000000c0120006c000014850000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff01100190000016d30000613d00000fe10100004100000000001004390000000001000414000016d60000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c000016a20000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000900000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c000017040000c13d0000000103000031000017360000013d00000010040000290000000903400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000000504500272000017230000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000171f0000c13d0000001f05500190000017320000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000102200190000020990000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b00001f6f0000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b000017730000c13d000000000101004b000016940000613d00000fe10100004100000000001004390000000001000414000016970000013d000700000005001d000000000101004b0000177a0000613d00000fe101000041000000000010043900000000010004140000177d0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000900000005001d000000000345004b000020bf0000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000600000002001d000000000101043b000000000101041a000800000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000009030000290000000b0230006c0000000002000019000017c70000613d00000009030000290000000b0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000017c60000613d00000006321000b900000000311200d9000000060110006c000017c70000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a0400003900000000004304350000000805000029000000000405004b000020d60000613d000000000125004b0000000003000019000017da0000213d00000008212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000007020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe60400004100000000004204350000001a0200003900000000002104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b000000000500001900000001050040390000000105500190000020ed0000c13d000000000034041b0000007a01000039000000000101041a000000ff01100190000017ff0000613d00000fe10100004100000000001004390000000001000414000016970000013d00000fe30100004100000000001004390000000001000414000016970000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000110110006c000026350000a13d0000001001000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000600000003001d00000004033000390000000000230435000000400200043d000d00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00001ef20000c13d000000010300003100001f260000013d0000000004010019000d00000000001d000e00000000001d001000000003001d000000010440008a000000000114004b00003c330000813d001100000004001d0000000000300435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000110300002900000001043002100000000f024000290000000102200039000000000202041a0000103102200197000000000101043b000000000112004b000002830000213d000f00000004001d0000001002000029000000000102041a000000000113004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f011000290000001005000029000000000305041a0000000102100039000000000202041a0000102a02200197000010400220009c000f00000003001d000018870000c13d000000110230006b00003c330000813d000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000d000d0030002d0000000d0330006b000000000300001900000001030040390000000103300190000018980000613d00001faa0000013d000000110230006b00003c330000813d000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000e000e0030002d0000000e0330006b00000000030000190000000103004039000000010330019000001fc10000c13d0000000000500435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000201043b0000000f01000029000000010110008a00000001031002100000000002320019000000000002041b0000000102200039000000000002041b0000001003000029000000000013041b0000001104000029000000000204004b000018380000c13d000002830000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000018bd0000413d000000000124004b000011e60000a13d000011e40000013d0000000a040000290000000902400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000b020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000018e80000613d0000000a080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b000018e40000c13d000000000604004b000018f70000613d0000000505500210000000000651034f0000000a055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000001c270000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50430009c000000350000213d0000001f0330008c000000350000a13d00000000040104330000004001200039000000400010043f0000001e01000039000000000112043600000fe5030000410000000000310435000b00000004001d000000080340006c00001cf40000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000191b0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f000000050230027200000005022002100000192f0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b0000192b0000c13d000000000504004b0000193c0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000007a01000039000000000101041a000000ff0110019000001c410000c13d00000fe3010000410000000000100439000000000100041400001c440000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000c00000004001d00000ff50340009c00001cc10000813d0000001002000029000a0011002000720000000e0100006b00001d220000c13d000000400200043d0000004001200039000000400010043f0000000c01000029000900000002001d00000000021204360000000a0100002900000ff601100197000a00000001001d000c00000002001d00000000001204350000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000902000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000b0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000a03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000b050000293f163f0c0000040f0000000101200190000000350000613d00000c6d0000013d0000007a01000039000000000101041a000000ff0110018f00000010030000290000000f0230006b00001cfc0000c13d000000000101004b00001d680000c13d00000fe3010000410000000000100439000000000100041400001d6b0000013d00000007010000290000000203100039000000000403041a0000004001200039000000400010043f0000001e01000039000000000112043600000fe5050000410000000000510435000000100540006c00001d020000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000019f00000413d000000000124004b000011e60000a13d000011e40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c000028a30000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000700000003001d00000004033000390000000000230435000000400200043d000c00000002001d00000fda02000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c000020020000c13d0000000103000031000020360000013d0000001f0430018f000000050230027200001a350000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00001a310000c13d000000000504004b00001a430000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a520000413d000000000124004b000011e60000a13d000011e40000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a690000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001a800000413d000000000124004b000011e60000a13d000011e40000013d001100000000001d00001a9f0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b00000011020000290000000102200039001100000002001d0000000c0120006c0000133a0000813d0000000e0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000000110220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110200002900000005322000c9000000000101043b0000000001210019000f00000001001d0000000201100039000d00000001001d000000000101041a001000000001001d0000007a01000039000000000101041a000000ff0110019000001acb0000613d00000fe1010000410000000000100439000000000100041400001ace0000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c00001a9a0000a13d0000000f01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000a00000003001d00000004033000390000000000230435000000400200043d001000000002001d00000fda02000041000000000020043900000fc801100197000b00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000b02000029000000040320008c00001afc0000c13d000000010300003100001b2e0000013d00000010040000290000000a03400069000000240530003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70450009c00000fc7050080410000006004500210000000000434019f00000fc70310009c00000fc701008041000000c001100210000000000141019f3f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c00000020050000390000000005034019000000050450027200001b1b0000613d00000010080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00001b170000c13d0000001f0550019000001b2a0000613d0000000504400210000000000641034f00000010044000290000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000100000003001f00030000000103550000000102200190000022d60000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e0300003900000000003204350000001004000029000000000354004b0000221f0000413d0000007a01000039000000000101041a000000ff0110018f000000000254004b00001b6b0000c13d000000000101004b00001a8c0000613d00000fe1010000410000000000100439000000000100041400001a8f0000013d000800000005001d000000000101004b00001b720000613d00000fe1010000410000000000100439000000000100041400001b750000013d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000b00000004001d000a00000005001d000000000345004b000022f00000413d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000700000002001d000000000101043b000000000101041a000900000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a030000290000000b0230006c000000000200001900001bbf0000613d0000000a030000290000000b0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00001bbe0000613d00000007321000b900000000311200d9000000070110006c00001bbf0000613d00003d610000013d0000000002000019000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a0400003900000000004304350000000905000029000000000405004b000023070000613d000000000125004b000000000300001900001bd20000213d00000009212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000008020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe60400004100000000004204350000001a0200003900000000002104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000231e0000c13d000000000034041b0000007a01000039000000000101041a000000ff0110019000001bf70000613d00000fe1010000410000000000100439000000000100041400001a8f0000013d00000fe3010000410000000000100439000000000100041400001a8f0000013d0000000c0100002900000000001004350000000e01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000103200039000000000031041b000000100120006b00001e230000c13d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000b00000001001d0000000f0110006c000021900000a13d000000400100043d00000064021000390000102e03000041000000000032043500000044021000390000102f03000041000000000032043500000024021000390000002a0300003900000bd60000013d0000001f0430018f000000050230027200001c310000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00001c2d0000c13d000000000504004b00001c3f0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000c00000004001d00000ff50340009c00001d0b0000813d0000000e0100006b00001e2d0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000001101000029000b00000002001d00000000001204350000000c01000029000a00000003001d00000000001304350000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a02000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000b03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000d0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000001103000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000d05000029000010dd0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001cce0000413d000000000124004b000011e60000a13d000011e40000013d0000000004000019000000000102041a001100000004001d000000000114004b00003c330000813d0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000110400002900000005324000c9000000000101043b0000000001210019000000000101041a00000fc8011001970000000a0110006c00001e6f0000613d00000001044000390000000f0140006c000000100200002900001cd90000413d000014980000013d0000007a01000039000000000101041a000000ff0110019000001d780000c13d00000fe3010000410000000000100439000000000100041400001d7b0000013d000000000101004b00001de60000c13d00000fe3010000410000000000100439000000000100041400001de90000013d000000100140006a000000000013041b0000000d020000290000000e012001b000001e170000c13d000000400100043d00000044021000390000106d030000410000107c0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001d180000413d000000000124004b000011e60000a13d000011e40000013d0000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc702200197000900000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc701100198000019670000c13d0000000b0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a0400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b000a0ff60040019b000019ae0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b000000000100001900003f170001042e00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000a00000001001d000000110100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000202200039000000000302041a000900000003001d0000000a0230006b000023b50000a13d0000000b03000029000000080230006c000023b50000613d000000000101041a000700000001001d000000400100043d0000004002100039000000400020043f000000200210003900000fe50300004100000000003204350000001e020000390000000000210435000000110100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000009030000290000000a0230006900000007342000b900000000322400d90000000e030000290000000103300039000000000503041a000000000101043b000000070220006c00003d610000c13d000000000201041a000000000104004b000000000300001900001dc50000613d00000000134500a900000000414300d9000000000151004b00003d610000c13d000000400500043d0000004001500039000000400010043f000000200150003900000fe60400004100000000004104350000001a040000390000000000450435000000000602004b0000237e0000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200400003900000000004204350000000002050433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ddc0000413d000000000124004b000011e60000a13d000019240000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000c00000004001d000b00000005001d000000000345004b00001e760000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001e0d0000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100006b00001ec90000613d0000000d0100006b00001ec90000613d000000400100043d0000004402100039000010650300004100001e720000013d000000400100043d000000440210003900000fea03000041000012e00000013d000000400100043d00000064021000390000101d03000041000000000032043500000044021000390000101e0300004100000000003204350000002402100039000000260300003900000bd60000013d0000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f02000029000000010220008a00000fc702200197000b00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc70110019800001c600000c13d0000000d0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011020000290000002002200210000000000101043b000000000301041a000010290330019700001ca40000013d000000400100043d000000440210003900000fe9030000410000000000320435000000240210003900000012030000390000107f0000013d000000110100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e020000290000000102200039000000000202041a000a00000002001d000000000101043b000000000101041a001100000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000b030000290000000c0230006c000000000200001900001ea80000613d0000000b030000290000000c0230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900001ea80000613d0000000a321000b900000000311200d90000000a0110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000110500006b000023350000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ebf0000413d000000000124004b000011e60000a13d000011e40000013d0000000b0100002900000005121000c9001100000002001d000f00090020002d0000000e0100006b00001fd80000c13d0000000701000029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50400004100000000004104350000001e0400003900000000004204350000000d0430006c000022360000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001ee80000413d000000000124004b000011e60000a13d000011e40000013d0000000d040000290000000602400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200001f130000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00001f0f0000c13d000000000604004b00001f220000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f000300000001035500000001022001900000207f0000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001100000001001d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000d00000004001d000000110340006b0000236f0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001f650000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001f7c0000413d000000000124004b000011e60000a13d000019240000013d0000004001200039000000400010043f0000001b01000039000000000112043600000fe8040000410000000000410435000000100330006a001000050030002d000000100330006b000000000300001900000001030040390000000103300190000020b30000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fa00000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fb70000413d000000000124004b000011e60000a13d000011e40000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00001fce0000413d000000000124004b000011e60000a13d000011e40000013d0000000c0100002900000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a0000000b0220006b00003c330000813d0000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001101100029000d00000001001d0000000201100039000900000001001d000000000101041a001100000001001d0000007a01000039000000000101041a000000ff01100190000025450000c13d00000fe30100004100000000001004390000000001000414000025480000013d0000000c040000290000000702400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f0000000505500272000020230000613d0000000c080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000201f0000c13d000000000604004b000020320000613d0000000505500210000000000651034f0000000c055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000022770000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000e0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000c00000004001d000000100340006b000024b90000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020750000413d000000000124004b000011e60000a13d000019240000013d0000001f0430018f0000000502300272000020890000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000020850000c13d000000000504004b000020970000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000020a30000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000209f0000c13d000000000504004b000020b10000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000100100006b000022910000c13d000000400100043d00000064021000390000106003000041000000000032043500000044021000390000106103000041000000000032043500000024021000390000002e0300003900000bd60000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020cc0000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020e30000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000020fa0000413d000000000124004b000011e60000a13d000019240000013d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000000021041b0000000e0100002900000000001004350000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000402000029000000000021041b000000400300043d000000a001300039000000400010043f00000020023000390000000501000029000f00000002001d00000000001204350000000a01000029001100000003001d00000000001304350000007a01000039000000000101041a000000ff01100190000024070000c13d00000fe301000041000000000010043900000000010004140000240a0000013d0000000006010019000d00000000001d000e00000000001d0000213c0000013d000000000206004b0000237b0000613d000000010660008a000000000116004b00003c330000813d001000000006001d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010060000290000000102600210000000000101043b00000000022100190000001101000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000021680000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b0000000004000019000000010400403900000001044001900000213a0000613d000024cb0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000213a0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000025d30000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000021860000413d000000000214004b000025d30000a13d000012a20000013d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000a0fc80010019b0000000501000039000000000101041a00000fc801100198000007cd0000613d00000000001004350000000801000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000f00000001001d000000000101041a000d00000001001d000000000101004b001000000000001d000026050000c13d0000000c0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a00000fc9022001970000001107000029000000000272019f000000000021041b000000400100043d00000fc70210009c00000fc7010080410000004001100210000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c70000800d02000039000000040300003900001022040000410000000c050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d0000000a02000029000000110120006c000010e00000613d000000100100006b000010e00000613d0000000a0100006b00002cf10000c13d000000110100006b000010e00000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c000f00000000001d000031090000c13d000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b0300003900000000003204350000000f04000029000000100340002900100ff60030019b000000100340006b000031660000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000022150000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000222c0000413d000000000124004b000011e60000a13d000019240000013d0000000d0130006a0000000702000029000000000012041b0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435001100000004001d0000000d0340006c000025760000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000226d0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000022810000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000227d0000c13d000000000504004b0000228f0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001101000029000000000101041a000000060110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000001102000029000000000202041a000000060220006b00003c330000813d000000000101043b0000000f01100029000000000201041a001100000002001d0000000502000029000000000021041b0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001002000029000000000021041b000000400100043d00000020021000390000000503000029000000000032043500000011020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000105f040000410000000e050000290000000606000029000010dd0000013d0000001f0430018f0000000502300272000022e00000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000022dc0000c13d000000000504004b000022ee0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000022fd0000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023140000413d000000000124004b000011e60000a13d000019240000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000232b0000413d000000000124004b000011e60000a13d000019240000013d000000110120006b00000000030000190000233d0000213d00000011212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d00000010020000290000000f05200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000004104350000000e010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000253c0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023650000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110018f0000000d03000029000000110230006b000024c50000c13d000000000101004b000026270000c13d00000fe301000041000000000010043900000000010004140000262a0000013d0000000e0100006b000015460000613d000029990000013d000000000132004b0000000005000019000023860000213d00000000212300d900000fe7251000d100000000211500d900000fe70110009c00003d610000c13d0000000b02000029000000080320006a000000400100043d0000004002100039000000400020043f000000200210003900000fe60600004100000000006204350000000000410435000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b04000039000000000042043500000000433500d9000d000d0030002d0000000d0330006b000000000300001900000001030040390000000103300190000023b50000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000023ab0000413d000000000124004b000011e60000a13d000019240000013d000000110100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a000000000201004b000f00000000001d000024e20000c13d0000000c01000029000000000401041a0000000101100039000000000101041a000000400300043d0000004002300039000000400020043f000000200230003900000fe50500004100000000005204350000001e0500003900000000005304350000000f0540006c0000284c0000813d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002aa10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000023fd0000413d000000000214004b00002aa10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d00000011020000290000004003200039000000000101043b000c00000003001d000000000013043500000080032000390000000301000029000d00000003001d00000000001304350000006001200039000b00000001001d00000000000104350000001002000029000000000102041a000900000001001d0000000101100039000000000012041b0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090200002900000005322000c9000000000101043b0000000001210019000000000201041a00000fc9022001970000001103000029000000000303043300000fc803300197000000000232019f000000000021041b0000000f0200002900000000020204330000000103100039000000000023041b0000000c0200002900000000020204330000000203100039000000000023041b0000000b0200002900000000020204330000000303100039000000000023041b00000004011000390000000d020000290000000002020433000000000021041b0000000a0100002900000000001004350000001401000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000201041a000010b40220019700000001022001bf000000000021041b0000000401000039000000000101041a0000000102000039000000400400043d0000002403400039000000000023043500000feb020000410000000000240435000f00000004001d00000004024000390000000e03000029000000000032043500000fda02000041000000400300043d000d00000003001d000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000024940000613d0000000d040000290000000f02400069000000440220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000002ece0000613d0000001001000029000000000101041a000000400200043d00000040032000390000000304000029000000000043043500000020032000390000000404000029000000000043043500000005030000290000000000320435000000400300043d0000000002320049000000600220003900000fc70420009c00000fc702008041000000600220021000000fc70430009c00000fc7030080410000004003300210000000000232019f000000000300041400000fc70430009c00000fc703008041000000c003300210000000000232019f000000010610008a00000fec012001c70000800d02000039000000040300003900000fed040000410000000e050000290000000a070000293f163f0c0000040f0000000101200190000000350000613d000010e00000013d0000007a01000039000000000101041a000000ff0110018f0000000c03000029000000100230006b000028150000c13d000000000101004b000028950000c13d00000fe30100004100000000001004390000000001000414000028980000013d000000000101004b0000281b0000c13d00000fe301000041000000000010043900000000010004140000281e0000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000025d30000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000024d80000413d000000000214004b000025d30000a13d000012a20000013d001100000001001d000f00000000001d000e00000000001d000024e80000013d000000110200006b000023e20000613d00000011020000290011000100200092000000110110006b00003c330000813d00000010010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000011020000290000000102200210000000000101043b00000000022100190000001001000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000025140000c13d000000110310006b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000f000f0040002d0000000f0440006b000000000400001900000001040040390000000104400190000024e60000613d00002b430000013d000000110310006b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b000000000400001900000001040040390000000104400190000024e60000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002c730000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000025320000413d000000000214004b00002c730000a13d000012a20000013d000000000034041b0000007a01000039000000000101041a000000ff011001900000287e0000c13d00000fe3010000410000000000100439000000000100041400001d6b0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000110110006c000033f50000a13d0000000d01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000500000003001d00000004033000390000000000230435000000400200043d000600000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00002c740000c13d000000010300003100002ca80000013d0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d050000290000001102500069000000000101043b000000000021041b0000000f01000029000000000101041a000000400200043d00000024032000390000000804000029000000000043043500000044032000390000000000530435000000400400043d0000000003430049000d00000004001d00000000033404360000006402200039000000400020043f0000000002030433000010660220019700001067022001c7001100000003001d00000000002304350000106802000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000026920000613d000000400100043d0000000d020000290000000002020433000000000302004b000025cb0000613d000000000300001900000000041300190000001105300029000000000505043300000000005404350000002003300039000000000423004b000025c00000413d000000000323004b000025cb0000a13d00000000031200190000000000030435000000400400043d00000000030004140000000f05000029000000040550008c00002ee70000c13d0000000102000039000000010600003100002efb0000013d000013b10000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000100110006c0000358c0000a13d0000000d01000029000000000101041a000000400300043d00000fe4020000410000000000230435000000000200041000000fc802200197000400000003001d00000004033000390000000000230435000000400200043d000500000002001d00000fda02000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001002000029000000040220008c00002d470000c13d000000010300003100002d7b0000013d001000000000001d0000000f01000029000000000101041a000000100110006b00003c330000813d0000000501000039000000000101041a000e00000001001d0000000f010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000100200002900000005322000c9000000000101043b0000000001210019000000000101041a0000000e0110014f00000fc80110019800002aa20000613d00000010010000290000000101100039001000000001001d0000000d0110006c000026060000413d001000000000001d000021b70000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000e02000029000000000012041b0000000f0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001100000001001d000000000101041a000000000201004b000026960000c13d00000007020000290011000a0020002d0000000801000029000000000301041a000000000103004b000026f00000c13d0000001101000029000000000101041a000000000200041000000fc802200197000000400300043d0000004404300039000000000024043500000024023000390000000904000029000000000042043500000064023000390000000b040000290000000000420435000000400400043d0000000002420049000e00000004001d00000000042404360000008402300039000000400020043f00000000020404330000106602200197000010a7022001c7000d00000004001d00000000002404350000106802000041000000000020043900000fc801100197001000000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000027740000c13d000000400100043d0000004402100039000010a80300004100000bbf0000013d0000000006010019000d00000000001d000e00000000001d0000269c0000013d000000000206004b0000274c0000613d000000010660008a000000000116004b00003c330000813d001000000006001d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010060000290000000102600210000000000101043b00000000022100190000001101000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c000026c80000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b0000000004000019000000010400403900000001044001900000269a0000613d0000278e0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000e000e0040002d0000000e0440006b0000000004000019000000010400403900000001044001900000269a0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000027a50000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000026e60000413d000000000214004b000027a50000a13d000012a20000013d00000008020000290000000201200039000000000601041a00000011010000290000000301100039000000000501041a0000000101200039000000000101041a001000000001001d000000400400043d0000004001400039000000400010043f000000200140003900000fe50200004100000000002104350000001e020000390000000000240435000000000763004b0000271a0000813d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000027100000413d000000000124004b000011e60000a13d000011e40000013d000000000163004b0000000004000019000027220000613d000000000163004900000000345100a900000000311400d9000000000151004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60500004100000000005304350000001a030000390000000000310435000000400300043d0000004001300039000000400010043f000000200130003900000fe5050000410000000000510435000000000023043500000fe72440012a000e00000004001d000000100240006c0000274f0000813d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000027420000413d000000000124004b000011e60000a13d000011e40000013d0000000e0100006b000026610000613d000029990000013d0000000e02000029000000100120006c000026670000613d0000000401000039000000000101041a000000400300043d00000fe402000041000000000023043500000fc802100197000a00000003001d0000000401300039000700000002001d0000000000210435000000400100043d000d00000001001d00000fda0100004100000000001004390000000f010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c00002bef0000c13d000000010300003100002c230000013d000000400100043d0000000e020000290000000002020433000000000302004b000027860000613d00000000030000190000000d0600002900000000041300190000000005630019000000000505043300000000005404350000002003300039000000000423004b0000277b0000413d000000000323004b000027860000a13d00000000031200190000000000030435000000400400043d00000000030004140000001005000029000000040550008c000027a60000c13d00000001020000390000000106000031000027ba0000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000027a50000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000279b0000413d000000000214004b000027a50000a13d000012a20000013d000013b10000013d0000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f00000010020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc706100197000000000106004b000027bf0000c13d00000060030000390000008001000039000027df0000013d0000003f01600039000010b301100197000000400300043d0000000001130019000000400010043f0000001f0460018f0000000001630436000000030500036700000005066002720000000506600210000027d10000613d0000000007610019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b000027cd0000c13d000000000704004b000027df0000613d000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000027ec0000c13d000000400100043d0000004402100039000010ad03000041000000000032043500000fde0200004100000000002104350000002402100039000000200300003900000000003204350000000402100039000010840000013d0000000002030433000000000302004b000028820000c13d000000400100043d0000000802000029000000000302041a0000004002100039000000400020043f0000001b02000039000000000221043600000fe80400004100000000004204350000000b04300029000000000334004b00000000050000190000000105004039000000400300043d000000010550019000002a7b0000613d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000001010433000000240430003900000000001404350000004403300039000000000401004b000028140000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000280b0000413d000000000214004b000012a20000213d000013b10000013d000000000101004b000029f20000c13d00000fe30100004100000000001004390000000001000414000029f50000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000e02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000600000004001d000500000005001d000000000345004b00002a230000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000028420000413d000000000124004b000011e60000a13d000011e40000013d0000000f0240006c0000000003000019000028540000613d0000000f0240006a0000000d432000b900000000422300d90000000d0220006c00003d610000c13d000000400200043d0000004004200039000000400040043f000000200420003900000fe60500004100000000005404350000001a040000390000000000420435000000400500043d0000004002500039000000400020043f000000200250003900000fe50400004100000000004204350000001e040000390000000000450435000000400400043d00000fe76330012a000000000613004b00002a760000813d00000fde0100004100000000001404350000000401400039000000200300003900000000003104350000000001050433000000240340003900000000001304350000004403400039000000000401004b00002aa10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000028740000413d000000000214004b00002aa10000a13d000012a20000013d00000fe1010000410000000000100439000000000100041400001d6b0000013d00000fd50320009c000000350000213d0000001f0220008c000000350000a13d0000000002010433000000000102004b0000000001000019000000010100c039000000000112004b000000350000c13d000000400100043d000000000202004b000027f00000c13d00000064021000390000106a03000041000000000032043500000044021000390000106b0300004100001c230000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000d02000029000000000012041b0000000e0100002900000000001004350000000a01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b001000000001001d000000000101041a000000000201004b000028da0000c13d0000000901000029000000000201041a000000000102004b000029340000c13d0000000301000039000000000201041a0000104e0220019700000fd6022001c7000000000021041b000000000100001900003f170001042e0000000006010019000c00000000001d000d00000000001d000028e00000013d000000000206004b000029970000613d000000010660008a000000000116004b00003c330000813d000f00000006001d00000010010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f060000290000000102600210000000000101043b00000000022100190000001001000029000000000101041a0000000103200039000000000303041a0000102a03300197000010400330009c0000290c0000c13d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000c000c0040002d0000000c0440006b000000000400001900000001040040390000000104400190000028de0000613d000029da0000013d000000000316004b00003c330000813d000000000402041a000000400300043d0000004002300039000000400020043f000000200230003900000fe80500004100000000005204350000001b050000390000000000530435000d000d0040002d0000000d0440006b000000000400001900000001040040390000000104400190000028de0000613d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000029f10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b0000292a0000413d000000000214004b000029f10000a13d000012a20000013d00000008030000290000000a013000290000000301100039000000000301041a00000009050000290000000201500039000000000401041a0000000101500039000000000501041a001000000005001d000000400700043d0000004005700039000000400050043f000000200670003900000fe50500004100000000005604350000001e050000390000000000570435000000000842004b000029620000813d000000400200043d00000fde0100004100000000001204350000000401200039000000200300003900000000003104350000000001070433000000240320003900000000001304350000004402200039000000000301004b000029950000613d000000000300001900000000042300190000000005630019000000000505043300000000005404350000002003300039000000000413004b000029550000413d000000000313004b000029950000a13d000000000321001900000000000304350000001f01100039000012800000013d000000000642004b00000000080000190000296a0000613d000000000642004900000000783600a900000000766800d9000000000636004b00003d610000c13d000000400700043d0000004006700039000000400060043f000000200670003900000fe60900004100000000009604350000001a060000390000000000670435000000400900043d0000004007900039000000400070043f000000200790003900000fe50a0000410000000000a70435000000000059043500000fe78a80012a000f0000000a001d0000001008a0006c0000299d0000813d000000400200043d00000fde0100004100000000001204350000000401200039000000200300003900000000003104350000000001090433000000240320003900000000001304350000004402200039000000000301004b000029950000613d000000000300001900000000042300190000000005730019000000000505043300000000005404350000002003300039000000000413004b0000298a0000413d000000000313004b000029950000a13d000000000321001900000000000304350000001f01100039000012800000013d0000000d0100006b000028cf0000613d000000400100043d0000004402100039000010a603000041000012e00000013d0000000f08000029000000100780006c000028d30000613d000000400700043d0000004008700039000000400080043f000000200870003900000fe50900004100000000009804350000000000570435000000000542004b0000000005000019000029af0000613d000000000242004900000000453200a900000000422500d9000000000232004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe6040000410000000000430435000000000062043500000fe73250012a000000000021041b0000000401000039000000000101041a000000400300043d00000fe402000041000000000023043500000fc802100197000c00000003001d0000000401300039000a00000002001d000000000021043500000fda01000041000000400200043d000d00000002001d00000000001004390000000e010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000e02000029000000040220008c00002dde0000c13d000000010300003100002e120000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b000029f10000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b000029e70000413d000000000214004b000029f10000a13d000012a20000013d000013b10000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000d02000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000700000004001d000600000005001d000000000345004b00002af00000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a190000413d000000000124004b000011e60000a13d000019240000013d0000000f0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010020000290000000102200039000000000202041a000300000002001d000000000101043b000000000101041a000400000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000503000029000000060230006c000000000200001900002a550000613d0000000503000029000000060230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900002a550000613d00000003321000b900000000311200d9000000030110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000040500006b00002e7b0000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a6c0000413d000000000124004b000011e60000a13d000011e40000013d00000000011300490000000000140435000000400100043d000000000214004900000a8a0000013d0000000801000029000000000041041b0000000201100039000000000501041a00000011010000290000000301100039000000000201041a0000004001300039000000400010043f0000001e01000039000000000113043600000fe5060000410000000000610435000000000654004b00002b5a0000813d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002a970000413d000000000124004b000011e60000a13d000011e40000013d000013b10000013d0000000501000039000000000101041a00000fc80110019700000000001004350000000701000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000010020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a0000000201100039000000000401041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50200004100000000002104350000001e020000390000000000250435000000400200043d000000000643004b00002f9a0000813d00000fde0300004100000000003204350000000403200039000000200400003900000000004304350000000003050433000000240420003900000000003404350000004402200039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b00002ae60000413d000000000134004b0000127f0000a13d0000127d0000013d0000000e0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f020000290000000102200039000000000202041a000400000002001d000000000101043b000000000101041a000500000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000603000029000000070230006c000000000200001900002b220000613d0000000603000029000000070230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b000000000200001900002b220000613d00000004321000b900000000311200d9000000040110006c00003d610000c13d000000400300043d0000004001300039000000400010043f000000200130003900000fe60400004100000000004104350000001a040000390000000000430435000000050500006b00002f600000c13d000000400400043d00000fde0200004100000000002404350000000402400039000000200500003900000000005204350000000002030433000000240340003900000000002304350000004403400039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002b390000413d000000000124004b000011e60000a13d000019240000013d000000400400043d00000fde0100004100000000001404350000000401400039000000200500003900000000005104350000000001030433000000240340003900000000001304350000004403400039000000000401004b00002c730000613d000000000400001900000000053400190000000006240019000000000606043300000000006504350000002004400039000000000514004b00002b500000413d000000000214004b00002c730000a13d000012a20000013d000000000154004b000000000100001900002b620000613d000000000354004900000000412300a900000000433100d9000000000223004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a00000008020000290000000102200039000000000012041b0000000501000039000000000101041a0000001102000029000000000202041a000000000112013f00000fc8011001980000396e0000c13d000000090100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000006001200039000000400010043f0000004001200039000010a90400004100000000004104350000002001200039000010ab0400004100000000004104350000002104000039000000000042043500110fc80030019b0000000b03000029000010210330009c00002fd50000813d000000110100006b0000396e0000613d0000000b0100006b0000396e0000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c001000000000001d00002bc80000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000000400200043d0000006001200039000000400010043f00000040012000390000102d0300004100000000003104350000002001200039000010240300004100000000003104350000002b03000039000000000032043500000010040000290000000b03400029000a0ff60030019b0000000a0340006b0000382d0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002be50000413d000000000124004b000011e60000a13d000011e40000013d0000000d040000290000000a02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002c100000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002c0c0000c13d000000000604004b00002c1f0000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002dc40000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000d00000001001d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e03000029000a001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000a03500029001000000003001d000e00000005001d000000000353004b000000000300001900000001030040390000000103300190000030780000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002c690000413d000000000124004b000011e60000a13d000011e40000013d000013b10000013d00000006040000290000000502400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002c950000613d00000006080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002c910000c13d000000000604004b00002ca40000613d0000000505500210000000000651034f00000006055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002e620000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001100000001001d0000000c0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000b020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000600000004001d000000110340006b000031410000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002ce70000413d000000000124004b000011e60000a13d000011e40000013d0000000a0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e00000001001d000d0fc70010019c000f00000000001d00002d220000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000002001100270000f0ff60010019b000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c0300003900000000003204350000000f04000029000000100340006c00002fec0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002d3d0000413d000000000124004b000011e60000a13d000019240000013d00000005040000290000000402400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000010020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002d680000613d00000005080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002d640000c13d000000000604004b00002d770000613d0000000505500210000000000651034f00000005055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002eb50000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433001000000001001d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000401041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000500000004001d000000100340006b0000315a0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002dba0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f000000050230027200002dce0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00002dca0000c13d000000000504004b00002ddc0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000d040000290000000c02400069000000240220003900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000e020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f000000050550027200002dff0000613d0000000d080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b00002dfb0000c13d000000000604004b00002e0e0000613d0000000505500210000000000651034f0000000d055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f0003000000010355000000010220019000002f470000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000d00000001001d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000f03000029000c001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000c03500029001000000003001d000f00000005001d000000000353004b0000000003000019000000010300403900000001033001900000325b0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002e580000413d000000000124004b000011e60000a13d000019240000013d0000001f0430018f0000000502300272000000050220021000002e6c0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002e680000c13d000000000504004b00002e790000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000040120006b000000000300001900002e830000213d00000004212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d0000000d020000290000001105200069000000400100043d0000004002100039000000400020043f000000200210003900000fe6060000410000000000620435000000000041043500000010010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b00000000050000190000000105004039000000010550019000002fcc0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002eab0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000002ebf0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002ebb0000c13d000000000504004b00002ecc0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001f0430018f0000000502300272000000050220021000002ed80000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002ed40000c13d000000000504004b00002ee50000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f0000000f020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc706100197000000000106004b00002f000000c13d0000006003000039000000800100003900002f200000013d0000003f01600039000010b301100197000000400300043d0000000001130019000000400010043f0000001f0460018f000000000163043600000003050003670000000506600272000000050660021000002f120000613d0000000007610019000000000805034f0000000009010019000000008a08043c0000000009a90436000000000a79004b00002f0e0000c13d000000000704004b00002f200000613d000000000565034f00000000066100190000000304400210000000000706043300000000074701cf000000000747022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000474019f0000000000460435000000000202004b000027e10000613d0000000002030433000000000302004b00002fbe0000c13d000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b030000390000000000320435000000400300043d00000010050000290000000e0450006c000031280000813d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002f3d0000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000002f510000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00002f4d0000c13d000000000504004b00002f5e0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000050120006b000000000300001900002f680000213d00000005212000fa00000fe7231000d100000000211300d900000fe70110009c00003d610000c13d0000000c020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000004104350000000f010000290000000304100039000000000604041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000535300d90000000003360019000000000563004b0000000005000019000000010500403900000001055001900000314d0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002f900000413d000000000124004b000011e60000a13d000019240000013d0000006001200039000000400010043f00000040012000390000101f05000041000000000051043500000028010000390000000001120436000010200500004100000000005104350000000003430049001000000003001d000010210330009c000021b70000413d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002fb40000413d000000000124004b000011e60000a13d000019240000013d00000fd50320009c000000350000213d0000001f0220008c000000350000a13d0000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000000350000c13d000000000101004b00002f250000c13d000000400100043d0000288f0000013d000000000034041b0000007a01000039000000000101041a000000ff01100190000031560000c13d00000fe301000041000000000010043900000000010004140000262a0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00002fe20000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff01100190000c000b0000002d00002ffe0000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000c00000001001d000000400200043d0000008001200039000000400010043f000000600120003900001025030000410000000000310435000000400120003900001026030000410000000000310435000000200120003900001027030000410000000000310435000000420300003900000000003204350000000c0300002900000ff50330009c000032440000813d0000000f0200002900090010002000720000000d0100006b0000334c0000c13d000000400200043d0000004001200039000000400010043f0000000c01000029000800000002001d0000000002120436000000090100002900000ff601100197000900000001001d000c00000002001d00000000001204350000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000802000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b0000000a0100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d0000002002100039000000090300002900000000003204350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000000a050000293f163f0c0000040f0000000101200190000021e30000c13d000000350000013d00000010020000290000000d0120006c000031eb0000a13d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000d0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000e020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f0500002900000009060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000d02000029000000000021043500000024013000390000000902000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000007010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000702000029000000040220008c000032270000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000007020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000032270000c13d0000001f0430018f00000005023002720000000502200210000030fa0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000030f60000c13d000000000504004b000031070000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000002001100270000f0ff60010019b000021f80000013d00000010010000290000000000130435000000400100043d0000000002130049000000200220003900000fc70320009c00000fc702008041000000600220021000000fc70310009c00000fc7010080410000004001100210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000004030000390000106c0400004100000008050000290000000c060000290000000b07000029000039c70000013d0000007a01000039000000000101041a000000ff0110018f0000000603000029000000110230006b000032ec0000c13d000000000101004b000033e70000c13d00000fe30100004100000000001004390000000001000414000033ea0000013d000000000034041b0000007a01000039000000000101041a000000ff01100190000032f20000c13d00000fe30100004100000000001004390000000001000414000028980000013d00000fe101000041000000000010043900000000010004140000262a0000013d0000007a01000039000000000101041a000000ff0110018f0000000503000029000000100230006b000032f60000c13d000000000101004b0000357e0000c13d00000fe30100004100000000001004390000000001000414000035810000013d0000007a01000039000000000101041a000000ff01100190000031770000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000b00000001001d000000400200043d0000008001200039000000400010043f000000600120003900001025030000410000000000310435000000400120003900001026030000410000000000310435000000200120003900001027030000410000000000310435000000420300003900000000003204350000000b0300002900000ff50330009c000033350000813d0000000d0100006b0000376e0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000001001000029000c00000002001d00000000001204350000000b01000029000a00000003001d0000000000130435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a02000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000c03000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d0000002002100039000000100300002900000000003204350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c040000410000001105000029000010dd0000013d0000000e0100006b000032fc0000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000000902000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000007010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000702000029000000040220008c000032270000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000007020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003a350000613d000000400100043d0000000a020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010510400004100000009050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000026670000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000032510000413d000000000124004b000011e60000a13d000019240000013d00000010020000290000000d0120006c000033920000a13d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000d0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000f020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000e0500002900000011060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000d02000029000000000021043500000024013000390000001102000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000e020000290000000000210435000000400100043d000f00000001001d00000fda0100004100000000001004390000000a010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000a02000029000000040220008c000033ce0000613d0000000f040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000a020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000033ce0000c13d0000001f0430018f00000005023002720000000502200210000032dd0000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000032d90000c13d000000000504004b000032ea0000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000000101004b000035020000c13d00000fe30100004100000000001004390000000001000414000035050000013d00000fe10100004100000000001004390000000001000414000028980000013d000000000101004b000036ab0000c13d00000fe30100004100000000001004390000000001000414000036ae0000013d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000e0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f0500002900000009060000293f163f0c0000040f0000000101200190000000350000613d000031ed0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000033420000413d000000000124004b000011e60000a13d000019240000013d0000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000800000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000c0110014f00000fc701100198000030130000c13d0000000a0100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b00090ff60040019b0000305a0000013d0000000f0100006b000037b00000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000001102000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000e020000290000000000210435000000400100043d000f00000001001d00000fda0100004100000000001004390000000a010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000a02000029000000040220008c000033ce0000613d0000000f040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000a020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003aeb0000613d000000400100043d0000000c020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010510400004100000011050000290000000e060000290000313f0000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000902000029000000000012041b0000000f01000029000d00030010003d00000007010000290000000102100039000900000002001d000000000202041a000000000101041a000000000301004b0000000004000019000034050000613d0000000d03000029000000000303041a00000000541300a900000000511400d9000000000131004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60500004100000000005304350000001a030000390000000000310435000000400500043d0000004001500039000000400010043f000000200350003900000fe50100004100000000001304350000001e010000390000000000150435000000400700043d00000044017000390000002406700039001100000007001d000000040770003900000fe78440012a000000000824004b000034360000813d00000fde02000041000000110400002900000000002404350000002002000039000000000027043500000000020504330000000000260435000000000402004b000034320000613d000000000400001900000000051400190000000006340019000000000606043300000000006504350000002004400039000000000524004b000034270000413d000000000324004b000034320000a13d000000000312001900000000000304350000001f02200039000010b3022001970000000001120019000013b40000013d0000000403000039000000000303041a0000105005000041000000110800002900000000005804350000000c0500002900000000005704350000000805000029000000000056043500000000022400490000000000210435000000400100043d000500000001001d00000fda01000041000000000010043900000fc801300197000600000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000602000029000000040220008c0000346f0000613d00000005040000290000001102400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000006020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000034e90000613d0000000701000029000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe50400004100000000004104350000001e0400003900000000004204350000000e0430006c000034920000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000034880000413d000000000124004b000011e60000a13d000011e40000013d0000000e0230006a0000000704000029000000000024041b0000000e0130006c00000000010000190000349e0000613d0000000d01000029000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a0000000902000029000000000012041b0000000f01000029000000000101041a000000400200043d00000024032000390000000804000029000000000043043500000044032000390000000e040000290000000000430435000000400400043d0000000003430049000d00000004001d00000000033404360000006402200039000000400020043f0000000002030433000010660220019700001067022001c7001100000003001d00000000002304350000106802000041000000000020043900000fc801100197000f00000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000201004b000026920000613d000010690110009c000026920000613d000000400100043d0000000d020000290000000002020433000000000302004b000034e10000613d000000000300001900000000041300190000001105300029000000000505043300000000005404350000002003300039000000000423004b000034d60000413d000000000323004b000034e10000a13d00000000031200190000000000030435000000400400043d00000000030004140000000f05000029000000040550008c000035330000c13d00000001020000390000000105000031000035470000013d0000001f0430018f00000005023002720000000502200210000034f30000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b000034ef0000c13d000000000504004b000035000000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000902000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000500000004001d000400000005001d000000000345004b000037e90000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000035290000413d000000000124004b000011e60000a13d000011e40000013d0000000001120019000000000141004900000fc70210009c00000fc701008041000000600110021000000fc70240009c00000fc7040080410000004002400210000000000121019f00000fc70230009c00000fc703008041000000c002300210000000000121019f0000000f020000293f163f0c0000040f000000010220018f0003000000010355000000600110027000010fc70010019d00000fc705100197000000000105004b0000354b0000c13d00000060010000390000356d0000013d0000003f01500039000010b303100197000000400100043d0000000003310019000000400030043f0000001f0350018f0000000004510436000a00000004001d000000030400036700000005055002720000355e0000613d00000005065002100000000a080000290000000006680019000000000704034f000000007907043c0000000008980436000000000968004b0000355a0000c13d000000000603004b0000356d0000613d0000000505500210000000000454034f0000000a055000290000000303300210000000000605043300000000063601cf000000000636022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000363019f0000000000350435000000000202004b000027e10000613d0000000001010433000000000201004b00002f250000613d00000fd50210009c0000000a02000029000000350000213d0000001f0110008c000000350000a13d0000000001020433000000000201004b0000000002000019000000010200c039000000000221004b00002fc80000613d000000350000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b0000000602000029000000000012041b0000000e0200002900000007022000290000000801000029000000000301041a0000000901000029000000000501041a0000000101100039000600000002001d0000000302200039000400000002001d000000000402041a000500000001001d000000000101041a001000000001001d000000400200043d0000004001200039000000400010043f000000200120003900000fe50600004100000000006104350000001e060000390000000000620435000000000635004b000035bb0000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000035b10000413d000000000124004b000011e60000a13d000011e40000013d000000000135004b0000000002000019000035c30000613d000000000135004900000000324100a900000000311200d9000000000141004b00003d610000c13d000000400100043d0000004003100039000000400030043f000000200310003900000fe60400004100000000004304350000001a030000390000000000310435000000400300043d0000004001300039000000400010043f000000200130003900000fe50400004100000000004104350000001e040000390000000000430435000000400400043d000e00240040003d000000040540003900000fe72620012a000d00000006001d000000100260006c000035ef0000813d00000fde0200004100000000002404350000002002000039000000000025043500000000030304330000000e0200002900000000003204350000004402400039000000000403004b0000127f0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000035e50000413d000000000134004b0000127d0000213d0000127f0000013d0000000401000039000000000101041a00000fe402000041000000000024043500000fc801100197000300000001001d0000000000150435000000400100043d000700000001001d00000fda0100004100000000001004390000000f010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000f02000029000000040220008c0000360e0000c13d0000000103000031000036410000013d00000007040000290000000e0240006900000fc70340009c00000fc7030000410000000003044019000000400330021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f0000000f020000293f163f110000040f0000000003010019000000600330027000000fc703300197000000200430008c000000200500003900000000050340190000001f0450018f00000005055002720000362e0000613d00000007080000290000002006800039000000000701034f000000007907043c0000000008980436000000000968004b0000362a0000c13d000000000604004b0000363d0000613d0000000505500210000000000651034f00000007055000290000000304400210000000000705043300000000074701cf000000000747022f000000000606043b0000010004400089000000000646022f00000000044601cf000000000474019f0000000000450435000100000003001f00030000000103550000000102200190000036910000613d0000001f01300039000010b302100197000000400100043d0000000002120019000000400020043f00000fd50230009c000000350000213d0000001f0230008c000000350000a13d0000000001010433000e00000001001d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d030000290002001000300072000000000101043b000000000501041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80300004100000000003104350000001b0300003900000000003204350000000203500029001000000003001d000d00000005001d000000000353004b000000000300001900000001030040390000000103300190000036dc0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000036870000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f00000005023002720000369b0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000036970000c13d000000000504004b000036a90000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f180001043000000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d0000000602000029000000000402041a000000000501043b000000400200043d0000004001200039000000400010043f000000200120003900000fe50300004100000000003104350000001e030000390000000000320435000400000004001d000300000005001d000000000345004b000038350000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000036d20000413d000000000124004b000011e60000a13d000011e40000013d00000010020000290000000e0120006c000038790000a13d0000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010030000290000000e0230006a000000000101043b000000000021041b000000400100043d000000200310003900000000002304350000000d020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d000000400300043d00000044013000390000000e02000029000000000021043500000024013000390000000a02000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000003010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000302000029000000040220008c000038b50000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000003020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000038b50000c13d0000001f0430018f00000005023002720000375e0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b0000375a0000c13d000000000504004b0000376c0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000c00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a0000000b0110014f00000fc7011001980000318a0000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d00000010020000290000002002200210000000000101043b000000000301041a0000102903300197000031ce0000013d0000000e0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000f0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000e0500002900000011060000293f163f0c0000040f0000000101200190000033940000c13d000000350000013d0000000c0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d020000290000000102200039000000000202041a000200000002001d000000000101043b000000000101041a000300000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000403000029000000050230006c000000000200001900003a4f0000c13d000000400400043d0000004001400039000000400010043f000000200140003900000fe60300004100000000003104350000001a030000390000000000340435000000030500006b00003ab10000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000038230000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff01100190000038ec0000c13d00000fe30100004100000000001004390000000001000414000038ef0000013d0000000f0100002900000000001004350000000901000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000d020000290000000102200039000000000202041a000100000002001d000000000101043b000000000101041a000200000001001d0000000601000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000303000029000000040230006c000000000200001900003aa10000c13d000000400400043d0000004001400039000000400010043f000000200140003900000fe60300004100000000003104350000001a030000390000000000340435000000020500006b00003b040000c13d000000400300043d00000fde0200004100000000002304350000000402300039000000200500003900000000005204350000000002040433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b0000386f0000413d000000000124004b000011e60000a13d000011e40000013d0000000d0100006b000039e50000c13d000000400300043d00000044013000390000001002000029000000000021043500000024013000390000000a02000029000000000021043500001050010000410000000000130435001000000003001d00000004013000390000000f020000290000000000210435000000400100043d000e00000001001d00000fda01000041000000000010043900000003010000290000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000000302000029000000040220008c000038b50000613d0000000e040000290000001002400069000000640220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000003020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003b500000613d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000501043b00000006010000290000000401100039000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b040000390000000000420435000300000005001d000700000053001d000000070330006b00000000030000190000000103004039000000400400043d000e00000004001d000000010330019000003b6a0000613d00000fde030000410000000e0500002900000000003504350000000403500039000000200400003900000000004304350000000002020433000000240350003900000000002304350000004403500039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b000038e20000413d000000000124004b000011e60000a13d000011e40000013d00000fe1010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000401043b000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000800000004001d00000ff50340009c00003a1e0000813d0000000d0100006b00003a5f0000c13d000000400300043d0000004001300039000000400010043f00000020023000390000000a01000029000700000002001d00000000001204350000000801000029000600000003001d0000000000130435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000602000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000703000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000a03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c0400004100000011050000293f163f0c0000040f0000000101200190000000350000613d0000001701000039000000000101041a00000fc8011001970000000f0110006c000039ae0000c13d0000001801000039000000000101041a0000000c0110006b000039ae0000c13d0000001601000039000000000101041a000000400300043d0000109e020000410000000000230435001000000003001d000000040230003900000009030000290000000000320435000000400200043d000e00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c000039ae0000613d0000000e040000290000001002400069000000240220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc70330019700030000000103550000000102200190000039cb0000613d000000400100043d0000000b020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d020000390000000403000039000010ac0400004100000009050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000028d30000013d0000001f0430018f0000000502300272000039d50000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b000039d10000c13d000000000504004b000039e30000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000f0100002900000000001004350000001501000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000a020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000001041b000000400100043d0000000d0200002900000000022104360000000000020435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000003030000390000104f040000410000000f050000290000000a060000293f163f0c0000040f0000000101200190000000350000613d0000387b0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003a2b0000413d000000000124004b000011e40000213d000011e60000013d0000001f0430018f000000050230027200003a3f0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00003a3b0000c13d000000000504004b00003a4d0000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000000403000029000000050230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b00000000020000190000380c0000613d00000002321000b900000000311200d9000000020110006c0000380c0000613d00003d610000013d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e02000029000000010220008a00000fc702200197000700000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000080110014f00000fc7011001980000390b0000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000a020000290000002002200210000000000101043b000000000301041a00001029033001970000394f0000013d0000000303000029000000040230006a000000000101043b000000000301041a00000000412300a900000000422100d9000000000232004b00003d610000c13d000000000201004b0000000002000019000038580000613d00000001321000b900000000311200d9000000010110006c000038580000613d00003d610000013d000000030120006b000000000400001900003ab90000213d00000003212000fa00000fe7241000d100000000211400d900000fe70110009c00003d610000c13d00000006020000290000001105200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000003104350000000d010000290000000303100039000000000603041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000545400d90000000004460019000000000564004b00000000050000190000000105004039000000010550019000003b3e0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003ae10000413d000000000124004b000011e60000a13d000011e40000013d0000001f0430018f0000000502300272000000050220021000003af50000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00003af10000c13d000000000504004b00003b020000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000020120006b000000000400001900003b0c0000213d00000002212000fa00000fe7241000d100000000211400d900000fe70110009c00003d610000c13d00000005020000290000001005200069000000400100043d0000004002100039000000400020043f000000200210003900000fe606000041000000000062043500000000003104350000000d010000290000000303100039000000000603041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80700004100000000007104350000001b07000039000000000072043500000000545400d90000000004460019000000000564004b00000000050000190000000105004039000000010550019000003b470000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003b340000413d000000000124004b000011e60000a13d000011e40000013d000000000043041b0000007a01000039000000000101041a000000ff0110019000003c360000c13d00000fe30100004100000000001004390000000001000414000033ea0000013d000000000043041b0000007a01000039000000000101041a000000ff0110019000003c3a0000c13d00000fe30100004100000000001004390000000001000414000035810000013d0000001f0430018f000000050230027200003b5a0000613d0000000505200210000000000601034f0000000007000019000000006806043c0000000007870436000000000857004b00003b560000c13d000000000504004b00003b680000613d00000003044002100000000502200210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f18000104300000001102000029000000000302041a0000000e040000290000006001400039000000400010043f00000040054000390000000101000039000d00000005001d00000000001504350000000001040436000100000001001d0000000000010435001000000003001d0000000101300039000000000012041b0000000000200435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001004000029000000010240021000000000012100190000000e020000290000000002020433000000000021041b0000000102000029000000000202043300001031022001970000000d0300002900000000030304330000008003300210000000000223019f0000000101100039000000000021041b000000000104004b000e00000000001d00003bee0000c13d000000400200043d0000006001200039000000400010043f0000000b01000029001000000002001d0000000001120436000d00000001001d0000000701000029000010400110009c00003c3e0000813d000000100100002900000040021000390000000101000039000100000002001d000000000012043500000007010000290000000d0200002900000000001204350000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e020000290000000102200210000000000101043b000000000121001900000010020000290000000002020433000000000021041b0000000d0200002900000000020204330000103102200197000000010300002900000000030304330000008003300210000000000223019f0000000101100039000000000021041b0000000801000029000000000401041a000000400200043d0000004001200039000000400010043f00000fe803000041000000200120003900000000003104350000001b0300003900000000003204350000000b03400029000000000443004b00000000040000190000000104004039000000010440019000003c4a0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003be40000413d000000000124004b000011e60000a13d000011e40000013d0000001001000029000e0001001000920000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000e02000029000d000100200218000000000101043b0000000d011000290000000101100039000000000101041a0000103101100197000000070110006c00003c480000213d0000001101000029000000000101041a0000000e0110006b00003c330000813d00000011010000290000000000100435000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe0011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000001102000029000000000202041a000000100220006b00003c330000813d00000010020000290000000102200210000000000101043b00000000022100190000000d01100029000000000301041a000000000032041b0000000101100039000000000301041a00001031033001970000000102200039000000000402041a0000102a04400197000000000434019f000000000042041b000000000101041a0000102a01100197000000000131019f000000000012041b0000000e0100006b0010000e0000002d00003bee0000c13d000e00000000001d00003b960000013d000000010100008a0000000000010435000000000000043100000fe10100004100000000001004390000000001000414000033ea0000013d00000fe10100004100000000001004390000000001000414000035810000013d000000400100043d00000064021000390000109a03000041000000000032043500000044021000390000109b0300004100000000003204350000002402100039000000270300003900000bd60000013d000e00100000002d00003b960000013d0000000801000029000000000031041b0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000004001200039000000400010043f000000200120003900000fe80400004100000000004104350000001b0400003900000000004204350011000b0030002d000000110330006b00000000030000190000000103004039000000010330019000003c8d0000613d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003c830000413d000000000124004b000011e60000a13d000011e40000013d0000000f0100002900000000001004350000001201000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000c020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000001102000029000000000021041b0000000901000029000000000301041a0000000801000029000000000401041a0000000401000029000000000201041a000000400500043d0000004001500039000000400010043f000000200150003900000fe50600004100000000006104350000001e060000390000000000650435000000000643004b00003cd10000813d000000400300043d00000fde0200004100000000002304350000000402300039000000200400003900000000004204350000000002050433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003cc70000413d000000000124004b000011e60000a13d000011e40000013d000000000143004b000000000100001900003cd90000613d000000000343004900000000412300a900000000433100d9000000000223004b00003d610000c13d000000400200043d0000004003200039000000400030043f000000200320003900000fe60400004100000000004304350000001a03000039000000000032043500000fe72110012a0000000502000029000000000012041b0000000501000039000000000101041a0000000602000029000000000202041a000000000112013f00000fc80110019800003e680000c13d0000000a0100002900000000001004350000000f01000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000301041a000000400200043d0000006001200039000000400010043f00000040012000390000109c04000041000000000041043500000020012000390000109d0400004100000000004104350000002b04000039000000000042043500110fc80030019b0000000b03000029000010210330009c00003d6b0000813d000000110100006b00003e680000613d000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000e0fc70010019c000800000001001d000d000100100092001000000000001d00003d3c0000613d0000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d0200002900000fc7022001970000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000200110027000100ff60010019b000000400200043d0000006001200039000000400010043f0000004001200039000010230300004100000000003104350000002001200039000010240300004100000000003104350000002c03000039000000000032043500000010040000290000000b0340006c00003d820000813d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003d570000413d000000000124004b000011e60000a13d000011e40000013d000000400100043d0000006402100039000010a90300004100000000003204350000004402100039000010aa0300004100000000003204350000002402100039000000210300003900000bd60000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003d780000413d000000000124004b000011e60000a13d000011e40000013d0000007a01000039000000000101041a000000ff0110019000003d930000c13d00000fe3010000410000000000100439000000000100041400000fc70210009c00000fc701008041000000c00110021000000fe2011001c70000800b020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000300000001001d000000400200043d0000008001200039000000400010043f00000060012000390000102503000041000000000031043500000040012000390000102603000041000000000031043500000020012000390000102703000041000000000031043500000042030000390000000000320435000000030300002900000ff50330009c00003ded0000813d00000010020000290009000b002000720000000e0100006b00003e040000613d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d0200002900000fc702200197000d00000002001d0000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b000000000101041a000000030110014f00000fc70110019800003e040000c13d000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000d020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000090400002900000020024002100000102802200197000000000101043b000000000301041a0000102903300197000000000223019f000000000021041b000d0ff60040019b00003e4b0000013d000000400300043d00000fde0400004100000000004304350000000404300039000000200500003900000000005404350000000002020433000000240430003900000000002404350000004403300039000000000402004b000011e60000613d000000000400001900000000053400190000000006140019000000000606043300000000006504350000002004400039000000000524004b00003dfa0000413d000000000124004b000011e60000a13d000011e40000013d000000400200043d0000004001200039000000400010043f0000000301000029000700000002001d0000000002120436000000090100002900000ff601100197000d00000001001d000900000002001d0000000000120435000000110100002900000000001004350000001001000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d000000000101043b0000000e020000290000000000200435000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000702000029000000000202043300000fc702200197000000000101043b000000000301041a0000102a03300197000000000223019f0000000903000029000000000303043300000020033002100000102803300197000000000232019f000000000021041b000000110100002900000000001004350000001101000039000000200010043f000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdf011001c700008010020000393f163f110000040f0000000102200190000000350000613d0000000802000029000000010220003900000fc702200197000000000101043b000000000301041a0000102b03300197000000000223019f000000000021041b000000400100043d00000020021000390000000d03000029000000000032043500000010020000290000000000210435000000400200043d0000000001210049000000400110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000002030000390000102c0400004100000011050000293f163f0c0000040f0000000101200190000000350000613d0000001701000039000000000101041a00000fc8011001970000000f0110006c00003ea80000c13d0000001801000039000000000101041a0000000c0110006b00003ea80000c13d0000001601000039000000000101041a000000400300043d0000109e020000410000000000230435001000000003001d00000004023000390000000a030000290000000000320435000000400200043d000e00000002001d00000fda02000041000000000020043900000fc801100197001100000001001d0000000400100443000000000100041400000fc70210009c00000fc701008041000000c00110021000000fdb011001c700008002020000393f163f110000040f000000010220019000003edc0000613d000000000101043b000000000101004b000000350000613d00000000010004140000001102000029000000040220008c00003ea80000613d0000000e040000290000001002400069000000240220003900000fc70340009c00000fc704008041000000400340021000000fc70420009c00000fc7020080410000006002200210000000000232019f00000fc70310009c00000fc701008041000000c001100210000000000121019f00000011020000293f163f0c0000040f0000000003010019000000600330027000010fc70030019d00000fc7033001970003000000010355000000010220019000003edd0000613d000000400100043d00000002020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d02000039000000040300003900001051040000410000000a050000290000000f060000290000000c070000293f163f0c0000040f0000000101200190000000350000613d000000400100043d0000000b020000290000000000210435000000400200043d0000000001210049000000200110003900000fc70310009c00000fc701008041000000600110021000000fc70320009c00000fc7020080410000004002200210000000000121019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000121019f00000fec011001c70000800d0200003900000004030000390000109f040000410000000a05000029000039c50000013d000000000001042f0000001f0430018f0000000502300272000000050220021000003ee70000613d000000000501034f0000000006000019000000005705043c0000000006760436000000000726004b00003ee30000c13d000000000504004b00003ef40000613d0000000304400210000000000502043300000000054501cf000000000545022f000000000121034f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000600130021000003f1800010430000000000001042f00000fc70310009c00000fc701008041000000400110021000000fc70320009c00000fc7020080410000006002200210000000000112019f000000000200041400000fc70320009c00000fc702008041000000c002200210000000000112019f00000fec011001c700008010020000393f163f110000040f000000010220019000003f0a0000613d000000000101043b000000000001042d000000000100001900003f180001043000003f0f002104210000000102000039000000000001042d0000000002000019000000000001042d00003f14002104230000000102000039000000000001042d0000000002000019000000000001042d00003f160000043200003f170001042e00003f180001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000020000000000000000000000000000004000000100000000000000000092e3500000000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000f55401620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fba1b1f800000000000000000000000000000000000000000000000000000000fba1b1f900000000000000000000000000000000000000000000000000000000fe5a451a00000000000000000000000000000000000000000000000000000000f554016200000000000000000000000000000000000000000000000000000000f851a44000000000000000000000000000000000000000200000008000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000001000000000000000000000000000000000000000061646428616464726573732c75696e743235362c616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000018c5e8ab000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b83020000020000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000a4000000e00000000000000000556e617574686f72697a6564000000000000000000000000000000000000000008c379a00000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000000200000000000000000000000000000000000020000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd170a0823100000000000000000000000000000000000000000000000000000000536166654d6174683a207375627472616374696f6e206f766572666c6f770000536166654d6174683a206469766973696f6e206279207a65726f000000000000000000000000000000000000000000000000000000000000000000e8d4a51000536166654d6174683a206164646974696f6e206f766572666c6f770000000000506f6f6c20616c72656164792061646465640000000000000000000000000000546f6b656e2065786973747320696e206f7468657220706f6f6c000000000000fb66fb4d000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000d7fa4bff1cd2253c0789c3291a786a6f6b1a3b4569a75af683a15d52abb6a0bf416c6c6f6320706f696e7473206d757374206e6f74206265207a65726f00000053746f726520636f6e7472616374206164647265737320697320656d707479007a65726f2061646472657373206e6f7420616c6c6f77656400000000000000000000000000000000000000000000000000000000000000000000000012cc030000000000000000000000000000000000000000000000000000000000e7a324dc00000000000000000000000000000000000000000000000000000000e8f2be6f00000000000000000000000000000000000000000000000000000000f1127ed800000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000004000000080000000000000000044656c65676174696f6e28616464726573732064656c6567617465652c75696e74323536206e6f6e63652c75696e743235362065787069727929000000000000dae66bbe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e1d146fa00000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000e6a69ab800000000000000000000000000000000000000000000000000000000dae66bbe00000000000000000000000000000000000000000000000000000000de0368b20000000000000000000000000000000000000000000000000000000001e133808def9436d6e31b89ed00948ba91d0cb6936eada5154cb1b45b55683fb9e492377265776172642063616e6e6f74206265207a65726f206164647265737300000000000000000000000000000000000000000000640000008000000000000000007072696d6520746f6b656e2063616e6e6f74206265207a65726f2061646472657373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000000000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000cd9b94e700000000000000000000000000000000000000000000000000000000d7ae45e2add8933700000000000000000000000000000000000000000000000000000000b6a5fd2f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3c754a700000000000000000000000000000000000000000000000000000000c3c754a800000000000000000000000000000000000000000000000000000000c3cda52000000000000000000000000000000000000000000000000000000000b6a5fd2f00000000000000000000000000000000000000000000000000000000c2102596454950373132446f6d61696e28737472696e67206e616d652c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000430000008000000000000000005856535661756c740000000000000000000000000000000000000000000000000200000000000000000000000000000000000008000000a000000000000000009a8a0592ac89c5ad3bc6df8224c17b485976f597df104ee20d0df415241f670b19010000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1756500000000000000000000000000000000000000000000000000000000000045434453413a20696e76616c6964207369676e6174757265202773272076616c45434453413a20696e76616c6964207369676e6174757265202776272076616c206e6f6e636500000000000000000000000000000000000000000000000000005856535661756c743a3a64656c656761746542795369673a20696e76616c69646f766572666c6f770000000000000000000000000000000000000000000000005856535661756c743a3a6765745374616b65416d6f756e743a20766f7465732000000000000000000000000000000000000000010000000000000000000000000cc323ffec3ea49cbcddc0de1480978126d350c6a45dff33ad2f1cda6ae992617420756e646572666c6f777300000000000000000000000000000000000000005856535661756c743a3a5f6d6f7665566f7465733a20766f746520616d6f756e74730000000000000000000000000000000000000000000000000000000000006b206e756d626572206f72207365636f6e6420657863656564732033322062695856535661756c743a3a5f7772697465436865636b706f696e743a20626c6f6300000000000000000000000000000000ffffffffffffffffffffffff00000000ffffffffffffffffffffffffffffffff000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000006adb589fed1e8542fb7a6b10f00a85e02265e77f9ae3ca8ff93b22983e1af9a074206f766572666c6f777300000000000000000000000000000000000000000072652065787069726564000000000000000000000000000000000000000000005856535661756c743a3a64656c656761746542795369673a207369676e61747545434453413a20696e76616c6964207369676e6174757265000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff736574526577617264416d6f756e74506572426c6f636b4f725365636f6e6428616464726573732c75696e743235362900000000000000000000000000000000f5ab16cc00000000000000000000000000000000000000000000000000000000496e76616c69642072657761726420746f6b656e000000000000000000000000ad96cee0d692f0250b98e085504f399da6733854908215f6203fe3c69366d9f500000000000000000000000000000000000000000000000000000000add8933700000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000b4b5ea579e2b6c4d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a699776100000000000000000000000000000000000000000000000000000000a699776200000000000000000000000000000000000000000000000000000000a9d69a69000000000000000000000000000000000000000000000000000000009e2b6c4d00000000000000000000000000000000000000000000000000000000a09eab7a0000000000000000000000000000000100000000000000000000000000000000416c726561647920696e697469616c697a65642054696d654d616e6167657200496e76616c696420626c6f636b73207065722079656172000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000496e76616c69642074696d6520626173656420636f6e66696775726174696f6e7365745769746864726177616c4c6f636b696e67506572696f6428616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000000000000000000000000000000000000000000000012cc02ff496e76616c6964206e6577206c6f636b696e6720706572696f640000000000000bcf80c5060ccf99b7a993c57a94b232fc2c5c04bd74c7c7d174595fee6bc31f0000000000000000000000000000000000000000000000000000000092e350000000000000000000000000000000000000000000000000000000000098e1b31b00000000000000000000000000000000000000000000000000000000996cba680000000000000000000000ff0000000000000000000000000000000000000000ffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6bdfd5e51d01475945224d3d37965916fd8df699ef9e8888af4359aa862221609ad99e6800000000000000000000000000000000000000000000000000000000865ca08d59f5cb456e85cd2f7ef63664ea4f73327414e9d8152c4158b0e946455c19a95c0000000000000000000000000000000000000000000000000000000073d025d6000000000000000000000000000000000000000000000000000000007ecebe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008456cb58000000000000000000000000000000000000000000000000000000008456cb59000000000000000000000000000000000000000000000000000000008ed7333d000000000000000000000000000000000000000000000000000000007ecebe00000000000000000000000000000000000000000000000000000000008308d7e970617573652829000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000c000000000000000005661756c7420697320616c726561647920706175736564000000000000000000dffada2889ebfab9224c24069d833f3de835d8cf99872d49e7b7ba5fccb7a46f73657428616464726573732c75696e743235362c75696e7432353629000000006ee09c6cb801194690c195c69f465aaf7c80255cbeafaab9600f47ed79de2ca97374206e6f74206265207a65726f000000000000000000000000000000000000416c6c6f6320706f696e7473207065722072657761726420746f6b656e206d750000000000000000000000000000000000000000000000000000000073d025d600000000000000000000000000000000000000000000000000000000782d6fe1000000000000000000000000000000000000000000000000000000007ac92456696e636f6e73697374656e74207374617465000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9059cbb00000000000000000000000000000000000000000000000000000000e03fe177bb050a40ea1b3ecd64121a3fa063a94b6d404b2f45c64697555efe0ec5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706f742073756363656564000000000000000000000000000000000000000000005361666542455032303a204245503230206f7065726174696f6e20646964206ee31da05fae6db869f5ea51f4b638aa6884070b6c87f18f63bd2291a12cb2f5186e6f7468696e6720746f207769746864726177000000000000000000000000002064657465726d696e65640000000000000000000000000000000000000000005856535661756c743a3a6765745072696f72566f7465733a206e6f742079657400000000000000000000000000000000000000000000000000000000fffffffe5ff5631500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006dd77cbc000000000000000000000000000000000000000000000000000000006dd77cbd000000000000000000000000000000000000000000000000000000006fcfff45000000000000000000000000000000000000000000000000000000005ff56315000000000000000000000000000000000000000000000000000000006857249c616c726561647920696e697469616c697a6564000000000000000000000000000200000000000000000000000000000000000080000000800000000000000000559f314bb90394a4a9ceb724f365b36a53587d894352c43d12901fd680101456000000000000000000000000000000000000000000000000000000005c19a95c000000000000000000000000000000000000000000000000000000005c60da1b000000000000000000000000000000000000000000000000000000005f14e7006472657373206973206e6f7420736574000000000000000000000000000000005856535661756c743a3a6765745374616b65416d6f756e743a2078767320616424f52bbf00000000000000000000000000000000000000000000000000000000358ae03600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004298bdbc000000000000000000000000000000000000000000000000000000004298bdbd00000000000000000000000000000000000000000000000000000000587cde1e00000000000000000000000000000000000000000000000000000000358ae036000000000000000000000000000000000000000000000000000000003d4180f90000000000000000000000000000000000000000000000000000000024f52bbf0000000000000000000000000000000000000000000000000000000026782247000000000000000000000000000000000000000000000000000000002eda5c6c115b512f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d504dc5000000000000000000000000000000000000000000000000000000001d504dc60000000000000000000000000000000000000000000000000000000020606b7000000000000000000000000000000000000000000000000000000000115b512f0000000000000000000000000000000000000000000000000000000019129e5af851a4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000006e730000000000000000000000000000000000000000000000000000000000006f6e6c792070726f78792061646d696e2063616e206368616e67652062726169c1e80334000000000000000000000000000000000000000000000000000000006368616e6765206e6f7420617574686f72697a656400000000000000000000006f6e6c792061646d696e2063616e000000000000000000000000000000000000020000000000000000000000000000000000004000000080000000000000000066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0696e76616c696420616365737320636f6e74726f6c206d616e616765722061646472657373000000000000000000000000000000000000000000000000000000323820626974730000000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e20316573206f766572666c6f770000000000000000000000000000000000000000005856535661756c743a3a726571756573745769746864726177616c3a20766f7437f23cd30000000000000000000000000000000000000000000000000000000088a254a0ef28a0b9e957ff600beae69870f6f924065147f3627c3f814e60ec1172657175657374656420616d6f756e7420697320696e76616c6964000000000072657175657374656420616d6f756e742063616e6e6f74206265207a65726f0000000000000000000000000000000000000000000000000000000000046f7da2000000000000000000000000000000000000000000000000000000000af13728000000000000000000000000000000000000000000000000000000000efe6a8b5661756c74206973207061757365640000000000000000000000000000000000657865637574652070656e64696e67207769746864726177616c00000000000023b872dd000000000000000000000000000000000000000000000000000000005361666542455032303a2063616c6c20746f206e6f6e2d636f6e7472616374007700000000000000000000000000000000000000000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f5856535661756c743a3a6465706f7369743a20766f746573206f766572666c6fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d75361666542455032303a206c6f772d6c6576656c2063616c6c206661696c656472652d656e7465726564000000000000000000000000000000000000000000007661756c743a20706f6f6c206578697374733f00000000000000000000000000726573756d652829000000000000000000000000000000000000000000000000d2619572a1464e0df0bb351d834fd47f3350984d7bfdb1ab69cfcb0b8e4214155661756c74206973206e6f742070617573656400000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0001beba02ab62eea76adc759b4e16024b96ecb05987b77d0db148c87b4921e51b0f" + ] +} diff --git a/deployments/zksyncsepolia/solcInputs/44f09e5a32172287e0699190adfae104.json b/deployments/zksyncsepolia/solcInputs/44f09e5a32172287e0699190adfae104.json new file mode 100644 index 000000000..5f5b77cf7 --- /dev/null +++ b/deployments/zksyncsepolia/solcInputs/44f09e5a32172287e0699190adfae104.json @@ -0,0 +1,351 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" + }, + "@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /// @notice Deprecated slot for _getCurrentSlot function pointer\n bytes8 private __deprecatedSlot1;\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[48] private __gap;\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return isTimeBased ? _getBlockTimestamp() : _getBlockNumber();\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n isInitialized = true;\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "contracts/Comptroller/ComptrollerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerLensInterface.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address. Defaults to zero which corresponds to unlimited borrowing.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" + }, + "contracts/Comptroller/Diamond/Diamond.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" + }, + "contracts/Comptroller/Diamond/facets/FacetBase.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n\n ensureListed(markets[vToken]);\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 borrowCap = borrowCaps[vToken];\n // Borrow cap of 0 corresponds to unlimited borrowing\n if (borrowCap != 0) {\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows < borrowCap, \"market borrow cap reached\");\n }\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to unlimited borrowing\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to unlimited borrowing\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" + }, + "contracts/Comptroller/Unitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Governance/VTreasury.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" + }, + "contracts/InterestRateModels/InterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" + }, + "contracts/InterestRateModels/JumpRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/Lens/ComptrollerLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" + }, + "contracts/Lens/SnapshotLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Lens/VenusLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Oracle/PriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" + }, + "contracts/test/BEP20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/ComptrollerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" + }, + "contracts/test/ComptrollerMock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerMockR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMockR1 is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n event MarketListed(address vToken);\n event NewCollateralFactor(address vToken, uint256 oldCollateralFactorMantissa, uint256 newCollateralFactorMantissa);\n event MarketEntered(address vToken, address account);\n event MarketExited(address vToken, address account);\n\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerScenario.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" + }, + "contracts/test/DiamondHarness.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" + }, + "contracts/test/EvilToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/EvilXDelegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/test/EvilXToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" + }, + "contracts/test/Fauceteer.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" + }, + "contracts/test/FaucetToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" + }, + "contracts/test/FeeToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/FixedPriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" + }, + "contracts/test/InterestRateModelHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" + }, + "contracts/test/MockDeflationaryToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" + }, + "contracts/test/MockVBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/SimplePriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/test/VAIControllerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" + }, + "contracts/test/VAIHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" + }, + "contracts/test/VBep20Harness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" + }, + "contracts/test/VBep20MockDelegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" + }, + "contracts/test/VRTConverterHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" + }, + "contracts/test/VRTVaultHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" + }, + "contracts/test/XVSHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" + }, + "contracts/test/XVSVaultScenario.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" + }, + "contracts/test/XVSVestingHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" + }, + "contracts/Tokens/EIP20Interface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/EIP20NonStandardInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/Prime/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" + }, + "contracts/Tokens/VAI/lib.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" + }, + "contracts/Tokens/VAI/VAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint256) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint256 wad);\n event Transfer(address indexed src, address indexed dst, uint256 wad);\n\n // --- Math ---\n function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint256 wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint256 wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint256 wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint256 wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint256(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint256 wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint256 wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint256 wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint256 wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint256 wad = allowed ? uint256(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAIControllerInterface } from \"./VAIControllerInterface.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerInterface, VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint256 public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint256 mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint256 repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint256 repayAmount,\n address vTokenCollateral,\n uint256 seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint256 feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint256 oldFloatRateMantissa, uint256 newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint256 oldMintCap, uint256 newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @dev If the Comptroller address is not set, minting is a no-op and the function returns the success code.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint256 mintVAIAmount) external nonReentrant returns (uint256) {\n if (address(comptroller) == address(0)) {\n return uint256(Error.NO_ERROR);\n }\n\n _ensureNonzeroAmount(mintVAIAmount);\n _ensureNotPaused();\n accrueVAIInterest();\n\n uint256 err;\n address minter = msg.sender;\n address _vai = vai;\n uint256 vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n\n uint256 vaiNewTotalSupply = add_(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n uint256 accountMintableVAI;\n (err, accountMintableVAI) = getMintableVAI(minter);\n require(err == uint256(Error.NO_ERROR), \"could not compute mintable amount\");\n\n // check that user have sufficient mintableVAI balance\n require(mintVAIAmount <= accountMintableVAI, \"minting more than allowed\");\n\n // Calculate the minted balance based on interest index\n uint256 totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint256 remainedAmount = sub_(repayAmount, totalMintedVAI);\n pastVAIInterest[minter] = add_(pastVAIInterest[minter], remainedAmount);\n totalMintedVAI = repayAmount;\n }\n\n uint256 accountMintVAINew = add_(totalMintedVAI, mintVAIAmount);\n err = comptroller.setMintedVAIOf(minter, accountMintVAINew);\n require(err == uint256(Error.NO_ERROR), \"comptroller rejection\");\n\n uint256 remainedAmount;\n if (treasuryPercent != 0) {\n uint256 feeAmount = div_(mul_(mintVAIAmount, treasuryPercent), 1e18);\n remainedAmount = sub_(mintVAIAmount, feeAmount);\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = mintVAIAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice The repay function transfers VAI interest into the protocol and burns the rest,\n * reducing the borrower's borrow balance. Before repaying VAI, users must first approve\n * VAIController to access their VAI balance.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAI(uint256 amount) external nonReentrant returns (uint256, uint256) {\n return _repayVAI(msg.sender, amount);\n }\n\n /**\n * @notice The repay on behalf function transfers VAI interest into the protocol and burns the rest,\n * reducing the borrower's borrow balance. Borrowed VAIs are repaid by another user (possibly the borrower).\n * Before repaying VAI, the payer must first approve VAIController to access their VAI balance.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param borrower The account to repay the debt for.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAIBehalf(address borrower, uint256 amount) external nonReentrant returns (uint256, uint256) {\n _ensureNonzeroAddress(borrower);\n return _repayVAI(borrower, amount);\n }\n\n /**\n * @dev Checks the parameters and the protocol state, accrues interest, and invokes repayVAIFresh.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param borrower The account to repay the debt for.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function _repayVAI(address borrower, uint256 amount) internal returns (uint256, uint256) {\n if (address(comptroller) == address(0)) {\n return (0, 0);\n }\n _ensureNonzeroAmount(amount);\n _ensureNotPaused();\n\n accrueVAIInterest();\n return repayVAIFresh(msg.sender, borrower, amount);\n }\n\n /**\n * @dev Repay VAI, expecting interest to be accrued\n * @dev Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being repaid\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAIFresh(address payer, address borrower, uint256 repayAmount) internal returns (uint256, uint256) {\n (uint256 burn, uint256 partOfCurrentInterest, uint256 partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint256 vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n\n uint256 accountVAINew = sub_(sub_(vaiBalanceBorrower, burn), partOfPastInterest);\n pastVAIInterest[borrower] = sub_(pastVAIInterest[borrower], partOfPastInterest);\n\n uint256 error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n // We have to revert upon error since side-effects already happened at this point\n require(error == uint256(Error.NO_ERROR), \"comptroller rejection\");\n\n uint256 repaidAmount = add_(burn, partOfCurrentInterest);\n emit RepayVAI(payer, borrower, repaidAmount);\n\n return (uint256(Error.NO_ERROR), repaidAmount);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint256, uint256) {\n _ensureNotPaused();\n\n uint256 error = vTokenCollateral.accrueInterest();\n if (error != uint256(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @dev If the Comptroller address is not set, liquidation is a no-op and the function returns the success code.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint256, uint256) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint256 allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint256(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint256 repayBorrowError, uint256 actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint256(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint256 amountSeizeError, uint256 seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint256(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint256 seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint256(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint256(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint256) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint256) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint256(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint256 oErr;\n MathError mErr;\n uint256 sumSupply;\n uint256 marketSupply;\n uint256 sumBorrowPlusEffects;\n uint256 vTokenBalance;\n uint256 borrowBalance;\n uint256 exchangeRateMantissa;\n uint256 oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol for details)\n * @return Mintable amount (with 18 decimals)\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint256, uint256) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint256(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint256 accountMintableVAI;\n uint256 i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n uint256 marketsCount = enteredMarkets.length;\n for (i = 0; i < marketsCount; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint256(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint256(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (, uint256 collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n }\n\n uint256 totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.REJECTION), 0);\n }\n\n return (uint256(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint256 Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint256) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint256 oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint256 delta;\n uint256 rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint256 Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint256) {\n uint256 yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint256 rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint256 Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint256) {\n uint256 storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint256) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint256) {\n MathError mErr;\n uint256 delta;\n\n uint256 amount = comptroller.mintedVAIs(account);\n uint256 interest = pastVAIInterest[account];\n uint256 totalMintedVAI;\n uint256 newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return Amount of VAI to be burned\n * @return Amount of VAI the user needs to pay in current interest\n * @return Amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(\n address borrower,\n uint256 repayAmount\n ) public view returns (uint256, uint256, uint256) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint256 currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint256 burn;\n uint256 partOfCurrentInterest = currentInterest;\n uint256 partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint256 delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint256 totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint256 delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCRUE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCRUE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint256 newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint256 old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint256 newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint256 old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n _ensureNonzeroAddress(newReceiver);\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint256 _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint256 old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint256) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @dev Reverts if the protocol is paused\n function _ensureNotPaused() private view {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n }\n\n /// @dev Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @dev Reverts if the passed amount is zero\n function _ensureNonzeroAmount(uint256 amount) private pure {\n require(amount > 0, \"amount can't be zero\");\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function mintVAI(uint256 mintVAIAmount) external returns (uint256);\n\n function repayVAI(uint256 amount) external returns (uint256, uint256);\n\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\n\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256, uint256);\n\n function getMintableVAI(address minter) external view returns (uint256, uint256);\n\n function getVAIAddress() external view returns (address);\n\n function getVAIRepayAmount(address account) external view returns (uint256);\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint256) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint256 public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint256 public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint256 public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint256 internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint256) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint256) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint256 public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" + }, + "contracts/Tokens/VAI/VAIUnitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint256) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint256) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint256) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint256) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRT.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverter.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VBep20R1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VTokenR1, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VTokenR1.sol\";\nimport { EIP20Interface } from \"../../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20R1 is VTokenR1, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../../InterestRateModels/InterestRateModel.sol\";\nimport \"../VTokenInterfaces.sol\";\n\ncontract VTokenInterfaceR1 is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VTokenR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../../Utils/ErrorReporter.sol\";\nimport \"../../../Utils/Exponential.sol\";\nimport \"../../../Tokens/EIP20Interface.sol\";\nimport \"../../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../../InterestRateModels/InterestRateModel.sol\";\nimport \"../VTokenInterfaces.sol\";\nimport { VTokenInterfaceR1 } from \"./VTokenInterfaceR1.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VTokenR1 is VTokenInterfaceR1, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VBep20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Immutable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VTokenInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" + }, + "contracts/Tokens/XVS/IXVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" + }, + "contracts/Tokens/XVS/XVS.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" + }, + "contracts/Utils/Address.sol": { + "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/Utils/CarefulMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" + }, + "contracts/Utils/Context.sol": { + "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "contracts/Utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" + }, + "contracts/Utils/ErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/Utils/Exponential.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" + }, + "contracts/Utils/ExponentialNoError.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" + }, + "contracts/Utils/IBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" + }, + "contracts/Utils/Ownable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/Utils/Owned.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" + }, + "contracts/Utils/SafeBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Utils/SafeCast.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/Utils/SafeMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "contracts/Utils/Tokenlock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" + }, + "contracts/VAIVault/VAIVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" + }, + "contracts/VRTVault/VRTVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" + }, + "contracts/XVSVault/XVSStore.sol": { + "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" + }, + "contracts/XVSVault/XVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport \"@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol\";\n\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) public totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "mode": "3" + }, + "outputSelection": { + "*": { + "*": ["storageLayout", "abi", "evm.methodIdentifiers", "metadata", "devdoc", "userdoc"], + "": ["ast"] + } + }, + "forceEVMLA": false, + "detectMissingLibraries": false, + "enableEraVMExtensions": false, + "libraries": {} + } +} diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts new file mode 100644 index 000000000..d5d4b6e65 --- /dev/null +++ b/hardhat.config.zksync.ts @@ -0,0 +1,157 @@ +import "module-alias/register"; + +import "@matterlabs/hardhat-zksync"; +import "@matterlabs/hardhat-zksync-deploy"; +import "@matterlabs/hardhat-zksync-solc"; +import "@matterlabs/hardhat-zksync-verify"; +import "@nomicfoundation/hardhat-chai-matchers"; +import "@typechain/hardhat"; +import "hardhat-deploy"; +import { HardhatUserConfig, extendConfig } from "hardhat/config"; +import { HardhatConfig } from "hardhat/types"; +import "solidity-coverage"; +import "solidity-docgen"; + +require("hardhat-contract-sizer"); + +require("dotenv").config(); + +const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY; + +extendConfig((config: HardhatConfig) => { + if (process.env.EXPORT !== "true") { + config.external = { + ...config.external, + deployments: { + zksyncsepolia: [], + }, + }; + } +}); + +const config: HardhatUserConfig = { + defaultNetwork: "hardhat", + zksolc: { + version: "1.5.1", + compilerSource: "binary", + settings: { + metadata: { + // do not include the metadata hash, since this is machine dependent + // and we want all generated code to be deterministic + // https://docs.soliditylang.org/en/v0.7.6/metadata.html + bytecodeHash: "none", + }, + }, + }, + solidity: { + compilers: [ + { + version: "0.5.16", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, + { + version: "0.8.25", + settings: { + optimizer: { + enabled: true, + runs: 10000, + }, + evmVersion: "paris", + outputSelection: { + "*": { + "*": ["storageLayout"], + }, + }, + }, + }, + ], + }, + zksolc: { + version: "1.5.0", + settings: {}, + }, + networks: { + hardhat: isFork(), + zksyncsepolia: { + url: process.env.ARCHIVE_NODE_zksyncsepolia || "https://sepolia.era.zksync.dev", + ethNetwork: "sepolia", + verifyURL: "https://explorer.sepolia.era.zksync.dev/contract_verification", + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: true, + live: true, + }, + }, + paths: { + sources: "./contracts", + tests: "./tests/hardhat", + cache: "./cache-zk", + artifacts: "./artifacts-zk", + }, + mocha: { + timeout: 200000000, + }, + typechain: { + outDir: "typechain", + target: "ethers-v5", + }, + // Hardhat deploy + namedAccounts: { + deployer: { + default: 0, // here this will by default take the first account as deployer + }, + }, + external: { + contracts: [ + { + artifacts: "node_modules/@venusprotocol/governance-contracts/artifacts-zk", + }, + { + artifacts: "node_modules/@venusprotocol/oracle/artifacts-zk", + }, + { + artifacts: "node_modules/@venusprotocol/protocol-reserve/artifacts-zk", + }, + ], + deployments: {}, + }, + docgen: { + outputDir: "./docgen-docs", + pages: "files", + templates: "docgen-templates", + }, +}; + +function isFork() { + return process.env.FORK === "true" + ? { + allowUnlimitedContractSize: false, + loggingEnabled: false, + forking: { + url: process.env[`ARCHIVE_NODE_${process.env.FORKED_NETWORK}`] || "https://sepolia.era.zksync.dev", + blockNumber: 21068448, // TODO: change this + }, + accounts: { + accountsBalance: "1000000000000000000", + }, + live: false, + zksync: true, + } + : { + allowUnlimitedContractSize: true, + loggingEnabled: false, + live: false, + zksync: true, + }; +} + +export default config; diff --git a/package.json b/package.json index 882d7233f..d656e30d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.4", + "version": "9.2.0-dev.1", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", @@ -16,10 +16,10 @@ "deployments" ], "scripts": { - "compile": "hardhat compile", + "compile": "hardhat compile && hardhat compile --config hardhat.config.zksync.ts", "coverage": "hardhat coverage", "test": "hardhat test", - "build": "rm -rf dist && tsc --declaration && hardhat compile", + "build": "rm -rf dist && tsc --declaration && hardhat compile && hardhat compile --config hardhat.config.zksync.ts", "lint": "yarn lint:ts && yarn lint:sol && yarn prettier:check", "lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .", "lint:sol": "solhint \"contracts/**/*.sol\"", @@ -27,7 +27,8 @@ "prettier": "prettier --write \"**/*.{js,json,md,ts,yaml,yml,sol}\"", "prettier:check": "prettier --check \"**/*.{js,json,md,ts,yaml,yml,sol}\"", "docgen": "hardhat docgen", - "prepare": "husky install" + "prepare": "husky install", + "clean": "hardhat clean && hardhat clean --config hardhat.config.zksync.ts" }, "dependencies": { "@nomicfoundation/hardhat-ethers": "^3.0.0", @@ -50,9 +51,14 @@ "@ethersproject/abstract-signer": "^5", "@ethersproject/bytes": "^5.0.0", "@ethersproject/providers": "^5.6.8", + "@matterlabs/hardhat-zksync": "^0.2.0", + "@matterlabs/hardhat-zksync-deploy": "^0.11.0", + "@matterlabs/hardhat-zksync-solc": "^1.2.1", + "@matterlabs/hardhat-zksync-verify": "0.7.0", "@nomicfoundation/hardhat-chai-matchers": "^1.0.3", "@nomicfoundation/hardhat-network-helpers": "^1.0.10", "@nomicfoundation/hardhat-toolbox": "^2.0.0", + "@nomicfoundation/hardhat-verify": "^2.0.8", "@nomiclabs/hardhat-etherscan": "^3.1.0", "@openzeppelin/hardhat-upgrades": "^1.21.0", "@semantic-release/changelog": "^6.0.1", @@ -74,7 +80,7 @@ "ethers": "^5.7.0", "hardhat": "^2.19.2", "hardhat-contract-sizer": "^2.8.0", - "hardhat-deploy": "^0.11.14", + "hardhat-deploy": "^0.12.4", "hardhat-deploy-ethers": "^0.3.0-beta.13", "hardhat-gas-reporter": "^1.0.8", "husky": "^8.0.1", @@ -87,7 +93,8 @@ "ts-node": "^10.9.1", "typechain": "^8.1.0", "typescript": "^4.7.4", - "web3-utils": "^1.7.5" + "web3-utils": "^1.7.5", + "zksync-ethers": "^5.9.1" }, "_moduleAliases": { "@nomiclabs/hardhat-ethers": "node_modules/hardhat-deploy-ethers" From a12ea8f32627e193f302d5848bb018c7d8df59de Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Fri, 26 Jul 2024 09:16:18 -0300 Subject: [PATCH 52/85] fix: remove outdated addresses --- deployments/bscmainnet.json | 163565 +++------------ .../bscmainnet/AAVE_Implementation.json | 422 - deployments/bscmainnet/AAVE_Proxy.json | 137 - .../bscmainnet/BETH_Implementation.json | 512 - deployments/bscmainnet/BETH_Proxy.json | 137 - .../bscmainnet/DOGE_Implementation.json | 422 - deployments/bscmainnet/DOGE_Proxy.json | 137 - .../bscmainnet/FIL_Implementation.json | 422 - deployments/bscmainnet/FIL_Proxy.json | 137 - .../bscmainnet/LUNA_Implementation.json | 75 - deployments/bscmainnet/LUNA_Proxy.json | 75 - .../bscmainnet/MATIC_Implementation.json | 422 - deployments/bscmainnet/MATIC_Proxy.json | 137 - .../bscmainnet/TRXOLD_Implementation.json | 422 - deployments/bscmainnet/TRXOLD_Proxy.json | 137 - .../bscmainnet/TUSDOLD_Implementation.json | 422 - deployments/bscmainnet/TUSDOLD_Proxy.json | 137 - .../bscmainnet/TUSD_Implementation.json | 740 - deployments/bscmainnet/TUSD_Proxy.json | 142 - .../bscmainnet/USDC_Implementation.json | 422 - deployments/bscmainnet/USDC_Proxy.json | 137 - .../bscmainnet/UST_Implementation.json | 417 - deployments/bscmainnet/UST_Proxy.json | 75 - .../bscmainnet/WBETH_Implementation.json | 1658 - deployments/bscmainnet/WBETH_Proxy.json | 123 - .../bscmainnet/vAAVE_Implementation.json | 1741 - deployments/bscmainnet/vAAVE_Proxy.json | 1550 - .../bscmainnet/vADA_Implementation.json | 1741 - deployments/bscmainnet/vADA_Proxy.json | 1468 - .../bscmainnet/vBCH_Implementation.json | 1741 - deployments/bscmainnet/vBCH_Proxy.json | 1468 - .../bscmainnet/vBETH_Implementation.json | 1741 - deployments/bscmainnet/vBETH_Proxy.json | 1468 - .../bscmainnet/vBTC_Implementation.json | 1741 - deployments/bscmainnet/vBTC_Proxy.json | 1468 - .../bscmainnet/vBUSD_Implementation.json | 1741 - deployments/bscmainnet/vBUSD_Proxy.json | 1468 - .../bscmainnet/vCAKE_Implementation.json | 1741 - deployments/bscmainnet/vCAKE_Proxy.json | 1550 - .../bscmainnet/vDAI_Implementation.json | 1741 - deployments/bscmainnet/vDAI_Proxy.json | 1468 - .../bscmainnet/vDOGE_Implementation.json | 1741 - deployments/bscmainnet/vDOGE_Proxy.json | 1493 - .../bscmainnet/vDOT_Implementation.json | 1741 - deployments/bscmainnet/vDOT_Proxy.json | 1468 - .../bscmainnet/vETH_Implementation.json | 1741 - deployments/bscmainnet/vETH_Proxy.json | 1468 - .../bscmainnet/vFDUSD_Implementation.json | 1741 - deployments/bscmainnet/vFDUSD_Proxy.json | 1685 - .../bscmainnet/vFIL_Implementation.json | 1741 - deployments/bscmainnet/vFIL_Proxy.json | 1468 - .../bscmainnet/vLINK_Implementation.json | 1741 - deployments/bscmainnet/vLINK_Proxy.json | 1468 - .../bscmainnet/vLTC_Implementation.json | 1741 - deployments/bscmainnet/vLTC_Proxy.json | 1468 - .../bscmainnet/vLUNA_Implementation.json | 1460 - deployments/bscmainnet/vLUNA_Proxy.json | 1550 - .../bscmainnet/vMATIC_Implementation.json | 1741 - deployments/bscmainnet/vMATIC_Proxy.json | 1550 - .../bscmainnet/vSXP_Implementation.json | 1741 - deployments/bscmainnet/vSXP_Proxy.json | 1468 - .../bscmainnet/vTRXOLD_Implementation.json | 1741 - deployments/bscmainnet/vTRXOLD_Proxy.json | 1550 - .../bscmainnet/vTRX_Implementation.json | 1741 - deployments/bscmainnet/vTRX_Proxy.json | 1550 - .../bscmainnet/vTUSDOLD_Implementation.json | 1741 - deployments/bscmainnet/vTUSDOLD_Proxy.json | 1550 - .../bscmainnet/vTUSD_Implementation.json | 1741 - deployments/bscmainnet/vTUSD_Proxy.json | 1550 - .../bscmainnet/vUSDC_Implementation.json | 1741 - deployments/bscmainnet/vUSDC_Proxy.json | 1468 - .../bscmainnet/vUSDT_Implementation.json | 1741 - deployments/bscmainnet/vUSDT_Proxy.json | 1468 - .../bscmainnet/vUST_Implementation.json | 1460 - deployments/bscmainnet/vUST_Proxy.json | 1550 - .../bscmainnet/vWBETH_Implementation.json | 1741 - deployments/bscmainnet/vWBETH_Proxy.json | 1550 - .../bscmainnet/vXRP_Implementation.json | 1741 - deployments/bscmainnet/vXRP_Proxy.json | 1468 - .../bscmainnet/vXVS_Implementation.json | 1741 - deployments/bscmainnet/vXVS_Proxy.json | 1468 - deployments/bscmainnet_addresses.json | 58 +- deployments/bsctestnet.json | 49464 +---- .../bsctestnet/vBTC_Implementation.json | 1741 - deployments/bsctestnet/vBTC_Proxy.json | 1468 - .../bsctestnet/vBUSD_Implementation.json | 1741 - deployments/bsctestnet/vBUSD_Proxy.json | 1468 - .../bsctestnet/vETH_Implementation.json | 1741 - deployments/bsctestnet/vETH_Proxy.json | 1468 - .../bsctestnet/vFDUSD_Implementation.json | 1793 - deployments/bsctestnet/vFDUSD_Proxy.json | 1685 - .../bsctestnet/vLTC_Implementation.json | 1741 - deployments/bsctestnet/vLTC_Proxy.json | 1468 - .../bsctestnet/vSXP_Implementation.json | 1741 - deployments/bsctestnet/vSXP_Proxy.json | 1468 - .../bsctestnet/vTRX_Implementation.json | 1741 - deployments/bsctestnet/vTRX_Proxy.json | 1550 - .../bsctestnet/vTUSD_Implementation.json | 1741 - deployments/bsctestnet/vTUSD_Proxy.json | 1550 - .../bsctestnet/vUSDC_Implementation.json | 1741 - deployments/bsctestnet/vUSDC_Proxy.json | 1468 - .../bsctestnet/vUSDT_Implementation.json | 1741 - deployments/bsctestnet/vUSDT_Proxy.json | 1468 - .../bsctestnet/vWBETH_Implementation.json | 1517 - deployments/bsctestnet/vWBETH_Proxy.json | 1550 - .../bsctestnet/vXRP_Implementation.json | 1741 - deployments/bsctestnet/vXRP_Proxy.json | 1468 - .../bsctestnet/vXVS_Implementation.json | 1741 - deployments/bsctestnet/vXVS_Proxy.json | 1468 - deployments/bsctestnet_addresses.json | 28 +- 110 files changed, 36456 insertions(+), 316886 deletions(-) delete mode 100644 deployments/bscmainnet/AAVE_Implementation.json delete mode 100644 deployments/bscmainnet/AAVE_Proxy.json delete mode 100644 deployments/bscmainnet/BETH_Implementation.json delete mode 100644 deployments/bscmainnet/BETH_Proxy.json delete mode 100644 deployments/bscmainnet/DOGE_Implementation.json delete mode 100644 deployments/bscmainnet/DOGE_Proxy.json delete mode 100644 deployments/bscmainnet/FIL_Implementation.json delete mode 100644 deployments/bscmainnet/FIL_Proxy.json delete mode 100644 deployments/bscmainnet/LUNA_Implementation.json delete mode 100644 deployments/bscmainnet/LUNA_Proxy.json delete mode 100644 deployments/bscmainnet/MATIC_Implementation.json delete mode 100644 deployments/bscmainnet/MATIC_Proxy.json delete mode 100644 deployments/bscmainnet/TRXOLD_Implementation.json delete mode 100644 deployments/bscmainnet/TRXOLD_Proxy.json delete mode 100644 deployments/bscmainnet/TUSDOLD_Implementation.json delete mode 100644 deployments/bscmainnet/TUSDOLD_Proxy.json delete mode 100644 deployments/bscmainnet/TUSD_Implementation.json delete mode 100644 deployments/bscmainnet/TUSD_Proxy.json delete mode 100644 deployments/bscmainnet/USDC_Implementation.json delete mode 100644 deployments/bscmainnet/USDC_Proxy.json delete mode 100644 deployments/bscmainnet/UST_Implementation.json delete mode 100644 deployments/bscmainnet/UST_Proxy.json delete mode 100644 deployments/bscmainnet/WBETH_Implementation.json delete mode 100644 deployments/bscmainnet/WBETH_Proxy.json delete mode 100644 deployments/bscmainnet/vAAVE_Implementation.json delete mode 100644 deployments/bscmainnet/vAAVE_Proxy.json delete mode 100644 deployments/bscmainnet/vADA_Implementation.json delete mode 100644 deployments/bscmainnet/vADA_Proxy.json delete mode 100644 deployments/bscmainnet/vBCH_Implementation.json delete mode 100644 deployments/bscmainnet/vBCH_Proxy.json delete mode 100644 deployments/bscmainnet/vBETH_Implementation.json delete mode 100644 deployments/bscmainnet/vBETH_Proxy.json delete mode 100644 deployments/bscmainnet/vBTC_Implementation.json delete mode 100644 deployments/bscmainnet/vBTC_Proxy.json delete mode 100644 deployments/bscmainnet/vBUSD_Implementation.json delete mode 100644 deployments/bscmainnet/vBUSD_Proxy.json delete mode 100644 deployments/bscmainnet/vCAKE_Implementation.json delete mode 100644 deployments/bscmainnet/vCAKE_Proxy.json delete mode 100644 deployments/bscmainnet/vDAI_Implementation.json delete mode 100644 deployments/bscmainnet/vDAI_Proxy.json delete mode 100644 deployments/bscmainnet/vDOGE_Implementation.json delete mode 100644 deployments/bscmainnet/vDOGE_Proxy.json delete mode 100644 deployments/bscmainnet/vDOT_Implementation.json delete mode 100644 deployments/bscmainnet/vDOT_Proxy.json delete mode 100644 deployments/bscmainnet/vETH_Implementation.json delete mode 100644 deployments/bscmainnet/vETH_Proxy.json delete mode 100644 deployments/bscmainnet/vFDUSD_Implementation.json delete mode 100644 deployments/bscmainnet/vFDUSD_Proxy.json delete mode 100644 deployments/bscmainnet/vFIL_Implementation.json delete mode 100644 deployments/bscmainnet/vFIL_Proxy.json delete mode 100644 deployments/bscmainnet/vLINK_Implementation.json delete mode 100644 deployments/bscmainnet/vLINK_Proxy.json delete mode 100644 deployments/bscmainnet/vLTC_Implementation.json delete mode 100644 deployments/bscmainnet/vLTC_Proxy.json delete mode 100644 deployments/bscmainnet/vLUNA_Implementation.json delete mode 100644 deployments/bscmainnet/vLUNA_Proxy.json delete mode 100644 deployments/bscmainnet/vMATIC_Implementation.json delete mode 100644 deployments/bscmainnet/vMATIC_Proxy.json delete mode 100644 deployments/bscmainnet/vSXP_Implementation.json delete mode 100644 deployments/bscmainnet/vSXP_Proxy.json delete mode 100644 deployments/bscmainnet/vTRXOLD_Implementation.json delete mode 100644 deployments/bscmainnet/vTRXOLD_Proxy.json delete mode 100644 deployments/bscmainnet/vTRX_Implementation.json delete mode 100644 deployments/bscmainnet/vTRX_Proxy.json delete mode 100644 deployments/bscmainnet/vTUSDOLD_Implementation.json delete mode 100644 deployments/bscmainnet/vTUSDOLD_Proxy.json delete mode 100644 deployments/bscmainnet/vTUSD_Implementation.json delete mode 100644 deployments/bscmainnet/vTUSD_Proxy.json delete mode 100644 deployments/bscmainnet/vUSDC_Implementation.json delete mode 100644 deployments/bscmainnet/vUSDC_Proxy.json delete mode 100644 deployments/bscmainnet/vUSDT_Implementation.json delete mode 100644 deployments/bscmainnet/vUSDT_Proxy.json delete mode 100644 deployments/bscmainnet/vUST_Implementation.json delete mode 100644 deployments/bscmainnet/vUST_Proxy.json delete mode 100644 deployments/bscmainnet/vWBETH_Implementation.json delete mode 100644 deployments/bscmainnet/vWBETH_Proxy.json delete mode 100644 deployments/bscmainnet/vXRP_Implementation.json delete mode 100644 deployments/bscmainnet/vXRP_Proxy.json delete mode 100644 deployments/bscmainnet/vXVS_Implementation.json delete mode 100644 deployments/bscmainnet/vXVS_Proxy.json delete mode 100644 deployments/bsctestnet/vBTC_Implementation.json delete mode 100644 deployments/bsctestnet/vBTC_Proxy.json delete mode 100644 deployments/bsctestnet/vBUSD_Implementation.json delete mode 100644 deployments/bsctestnet/vBUSD_Proxy.json delete mode 100644 deployments/bsctestnet/vETH_Implementation.json delete mode 100644 deployments/bsctestnet/vETH_Proxy.json delete mode 100644 deployments/bsctestnet/vFDUSD_Implementation.json delete mode 100644 deployments/bsctestnet/vFDUSD_Proxy.json delete mode 100644 deployments/bsctestnet/vLTC_Implementation.json delete mode 100644 deployments/bsctestnet/vLTC_Proxy.json delete mode 100644 deployments/bsctestnet/vSXP_Implementation.json delete mode 100644 deployments/bsctestnet/vSXP_Proxy.json delete mode 100644 deployments/bsctestnet/vTRX_Implementation.json delete mode 100644 deployments/bsctestnet/vTRX_Proxy.json delete mode 100644 deployments/bsctestnet/vTUSD_Implementation.json delete mode 100644 deployments/bsctestnet/vTUSD_Proxy.json delete mode 100644 deployments/bsctestnet/vUSDC_Implementation.json delete mode 100644 deployments/bsctestnet/vUSDC_Proxy.json delete mode 100644 deployments/bsctestnet/vUSDT_Implementation.json delete mode 100644 deployments/bsctestnet/vUSDT_Proxy.json delete mode 100644 deployments/bsctestnet/vWBETH_Implementation.json delete mode 100644 deployments/bsctestnet/vWBETH_Proxy.json delete mode 100644 deployments/bsctestnet/vXRP_Implementation.json delete mode 100644 deployments/bsctestnet/vXRP_Proxy.json delete mode 100644 deployments/bsctestnet/vXVS_Implementation.json delete mode 100644 deployments/bsctestnet/vXVS_Proxy.json diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index abff685ef..4031cdd20 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -554,11 +554,12 @@ } ] }, - "AAVE_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", + "ADA": { + "address": "0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47", "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -632,6 +633,52 @@ "type": "event" }, { + "constant": true, + "inputs": [], + "name": "_decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { "internalType": "address", @@ -652,10 +699,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -676,10 +725,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -695,10 +746,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -714,10 +767,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -727,10 +782,12 @@ "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -751,10 +808,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "getOwner", "outputs": [ @@ -764,10 +823,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -788,48 +849,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -845,43 +870,51 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -891,10 +924,12 @@ "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -904,10 +939,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -928,10 +965,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -957,10 +996,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -970,149 +1011,14 @@ ], "name": "transferOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" } ] }, - "AAVE_Proxy": { - "address": "0xfb6115445Bff7b52FeB98650C87f44907E58f802", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "ADA": { - "address": "0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47", + "BCH": { + "address": "0x8fF795a6F4D97E7887C79beA79aba5cc76444aDf", "abi": [ { "inputs": [], @@ -1574,12 +1480,142 @@ } ] }, - "BCH": { - "address": "0x8fF795a6F4D97E7887C79beA79aba5cc76444aDf", + "BETH": { + "address": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, { "inputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -1653,52 +1689,32 @@ "type": "event" }, { - "constant": true, "inputs": [], - "name": "_decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_name", + "name": "BETH_RECEIVER", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "_symbol", + "name": "WITHDRAW_OPERATOR", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", @@ -1719,12 +1735,10 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -1745,12 +1759,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", @@ -1766,12 +1778,10 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "uint256", @@ -1787,12 +1797,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -1802,12 +1810,10 @@ "type": "uint8" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -1828,12 +1834,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], "name": "getOwner", "outputs": [ @@ -1843,12 +1847,10 @@ "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -1869,12 +1871,48 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "mintable", + "type": "bool" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [ { "internalType": "uint256", @@ -1890,51 +1928,43 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "name", + "name": "mintable", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "owner", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -1944,12 +1974,10 @@ "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -1959,12 +1987,10 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -1985,12 +2011,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -2016,12 +2040,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -2031,75 +2053,25 @@ ], "name": "transferOwnership", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "BETH": { - "address": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "wBETH", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "admin", + "name": "wBETH_RECEIVER", "outputs": [ { "internalType": "address", @@ -2107,30 +2079,23 @@ "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", + "name": "withdrawBETH", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "nonpayable", @@ -2139,40 +2104,30 @@ { "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, + "name": "withdrawWBETH", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, + } + ] + }, + "BTCB": { + "address": "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c", + "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -2246,32 +2201,52 @@ "type": "event" }, { + "constant": true, "inputs": [], - "name": "BETH_RECEIVER", + "name": "_decimals", "outputs": [ { - "internalType": "address", + "internalType": "uint8", "name": "", - "type": "address" + "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "WITHDRAW_OPERATOR", + "name": "_name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { "internalType": "address", @@ -2292,10 +2267,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2316,10 +2293,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -2335,10 +2314,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -2354,10 +2335,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -2367,10 +2350,12 @@ "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2391,10 +2376,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "getOwner", "outputs": [ @@ -2404,10 +2391,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2428,48 +2417,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -2485,43 +2438,51 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -2531,10 +2492,12 @@ "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -2544,10 +2507,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2568,10 +2533,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2597,10 +2564,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2610,80 +2579,18 @@ ], "name": "transferOwnership", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "wBETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wBETH_RECEIVER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawBETH", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawWBETH", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "payable": false, "stateMutability": "nonpayable", "type": "function" } ] }, - "BETH_Implementation": { - "address": "0x5c1ab3184b5cdf456f086e769dd66f19660376e2", + "BUSD": { + "address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -2757,32 +2664,52 @@ "type": "event" }, { + "constant": true, "inputs": [], - "name": "BETH_RECEIVER", + "name": "_decimals", "outputs": [ { - "internalType": "address", + "internalType": "uint8", "name": "", - "type": "address" + "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "WITHDRAW_OPERATOR", + "name": "_name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { "internalType": "address", @@ -2803,10 +2730,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2827,10 +2756,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -2846,10 +2777,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -2865,10 +2798,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -2878,10 +2813,12 @@ "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2902,10 +2839,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "getOwner", "outputs": [ @@ -2915,10 +2854,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -2939,48 +2880,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -2996,43 +2901,51 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -3042,10 +2955,12 @@ "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -3055,10 +2970,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -3079,10 +2996,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -3108,10 +3027,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -3121,116 +3042,38 @@ ], "name": "transferOwnership", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "wBETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wBETH_RECEIVER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawBETH", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawWBETH", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "payable": false, "stateMutability": "nonpayable", "type": "function" } ] }, - "BETH_Proxy": { - "address": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", + "CAKE": { + "address": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", "abi": [ { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", + "name": "owner", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "previousAdmin", + "name": "spender", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "AdminChanged", + "name": "Approval", "type": "event" }, { @@ -3239,101 +3082,24 @@ { "indexed": true, "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", + "name": "delegator", "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "newImplementation", + "name": "fromDelegate", "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "newImplementation", + "name": "toDelegate", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "BTCB": { - "address": "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "DelegateChanged", + "type": "event" }, { "anonymous": false, @@ -3341,23 +3107,23 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "delegate", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "newBalance", "type": "uint256" } ], - "name": "Approval", + "name": "DelegateVotesChanged", "type": "event" }, { @@ -3405,52 +3171,32 @@ "type": "event" }, { - "constant": true, - "inputs": [], - "name": "_decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, "inputs": [], - "name": "_name", + "name": "DELEGATION_TYPEHASH", "outputs": [ { - "internalType": "string", + "internalType": "bytes32", "name": "", - "type": "string" + "type": "bytes32" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "_symbol", + "name": "DOMAIN_TYPEHASH", "outputs": [ { - "internalType": "string", + "internalType": "bytes32", "name": "", - "type": "string" + "type": "bytes32" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", @@ -3471,12 +3217,10 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -3497,12 +3241,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", @@ -3518,33 +3260,39 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "burn", + "name": "checkpoints", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -3554,12 +3302,10 @@ "type": "uint8" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -3580,12 +3326,99 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [], "name": "getOwner", "outputs": [ @@ -3595,12 +3428,34 @@ "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [ { "internalType": "address", @@ -3621,12 +3476,28 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [ { "internalType": "uint256", @@ -3642,12 +3513,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], "name": "name", "outputs": [ @@ -3657,12 +3526,48 @@ "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [], "name": "owner", "outputs": [ @@ -3672,21 +3577,17 @@ "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -3696,12 +3597,10 @@ "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -3711,12 +3610,10 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -3737,12 +3634,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -3768,12 +3663,10 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", @@ -3783,14 +3676,171 @@ ], "name": "transferOwnership", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" } ] }, - "BUSD": { - "address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", + "ComptrollerLens": { + "address": "0x50F618A2EAb0fB55e87682BbFd89e38acb2735cD", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract VToken", + "name": "vTokenModify", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "getHypotheticalAccountLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenBorrowed", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "actualRepayAmount", + "type": "uint256" + } + ], + "name": "liquidateCalculateSeizeTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "actualRepayAmount", + "type": "uint256" + } + ], + "name": "liquidateVAICalculateSeizeTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + }, + "DAI": { + "address": "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3", "abi": [ { "inputs": [], @@ -4252,82 +4302,168 @@ } ] }, - "CAKE": { - "address": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", + "DOGE": { + "address": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "logic", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "admin", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Approval", - "type": "event" + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "delegator", + "name": "previousAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "fromDelegate", + "name": "newAdmin", "type": "address" - }, + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "toDelegate", + "name": "implementation", "type": "address" } ], - "name": "DelegateChanged", + "name": "Upgraded", "type": "event" }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", - "name": "delegate", + "name": "owner", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "value", "type": "uint256" } ], - "name": "DelegateVotesChanged", + "name": "Approval", "type": "event" }, { @@ -4374,32 +4510,6 @@ "name": "Transfer", "type": "event" }, - { - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -4470,30 +4580,20 @@ { "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "checkpoints", + "name": "burn", "outputs": [ { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -4533,95 +4633,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getOwner", @@ -4635,30 +4646,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -4686,17 +4673,37 @@ { "inputs": [ { - "internalType": "address", - "name": "_to", - "type": "address" + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" }, { "internalType": "uint256", - "name": "_amount", + "name": "amount", "type": "uint256" + }, + { + "internalType": "bool", + "name": "mintable", + "type": "bool" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" } ], - "name": "mint", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -4722,50 +4729,12 @@ }, { "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", + "name": "mintable", "outputs": [ { - "internalType": "uint32", + "internalType": "bool", "name": "", - "type": "uint32" + "type": "bool" } ], "stateMutability": "view", @@ -4773,12 +4742,12 @@ }, { "inputs": [], - "name": "owner", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", @@ -4885,166 +4854,8 @@ } ] }, - "ComptrollerLens": { - "address": "0x50F618A2EAb0fB55e87682BbFd89e38acb2735cD", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "contract VToken", - "name": "vTokenModify", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "getHypotheticalAccountLiquidity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "internalType": "uint256", - "name": "actualRepayAmount", - "type": "uint256" - } - ], - "name": "liquidateCalculateSeizeTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "internalType": "uint256", - "name": "actualRepayAmount", - "type": "uint256" - } - ], - "name": "liquidateVAICalculateSeizeTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "DAI": { - "address": "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3", + "DOT": { + "address": "0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402", "abi": [ { "inputs": [], @@ -5506,25 +5317,15 @@ } ] }, - "DOGE": { - "address": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", + "DefaultProxyAdmin": { + "address": "0x6beb6D2695B67FEb73ad4f172E8E2975497187e4", "abi": [ { "inputs": [ { "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", + "name": "initialOwner", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], "stateMutability": "nonpayable", @@ -5534,41 +5335,48 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "previousAdmin", + "name": "previousOwner", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newAdmin", + "name": "newOwner", "type": "address" } ], - "name": "AdminChanged", + "name": "OwnershipTransferred", "type": "event" }, { - "anonymous": false, "inputs": [ { - "indexed": true, + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { "internalType": "address", - "name": "implementation", + "name": "newAdmin", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "admin", + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", "outputs": [ { "internalType": "address", @@ -5576,25 +5384,31 @@ "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "implementation", + "name": "owner", "outputs": [ { "internalType": "address", @@ -5602,6 +5416,13 @@ "type": "address" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -5609,20 +5430,43 @@ "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "newOwner", "type": "address" } ], - "name": "upgradeTo", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, { "internalType": "address", - "name": "newImplementation", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", "type": "address" }, { @@ -5631,17 +5475,19 @@ "type": "bytes" } ], - "name": "upgradeToAndCall", + "name": "upgradeAndCall", "outputs": [], "stateMutability": "payable", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, + } + ] + }, + "ETH": { + "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", + "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -5715,6 +5561,52 @@ "type": "event" }, { + "constant": true, + "inputs": [], + "name": "_decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { "internalType": "address", @@ -5735,10 +5627,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -5759,10 +5653,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -5778,10 +5674,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -5797,10 +5695,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -5810,10 +5710,12 @@ "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -5834,10 +5736,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "getOwner", "outputs": [ @@ -5847,10 +5751,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -5871,48 +5777,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -5928,43 +5798,51 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -5974,10 +5852,12 @@ "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -5987,10 +5867,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -6011,10 +5893,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -6040,10 +5924,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -6053,14 +5939,146 @@ ], "name": "transferOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" } ] }, - "DOGE_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", + "FIL": { + "address": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, { "inputs": [], "stateMutability": "nonpayable", @@ -6479,27 +6497,33 @@ } ] }, - "DOGE_Proxy": { - "address": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", + "InterestRateModelVBNB": { + "address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", "abi": [ { "inputs": [ { - "internalType": "address", - "name": "logic", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" }, { - "internalType": "address", - "name": "admin", - "type": "address" + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" } ], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -6508,200 +6532,138 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" } ], - "name": "Upgraded", + "name": "NewInterestParams", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { + "constant": true, "inputs": [], - "name": "admin", + "name": "baseRatePerBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" + "type": "uint256" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "blocksPerYear", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "DOT": { - "address": "0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402", - "abi": [ - { - "inputs": [], "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "reserves", "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, + "name": "getSupplyRate", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { "constant": true, "inputs": [], - "name": "_decimals", + "name": "isInterestRateModel", "outputs": [ { - "internalType": "uint8", + "internalType": "bool", "name": "", - "type": "uint8" + "type": "bool" } ], "payable": false, @@ -6711,12 +6673,12 @@ { "constant": true, "inputs": [], - "name": "_name", + "name": "jumpMultiplierPerBlock", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -6726,12 +6688,12 @@ { "constant": true, "inputs": [], - "name": "_symbol", + "name": "kink", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -6740,19 +6702,8 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", + "inputs": [], + "name": "multiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -6765,82 +6716,123 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", "type": "uint256" } ], - "name": "approve", + "name": "utilizationRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" - }, + } + ] + }, + "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": { + "address": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", + "abi": [ { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, { "internalType": "uint256", - "name": "", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", "type": "uint256" } ], "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", "type": "uint256" } ], - "name": "burn", + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "decimals", + "name": "blocksPerYear", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -6848,40 +6840,30 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "subtractedValue", + "name": "borrows", "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwner", + "name": "getBorrowRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -6889,61 +6871,50 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "addedValue", + "name": "borrows", "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, { "internalType": "uint256", - "name": "amount", + "name": "reserveFactorMantissa", "type": "uint256" } ], - "name": "mint", + "name": "getSupplyRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "name", + "name": "isInterestRateModel", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], "payable": false, @@ -6953,36 +6924,27 @@ { "constant": true, "inputs": [], - "name": "owner", + "name": "jumpMultiplierPerBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], - "name": "symbol", + "name": "kink", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -6992,7 +6954,7 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "multiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -7005,90 +6967,65 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "cash", "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" }, { - "internalType": "address", - "name": "recipient", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "reserves", "type": "uint256" } ], - "name": "transferFrom", + "name": "utilizationRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" } ] }, - "DefaultProxyAdmin": { - "address": "0x6beb6D2695B67FEb73ad4f172E8E2975497187e4", + "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": { + "address": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", "abi": [ { "inputs": [ { - "internalType": "address", - "name": "initialOwner", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" } ], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -7096,255 +7033,293 @@ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" } ], - "name": "OwnershipTransferred", + "name": "NewInterestParams", "type": "event" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ { - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" } ], - "name": "getProxyAdmin", + "name": "getBorrowRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" } ], - "name": "getProxyImplementation", + "name": "getSupplyRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "isInterestRateModel", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ { - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" } ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", "type": "function" } ] }, - "ETH": { - "address": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", + "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": { + "address": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", "abi": [ { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "jumpMultiplierPerYear", "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "kink_", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "jumpMultiplierPerBlock", "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "_decimals", - "outputs": [ + }, { - "internalType": "uint8", - "name": "", - "type": "uint8" + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewInterestParams", + "type": "event" }, { "constant": true, "inputs": [], - "name": "_name", + "name": "baseRatePerBlock", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -7354,12 +7329,12 @@ { "constant": true, "inputs": [], - "name": "_symbol", + "name": "blocksPerYear", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -7370,17 +7345,22 @@ "constant": true, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" } ], - "name": "allowance", + "name": "getBorrowRate", "outputs": [ { "internalType": "uint256", @@ -7393,41 +7373,60 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", "type": "uint256" } ], - "name": "approve", + "name": "getSupplyRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "balanceOf", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -7440,76 +7439,153 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ { "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "burn", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "decimals", + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "pure", "type": "function" + } + ] + }, + "JumpRateModel_base0bps_slope1250bps_jump25000bps_kink8000bps": { + "address": "0x1485A27D95D3d2878a6641055dD3a643F296CCf6", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "subtractedValue", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "getOwner", + "name": "blocksPerYear", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -7517,61 +7593,81 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "addedValue", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "getBorrowRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", "type": "uint256" } ], - "name": "mint", + "name": "getSupplyRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "name", + "name": "isInterestRateModel", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], "payable": false, @@ -7581,36 +7677,27 @@ { "constant": true, "inputs": [], - "name": "owner", + "name": "jumpMultiplierPerBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], - "name": "symbol", + "name": "kink", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -7620,7 +7707,7 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "multiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -7633,100 +7720,65 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "cash", "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" }, { - "internalType": "address", - "name": "recipient", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "reserves", "type": "uint256" } ], - "name": "transferFrom", + "name": "utilizationRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" } ] }, - "FIL": { - "address": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", + "JumpRateModel_base0bps_slope1250bps_jump50000bps_kink8000bps": { + "address": "0x9Fca5d66Cc0DF990080825051E825A8104a7ffA4", "abi": [ { "inputs": [ { - "internalType": "address", - "name": "logic", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" }, { - "internalType": "address", - "name": "admin", - "type": "address" + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" } ], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -7735,199 +7787,118 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" } ], - "name": "Upgraded", + "name": "NewInterestParams", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { + "constant": true, "inputs": [], - "name": "admin", + "name": "baseRatePerBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" + "type": "uint256" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "blocksPerYear", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "type": "uint256" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "reserves", "type": "uint256" } ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "name": "getBorrowRate", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "reserves", "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" }, { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" } ], - "name": "allowance", + "name": "getSupplyRate", "outputs": [ { "internalType": "uint256", @@ -7935,42 +7906,59 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "approve", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "balanceOf", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -7978,162 +7966,205 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", "type": "uint256" } ], - "name": "burn", + "name": "utilizationRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "pure", "type": "function" - }, + } + ] + }, + "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps": { + "address": "0xB105F9B511836cc7dF9F3dD0Ec4873766b5b6660", + "abi": [ { - "inputs": [], - "name": "decimals", - "outputs": [ + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "subtractedValue", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "blocksPerYear", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "addedValue", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "getBorrowRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "borrows", "type": "uint256" }, { - "internalType": "bool", - "name": "mintable", - "type": "bool" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "reserveFactorMantissa", "type": "uint256" } ], - "name": "mint", + "name": "getSupplyRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "isInterestRateModel", "outputs": [ { "internalType": "bool", @@ -8141,45 +8172,44 @@ "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "jumpMultiplierPerBlock", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", + "name": "kink", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "multiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -8187,168 +8217,123 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "cash", "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" }, { - "internalType": "address", - "name": "recipient", - "type": "address" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "reserves", "type": "uint256" } ], - "name": "transferFrom", + "name": "utilizationRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "pure", "type": "function" } ] }, - "FIL_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", + "JumpRateModel_base0bps_slope875bps_jump25000bps_kink8000bps": { + "address": "0xBe4609d972FdEBAa9DC870F4A957F40C301bEb1D", "abi": [ { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "jumpMultiplierPerYear", "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "kink_", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", "type": "uint256" } ], - "name": "Transfer", + "name": "NewInterestParams", "type": "event" }, { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "allowance", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", "outputs": [ { "internalType": "uint256", @@ -8356,42 +8341,66 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", "type": "uint256" } ], - "name": "approve", + "name": "getBorrowRate", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" } ], - "name": "balanceOf", + "name": "getSupplyRate", "outputs": [ { "internalType": "uint256", @@ -8399,18 +8408,14 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", + "constant": true, + "inputs": [], + "name": "isInterestRateModel", "outputs": [ { "internalType": "bool", @@ -8418,189 +8423,44 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "decimals", + "name": "jumpMultiplierPerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "kink", "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, { "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", "type": "uint256" } ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "multiplierPerBlock", "outputs": [ { "internalType": "uint256", @@ -8608,215 +8468,45 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "cash", "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "borrows", "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "FIL_Proxy": { - "address": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", + "name": "utilizationRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "type": "uint256" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "pure", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" } ] }, - "InterestRateModelVBNB": { - "address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", + "JumpRateModel_base0bps_slope875bps_jump50000bps_kink8000bps": { + "address": "0xE19C14171C2aC6CA63E008133e4B0D8571164BA3", "abi": [ { "inputs": [ @@ -9066,76 +8756,93 @@ } ] }, - "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": { - "address": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", + "LINK": { + "address": "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", "abi": [ { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" }, { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "kink_", + "name": "value", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Approval", + "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "kink", + "name": "value", "type": "uint256" } ], - "name": "NewInterestParams", + "name": "Transfer", "type": "event" }, { "constant": true, "inputs": [], - "name": "baseRatePerBlock", + "name": "_decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, @@ -9145,12 +8852,12 @@ { "constant": true, "inputs": [], - "name": "blocksPerYear", + "name": "_name", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -9159,29 +8866,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "getBorrowRate", + "inputs": [], + "name": "_symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -9192,27 +8883,17 @@ "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" }, { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "getSupplyRate", + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -9225,54 +8906,41 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "jumpMultiplierPerBlock", - "outputs": [ + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kink", + "name": "approve", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "multiplierPerBlock", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -9285,123 +8953,76 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", + "name": "amount", "type": "uint256" } ], - "name": "utilizationRate", + "name": "burn", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": { - "address": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", - "abi": [ + }, { - "inputs": [ - { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "kink", + "name": "subtractedValue", "type": "uint256" } ], - "name": "NewInterestParams", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", + "name": "decreaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "blocksPerYear", + "name": "getOwner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -9409,81 +9030,61 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "reserves", + "name": "addedValue", "type": "uint256" } ], - "name": "getBorrowRate", + "name": "increaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", + "name": "amount", "type": "uint256" } ], - "name": "getSupplyRate", + "name": "mint", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "isInterestRateModel", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], "payable": false, @@ -9493,27 +9094,36 @@ { "constant": true, "inputs": [], - "name": "jumpMultiplierPerBlock", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], - "name": "kink", + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -9523,7 +9133,7 @@ { "constant": true, "inputs": [], - "name": "multiplierPerBlock", + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -9536,108 +9146,166 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "internalType": "address", + "name": "recipient", + "type": "address" }, { "internalType": "uint256", - "name": "borrows", + "name": "amount", "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" }, { "internalType": "uint256", - "name": "reserves", + "name": "amount", "type": "uint256" } ], - "name": "utilizationRate", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" } ] }, - "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": { - "address": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", + "LTC": { + "address": "0x4338665CBB7B2485A8855A139b75D5e34AB0DB94", "abi": [ { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" }, { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "kink_", + "name": "value", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Approval", + "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "kink", + "name": "value", "type": "uint256" } ], - "name": "NewInterestParams", + "name": "Transfer", "type": "event" }, { "constant": true, "inputs": [], - "name": "baseRatePerBlock", + "name": "_decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, @@ -9647,12 +9315,12 @@ { "constant": true, "inputs": [], - "name": "blocksPerYear", + "name": "_name", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -9661,24 +9329,34 @@ }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "_symbol", + "outputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" }, { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "getBorrowRate", + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -9691,30 +9369,41 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "borrows", + "name": "amount", "type": "uint256" - }, + } + ], + "name": "approve", + "outputs": [ { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "getSupplyRate", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -9727,9 +9416,15 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", "outputs": [ { "internalType": "bool", @@ -9738,18 +9433,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "jumpMultiplierPerBlock", + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, @@ -9757,29 +9452,40 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "kink", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "subtractedValue", "type": "uint256" } ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "multiplierPerBlock", + "name": "getOwner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -9787,123 +9493,61 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "reserves", + "name": "addedValue", "type": "uint256" } ], - "name": "utilizationRate", + "name": "increaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "JumpRateModel_base0bps_slope1250bps_jump25000bps_kink8000bps": { - "address": "0x1485A27D95D3d2878a6641055dD3a643F296CCf6", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "kink", + "name": "amount", "type": "uint256" } ], - "name": "NewInterestParams", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", + "name": "mint", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "blocksPerYear", + "name": "name", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -9912,29 +9556,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "getBorrowRate", + "inputs": [], + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -9942,50 +9570,23 @@ "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" - } - ], - "name": "getSupplyRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "isInterestRateModel", + "name": "symbol", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], "payable": false, @@ -9995,7 +9596,7 @@ { "constant": true, "inputs": [], - "name": "jumpMultiplierPerBlock", + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -10008,95 +9609,95 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "kink", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", + "name": "transfer", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "internalType": "address", + "name": "sender", + "type": "address" }, { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "recipient", + "type": "address" }, { "internalType": "uint256", - "name": "reserves", + "name": "amount", "type": "uint256" } ], - "name": "utilizationRate", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "pure", + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" } ] }, - "JumpRateModel_base0bps_slope1250bps_jump50000bps_kink8000bps": { - "address": "0x9Fca5d66Cc0DF990080825051E825A8104a7ffA4", + "LUNA": { + "address": "0x156ab3346823B651294766e23e6Cf87254d68962", "abi": [ { "inputs": [ { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" + "internalType": "address", + "name": "beacon", + "type": "address" }, { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -10105,886 +9706,896 @@ "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" + "internalType": "address", + "name": "previousAdmin", + "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "kink", - "type": "uint256" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "NewInterestParams", + "name": "AdminChanged", "type": "event" }, { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "blocksPerYear", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" }, { - "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "internalType": "address", + "name": "implementation", + "type": "address" }, { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "bytes", + "name": "initData", + "type": "bytes" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" }, { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "getBorrowRate", - "outputs": [ + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "Liquidator": { + "address": "0x0870793286aada55d39ce7f82fb2766e8004cf43", + "abi": [ + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" }, { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "name": "getSupplyRate", - "outputs": [ + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" }, { - "constant": true, "inputs": [], - "name": "isInterestRateModel", + "name": "admin", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "admin_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "jumpMultiplierPerBlock", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "kink", + "name": "implementation", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "implementation_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "newImplementation", + "type": "address" }, { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "utilizationRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "payable": false, - "stateMutability": "pure", + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", "type": "function" - } - ] - }, - "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps": { - "address": "0xB105F9B511836cc7dF9F3dD0Ec4873766b5b6660", - "abi": [ + }, + { + "stateMutability": "payable", + "type": "receive" + }, { "inputs": [ { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" + "internalType": "address", + "name": "borrower", + "type": "address" }, { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, + "internalType": "address", + "name": "liquidator", + "type": "address" + } + ], + "name": "AllowlistEntryNotFound", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" + "internalType": "address", + "name": "borrower", + "type": "address" }, { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "AlreadyAllowed", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, + "internalType": "address", + "name": "borrower", + "type": "address" + } + ], + "name": "AlreadyRestricted", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "multiplierPerBlock", + "name": "errorCode", "type": "uint256" - }, + } + ], + "name": "LiquidationFailed", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" + "internalType": "address", + "name": "borrower", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "kink", - "type": "uint256" + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "name": "NewInterestParams", - "type": "event" + "name": "LiquidationNotAllowed", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "vToken", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "MarketNotListed", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "blocksPerYear", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "borrower", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NoRestrictionsExist", + "type": "error" }, { - "constant": true, "inputs": [ { "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", + "name": "maxTreasuryPercentMantissa", "type": "uint256" }, { "internalType": "uint256", - "name": "reserves", + "name": "treasuryPercentMantissa_", "type": "uint256" } ], - "name": "getBorrowRate", - "outputs": [ + "name": "TreasuryPercentTooHigh", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Unauthorized", + "type": "error" }, { - "constant": true, "inputs": [ { "internalType": "uint256", - "name": "cash", + "name": "vaiDebt", "type": "uint256" }, { "internalType": "uint256", - "name": "borrows", + "name": "minLiquidatableVAI", "type": "uint256" + } + ], + "name": "VAIDebtTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" }, { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" + "internalType": "address", + "name": "to", + "type": "address" }, { "internalType": "uint256", - "name": "reserveFactorMantissa", + "name": "amount", "type": "uint256" } ], - "name": "getSupplyRate", - "outputs": [ + "name": "VTokenTransferFailed", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "WrongTransactionAmount", + "type": "error" }, { - "constant": true, "inputs": [], - "name": "isInterestRateModel", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "ZeroAddressNotAllowed", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "jumpMultiplierPerBlock", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "AllowlistEntryAdded", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "kink", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "AllowlistEntryRemoved", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "ForceVAILiquidationPaused", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" } ], - "name": "utilizationRate", - "outputs": [ + "name": "ForceVAILiquidationResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "payable": false, - "stateMutability": "pure", - "type": "function" - } - ] - }, - "JumpRateModel_base0bps_slope875bps_jump25000bps_kink8000bps": { - "address": "0xBe4609d972FdEBAa9DC870F4A957F40C301bEb1D", - "abi": [ + "name": "Initialized", + "type": "event" + }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" }, { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "jumpMultiplierPerYear", + "name": "repayAmount", "type": "uint256" }, - { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" + "internalType": "address", + "name": "vTokenBorrowed", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "jumpMultiplierPerBlock", + "name": "seizeTokensForTreasury", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "kink", + "name": "seizeTokensForLiquidator", "type": "uint256" } ], - "name": "NewInterestParams", + "name": "LiquidateBorrowedTokens", "type": "event" }, { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "LiquidationRestricted", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "blocksPerYear", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "LiquidationRestrictionsDisabled", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" }, { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "reserves", + "name": "oldPercent", "type": "uint256" - } - ], - "name": "getBorrowRate", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "newPercent", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewLiquidationTreasuryPercent", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "cash", + "name": "oldMinLiquidatableVAI", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "borrows", + "name": "newMinLiquidatableVAI", "type": "uint256" - }, + } + ], + "name": "NewMinLiquidatableVAI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "reserves", + "name": "oldPendingRedeemChunkLength", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "reserveFactorMantissa", + "name": "newPendingRedeemChunkLength", "type": "uint256" } ], - "name": "getSupplyRate", - "outputs": [ + "name": "NewPendingRedeemChunkLength", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserves", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewProtocolShareReserve", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "jumpMultiplierPerBlock", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kink", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferStarted", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "reserves", + "name": "reducedAmount", "type": "uint256" } ], - "name": "utilizationRate", + "name": "ProtocolLiquidationIncentiveTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IAccessControlManagerV8", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "pure", + "stateMutability": "view", "type": "function" - } - ] - }, - "JumpRateModel_base0bps_slope875bps_jump50000bps_kink8000bps": { - "address": "0xE19C14171C2aC6CA63E008133e4B0D8571164BA3", - "abi": [ + }, { "inputs": [ { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "jumpMultiplierPerYear", - "type": "uint256" + "internalType": "address", + "name": "borrower", + "type": "address" }, { - "internalType": "uint256", - "name": "kink_", - "type": "uint256" + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "payable": false, + "name": "addToAllowlist", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "jumpMultiplierPerBlock", - "type": "uint256" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowedLiquidatorsByAccount", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "kink", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "NewInterestParams", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "constant": true, "inputs": [], - "name": "baseRatePerBlock", + "name": "comptroller", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IComptroller", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "blocksPerYear", + "name": "forceVAILiquidate", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "uint256", - "name": "cash", + "name": "treasuryPercentMantissa_", "type": "uint256" }, { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "accessControlManager_", + "type": "address" }, { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "getBorrowRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "protocolShareReserve_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "cash", - "type": "uint256" + "internalType": "address", + "name": "vToken", + "type": "address" }, { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" + "internalType": "address", + "name": "borrower", + "type": "address" }, { "internalType": "uint256", - "name": "reserves", + "name": "repayAmount", "type": "uint256" }, { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" + "internalType": "contract IVToken", + "name": "vTokenCollateral", + "type": "address" } ], - "name": "getSupplyRate", - "outputs": [ + "name": "liquidateBorrow", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", + "name": "liquidationRestricted", "outputs": [ { "internalType": "bool", @@ -10992,14 +10603,12 @@ "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "jumpMultiplierPerBlock", + "name": "minLiquidatableVAI", "outputs": [ { "internalType": "uint256", @@ -11007,211 +10616,207 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "kink", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "multiplierPerBlock", + "name": "pauseForceVAILiquidate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", + "name": "", "type": "uint256" - }, + } + ], + "name": "pendingRedeem", + "outputs": [ { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "utilizationRate", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolShareReserve", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "pure", + "stateMutability": "view", "type": "function" - } - ] - }, - "LINK": { - "address": "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", - "abi": [ + }, { "inputs": [], - "payable": false, + "name": "reduceReserves", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "borrower", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "liquidator", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "removeFromAllowlist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "borrower", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "restrictLiquidation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resumeForceVAILiquidate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "to", + "name": "accessControlManager_", "type": "address" - }, + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "minLiquidatableVAI_", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "setMinLiquidatableVAI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "constant": true, - "inputs": [], - "name": "_decimals", - "outputs": [ + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "internalType": "uint256", + "name": "newLength_", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "setPendingRedeemChunkLength", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "_name", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address payable", + "name": "protocolShareReserve_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "setProtocolShareReserve", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "_symbol", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "uint256", + "name": "newTreasuryPercentMantissa", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "setTreasuryPercent", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "newOwner", "type": "address" } ], - "name": "allowance", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryPercentMantissa", "outputs": [ { "internalType": "uint256", @@ -11219,287 +10824,263 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "borrower", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "payable": false, + "name": "unrestrictLiquidation", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "vBnb", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IVBNB", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", + "inputs": [], + "name": "vaiController", "outputs": [ { - "internalType": "bool", + "internalType": "contract IVAIController", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "decimals", + "name": "wBNB", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "_logic", "type": "address" }, { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "name": "decreaseAllowance", - "outputs": [ + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "Liquidator_Implementation": { + "address": "0xE26cE9b5FDd602225cCcC4cef7FAE596Dcf2A965", + "abi": [ + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "address payable", + "name": "vBnb_", + "type": "address" + }, + { + "internalType": "address", + "name": "wBNB_", + "type": "address" } ], - "payable": false, "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { - "constant": true, - "inputs": [], - "name": "getOwner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "borrower", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "AllowlistEntryNotFound", + "type": "error" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "borrower", "type": "address" }, { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "name": "increaseAllowance", - "outputs": [ + "name": "AlreadyAllowed", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "borrower", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "AlreadyRestricted", + "type": "error" }, { - "constant": false, "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "errorCode", "type": "uint256" } ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "LiquidationFailed", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "LiquidationNotAllowed", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "vToken", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "MarketNotListed", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "borrower", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NoRestrictionsExist", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "maxTreasuryPercentMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryPercentMantissa_", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "TreasuryPercentTooHigh", + "type": "error" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "sender", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "name": "transfer", - "outputs": [ + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "vaiDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minLiquidatableVAI", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "VAIDebtTooHigh", + "type": "error" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "sender", + "name": "from", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "to", "type": "address" }, { @@ -11508,43 +11089,29 @@ "type": "uint256" } ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "VTokenTransferFailed", + "type": "error" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "expected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "LTC": { - "address": "0x4338665CBB7B2485A8855A139b75D5e34AB0DB94", - "abi": [ + "name": "WrongTransactionAmount", + "type": "error" + }, { "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "ZeroAddressNotAllowed", + "type": "error" }, { "anonymous": false, @@ -11552,23 +11119,17 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "borrower", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "liquidator", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", + "name": "AllowlistEntryAdded", "type": "event" }, { @@ -11577,17 +11138,17 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "borrower", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "liquidator", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "AllowlistEntryRemoved", "type": "event" }, { @@ -11596,194 +11157,324 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "sender", "type": "address" - }, + } + ], + "name": "ForceVAILiquidationPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "to", + "name": "sender", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", + "name": "ForceVAILiquidationResumed", "type": "event" }, { - "constant": true, - "inputs": [], - "name": "_decimals", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint8", - "name": "", + "name": "version", "type": "uint8" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Initialized", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "owner", + "name": "liquidator", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "spender", + "name": "borrower", "type": "address" - } - ], - "name": "allowance", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "repayAmount", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "spender", + "name": "vTokenBorrowed", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vTokenCollateral", "type": "address" }, { + "indexed": false, + "internalType": "uint256", + "name": "seizeTokensForTreasury", + "type": "uint256" + }, + { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "seizeTokensForLiquidator", "type": "uint256" } ], - "name": "approve", - "outputs": [ + "name": "LiquidateBorrowedTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "LiquidationRestricted", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "account", + "name": "borrower", "type": "address" } ], - "name": "balanceOf", - "outputs": [ + "name": "LiquidationRestrictionsDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewAccessControlManager", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "oldPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPercent", "type": "uint256" } ], - "name": "burn", - "outputs": [ + "name": "NewLiquidationTreasuryPercent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "oldMinLiquidatableVAI", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMinLiquidatableVAI", + "type": "uint256" } ], - "payable": false, + "name": "NewMinLiquidatableVAI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldPendingRedeemChunkLength", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPendingRedeemChunkLength", + "type": "uint256" + } + ], + "name": "NewPendingRedeemChunkLength", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserves", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "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": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reducedAmount", + "type": "uint256" + } + ], + "name": "ProtocolLiquidationIncentiveTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "decimals", + "name": "accessControlManager", "outputs": [ { - "internalType": "uint8", + "internalType": "contract IAccessControlManagerV8", "name": "", - "type": "uint8" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "borrower", "type": "address" }, { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" + "internalType": "address", + "name": "liquidator", + "type": "address" } ], - "name": "decreaseAllowance", + "name": "addToAllowlist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "allowedLiquidatorsByAccount", "outputs": [ { "internalType": "bool", @@ -11791,61 +11482,95 @@ "type": "bool" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "getOwner", + "name": "comptroller", "outputs": [ { - "internalType": "address", + "internalType": "contract IComptroller", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, + "inputs": [], + "name": "forceVAILiquidate", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "treasuryPercentMantissa_", + "type": "uint256" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "protocolShareReserve_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", "type": "address" }, { "internalType": "uint256", - "name": "addedValue", + "name": "repayAmount", "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "contract IVToken", + "name": "vTokenCollateral", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "name": "liquidateBorrow", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "mint", + "name": "liquidationRestricted", "outputs": [ { "internalType": "bool", @@ -11853,27 +11578,23 @@ "type": "bool" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "name", + "name": "minLiquidatableVAI", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], "name": "owner", "outputs": [ @@ -11883,259 +11604,255 @@ "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [], - "name": "renounceOwnership", + "name": "pauseForceVAILiquidate", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "symbol", + "name": "pendingOwner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ + "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "pendingRedeem", + "outputs": [ { "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transfer", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolShareReserve", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reduceReserves", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "sender", + "name": "borrower", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "liquidator", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, + "name": "removeFromAllowlist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "borrower", "type": "address" } ], - "name": "transferOwnership", + "name": "restrictLiquidation", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "LUNA": { - "address": "0x156ab3346823B651294766e23e6Cf87254d68962", - "abi": [ + }, + { + "inputs": [], + "name": "resumeForceVAILiquidate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "beacon", + "name": "accessControlManager_", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], + "name": "setAccessControlManager", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "minLiquidatableVAI_", + "type": "uint256" } ], - "name": "AdminChanged", - "type": "event" + "name": "setMinLiquidatableVAI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "uint256", + "name": "newLength_", + "type": "uint256" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "setPendingRedeemChunkLength", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", + "internalType": "address payable", + "name": "protocolShareReserve_", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "name": "setProtocolShareReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "stateMutability": "payable", - "type": "receive" + "inputs": [ + { + "internalType": "uint256", + "name": "newTreasuryPercentMantissa", + "type": "uint256" + } + ], + "name": "setTreasuryPercent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "implementation", + "name": "newOwner", "type": "address" - }, - { - "internalType": "bytes", - "name": "initData", - "type": "bytes" } ], + "name": "transferOwnership", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" + }, + { + "inputs": [], + "name": "treasuryPercentMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "borrower", "type": "address" - }, + } + ], + "name": "unrestrictLiquidation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vBnb", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract IVBNB", + "name": "", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "vaiController", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", + "internalType": "contract IVAIController", + "name": "", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "wBNB", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "stateMutability": "view", + "type": "function" }, { "stateMutability": "payable", @@ -12143,23 +11860,28 @@ } ] }, - "LUNA_Implementation": { - "address": "0xb6f6d86a8f9879a9c87f643768d9efc38c1da6e7", + "Liquidator_Proxy": { + "address": "0x0870793286aada55d39ce7f82fb2766e8004cf43", "abi": [ { "inputs": [ { "internalType": "address", - "name": "implementation", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", "type": "address" }, { "internalType": "bytes", - "name": "initData", + "name": "_data", "type": "bytes" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "constructor" }, { @@ -12212,78 +11934,74 @@ "type": "fallback" }, { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "LUNA_Proxy": { - "address": "0x156ab3346823B651294766e23e6Cf87254d68962", - "abi": [ - { - "inputs": [ + "inputs": [], + "name": "admin", + "outputs": [ { "internalType": "address", - "name": "beacon", + "name": "admin_", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "newAdmin", "type": "address" - }, + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "implementation_", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "beacon", + "name": "newImplementation", "type": "address" } ], - "name": "BeaconUpgraded", - "type": "event" + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "newImplementation", "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Upgraded", - "type": "event" - }, - { + "name": "upgradeToAndCall", + "outputs": [], "stateMutability": "payable", - "type": "fallback" + "type": "function" }, { "stateMutability": "payable", @@ -12291,39 +12009,47 @@ } ] }, - "Liquidator": { - "address": "0x0870793286aada55d39ce7f82fb2766e8004cf43", + "MATIC": { + "address": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "logic", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "admin", "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "AdminChanged", - "type": "event" + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "beacon", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "BeaconUpgraded", + "name": "AdminChanged", "type": "event" }, { @@ -12349,7 +12075,7 @@ "outputs": [ { "internalType": "address", - "name": "admin_", + "name": "", "type": "address" } ], @@ -12375,7 +12101,7 @@ "outputs": [ { "internalType": "address", - "name": "implementation_", + "name": "", "type": "address" } ], @@ -12418,254 +12144,449 @@ "type": "receive" }, { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "owner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "spender", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "AllowlistEntryNotFound", - "type": "error" + "name": "Approval", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "previousOwner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "newOwner", "type": "address" } ], - "name": "AlreadyAllowed", - "type": "error" + "name": "OwnershipTransferred", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "from", "type": "address" - } - ], - "name": "AlreadyRestricted", - "type": "error" - }, - { - "inputs": [ + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "errorCode", + "name": "value", "type": "uint256" } ], - "name": "LiquidationFailed", - "type": "error" + "name": "Transfer", + "type": "event" }, { "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "owner", "type": "address" }, { "internalType": "address", - "name": "liquidator", + "name": "spender", "type": "address" } ], - "name": "LiquidationNotAllowed", - "type": "error" + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "MarketNotListed", - "type": "error" + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "account", "type": "address" } ], - "name": "NoRestrictionsExist", - "type": "error" + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "maxTreasuryPercentMantissa", + "name": "amount", "type": "uint256" - }, + } + ], + "name": "burn", + "outputs": [ { - "internalType": "uint256", - "name": "treasuryPercentMantissa_", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "TreasuryPercentTooHigh", - "type": "error" + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "sender", + "name": "spender", "type": "address" }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ { "internalType": "address", - "name": "calledContract", + "name": "", "type": "address" - }, - { - "internalType": "string", - "name": "methodSignature", - "type": "string" } ], - "name": "Unauthorized", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "vaiDebt", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "minLiquidatableVAI", + "name": "addedValue", "type": "uint256" } ], - "name": "VAIDebtTooHigh", - "type": "error" + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "string", + "name": "name", + "type": "string" }, { - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" }, { "internalType": "uint256", "name": "amount", "type": "uint256" + }, + { + "internalType": "bool", + "name": "mintable", + "type": "bool" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" } ], - "name": "VTokenTransferFailed", - "type": "error" + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "expected", + "name": "amount", "type": "uint256" - }, + } + ], + "name": "mint", + "outputs": [ { - "internalType": "uint256", - "name": "actual", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "WrongTransactionAmount", - "type": "error" + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" + "name": "mintable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "borrower", + "name": "recipient", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "liquidator", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "AllowlistEntryAdded", - "type": "event" + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "borrower", + "name": "sender", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "AllowlistEntryRemoved", - "type": "event" + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address" } ], - "name": "ForceVAILiquidationPaused", - "type": "event" - }, + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "MarketFacet": { + "address": "0x9622522d94BdEe9b1d7C2CD944e3ed74B33BD9Cf", + "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", - "name": "sender", + "name": "approver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegate", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "ForceVAILiquidationResumed", + "name": "DelegateUpdated", "type": "event" }, { @@ -12673,325 +12594,429 @@ "inputs": [ { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "Initialized", + "name": "DistributedVAIVaultVenus", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "repayAmount", + "name": "error", "type": "uint256" }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "seizeTokensForTreasury", + "name": "info", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "seizeTokensForLiquidator", + "name": "detail", "type": "uint256" } ], - "name": "LiquidateBorrowedTokens", + "name": "Failure", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, { "indexed": true, "internalType": "address", - "name": "borrower", + "name": "account", "type": "address" } ], - "name": "LiquidationRestricted", + "name": "MarketEntered", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, { "indexed": true, "internalType": "address", - "name": "borrower", + "name": "account", "type": "address" } ], - "name": "LiquidationRestrictionsDisabled", + "name": "MarketExited", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "MarketListed", "type": "event" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldPercent", - "type": "uint256" - }, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + } + ], + "name": "_supportMarket", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "newPercent", + "name": "", "type": "uint256" } ], - "name": "NewLiquidationTreasuryPercent", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldMinLiquidatableVAI", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "newMinLiquidatableVAI", + "name": "", "type": "uint256" } ], - "name": "NewMinLiquidatableVAI", - "type": "event" + "name": "accountAssets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldPendingRedeemChunkLength", - "type": "uint256" + "internalType": "address", + "name": "market", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "newPendingRedeemChunkLength", - "type": "uint256" + "internalType": "enum ComptrollerTypes.Action", + "name": "action", + "type": "uint8" } ], - "name": "NewPendingRedeemChunkLength", - "type": "event" + "name": "actionPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "oldProtocolShareReserve", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserves", + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allMarkets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", "type": "address" } ], - "name": "NewProtocolShareReserve", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferStarted", - "type": "event" + "name": "approvedDelegates", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "borrowCapGuardian", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "borrowCaps", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "sender", + "name": "account", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "token", + "internalType": "contract VToken", + "name": "vToken", "type": "address" - }, + } + ], + "name": "checkMembership", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "closeFactorMantissa", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "reducedAmount", + "name": "", "type": "uint256" } ], - "name": "ProtocolLiquidationIncentiveTransferred", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "comptrollerImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "comptrollerLens", "outputs": [ { - "internalType": "contract IAccessControlManagerV8", + "internalType": "contract ComptrollerLensInterface", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "borrower", - "type": "address" - }, + "internalType": "address[]", + "name": "vTokens", + "type": "address[]" + } + ], + "name": "enterMarkets", + "outputs": [ { - "internalType": "address", - "name": "liquidator", - "type": "address" + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" } ], - "name": "addToAllowlist", - "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenAddress", "type": "address" - }, + } + ], + "name": "exitMarket", + "outputs": [ { - "internalType": "address", + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getAllMarkets", + "outputs": [ + { + "internalType": "contract VToken[]", "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", "type": "address" } ], - "name": "allowedLiquidatorsByAccount", + "name": "getAssetsIn", "outputs": [ { - "internalType": "bool", + "internalType": "contract VToken[]", "name": "", - "type": "bool" + "type": "address[]" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "comptroller", + "name": "getXVSAddress", "outputs": [ { - "internalType": "contract IComptroller", + "internalType": "address", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "forceVAILiquidate", + "name": "isComptroller", "outputs": [ { "internalType": "bool", @@ -12999,82 +13024,128 @@ "type": "bool" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "pure", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "treasuryPercentMantissa_", - "type": "uint256" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isForcedLiquidationEnabled", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "", "type": "address" }, { "internalType": "address", - "name": "protocolShareReserve_", + "name": "", "type": "address" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "name": "isForcedLiquidationEnabledForUser", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "vTokenBorrowed", "type": "address" }, { "internalType": "address", - "name": "borrower", + "name": "vTokenCollateral", "type": "address" }, { "internalType": "uint256", - "name": "repayAmount", + "name": "actualRepayAmount", + "type": "uint256" + } + ], + "name": "liquidateCalculateSeizeTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", "type": "uint256" }, { - "internalType": "contract IVToken", - "name": "vTokenCollateral", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "liquidateBorrow", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenCollateral", "type": "address" + }, + { + "internalType": "uint256", + "name": "actualRepayAmount", + "type": "uint256" } ], - "name": "liquidationRestricted", + "name": "liquidateVAICalculateSeizeTokens", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "minLiquidatableVAI", + "name": "liquidationIncentiveMantissa", "outputs": [ { "internalType": "uint256", @@ -13082,12 +13153,14 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "liquidatorContract", "outputs": [ { "internalType": "address", @@ -13095,194 +13168,282 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "pauseForceVAILiquidate", - "outputs": [], - "stateMutability": "nonpayable", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "bool", + "name": "isListed", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "collateralFactorMantissa", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isVenus", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "maxAssets", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "minReleaseAmount", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "pendingRedeem", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "mintVAIGuardianPaused", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ + "constant": true, + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], + "name": "mintedVAIs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "reduceReserves", - "outputs": [], - "stateMutability": "nonpayable", + "name": "oracle", + "outputs": [ + { + "internalType": "contract PriceOracle", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "pauseGuardian", + "outputs": [ { "internalType": "address", - "name": "liquidator", + "name": "", "type": "address" } ], - "name": "removeFromAllowlist", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingComptrollerImplementation", + "outputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" } ], - "name": "restrictLiquidation", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "resumeForceVAILiquidate", - "outputs": [], - "stateMutability": "nonpayable", + "name": "prime", + "outputs": [ + { + "internalType": "contract IPrime", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "protocolPaused", + "outputs": [ { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "releaseStartBlock", + "outputs": [ { "internalType": "uint256", - "name": "minLiquidatableVAI_", + "name": "", "type": "uint256" } ], - "name": "setMinLiquidatableVAI", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "repayVAIGuardianPaused", + "outputs": [ { - "internalType": "uint256", - "name": "newLength_", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "setPendingRedeemChunkLength", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address payable", - "name": "protocolShareReserve_", + "internalType": "address", + "name": "", "type": "address" } ], - "name": "setProtocolShareReserve", - "outputs": [], - "stateMutability": "nonpayable", + "name": "supplyCaps", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryAddress", + "outputs": [ { - "internalType": "uint256", - "name": "newTreasuryPercentMantissa", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "setTreasuryPercent", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryGuardian", + "outputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "treasuryPercentMantissa", + "name": "treasuryPercent", "outputs": [ { "internalType": "uint256", @@ -13290,51 +13451,64 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "delegate", "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" } ], - "name": "unrestrictLiquidation", + "name": "updateDelegate", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "vBnb", + "name": "vaiController", "outputs": [ { - "internalType": "contract IVBNB", + "internalType": "contract VAIControllerInterface", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "vaiController", + "name": "vaiMintRate", "outputs": [ { - "internalType": "contract IVAIController", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "wBNB", + "name": "vaiVaultAddress", "outputs": [ { "internalType": "address", @@ -13342,260 +13516,229 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", + "name": "", "type": "address" - }, + } + ], + "name": "venusAccrued", + "outputs": [ { - "internalType": "bytes", - "name": "_data", - "type": "bytes" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "Liquidator_Implementation": { - "address": "0xE26cE9b5FDd602225cCcC4cef7FAE596Dcf2A965", - "abi": [ + "payable": false, + "stateMutability": "view", + "type": "function" + }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "address payable", - "name": "vBnb_", + "name": "", "type": "address" - }, + } + ], + "name": "venusBorrowSpeeds", + "outputs": [ { - "internalType": "address", - "name": "wBNB_", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" + } + ], + "name": "venusBorrowState", + "outputs": [ + { + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "address", - "name": "liquidator", - "type": "address" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "name": "AllowlistEntryNotFound", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" }, { "internalType": "address", - "name": "liquidator", - "type": "address" - } - ], - "name": "AlreadyAllowed", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "borrower", + "name": "", "type": "address" } ], - "name": "AlreadyRestricted", - "type": "error" - }, - { - "inputs": [ + "name": "venusBorrowerIndex", + "outputs": [ { "internalType": "uint256", - "name": "errorCode", + "name": "", "type": "uint256" } ], - "name": "LiquidationFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "venusInitialIndex", + "outputs": [ { - "internalType": "address", - "name": "liquidator", - "type": "address" + "internalType": "uint224", + "name": "", + "type": "uint224" } ], - "name": "LiquidationNotAllowed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "", "type": "address" - } - ], - "name": "MarketNotListed", - "type": "error" - }, - { - "inputs": [ + }, { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" } ], - "name": "NoRestrictionsExist", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxTreasuryPercentMantissa", - "type": "uint256" - }, + "name": "venusSupplierIndex", + "outputs": [ { "internalType": "uint256", - "name": "treasuryPercentMantissa_", + "name": "", "type": "uint256" } ], - "name": "TreasuryPercentTooHigh", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "calledContract", + "name": "", "type": "address" - }, - { - "internalType": "string", - "name": "methodSignature", - "type": "string" } ], - "name": "Unauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "vaiDebt", - "type": "uint256" - }, + "name": "venusSupplySpeeds", + "outputs": [ { "internalType": "uint256", - "name": "minLiquidatableVAI", + "name": "", "type": "uint256" } ], - "name": "VAIDebtTooHigh", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "from", + "name": "", "type": "address" - }, + } + ], + "name": "venusSupplyState", + "outputs": [ { - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "name": "VTokenTransferFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "expected", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "venusVAIVaultRate", + "outputs": [ { "internalType": "uint256", - "name": "actual", + "name": "", "type": "uint256" } ], - "name": "WrongTransactionAmount", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" - }, + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + }, + "MoveDebtDelegate": { + "address": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", + "abi": [ { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "borrower", + "name": "previousAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "liquidator", + "name": "newAdmin", "type": "address" } ], - "name": "AllowlistEntryAdded", + "name": "AdminChanged", "type": "event" }, { @@ -13604,17 +13747,11 @@ { "indexed": true, "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "liquidator", + "name": "beacon", "type": "address" } ], - "name": "AllowlistEntryRemoved", + "name": "BeaconUpgraded", "type": "event" }, { @@ -13623,207 +13760,207 @@ { "indexed": true, "internalType": "address", - "name": "sender", + "name": "implementation", "type": "address" } ], - "name": "ForceVAILiquidationPaused", + "name": "Upgraded", "type": "event" }, { - "anonymous": false, - "inputs": [ + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "sender", + "name": "admin_", "type": "address" } ], - "name": "ForceVAILiquidationResumed", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "Initialized", - "type": "event" + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, + "inputs": [], + "name": "implementation", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "borrower", + "name": "implementation_", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, "internalType": "address", - "name": "vTokenBorrowed", + "name": "newImplementation", "type": "address" - }, + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "vTokenCollateral", + "name": "newImplementation", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokensForTreasury", - "type": "uint256" - }, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "ApproveFailed", + "type": "error" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "seizeTokensForLiquidator", + "name": "errorCode", "type": "uint256" } ], - "name": "LiquidateBorrowedTokens", - "type": "event" + "name": "BorrowFailed", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "borrower", + "name": "vToken", "type": "address" } ], - "name": "LiquidationRestricted", - "type": "event" + "name": "BorrowNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ComptrollerMismatch", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" + "internalType": "uint256", + "name": "errorCode", + "type": "uint256" } ], - "name": "LiquidationRestrictionsDisabled", - "type": "event" + "name": "RepaymentFailed", + "type": "error" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldAccessControlManager", + "name": "vToken", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" + "internalType": "bool", + "name": "allowed", + "type": "bool" } ], - "name": "NewAccessControlManager", + "name": "BorrowAllowedSet", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldPercent", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "originalBorrower", + "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "newPercent", - "type": "uint256" - } - ], - "name": "NewLiquidationTreasuryPercent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "address", + "name": "vTokenRepaid", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "oldMinLiquidatableVAI", + "name": "repaidAmount", "type": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "newMinLiquidatableVAI", - "type": "uint256" - } - ], - "name": "NewMinLiquidatableVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "indexed": true, + "internalType": "address", + "name": "newBorrower", + "type": "address" + }, { - "indexed": false, - "internalType": "uint256", - "name": "oldPendingRedeemChunkLength", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "vTokenBorrowed", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "newPendingRedeemChunkLength", + "name": "borrowedAmount", "type": "uint256" } ], - "name": "NewPendingRedeemChunkLength", + "name": "DebtMoved", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserves", - "type": "address" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "NewProtocolShareReserve", + "name": "Initialized", "type": "event" }, { @@ -13867,12 +14004,6 @@ { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, { "indexed": true, "internalType": "address", @@ -13882,11 +14013,11 @@ { "indexed": false, "internalType": "uint256", - "name": "reducedAmount", + "name": "amount", "type": "uint256" } ], - "name": "ProtocolLiquidationIncentiveTransferred", + "name": "SweptTokens", "type": "event" }, { @@ -13897,55 +14028,75 @@ "type": "function" }, { - "inputs": [], - "name": "accessControlManager", - "outputs": [ + "inputs": [ { - "internalType": "contract IAccessControlManagerV8", + "internalType": "address", "name": "", "type": "address" } ], + "name": "borrowAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "originalBorrower", "type": "address" }, { - "internalType": "address", - "name": "liquidator", + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract IVBep20", + "name": "vTokenToBorrow", "type": "address" } ], - "name": "addToAllowlist", + "name": "moveDebt", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, + "inputs": [], + "name": "newBorrower", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "allowedLiquidatorsByAccount", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -13953,10 +14104,10 @@ }, { "inputs": [], - "name": "comptroller", + "name": "pendingOwner", "outputs": [ { - "internalType": "contract IComptroller", + "internalType": "address", "name": "", "type": "address" } @@ -13966,213 +14117,342 @@ }, { "inputs": [], - "name": "forceVAILiquidate", - "outputs": [ + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vTokenToBorrow", + "type": "address" + }, { "internalType": "bool", - "name": "", + "name": "allow", "type": "bool" } ], - "stateMutability": "view", + "name": "setBorrowAllowed", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "treasuryPercentMantissa_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "accessControlManager_", + "internalType": "contract IERC20Upgradeable", + "name": "token", "type": "address" - }, + } + ], + "name": "sweepTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "protocolShareReserve_", + "name": "newOwner", "type": "address" } ], - "name": "initialize", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "vTokenToRepay", + "outputs": [ + { + "internalType": "contract IVBep20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "_logic", "type": "address" }, { "internalType": "address", - "name": "borrower", + "name": "admin_", "type": "address" }, { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract IVToken", - "name": "vTokenCollateral", - "type": "address" + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "name": "liquidateBorrow", - "outputs": [], "stateMutability": "payable", - "type": "function" - }, + "type": "constructor" + } + ] + }, + "MoveDebtDelegate_Implementation": { + "address": "0x8439932C45e646FcC1009690417A65BF48f68Ce7", + "abi": [ { "inputs": [ { "internalType": "address", - "name": "", + "name": "newBorrower_", "type": "address" } ], - "name": "liquidationRestricted", - "outputs": [ + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ApproveFailed", + "type": "error" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "errorCode", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "BorrowFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "BorrowNotAllowed", + "type": "error" }, { "inputs": [], - "name": "minLiquidatableVAI", - "outputs": [ + "name": "ComptrollerMismatch", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "errorCode", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "RepaymentFailed", + "type": "error" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "RepaymentNotAllowed", + "type": "error" }, { "inputs": [], - "name": "pauseForceVAILiquidate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "ZeroAddressNotAllowed", + "type": "error" }, { - "inputs": [], - "name": "pendingOwner", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "vTokenToBorrow", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" } ], - "stateMutability": "view", - "type": "function" + "name": "BorrowAllowedSet", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "originalBorrower", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vTokenRepaid", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "repaidAmount", "type": "uint256" - } - ], - "name": "pendingRedeem", - "outputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "", + "name": "newBorrower", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "vTokenBorrowed", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowedAmount", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "DebtMoved", + "type": "event" }, { - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferStarted", + "type": "event" }, { - "inputs": [], - "name": "reduceReserves", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "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": "borrower", + "name": "vTokenToRepay", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "originalBorrower", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "allowed", + "type": "bool" } ], - "name": "removeFromAllowlist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "RepaymentAllowedSet", + "type": "event" }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SweptTokens", + "type": "event" }, { - "inputs": [ + "inputs": [], + "name": "ANY_USER", + "outputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" } ], - "name": "restrictLiquidation", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "resumeForceVAILiquidate", + "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -14181,63 +14461,98 @@ "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "", "type": "address" } ], - "name": "setAccessControlManager", + "name": "borrowAllowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract IVBep20", + "name": "vTokenToRepay", + "type": "address" + }, + { + "internalType": "address", + "name": "originalBorrower", + "type": "address" + }, { "internalType": "uint256", - "name": "minLiquidatableVAI_", + "name": "repayAmount", "type": "uint256" + }, + { + "internalType": "contract IVBep20", + "name": "vTokenToBorrow", + "type": "address" } ], - "name": "setMinLiquidatableVAI", + "name": "moveDebt", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "newBorrower", + "outputs": [ { - "internalType": "uint256", - "name": "newLength_", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "setPendingRedeemChunkLength", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { - "internalType": "address payable", - "name": "protocolShareReserve_", + "internalType": "address", + "name": "", "type": "address" } ], - "name": "setProtocolShareReserve", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - "internalType": "uint256", - "name": "newTreasuryPercentMantissa", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "setTreasuryPercent", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -14246,23 +14561,21 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryPercentMantissa", + "name": "repaymentAllowed", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", @@ -14272,62 +14585,73 @@ "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "vTokenToBorrow", "type": "address" + }, + { + "internalType": "bool", + "name": "allow", + "type": "bool" } ], - "name": "unrestrictLiquidation", + "name": "setBorrowAllowed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "vBnb", - "outputs": [ + "inputs": [ { - "internalType": "contract IVBNB", - "name": "", + "internalType": "address", + "name": "vTokenToRepay", + "type": "address" + }, + { + "internalType": "address", + "name": "originalBorrower", "type": "address" + }, + { + "internalType": "bool", + "name": "allow", + "type": "bool" } ], - "stateMutability": "view", + "name": "setRepaymentAllowed", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "vaiController", - "outputs": [ + "inputs": [ { - "internalType": "contract IVAIController", - "name": "", + "internalType": "contract IERC20Upgradeable", + "name": "token", "type": "address" } ], - "stateMutability": "view", + "name": "sweepTokens", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "wBNB", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" } ] }, - "Liquidator_Proxy": { - "address": "0x0870793286aada55d39ce7f82fb2766e8004cf43", + "MoveDebtDelegate_Proxy": { + "address": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", "abi": [ { "inputs": [ @@ -14475,25 +14799,15 @@ } ] }, - "MATIC": { - "address": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", + "PSMProxyAdmin": { + "address": "0x3f918bA9446552AB184C6Ffd2e2fcB1FA5ee1e59", "abi": [ { "inputs": [ { "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", + "name": "initialOwner", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], "stateMutability": "nonpayable", @@ -14503,41 +14817,48 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "previousAdmin", + "name": "previousOwner", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newAdmin", + "name": "newOwner", "type": "address" } ], - "name": "AdminChanged", + "name": "OwnershipTransferred", "type": "event" }, { - "anonymous": false, "inputs": [ { - "indexed": true, + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { "internalType": "address", - "name": "implementation", + "name": "newAdmin", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "admin", + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", "outputs": [ { "internalType": "address", @@ -14545,25 +14866,31 @@ "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "implementation", + "name": "owner", "outputs": [ { "internalType": "address", @@ -14571,6 +14898,13 @@ "type": "address" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -14578,11 +14912,11 @@ "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "newOwner", "type": "address" } ], - "name": "upgradeTo", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -14590,72 +14924,66 @@ { "inputs": [ { - "internalType": "address", - "name": "newImplementation", + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "upgradeToAndCall", + "name": "upgrade", "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "implementation", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Approval", - "type": "event" - }, + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] + }, + "PegStability_USDT": { + "address": "0xC138aa4E424D1A8539e8F38Af5a754a2B7c3Cc36", + "abi": [ { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "previousOwner", + "name": "previousAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "newOwner", + "name": "newAdmin", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "AdminChanged", "type": "event" }, { @@ -14664,68 +14992,38 @@ { "indexed": true, "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", + "name": "beacon", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", + "name": "BeaconUpgraded", "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "implementation", "type": "address" } ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "Upgraded", + "type": "event" }, { - "inputs": [ + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ { "internalType": "address", - "name": "spender", + "name": "admin_", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], "stateMutability": "nonpayable", @@ -14735,305 +15033,232 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "newAdmin", "type": "address" } ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "changeAdmin", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "decimals", + "name": "implementation", "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ { "internalType": "address", - "name": "spender", + "name": "implementation_", "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "getOwner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newImplementation", "type": "address" } ], - "stateMutability": "view", + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "newImplementation", "type": "address" }, { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AlreadyPaused", + "type": "error" + }, + { + "inputs": [], + "name": "AmountTooSmall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFee", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughVAI", + "type": "error" + }, + { + "inputs": [], + "name": "NotPaused", + "type": "error" + }, + { + "inputs": [], + "name": "Paused", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyDecimals", + "type": "error" }, { "inputs": [ { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" + "internalType": "address", + "name": "sender", + "type": "address" }, { "internalType": "address", - "name": "owner", + "name": "calledContract", "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Unauthorized", + "type": "error" }, { "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + "name": "VAIMintCapReached", + "type": "error" }, { "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "name": "VAIMintedUnderflow", + "type": "error" }, { "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "VAITransferFail", + "type": "error" }, { "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" + "name": "ZeroAddress", + "type": "error" }, { "inputs": [], - "name": "totalSupply", - "outputs": [ + "name": "ZeroAmount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "oldFeeIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newFeeIn", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "FeeInChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "recipient", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldFeeOut", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "newFeeOut", "type": "uint256" } ], - "name": "transfer", - "outputs": [ + "name": "FeeOutChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Initialized", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "sender", + "name": "oldAccessControlManager", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "recipient", + "name": "newAccessControlManager", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewAccessControlManager", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "oldOracle", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOracle", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "MATIC_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "OracleChanged", + "type": "event" }, { "anonymous": false, @@ -15041,23 +15266,17 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", + "name": "OwnershipTransferStarted", "type": "event" }, { @@ -15085,82 +15304,117 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "admin", "type": "address" - }, + } + ], + "name": "PSMPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "to", + "name": "admin", "type": "address" + } + ], + "name": "PSMResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "stableIn", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "vaiOut", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", "type": "uint256" } ], - "name": "Transfer", + "name": "StableForVAISwapped", "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "vaiBurnt", + "type": "uint256" }, { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ + "indexed": false, + "internalType": "uint256", + "name": "stableOut", + "type": "uint256" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "vaiFee", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "VAIForStableSwapped", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldCap", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "newCap", "type": "uint256" } ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "VAIMintCapChanged", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "account", + "name": "oldTreasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTreasury", "type": "address" } ], - "name": "balanceOf", + "name": "VenusTreasuryChanged", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_POINTS_DIVISOR", "outputs": [ { "internalType": "uint256", @@ -15172,67 +15426,70 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", + "inputs": [], + "name": "MANTISSA_ONE", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "decimals", + "name": "ONE_DOLLAR", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "STABLE_TOKEN_ADDRESS", + "outputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" } ], - "name": "decreaseAllowance", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VAI", "outputs": [ { - "internalType": "bool", + "internalType": "contract IVAI", "name": "", - "type": "bool" + "type": "address" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "getOwner", + "name": "accessControlManager", "outputs": [ { - "internalType": "address", + "internalType": "contract IAccessControlManagerV8", "name": "", "type": "address" } @@ -15241,60 +15498,62 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, + "inputs": [], + "name": "feeIn", + "outputs": [ { "internalType": "uint256", - "name": "addedValue", + "name": "", "type": "uint256" } ], - "name": "increaseAllowance", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeOut", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "string", - "name": "name", - "type": "string" + "internalType": "address", + "name": "accessControlManager_", + "type": "address" }, { - "internalType": "string", - "name": "symbol", - "type": "string" + "internalType": "address", + "name": "venusTreasury_", + "type": "address" }, { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" + "internalType": "address", + "name": "oracleAddress_", + "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "feeIn_", "type": "uint256" }, { - "internalType": "bool", - "name": "mintable", - "type": "bool" + "internalType": "uint256", + "name": "feeOut_", + "type": "uint256" }, { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "uint256", + "name": "vaiMintCap_", + "type": "uint256" } ], "name": "initialize", @@ -15303,14 +15562,8 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", + "inputs": [], + "name": "isPaused", "outputs": [ { "internalType": "bool", @@ -15318,17 +15571,17 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "mintable", + "name": "oracle", "outputs": [ { - "internalType": "bool", + "internalType": "contract ResilientOracleInterface", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -15336,12 +15589,12 @@ }, { "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", @@ -15349,27 +15602,33 @@ }, { "inputs": [], - "name": "renounceOwnership", + "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "symbol", + "name": "pendingOwner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "totalSupply", + "inputs": [ + { + "internalType": "uint256", + "name": "stableTknAmount", + "type": "uint256" + } + ], + "name": "previewSwapStableForVAI", "outputs": [ { "internalType": "uint256", @@ -15382,25 +15641,34 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "stableTknAmount", "type": "uint256" } ], - "name": "transfer", + "name": "previewSwapVAIForStable", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resume", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -15408,28 +15676,38 @@ "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", + "name": "accessControlManager_", "type": "address" - }, + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "feeIn_", "type": "uint256" } ], - "name": "transferFrom", - "outputs": [ + "name": "setFeeIn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "feeOut_", + "type": "uint256" } ], + "name": "setFeeOut", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -15437,85 +15715,84 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "oracleAddress_", "type": "address" } ], - "name": "transferOwnership", + "name": "setOracle", "outputs": [], "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "MATIC_Proxy": { - "address": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", - "abi": [ + }, { "inputs": [ { - "internalType": "address", - "name": "logic", - "type": "address" - }, + "internalType": "uint256", + "name": "vaiMintCap_", + "type": "uint256" + } + ], + "name": "setVAIMintCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "admin", + "name": "venusTreasury_", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], + "name": "setVenusTreasury", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "receiver", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "stableTknAmount", + "type": "uint256" } ], - "name": "AdminChanged", - "type": "event" + "name": "swapStableForVAI", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "receiver", "type": "address" + }, + { + "internalType": "uint256", + "name": "stableTknAmount", + "type": "uint256" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", + "name": "swapVAIForStable", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -15525,92 +15802,176 @@ "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "newOwner", "type": "address" } ], - "name": "changeAdmin", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "implementation", + "name": "vaiMintCap", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "vaiMinted", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "venusTreasury", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", "type": "address" }, { "internalType": "bytes", - "name": "data", + "name": "_data", "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { "stateMutability": "payable", - "type": "receive" + "type": "constructor" } ] }, - "MarketFacet": { - "address": "0x9622522d94BdEe9b1d7C2CD944e3ed74B33BD9Cf", + "PegStability_USDT_Implementation": { + "address": "0x9664568e5131e85f67d87fCD55B249F5D25fa43e", "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "approver", + "name": "stableTokenAddress_", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "delegate", + "name": "vaiAddress_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyPaused", + "type": "error" + }, + { + "inputs": [], + "name": "AmountTooSmall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFee", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughVAI", + "type": "error" + }, + { + "inputs": [], + "name": "NotPaused", + "type": "error" + }, + { + "inputs": [], + "name": "Paused", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyDecimals", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", "type": "address" }, { - "indexed": false, - "internalType": "bool", - "name": "approved", - "type": "bool" + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "name": "DelegateUpdated", - "type": "event" + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "VAIMintCapReached", + "type": "error" + }, + { + "inputs": [], + "name": "VAIMintedUnderflow", + "type": "error" + }, + { + "inputs": [], + "name": "VAITransferFail", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAmount", + "type": "error" }, { "anonymous": false, @@ -15618,11 +15979,17 @@ { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "oldFeeIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newFeeIn", "type": "uint256" } ], - "name": "DistributedVAIVaultVenus", + "name": "FeeInChanged", "type": "event" }, { @@ -15631,23 +15998,49 @@ { "indexed": false, "internalType": "uint256", - "name": "error", + "name": "oldFeeOut", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "info", + "name": "newFeeOut", "type": "uint256" + } + ], + "name": "FeeOutChanged", + "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": "uint256", - "name": "detail", - "type": "uint256" + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" } ], - "name": "Failure", + "name": "NewAccessControlManager", "type": "event" }, { @@ -15655,18 +16048,18 @@ "inputs": [ { "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "oldOracle", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "newOracle", "type": "address" } ], - "name": "MarketEntered", + "name": "OracleChanged", "type": "event" }, { @@ -15674,18 +16067,18 @@ "inputs": [ { "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "newOwner", "type": "address" } ], - "name": "MarketExited", + "name": "OwnershipTransferStarted", "type": "event" }, { @@ -15693,174 +16086,235 @@ "inputs": [ { "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "name": "MarketListed", + "name": "OwnershipTransferred", "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "contract VToken", - "name": "vToken", + "indexed": true, + "internalType": "address", + "name": "admin", "type": "address" } ], - "name": "_supportMarket", - "outputs": [ + "name": "PSMPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "PSMResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "stableIn", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "vaiOut", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "fee", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "StableForVAISwapped", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "vaiBurnt", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "stableOut", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "vaiFee", "type": "uint256" } ], - "name": "accountAssets", - "outputs": [ + "name": "VAIForStableSwapped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "contract VToken", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldCap", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCap", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "VAIMintCapChanged", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "market", + "name": "oldTreasury", "type": "address" }, { - "internalType": "enum ComptrollerTypes.Action", - "name": "action", - "type": "uint8" + "indexed": true, + "internalType": "address", + "name": "newTreasury", + "type": "address" } ], - "name": "actionPaused", + "name": "VenusTreasuryChanged", + "type": "event" + }, + { + "inputs": [], + "name": "BASIS_POINTS_DIVISOR", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "admin", + "name": "MANTISSA_ONE", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ + "inputs": [], + "name": "ONE_DOLLAR", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "allMarkets", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STABLE_TOKEN_ADDRESS", "outputs": [ { - "internalType": "contract VToken", + "internalType": "address", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "approvedDelegates", + "inputs": [], + "name": "VAI", "outputs": [ { - "internalType": "bool", + "internalType": "contract IVAI", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "borrowCapGuardian", + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", "outputs": [ { - "internalType": "address", + "internalType": "contract IAccessControlManagerV8", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ + "inputs": [], + "name": "feeIn", + "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "name": "borrowCaps", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeOut", "outputs": [ { "internalType": "uint256", @@ -15868,25 +16322,50 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "accessControlManager_", "type": "address" }, { - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "venusTreasury_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracleAddress_", "type": "address" + }, + { + "internalType": "uint256", + "name": "feeIn_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeOut_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vaiMintCap_", + "type": "uint256" } ], - "name": "checkMembership", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isPaused", "outputs": [ { "internalType": "bool", @@ -15894,29 +16373,25 @@ "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "closeFactorMantissa", + "name": "oracle", "outputs": [ { - "internalType": "uint256", + "internalType": "contract ResilientOracleInterface", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "comptrollerImplementation", + "name": "owner", "outputs": [ { "internalType": "address", @@ -15924,56 +16399,57 @@ "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "comptrollerLens", + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", "outputs": [ { - "internalType": "contract ComptrollerLensInterface", + "internalType": "address", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address[]", - "name": "vTokens", - "type": "address[]" + "internalType": "uint256", + "name": "stableTknAmount", + "type": "uint256" } ], - "name": "enterMarkets", + "name": "previewSwapStableForVAI", "outputs": [ { - "internalType": "uint256[]", + "internalType": "uint256", "name": "", - "type": "uint256[]" + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" + "internalType": "uint256", + "name": "stableTknAmount", + "type": "uint256" } ], - "name": "exitMarket", + "name": "previewSwapVAIForStable", "outputs": [ { "internalType": "uint256", @@ -15981,194 +16457,178 @@ "type": "uint256" } ], - "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "getAllMarkets", - "outputs": [ + "name": "resume", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "contract VToken[]", - "name": "", - "type": "address[]" + "internalType": "address", + "name": "accessControlManager_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "feeIn_", + "type": "uint256" } ], - "name": "getAssetsIn", - "outputs": [ + "name": "setFeeIn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "contract VToken[]", - "name": "", - "type": "address[]" + "internalType": "uint256", + "name": "feeOut_", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "setFeeOut", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "getXVSAddress", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "oracleAddress_", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "isComptroller", - "outputs": [ + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "vaiMintCap_", + "type": "uint256" } ], - "payable": false, - "stateMutability": "pure", + "name": "setVAIMintCap", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "venusTreasury_", "type": "address" } ], - "name": "isForcedLiquidationEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", + "name": "setVenusTreasury", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "receiver", "type": "address" }, { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "stableTknAmount", + "type": "uint256" } ], - "name": "isForcedLiquidationEnabledForUser", + "name": "swapStableForVAI", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenCollateral", + "name": "receiver", "type": "address" }, { "internalType": "uint256", - "name": "actualRepayAmount", + "name": "stableTknAmount", "type": "uint256" } ], - "name": "liquidateCalculateSeizeTokens", + "name": "swapVAIForStable", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "vTokenCollateral", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "actualRepayAmount", - "type": "uint256" } ], - "name": "liquidateVAICalculateSeizeTokens", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vaiMintCap", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "liquidationIncentiveMantissa", + "name": "vaiMinted", "outputs": [ { "internalType": "uint256", @@ -16176,14 +16636,12 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "liquidatorContract", + "name": "venusTreasury", "outputs": [ { "internalType": "address", @@ -16191,161 +16649,365 @@ "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "PegStability_USDT_Proxy": { + "address": "0xC138aa4E424D1A8539e8F38Af5a754a2B7c3Cc36", + "abi": [ { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "name": "markets", - "outputs": [ + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "isListed", - "type": "bool" + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" }, { - "internalType": "uint256", - "name": "collateralFactorMantissa", - "type": "uint256" - }, + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "isVenus", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" }, { - "constant": true, "inputs": [], - "name": "maxAssets", + "name": "admin", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "admin_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "minReleaseAmount", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "mintVAIGuardianPaused", + "name": "implementation", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "implementation_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "newImplementation", "type": "address" } ], - "name": "mintedVAIs", - "outputs": [ + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "payable": false, - "stateMutability": "view", + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "oracle", - "outputs": [ + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "PolicyFacet": { + "address": "0x95CC56f266BC95Ae2486cb0cFeda1054B4aA4086", + "abi": [ + { + "anonymous": false, + "inputs": [ { - "internalType": "contract PriceOracle", - "name": "", + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "venusDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "venusBorrowIndex", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "DistributedBorrowerVenus", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "pauseGuardian", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "supplier", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "venusDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "venusSupplyIndex", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "DistributedSupplierVenus", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DistributedVAIVaultVenus", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "account", + "type": "address" + } + ], + "name": "MarketEntered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "VenusBorrowSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "VenusSupplySpeedUpdated", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "supplySpeeds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "borrowSpeeds", + "type": "uint256[]" } ], + "name": "_setVenusSpeeds", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "pendingComptrollerImplementation", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accountAssets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", + "type": "address" } ], "payable": false, @@ -16354,13 +17016,24 @@ }, { "constant": true, - "inputs": [], - "name": "prime", + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "enum ComptrollerTypes.Action", + "name": "action", + "type": "uint8" + } + ], + "name": "actionPaused", "outputs": [ { - "internalType": "contract IPrime", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -16370,12 +17043,12 @@ { "constant": true, "inputs": [], - "name": "protocolPaused", + "name": "admin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -16384,23 +17057,40 @@ }, { "constant": true, - "inputs": [], - "name": "releaseStartBlock", - "outputs": [ + "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], + "name": "allMarkets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", + "type": "address" + } + ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "repayVAIGuardianPaused", + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "approvedDelegates", "outputs": [ { "internalType": "bool", @@ -16413,15 +17103,25 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" } ], - "name": "supplyCaps", + "name": "borrowAllowed", "outputs": [ { "internalType": "uint256", @@ -16430,13 +17130,13 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "treasuryAddress", + "name": "borrowCapGuardian", "outputs": [ { "internalType": "address", @@ -16450,23 +17150,14 @@ }, { "constant": true, - "inputs": [], - "name": "treasuryGuardian", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryPercent", + "name": "borrowCaps", "outputs": [ { "internalType": "uint256", @@ -16483,16 +17174,21 @@ "inputs": [ { "internalType": "address", - "name": "delegate", + "name": "vToken", "type": "address" }, { - "internalType": "bool", - "name": "approved", - "type": "bool" + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" } ], - "name": "updateDelegate", + "name": "borrowVerify", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -16501,12 +17197,12 @@ { "constant": true, "inputs": [], - "name": "vaiController", + "name": "closeFactorMantissa", "outputs": [ { - "internalType": "contract VAIControllerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -16516,12 +17212,12 @@ { "constant": true, "inputs": [], - "name": "vaiMintRate", + "name": "comptrollerImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -16531,10 +17227,10 @@ { "constant": true, "inputs": [], - "name": "vaiVaultAddress", + "name": "comptrollerLens", "outputs": [ { - "internalType": "address", + "internalType": "contract ComptrollerLensInterface", "name": "", "type": "address" } @@ -16548,12 +17244,22 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "venusAccrued", + "name": "getAccountLiquidity", "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", @@ -16569,16 +17275,56 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" + }, + { + "internalType": "address", + "name": "vTokenModify", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" } ], - "name": "venusBorrowSpeeds", + "name": "getHypotheticalAccountLiquidity", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getXVSAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" } ], "payable": false, @@ -16594,17 +17340,12 @@ "type": "address" } ], - "name": "venusBorrowState", + "name": "isForcedLiquidationEnabled", "outputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "bool", + "name": "", + "type": "bool" } ], "payable": false, @@ -16625,12 +17366,12 @@ "type": "address" } ], - "name": "venusBorrowerIndex", + "name": "isForcedLiquidationEnabledForUser", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -16639,13 +17380,39 @@ }, { "constant": true, - "inputs": [], - "name": "venusInitialIndex", + "inputs": [ + { + "internalType": "address", + "name": "vTokenBorrowed", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "liquidateBorrowAllowed", "outputs": [ { - "internalType": "uint224", + "internalType": "uint256", "name": "", - "type": "uint224" + "type": "uint256" } ], "payable": false, @@ -16653,20 +17420,49 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenBorrowed", "type": "address" }, { "internalType": "address", - "name": "", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", "type": "address" + }, + { + "internalType": "uint256", + "name": "actualRepayAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" } ], - "name": "venusSupplierIndex", + "name": "liquidateBorrowVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "liquidationIncentiveMantissa", "outputs": [ { "internalType": "uint256", @@ -16680,21 +17476,15 @@ }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "liquidatorContract", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "venusSupplySpeeds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], "payable": false, "stateMutability": "view", "type": "function" @@ -16708,17 +17498,22 @@ "type": "address" } ], - "name": "venusSupplyState", + "name": "markets", "outputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" + "internalType": "bool", + "name": "isListed", + "type": "bool" }, { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "uint256", + "name": "collateralFactorMantissa", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isVenus", + "type": "bool" } ], "payable": false, @@ -16728,7 +17523,7 @@ { "constant": true, "inputs": [], - "name": "venusVAIVaultRate", + "name": "maxAssets", "outputs": [ { "internalType": "uint256", @@ -16739,550 +17534,470 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "MoveDebtDelegate": { - "address": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", - "abi": [ + }, { - "anonymous": false, + "constant": true, + "inputs": [], + "name": "minReleaseAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "vToken", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "minter", "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" } ], - "name": "AdminChanged", - "type": "event" + "name": "mintAllowed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "mintVAIGuardianPaused", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "BeaconUpgraded", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "vToken", "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ + }, { "internalType": "address", - "name": "admin_", + "name": "minter", "type": "address" + }, + { + "internalType": "uint256", + "name": "actualMintAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" } ], + "name": "mintVerify", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "name": "mintedVAIs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "oracle", "outputs": [ { - "internalType": "address", - "name": "implementation_", + "internalType": "contract PriceOracle", + "name": "", "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pauseGuardian", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - }, - { + "constant": true, "inputs": [], - "name": "ApproveFailed", - "type": "error" - }, - { - "inputs": [ + "name": "pendingComptrollerImplementation", + "outputs": [ { - "internalType": "uint256", - "name": "errorCode", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "BorrowFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "prime", + "outputs": [ { - "internalType": "address", - "name": "vToken", + "internalType": "contract IPrime", + "name": "", "type": "address" } ], - "name": "BorrowNotAllowed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "ComptrollerMismatch", - "type": "error" - }, - { - "inputs": [ + "name": "protocolPaused", + "outputs": [ { - "internalType": "uint256", - "name": "errorCode", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "RepaymentFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", "name": "vToken", "type": "address" }, { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" } ], - "name": "BorrowAllowedSet", - "type": "event" + "name": "redeemAllowed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "originalBorrower", + "name": "vToken", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "vTokenRepaid", + "name": "redeemer", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "repaidAmount", + "name": "redeemAmount", "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "newBorrower", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, - { - "indexed": false, "internalType": "uint256", - "name": "borrowedAmount", + "name": "redeemTokens", "type": "uint256" } ], - "name": "DebtMoved", - "type": "event" + "name": "redeemVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "releaseStartBlock", + "outputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "vToken", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "payer", "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "borrower", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, + "name": "repayBorrowAllowed", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "SweptTokens", - "type": "event" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "vToken", "type": "address" - } - ], - "name": "borrowAllowed", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "internalType": "address", + "name": "payer", + "type": "address" + }, { "internalType": "address", - "name": "originalBorrower", + "name": "borrower", "type": "address" }, { "internalType": "uint256", - "name": "repayAmount", + "name": "actualRepayAmount", "type": "uint256" }, { - "internalType": "contract IVBep20", - "name": "vTokenToBorrow", - "type": "address" + "internalType": "uint256", + "name": "borrowerIndex", + "type": "uint256" } ], - "name": "moveDebt", + "name": "repayBorrowVerify", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "newBorrower", + "name": "repayVAIGuardianPaused", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenCollateral", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ + }, { "internalType": "address", - "name": "", + "name": "vTokenBorrowed", "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "address", - "name": "vTokenToBorrow", + "name": "liquidator", "type": "address" }, - { - "internalType": "bool", - "name": "allow", - "type": "bool" - } - ], - "name": "setBorrowAllowed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" - } - ], - "name": "sweepTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "borrower", "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "vTokenToRepay", + "name": "seizeAllowed", "outputs": [ { - "internalType": "contract IVBep20", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "_logic", + "name": "vTokenCollateral", "type": "address" }, { "internalType": "address", - "name": "admin_", + "name": "vTokenBorrowed", "type": "address" }, { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "MoveDebtDelegate_Implementation": { - "address": "0x8439932C45e646FcC1009690417A65BF48f68Ce7", - "abi": [ - { - "inputs": [ + "internalType": "address", + "name": "liquidator", + "type": "address" + }, { "internalType": "address", - "name": "newBorrower_", + "name": "borrower", "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "ApproveFailed", - "type": "error" - }, - { - "inputs": [ + }, { "internalType": "uint256", - "name": "errorCode", + "name": "seizeTokens", "type": "uint256" } ], - "name": "BorrowFailed", - "type": "error" + "name": "seizeVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "", "type": "address" } ], - "name": "BorrowNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "ComptrollerMismatch", - "type": "error" - }, - { - "inputs": [ + "name": "supplyCaps", + "outputs": [ { "internalType": "uint256", - "name": "errorCode", + "name": "", "type": "uint256" } ], - "name": "RepaymentFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -17291,178 +18006,141 @@ }, { "internalType": "address", - "name": "borrower", + "name": "src", "type": "address" - } - ], - "name": "RepaymentNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": true, "internalType": "address", - "name": "vTokenToBorrow", + "name": "dst", "type": "address" }, { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" + "internalType": "uint256", + "name": "transferTokens", + "type": "uint256" } ], - "name": "BorrowAllowedSet", - "type": "event" + "name": "transferAllowed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "originalBorrower", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "vTokenRepaid", + "name": "vToken", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "repaidAmount", - "type": "uint256" - }, - { - "indexed": false, "internalType": "address", - "name": "newBorrower", + "name": "src", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "vTokenBorrowed", + "name": "dst", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "borrowedAmount", + "name": "transferTokens", "type": "uint256" } ], - "name": "DebtMoved", - "type": "event" + "name": "transferVerify", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryAddress", + "outputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "Initialized", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "treasuryGuardian", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferStarted", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "treasuryPercent", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "OwnershipTransferred", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "vTokenToRepay", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "vaiController", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "originalBorrower", + "internalType": "contract VAIControllerInterface", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "allowed", - "type": "bool" } ], - "name": "RepaymentAllowedSet", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "vaiMintRate", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "SweptTokens", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "ANY_USER", + "name": "vaiVaultAddress", "outputs": [ { "internalType": "address", @@ -17470,17 +18148,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [ { "internalType": "address", @@ -17488,99 +18161,108 @@ "type": "address" } ], - "name": "borrowAllowed", + "name": "venusAccrued", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [ - { - "internalType": "contract IVBep20", - "name": "vTokenToRepay", - "type": "address" - }, { "internalType": "address", - "name": "originalBorrower", + "name": "", "type": "address" - }, + } + ], + "name": "venusBorrowSpeeds", + "outputs": [ { "internalType": "uint256", - "name": "repayAmount", + "name": "", "type": "uint256" - }, - { - "internalType": "contract IVBep20", - "name": "vTokenToBorrow", - "type": "address" } ], - "name": "moveDebt", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "newBorrower", - "outputs": [ + "constant": true, + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], + "name": "venusBorrowState", + "outputs": [ + { + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, + { + "internalType": "uint32", + "name": "block", + "type": "uint32" + } + ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "address", "name": "", "type": "address" } ], + "name": "venusBorrowerIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "venusInitialIndex", "outputs": [ { - "internalType": "address", + "internalType": "uint224", "name": "", - "type": "address" + "type": "uint224" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [ { "internalType": "address", @@ -17593,110 +18275,85 @@ "type": "address" } ], - "name": "repaymentAllowed", + "name": "venusSupplierIndex", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "vTokenToBorrow", + "name": "", "type": "address" - }, + } + ], + "name": "venusSupplySpeeds", + "outputs": [ { - "internalType": "bool", - "name": "allow", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "setBorrowAllowed", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "vTokenToRepay", - "type": "address" - }, - { - "internalType": "address", - "name": "originalBorrower", + "name": "", "type": "address" - }, - { - "internalType": "bool", - "name": "allow", - "type": "bool" } ], - "name": "setRepaymentAllowed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "venusSupplyState", + "outputs": [ { - "internalType": "contract IERC20Upgradeable", - "name": "token", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, + { + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "name": "sweepTokens", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "venusVAIVaultRate", + "outputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" } ] }, - "MoveDebtDelegate_Proxy": { - "address": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", + "Prime": { + "address": "0xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC", "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, { "anonymous": false, "inputs": [ @@ -17819,333 +18476,145 @@ { "stateMutability": "payable", "type": "receive" - } - ] - }, - "PSMProxyAdmin": { - "address": "0x3f918bA9446552AB184C6Ffd2e2fcB1FA5ee1e59", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "initialOwner", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" + "inputs": [], + "name": "AssetAlreadyExists", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "int256", + "name": "x", + "type": "int256" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "ExpTooLarge", + "type": "error" }, { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeProxyAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs": [], + "name": "IneligibleToClaim", + "type": "error" }, { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "inputs": [], + "name": "InvalidAddress", + "type": "error" }, { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - } - ], - "name": "getProxyImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "inputs": [], + "name": "InvalidAlphaArguments", + "type": "error" }, { "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" + "name": "InvalidBlocksPerYear", + "type": "error" }, { "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "InvalidComptroller", + "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs": [], + "name": "InvalidFixedPoint", + "type": "error" }, { "inputs": [ { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" + "internalType": "uint256", + "name": "n", + "type": "uint256" }, { - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "uint256", + "name": "d", + "type": "uint256" } ], - "name": "upgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "InvalidFraction", + "type": "error" }, { - "inputs": [ - { - "internalType": "contract TransparentUpgradeableProxy", - "name": "proxy", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ] - }, - "PegStability_USDT": { - "address": "0xC138aa4E424D1A8539e8F38Af5a754a2B7c3Cc36", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" + "inputs": [], + "name": "InvalidLength", + "type": "error" }, { - "stateMutability": "payable", - "type": "fallback" + "inputs": [], + "name": "InvalidLimit", + "type": "error" }, { "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "InvalidTimeBasedConfiguration", + "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "inputs": [], + "name": "InvalidTimestamp", + "type": "error" }, { "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "InvalidVToken", + "type": "error" }, { "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "int256", + "name": "x", + "type": "int256" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "LnNonRealResult", + "type": "error" }, { "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "int256", + "name": "x", + "type": "int256" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "inputs": [], - "name": "AlreadyPaused", - "type": "error" - }, - { - "inputs": [], - "name": "AmountTooSmall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", + "name": "LnTooLarge", "type": "error" }, { "inputs": [], - "name": "NotEnoughVAI", + "name": "MarketAlreadyExists", "type": "error" }, { "inputs": [], - "name": "NotPaused", + "name": "MarketNotSupported", "type": "error" }, { - "inputs": [], - "name": "Paused", + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", "type": "error" }, { "inputs": [], - "name": "TooManyDecimals", + "name": "NoScoreUpdatesRequired", "type": "error" }, { @@ -18171,46 +18640,125 @@ }, { "inputs": [], - "name": "VAIMintCapReached", + "name": "UserHasNoPrimeToken", "type": "error" }, { "inputs": [], - "name": "VAIMintedUnderflow", + "name": "WaitMoreTime", "type": "error" }, { - "inputs": [], - "name": "VAITransferFail", - "type": "error" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldNumerator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "oldDenominator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newNumerator", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "newDenominator", + "type": "uint128" + } + ], + "name": "AlphaUpdated", + "type": "event" }, { - "inputs": [], - "name": "ZeroAddress", - "type": "error" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "Burn", + "type": "event" }, { - "inputs": [], - "name": "ZeroAmount", - "type": "error" + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "oldFeeIn", + "name": "amount", + "type": "uint256" + } + ], + "name": "InterestClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyMultiplier", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newFeeIn", + "name": "borrowMultiplier", "type": "uint256" } ], - "name": "FeeInChanged", + "name": "MarketAdded", "type": "event" }, { @@ -18219,68 +18767,123 @@ { "indexed": false, "internalType": "uint256", - "name": "oldFeeOut", + "name": "oldMaxLoopsLimit", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newFeeOut", + "name": "newmaxLoopsLimit", "type": "uint256" } ], - "name": "FeeOutChanged", + "name": "MaxLoopsLimitUpdated", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" } ], - "name": "Initialized", + "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldRevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newIrrevocableLimit", + "type": "uint256" + }, { "indexed": false, + "internalType": "uint256", + "name": "newRevocableLimit", + "type": "uint256" + } + ], + "name": "MintLimitsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, "internalType": "address", - "name": "oldAccessControlManager", + "name": "market", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldBorrowMultiplier", + "type": "uint256" + }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" + "internalType": "uint256", + "name": "newSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowMultiplier", + "type": "uint256" } ], - "name": "NewAccessControlManager", + "name": "MultiplierUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "oldOracle", + "name": "oldAccessControlManager", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "newOracle", + "name": "newAccessControlManager", "type": "address" } ], - "name": "OracleChanged", + "name": "NewAccessControlManager", "type": "event" }, { @@ -18325,13 +18928,13 @@ "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "admin", + "name": "account", "type": "address" } ], - "name": "PSMPaused", + "name": "Paused", "type": "event" }, { @@ -18340,61 +18943,30 @@ { "indexed": true, "internalType": "address", - "name": "admin", + "name": "user", "type": "address" - } - ], - "name": "PSMResumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "stableIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "vaiOut", - "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "fee", + "name": "timestamp", "type": "uint256" } ], - "name": "StableForVAISwapped", + "name": "StakedAtUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "vaiBurnt", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stableOut", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "vaiFee", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" } ], - "name": "VAIForStableSwapped", + "name": "TokenUpgraded", "type": "event" }, { @@ -18402,18 +18974,12 @@ "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "oldCap", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newCap", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "VAIMintCapChanged", + "name": "Unpaused", "type": "event" }, { @@ -18422,22 +18988,16 @@ { "indexed": true, "internalType": "address", - "name": "oldTreasury", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTreasury", + "name": "user", "type": "address" } ], - "name": "VenusTreasuryChanged", + "name": "UserScoreUpdated", "type": "event" }, { "inputs": [], - "name": "BASIS_POINTS_DIVISOR", + "name": "MAXIMUM_XVS_CAP", "outputs": [ { "internalType": "uint256", @@ -18450,7 +19010,7 @@ }, { "inputs": [], - "name": "MANTISSA_ONE", + "name": "MINIMUM_STAKED_XVS", "outputs": [ { "internalType": "uint256", @@ -18463,12 +19023,12 @@ }, { "inputs": [], - "name": "ONE_DOLLAR", + "name": "NATIVE_MARKET", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -18476,12 +19036,12 @@ }, { "inputs": [], - "name": "STABLE_TOKEN_ADDRESS", + "name": "STAKING_PERIOD", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -18489,10 +19049,10 @@ }, { "inputs": [], - "name": "VAI", + "name": "WRAPPED_NATIVE_TOKEN", "outputs": [ { - "internalType": "contract IVAI", + "internalType": "address", "name": "", "type": "address" } @@ -18521,77 +19081,72 @@ "type": "function" }, { - "inputs": [], - "name": "feeIn", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "vToken", + "type": "address" } ], - "stateMutability": "view", + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "feeOut", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" } ], - "stateMutability": "view", + "name": "accrueInterestAndUpdateScore", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "accessControlManager_", - "type": "address" - }, - { - "internalType": "address", - "name": "venusTreasury_", + "name": "comptroller", "type": "address" }, { "internalType": "address", - "name": "oracleAddress_", + "name": "market", "type": "address" }, { "internalType": "uint256", - "name": "feeIn_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "feeOut_", + "name": "supplyMultiplier", "type": "uint256" }, { "internalType": "uint256", - "name": "vaiMintCap_", + "name": "borrowMultiplier", "type": "uint256" } ], - "name": "initialize", + "name": "addMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "isPaused", + "name": "alphaDenominator", "outputs": [ { - "internalType": "bool", + "internalType": "uint128", "name": "", - "type": "bool" + "type": "uint128" } ], "stateMutability": "view", @@ -18599,12 +19154,12 @@ }, { "inputs": [], - "name": "oracle", + "name": "alphaNumerator", "outputs": [ { - "internalType": "contract ResilientOracleInterface", + "internalType": "uint128", "name": "", - "type": "address" + "type": "uint128" } ], "stateMutability": "view", @@ -18612,46 +19167,122 @@ }, { "inputs": [], - "name": "owner", + "name": "blocksOrSecondsPerYear", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "pause", + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "burn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "pendingOwner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", "type": "address" } ], + "name": "calculateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { - "internalType": "uint256", - "name": "stableTknAmount", - "type": "uint256" + "internalType": "address", + "name": "vToken", + "type": "address" } ], - "name": "previewSwapStableForVAI", + "name": "claimInterest", "outputs": [ { "internalType": "uint256", @@ -18659,18 +19290,23 @@ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "stableTknAmount", - "type": "uint256" + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" } ], - "name": "previewSwapVAIForStable", + "name": "claimInterest", "outputs": [ { "internalType": "uint256", @@ -18678,85 +19314,179 @@ "type": "uint256" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimTimeRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "resume", - "outputs": [], - "stateMutability": "nonpayable", + "name": "comptroller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", "type": "address" + }, + { + "internalType": "uint256", + "name": "borrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsStaked", + "type": "uint256" } ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", + "name": "estimateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "getAllMarkets", + "outputs": [ { - "internalType": "uint256", - "name": "feeIn_", - "type": "uint256" + "internalType": "address[]", + "name": "", + "type": "address[]" } ], - "name": "setFeeIn", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ { "internalType": "uint256", - "name": "feeOut_", + "name": "", "type": "uint256" } ], - "name": "setFeeOut", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "oracleAddress_", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", "type": "address" } ], - "name": "setOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "getInterestAccrued", + "outputs": [ { "internalType": "uint256", - "name": "vaiMintCap_", + "name": "", "type": "uint256" } ], - "name": "setVAIMintCap", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -18764,12 +19494,35 @@ "inputs": [ { "internalType": "address", - "name": "venusTreasury_", + "name": "user", "type": "address" } ], - "name": "setVenusTreasury", - "outputs": [], + "name": "getPendingRewards", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PrimeStorageV1.PendingReward[]", + "name": "pendingRewards", + "type": "tuple[]" + } + ], "stateMutability": "nonpayable", "type": "function" }, @@ -18777,47 +19530,76 @@ "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "vToken", "type": "address" - }, - { - "internalType": "uint256", - "name": "stableTknAmount", - "type": "uint256" } ], - "name": "swapStableForVAI", + "name": "incomeDistributionYearly", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "xvsVault_", + "type": "address" + }, + { + "internalType": "address", + "name": "xvsVaultRewardToken_", "type": "address" }, { "internalType": "uint256", - "name": "stableTknAmount", + "name": "xvsVaultPoolId_", "type": "uint256" - } - ], - "name": "swapVAIForStable", - "outputs": [ + }, + { + "internalType": "uint128", + "name": "alphaNumerator_", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "alphaDenominator_", + "type": "uint128" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "primeLiquidityProvider_", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "loopsLimit_", "type": "uint256" } ], + "name": "initialize", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -18825,22 +19607,43 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "poolRegistry_", "type": "address" } ], - "name": "transferOwnership", + "name": "initializeV2", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "vaiMintCap", + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "interests", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "accrued", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "score", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", "type": "uint256" } ], @@ -18849,7 +19652,7 @@ }, { "inputs": [], - "name": "vaiMinted", + "name": "irrevocableLimit", "outputs": [ { "internalType": "uint256", @@ -18861,390 +19664,178 @@ "type": "function" }, { - "inputs": [], - "name": "venusTreasury", - "outputs": [ + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "address", "name": "", "type": "address" } ], + "name": "isScoreUpdated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "isTimeBased", + "outputs": [ { - "internalType": "address", - "name": "_logic", - "type": "address" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "admin_", + "name": "user", "type": "address" - }, + } + ], + "name": "isUserPrimeHolder", + "outputs": [ { - "internalType": "bytes", - "name": "_data", - "type": "bytes" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "PegStability_USDT_Implementation": { - "address": "0x9664568e5131e85f67d87fCD55B249F5D25fa43e", - "abi": [ + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { - "internalType": "address", - "name": "stableTokenAddress_", - "type": "address" + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" }, { - "internalType": "address", - "name": "vaiAddress_", - "type": "address" + "internalType": "address[]", + "name": "users", + "type": "address[]" } ], + "name": "issue", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyPaused", - "type": "error" - }, - { - "inputs": [], - "name": "AmountTooSmall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFee", - "type": "error" - }, - { - "inputs": [], - "name": "NotEnoughVAI", - "type": "error" - }, - { - "inputs": [], - "name": "NotPaused", - "type": "error" - }, - { - "inputs": [], - "name": "Paused", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyDecimals", - "type": "error" + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "calledContract", + "name": "", "type": "address" - }, - { - "internalType": "string", - "name": "methodSignature", - "type": "string" } ], - "name": "Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "VAIMintCapReached", - "type": "error" - }, - { - "inputs": [], - "name": "VAIMintedUnderflow", - "type": "error" - }, - { - "inputs": [], - "name": "VAITransferFail", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAmount", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ + "name": "markets", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldFeeIn", + "name": "supplyMultiplier", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newFeeIn", + "name": "borrowMultiplier", "type": "uint256" - } - ], - "name": "FeeInChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, "internalType": "uint256", - "name": "oldFeeOut", + "name": "rewardIndex", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newFeeOut", + "name": "sumOfMembersScore", "type": "uint256" - } - ], - "name": "FeeOutChanged", - "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": "oldOracle", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "OracleChanged", - "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": "admin", - "type": "address" - } - ], - "name": "PSMPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" + "internalType": "bool", + "name": "exists", + "type": "bool" } ], - "name": "PSMResumed", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "stableIn", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "vaiOut", - "type": "uint256" - }, + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "fee", + "name": "", "type": "uint256" } ], - "name": "StableForVAISwapped", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "vaiBurnt", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "stableOut", - "type": "uint256" - }, + "inputs": [], + "name": "nextScoreUpdateRoundId", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "vaiFee", + "name": "", "type": "uint256" } ], - "name": "VAIForStableSwapped", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldCap", - "type": "uint256" - }, + "inputs": [], + "name": "oracle", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newCap", - "type": "uint256" + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" } ], - "name": "VAIMintCapChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldTreasury", - "type": "address" - }, + "inputs": [], + "name": "owner", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newTreasury", + "name": "", "type": "address" } ], - "name": "VenusTreasuryChanged", - "type": "event" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "BASIS_POINTS_DIVISOR", + "name": "paused", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", @@ -19252,12 +19843,12 @@ }, { "inputs": [], - "name": "MANTISSA_ONE", + "name": "pendingOwner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -19265,7 +19856,7 @@ }, { "inputs": [], - "name": "ONE_DOLLAR", + "name": "pendingScoreUpdates", "outputs": [ { "internalType": "uint256", @@ -19278,7 +19869,7 @@ }, { "inputs": [], - "name": "STABLE_TOKEN_ADDRESS", + "name": "poolRegistry", "outputs": [ { "internalType": "address", @@ -19291,10 +19882,10 @@ }, { "inputs": [], - "name": "VAI", + "name": "primeLiquidityProvider", "outputs": [ { - "internalType": "contract IVAI", + "internalType": "address", "name": "", "type": "address" } @@ -19304,27 +19895,14 @@ }, { "inputs": [], - "name": "acceptOwnership", + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManagerV8", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "feeIn", + "name": "revocableLimit", "outputs": [ { "internalType": "uint256", @@ -19336,90 +19914,81 @@ "type": "function" }, { - "inputs": [], - "name": "feeOut", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "accessControlManager_", + "type": "address" } ], - "stateMutability": "view", + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - }, - { - "internalType": "address", - "name": "venusTreasury_", - "type": "address" - }, - { - "internalType": "address", - "name": "oracleAddress_", - "type": "address" - }, { "internalType": "uint256", - "name": "feeIn_", + "name": "_irrevocableLimit", "type": "uint256" }, { "internalType": "uint256", - "name": "feeOut_", + "name": "_revocableLimit", "type": "uint256" - }, + } + ], + "name": "setLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "vaiMintCap_", + "name": "loopsLimit", "type": "uint256" } ], - "name": "initialize", + "name": "setMaxLoopsLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "isPaused", - "outputs": [ + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address[]", + "name": "users", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "timestamps", + "type": "uint256[]" } ], - "stateMutability": "view", + "name": "setStakedAt", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "oracle", - "outputs": [ + "inputs": [ { - "internalType": "contract ResilientOracleInterface", + "internalType": "address", "name": "", "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", + "name": "stakedAt", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -19427,33 +19996,38 @@ }, { "inputs": [], - "name": "pause", + "name": "togglePause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "pendingOwner", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "stableTknAmount", - "type": "uint256" - } - ], - "name": "previewSwapStableForVAI", + "inputs": [], + "name": "totalIrrevocable", "outputs": [ { "internalType": "uint256", @@ -19465,14 +20039,8 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "stableTknAmount", - "type": "uint256" - } - ], - "name": "previewSwapVAIForStable", + "inputs": [], + "name": "totalRevocable", "outputs": [ { "internalType": "uint256", @@ -19485,53 +20053,26 @@ }, { "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "resume", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "totalScoreUpdatesRequired", + "outputs": [ { "internalType": "uint256", - "name": "feeIn_", + "name": "", "type": "uint256" } ], - "name": "setFeeIn", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "feeOut_", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "setFeeOut", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -19540,37 +20081,35 @@ "inputs": [ { "internalType": "address", - "name": "oracleAddress_", + "name": "", "type": "address" } ], - "name": "setOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "unreleasedPLPIncome", + "outputs": [ { "internalType": "uint256", - "name": "vaiMintCap_", + "name": "", "type": "uint256" } ], - "name": "setVAIMintCap", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "venusTreasury_", - "type": "address" + "internalType": "uint128", + "name": "_alphaNumerator", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_alphaDenominator", + "type": "uint128" } ], - "name": "setVenusTreasury", + "name": "updateAlpha", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -19579,23 +20118,35 @@ "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "market", "type": "address" }, { "internalType": "uint256", - "name": "stableTknAmount", + "name": "supplyMultiplier", "type": "uint256" - } - ], - "name": "swapStableForVAI", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "borrowMultiplier", "type": "uint256" } ], + "name": "updateMultipliers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "updateScores", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -19603,47 +20154,42 @@ "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "stableTknAmount", - "type": "uint256" } ], - "name": "swapVAIForStable", + "name": "vTokenForAsset", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "user", "type": "address" } ], - "name": "transferOwnership", + "name": "xvsUpdated", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "vaiMintCap", + "name": "xvsVault", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -19651,7 +20197,7 @@ }, { "inputs": [], - "name": "vaiMinted", + "name": "xvsVaultPoolId", "outputs": [ { "internalType": "uint256", @@ -19664,7 +20210,7 @@ }, { "inputs": [], - "name": "venusTreasury", + "name": "xvsVaultRewardToken", "outputs": [ { "internalType": "address", @@ -19674,12 +20220,7 @@ ], "stateMutability": "view", "type": "function" - } - ] - }, - "PegStability_USDT_Proxy": { - "address": "0xC138aa4E424D1A8539e8F38Af5a754a2B7c3Cc36", - "abi": [ + }, { "inputs": [ { @@ -19700,7 +20241,12 @@ ], "stateMutability": "payable", "type": "constructor" - }, + } + ] + }, + "PrimeLiquidityProvider": { + "address": "0x23c4F844ffDdC6161174eB32c770D4D8C07833F2", + "abi": [ { "anonymous": false, "inputs": [ @@ -19823,72 +20369,139 @@ { "stateMutability": "payable", "type": "receive" - } - ] - }, - "PolicyFacet": { - "address": "0x95CC56f266BC95Ae2486cb0cFeda1054B4aA4086", - "abi": [ + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "FundsTransferIsPaused", + "type": "error" + }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "speed", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "venusDelta", + "name": "maxSpeed", + "type": "uint256" + } + ], + "name": "InvalidDistributionSpeed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "venusBorrowIndex", + "name": "requiredLoops", "type": "uint256" } ], - "name": "DistributedBorrowerVenus", - "type": "event" + "name": "MaxLoopsLimitExceeded", + "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "token", "type": "address" - }, + } + ], + "name": "TokenAlreadyInitialized", + "type": "error" + }, + { + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "supplier", + "name": "token_", + "type": "address" + } + ], + "name": "TokenNotInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "venusDelta", - "type": "uint256" + "internalType": "address", + "name": "calledContract", + "type": "address" }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "venusSupplyIndex", - "type": "uint256" + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "DistributedSupplierVenus", + "name": "Initialized", "type": "event" }, { @@ -19897,55 +20510,61 @@ { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", "type": "uint256" } ], - "name": "DistributedVAIVaultVenus", + "name": "MaxLoopsLimitUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "info", + "name": "oldSpeed", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "detail", + "name": "newSpeed", "type": "uint256" } ], - "name": "Failure", + "name": "MaxTokenDistributionSpeedUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "account", + "name": "newAccessControlManager", "type": "address" } ], - "name": "MarketEntered", + "name": "NewAccessControlManager", "type": "event" }, { @@ -19953,18 +20572,18 @@ "inputs": [ { "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "previousOwner", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "newSpeed", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "VenusBorrowSpeedUpdated", + "name": "OwnershipTransferStarted", "type": "event" }, { @@ -19972,179 +20591,169 @@ "inputs": [ { "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "previousOwner", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "newSpeed", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "VenusSupplySpeedUpdated", + "name": "OwnershipTransferred", "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "supplySpeeds", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "borrowSpeeds", - "type": "uint256[]" + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "_setVenusSpeeds", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Paused", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "oldPrimeToken", "type": "address" }, { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "accountAssets", - "outputs": [ - { - "internalType": "contract VToken", - "name": "", + "indexed": true, + "internalType": "address", + "name": "newPrimeToken", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "PrimeTokenUpdated", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "market", + "name": "token", "type": "address" }, { - "internalType": "enum ComptrollerTypes.Action", - "name": "action", - "type": "uint8" - } - ], - "name": "actionPaused", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "SweepToken", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "token", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "TokenDistributionInitialized", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "oldSpeed", "type": "uint256" - } - ], - "name": "allMarkets", - "outputs": [ + }, { - "internalType": "contract VToken", - "name": "", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "TokenDistributionSpeedUpdated", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "token", "type": "address" }, { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "approvedDelegates", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "TokenTransferredToPrime", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", + "name": "token", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "borrowAmount", + "name": "amount", "type": "uint256" } ], - "name": "borrowAllowed", + "name": "TokensAccrued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", "outputs": [ { "internalType": "uint256", @@ -20152,35 +20761,58 @@ "type": "uint256" } ], - "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "borrowCapGuardian", + "name": "accessControlManager", "outputs": [ { - "internalType": "address", + "internalType": "contract IAccessControlManagerV8", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "token_", "type": "address" } ], - "name": "borrowCaps", + "name": "accrueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", "outputs": [ { "internalType": "uint256", @@ -20188,174 +20820,139 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", + "name": "token_", "type": "address" - }, + } + ], + "name": "getEffectiveDistributionSpeed", + "outputs": [ { "internalType": "uint256", - "name": "borrowAmount", + "name": "", "type": "uint256" } ], - "name": "borrowVerify", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "closeFactorMantissa", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + }, { "internalType": "uint256", - "name": "", + "name": "loopsLimit_", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "comptrollerImplementation", - "outputs": [ + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" } ], - "payable": false, - "stateMutability": "view", + "name": "initializeTokens", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "comptrollerLens", + "name": "isTimeBased", "outputs": [ { - "internalType": "contract ComptrollerLensInterface", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "token_", "type": "address" } ], - "name": "getAccountLiquidity", + "name": "lastAccruedBlock", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenModify", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" } ], - "name": "getHypotheticalAccountLiquidity", + "name": "lastAccruedBlockOrSecond", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "getXVSAddress", + "name": "maxLoopsLimit", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", @@ -20363,33 +20960,40 @@ "type": "address" } ], - "name": "isForcedLiquidationEnabled", + "name": "maxTokenDistributionSpeeds", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "isForcedLiquidationEnabledForUser", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauseFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", "outputs": [ { "internalType": "bool", @@ -20397,260 +21001,161 @@ "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, + "inputs": [], + "name": "pendingOwner", + "outputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" } ], - "name": "liquidateBorrowAllowed", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prime", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", + "name": "token_", "type": "address" - }, - { - "internalType": "uint256", - "name": "actualRepayAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "liquidateBorrowVerify", + "name": "releaseFunds", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "liquidationIncentiveMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "liquidatorContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", + "name": "resumeFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "accessControlManager_", "type": "address" } ], - "name": "markets", - "outputs": [ - { - "internalType": "bool", - "name": "isListed", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "collateralFactorMantissa", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isVenus", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "maxAssets", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "loopsLimit", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "minReleaseAmount", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" } ], - "payable": false, - "stateMutability": "view", + "name": "setMaxTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "minter", + "name": "prime_", "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintAllowed", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], - "payable": false, + "name": "setPrimeToken", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "mintVAIGuardianPaused", - "outputs": [ + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" } ], - "payable": false, - "stateMutability": "view", + "name": "setTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "vToken", + "internalType": "contract IERC20Upgradeable", + "name": "token_", "type": "address" }, { "internalType": "address", - "name": "minter", + "name": "to_", "type": "address" }, { "internalType": "uint256", - "name": "actualMintAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "mintTokens", + "name": "amount_", "type": "uint256" } ], - "name": "mintVerify", + "name": "sweepToken", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", @@ -20658,7 +21163,7 @@ "type": "address" } ], - "name": "mintedVAIs", + "name": "tokenAmountAccrued", "outputs": [ { "internalType": "uint256", @@ -20666,489 +21171,513 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "oracle", - "outputs": [ + "inputs": [ { - "internalType": "contract PriceOracle", + "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pauseGuardian", + "name": "tokenDistributionSpeeds", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingComptrollerImplementation", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "_logic", "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "prime", - "outputs": [ + }, { - "internalType": "contract IPrime", - "name": "", + "internalType": "address", + "name": "admin_", "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "PrimeLiquidityProvider_Implementation": { + "address": "0x208068AE8A619FCc851659791659B1aA40d796dA", + "abi": [ { - "constant": true, - "inputs": [], - "name": "protocolPaused", - "outputs": [ + "inputs": [ { "internalType": "bool", - "name": "", + "name": "_timeBased", "type": "bool" + }, + { + "internalType": "uint256", + "name": "_blocksPerYear", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "FundsTransferIsPaused", + "type": "error" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "redeemer", - "type": "address" + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" }, { "internalType": "uint256", - "name": "redeemTokens", + "name": "balance", "type": "uint256" } ], - "name": "redeemAllowed", - "outputs": [ + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "speed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSpeed", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "InvalidDistributionSpeed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" }, { - "constant": false, "inputs": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, { "internalType": "uint256", - "name": "redeemAmount", + "name": "loopsLimit", "type": "uint256" }, { "internalType": "uint256", - "name": "redeemTokens", + "name": "requiredLoops", "type": "uint256" } ], - "name": "redeemVerify", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "MaxLoopsLimitExceeded", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "releaseStartBlock", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "token", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "TokenAlreadyInitialized", + "type": "error" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "token_", "type": "address" - }, + } + ], + "name": "TokenNotInitialized", + "type": "error" + }, + { + "inputs": [ { "internalType": "address", - "name": "payer", + "name": "sender", "type": "address" }, { "internalType": "address", - "name": "borrower", + "name": "calledContract", "type": "address" }, { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "name": "repayBorrowAllowed", - "outputs": [ + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Initialized", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "vToken", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" }, { - "internalType": "address", - "name": "payer", - "type": "address" - }, + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "token", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "actualRepayAmount", + "name": "oldSpeed", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "borrowerIndex", + "name": "newSpeed", "type": "uint256" } ], - "name": "repayBorrowVerify", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "MaxTokenDistributionSpeedUpdated", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "repayVAIGuardianPaused", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewAccessControlManager", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vTokenCollateral", + "name": "previousOwner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "vTokenBorrowed", + "name": "newOwner", "type": "address" - }, + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "previousOwner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "seizeAllowed", - "outputs": [ + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Paused", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vTokenCollateral", + "name": "oldPrimeToken", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "vTokenBorrowed", + "name": "newPrimeToken", "type": "address" - }, + } + ], + "name": "PrimeTokenUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "token", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "to", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "seizeTokens", + "name": "sweepAmount", "type": "uint256" } ], - "name": "seizeVerify", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "SweepToken", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "token", "type": "address" } ], - "name": "supplyCaps", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "TokenDistributionInitialized", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", + "name": "token", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "transferTokens", + "name": "oldSpeed", "type": "uint256" - } - ], - "name": "transferAllowed", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "newSpeed", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "TokenDistributionSpeedUpdated", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vToken", + "name": "token", "type": "address" }, { - "internalType": "address", - "name": "src", - "type": "address" - }, + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferredToPrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "dst", + "name": "token", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "transferTokens", + "name": "amount", "type": "uint256" } ], - "name": "transferVerify", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "TokensAccrued", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "treasuryAddress", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Unpaused", + "type": "event" }, { - "constant": true, "inputs": [], - "name": "treasuryGuardian", + "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "treasuryPercent", + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IAccessControlManagerV8", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "vaiController", - "outputs": [ + "inputs": [ { - "internalType": "contract VAIControllerInterface", - "name": "", + "internalType": "address", + "name": "token_", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "accrueTokens", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "vaiMintRate", + "name": "blocksOrSecondsPerYear", "outputs": [ { "internalType": "uint256", @@ -21156,35 +21685,31 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "vaiVaultAddress", + "name": "getBlockNumberOrTimestamp", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "token_", "type": "address" } ], - "name": "venusAccrued", + "name": "getEffectiveDistributionSpeed", "outputs": [ { "internalType": "uint256", @@ -21192,72 +21717,96 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "accessControlManager_", "type": "address" + }, + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" } ], - "name": "venusBorrowSpeeds", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + } + ], + "name": "initializeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "token_", "type": "address" } ], - "name": "venusBorrowState", + "name": "lastAccruedBlock", "outputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, { "internalType": "address", "name": "", "type": "address" } ], - "name": "venusBorrowerIndex", + "name": "lastAccruedBlockOrSecond", "outputs": [ { "internalType": "uint256", @@ -21265,40 +21814,31 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "venusInitialIndex", + "name": "maxLoopsLimit", "outputs": [ { - "internalType": "uint224", + "internalType": "uint256", "name": "", - "type": "uint224" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, { "internalType": "address", "name": "", "type": "address" } ], - "name": "venusSupplierIndex", + "name": "maxTokenDistributionSpeeds", "outputs": [ { "internalType": "uint256", @@ -21306,61 +21846,221 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "venusSupplySpeeds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ + "inputs": [], + "name": "pauseFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "venusSupplyState", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prime", "outputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "releaseFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resumeFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" }, { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setMaxTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "prime_", + "type": "address" + } + ], + "name": "setPrimeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "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": "token_", + "type": "address" + } + ], + "name": "tokenAmountAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "venusVAIVaultRate", + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenDistributionSpeeds", "outputs": [ { "internalType": "uint256", @@ -21368,15 +22068,48 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ] }, - "Prime": { - "address": "0xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC", + "PrimeLiquidityProvider_Proxy": { + "address": "0x23c4F844ffDdC6161174eB32c770D4D8C07833F2", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, { "anonymous": false, "inputs": [ @@ -21499,6 +22232,47 @@ { "stateMutability": "payable", "type": "receive" + } + ] + }, + "Prime_Implementation": { + "address": "0x371c0355CC22Ea13404F2fEAc989435DAD9b9d03", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_wbnb", + "type": "address" + }, + { + "internalType": "address", + "name": "_vbnb", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blocksPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_stakingPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumStakedXVS", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maximumXVSCap", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" }, { "inputs": [], @@ -21536,11 +22310,6 @@ "name": "InvalidBlocksPerYear", "type": "error" }, - { - "inputs": [], - "name": "InvalidComptroller", - "type": "error" - }, { "inputs": [], "name": "InvalidFixedPoint", @@ -21572,11 +22341,6 @@ "name": "InvalidLimit", "type": "error" }, - { - "inputs": [], - "name": "InvalidTimeBasedConfiguration", - "type": "error" - }, { "inputs": [], "name": "InvalidTimestamp", @@ -21756,12 +22520,6 @@ { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "comptroller", - "type": "address" - }, { "indexed": true, "internalType": "address", @@ -21769,13 +22527,13 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "supplyMultiplier", "type": "uint256" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "borrowMultiplier", "type": "uint256" @@ -22020,7 +22778,7 @@ }, { "inputs": [], - "name": "MAXIMUM_XVS_CAP", + "name": "BLOCKS_PER_YEAR", "outputs": [ { "internalType": "uint256", @@ -22033,7 +22791,7 @@ }, { "inputs": [], - "name": "MINIMUM_STAKED_XVS", + "name": "MAXIMUM_XVS_CAP", "outputs": [ { "internalType": "uint256", @@ -22046,12 +22804,12 @@ }, { "inputs": [], - "name": "NATIVE_MARKET", + "name": "MINIMUM_STAKED_XVS", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -22072,7 +22830,20 @@ }, { "inputs": [], - "name": "WRAPPED_NATIVE_TOKEN", + "name": "VBNB", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBNB", "outputs": [ { "internalType": "address", @@ -22136,11 +22907,6 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "comptroller", - "type": "address" - }, { "internalType": "address", "name": "market", @@ -22188,19 +22954,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "blocksOrSecondsPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -22230,61 +22983,14 @@ "name": "calculateAPR", "outputs": [ { - "components": [ - { - "internalType": "uint256", - "name": "supplyAPR", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowAPR", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalScore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "userScore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "xvsBalanceForScore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "capital", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "cappedSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "cappedBorrow", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supplyCapUSD", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowCapUSD", - "type": "uint256" - } - ], - "internalType": "struct IPrime.APRInfo", - "name": "aprInfo", - "type": "tuple" + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" } ], "stateMutability": "view", @@ -22403,61 +23109,14 @@ "name": "estimateAPR", "outputs": [ { - "components": [ - { - "internalType": "uint256", - "name": "supplyAPR", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowAPR", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalScore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "userScore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "xvsBalanceForScore", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "capital", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "cappedSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "cappedBorrow", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supplyCapUSD", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowCapUSD", - "type": "uint256" - } - ], - "internalType": "struct IPrime.APRInfo", - "name": "aprInfo", - "type": "tuple" + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" } ], "stateMutability": "view", @@ -22476,19 +23135,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "getBlockNumberOrTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -22549,25 +23195,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - } - ], - "name": "incomeDistributionYearly", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -22626,19 +23253,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "poolRegistry_", - "type": "address" - } - ], - "name": "initializeV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -22710,38 +23324,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "isTimeBased", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "isUserPrimeHolder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -22890,19 +23472,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "poolRegistry", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "primeLiquidityProvider", @@ -23243,7 +23812,12 @@ ], "stateMutability": "view", "type": "function" - }, + } + ] + }, + "Prime_Proxy": { + "address": "0xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC", + "abi": [ { "inputs": [ { @@ -23264,12 +23838,7 @@ ], "stateMutability": "payable", "type": "constructor" - } - ] - }, - "PrimeLiquidityProvider": { - "address": "0x23c4F844ffDdC6161174eB32c770D4D8C07833F2", - "abi": [ + }, { "anonymous": false, "inputs": [ @@ -23392,158 +23961,148 @@ { "stateMutability": "payable", "type": "receive" - }, - { - "inputs": [], - "name": "AddressesMustDiffer", - "type": "error" - }, - { - "inputs": [], - "name": "FundsTransferIsPaused", - "type": "error" - }, + } + ] + }, + "RewardFacet": { + "address": "0xc2F6bDCEa4907E8CB7480d3d315bc01c125fb63C", + "abi": [ { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "sweepAmount", - "type": "uint256" + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" }, { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidArguments", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBlocksPerYear", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCaller", - "type": "error" - }, - { - "inputs": [ + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "speed", + "name": "venusDelta", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "maxSpeed", + "name": "venusBorrowIndex", "type": "uint256" } ], - "name": "InvalidDistributionSpeed", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTimeBasedConfiguration", - "type": "error" + "name": "DistributedBorrowerVenus", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "supplier", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "loopsLimit", + "name": "venusDelta", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "requiredLoops", + "name": "venusSupplyIndex", "type": "uint256" } ], - "name": "MaxLoopsLimitExceeded", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "TokenAlreadyInitialized", - "type": "error" + "name": "DistributedSupplierVenus", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "token_", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "TokenNotInitialized", - "type": "error" + "name": "DistributedVAIVaultVenus", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { - "internalType": "address", - "name": "calledContract", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" }, { - "internalType": "string", - "name": "methodSignature", - "type": "string" + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "name": "Unauthorized", - "type": "error" + "name": "Failure", + "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "Initialized", + "name": "MarketEntered", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLoopsLimit", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "newmaxLoopsLimit", + "name": "amount", "type": "uint256" } ], - "name": "MaxLoopsLimitUpdated", + "name": "VenusGranted", "type": "event" }, { @@ -23552,231 +24111,308 @@ { "indexed": true, "internalType": "address", - "name": "token", + "name": "holder", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "oldSpeed", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newSpeed", + "name": "amount", "type": "uint256" } ], - "name": "MaxTokenDistributionSpeedUpdated", + "name": "VenusSeized", "type": "event" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "oldAccessControlManager", + "name": "recipient", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "NewAccessControlManager", - "type": "event" + "name": "_grantXVS", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accountAssets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", "type": "address" } ], - "name": "OwnershipTransferStarted", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "market", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "enum ComptrollerTypes.Action", + "name": "action", + "type": "uint8" } ], - "name": "OwnershipTransferred", - "type": "event" + "name": "actionPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "Paused", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "oldPrimeToken", - "type": "address" - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allMarkets", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newPrimeToken", + "internalType": "contract VToken", + "name": "", "type": "address" } ], - "name": "PrimeTokenUpdated", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "to", + "name": "", "type": "address" - }, + } + ], + "name": "approvedDelegates", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "sweepAmount", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SweepToken", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "borrowCapGuardian", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "", "type": "address" } ], - "name": "TokenDistributionInitialized", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "", "type": "address" - }, + } + ], + "name": "borrowCaps", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldSpeed", + "name": "", "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address[]", + "name": "holders", + "type": "address[]" }, { - "indexed": false, - "internalType": "uint256", - "name": "newSpeed", - "type": "uint256" + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "borrowers", + "type": "bool" + }, + { + "internalType": "bool", + "name": "suppliers", + "type": "bool" + }, + { + "internalType": "bool", + "name": "collateral", + "type": "bool" } ], - "name": "TokenDistributionSpeedUpdated", - "type": "event" + "name": "claimVenus", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "holder", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" } ], - "name": "TokenTransferredToPrime", - "type": "event" + "name": "claimVenus", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "holder", "type": "address" + } + ], + "name": "claimVenus", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address[]", + "name": "holders", + "type": "address[]" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "borrowers", + "type": "bool" + }, + { + "internalType": "bool", + "name": "suppliers", + "type": "bool" } ], - "name": "TokensAccrued", - "type": "event" + "name": "claimVenus", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "account", + "name": "holder", "type": "address" } ], - "name": "Unpaused", - "type": "event" + "name": "claimVenusAsCollateral", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", + "name": "closeFactorMantissa", "outputs": [ { "internalType": "uint256", @@ -23784,174 +24420,197 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "accessControlManager", + "name": "comptrollerImplementation", "outputs": [ { - "internalType": "contract IAccessControlManagerV8", + "internalType": "address", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "comptrollerLens", + "outputs": [ { - "internalType": "address", - "name": "token_", + "internalType": "contract ComptrollerLensInterface", + "name": "", "type": "address" } ], - "name": "accrueTokens", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "blocksOrSecondsPerYear", + "name": "getXVSAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getBlockNumberOrTimestamp", + "name": "getXVSVTokenAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "token_", + "name": "", "type": "address" } ], - "name": "getEffectiveDistributionSpeed", + "name": "isForcedLiquidationEnabled", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "", "type": "address" }, { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "distributionSpeeds_", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "maxDistributionSpeeds_", - "type": "uint256[]" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isForcedLiquidationEnabledForUser", + "outputs": [ { - "internalType": "uint256", - "name": "loopsLimit_", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "liquidationIncentiveMantissa", + "outputs": [ { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "initializeTokens", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "isTimeBased", + "name": "liquidatorContract", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "token_", + "name": "", "type": "address" } ], - "name": "lastAccruedBlock", + "name": "markets", "outputs": [ + { + "internalType": "bool", + "name": "isListed", + "type": "bool" + }, { "internalType": "uint256", - "name": "", + "name": "collateralFactorMantissa", "type": "uint256" + }, + { + "internalType": "bool", + "name": "isVenus", + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "maxAssets", + "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "name": "lastAccruedBlockOrSecond", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "minReleaseAmount", "outputs": [ { "internalType": "uint256", @@ -23959,23 +24618,27 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "maxLoopsLimit", + "name": "mintVAIGuardianPaused", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -23983,7 +24646,7 @@ "type": "address" } ], - "name": "maxTokenDistributionSpeeds", + "name": "mintedVAIs", "outputs": [ { "internalType": "uint256", @@ -23991,45 +24654,59 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "oracle", "outputs": [ { - "internalType": "address", + "internalType": "contract PriceOracle", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pauseFundsTransfer", - "outputs": [], - "stateMutability": "nonpayable", + "name": "pauseGuardian", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "paused", + "name": "pendingAdmin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "pendingComptrollerImplementation", "outputs": [ { "internalType": "address", @@ -24037,148 +24714,209 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "prime", "outputs": [ { - "internalType": "address", + "internalType": "contract IPrime", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "protocolPaused", + "outputs": [ { - "internalType": "address", - "name": "token_", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "releaseFunds", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "releaseStartBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "resumeFundsTransfer", - "outputs": [], - "stateMutability": "nonpayable", + "name": "repayVAIGuardianPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ + { + "internalType": "address[]", + "name": "holders", + "type": "address[]" + }, { "internalType": "address", - "name": "accessControlManager_", + "name": "recipient", "type": "address" } ], - "name": "setAccessControlManager", - "outputs": [], + "name": "seizeVenus", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "supplyCaps", + "outputs": [ { "internalType": "uint256", - "name": "loopsLimit", + "name": "", "type": "uint256" } ], - "name": "setMaxLoopsLimit", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" - }, + "constant": true, + "inputs": [], + "name": "treasuryAddress", + "outputs": [ { - "internalType": "uint256[]", - "name": "maxDistributionSpeeds_", - "type": "uint256[]" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "setMaxTokensDistributionSpeed", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryGuardian", + "outputs": [ { "internalType": "address", - "name": "prime_", + "name": "", "type": "address" } ], - "name": "setPrimeToken", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" - }, + "constant": true, + "inputs": [], + "name": "treasuryPercent", + "outputs": [ { - "internalType": "uint256[]", - "name": "distributionSpeeds_", - "type": "uint256[]" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "setTokensDistributionSpeed", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "token_", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "vaiController", + "outputs": [ { - "internalType": "address", - "name": "to_", + "internalType": "contract VAIControllerInterface", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vaiMintRate", + "outputs": [ { "internalType": "uint256", - "name": "amount_", + "name": "", "type": "uint256" } ], - "name": "sweepToken", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vaiVaultAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -24186,7 +24924,7 @@ "type": "address" } ], - "name": "tokenAmountAccrued", + "name": "venusAccrued", "outputs": [ { "internalType": "uint256", @@ -24194,10 +24932,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -24205,7 +24945,7 @@ "type": "address" } ], - "name": "tokenDistributionSpeeds", + "name": "venusBorrowSpeeds", "outputs": [ { "internalType": "uint256", @@ -24213,216 +24953,181 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "venusBorrowState", + "outputs": [ + { + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, + { + "internalType": "uint32", + "name": "block", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "_logic", + "name": "", "type": "address" }, { "internalType": "address", - "name": "admin_", + "name": "", "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" } ], - "stateMutability": "payable", - "type": "constructor" - } - ] - }, - "PrimeLiquidityProvider_Implementation": { - "address": "0x208068AE8A619FCc851659791659B1aA40d796dA", - "abi": [ - { - "inputs": [ - { - "internalType": "bool", - "name": "_timeBased", - "type": "bool" - }, + "name": "venusBorrowerIndex", + "outputs": [ { "internalType": "uint256", - "name": "_blocksPerYear", + "name": "", "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AddressesMustDiffer", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "FundsTransferIsPaused", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "sweepAmount", - "type": "uint256" - }, + "name": "venusInitialIndex", + "outputs": [ { - "internalType": "uint256", - "name": "balance", - "type": "uint256" + "internalType": "uint224", + "name": "", + "type": "uint224" } ], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidArguments", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBlocksPerYear", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCaller", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "speed", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" }, { - "internalType": "uint256", - "name": "maxSpeed", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "InvalidDistributionSpeed", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTimeBasedConfiguration", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "loopsLimit", - "type": "uint256" - }, + "name": "venusSupplierIndex", + "outputs": [ { "internalType": "uint256", - "name": "requiredLoops", + "name": "", "type": "uint256" } ], - "name": "MaxLoopsLimitExceeded", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "token", + "name": "", "type": "address" } ], - "name": "TokenAlreadyInitialized", - "type": "error" - }, - { - "inputs": [ + "name": "venusSupplySpeeds", + "outputs": [ { - "internalType": "address", - "name": "token_", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "TokenNotInitialized", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "calledContract", + "name": "", "type": "address" + } + ], + "name": "venusSupplyState", + "outputs": [ + { + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "string", - "name": "methodSignature", - "type": "string" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "name": "Unauthorized", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "venusVAIVaultRate", + "outputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" - }, + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + }, + "SXP": { + "address": "0x47BEAd2563dCBf3bF2c9407fEa4dC236fAbA485A", + "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxLoopsLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newmaxLoopsLimit", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "MaxLoopsLimitUpdated", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, @@ -24430,61 +25135,48 @@ { "indexed": true, "internalType": "address", - "name": "token", + "name": "owner", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "oldSpeed", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "newSpeed", + "name": "amount", "type": "uint256" } ], - "name": "MaxTokenDistributionSpeedUpdated", + "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldAccessControlManager", + "name": "delegator", "type": "address" }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "fromDelegate", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "toDelegate", "type": "address" } ], - "name": "OwnershipTransferStarted", + "name": "DelegateChanged", "type": "event" }, { @@ -24493,30 +25185,42 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "delegate", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" } ], - "name": "OwnershipTransferred", + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Freezed", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "account", + "name": "who", "type": "address" } ], - "name": "Paused", + "name": "LockUser", "type": "event" }, { @@ -24525,17 +25229,17 @@ { "indexed": true, "internalType": "address", - "name": "oldPrimeToken", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newPrimeToken", + "name": "newOwner", "type": "address" } ], - "name": "PrimeTokenUpdated", + "name": "OwnershipTransferred", "type": "event" }, { @@ -24544,7 +25248,7 @@ { "indexed": true, "internalType": "address", - "name": "token", + "name": "from", "type": "address" }, { @@ -24556,11 +25260,17 @@ { "indexed": false, "internalType": "uint256", - "name": "sweepAmount", + "name": "amount", "type": "uint256" } ], - "name": "SweepToken", + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "UnFreezed", "type": "event" }, { @@ -24569,92 +25279,136 @@ { "indexed": true, "internalType": "address", - "name": "token", + "name": "who", "type": "address" } ], - "name": "TokenDistributionInitialized", + "name": "UnlockUser", "type": "event" }, { - "anonymous": false, + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "owner", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "oldSpeed", - "type": "uint256" - }, + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "newSpeed", + "name": "", "type": "uint256" } ], - "name": "TokenDistributionSpeedUpdated", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "spender", "type": "address" }, { - "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], - "name": "TokenTransferredToPrime", - "type": "event" + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "token", + "name": "spender", "type": "address" }, { - "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "TokensAccrued", - "type": "event" + "name": "approveAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -24662,187 +25416,316 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "accessControlManager", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", "outputs": [ { - "internalType": "contract IAccessControlManagerV8", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "token_", + "name": "", "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "accrueTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "blocksOrSecondsPerYear", + "name": "checkpoints", "outputs": [ + { + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, { "internalType": "uint256", - "name": "", + "name": "votes", "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getBlockNumberOrTimestamp", + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "token_", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" } ], - "name": "getEffectiveDistributionSpeed", + "name": "decreaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", "type": "address" }, { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" + "internalType": "uint256", + "name": "nonce", + "type": "uint256" }, { - "internalType": "uint256[]", - "name": "distributionSpeeds_", - "type": "uint256[]" + "internalType": "uint256", + "name": "expiry", + "type": "uint256" }, { - "internalType": "uint256[]", - "name": "maxDistributionSpeeds_", - "type": "uint256[]" + "internalType": "uint8", + "name": "v", + "type": "uint8" }, { - "internalType": "uint256", - "name": "loopsLimit_", - "type": "uint256" + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "initialize", + "name": "delegateBySig", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "initializeTokens", + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "freeze", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [], - "name": "isTimeBased", + "name": "getOwner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "token_", + "name": "account", "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" } ], - "name": "lastAccruedBlock", + "name": "getPriorVotes", "outputs": [ { - "internalType": "uint256", + "internalType": "uint96", "name": "", - "type": "uint256" + "type": "uint96" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "who", "type": "address" } ], - "name": "lastAccruedBlockOrSecond", + "name": "lockUser", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "maxLoopsLimit", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", "outputs": [ { "internalType": "uint256", @@ -24850,10 +25733,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -24861,18 +25746,20 @@ "type": "address" } ], - "name": "maxTokenDistributionSpeeds", + "name": "numCheckpoints", "outputs": [ { - "internalType": "uint256", + "internalType": "uint32", "name": "", - "type": "uint256" + "type": "uint32" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "owner", "outputs": [ @@ -24882,256 +25769,370 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], - "name": "pauseFundsTransfer", + "name": "renounceOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "paused", + "name": "symbol", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "totalSupply", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "prime", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "stateMutability": "view", + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "token_", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "releaseFunds", - "outputs": [], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "resumeFundsTransfer", + "name": "unfreeze", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "who", "type": "address" } ], - "name": "setAccessControlManager", + "name": "unlockUser", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "SetterFacet": { + "address": "0x7dc9E7b21a9E343f4AD926b8B00Cff5adf5c1CdE", + "abi": [ { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "loopsLimit", - "type": "uint256" + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "enum ComptrollerTypes.Action", + "name": "action", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bool", + "name": "pauseState", + "type": "bool" } ], - "name": "setMaxLoopsLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "ActionPausedMarket", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "maxDistributionSpeeds_", - "type": "uint256[]" + "indexed": false, + "internalType": "bool", + "name": "state", + "type": "bool" } ], - "name": "setMaxTokensDistributionSpeed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "ActionProtocolPaused", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "prime_", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "setPrimeToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "DistributedVAIVaultVenus", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address[]", - "name": "tokens_", - "type": "address[]" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { - "internalType": "uint256[]", - "name": "distributionSpeeds_", - "type": "uint256[]" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "name": "setTokensDistributionSpeed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "contract IERC20Upgradeable", - "name": "token_", + "indexed": true, + "internalType": "address", + "name": "borrower", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "to_", + "name": "vToken", "type": "address" }, { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" + "indexed": false, + "internalType": "bool", + "name": "enable", + "type": "bool" } ], - "name": "sweepToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "IsForcedLiquidationEnabledForUserUpdated", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "token_", + "name": "vToken", "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enable", + "type": "bool" } ], - "name": "tokenAmountAccrued", - "outputs": [ + "name": "IsForcedLiquidationEnabledUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "MarketEntered", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "tokenDistributionSpeeds", - "outputs": [ + "name": "NewAccessControl", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "newBorrowCap", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "NewBorrowCap", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldCloseFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCloseFactorMantissa", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "PrimeLiquidityProvider_Proxy": { - "address": "0x23c4F844ffDdC6161174eB32c770D4D8C07833F2", - "abi": [ + "name": "NewCloseFactor", + "type": "event" + }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "_logic", + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", "type": "address" }, { - "internalType": "address", - "name": "admin_", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldCollateralFactorMantissa", + "type": "uint256" }, { - "internalType": "bytes", - "name": "_data", - "type": "bytes" + "indexed": false, + "internalType": "uint256", + "name": "newCollateralFactorMantissa", + "type": "uint256" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "NewCollateralFactor", + "type": "event" }, { "anonymous": false, @@ -25139,430 +26140,207 @@ { "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "oldComptrollerLens", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newComptrollerLens", "type": "address" } ], - "name": "AdminChanged", + "name": "NewComptrollerLens", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldLiquidationIncentiveMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLiquidationIncentiveMantissa", + "type": "uint256" } ], - "name": "BeaconUpgraded", + "name": "NewLiquidationIncentive", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "oldLiquidatorContract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newLiquidatorContract", "type": "address" } ], - "name": "Upgraded", + "name": "NewLiquidatorContract", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "admin_", + "name": "oldPauseGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPauseGuardian", "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewPauseGuardian", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "newAdmin", + "indexed": false, + "internalType": "contract PriceOracle", + "name": "oldPriceOracle", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract PriceOracle", + "name": "newPriceOracle", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewPriceOracle", + "type": "event" }, { - "inputs": [], - "name": "implementation", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "address", - "name": "implementation_", + "indexed": false, + "internalType": "contract IPrime", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract IPrime", + "name": "newPrimeToken", "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewPrimeToken", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "newImplementation", + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupplyCap", + "type": "uint256" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewSupplyCap", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "oldTreasuryAddress", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "indexed": false, + "internalType": "address", + "name": "newTreasuryAddress", + "type": "address" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "name": "NewTreasuryAddress", + "type": "event" }, { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "Prime_Implementation": { - "address": "0x371c0355CC22Ea13404F2fEAc989435DAD9b9d03", - "abi": [ - { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "_wbnb", + "name": "oldTreasuryGuardian", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "_vbnb", + "name": "newTreasuryGuardian", "type": "address" - }, - { - "internalType": "uint256", - "name": "_blocksPerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_stakingPeriod", - "type": "uint256" - }, + } + ], + "name": "NewTreasuryGuardian", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "_minimumStakedXVS", + "name": "oldTreasuryPercent", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "_maximumXVSCap", + "name": "newTreasuryPercent", "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AssetAlreadyExists", - "type": "error" + "name": "NewTreasuryPercent", + "type": "event" }, { - "inputs": [ - { - "internalType": "int256", - "name": "x", - "type": "int256" - } - ], - "name": "ExpTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "IneligibleToClaim", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAddress", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAlphaArguments", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBlocksPerYear", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidFixedPoint", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "n", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "d", - "type": "uint256" - } - ], - "name": "InvalidFraction", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidLength", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidLimit", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidTimestamp", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidVToken", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "x", - "type": "int256" - } - ], - "name": "LnNonRealResult", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "int256", - "name": "x", - "type": "int256" - } - ], - "name": "LnTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "MarketAlreadyExists", - "type": "error" - }, - { - "inputs": [], - "name": "MarketNotSupported", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "loopsLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "requiredLoops", - "type": "uint256" - } - ], - "name": "MaxLoopsLimitExceeded", - "type": "error" - }, - { - "inputs": [], - "name": "NoScoreUpdatesRequired", - "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": [], - "name": "UserHasNoPrimeToken", - "type": "error" - }, - { - "inputs": [], - "name": "WaitMoreTime", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint128", - "name": "oldNumerator", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "uint128", - "name": "oldDenominator", - "type": "uint128" - }, - { - "indexed": true, - "internalType": "uint128", - "name": "newNumerator", - "type": "uint128" - }, - { - "indexed": false, - "internalType": "uint128", - "name": "newDenominator", - "type": "uint128" - } - ], - "name": "AlphaUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, + "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "market", + "internalType": "contract VAIControllerInterface", + "name": "oldVAIController", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "InterestClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "market", + "internalType": "contract VAIControllerInterface", + "name": "newVAIController", "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "supplyMultiplier", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "borrowMultiplier", - "type": "uint256" } ], - "name": "MarketAdded", + "name": "NewVAIController", "type": "event" }, { @@ -25571,17 +26349,17 @@ { "indexed": false, "internalType": "uint256", - "name": "oldMaxLoopsLimit", + "name": "oldVAIMintRate", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newmaxLoopsLimit", + "name": "newVAIMintRate", "type": "uint256" } ], - "name": "MaxLoopsLimitUpdated", + "name": "NewVAIMintRate", "type": "event" }, { @@ -25590,104 +26368,42 @@ { "indexed": true, "internalType": "address", - "name": "user", + "name": "vault_", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "isIrrevocable", - "type": "bool" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "oldIrrevocableLimit", - "type": "uint256" - }, - { - "indexed": true, "internalType": "uint256", - "name": "oldRevocableLimit", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "newIrrevocableLimit", + "name": "releaseStartBlock_", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newRevocableLimit", + "name": "releaseInterval_", "type": "uint256" } ], - "name": "MintLimitsUpdated", + "name": "NewVAIVaultInfo", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "oldSupplyMultiplier", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "oldBorrowMultiplier", - "type": "uint256" - }, { "indexed": false, "internalType": "uint256", - "name": "newSupplyMultiplier", + "name": "oldVenusVAIVaultRate", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newBorrowMultiplier", + "name": "newVenusVAIVaultRate", "type": "uint256" } ], - "name": "MultiplierUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlManager", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" - } - ], - "name": "NewAccessControlManager", + "name": "NewVenusVAIVaultRate", "type": "event" }, { @@ -25696,17 +26412,17 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "oldXVS", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "newXVS", "type": "address" } ], - "name": "OwnershipTransferStarted", + "name": "NewXVSToken", "type": "event" }, { @@ -25715,93 +26431,75 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "oldXVSVToken", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "newXVSVToken", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "NewXVSVToken", "type": "event" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "account", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, + "name": "_setAccessControl", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "timestamp", + "name": "", "type": "uint256" } ], - "name": "StakedAtUpdated", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "TokenUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "address[]", + "name": "markets_", + "type": "address[]" + }, { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "enum ComptrollerTypes.Action[]", + "name": "actions_", + "type": "uint8[]" + }, + { + "internalType": "bool", + "name": "paused_", + "type": "bool" } ], - "name": "Unpaused", - "type": "event" + "name": "_setActionsPaused", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" + "internalType": "uint256", + "name": "newCloseFactorMantissa", + "type": "uint256" } ], - "name": "UserScoreUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "BLOCKS_PER_YEAR", + "name": "_setCloseFactor", "outputs": [ { "internalType": "uint256", @@ -25809,25 +26507,25 @@ "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "MAXIMUM_XVS_CAP", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "newCollateralFactorMantissa", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINIMUM_STAKED_XVS", + "name": "_setCollateralFactor", "outputs": [ { "internalType": "uint256", @@ -25835,12 +26533,20 @@ "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "STAKING_PERIOD", + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerLensInterface", + "name": "comptrollerLens_", + "type": "address" + } + ], + "name": "_setComptrollerLens", "outputs": [ { "internalType": "uint256", @@ -25848,217 +26554,235 @@ "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "VBNB", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenBorrowed", "type": "address" + }, + { + "internalType": "bool", + "name": "enable", + "type": "bool" } ], - "stateMutability": "view", + "name": "_setForcedLiquidation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "WBNB", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "borrower", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenBorrowed", "type": "address" + }, + { + "internalType": "bool", + "name": "enable", + "type": "bool" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", + "name": "_setForcedLiquidationForUser", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "accessControlManager", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newLiquidationIncentiveMantissa", + "type": "uint256" + } + ], + "name": "_setLiquidationIncentive", "outputs": [ { - "internalType": "contract IAccessControlManagerV8", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "newLiquidatorContract_", "type": "address" } ], - "name": "accrueInterest", + "name": "_setLiquidatorContract", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "user", - "type": "address" + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" }, { - "internalType": "address", - "name": "market", - "type": "address" + "internalType": "uint256[]", + "name": "newBorrowCaps", + "type": "uint256[]" } ], - "name": "accrueInterestAndUpdateScore", + "name": "_setMarketBorrowCaps", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "uint256", - "name": "supplyMultiplier", - "type": "uint256" + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" }, { - "internalType": "uint256", - "name": "borrowMultiplier", - "type": "uint256" + "internalType": "uint256[]", + "name": "newSupplyCaps", + "type": "uint256[]" } ], - "name": "addMarket", + "name": "_setMarketSupplyCaps", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "alphaDenominator", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint128", - "name": "", - "type": "uint128" + "internalType": "address", + "name": "newPauseGuardian", + "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "alphaNumerator", + "name": "_setPauseGuardian", "outputs": [ { - "internalType": "uint128", + "internalType": "uint256", "name": "", - "type": "uint128" + "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "user", + "internalType": "contract PriceOracle", + "name": "newOracle", "type": "address" } ], - "name": "burn", - "outputs": [], + "name": "_setPriceOracle", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "user", + "internalType": "contract IPrime", + "name": "_prime", "type": "address" } ], - "name": "calculateAPR", + "name": "_setPrimeToken", "outputs": [ { "internalType": "uint256", - "name": "supplyAPR", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowAPR", + "name": "", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claim", - "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "vToken", - "type": "address" + "internalType": "bool", + "name": "state", + "type": "bool" } ], - "name": "claimInterest", + "name": "_setProtocolPaused", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "newTreasuryGuardian", "type": "address" }, { "internalType": "address", - "name": "user", + "name": "newTreasuryAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "newTreasuryPercent", + "type": "uint256" } ], - "name": "claimInterest", + "name": "_setTreasuryData", "outputs": [ { "internalType": "uint256", @@ -26066,18 +26790,20 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "user", + "internalType": "contract VAIControllerInterface", + "name": "vaiController_", "type": "address" } ], - "name": "claimTimeRemaining", + "name": "_setVAIController", "outputs": [ { "internalType": "uint256", @@ -26085,250 +26811,196 @@ "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "comptroller", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newVAIMintRate", + "type": "uint256" + } + ], + "name": "_setVAIMintRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "user", + "name": "vault_", "type": "address" }, { "internalType": "uint256", - "name": "borrow", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "xvsStaked", - "type": "uint256" - } - ], - "name": "estimateAPR", - "outputs": [ - { - "internalType": "uint256", - "name": "supplyAPR", + "name": "releaseStartBlock_", "type": "uint256" }, { "internalType": "uint256", - "name": "borrowAPR", + "name": "minReleaseAmount_", "type": "uint256" } ], - "stateMutability": "view", + "name": "_setVAIVaultInfo", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "getAllMarkets", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address[]", - "name": "", - "type": "address[]" + "internalType": "uint256", + "name": "venusVAIVaultRate_", + "type": "uint256" } ], - "stateMutability": "view", + "name": "_setVenusVAIVaultRate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "user", + "name": "xvs_", "type": "address" } ], - "name": "getInterestAccrued", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "_setXVSToken", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "user", + "name": "xvsVToken_", "type": "address" } ], - "name": "getPendingRewards", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct PrimeStorageV1.PendingReward[]", - "name": "pendingRewards", - "type": "tuple[]" - } - ], + "name": "_setXVSVToken", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "xvsVault_", - "type": "address" - }, - { - "internalType": "address", - "name": "xvsVaultRewardToken_", + "name": "", "type": "address" }, { "internalType": "uint256", - "name": "xvsVaultPoolId_", + "name": "", "type": "uint256" - }, - { - "internalType": "uint128", - "name": "alphaNumerator_", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "alphaDenominator_", - "type": "uint128" - }, - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - }, - { - "internalType": "address", - "name": "primeLiquidityProvider_", - "type": "address" - }, - { - "internalType": "address", - "name": "comptroller_", - "type": "address" - }, + } + ], + "name": "accountAssets", + "outputs": [ { - "internalType": "address", - "name": "oracle_", + "internalType": "contract VToken", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "loopsLimit_", - "type": "uint256" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "market", "type": "address" }, { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "enum ComptrollerTypes.Action", + "name": "action", + "type": "uint8" } ], - "name": "interests", + "name": "actionPaused", "outputs": [ { - "internalType": "uint256", - "name": "accrued", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "score", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardIndex", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "irrevocableLimit", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" + } + ], + "name": "allMarkets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" }, { "internalType": "address", @@ -26336,7 +27008,7 @@ "type": "address" } ], - "name": "isScoreUpdated", + "name": "approvedDelegates", "outputs": [ { "internalType": "bool", @@ -26344,28 +27016,27 @@ "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "bool", - "name": "isIrrevocable", - "type": "bool" - }, + "constant": true, + "inputs": [], + "name": "borrowCapGuardian", + "outputs": [ { - "internalType": "address[]", - "name": "users", - "type": "address[]" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "issue", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -26373,40 +27044,22 @@ "type": "address" } ], - "name": "markets", + "name": "borrowCaps", "outputs": [ { "internalType": "uint256", - "name": "supplyMultiplier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowMultiplier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "sumOfMembersScore", + "name": "", "type": "uint256" - }, - { - "internalType": "bool", - "name": "exists", - "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "maxLoopsLimit", + "name": "closeFactorMantissa", "outputs": [ { "internalType": "uint256", @@ -26414,38 +27067,44 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "nextScoreUpdateRoundId", + "name": "comptrollerImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "oracle", + "name": "comptrollerLens", "outputs": [ { - "internalType": "contract ResilientOracleInterface", + "internalType": "contract ComptrollerLensInterface", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "getXVSAddress", "outputs": [ { "internalType": "address", @@ -26453,12 +27112,20 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "paused", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isForcedLiquidationEnabled", "outputs": [ { "internalType": "bool", @@ -26466,25 +27133,40 @@ "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "pendingOwner", - "outputs": [ + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "address", "name": "", "type": "address" } ], + "name": "isForcedLiquidationEnabledForUser", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingScoreUpdates", + "name": "liquidationIncentiveMantissa", "outputs": [ { "internalType": "uint256", @@ -26492,12 +27174,14 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "primeLiquidityProvider", + "name": "liquidatorContract", "outputs": [ { "internalType": "address", @@ -26505,118 +27189,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "revocableLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_irrevocableLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_revocableLimit", - "type": "uint256" - } - ], - "name": "setLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "loopsLimit", - "type": "uint256" - } - ], - "name": "setMaxLoopsLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "users", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "timestamps", - "type": "uint256[]" - } - ], - "name": "setStakedAt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "stakedAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "togglePause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [ { "internalType": "address", @@ -26624,25 +27202,32 @@ "type": "address" } ], - "name": "tokens", + "name": "markets", "outputs": [ { "internalType": "bool", - "name": "exists", + "name": "isListed", "type": "bool" }, + { + "internalType": "uint256", + "name": "collateralFactorMantissa", + "type": "uint256" + }, { "internalType": "bool", - "name": "isIrrevocable", + "name": "isVenus", "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalIrrevocable", + "name": "maxAssets", "outputs": [ { "internalType": "uint256", @@ -26650,12 +27235,14 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalRevocable", + "name": "minReleaseAmount", "outputs": [ { "internalType": "uint256", @@ -26663,36 +27250,27 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalScoreUpdatesRequired", + "name": "mintVAIGuardianPaused", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [ { "internalType": "address", @@ -26700,7 +27278,7 @@ "type": "address" } ], - "name": "unreleasedPLPIncome", + "name": "mintedVAIs", "outputs": [ { "internalType": "uint256", @@ -26708,98 +27286,29 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint128", - "name": "_alphaNumerator", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "_alphaDenominator", - "type": "uint128" - } - ], - "name": "updateAlpha", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "uint256", - "name": "supplyMultiplier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowMultiplier", - "type": "uint256" - } - ], - "name": "updateMultipliers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "users", - "type": "address[]" - } - ], - "name": "updateScores", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "vTokenForAsset", + "constant": true, + "inputs": [], + "name": "oracle", "outputs": [ { - "internalType": "address", + "internalType": "contract PriceOracle", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "xvsUpdated", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [], - "name": "xvsVault", + "name": "pauseGuardian", "outputs": [ { "internalType": "address", @@ -26807,25 +27316,14 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "xvsVaultPoolId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "xvsVaultRewardToken", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", @@ -26833,358 +27331,32 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "Prime_Proxy": { - "address": "0xBbCD063efE506c3D42a0Fa2dB5C08430288C71FC", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "pendingComptrollerImplementation", "outputs": [ { "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "RewardFacet": { - "address": "0xc2F6bDCEa4907E8CB7480d3d315bc01c125fb63C", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "venusDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "venusBorrowIndex", - "type": "uint256" - } - ], - "name": "DistributedBorrowerVenus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "supplier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "venusDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "venusSupplyIndex", - "type": "uint256" - } - ], - "name": "DistributedSupplierVenus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "DistributedVAIVaultVenus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "MarketEntered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "VenusGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "VenusSeized", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "_grantXVS", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "accountAssets", + "inputs": [], + "name": "prime", "outputs": [ { - "internalType": "contract VToken", + "internalType": "contract IPrime", "name": "", "type": "address" } @@ -27195,19 +27367,8 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "enum ComptrollerTypes.Action", - "name": "action", - "type": "uint8" - } - ], - "name": "actionPaused", + "inputs": [], + "name": "protocolPaused", "outputs": [ { "internalType": "bool", @@ -27222,12 +27383,12 @@ { "constant": true, "inputs": [], - "name": "admin", + "name": "releaseStartBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -27236,19 +27397,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "allMarkets", + "inputs": [], + "name": "repayVAIGuardianPaused", "outputs": [ { - "internalType": "contract VToken", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -27256,44 +27411,29 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" }, { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "approvedDelegates", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowCapGuardian", + "name": "setMintedVAIOf", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -27305,7 +27445,7 @@ "type": "address" } ], - "name": "borrowCaps", + "name": "supplyCaps", "outputs": [ { "internalType": "uint256", @@ -27318,129 +27458,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address[]", - "name": "holders", - "type": "address[]" - }, - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - }, - { - "internalType": "bool", - "name": "borrowers", - "type": "bool" - }, - { - "internalType": "bool", - "name": "suppliers", - "type": "bool" - }, - { - "internalType": "bool", - "name": "collateral", - "type": "bool" - } - ], - "name": "claimVenus", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - } - ], - "name": "claimVenus", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - } - ], - "name": "claimVenus", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address[]", - "name": "holders", - "type": "address[]" - }, - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - }, - { - "internalType": "bool", - "name": "borrowers", - "type": "bool" - }, - { - "internalType": "bool", - "name": "suppliers", - "type": "bool" - } - ], - "name": "claimVenus", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryAddress", + "outputs": [ { "internalType": "address", - "name": "holder", + "name": "", "type": "address" } ], - "name": "claimVenusAsCollateral", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "closeFactorMantissa", + "name": "treasuryGuardian", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -27450,12 +27490,12 @@ { "constant": true, "inputs": [], - "name": "comptrollerImplementation", + "name": "treasuryPercent", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -27465,10 +27505,10 @@ { "constant": true, "inputs": [], - "name": "comptrollerLens", + "name": "vaiController", "outputs": [ { - "internalType": "contract ComptrollerLensInterface", + "internalType": "contract VAIControllerInterface", "name": "", "type": "address" } @@ -27480,12 +27520,12 @@ { "constant": true, "inputs": [], - "name": "getXVSAddress", + "name": "vaiMintRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -27495,7 +27535,7 @@ { "constant": true, "inputs": [], - "name": "getXVSVTokenAddress", + "name": "vaiVaultAddress", "outputs": [ { "internalType": "address", @@ -27516,12 +27556,12 @@ "type": "address" } ], - "name": "isForcedLiquidationEnabled", + "name": "venusAccrued", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -27535,29 +27575,9 @@ "internalType": "address", "name": "", "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isForcedLiquidationEnabledForUser", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "liquidationIncentiveMantissa", + "name": "venusBorrowSpeeds", "outputs": [ { "internalType": "uint256", @@ -27569,21 +27589,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "liquidatorContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [ @@ -27593,22 +27598,17 @@ "type": "address" } ], - "name": "markets", + "name": "venusBorrowState", "outputs": [ { - "internalType": "bool", - "name": "isListed", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "collateralFactorMantissa", - "type": "uint256" + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "bool", - "name": "isVenus", - "type": "bool" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], "payable": false, @@ -27617,23 +27617,19 @@ }, { "constant": true, - "inputs": [], - "name": "maxAssets", - "outputs": [ + "inputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "minReleaseAmount", + "name": "venusBorrowerIndex", "outputs": [ { "internalType": "uint256", @@ -27648,12 +27644,12 @@ { "constant": true, "inputs": [], - "name": "mintVAIGuardianPaused", + "name": "venusInitialIndex", "outputs": [ { - "internalType": "bool", + "internalType": "uint224", "name": "", - "type": "bool" + "type": "uint224" } ], "payable": false, @@ -27667,29 +27663,19 @@ "internalType": "address", "name": "", "type": "address" - } - ], - "name": "mintedVAIs", - "outputs": [ + }, { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "oracle", + "name": "venusSupplierIndex", "outputs": [ { - "internalType": "contract PriceOracle", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -27698,28 +27684,19 @@ }, { "constant": true, - "inputs": [], - "name": "pauseGuardian", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", + "name": "venusSupplySpeeds", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -27728,43 +27705,24 @@ }, { "constant": true, - "inputs": [], - "name": "pendingComptrollerImplementation", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "prime", + "name": "venusSupplyState", "outputs": [ { - "internalType": "contract IPrime", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolPaused", - "outputs": [ + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], "payable": false, @@ -27774,7 +27732,7 @@ { "constant": true, "inputs": [], - "name": "releaseStartBlock", + "name": "venusVAIVaultRate", "outputs": [ { "internalType": "uint256", @@ -27785,372 +27743,534 @@ "payable": false, "stateMutability": "view", "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "repayVAIGuardianPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, + } + ] + }, + "SnapshotLens": { + "address": "0x9802448Af040DA880Bf51bCbe4f2A4205ebC6d2C", + "abi": [ { "constant": false, "inputs": [ { - "internalType": "address[]", - "name": "holders", - "type": "address[]" - }, - { - "internalType": "address", - "name": "recipient", + "internalType": "address payable", + "name": "account", "type": "address" - } - ], - "name": "seizeVenus", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, { "internalType": "address", - "name": "", + "name": "comptrollerAddress", "type": "address" } ], - "name": "supplyCaps", + "name": "getAccountSnapshot", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryAddress", - "outputs": [ - { - "internalType": "address", + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "string", + "name": "assetName", + "type": "string" + }, + { + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "underlyingAssetAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyInUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowsInUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accruedInterest", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vTokenDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exchangeRate", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isACollateral", + "type": "bool" + } + ], + "internalType": "struct SnapshotLens.AccountSnapshot[]", "name": "", - "type": "address" + "type": "tuple[]" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "treasuryGuardian", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, { "internalType": "address", - "name": "", + "name": "comptrollerAddress", + "type": "address" + }, + { + "internalType": "contract VToken", + "name": "vToken", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryPercent", + "name": "getAccountSnapshot", "outputs": [ { - "internalType": "uint256", + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "string", + "name": "assetName", + "type": "string" + }, + { + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "underlyingAssetAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyInUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateral", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowsInUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "assetPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accruedInterest", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vTokenDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exchangeRate", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isACollateral", + "type": "bool" + } + ], + "internalType": "struct SnapshotLens.AccountSnapshot", "name": "", - "type": "uint256" + "type": "tuple" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "vaiController", - "outputs": [ + "inputs": [ { - "internalType": "contract VAIControllerInterface", - "name": "", + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "address", + "name": "comptrollerAddress", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiMintRate", + "name": "isACollateral", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "SwapRouterCorePool": { + "address": "0x8938E6dA30b59c1E27d5f70a94688A89F7c815a4", + "abi": [ { - "constant": true, - "inputs": [], - "name": "vaiVaultAddress", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "WBNB_", + "type": "address" + }, + { + "internalType": "address", + "name": "factory_", + "type": "address" + }, + { + "internalType": "address", + "name": "_comptrollerAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_vBNBAddress", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusAccrued", - "outputs": [ + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, { "internalType": "uint256", - "name": "", + "name": "amountMax", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "ExcessiveInputAmount", + "type": "error" + }, + { + "inputs": [], + "name": "IdenticalAddresses", + "type": "error" }, { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusBorrowSpeeds", - "outputs": [ + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, { "internalType": "uint256", - "name": "", + "name": "amountIntMax", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "InputAmountAboveMaximum", + "type": "error" }, { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" } ], - "name": "venusBorrowState", - "outputs": [ + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientInputAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientLiquidity", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientOutputAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidPath", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" }, { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OutputAmountBelowMinimum", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrantCheck", + "type": "error" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "repayer", "type": "address" }, { "internalType": "address", - "name": "", + "name": "vToken", "type": "address" - } - ], - "name": "venusBorrowerIndex", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "errorCode", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "RepayError", + "type": "error" }, { - "constant": true, "inputs": [], - "name": "venusInitialIndex", - "outputs": [ - { - "internalType": "uint224", - "name": "", - "type": "uint224" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "SafeApproveFailed", + "type": "error" + }, + { + "inputs": [], + "name": "SafeTransferBNBFailed", + "type": "error" + }, + { + "inputs": [], + "name": "SafeTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "SafeTransferFromFailed", + "type": "error" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "supplier", "type": "address" }, { "internalType": "address", - "name": "", + "name": "vToken", "type": "address" - } - ], - "name": "venusSupplierIndex", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "errorCode", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "SupplyError", + "type": "error" }, { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "swapAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" } ], - "name": "venusSupplySpeeds", - "outputs": [ + "name": "SwapAmountLessThanAmountOutMin", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestemp", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "SwapDeadlineExpire", + "type": "error" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "vToken", "type": "address" } ], - "name": "venusSupplyState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, + "name": "VTokenNotListed", + "type": "error" + }, + { + "inputs": [ { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "address", + "name": "underlying", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "VTokenUnderlyingInvalid", + "type": "error" }, { - "constant": true, - "inputs": [], - "name": "venusVAIVaultRate", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "expectedAdddress", + "type": "address" + }, + { + "internalType": "address", + "name": "passedAddress", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "SXP": { - "address": "0x47BEAd2563dCBf3bF2c9407fEa4dC236fAbA485A", - "abi": [ + "name": "WrongAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "account", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "OwnershipTransferStarted", + "type": "event" }, { "anonymous": false, @@ -28158,23 +28278,17 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "Approval", + "name": "OwnershipTransferred", "type": "event" }, { @@ -28183,23 +28297,42 @@ { "indexed": true, "internalType": "address", - "name": "delegator", + "name": "swapper", "type": "address" }, { "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" + "internalType": "address[]", + "name": "path", + "type": "address[]" }, + { + "indexed": true, + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "SwapBnbForTokens", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "toDelegate", + "name": "swapper", "type": "address" + }, + { + "indexed": true, + "internalType": "address[]", + "name": "path", + "type": "address[]" } ], - "name": "DelegateChanged", + "name": "SwapBnbForTokensAtSupportingFee", "type": "event" }, { @@ -28208,29 +28341,42 @@ { "indexed": true, "internalType": "address", - "name": "delegate", + "name": "swapper", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" + "indexed": true, + "internalType": "address[]", + "name": "path", + "type": "address[]" }, { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" + "indexed": true, + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "name": "DelegateVotesChanged", + "name": "SwapTokensForBnb", "type": "event" }, { "anonymous": false, - "inputs": [], - "name": "Freezed", + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "swapper", + "type": "address" + }, + { + "indexed": true, + "internalType": "address[]", + "name": "path", + "type": "address[]" + } + ], + "name": "SwapTokensForBnbAtSupportingFee", "type": "event" }, { @@ -28239,11 +28385,23 @@ { "indexed": true, "internalType": "address", - "name": "who", + "name": "swapper", "type": "address" + }, + { + "indexed": true, + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "indexed": true, + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "name": "LockUser", + "name": "SwapTokensForTokens", "type": "event" }, { @@ -28252,17 +28410,17 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "swapper", "type": "address" }, { "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "address[]", + "name": "path", + "type": "address[]" } ], - "name": "OwnershipTransferred", + "name": "SwapTokensForTokensAtSupportingFee", "type": "event" }, { @@ -28271,7 +28429,7 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "token", "type": "address" }, { @@ -28283,17 +28441,11 @@ { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "sweepAmount", "type": "uint256" } ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "UnFreezed", + "name": "SweepToken", "type": "event" }, { @@ -28302,1227 +28454,1467 @@ { "indexed": true, "internalType": "address", - "name": "who", + "name": "oldAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", "type": "address" } ], - "name": "UnlockUser", + "name": "VBNBAddressUpdated", "type": "event" }, { - "constant": true, "inputs": [], - "name": "DELEGATION_TYPEHASH", + "name": "WBNB", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "DOMAIN_TYPEHASH", + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "comptrollerAddress", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", + "inputs": [], + "name": "factory", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "reserveIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveOut", "type": "uint256" } ], - "name": "approve", + "name": "getAmountIn", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "reserveIn", "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "reserveOut", + "type": "uint256" } ], - "name": "approveAndCall", + "name": "getAmountOut", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { - "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" } ], - "name": "balanceOf", + "name": "getAmountsIn", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "amountIn", "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" } ], - "name": "burn", + "name": "getAmountsOut", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", "name": "", "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "decimals", + "name": "pendingOwner", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "amountA", + "type": "uint256" }, { "internalType": "uint256", - "name": "subtractedValue", + "name": "reserveA", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveB", "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "quote", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "amountB", + "type": "uint256" } ], - "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "delegatee", + "name": "_vBNBAddress", "type": "address" } ], - "name": "delegate", + "name": "setVBNBAddress", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, { "internalType": "uint256", - "name": "nonce", + "name": "amountOut", "type": "uint256" }, { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" + "internalType": "address[]", + "name": "path", + "type": "address[]" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" + "internalType": "address", + "name": "to", + "type": "address" }, { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapBNBForExactTokens", + "outputs": [ { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenAddress", "type": "address" - } - ], - "name": "delegates", - "outputs": [ + }, { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "freeze", + "name": "swapBNBForExactTokensAndRepay", "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "vTokenAddress", "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ + }, { - "internalType": "uint96", - "name": "", - "type": "uint96" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "swapBNBForExactTokensAndSupply", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "getOwner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "vTokenAddress", "type": "address" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "swapBNBForFullTokenDebtAndRepay", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": true, "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, { "internalType": "address", - "name": "account", + "name": "to", "type": "address" }, { "internalType": "uint256", - "name": "blockNumber", + "name": "deadline", "type": "uint256" } ], - "name": "getPriorVotes", + "name": "swapExactBNBForTokens", "outputs": [ { - "internalType": "uint96", - "name": "", - "type": "uint96" + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "payable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "vTokenAddress", "type": "address" }, { "internalType": "uint256", - "name": "addedValue", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", "type": "uint256" } ], - "name": "increaseAllowance", - "outputs": [ + "name": "swapExactBNBForTokensAndRepay", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "name": "swapExactBNBForTokensAndRepayAtSupportingFee", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "who", + "name": "vTokenAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "lockUser", + "name": "swapExactBNBForTokensAndSupply", "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "swapExactBNBForTokensAndSupplyAtSupportingFee", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": true, "inputs": [ + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, { "internalType": "address", - "name": "", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "nonces", + "name": "swapExactBNBForTokensAtSupportingFee", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "swapAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "payable", "type": "function" }, { - "constant": true, "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, { "internalType": "address", - "name": "", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "numCheckpoints", + "name": "swapExactTokensForBNB", "outputs": [ { - "internalType": "uint32", - "name": "", - "type": "uint32" + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "swapExactTokensForBNBAndRepay", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "renounceOwnership", + "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "swapExactTokensForBNBAndRepayAtSupportingFee", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "swapExactTokensForBNBAndSupply", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "swapExactTokensForBNBAndSupplyAtSupportingFee", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, { "internalType": "address", - "name": "recipient", + "name": "to", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "deadline", "type": "uint256" } ], - "name": "transfer", + "name": "swapExactTokensForBNBAtSupportingFee", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "swapAmount", + "type": "uint256" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "sender", - "type": "address" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" }, { "internalType": "address", - "name": "recipient", + "name": "to", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "deadline", "type": "uint256" } ], - "name": "transferFrom", + "name": "swapExactTokensForTokens", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "vTokenAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "unfreeze", + "name": "swapExactTokensForTokensAndRepay", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "who", + "name": "vTokenAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "unlockUser", + "name": "swapExactTokensForTokensAndRepayAtSupportingFee", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "SetterFacet": { - "address": "0x7dc9E7b21a9E343f4AD926b8B00Cff5adf5c1CdE", - "abi": [ + }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "vTokenAddress", "type": "address" }, { - "indexed": true, - "internalType": "enum ComptrollerTypes.Action", - "name": "action", - "type": "uint8" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" }, { - "indexed": false, - "internalType": "bool", - "name": "pauseState", - "type": "bool" - } - ], - "name": "ActionPausedMarket", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" + }, { - "indexed": false, - "internalType": "bool", - "name": "state", - "type": "bool" - } - ], - "name": "ActionProtocolPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "deadline", "type": "uint256" } ], - "name": "DistributedVAIVaultVenus", - "type": "event" + "name": "swapExactTokensForTokensAndSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + }, + { "internalType": "uint256", - "name": "error", + "name": "amountIn", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "info", + "name": "amountOutMin", "type": "uint256" }, { - "indexed": false, + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { "internalType": "uint256", - "name": "detail", + "name": "deadline", "type": "uint256" } ], - "name": "Failure", - "type": "event" + "name": "swapExactTokensForTokensAndSupplyAtSupportingFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "borrower", - "type": "address" + "internalType": "uint256", + "name": "amountIn", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "vToken", - "type": "address" + "internalType": "uint256", + "name": "amountOutMin", + "type": "uint256" }, { - "indexed": false, - "internalType": "bool", - "name": "enable", - "type": "bool" - } - ], - "name": "IsForcedLiquidationEnabledForUserUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, { - "indexed": true, "internalType": "address", - "name": "vToken", + "name": "to", "type": "address" }, { - "indexed": false, - "internalType": "bool", - "name": "enable", - "type": "bool" + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "IsForcedLiquidationEnabledUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - }, + "name": "swapExactTokensForTokensAtSupportingFee", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "swapAmount", + "type": "uint256" } ], - "name": "MarketEntered", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" }, { - "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "NewAccessControl", - "type": "event" + "name": "swapTokensForExactBNB", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newBorrowCap", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", "type": "uint256" } ], - "name": "NewBorrowCap", - "type": "event" + "name": "swapTokensForExactBNBAndRepay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldCloseFactorMantissa", + "name": "amountOut", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newCloseFactorMantissa", + "name": "amountInMax", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", "type": "uint256" } ], - "name": "NewCloseFactor", - "type": "event" + "name": "swapTokensForExactBNBAndSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "oldCollateralFactorMantissa", + "name": "amountInMax", "type": "uint256" }, { - "indexed": false, + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { "internalType": "uint256", - "name": "newCollateralFactorMantissa", + "name": "deadline", "type": "uint256" } ], - "name": "NewCollateralFactor", - "type": "event" + "name": "swapTokensForExactTokens", + "outputs": [ + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "oldComptrollerLens", + "name": "vTokenAddress", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newComptrollerLens", - "type": "address" - } - ], - "name": "NewComptrollerLens", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, { - "indexed": false, "internalType": "uint256", - "name": "oldLiquidationIncentiveMantissa", + "name": "amountInMax", "type": "uint256" }, { - "indexed": false, + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { "internalType": "uint256", - "name": "newLiquidationIncentiveMantissa", + "name": "deadline", "type": "uint256" } ], - "name": "NewLiquidationIncentive", - "type": "event" + "name": "swapTokensForExactTokensAndRepay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "oldLiquidatorContract", + "name": "vTokenAddress", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newLiquidatorContract", - "type": "address" - } - ], - "name": "NewLiquidatorContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "amountOut", + "type": "uint256" + }, { - "indexed": false, - "internalType": "address", - "name": "oldPauseGuardian", - "type": "address" + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "newPauseGuardian", - "type": "address" + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "NewPauseGuardian", - "type": "event" + "name": "swapTokensForExactTokensAndSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "contract PriceOracle", - "name": "oldPriceOracle", - "type": "address" + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" }, { - "indexed": false, - "internalType": "contract PriceOracle", - "name": "newPriceOracle", - "type": "address" + "internalType": "address[]", + "name": "path", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" } ], - "name": "NewPriceOracle", - "type": "event" + "name": "swapTokensForFullBNBDebtAndRepay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "contract IPrime", - "name": "oldPrimeToken", + "internalType": "address", + "name": "vTokenAddress", "type": "address" }, { - "indexed": false, - "internalType": "contract IPrime", - "name": "newPrimeToken", - "type": "address" - } - ], - "name": "NewPrimeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "amountInMax", + "type": "uint256" + }, { - "indexed": true, - "internalType": "contract VToken", - "name": "vToken", - "type": "address" + "internalType": "address[]", + "name": "path", + "type": "address[]" }, { - "indexed": false, "internalType": "uint256", - "name": "newSupplyCap", + "name": "deadline", "type": "uint256" } ], - "name": "NewSupplyCap", - "type": "event" + "name": "swapTokensForFullTokenDebtAndRepay", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryAddress", + "internalType": "contract IERC20", + "name": "token", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newTreasuryAddress", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" } ], - "name": "NewTreasuryAddress", - "type": "event" + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "oldTreasuryGuardian", + "name": "newOwner", "type": "address" - }, + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vBNBAddress", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "newTreasuryGuardian", + "name": "", "type": "address" } ], - "name": "NewTreasuryGuardian", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "TRX": { + "address": "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3", + "abi": [ + { "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldTreasuryPercent", - "type": "uint256" + "internalType": "string", + "name": "name_", + "type": "string" }, { - "indexed": false, - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" + "internalType": "string", + "name": "symbol_", + "type": "string" } ], - "name": "NewTreasuryPercent", - "type": "event" + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "contract VAIControllerInterface", - "name": "oldVAIController", + "indexed": true, + "internalType": "address", + "name": "owner", "type": "address" }, { - "indexed": false, - "internalType": "contract VAIControllerInterface", - "name": "newVAIController", + "indexed": true, + "internalType": "address", + "name": "spender", "type": "address" - } - ], - "name": "NewVAIController", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldVAIMintRate", - "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newVAIMintRate", + "name": "value", "type": "uint256" } ], - "name": "NewVAIMintRate", + "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "vault_", + "name": "userAddress", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "releaseStartBlock_", - "type": "uint256" + "internalType": "address payable", + "name": "relayerAddress", + "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "releaseInterval_", - "type": "uint256" + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" } ], - "name": "NewVAIVaultInfo", + "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldVenusVAIVaultRate", - "type": "uint256" + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - "indexed": false, - "internalType": "uint256", - "name": "newVenusVAIVaultRate", - "type": "uint256" + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" } ], - "name": "NewVenusVAIVaultRate", + "name": "RoleAdminChanged", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "indexed": true, "internalType": "address", - "name": "oldXVS", + "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newXVS", + "name": "sender", "type": "address" } ], - "name": "NewXVSToken", + "name": "RoleGranted", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "indexed": true, "internalType": "address", - "name": "oldXVSVToken", + "name": "account", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newXVSVToken", + "name": "sender", "type": "address" } ], - "name": "NewXVSVToken", + "name": "RoleRevoked", "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "newAccessControlAddress", + "name": "from", "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "_setAccessControl", + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "inputs": [], + "name": "ERC712_VERSION", + "outputs": [ { - "internalType": "address[]", - "name": "markets_", - "type": "address[]" - }, - { - "internalType": "enum ComptrollerTypes.Action[]", - "name": "actions_", - "type": "uint8[]" - }, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PREDICATE_ROLE", + "outputs": [ { - "internalType": "bool", - "name": "paused_", - "type": "bool" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "_setActionsPaused", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "newCloseFactorMantissa", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "_setCloseFactor", + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -29530,46 +29922,42 @@ "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract VToken", - "name": "vToken", + "internalType": "address", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "newCollateralFactorMantissa", + "name": "amount", "type": "uint256" } ], - "name": "_setCollateralFactor", + "name": "approve", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract ComptrollerLensInterface", - "name": "comptrollerLens_", + "internalType": "address", + "name": "account", "type": "address" } ], - "name": "_setComptrollerLens", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -29577,399 +29965,365 @@ "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "vTokenBorrowed", - "type": "address" - }, + "inputs": [], + "name": "decimals", + "outputs": [ { - "internalType": "bool", - "name": "enable", - "type": "bool" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "name": "_setForcedLiquidation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "address", - "name": "vTokenBorrowed", + "name": "spender", "type": "address" }, - { - "internalType": "bool", - "name": "enable", - "type": "bool" - } - ], - "name": "_setForcedLiquidationForUser", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ { "internalType": "uint256", - "name": "newLiquidationIncentiveMantissa", + "name": "subtractedValue", "type": "uint256" } ], - "name": "_setLiquidationIncentive", + "name": "decreaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "newLiquidatorContract_", + "name": "userAddress", "type": "address" + }, + { + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "sigR", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "sigS", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "sigV", + "type": "uint8" } ], - "name": "_setLiquidatorContract", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "name": "executeMetaTransaction", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "payable", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - }, + "inputs": [], + "name": "getChainId", + "outputs": [ { - "internalType": "uint256[]", - "name": "newBorrowCaps", - "type": "uint256[]" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_setMarketBorrowCaps", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - }, + "inputs": [], + "name": "getDomainSeperator", + "outputs": [ { - "internalType": "uint256[]", - "name": "newSupplyCaps", - "type": "uint256[]" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "_setMarketSupplyCaps", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "newPauseGuardian", + "name": "user", "type": "address" } ], - "name": "_setPauseGuardian", + "name": "getNonce", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "nonce", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract PriceOracle", - "name": "newOracle", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" } ], - "name": "_setPriceOracle", + "name": "getRoleAdmin", "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract IPrime", - "name": "_prime", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" } ], - "name": "_setPrimeToken", + "name": "getRoleMember", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "bool", - "name": "state", - "type": "bool" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" } ], - "name": "_setProtocolPaused", + "name": "getRoleMemberCount", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { "internalType": "address", - "name": "newTreasuryAddress", + "name": "account", "type": "address" - }, - { - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "_setTreasuryData", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], - "payable": false, + "name": "grantRole", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract VAIControllerInterface", - "name": "vaiController_", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", "type": "address" } ], - "name": "_setVAIController", + "name": "hasRole", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "newVAIMintRate", + "name": "addedValue", "type": "uint256" } ], - "name": "_setVAIMintRate", + "name": "increaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "vault_", + "name": "user", "type": "address" }, { "internalType": "uint256", - "name": "releaseStartBlock_", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minReleaseAmount_", + "name": "amount", "type": "uint256" } ], - "name": "_setVAIVaultInfo", + "name": "mint", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "inputs": [], + "name": "name", + "outputs": [ { - "internalType": "uint256", - "name": "venusVAIVaultRate_", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "_setVenusVAIVaultRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "internalType": "address", - "name": "xvs_", + "name": "account", "type": "address" } ], - "name": "_setXVSToken", + "name": "renounceRole", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, { "internalType": "address", - "name": "xvsVToken_", + "name": "account", "type": "address" } ], - "name": "_setXVSVToken", + "name": "revokeRole", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, + "inputs": [], + "name": "symbol", + "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], - "name": "accountAssets", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", "outputs": [ { - "internalType": "contract VToken", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "market", + "name": "recipient", "type": "address" }, { - "internalType": "enum ComptrollerTypes.Action", - "name": "action", - "type": "uint8" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "actionPaused", + "name": "transfer", "outputs": [ { "internalType": "bool", @@ -29977,280 +30331,262 @@ "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "sender", "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "name": "allMarkets", + "name": "transferFrom", "outputs": [ { - "internalType": "contract VToken", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "TRXOLD": { + "address": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", + "abi": [ { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "logic", "type": "address" }, { "internalType": "address", - "name": "", + "name": "admin", "type": "address" - } - ], - "name": "approvedDelegates", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": true, - "inputs": [], - "name": "borrowCapGuardian", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "implementation", "type": "address" } ], - "name": "borrowCaps", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" }, { - "constant": true, "inputs": [], - "name": "closeFactorMantissa", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "comptrollerImplementation", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newAdmin", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "comptrollerLens", + "name": "implementation", "outputs": [ { - "internalType": "contract ComptrollerLensInterface", + "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "getXVSAddress", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newImplementation", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "newImplementation", "type": "address" - } - ], - "name": "isForcedLiquidationEnabled", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "payable": false, - "stateMutability": "view", + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": true, + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "owner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "spender", "type": "address" - } - ], - "name": "isForcedLiquidationEnabledForUser", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "liquidationIncentiveMantissa", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Approval", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "liquidatorContract", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "from", "type": "address" - } - ], - "name": "markets", - "outputs": [ + }, { - "internalType": "bool", - "name": "isListed", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "collateralFactorMantissa", + "name": "value", "type": "uint256" - }, - { - "internalType": "bool", - "name": "isVenus", - "type": "bool" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Transfer", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "maxAssets", + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -30258,29 +30594,23 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "minReleaseAmount", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mintVAIGuardianPaused", + "name": "approve", "outputs": [ { "internalType": "bool", @@ -30288,20 +30618,18 @@ "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "mintedVAIs", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -30309,119 +30637,92 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "oracle", - "outputs": [ + "inputs": [ { - "internalType": "contract PriceOracle", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pauseGuardian", + "name": "burn", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "decimals", "outputs": [ { - "internalType": "address", + "internalType": "uint8", "name": "", - "type": "address" + "type": "uint8" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingComptrollerImplementation", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "prime", + "name": "decreaseAllowance", "outputs": [ { - "internalType": "contract IPrime", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "protocolPaused", + "name": "getOwner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "releaseStartBlock", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "addedValue", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "repayVAIGuardianPaused", + "name": "increaseAllowance", "outputs": [ { "internalType": "bool", @@ -30429,1070 +30730,814 @@ "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" }, { "internalType": "uint256", "name": "amount", "type": "uint256" - } - ], - "name": "setMintedVAIOf", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bool", + "name": "mintable", + "type": "bool" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" } ], - "payable": false, + "name": "initialize", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "supplyCaps", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryAddress", + "name": "mint", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "treasuryGuardian", + "name": "mintable", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "treasuryPercent", + "name": "name", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "vaiController", - "outputs": [ - { - "internalType": "contract VAIControllerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "vaiMintRate", + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "vaiVaultAddress", + "name": "totalSupply", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "venusAccrued", + "name": "transfer", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "venusBorrowSpeeds", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "name": "venusBorrowState", - "outputs": [ + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "TUSD": { + "address": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" + "indexed": false, + "internalType": "address", + "name": "currentOwner", + "type": "address" }, { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "indexed": false, + "internalType": "address", + "name": "pendingOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewPendingOwner", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "previousOwner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "name": "venusBorrowerIndex", - "outputs": [ + "name": "ProxyOwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "claimProxyOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "venusInitialIndex", + "name": "implementation", "outputs": [ { - "internalType": "uint224", - "name": "", - "type": "uint224" + "internalType": "address", + "name": "impl", + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, + "inputs": [], + "name": "pendingProxyOwner", + "outputs": [ { "internalType": "address", - "name": "", + "name": "pendingOwner", "type": "address" } ], - "name": "venusSupplierIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [ + "inputs": [], + "name": "proxyOwner", + "outputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], - "name": "venusSupplySpeeds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "name": "venusSupplyState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", + "name": "transferProxyOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "venusVAIVaultRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "SnapshotLens": { - "address": "0x9802448Af040DA880Bf51bCbe4f2A4205ebC6d2C", - "abi": [ - { - "constant": false, "inputs": [ - { - "internalType": "address payable", - "name": "account", - "type": "address" - }, { "internalType": "address", - "name": "comptrollerAddress", + "name": "implementation", "type": "address" } ], - "name": "getAccountSnapshot", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "string", - "name": "assetName", - "type": "string" - }, - { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "underlyingAssetAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "supply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supplyInUsd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "collateral", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowsInUsd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "assetPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accruedInterest", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "vTokenDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "underlyingDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "exchangeRate", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isACollateral", - "type": "bool" - } - ], - "internalType": "struct SnapshotLens.AccountSnapshot[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, + "name": "upgradeTo", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, "inputs": [ { - "internalType": "address payable", - "name": "account", + "indexed": true, + "internalType": "address", + "name": "owner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "comptrollerAddress", + "name": "spender", "type": "address" }, { - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "string", - "name": "assetName", - "type": "string" - }, - { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "underlyingAssetAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "supply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supplyInUsd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "collateral", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowsInUsd", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "assetPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accruedInterest", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "vTokenDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "underlyingDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "exchangeRate", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isACollateral", - "type": "bool" - } - ], - "internalType": "struct SnapshotLens.AccountSnapshot", - "name": "", - "type": "tuple" + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Approval", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", "name": "account", "type": "address" }, { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "address", - "name": "comptrollerAddress", - "type": "address" - } - ], - "name": "isACollateral", - "outputs": [ - { + "indexed": false, "internalType": "bool", - "name": "", + "name": "isBlacklisted", "type": "bool" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "SwapRouterCorePool": { - "address": "0x8938E6dA30b59c1E27d5f70a94688A89F7c815a4", - "abi": [ + "name": "Blacklisted", + "type": "event" + }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "WBNB_", + "name": "burner", "type": "address" }, { - "internalType": "address", - "name": "factory_", - "type": "address" - }, + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_comptrollerAddress", + "name": "to", "type": "address" }, { - "internalType": "address", - "name": "_vBNBAddress", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Mint", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldFeed", + "type": "address" }, { - "internalType": "uint256", - "name": "amountMax", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newFeed", + "type": "address" } ], - "name": "ExcessiveInputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "IdenticalAddresses", - "type": "error" + "name": "NewChainReserveFeed", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "amountIn", + "name": "oldHeartbeat", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "amountIntMax", + "name": "newHeartbeat", "type": "uint256" } ], - "name": "InputAmountAboveMaximum", - "type": "error" + "name": "NewChainReserveHeartbeat", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "sweepAmount", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - "internalType": "uint256", - "name": "balance", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "InsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientInputAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientLiquidity", - "type": "error" + "name": "OwnershipTransferred", + "type": "event" }, { + "anonymous": false, "inputs": [], - "name": "InsufficientOutputAmount", - "type": "error" + "name": "ProofOfReserveDisabled", + "type": "event" }, { + "anonymous": false, "inputs": [], - "name": "InvalidPath", - "type": "error" + "name": "ProofOfReserveEnabled", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "amountOut", + "name": "newMin", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "amountOutMin", + "name": "newMax", "type": "uint256" } ], - "name": "OutputAmountBelowMinimum", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrantCheck", - "type": "error" + "name": "SetBurnBounds", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "repayer", + "name": "from", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "vToken", + "name": "to", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "errorCode", + "name": "value", "type": "uint256" } ], - "name": "RepayError", - "type": "error" - }, - { - "inputs": [], - "name": "SafeApproveFailed", - "type": "error" - }, - { - "inputs": [], - "name": "SafeTransferBNBFailed", - "type": "error" - }, - { - "inputs": [], - "name": "SafeTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "SafeTransferFromFailed", - "type": "error" + "name": "Transfer", + "type": "event" }, { "inputs": [ { "internalType": "address", - "name": "supplier", + "name": "owner", "type": "address" }, { "internalType": "address", - "name": "vToken", + "name": "spender", "type": "address" - }, + } + ], + "name": "allowance", + "outputs": [ { "internalType": "uint256", - "name": "errorCode", + "name": "", "type": "uint256" } ], - "name": "SupplyError", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "swapAmount", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "amountOutMin", + "name": "amount", "type": "uint256" } ], - "name": "SwapAmountLessThanAmountOutMin", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, + "name": "approve", + "outputs": [ { - "internalType": "uint256", - "name": "timestemp", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SwapDeadlineExpire", - "type": "error" + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "vToken", + "name": "account", "type": "address" } ], - "name": "VTokenNotListed", - "type": "error" + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "underlying", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "VTokenUnderlyingInvalid", - "type": "error" + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "expectedAdddress", - "type": "address" - }, + "inputs": [], + "name": "burnMax", + "outputs": [ { - "internalType": "address", - "name": "passedAddress", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "WrongAddress", - "type": "error" + "stateMutability": "view", + "type": "function" }, { "inputs": [], - "name": "ZeroAddress", - "type": "error" + "name": "burnMin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "", "type": "address" - }, + } + ], + "name": "canBurn", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "OwnershipTransferStarted", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "inputs": [], + "name": "chainReserveFeed", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "swapper", - "type": "address" - }, - { - "indexed": true, - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "inputs": [], + "name": "chainReserveHeartbeat", + "outputs": [ { - "indexed": true, - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "SwapBnbForTokens", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "swapper", - "type": "address" - }, + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ { - "indexed": true, - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "name": "SwapBnbForTokensAtSupportingFee", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "swapper", + "name": "spender", "type": "address" }, { - "indexed": true, - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ { - "indexed": true, - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SwapTokensForBnb", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "disableProofOfReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "enableProofOfReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getOwner", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "swapper", + "name": "", "type": "address" - }, - { - "indexed": true, - "internalType": "address[]", - "name": "path", - "type": "address[]" } ], - "name": "SwapTokensForBnbAtSupportingFee", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "swapper", + "name": "spender", "type": "address" }, { - "indexed": true, - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "indexed": true, - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" } ], - "name": "SwapTokensForTokens", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "swapper", - "type": "address" - }, + "name": "increaseAllowance", + "outputs": [ { - "indexed": true, - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SwapTokensForTokensAtSupportingFee", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "to", + "name": "account", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "sweepAmount", + "name": "amount", "type": "uint256" } ], - "name": "SweepToken", - "type": "event" + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldAddress", - "type": "address" - }, + "inputs": [], + "name": "name", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "VBNBAddressUpdated", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { "inputs": [], - "name": "WBNB", + "name": "owner", "outputs": [ { "internalType": "address", @@ -31505,14 +31550,7 @@ }, { "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "comptrollerAddress", + "name": "pendingOwner", "outputs": [ { "internalType": "address", @@ -31525,12 +31563,12 @@ }, { "inputs": [], - "name": "factory", + "name": "proofOfReserveEnabled", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -31539,27 +31577,42 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, + "internalType": "address payable", + "name": "_to", + "type": "address" + } + ], + "name": "reclaimEther", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" + "internalType": "contract IBEP20", + "name": "token", + "type": "address" }, { - "internalType": "uint256", - "name": "reserveOut", - "type": "uint256" + "internalType": "address", + "name": "_to", + "type": "address" } ], - "name": "getAmountIn", + "name": "reclaimToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rounding", "outputs": [ { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], "stateMutability": "pure", @@ -31568,101 +31621,104 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" }, { - "internalType": "uint256", - "name": "reserveIn", - "type": "uint256" - }, + "internalType": "bool", + "name": "_isBlacklisted", + "type": "bool" + } + ], + "name": "setBlacklisted", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "reserveOut", + "name": "_min", "type": "uint256" - } - ], - "name": "getAmountOut", - "outputs": [ + }, { "internalType": "uint256", - "name": "amountOut", + "name": "_max", "type": "uint256" } ], - "stateMutability": "pure", + "name": "setBurnBounds", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "bool", + "name": "_canBurn", + "type": "bool" } ], - "name": "getAmountsIn", - "outputs": [ + "name": "setCanBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "address", + "name": "newFeed", + "type": "address" } ], - "stateMutability": "view", + "name": "setChainReserveFeed", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "amountIn", + "name": "newHeartbeat", "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - } - ], - "name": "getAmountsOut", - "outputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" } ], - "stateMutability": "view", + "name": "setChainReserveHeartbeat", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "owner", + "name": "symbol", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "inputs": [], - "name": "pendingOwner", + "name": "totalSupply", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -31671,36 +31727,24 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountA", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveA", - "type": "uint256" + "internalType": "address", + "name": "recipient", + "type": "address" }, { "internalType": "uint256", - "name": "reserveB", + "name": "amount", "type": "uint256" } ], - "name": "quote", + "name": "transfer", "outputs": [ { - "internalType": "uint256", - "name": "amountB", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -31708,342 +31752,297 @@ "inputs": [ { "internalType": "address", - "name": "_vBNBAddress", + "name": "sender", "type": "address" - } - ], - "name": "setVBNBAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" }, { "internalType": "address", - "name": "to", + "name": "recipient", "type": "address" }, { "internalType": "uint256", - "name": "deadline", + "name": "amount", "type": "uint256" } ], - "name": "swapBNBForExactTokens", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "vTokenAddress", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" } ], - "name": "swapBNBForExactTokensAndRepay", + "name": "transferOwnership", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "TUSDOLD": { + "address": "0x14016E85a25aeb13065688cAFB43044C2ef86784", + "abi": [ { "inputs": [ { "internalType": "address", - "name": "vTokenAddress", + "name": "logic", "type": "address" }, { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "address", + "name": "admin", + "type": "address" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "swapBNBForExactTokensAndSupply", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "vTokenAddress", + "name": "previousAdmin", "type": "address" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "swapBNBForFullTokenDebtAndRepay", - "outputs": [], + "name": "Upgraded", + "type": "event" + }, + { "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, { "internalType": "address", - "name": "to", + "name": "newAdmin", "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" } ], - "name": "swapExactBNBForTokens", + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", "outputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "address", + "name": "", + "type": "address" } ], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "vTokenAddress", + "name": "newImplementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" } ], - "name": "swapExactBNBForTokensAndRepay", + "name": "upgradeTo", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "vTokenAddress", + "name": "newImplementation", "type": "address" }, { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "swapExactBNBForTokensAndRepayAtSupportingFee", + "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }, { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vTokenAddress", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "deadline", + "name": "value", "type": "uint256" } ], - "name": "swapExactBNBForTokensAndSupply", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "name": "Approval", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "vTokenAddress", + "name": "previousOwner", "type": "address" }, { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "deadline", + "name": "value", "type": "uint256" } ], - "name": "swapExactBNBForTokensAndSupplyAtSupportingFee", - "outputs": [], - "stateMutability": "payable", - "type": "function" + "name": "Transfer", + "type": "event" }, { "inputs": [ - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, { "internalType": "address", - "name": "to", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "swapExactBNBForTokensAtSupportingFee", + "name": "allowance", "outputs": [ { "internalType": "uint256", - "name": "swapAmount", + "name": "", "type": "uint256" } ], - "stateMutability": "payable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, { "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "deadline", + "name": "amount", "type": "uint256" } ], - "name": "swapExactTokensForBNB", + "name": "approve", "outputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -32052,188 +32051,110 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ { "internalType": "uint256", - "name": "deadline", + "name": "", "type": "uint256" } ], - "name": "swapExactTokensForBNBAndRepay", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", + "name": "amount", "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + } + ], + "name": "burn", + "outputs": [ { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "swapExactTokensForBNBAndRepayAtSupportingFee", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "inputs": [], + "name": "decimals", + "outputs": [ { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "name": "swapExactTokensForBNBAndSupply", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" }, { "internalType": "uint256", - "name": "amountOutMin", + "name": "subtractedValue", "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + } + ], + "name": "decreaseAllowance", + "outputs": [ { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "swapExactTokensForBNBAndSupplyAtSupportingFee", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "inputs": [], + "name": "getOwner", + "outputs": [ { "internalType": "address", - "name": "to", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "swapExactTokensForBNBAtSupportingFee", - "outputs": [ - { - "internalType": "uint256", - "name": "swapAmount", - "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, { "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "deadline", + "name": "addedValue", "type": "uint256" } ], - "name": "swapExactTokensForTokens", + "name": "increaseAllowance", "outputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -32242,169 +32163,138 @@ { "inputs": [ { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" + "internalType": "string", + "name": "name", + "type": "string" }, { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" }, { "internalType": "uint256", - "name": "amountOutMin", + "name": "amount", "type": "uint256" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "bool", + "name": "mintable", + "type": "bool" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" } ], - "name": "swapExactTokensForTokensAndRepay", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, { "internalType": "uint256", - "name": "amountOutMin", + "name": "amount", "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + } + ], + "name": "mint", + "outputs": [ { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "swapExactTokensForTokensAndRepayAtSupportingFee", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, + "inputs": [], + "name": "mintable", + "outputs": [ { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "swapExactTokensForTokensAndSupply", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, + "inputs": [], + "name": "symbol", + "outputs": [ { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ { "internalType": "uint256", - "name": "deadline", + "name": "", "type": "uint256" } ], - "name": "swapExactTokensForTokensAndSupplyAtSupportingFee", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "amountIn", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountOutMin", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, { "internalType": "address", - "name": "to", + "name": "recipient", "type": "address" }, { "internalType": "uint256", - "name": "deadline", + "name": "amount", "type": "uint256" } ], - "name": "swapExactTokensForTokensAtSupportingFee", + "name": "transfer", "outputs": [ { - "internalType": "uint256", - "name": "swapAmount", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -32413,37 +32303,27 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "address", + "name": "sender", + "type": "address" }, { "internalType": "address", - "name": "to", + "name": "recipient", "type": "address" }, { "internalType": "uint256", - "name": "deadline", + "name": "amount", "type": "uint256" } ], - "name": "swapTokensForExactBNB", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "bool", + "name": "", + "type": "bool" } ], "stateMutability": "nonpayable", @@ -32452,160 +32332,235 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "swapTokensForExactBNBAndRepay", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "TokenRedeemer": { + "address": "0xC53ffda840B51068C64b2E052a5715043f634bcd", + "abi": [ { "inputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" + "internalType": "address", + "name": "owner_", + "type": "address" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, + "internalType": "contract IVBNB", + "name": "vBNB", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "deadline", + "name": "errCode", "type": "uint256" } ], - "name": "swapTokensForExactBNBAndSupply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "AccrueInterestFailed", + "type": "error" + }, + { + "inputs": [], + "name": "NativeTokenTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "NativeTransferFailed", + "type": "error" }, { "inputs": [ { "internalType": "uint256", - "name": "amountOut", + "name": "errCode", "type": "uint256" - }, + } + ], + "name": "RedeemFailed", + "type": "error" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "amountInMax", + "name": "errCode", "type": "uint256" - }, + } + ], + "name": "RepaymentFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "to", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", "type": "address" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "swapTokensForExactTokens", + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "VBNB", "outputs": [ { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" + "internalType": "contract IVBNB", + "name": "", + "type": "address" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "vTokenAddress", + "internalType": "contract IVAIController", + "name": "vaiController", "type": "address" }, { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "components": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct TokenRedeemer.Repayment[]", + "name": "requestedRepayments", + "type": "tuple[]" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "receiver", + "type": "address" } ], - "name": "swapTokensForExactTokensAndRepay", + "name": "batchRepayVAI", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", - "name": "vTokenAddress", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - "internalType": "uint256", - "name": "amountOut", - "type": "uint256" - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" + "internalType": "contract IVToken", + "name": "vToken", + "type": "address" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "components": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct TokenRedeemer.Repayment[]", + "name": "requestedRepayments", + "type": "tuple[]" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "receiver", + "type": "address" } ], - "name": "swapTokensForExactTokensAndSupply", + "name": "redeemAndBatchRepay", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -32613,50 +32568,45 @@ { "inputs": [ { - "internalType": "uint256", - "name": "amountInMax", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "path", - "type": "address[]" + "internalType": "contract IVToken", + "name": "vToken", + "type": "address" }, { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "destination", + "type": "address" } ], - "name": "swapTokensForFullBNBDebtAndRepay", + "name": "redeemAndTransfer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "contract IVToken", + "name": "vToken", + "type": "address" + }, { "internalType": "address", - "name": "vTokenAddress", + "name": "borrower", "type": "address" }, { "internalType": "uint256", - "name": "amountInMax", + "name": "amount", "type": "uint256" }, { - "internalType": "address[]", - "name": "path", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" + "internalType": "address", + "name": "receiver", + "type": "address" } ], - "name": "swapTokensForFullTokenDebtAndRepay", + "name": "redeemUnderlyingAndRepayBorrowBehalf", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -32664,22 +32614,34 @@ { "inputs": [ { - "internalType": "contract IERC20", - "name": "token", + "internalType": "contract IVToken", + "name": "vToken", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "destination", "type": "address" }, { "internalType": "uint256", - "name": "sweepAmount", + "name": "amount", "type": "uint256" - } + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } ], - "name": "sweepToken", + "name": "redeemUnderlyingAndTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -32688,26 +32650,31 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "destination", "type": "address" } ], - "name": "transferOwnership", + "name": "sweepTokens", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "vBNBAddress", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { @@ -32716,20 +32683,25 @@ } ] }, - "TRX": { - "address": "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3", + "USDC": { + "address": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", "abi": [ { "inputs": [ { - "internalType": "string", - "name": "name_", - "type": "string" + "internalType": "address", + "name": "logic", + "type": "address" }, { - "internalType": "string", - "name": "symbol_", - "type": "string" + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], "stateMutability": "nonpayable", @@ -32739,125 +32711,159 @@ "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "owner", + "name": "previousAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "spender", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", + "name": "AdminChanged", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "userAddress", + "name": "implementation", "type": "address" - }, + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": false, - "internalType": "address payable", - "name": "relayerAddress", + "internalType": "address", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, - "internalType": "bytes", - "name": "functionSignature", - "type": "bytes" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "MetaTransactionExecuted", - "type": "event" + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" + "internalType": "address", + "name": "newImplementation", + "type": "address" }, { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "RoleAdminChanged", - "type": "event" + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "spender", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "RoleGranted", + "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "indexed": true, "internalType": "address", - "name": "account", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "sender", + "name": "newOwner", "type": "address" } ], - "name": "RoleRevoked", + "name": "OwnershipTransferred", "type": "event" }, { @@ -32885,45 +32891,6 @@ "name": "Transfer", "type": "event" }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ERC712_VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PREDICATE_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -32991,6 +32958,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "decimals", @@ -33028,66 +33014,14 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "functionSignature", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "sigR", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "sigS", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "sigV", - "type": "uint8" - } - ], - "name": "executeMetaTransaction", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, { "inputs": [], - "name": "getDomainSeperator", + "name": "getOwner", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", @@ -33097,97 +33031,60 @@ "inputs": [ { "internalType": "address", - "name": "user", + "name": "spender", "type": "address" - } - ], - "name": "getNonce", - "outputs": [ + }, { "internalType": "uint256", - "name": "nonce", + "name": "addedValue", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", + "name": "increaseAllowance", "outputs": [ { - "internalType": "bytes32", + "internalType": "bool", "name": "", - "type": "bytes32" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "string", + "name": "name", + "type": "string" }, { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + "internalType": "string", + "name": "symbol", + "type": "string" + }, { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" + "internalType": "bool", + "name": "mintable", + "type": "bool" }, { "internalType": "address", - "name": "account", + "name": "owner", "type": "address" } ], - "name": "grantRole", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -33195,17 +33092,12 @@ { "inputs": [ { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "hasRole", + "name": "mint", "outputs": [ { "internalType": "bool", @@ -33213,23 +33105,12 @@ "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", + "inputs": [], + "name": "mintable", "outputs": [ { "internalType": "bool", @@ -33237,25 +33118,7 @@ "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -33272,37 +33135,8 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -33385,145 +33219,28 @@ ], "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "TRXOLD": { - "address": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "newOwner", "type": "address" } ], - "name": "upgradeTo", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, + } + ] + }, + "USDT": { + "address": "0x55d398326f99059fF775485246999027B3197955", + "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -33597,6 +33314,52 @@ "type": "event" }, { + "constant": true, + "inputs": [], + "name": "_decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { "internalType": "address", @@ -33617,10 +33380,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -33641,10 +33406,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", @@ -33660,10 +33427,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -33679,10 +33448,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "decimals", "outputs": [ @@ -33692,10 +33463,12 @@ "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -33716,10 +33489,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "getOwner", "outputs": [ @@ -33729,10 +33504,12 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -33753,48 +33530,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": false, "inputs": [ { "internalType": "uint256", @@ -33810,43 +33551,51 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "owner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -33856,10 +33605,12 @@ "type": "string" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -33869,10 +33620,12 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -33893,10 +33646,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -33922,10 +33677,12 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -33935,16 +33692,28 @@ ], "name": "transferOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" } ] }, - "TRXOLD_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", + "UST": { + "address": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "beacon", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], "stateMutability": "nonpayable", "type": "constructor" }, @@ -33952,44 +33721,78 @@ "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "owner", + "name": "previousAdmin", "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "spender", + "name": "beacon", "type": "address" - }, + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" } ], - "name": "Approval", + "name": "Upgraded", "type": "event" }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "spender", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "OwnershipTransferred", + "name": "Approval", "type": "event" }, { @@ -34021,12 +33824,12 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "owner_", "type": "address" }, { "internalType": "address", - "name": "spender", + "name": "spender_", "type": "address" } ], @@ -34045,12 +33848,12 @@ "inputs": [ { "internalType": "address", - "name": "spender", + "name": "spender_", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "amount_", "type": "uint256" } ], @@ -34069,7 +33872,7 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "account_", "type": "address" } ], @@ -34086,21 +33889,33 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, { "internalType": "uint256", - "name": "amount", + "name": "amount_", "type": "uint256" } ], "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", "outputs": [ { - "internalType": "bool", + "internalType": "uint16", "name": "", - "type": "bool" + "type": "uint16" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -34120,12 +33935,12 @@ "inputs": [ { "internalType": "address", - "name": "spender", + "name": "spender_", "type": "address" }, { "internalType": "uint256", - "name": "subtractedValue", + "name": "subtractedValue_", "type": "uint256" } ], @@ -34140,29 +33955,16 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "spender_", "type": "address" }, { "internalType": "uint256", - "name": "addedValue", + "name": "addedValue_", "type": "uint256" } ], @@ -34181,33 +33983,38 @@ "inputs": [ { "internalType": "string", - "name": "name", + "name": "name_", "type": "string" }, { "internalType": "string", - "name": "symbol", + "name": "symbol_", "type": "string" }, { "internalType": "uint8", - "name": "decimals", + "name": "decimals_", "type": "uint8" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" + "internalType": "uint64", + "name": "sequence_", + "type": "uint64" }, { "internalType": "address", - "name": "owner", + "name": "owner_", "type": "address" + }, + { + "internalType": "uint16", + "name": "chainId_", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "nativeContract_", + "type": "bytes32" } ], "name": "initialize", @@ -34217,31 +34024,30 @@ }, { "inputs": [ + { + "internalType": "address", + "name": "account_", + "type": "address" + }, { "internalType": "uint256", - "name": "amount", + "name": "amount_", "type": "uint256" } ], "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "mintable", + "name": "name", "outputs": [ { - "internalType": "bool", + "internalType": "string", "name": "", - "type": "bool" + "type": "string" } ], "stateMutability": "view", @@ -34249,12 +34055,12 @@ }, { "inputs": [], - "name": "name", + "name": "nativeContract", "outputs": [ { - "internalType": "string", + "internalType": "bytes32", "name": "", - "type": "string" + "type": "bytes32" } ], "stateMutability": "view", @@ -34262,9 +34068,15 @@ }, { "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", "type": "function" }, { @@ -34297,12 +34109,12 @@ "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "recipient_", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "amount_", "type": "uint256" } ], @@ -34321,17 +34133,17 @@ "inputs": [ { "internalType": "address", - "name": "sender", + "name": "sender_", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "recipient_", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "amount_", "type": "uint256" } ], @@ -34349,41 +34161,61 @@ { "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint64", + "name": "sequence_", + "type": "uint64" } ], - "name": "transferOwnership", + "name": "updateDetails", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ] }, - "TRXOLD_Proxy": { - "address": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", + "Unitroller": { + "address": "0xfD36E2c2a6789Db23113685031d7F16329158384", "abi": [ { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "logic", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { - "internalType": "address", - "name": "admin", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Failure", + "type": "event" }, { "anonymous": false, @@ -34391,7 +34223,7 @@ { "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "oldAdmin", "type": "address" }, { @@ -34401,450 +34233,366 @@ "type": "address" } ], - "name": "AdminChanged", + "name": "NewAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "Upgraded", + "name": "NewImplementation", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewPendingAdmin", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewPendingImplementation", + "type": "event" }, { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, "inputs": [], - "name": "implementation", + "name": "_acceptAdmin", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "constant": false, + "inputs": [], + "name": "_acceptImplementation", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "upgradeTo", - "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "newPendingAdmin", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "TUSD": { - "address": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "currentOwner", - "type": "address" - }, + "name": "_setPendingAdmin", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "pendingOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "NewPendingOwner", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "newPendingImplementation", "type": "address" } ], - "name": "ProxyOwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "_setPendingImplementation", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "claimProxyOwnership", - "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "admin", "outputs": [ { "internalType": "address", - "name": "impl", + "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingProxyOwner", + "name": "comptrollerImplementation", "outputs": [ { "internalType": "address", - "name": "pendingOwner", + "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "proxyOwner", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", - "name": "owner", + "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferProxyOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingComptrollerImplementation", + "outputs": [ { "internalType": "address", - "name": "implementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, - { - "stateMutability": "payable", - "type": "receive" - }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" } ], - "name": "Approval", + "name": "DiamondCut", "type": "event" }, { - "anonymous": false, + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "account", + "internalType": "contract Unitroller", + "name": "unitroller", "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isBlacklisted", - "type": "bool" } ], - "name": "Blacklisted", - "type": "event" + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "burner", + "name": "", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "accountAssets", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "to", + "internalType": "contract VToken", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Mint", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldFeed", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "newFeed", + "name": "", "type": "address" } ], - "name": "NewChainReserveFeed", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldHeartbeat", + "name": "", "type": "uint256" - }, + } + ], + "name": "allMarkets", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newHeartbeat", - "type": "uint256" + "internalType": "contract VToken", + "name": "", + "type": "address" } ], - "name": "NewChainReserveHeartbeat", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ProofOfReserveDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ProofOfReserveEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newMin", - "type": "uint256" - }, + "name": "approvedDelegates", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newMax", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "SetBurnBounds", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "borrowCapGuardian", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "to", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "", "type": "address" } ], - "name": "allowance", + "name": "borrowCaps", "outputs": [ { "internalType": "uint256", @@ -34852,126 +34600,166 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", + "constant": true, + "inputs": [], + "name": "closeFactorMantissa", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "comptrollerImplementation", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "balanceOf", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "comptrollerLens", "outputs": [ { - "internalType": "uint256", + "internalType": "contract ComptrollerLensInterface", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "diamondCut_", + "type": "tuple[]" } ], - "name": "burn", + "name": "diamondCut", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "burnMax", + "constant": true, + "inputs": [ + { + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" + } + ], + "name": "facetAddress", "outputs": [ { - "internalType": "uint256", + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "uint96", + "name": "functionSelectorPosition", + "type": "uint96" + } + ], + "internalType": "struct ComptrollerV13Storage.FacetAddressAndPosition", "name": "", - "type": "uint256" + "type": "tuple" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "burnMin", + "name": "facetAddresses", "outputs": [ { - "internalType": "uint256", + "internalType": "address[]", "name": "", - "type": "uint256" + "type": "address[]" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "facet", "type": "address" } ], - "name": "canBurn", + "name": "facetFunctionSelectors", "outputs": [ { - "internalType": "bool", + "internalType": "bytes4[]", "name": "", - "type": "bool" + "type": "bytes4[]" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "chainReserveFeed", - "outputs": [ + "constant": true, + "inputs": [ { "internalType": "address", - "name": "", + "name": "facet", "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainReserveHeartbeat", + "name": "facetPosition", "outputs": [ { "internalType": "uint256", @@ -34979,43 +34767,47 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "claimOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", + "name": "facets", "outputs": [ { - "internalType": "uint8", + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct Diamond.Facet[]", "name": "", - "type": "uint8" + "type": "tuple[]" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "isForcedLiquidationEnabled", "outputs": [ { "internalType": "bool", @@ -35023,26 +34815,29 @@ "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disableProofOfReserve", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "enableProofOfReserve", - "outputs": [], - "stateMutability": "nonpayable", + "name": "liquidationIncentiveMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "liquidatorContract", "outputs": [ { "internalType": "address", @@ -35050,74 +34845,126 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "bool", + "name": "isListed", + "type": "bool" }, { "internalType": "uint256", - "name": "addedValue", + "name": "collateralFactorMantissa", "type": "uint256" + }, + { + "internalType": "bool", + "name": "isVenus", + "type": "bool" } ], - "name": "increaseAllowance", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "maxAssets", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "name": "minReleaseAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "mintVAIGuardianPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" - }, + } + ], + "name": "mintedVAIs", + "outputs": [ { "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "oracle", "outputs": [ { - "internalType": "string", + "internalType": "contract PriceOracle", "name": "", - "type": "string" + "type": "address" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "pauseGuardian", "outputs": [ { "internalType": "address", @@ -35125,12 +34972,14 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", @@ -35138,162 +34987,155 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "proofOfReserveEnabled", + "name": "pendingComptrollerImplementation", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "protocolPaused", + "outputs": [ { - "internalType": "address payable", - "name": "_to", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "reclaimEther", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract IBEP20", - "name": "token", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "releaseStartBlock", + "outputs": [ { - "internalType": "address", - "name": "_to", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "reclaimToken", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "rounding", + "name": "repayVAIGuardianPaused", "outputs": [ { - "internalType": "uint8", + "internalType": "bool", "name": "", - "type": "uint8" + "type": "bool" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" - }, - { - "internalType": "bool", - "name": "_isBlacklisted", - "type": "bool" } ], - "name": "setBlacklisted", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_min", - "type": "uint256" - }, + "name": "supplyCaps", + "outputs": [ { "internalType": "uint256", - "name": "_max", + "name": "", "type": "uint256" } ], - "name": "setBurnBounds", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryAddress", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" - }, - { - "internalType": "bool", - "name": "_canBurn", - "type": "bool" } ], - "name": "setCanBurn", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryGuardian", + "outputs": [ { "internalType": "address", - "name": "newFeed", + "name": "", "type": "address" } ], - "name": "setChainReserveFeed", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "treasuryPercent", + "outputs": [ { "internalType": "uint256", - "name": "newHeartbeat", + "name": "", "type": "uint256" } ], - "name": "setChainReserveHeartbeat", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "symbol", + "name": "vaiController", "outputs": [ { - "internalType": "string", + "internalType": "contract VAIControllerInterface", "name": "", - "type": "string" + "type": "address" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "vaiMintRate", "outputs": [ { "internalType": "uint256", @@ -35301,361 +35143,339 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", + "constant": true, + "inputs": [], + "name": "vaiVaultAddress", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", + "name": "venusAccrued", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "venusBorrowSpeeds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" - } - ] - }, - "TUSDOLD": { - "address": "0x14016E85a25aeb13065688cAFB43044C2ef86784", - "abi": [ + }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "logic", + "name": "", "type": "address" - }, + } + ], + "name": "venusBorrowState", + "outputs": [ { - "internalType": "address", - "name": "admin", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "name": "venusBorrowerIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", + "name": "venusSupplierIndex", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", + "name": "venusSupplySpeeds", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "venusSupplyState", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - }, - { + "constant": true, "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, + "name": "venusVAIVaultRate", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "Approval", - "type": "event" - }, + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + }, + "Unitroller_Implementation": { + "address": "0x347ba9559fFC65A94af0F6a513037Cd4982b7b18", + "abi": [ { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" } ], - "name": "OwnershipTransferred", + "name": "DiamondCut", "type": "event" }, { - "anonymous": false, + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", + "internalType": "contract Unitroller", + "name": "unitroller", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "owner", + "name": "", "type": "address" }, { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "allowance", + "name": "accountAssets", "outputs": [ { - "internalType": "uint256", + "internalType": "contract VToken", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", + "constant": true, + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "balanceOf", + "name": "allMarkets", "outputs": [ { - "internalType": "uint256", + "internalType": "contract VToken", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "burn", + "name": "approvedDelegates", "outputs": [ { "internalType": "bool", @@ -35663,213 +35483,250 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowCapGuardian", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "borrowCaps", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "closeFactorMantissa", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "comptrollerImplementation", + "outputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" } ], - "name": "increaseAllowance", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "comptrollerLens", "outputs": [ { - "internalType": "bool", + "internalType": "contract ComptrollerLensInterface", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "diamondCut_", + "type": "tuple[]" } ], - "name": "initialize", + "name": "diamondCut", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "bytes4", + "name": "functionSelector", + "type": "bytes4" } ], - "name": "mint", + "name": "facetAddress", "outputs": [ { - "internalType": "bool", + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "uint96", + "name": "functionSelectorPosition", + "type": "uint96" + } + ], + "internalType": "struct ComptrollerV13Storage.FacetAddressAndPosition", "name": "", - "type": "bool" + "type": "tuple" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "facetAddresses", "outputs": [ { - "internalType": "bool", + "internalType": "address[]", "name": "", - "type": "bool" + "type": "address[]" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "name", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", "outputs": [ { - "internalType": "string", + "internalType": "bytes4[]", "name": "", - "type": "string" + "type": "bytes4[]" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "facet", + "type": "address" + } + ], + "name": "facetPosition", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "facets", "outputs": [ { - "internalType": "uint256", + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct Diamond.Facet[]", "name": "", - "type": "uint256" + "type": "tuple[]" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transfer", + "name": "isForcedLiquidationEnabled", "outputs": [ { "internalType": "bool", @@ -35877,28 +35734,25 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "sender", + "name": "", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", + "name": "isForcedLiquidationEnabledForUser", "outputs": [ { "internalType": "bool", @@ -35906,115 +35760,75 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "TUSDOLD_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { + "constant": true, "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, + "name": "liquidationIncentiveMantissa", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "Approval", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "liquidatorContract", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "from", + "name": "", "type": "address" - }, + } + ], + "name": "markets", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" + "internalType": "bool", + "name": "isListed", + "type": "bool" }, { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "collateralFactorMantissa", "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" }, { - "internalType": "address", - "name": "spender", - "type": "address" + "internalType": "bool", + "name": "isVenus", + "type": "bool" } ], - "name": "allowance", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "maxAssets", "outputs": [ { "internalType": "uint256", @@ -36022,23 +35836,29 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "minReleaseAmount", + "outputs": [ { "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "approve", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "mintVAIGuardianPaused", "outputs": [ { "internalType": "bool", @@ -36046,18 +35866,20 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "balanceOf", + "name": "mintedVAIs", "outputs": [ { "internalType": "uint256", @@ -36065,92 +35887,119 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "oracle", + "outputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "contract PriceOracle", + "name": "", + "type": "address" } ], - "name": "burn", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pauseGuardian", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "decimals", + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingComptrollerImplementation", + "outputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" } ], - "name": "decreaseAllowance", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "prime", "outputs": [ { - "internalType": "bool", + "internalType": "contract IPrime", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "protocolPaused", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "releaseStartBlock", + "outputs": [ { "internalType": "uint256", - "name": "addedValue", + "name": "", "type": "uint256" } ], - "name": "increaseAllowance", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "repayVAIGuardianPaused", "outputs": [ { "internalType": "bool", @@ -36158,412 +36007,394 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, { "internalType": "address", - "name": "owner", + "name": "", "type": "address" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "supplyCaps", + "outputs": [ { "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "mint", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "treasuryAddress", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "treasuryGuardian", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "treasuryPercent", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "vaiController", + "outputs": [ + { + "internalType": "contract VAIControllerInterface", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "symbol", + "name": "vaiMintRate", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "vaiVaultAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transfer", + "name": "venusAccrued", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", + "name": "venusBorrowSpeeds", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "TUSDOLD_Proxy": { - "address": "0x14016E85a25aeb13065688cAFB43044C2ef86784", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, + "name": "venusBorrowState", + "outputs": [ { - "internalType": "address", - "name": "admin", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "AdminChanged", - "type": "event" + "name": "venusBorrowerIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "implementation", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", "type": "address" } ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", + "name": "venusSupplierIndex", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", + "name": "venusSupplySpeeds", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "venusSupplyState", + "outputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" + "constant": true, + "inputs": [], + "name": "venusVAIVaultRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" } ] }, - "TUSD_Implementation": { - "address": "0x0d7adc70a18a5aef0bd6ecb098e1da0244c57711", + "Unitroller_Proxy": { + "address": "0xfD36E2c2a6789Db23113685031d7F16329158384", "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "detail", "type": "uint256" } ], - "name": "Approval", + "name": "Failure", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "account", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "bool", - "name": "isBlacklisted", - "type": "bool" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "Blacklisted", + "name": "NewAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "burner", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "name": "Burn", + "name": "NewImplementation", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "to", + "name": "oldPendingAdmin", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], - "name": "Mint", + "name": "NewPendingAdmin", "type": "event" }, { @@ -36572,127 +36403,43 @@ { "indexed": false, "internalType": "address", - "name": "oldFeed", + "name": "oldPendingImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newFeed", - "type": "address" - } - ], - "name": "NewChainReserveFeed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldHeartbeat", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newHeartbeat", - "type": "uint256" - } - ], - "name": "NewChainReserveHeartbeat", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", + "name": "newPendingImplementation", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "NewPendingImplementation", "type": "event" }, { - "anonymous": false, - "inputs": [], - "name": "ProofOfReserveDisabled", - "type": "event" + "payable": true, + "stateMutability": "payable", + "type": "fallback" }, { - "anonymous": false, + "constant": false, "inputs": [], - "name": "ProofOfReserveEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newMin", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMax", - "type": "uint256" - } - ], - "name": "SetBurnBounds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, + "name": "_acceptAdmin", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", + "constant": false, + "inputs": [], + "name": "_acceptImplementation", "outputs": [ { "internalType": "uint256", @@ -36700,42 +36447,41 @@ "type": "uint256" } ], - "stateMutability": "view", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "newPendingAdmin", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "approve", + "name": "_setPendingAdmin", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "account", + "name": "newPendingImplementation", "type": "address" } ], - "name": "balanceOf", + "name": "_setPendingImplementation", "outputs": [ { "internalType": "uint256", @@ -36743,70 +36489,59 @@ "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "burnMax", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "burnMin", + "name": "comptrollerImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "name": "canBurn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "chainReserveFeed", + "name": "pendingComptrollerImplementation", "outputs": [ { "internalType": "address", @@ -36814,107 +36549,185 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "VAI": { + "address": "0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7", + "abi": [ { - "inputs": [], - "name": "chainReserveHeartbeat", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "chainId_", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "inputs": [], - "name": "claimOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wad", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" }, { - "inputs": [], - "name": "decimals", - "outputs": [ + "anonymous": true, + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "indexed": true, + "internalType": "bytes4", + "name": "sig", + "type": "bytes4" + }, + { + "indexed": true, + "internalType": "address", + "name": "usr", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "arg1", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "arg2", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "stateMutability": "pure", - "type": "function" + "name": "LogNote", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "spender", + "name": "src", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "dst", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "subtractedValue", + "name": "wad", "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_SEPARATOR", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disableProofOfReserve", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "enableProofOfReserve", - "outputs": [], - "stateMutability": "nonpayable", + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "getOwner", - "outputs": [ + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "address", "name": "", "type": "address" } ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "usr", "type": "address" }, { "internalType": "uint256", - "name": "addedValue", + "name": "wad", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "approve", "outputs": [ { "internalType": "bool", @@ -36922,211 +36735,269 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", + "name": "balanceOf", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "usr", "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" } ], - "stateMutability": "view", + "name": "burn", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "decimals", "outputs": [ { - "internalType": "address", + "internalType": "uint8", "name": "", - "type": "address" + "type": "uint8" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "proofOfReserveEnabled", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "guy", + "type": "address" } ], - "stateMutability": "view", + "name": "deny", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "_to", + "internalType": "address", + "name": "usr", "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" } ], - "name": "reclaimEther", + "name": "mint", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "contract IBEP20", - "name": "token", + "internalType": "address", + "name": "src", "type": "address" }, { "internalType": "address", - "name": "_to", + "name": "dst", "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" } ], - "name": "reclaimToken", + "name": "move", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "rounding", + "name": "name", "outputs": [ { - "internalType": "uint8", + "internalType": "string", "name": "", - "type": "uint8" + "type": "string" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" - }, + } + ], + "name": "nonces", + "outputs": [ { - "internalType": "bool", - "name": "_isBlacklisted", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "setBlacklisted", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ + { + "internalType": "address", + "name": "holder", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "_min", + "name": "nonce", "type": "uint256" }, { "internalType": "uint256", - "name": "_max", + "name": "expiry", "type": "uint256" + }, + { + "internalType": "bool", + "name": "allowed", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "setBurnBounds", + "name": "permit", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "account", + "name": "usr", "type": "address" }, { - "internalType": "bool", - "name": "_canBurn", - "type": "bool" + "internalType": "uint256", + "name": "wad", + "type": "uint256" } ], - "name": "setCanBurn", + "name": "pull", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newFeed", + "name": "usr", "type": "address" + }, + { + "internalType": "uint256", + "name": "wad", + "type": "uint256" } ], - "name": "setChainReserveFeed", + "name": "push", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "newHeartbeat", - "type": "uint256" + "internalType": "address", + "name": "guy", + "type": "address" } ], - "name": "setChainReserveHeartbeat", + "name": "rely", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], "name": "symbol", "outputs": [ @@ -37136,10 +37007,12 @@ "type": "string" } ], - "stateMutability": "pure", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ @@ -37149,19 +37022,21 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "dst", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "wad", "type": "uint256" } ], @@ -37173,24 +37048,26 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "sender", + "name": "src", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "dst", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "wad", "type": "uint256" } ], @@ -37202,49 +37079,93 @@ "type": "bool" } ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "name": "wards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", "type": "function" } ] }, - "TUSD_Proxy": { - "address": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", + "VAIVault": { + "address": "0x0B4d7776b87deD4a0958E32D5155598057D2620D", "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", - "name": "currentOwner", + "name": "oldAccessControlManager", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "pendingOwner", + "name": "newAccessControlManager", "type": "address" } ], - "name": "NewPendingOwner", + "name": "NewAccessControlManager", "type": "event" }, { @@ -37253,17 +37174,24 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "admin", "type": "address" - }, + } + ], + "name": "VaultPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "admin", "type": "address" } ], - "name": "ProxyOwnershipTransferred", + "name": "VaultResumed", "type": "event" }, { @@ -37272,271 +37200,291 @@ { "indexed": true, "internalType": "address", - "name": "implementation", + "name": "user", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "Upgraded", + "name": "Withdraw", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "claimProxyOwnership", + "constant": false, + "inputs": [ + { + "internalType": "contract IVAIVaultProxy", + "name": "vaiVaultProxy", + "type": "address" + } + ], + "name": "_become", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "accXVSPerShare", "outputs": [ { - "internalType": "address", - "name": "impl", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingProxyOwner", + "name": "accessControlManager", "outputs": [ { - "internalType": "address", - "name": "pendingOwner", + "internalType": "contract IAccessControlManagerV5", + "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "proxyOwner", + "name": "admin", "outputs": [ { "internalType": "address", - "name": "owner", + "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "account", "type": "address" } ], - "name": "transferProxyOwnership", + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claim", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "implementation", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], - "name": "upgradeTo", + "name": "deposit", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "TokenRedeemer": { - "address": "0xC53ffda840B51068C64b2E052a5715043f634bcd", - "abi": [ + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "contract IVBNB", - "name": "vBNB", + "name": "", "type": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingRewards", + "outputs": [ { "internalType": "uint256", - "name": "errCode", + "name": "", "type": "uint256" } ], - "name": "AccrueInterestFailed", - "type": "error" - }, - { - "inputs": [], - "name": "NativeTokenTransferFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "NativeTransferFailed", - "type": "error" - }, - { - "inputs": [ + "name": "pendingVAIVaultImplementation", + "outputs": [ { - "internalType": "uint256", - "name": "errCode", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "RedeemFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingXVS", + "outputs": [ { "internalType": "uint256", - "name": "errCode", + "name": "", "type": "uint256" } ], - "name": "RepaymentFailed", - "type": "error" + "payable": false, + "stateMutability": "view", + "type": "function" }, { + "constant": false, "inputs": [], - "name": "ZeroAddressNotAllowed", - "type": "error" + "name": "resume", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "OwnershipTransferStarted", - "type": "event" + "name": "setAccessControl", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "_xvs", "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "VBNB", - "outputs": [ - { - "internalType": "contract IVBNB", - "name": "", + "name": "_vai", "type": "address" } ], - "stateMutability": "view", + "name": "setVenusInfo", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "acceptOwnership", + "name": "updatePendingRewards", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { - "internalType": "contract IVAIController", - "name": "vaiController", + "internalType": "address", + "name": "", "type": "address" - }, + } + ], + "name": "userInfo", + "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct TokenRedeemer.Repayment[]", - "name": "requestedRepayments", - "type": "tuple[]" + "internalType": "uint256", + "name": "amount", + "type": "uint256" }, { - "internalType": "address", - "name": "receiver", - "type": "address" + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" } ], - "name": "batchRepayVAI", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "vai", "outputs": [ { - "internalType": "address", + "internalType": "contract IBEP20", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "vaiVaultImplementation", "outputs": [ { "internalType": "address", @@ -37544,185 +37492,143 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract IVToken", - "name": "vToken", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct TokenRedeemer.Repayment[]", - "name": "requestedRepayments", - "type": "tuple[]" - }, + "constant": true, + "inputs": [], + "name": "vaultPaused", + "outputs": [ { - "internalType": "address", - "name": "receiver", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "redeemAndBatchRepay", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "contract IVToken", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], - "name": "redeemAndTransfer", + "name": "withdraw", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "contract IVToken", - "name": "vToken", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "xvs", + "outputs": [ { - "internalType": "address", - "name": "borrower", + "internalType": "contract IBEP20", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsBalance", + "outputs": [ { "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" } ], - "name": "redeemUnderlyingAndRepayBorrowBehalf", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" + } + ] + }, + "VAIVaultProxy": { + "address": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { + "anonymous": false, "inputs": [ { - "internalType": "contract IVToken", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "error", "type": "uint256" }, { - "internalType": "address", - "name": "receiver", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "name": "redeemUnderlyingAndTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "token", + "name": "oldAdmin", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "destination", - "type": "address" - } - ], - "name": "sweepTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", + "name": "newAdmin", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewAdmin", + "type": "event" }, { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "USDC": { - "address": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", - "abi": [ - { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "logic", + "name": "oldImplementation", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "admin", + "name": "newImplementation", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "NewImplementation", + "type": "event" }, { "anonymous": false, @@ -37730,65 +37636,119 @@ { "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "oldPendingAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newPendingAdmin", "type": "address" } ], - "name": "AdminChanged", + "name": "NewPendingAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", "type": "address" } ], - "name": "Upgraded", + "name": "NewPendingImplementation", "type": "event" }, { + "payable": true, "stateMutability": "payable", "type": "fallback" }, { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, "inputs": [], - "name": "admin", + "name": "_acceptImplementation", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingAdmin", "type": "address" } ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "newPendingImplementation", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], + "name": "_setPendingImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "admin", "outputs": [ { "internalType": "address", @@ -37796,46 +37756,58 @@ "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingVAIVaultImplementation", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" + "constant": true, + "inputs": [], + "name": "vaiVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -37845,42 +37817,49 @@ { "indexed": true, "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Approval", + "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "previousOwner", + "name": "oldAccessControlManager", "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "admin", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "VaultPaused", "type": "event" }, { @@ -37889,39 +37868,51 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "admin", "type": "address" - }, + } + ], + "name": "VaultResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "to", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Transfer", + "name": "Withdraw", "type": "event" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "internalType": "contract IVAIVaultProxy", + "name": "vaiVaultProxy", "type": "address" } ], - "name": "allowance", + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accXVSPerShare", "outputs": [ { "internalType": "uint256", @@ -37929,34 +37920,42 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ { - "internalType": "address", - "name": "spender", + "internalType": "contract IAccessControlManagerV5", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "approve", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -37964,76 +37963,79 @@ "type": "address" } ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "deposit", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "decimals", + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", + "constant": true, + "inputs": [], + "name": "pendingRewards", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "pendingVAIVaultImplementation", "outputs": [ { "internalType": "address", @@ -38041,163 +38043,144 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "_user", "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" } ], - "name": "increaseAllowance", + "name": "pendingXVS", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, { "internalType": "address", - "name": "owner", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "initialize", + "name": "setAccessControl", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ + "internalType": "address", + "name": "_xvs", + "type": "address" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "_vai", + "type": "address" } ], + "name": "setVenusInfo", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "mintable", - "outputs": [ + "name": "updatePendingRewards", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", + "name": "userInfo", "outputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", + "name": "vai", "outputs": [ { - "internalType": "string", + "internalType": "contract IBEP20", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "vaiVaultImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", + "constant": true, + "inputs": [], + "name": "vaultPaused", "outputs": [ { "internalType": "bool", @@ -38205,58 +38188,63 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], - "name": "transferFrom", + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvs", "outputs": [ { - "internalType": "bool", + "internalType": "contract IBEP20", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "xvsBalance", + "outputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" } ] }, - "USDC_Implementation": { - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", + "VAIVaultProxy_Implementation": { + "address": "0xa52f2a56abb7cbdd378bc36c6088fafeaf9ac423", "abi": [ { "inputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, @@ -38266,42 +38254,49 @@ { "indexed": true, "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Approval", + "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "previousOwner", + "name": "oldAccessControlManager", "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "admin", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "VaultPaused", "type": "event" }, { @@ -38310,39 +38305,51 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "admin", "type": "address" - }, + } + ], + "name": "VaultResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "to", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Transfer", + "name": "Withdraw", "type": "event" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "internalType": "contract IVAIVaultProxy", + "name": "vaiVaultProxy", "type": "address" } ], - "name": "allowance", + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accXVSPerShare", "outputs": [ { "internalType": "uint256", @@ -38350,34 +38357,42 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ { - "internalType": "address", - "name": "spender", + "internalType": "contract IAccessControlManagerV5", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "approve", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", @@ -38385,76 +38400,79 @@ "type": "address" } ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, + "inputs": [], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "deposit", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "decimals", + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", + "constant": true, + "inputs": [], + "name": "pendingRewards", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "getOwner", + "name": "pendingVAIVaultImplementation", "outputs": [ { "internalType": "address", @@ -38462,139 +38480,189 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "_user", "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" } ], - "name": "increaseAllowance", + "name": "pendingXVS", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "setAccessControl", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "mintable", - "type": "bool" + "internalType": "address", + "name": "_xvs", + "type": "address" }, { "internalType": "address", - "name": "owner", + "name": "_vai", "type": "address" } ], - "name": "initialize", + "name": "setVenusInfo", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "updatePendingRewards", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" } ], - "name": "mint", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vai", "outputs": [ { - "internalType": "bool", + "internalType": "contract IBEP20", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "mintable", + "name": "vaiVaultImplementation", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "name", + "name": "vaultPaused", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "renounceOwnership", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "symbol", + "name": "xvs", "outputs": [ { - "internalType": "string", + "internalType": "contract IBEP20", "name": "", - "type": "string" + "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "totalSupply", + "name": "xvsBalance", "outputs": [ { "internalType": "uint256", @@ -38602,100 +38670,83 @@ "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" + } + ] + }, + "VAIVaultProxy_Proxy": { + "address": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "recipient", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "info", "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "sender", + "name": "oldAdmin", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "recipient", + "name": "newAdmin", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewAdmin", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "USDC_Proxy": { - "address": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", + "name": "oldImplementation", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "admin", + "name": "newImplementation", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "NewImplementation", + "type": "event" }, { "anonymous": false, @@ -38703,65 +38754,119 @@ { "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "oldPendingAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newPendingAdmin", "type": "address" } ], - "name": "AdminChanged", + "name": "NewPendingAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", "type": "address" } ], - "name": "Upgraded", + "name": "NewPendingImplementation", "type": "event" }, { + "payable": true, "stateMutability": "payable", "type": "fallback" }, { + "constant": false, "inputs": [], - "name": "admin", + "name": "_acceptAdmin", "outputs": [ { - "internalType": "address", + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptImplementation", + "outputs": [ + { + "internalType": "uint256", "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingAdmin", "type": "address" } ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "newPendingImplementation", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], + "name": "_setPendingImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "implementation", + "name": "admin", "outputs": [ { "internalType": "address", @@ -38769,78 +38874,77 @@ "type": "address" } ], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" } ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingVAIVaultImplementation", + "outputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "", "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" + "constant": true, + "inputs": [], + "name": "vaiVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" } ] }, - "USDT": { - "address": "0x55d398326f99059fF775485246999027B3197955", + "VBNBAdmin": { + "address": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "owner", + "name": "previousAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "spender", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", + "name": "AdminChanged", "type": "event" }, { @@ -38849,17 +38953,11 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", + "name": "beacon", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "BeaconUpgraded", "type": "event" }, { @@ -38868,505 +38966,488 @@ { "indexed": true, "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", + "name": "implementation", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", + "name": "Upgraded", "type": "event" }, { - "constant": true, + "stateMutability": "payable", + "type": "fallback" + }, + { "inputs": [], - "name": "_decimals", + "name": "admin", "outputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "internalType": "address", + "name": "admin_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "_name", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "_symbol", + "name": "implementation", "outputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "implementation_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [ { "internalType": "address", - "name": "owner", + "name": "newImplementation", "type": "address" - }, + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "spender", + "name": "newImplementation", "type": "address" - } - ], - "name": "allowance", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "payable": false, - "stateMutability": "view", + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { - "constant": false, + "stateMutability": "payable", + "type": "receive" + }, + { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "sender", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "name": "approve", - "outputs": [ + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Initialized", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "account", + "name": "oldAccessControlManager", "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewAccessControlManager", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnershipTransferStarted", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender", + "indexed": true, + "internalType": "contract IProtocolShareReserve", + "name": "oldProtocolShareReserve", "type": "address" }, { + "indexed": true, + "internalType": "contract IProtocolShareReserve", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "ProtocolShareReserveUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "uint256", - "name": "subtractedValue", + "name": "reduceAmount", "type": "uint256" } ], - "name": "decreaseAllowance", + "name": "ReservesReduced", + "type": "event" + }, + { + "inputs": [], + "name": "WBNB", "outputs": [ { - "internalType": "bool", + "internalType": "contract IWBNB", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "getOwner", + "name": "accessControlManager", "outputs": [ { - "internalType": "address", + "internalType": "contract IAccessControlManagerV8", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address", - "name": "spender", + "internalType": "contract IProtocolShareReserve", + "name": "_protocolShareReserve", "type": "address" }, { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "accessControlManager", + "type": "address" } ], - "payable": false, + "name": "initialize", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", + "inputs": [], + "name": "owner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "name", + "name": "pendingOwner", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "owner", + "name": "protocolShareReserve", "outputs": [ { - "internalType": "address", + "internalType": "contract IProtocolShareReserve", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + } + ], + "name": "reduceReserves", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { "inputs": [], "name": "renounceOwnership", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "accessControlManager_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "contract IProtocolShareReserve", + "name": "protocolShareReserve_", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "setProtocolShareReserve", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transfer", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vBNB", "outputs": [ { - "internalType": "bool", + "internalType": "contract VTokenInterface", "name": "", - "type": "bool" + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "sender", + "name": "_logic", "type": "address" }, { "internalType": "address", - "name": "recipient", + "name": "admin_", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "payable", + "type": "constructor" } ] }, - "UST": { - "address": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", + "VBNBAdmin_Implementation": { + "address": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", "abi": [ { "inputs": [ { - "internalType": "address", - "name": "beacon", + "internalType": "contract VTokenInterface", + "name": "_vBNB", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "contract IWBNB", + "name": "_WBNB", + "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "sender", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "calledContract", "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" } ], - "name": "AdminChanged", - "type": "event" + "name": "Unauthorized", + "type": "error" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" } ], - "name": "BeaconUpgraded", + "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", "type": "address" } ], - "name": "Upgraded", + "name": "NewAccessControlManager", "type": "event" }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", + "name": "OwnershipTransferStarted", "type": "event" }, { @@ -39375,87 +39456,83 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "to", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Transfer", + "name": "OwnershipTransferred", "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "owner_", + "indexed": true, + "internalType": "contract IProtocolShareReserve", + "name": "oldProtocolShareReserve", "type": "address" }, { - "internalType": "address", - "name": "spender_", + "indexed": true, + "internalType": "contract IProtocolShareReserve", + "name": "newProtocolShareReserve", "type": "address" } ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" + "name": "ProtocolShareReserveUpdated", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender_", - "type": "address" - }, - { + "indexed": false, "internalType": "uint256", - "name": "amount_", + "name": "reduceAmount", "type": "uint256" } ], - "name": "approve", + "name": "ReservesReduced", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "WBNB", "outputs": [ { - "internalType": "bool", + "internalType": "contract IWBNB", "name": "", - "type": "bool" + "type": "address" } ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "account_", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "accessControlManager", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IAccessControlManagerV8", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -39464,29 +39541,29 @@ { "inputs": [ { - "internalType": "address", - "name": "account_", + "internalType": "contract IProtocolShareReserve", + "name": "_protocolShareReserve", "type": "address" }, { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" + "internalType": "address", + "name": "accessControlManager", + "type": "address" } ], - "name": "burn", + "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "chainId", + "name": "owner", "outputs": [ { - "internalType": "uint16", + "internalType": "address", "name": "", - "type": "uint16" + "type": "address" } ], "stateMutability": "view", @@ -39494,104 +39571,59 @@ }, { "inputs": [], - "name": "decimals", + "name": "pendingOwner", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue_", - "type": "uint256" - } - ], - "name": "decreaseAllowance", + "inputs": [], + "name": "protocolShareReserve", "outputs": [ { - "internalType": "bool", + "internalType": "contract IProtocolShareReserve", "name": "", - "type": "bool" + "type": "address" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ - { - "internalType": "address", - "name": "spender_", - "type": "address" - }, { "internalType": "uint256", - "name": "addedValue_", + "name": "reduceAmount", "type": "uint256" } ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "reduceReserves", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "sequence_", - "type": "uint64" - }, { "internalType": "address", - "name": "owner_", + "name": "accessControlManager_", "type": "address" - }, - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "nativeContract_", - "type": "bytes32" } ], - "name": "initialize", + "name": "setAccessControlManager", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -39599,105 +39631,129 @@ { "inputs": [ { - "internalType": "address", - "name": "account_", + "internalType": "contract IProtocolShareReserve", + "name": "protocolShareReserve_", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" } ], - "name": "mint", + "name": "setProtocolShareReserve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "name", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "nativeContract", + "name": "vBNB", "outputs": [ { - "internalType": "bytes32", + "internalType": "contract VTokenInterface", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "VBNBAdmin_Proxy": { + "address": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", + "abi": [ + { + "inputs": [ { "internalType": "address", - "name": "", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" } ], - "stateMutability": "view", - "type": "function" + "stateMutability": "payable", + "type": "constructor" }, { - "inputs": [], - "name": "symbol", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "AdminChanged", + "type": "event" }, { - "inputs": [], - "name": "totalSupply", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "BeaconUpgraded", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "recipient_", + "name": "implementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" } ], - "name": "transfer", + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "admin_", + "type": "address" } ], "stateMutability": "nonpayable", @@ -39707,82 +39763,103 @@ "inputs": [ { "internalType": "address", - "name": "sender_", + "name": "newAdmin", "type": "address" - }, + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ { "internalType": "address", - "name": "recipient_", + "name": "implementation_", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" } ], - "name": "transferFrom", - "outputs": [ + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], + "name": "upgradeTo", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" + "internalType": "address", + "name": "newImplementation", + "type": "address" }, { - "internalType": "uint64", - "name": "sequence_", - "type": "uint64" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "updateDetails", + "name": "upgradeToAndCall", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" } ] }, - "UST_Implementation": { - "address": "0xb6d7bbde7c46a8b784f4a19c7fda0de34b9577db", + "VBep20Delegate": { + "address": "0x6E5cFf66C7b671fA1D5782866D80BD15955d79F6", "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, { "anonymous": false, "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "cashPrior", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", "type": "uint256" } ], - "name": "Approval", + "name": "AccrueInterest", "type": "event" }, { @@ -39791,406 +39868,261 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "to", + "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Transfer", + "name": "Approval", "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "owner_", + "name": "borrower", "type": "address" }, { - "internalType": "address", - "name": "spender_", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ + "indexed": false, + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "Borrow", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "spender_", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "amount_", + "name": "info", "type": "uint256" - } - ], - "name": "approve", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "account_", + "name": "liquidator", "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "account_", + "name": "borrower", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "amount_", + "name": "repayAmount", "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "chainId", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "spender_", + "name": "vTokenCollateral", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "subtractedValue_", + "name": "seizeTokens", "type": "uint256" } ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" + "name": "LiquidateBorrow", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "spender_", + "name": "minter", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "addedValue_", + "name": "mintAmount", "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "Mint", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "sequence_", - "type": "uint64" - }, - { + "indexed": false, "internalType": "address", - "name": "owner_", + "name": "payer", "type": "address" }, { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "nativeContract_", - "type": "bytes32" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { + "indexed": false, "internalType": "address", - "name": "account_", + "name": "receiver", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "amount_", + "name": "mintAmount", "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nativeContract", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ + }, { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "totalSupply", "type": "uint256" } ], - "stateMutability": "view", - "type": "function" + "name": "MintBehalf", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "recipient_", + "name": "oldAccessControlAddress", "type": "address" }, { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewAccessControlManager", + "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "sender_", + "name": "oldAdmin", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "recipient_", + "name": "newAdmin", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "stateMutability": "nonpayable", - "type": "function" + "name": "NewAdmin", + "type": "event" }, { + "anonymous": false, "inputs": [ { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" }, { - "internalType": "uint64", - "name": "sequence_", - "type": "uint64" + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" } ], - "name": "updateDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "UST_Proxy": { - "address": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", - "abi": [ + "name": "NewComptroller", + "type": "event" + }, { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "beacon", + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "indexed": false, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "NewMarketInterestRateModel", + "type": "event" }, { "anonymous": false, @@ -40198,17 +40130,17 @@ { "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "oldPendingAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newPendingAdmin", "type": "address" } ], - "name": "AdminChanged", + "name": "NewPendingAdmin", "type": "event" }, { @@ -40217,68 +40149,86 @@ { "indexed": true, "internalType": "address", - "name": "beacon", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", "type": "address" } ], - "name": "BeaconUpgraded", + "name": "NewProtocolShareReserve", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" } ], - "name": "Upgraded", + "name": "NewReduceReservesBlockDelta", "type": "event" }, { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "Unitroller": { - "address": "0xfD36E2c2a6789Db23113685031d7F16329158384", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, { "indexed": false, "internalType": "uint256", - "name": "error", + "name": "redeemAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "info", + "name": "redeemTokens", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "detail", + "name": "totalSupply", "type": "uint256" } ], - "name": "Failure", + "name": "Redeem", "type": "event" }, { @@ -40287,17 +40237,23 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "redeemer", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "RedeemFee", "type": "event" }, { @@ -40306,17 +40262,35 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "borrower", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" } ], - "name": "NewImplementation", + "name": "RepayBorrow", "type": "event" }, { @@ -40325,17 +40299,23 @@ { "indexed": false, "internalType": "address", - "name": "oldPendingAdmin", + "name": "benefactor", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" } ], - "name": "NewPendingAdmin", + "name": "ReservesAdded", "type": "event" }, { @@ -40344,23 +40324,49 @@ { "indexed": false, "internalType": "address", - "name": "oldPendingImplementation", + "name": "protocolShareReserve", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" } ], - "name": "NewPendingImplementation", + "name": "ReservesReduced", "type": "event" }, { - "payable": true, - "stateMutability": "payable", - "type": "fallback" + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" }, { "constant": false, @@ -40379,8 +40385,14 @@ }, { "constant": false, - "inputs": [], - "name": "_acceptImplementation", + "inputs": [ + { + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + } + ], + "name": "_addReserves", "outputs": [ { "internalType": "uint256", @@ -40396,12 +40408,27 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "_setPendingAdmin", + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount_", + "type": "uint256" + } + ], + "name": "_reduceReserves", "outputs": [ { "internalType": "uint256", @@ -40413,16 +40440,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { - "internalType": "address", - "name": "newPendingImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "_setPendingImplementation", + "name": "_setComptroller", "outputs": [ { "internalType": "uint256", @@ -40435,139 +40471,111 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptrollerImplementation", + "name": "_setInterestRateModel", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "address payable", + "name": "newPendingAdmin", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingComptrollerImplementation", + "name": "_setPendingAdmin", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "indexed": false, - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "_diamondCut", - "type": "tuple[]" + "internalType": "uint256", + "name": "newReserveFactorMantissa_", + "type": "uint256" } ], - "name": "DiamondCut", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [ + "name": "_setReserveFactor", + "outputs": [ { - "internalType": "contract Unitroller", - "name": "unitroller", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_become", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "accessControlManager", + "outputs": [ { "internalType": "address", "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "accountAssets", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "accrueInterest", "outputs": [ { - "internalType": "contract VToken", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -40576,7 +40584,7 @@ "name": "admin", "outputs": [ { - "internalType": "address", + "internalType": "address payable", "name": "", "type": "address" } @@ -40589,17 +40597,22 @@ "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "allMarkets", + "name": "allowance", "outputs": [ { - "internalType": "contract VToken", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -40607,20 +40620,20 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "spender", "type": "address" }, { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "approvedDelegates", + "name": "approve", "outputs": [ { "internalType": "bool", @@ -40629,34 +40642,40 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "borrowCapGuardian", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], - "name": "borrowCaps", + "name": "balanceOfUnderlying", "outputs": [ { "internalType": "uint256", @@ -40665,13 +40684,19 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "closeFactorMantissa", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", "outputs": [ { "internalType": "uint256", @@ -40680,33 +40705,45 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "comptrollerImplementation", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "comptrollerLens", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", "outputs": [ { - "internalType": "contract ComptrollerLensInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -40717,61 +40754,37 @@ "constant": false, "inputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "diamondCut_", - "type": "tuple[]" + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "diamondCut", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" - } - ], - "name": "facetAddress", + "inputs": [], + "name": "borrowIndex", "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "uint96", - "name": "functionSelectorPosition", - "type": "uint96" - } - ], - "internalType": "struct ComptrollerV13Storage.FacetAddressAndPosition", + "internalType": "uint256", "name": "", - "type": "tuple" + "type": "uint256" } ], "payable": false, @@ -40781,12 +40794,12 @@ { "constant": true, "inputs": [], - "name": "facetAddresses", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "address[]", + "internalType": "uint256", "name": "", - "type": "address[]" + "type": "uint256" } ], "payable": false, @@ -40795,19 +40808,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "facet", - "type": "address" - } - ], - "name": "facetFunctionSelectors", + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes4[]", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes4[]" + "type": "address" } ], "payable": false, @@ -40816,14 +40823,23 @@ }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "decimals", + "outputs": [ { - "internalType": "address", - "name": "facet", - "type": "address" + "internalType": "uint8", + "name": "", + "type": "uint8" } ], - "name": "facetPosition", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "exchangeRateCurrent", "outputs": [ { "internalType": "uint256", @@ -40832,30 +40848,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "facets", + "name": "exchangeRateStored", "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct Diamond.Facet[]", + "internalType": "uint256", "name": "", - "type": "tuple[]" + "type": "uint256" } ], "payable": false, @@ -40867,16 +40871,31 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "isForcedLiquidationEnabled", + "name": "getAccountSnapshot", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "payable": false, @@ -40886,7 +40905,7 @@ { "constant": true, "inputs": [], - "name": "liquidationIncentiveMantissa", + "name": "getCash", "outputs": [ { "internalType": "uint256", @@ -40901,7 +40920,7 @@ { "constant": true, "inputs": [], - "name": "liquidatorContract", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -40914,60 +40933,99 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "underlying_", "type": "address" - } - ], - "name": "markets", - "outputs": [ + }, { - "internalType": "bool", - "name": "isListed", - "type": "bool" + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" }, { "internalType": "uint256", - "name": "collateralFactorMantissa", + "name": "initialExchangeRateMantissa_", "type": "uint256" }, { - "internalType": "bool", - "name": "isVenus", - "type": "bool" + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "maxAssets", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "initialExchangeRateMantissa_", "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "minReleaseAmount", + "name": "interestRateModel", "outputs": [ { - "internalType": "uint256", + "internalType": "contract InterestRateModel", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -40977,7 +41035,7 @@ { "constant": true, "inputs": [], - "name": "mintVAIGuardianPaused", + "name": "isVToken", "outputs": [ { "internalType": "bool", @@ -40990,15 +41048,25 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", "type": "address" } ], - "name": "mintedVAIs", + "name": "liquidateBorrow", "outputs": [ { "internalType": "uint256", @@ -41007,48 +41075,65 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "oracle", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", "outputs": [ { - "internalType": "contract PriceOracle", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pauseGuardian", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "receiver", "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "payable": false, @@ -41058,10 +41143,10 @@ { "constant": true, "inputs": [], - "name": "pendingComptrollerImplementation", + "name": "pendingAdmin", "outputs": [ { - "internalType": "address", + "internalType": "address payable", "name": "", "type": "address" } @@ -41073,12 +41158,12 @@ { "constant": true, "inputs": [], - "name": "protocolPaused", + "name": "protocolShareReserve", "outputs": [ { - "internalType": "bool", + "internalType": "address payable", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -41086,45 +41171,41 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "releaseStartBlock", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "redeemTokens", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "repayVAIGuardianPaused", + "name": "redeem", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "redeemer", "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" } ], - "name": "supplyCaps", + "name": "redeemBehalf", "outputs": [ { "internalType": "uint256", @@ -41133,73 +41214,60 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "treasuryAddress", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryGuardian", + "name": "redeemUnderlying", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "treasuryPercent", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "redeemAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiController", + "name": "redeemUnderlyingBehalf", "outputs": [ { - "internalType": "contract VAIControllerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "vaiMintRate", + "name": "reduceReservesBlockDelta", "outputs": [ { "internalType": "uint256", @@ -41214,12 +41282,12 @@ { "constant": true, "inputs": [], - "name": "vaiVaultAddress", + "name": "reduceReservesBlockNumber", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -41227,15 +41295,15 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" } ], - "name": "venusAccrued", + "name": "repayBorrow", "outputs": [ { "internalType": "uint256", @@ -41244,19 +41312,24 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "borrower", "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" } ], - "name": "venusBorrowSpeeds", + "name": "repayBorrowBehalf", "outputs": [ { "internalType": "uint256", @@ -41265,29 +41338,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusBorrowState", + "inputs": [], + "name": "reserveFactorMantissa", "outputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "payable": false, @@ -41295,20 +41357,25 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "liquidator", "type": "address" }, { "internalType": "address", - "name": "", + "name": "borrower", "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" } ], - "name": "venusBorrowerIndex", + "name": "seize", "outputs": [ { "internalType": "uint256", @@ -41317,24 +41384,19 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", + "name": "newAccessControlManagerAddress", "type": "address" } ], - "name": "venusSupplierIndex", + "name": "setAccessControlManager", "outputs": [ { "internalType": "uint256", @@ -41343,50 +41405,63 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "address payable", + "name": "protcolShareReserve_", "type": "address" } ], - "name": "venusSupplySpeeds", - "outputs": [ + "name": "setProtocolShareReserve", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "newReduceReservesBlockDelta_", "type": "uint256" } ], + "name": "setReduceReservesBlockDelta", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], - "name": "venusSupplyState", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" + "internalType": "string", + "name": "", + "type": "string" } ], "payable": false, @@ -41396,7 +41471,7 @@ { "constant": true, "inputs": [], - "name": "venusVAIVaultRate", + "name": "totalBorrows", "outputs": [ { "internalType": "uint256", @@ -41407,84 +41482,33 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "Unitroller_Implementation": { - "address": "0x347ba9559fFC65A94af0F6a513037Cd4982b7b18", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "indexed": false, - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "_diamondCut", - "type": "tuple[]" - } - ], - "name": "DiamondCut", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" }, { "constant": false, - "inputs": [ + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ { - "internalType": "contract Unitroller", - "name": "unitroller", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_become", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, + "inputs": [], + "name": "totalReserves", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "accountAssets", - "outputs": [ - { - "internalType": "contract VToken", - "name": "", - "type": "address" - } - ], "payable": false, "stateMutability": "view", "type": "function" @@ -41492,12 +41516,12 @@ { "constant": true, "inputs": [], - "name": "admin", + "name": "totalSupply", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -41505,41 +41529,51 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "name": "allMarkets", + "name": "transfer", "outputs": [ { - "internalType": "contract VToken", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "src", "type": "address" }, { "internalType": "address", - "name": "", + "name": "dst", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "approvedDelegates", + "name": "transferFrom", "outputs": [ { "internalType": "bool", @@ -41548,13 +41582,13 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "borrowCapGuardian", + "name": "underlying", "outputs": [ { "internalType": "address", @@ -41565,132 +41599,164 @@ "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "VRT": { + "address": "0x5f84ce30dc3cf7909101c69086c50de191895883", + "abi": [ { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "borrowCaps", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": true, - "inputs": [], - "name": "closeFactorMantissa", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Approval", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "comptrollerImplementation", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "DelegateChanged", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "comptrollerLens", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "contract ComptrollerLensInterface", - "name": "", + "indexed": true, + "internalType": "address", + "name": "delegate", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "DelegateVotesChanged", + "type": "event" }, { - "constant": false, + "anonymous": false, + "inputs": [], + "name": "Freezed", + "type": "event" + }, + { + "anonymous": false, "inputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "enum IDiamondCut.FacetCutAction", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IDiamondCut.FacetCut[]", - "name": "diamondCut_", - "type": "tuple[]" + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" } ], - "name": "diamondCut", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "bytes4", - "name": "functionSelector", - "type": "bytes4" + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "facetAddress", + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "UnFreezed", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "uint96", - "name": "functionSelectorPosition", - "type": "uint96" - } - ], - "internalType": "struct ComptrollerV13Storage.FacetAddressAndPosition", + "internalType": "bytes32", "name": "", - "type": "tuple" + "type": "bytes32" } ], "payable": false, @@ -41700,12 +41766,12 @@ { "constant": true, "inputs": [], - "name": "facetAddresses", + "name": "DOMAIN_TYPEHASH", "outputs": [ { - "internalType": "address[]", + "internalType": "bytes32", "name": "", - "type": "address[]" + "type": "bytes32" } ], "payable": false, @@ -41717,16 +41783,21 @@ "inputs": [ { "internalType": "address", - "name": "facet", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" } ], - "name": "facetFunctionSelectors", + "name": "allowance", "outputs": [ { - "internalType": "bytes4[]", + "internalType": "uint256", "name": "", - "type": "bytes4[]" + "type": "uint256" } ], "payable": false, @@ -41734,51 +41805,29 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "facet", + "name": "spender", "type": "address" - } - ], - "name": "facetPosition", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "rawAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "facets", + "name": "approve", "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "facetAddress", - "type": "address" - }, - { - "internalType": "bytes4[]", - "name": "functionSelectors", - "type": "bytes4[]" - } - ], - "internalType": "struct Diamond.Facet[]", + "internalType": "bool", "name": "", - "type": "tuple[]" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -41786,16 +41835,16 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "isForcedLiquidationEnabled", + "name": "balanceOf", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -41811,17 +41860,22 @@ "type": "address" }, { - "internalType": "address", + "internalType": "uint32", "name": "", - "type": "address" + "type": "uint32" } ], - "name": "isForcedLiquidationEnabledForUser", + "name": "checkpoints", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" } ], "payable": false, @@ -41831,12 +41885,12 @@ { "constant": true, "inputs": [], - "name": "liquidationIncentiveMantissa", + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, @@ -41844,60 +41898,75 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "liquidatorContract", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "delegatee", "type": "address" } ], + "name": "delegate", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "delegatee", "type": "address" - } - ], - "name": "markets", - "outputs": [ + }, { - "internalType": "bool", - "name": "isListed", - "type": "bool" + "internalType": "uint256", + "name": "nonce", + "type": "uint256" }, { "internalType": "uint256", - "name": "collateralFactorMantissa", + "name": "expiry", "type": "uint256" }, { - "internalType": "bool", - "name": "isVenus", - "type": "bool" + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], + "name": "delegateBySig", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "maxAssets", + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -41905,29 +41974,29 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "minReleaseAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "freeze", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "mintVAIGuardianPaused", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", "outputs": [ { - "internalType": "bool", + "internalType": "uint96", "name": "", - "type": "bool" + "type": "uint96" } ], "payable": false, @@ -41939,16 +42008,21 @@ "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" } ], - "name": "mintedVAIs", + "name": "getPriorVotes", "outputs": [ { - "internalType": "uint256", + "internalType": "uint96", "name": "", - "type": "uint256" + "type": "uint96" } ], "payable": false, @@ -41958,12 +42032,12 @@ { "constant": true, "inputs": [], - "name": "oracle", + "name": "name", "outputs": [ { - "internalType": "contract PriceOracle", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "payable": false, @@ -41972,28 +42046,19 @@ }, { "constant": true, - "inputs": [], - "name": "pauseGuardian", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", + "name": "nonces", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -42002,28 +42067,19 @@ }, { "constant": true, - "inputs": [], - "name": "pendingComptrollerImplementation", - "outputs": [ + "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "prime", + "name": "numCheckpoints", "outputs": [ { - "internalType": "contract IPrime", + "internalType": "uint32", "name": "", - "type": "address" + "type": "uint32" } ], "payable": false, @@ -42033,12 +42089,12 @@ { "constant": true, "inputs": [], - "name": "protocolPaused", + "name": "owner", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -42048,12 +42104,12 @@ { "constant": true, "inputs": [], - "name": "releaseStartBlock", + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -42063,12 +42119,12 @@ { "constant": true, "inputs": [], - "name": "repayVAIGuardianPaused", + "name": "totalSupply", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -42076,334 +42132,128 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "", + "name": "dst", "type": "address" - } - ], - "name": "supplyCaps", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "rawAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryAddress", + "name": "transfer", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "treasuryGuardian", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "src", "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryPercent", - "outputs": [ + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "rawAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiController", + "name": "transferFrom", "outputs": [ { - "internalType": "contract VAIControllerInterface", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "vaiMintRate", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], + "name": "transferOwnership", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "vaiVaultAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusAccrued", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusBorrowSpeeds", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "unfreeze", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "VRTConverterProxy": { + "address": "0x92572fB60f4874d37917C53599cAe5b085B9Facd", + "abi": [ { - "constant": true, "inputs": [ { "internalType": "address", - "name": "", + "name": "implementation_", "type": "address" - } - ], - "name": "venusBorrowState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ { "internalType": "address", - "name": "", + "name": "_vrtAddress", "type": "address" }, { "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusBorrowerIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", + "name": "_xvsAddress", "type": "address" }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusSupplierIndex", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "_conversionRatio", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusSupplySpeeds", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "_conversionStartTime", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusSupplyState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "venusVAIVaultRate", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "_conversionPeriod", "type": "uint256" } ], "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "Unitroller_Proxy": { - "address": "0xfD36E2c2a6789Db23113685031d7F16329158384", - "abi": [ - { - "inputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -42489,13 +42339,7 @@ "constant": false, "inputs": [], "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -42504,13 +42348,22 @@ "constant": false, "inputs": [], "name": "_acceptImplementation", - "outputs": [ + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "implementation_", + "type": "address" } ], + "name": "_setImplementation", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -42525,13 +42378,7 @@ } ], "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -42546,13 +42393,7 @@ } ], "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -42575,7 +42416,7 @@ { "constant": true, "inputs": [], - "name": "comptrollerImplementation", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -42605,7 +42446,7 @@ { "constant": true, "inputs": [], - "name": "pendingComptrollerImplementation", + "name": "pendingImplementation", "outputs": [ { "internalType": "address", @@ -42616,20 +42457,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "VAI": { - "address": "0x4BD17003473389A42DAF6a0a729f6Fdb328BbBd7", - "abi": [ + }, { - "inputs": [ - { - "internalType": "uint256", - "name": "chainId_", - "type": "uint256" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -42638,113 +42468,117 @@ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "src", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "conversionRatio", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "guy", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "conversionStartTime", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "wad", + "name": "conversionPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "conversionEndTime", "type": "uint256" } ], - "name": "Approval", + "name": "ConversionInfoSet", "type": "event" }, { - "anonymous": true, + "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes4", - "name": "sig", - "type": "bytes4" + "indexed": false, + "internalType": "address", + "name": "reedeemer", + "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "usr", + "name": "vrtAddress", "type": "address" }, { - "indexed": true, - "internalType": "bytes32", - "name": "arg1", - "type": "bytes32" + "indexed": false, + "internalType": "uint256", + "name": "vrtAmount", + "type": "uint256" }, { - "indexed": true, - "internalType": "bytes32", - "name": "arg2", - "type": "bytes32" + "indexed": false, + "internalType": "address", + "name": "xvsAddress", + "type": "address" }, { "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "xvsAmount", + "type": "uint256" } ], - "name": "LogNote", + "name": "TokenConverted", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "src", + "name": "token", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "dst", + "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "wad", + "name": "amount", "type": "uint256" } ], - "name": "Transfer", + "name": "TokenWithdraw", "type": "event" }, { - "constant": true, - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" + "indexed": false, + "internalType": "address", + "name": "xvsVestingAddress", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "XVSVestingSet", + "type": "event" }, { "constant": true, "inputs": [], - "name": "PERMIT_TYPEHASH", + "name": "DEAD_ADDRESS", "outputs": [ { - "internalType": "bytes32", + "internalType": "address", "name": "", - "type": "bytes32" + "type": "address" } ], "payable": false, @@ -42752,25 +42586,29 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", + "internalType": "contract VRTConverterProxy", + "name": "vrtConverterProxy", "type": "address" } ], - "name": "allowance", + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "_notEntered", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -42778,41 +42616,39 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { "internalType": "address", - "name": "usr", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" } ], - "name": "approve", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "conversionEndTime", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "conversionPeriod", "outputs": [ { "internalType": "uint256", @@ -42825,34 +42661,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "usr", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "conversionRatio", + "outputs": [ { "internalType": "uint256", - "name": "wad", + "name": "", "type": "uint256" } ], - "name": "burn", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "decimals", + "name": "conversionStartTime", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -42863,35 +42694,30 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "guy", - "type": "address" + "internalType": "uint256", + "name": "vrtAmount", + "type": "uint256" } ], - "name": "deny", + "name": "convert", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ { "internalType": "address", - "name": "usr", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" } ], - "name": "mint", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -42899,21 +42725,31 @@ "inputs": [ { "internalType": "address", - "name": "src", + "name": "_vrtAddress", "type": "address" }, { "internalType": "address", - "name": "dst", + "name": "_xvsAddress", "type": "address" }, { "internalType": "uint256", - "name": "wad", + "name": "_conversionRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_conversionStartTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_conversionPeriod", "type": "uint256" } ], - "name": "move", + "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -42922,12 +42758,12 @@ { "constant": true, "inputs": [], - "name": "name", + "name": "initialized", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], "payable": false, @@ -42936,19 +42772,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", + "inputs": [], + "name": "isConversionActive", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -42956,73 +42786,33 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" } ], - "name": "permit", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingImplementation", + "outputs": [ { "internalType": "address", - "name": "usr", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" } ], - "name": "pull", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -43030,45 +42820,40 @@ "inputs": [ { "internalType": "address", - "name": "usr", + "name": "_xvsVestingAddress", "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" } ], - "name": "push", + "name": "setXVSVesting", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "totalVrtConverted", + "outputs": [ { - "internalType": "address", - "name": "guy", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "rely", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "symbol", + "name": "vrt", "outputs": [ { - "internalType": "string", + "internalType": "contract IBEP20", "name": "", - "type": "string" + "type": "address" } ], "payable": false, @@ -43078,7 +42863,7 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "vrtDecimalsMultiplier", "outputs": [ { "internalType": "uint256", @@ -43091,71 +42876,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "transfer", + "constant": true, + "inputs": [], + "name": "xvs", "outputs": [ { - "internalType": "bool", + "internalType": "contract IBEP20", "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", "type": "address" - }, - { - "internalType": "uint256", - "name": "wad", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "version", + "name": "xvsDecimalsMultiplier", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -43164,19 +42907,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "wards", + "inputs": [], + "name": "xvsVesting", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IXVSVesting", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -43185,8 +42922,8 @@ } ] }, - "VAIVault": { - "address": "0x0B4d7776b87deD4a0958E32D5155598057D2620D", + "VRTConverterProxy_Implementation": { + "address": "0x3192d0fb11c15629c403a6416abfcd7587b180b7", "abi": [ { "inputs": [], @@ -43198,19 +42935,31 @@ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "conversionRatio", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "conversionStartTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "conversionPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "conversionEndTime", "type": "uint256" } ], - "name": "Deposit", + "name": "ConversionInfoSet", "type": "event" }, { @@ -43219,70 +42968,96 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlManager", + "name": "reedeemer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlManager", + "name": "vrtAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "vrtAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "xvsAddress", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "xvsAmount", + "type": "uint256" } ], - "name": "NewAccessControlManager", + "name": "TokenConverted", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "admin", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "VaultPaused", + "name": "TokenWithdraw", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "admin", + "name": "xvsVestingAddress", "type": "address" } ], - "name": "VaultResumed", + "name": "XVSVestingSet", "type": "event" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "DEAD_ADDRESS", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "user", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "Withdraw", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "contract IVAIVaultProxy", - "name": "vaiVaultProxy", + "internalType": "contract VRTConverterProxy", + "name": "vrtConverterProxy", "type": "address" } ], @@ -43295,12 +43070,12 @@ { "constant": true, "inputs": [], - "name": "accXVSPerShare", + "name": "_notEntered", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -43310,10 +43085,10 @@ { "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "admin", "outputs": [ { - "internalType": "contract IAccessControlManagerV5", + "internalType": "address", "name": "", "type": "address" } @@ -43325,12 +43100,12 @@ { "constant": true, "inputs": [], - "name": "admin", + "name": "conversionEndTime", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -43338,48 +43113,60 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "conversionPeriod", + "outputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "claim", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "claim", - "outputs": [], + "name": "conversionRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "conversionStartTime", + "outputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "", "type": "uint256" } ], - "name": "deposit", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, - "inputs": [], - "name": "pause", + "inputs": [ + { + "internalType": "uint256", + "name": "vrtAmount", + "type": "uint256" + } + ], + "name": "convert", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -43388,7 +43175,7 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -43401,29 +43188,49 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingRewards", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_vrtAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsAddress", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_conversionRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_conversionStartTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_conversionPeriod", "type": "uint256" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "pendingVAIVaultImplementation", + "name": "initialized", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -43432,19 +43239,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingXVS", + "inputs": [], + "name": "isConversionActive", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -43452,27 +43253,33 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "resume", - "outputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingImplementation", + "outputs": [ { "internalType": "address", - "name": "newAccessControlAddress", + "name": "", "type": "address" } ], - "name": "setAccessControl", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -43480,25 +43287,11 @@ "inputs": [ { "internalType": "address", - "name": "_xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "_vai", + "name": "_xvsVestingAddress", "type": "address" } ], - "name": "setVenusInfo", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "updatePendingRewards", + "name": "setXVSVesting", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -43506,23 +43299,12 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userInfo", + "inputs": [], + "name": "totalVrtConverted", "outputs": [ { "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardDebt", + "name": "", "type": "uint256" } ], @@ -43533,7 +43315,7 @@ { "constant": true, "inputs": [], - "name": "vai", + "name": "vrt", "outputs": [ { "internalType": "contract IBEP20", @@ -43548,12 +43330,12 @@ { "constant": true, "inputs": [], - "name": "vaiVaultImplementation", + "name": "vrtDecimalsMultiplier", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -43563,42 +43345,27 @@ { "constant": true, "inputs": [], - "name": "vaultPaused", + "name": "xvs", "outputs": [ { - "internalType": "bool", + "internalType": "contract IBEP20", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], - "name": "xvs", + "name": "xvsDecimalsMultiplier", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -43608,12 +43375,12 @@ { "constant": true, "inputs": [], - "name": "xvsBalance", + "name": "xvsVesting", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IXVSVesting", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -43622,39 +43389,45 @@ } ] }, - "VAIVaultProxy": { - "address": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", + "VRTConverterProxy_Proxy": { + "address": "0x92572fB60f4874d37917C53599cAe5b085B9Facd", "abi": [ { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, "inputs": [ { - "indexed": false, + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "_vrtAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsAddress", + "type": "address" + }, + { "internalType": "uint256", - "name": "error", + "name": "_conversionRatio", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "info", + "name": "_conversionStartTime", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "detail", + "name": "_conversionPeriod", "type": "uint256" } ], - "name": "Failure", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, @@ -43741,13 +43514,7 @@ "constant": false, "inputs": [], "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -43756,13 +43523,22 @@ "constant": false, "inputs": [], "name": "_acceptImplementation", - "outputs": [ + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "implementation_", + "type": "address" } ], + "name": "_setImplementation", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -43777,13 +43553,7 @@ } ], "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -43798,13 +43568,7 @@ } ], "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -43827,7 +43591,7 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -43842,7 +43606,7 @@ { "constant": true, "inputs": [], - "name": "pendingVAIVaultImplementation", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", @@ -43857,7 +43621,7 @@ { "constant": true, "inputs": [], - "name": "vaiVaultImplementation", + "name": "pendingImplementation", "outputs": [ { "internalType": "address", @@ -43868,13 +43632,56 @@ "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "VRTVault": { + "address": "0x1405899732Cfe963EaB935a8bBa49c47FE996048", + "abi": [ { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminTransfered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAmount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -43894,6 +43701,25 @@ "name": "Deposit", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldLastAccruingBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLastAccruingBlock", + "type": "uint256" + } + ], + "name": "LastAccruingBlockChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -43951,19 +43777,56 @@ { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "withdrawnAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalPrincipalAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accruedInterest", "type": "uint256" } ], "name": "Withdraw", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawToken", + "type": "event" + }, { "constant": false, "inputs": [ { - "internalType": "contract IVAIVaultProxy", - "name": "vaiVaultProxy", + "internalType": "contract IVRTVaultProxy", + "name": "vrtVaultProxy", "type": "address" } ], @@ -43976,12 +43839,12 @@ { "constant": true, "inputs": [], - "name": "accXVSPerShare", + "name": "_notEntered", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -44047,7 +43910,7 @@ "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "depositAmount", "type": "uint256" } ], @@ -44057,26 +43920,23 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "userAddress", "type": "address" } ], + "name": "getAccruedInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -44084,7 +43944,7 @@ { "constant": true, "inputs": [], - "name": "pendingRewards", + "name": "getBlockNumber", "outputs": [ { "internalType": "uint256", @@ -44099,7 +43959,7 @@ { "constant": true, "inputs": [], - "name": "pendingVAIVaultImplementation", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -44112,15 +43972,44 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "_user", + "name": "_vrtAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "_interestRatePerBlock", + "type": "uint256" } ], - "name": "pendingXVS", + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "interestRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "lastAccruingBlock", "outputs": [ { "internalType": "uint256", @@ -44135,22 +44024,46 @@ { "constant": false, "inputs": [], - "name": "resume", + "name": "pause", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newAccessControlAddress", + "name": "", "type": "address" } ], - "name": "setAccessControl", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44161,16 +44074,11 @@ "inputs": [ { "internalType": "address", - "name": "_xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "_vai", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "setVenusInfo", + "name": "setAccessControl", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44178,8 +44086,14 @@ }, { "constant": false, - "inputs": [], - "name": "updatePendingRewards", + "inputs": [ + { + "internalType": "uint256", + "name": "_lastAccruingBlock", + "type": "uint256" + } + ], + "name": "setLastAccruingBlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44196,14 +44110,24 @@ ], "name": "userInfo", "outputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, { "internalType": "uint256", - "name": "amount", + "name": "accrualStartBlockNumber", "type": "uint256" }, { "internalType": "uint256", - "name": "rewardDebt", + "name": "totalPrincipalAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastWithdrawnBlockNumber", "type": "uint256" } ], @@ -44214,12 +44138,12 @@ { "constant": true, "inputs": [], - "name": "vai", + "name": "vaultPaused", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -44229,10 +44153,10 @@ { "constant": true, "inputs": [], - "name": "vaiVaultImplementation", + "name": "vrt", "outputs": [ { - "internalType": "address", + "internalType": "contract IBEP20", "name": "", "type": "address" } @@ -44242,30 +44166,205 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "vaultPaused", - "outputs": [ + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], + "name": "withdrawBep20", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "VRTVaultProxy": { + "address": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334", + "abi": [ { - "constant": false, "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "vrtAddress_", + "type": "address" + }, { "internalType": "uint256", - "name": "_amount", + "name": "interestRatePerBlock_", "type": "uint256" } ], - "name": "withdraw", + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "_setPendingImplementation", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44274,10 +44373,10 @@ { "constant": true, "inputs": [], - "name": "xvs", + "name": "admin", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "address", "name": "", "type": "address" } @@ -44289,29 +44388,73 @@ { "constant": true, "inputs": [], - "name": "xvsBalance", + "name": "implementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "VAIVaultProxy_Implementation": { - "address": "0xa52f2a56abb7cbdd378bc36c6088fafeaf9ac423", - "abi": [ + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAmount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -44331,6 +44474,25 @@ "name": "Deposit", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldLastAccruingBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLastAccruingBlock", + "type": "uint256" + } + ], + "name": "LastAccruingBlockChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -44388,19 +44550,71 @@ { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "withdrawnAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalPrincipalAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accruedInterest", "type": "uint256" } ], "name": "Withdraw", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawToken", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_LAST_ACCRUING_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ { - "internalType": "contract IVAIVaultProxy", - "name": "vaiVaultProxy", + "internalType": "contract IVRTVaultProxy", + "name": "vrtVaultProxy", "type": "address" } ], @@ -44413,12 +44627,12 @@ { "constant": true, "inputs": [], - "name": "accXVSPerShare", + "name": "_notEntered", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -44484,7 +44698,7 @@ "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "depositAmount", "type": "uint256" } ], @@ -44494,26 +44708,23 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "userAddress", "type": "address" } ], + "name": "getAccruedInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -44521,7 +44732,7 @@ { "constant": true, "inputs": [], - "name": "pendingRewards", + "name": "getBlockNumber", "outputs": [ { "internalType": "uint256", @@ -44536,7 +44747,7 @@ { "constant": true, "inputs": [], - "name": "pendingVAIVaultImplementation", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -44549,15 +44760,44 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "_user", + "name": "_vrtAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "_interestRatePerBlock", + "type": "uint256" } ], - "name": "pendingXVS", + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "interestRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "lastAccruingBlock", "outputs": [ { "internalType": "uint256", @@ -44572,22 +44812,46 @@ { "constant": false, "inputs": [], - "name": "resume", + "name": "pause", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newAccessControlAddress", + "name": "", "type": "address" } ], - "name": "setAccessControl", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44598,16 +44862,11 @@ "inputs": [ { "internalType": "address", - "name": "_xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "_vai", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "setVenusInfo", + "name": "setAccessControl", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44615,8 +44874,14 @@ }, { "constant": false, - "inputs": [], - "name": "updatePendingRewards", + "inputs": [ + { + "internalType": "uint256", + "name": "_lastAccruingBlock", + "type": "uint256" + } + ], + "name": "setLastAccruingBlock", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -44633,30 +44898,25 @@ ], "name": "userInfo", "outputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, { "internalType": "uint256", - "name": "amount", + "name": "accrualStartBlockNumber", "type": "uint256" }, { "internalType": "uint256", - "name": "rewardDebt", + "name": "totalPrincipalAmount", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vai", - "outputs": [ + }, { - "internalType": "contract IBEP20", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "lastWithdrawnBlockNumber", + "type": "uint256" } ], "payable": false, @@ -44666,12 +44926,12 @@ { "constant": true, "inputs": [], - "name": "vaiVaultImplementation", + "name": "vaultPaused", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -44681,12 +44941,12 @@ { "constant": true, "inputs": [], - "name": "vaultPaused", + "name": "vrt", "outputs": [ { - "internalType": "bool", + "internalType": "contract IBEP20", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -44695,13 +44955,7 @@ }, { "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], + "inputs": [], "name": "withdraw", "outputs": [], "payable": false, @@ -44709,39 +44963,34 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "xvs", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "contract IBEP20", - "name": "", + "internalType": "address", + "name": "tokenAddress", "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsBalance", - "outputs": [ + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], + "name": "withdrawBep20", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" } ] }, - "VAIVaultProxy_Proxy": { - "address": "0x0667Eed0a0aAb930af74a3dfeDD263A73994f216", + "VRTVaultProxy_Implementation": { + "address": "0xea98e94d35120b23f9f9f20a7314804d4ab491f1", "abi": [ { "inputs": [], @@ -44753,25 +45002,38 @@ "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "info", + "name": "interestAmount", "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "detail", + "name": "amount", "type": "uint256" } ], - "name": "Failure", + "name": "Deposit", "type": "event" }, { @@ -44779,18 +45041,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" + "internalType": "uint256", + "name": "oldLastAccruingBlock", + "type": "uint256" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "newLastAccruingBlock", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "LastAccruingBlockChanged", "type": "event" }, { @@ -44799,81 +45061,105 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAccessControlManager", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAccessControlManager", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAccessControlManager", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldPendingAdmin", + "name": "admin", "type": "address" - }, + } + ], + "name": "VaultPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newPendingAdmin", + "name": "admin", "type": "address" } ], - "name": "NewPendingAdmin", + "name": "VaultResumed", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldPendingImplementation", + "name": "user", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" + "internalType": "uint256", + "name": "withdrawnAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalPrincipalAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accruedInterest", + "type": "uint256" } ], - "name": "NewPendingImplementation", + "name": "Withdraw", "type": "event" }, { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "WithdrawToken", + "type": "event" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "_acceptImplementation", + "name": "MAX_LAST_ACCRUING_BLOCK", "outputs": [ { "internalType": "uint256", @@ -44882,75 +45168,33 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "address", - "name": "newPendingAdmin", + "internalType": "contract IVRTVaultProxy", + "name": "vrtVaultProxy", "type": "address" } ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "_become", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "_notEntered", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -44960,10 +45204,10 @@ { "constant": true, "inputs": [], - "name": "pendingVAIVaultImplementation", + "name": "accessControlManager", "outputs": [ { - "internalType": "address", + "internalType": "contract IAccessControlManagerV5", "name": "", "type": "address" } @@ -44975,7 +45219,7 @@ { "constant": true, "inputs": [], - "name": "vaiVaultImplementation", + "name": "admin", "outputs": [ { "internalType": "address", @@ -44986,312 +45230,160 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "VBNBAdmin": { - "address": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newAdmin", + "name": "account", "type": "address" } ], - "name": "changeAdmin", + "name": "claim", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", + "name": "claim", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "uint256", + "name": "depositAmount", + "type": "uint256" } ], - "name": "upgradeToAndCall", + "name": "deposit", "outputs": [], - "stateMutability": "payable", + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "stateMutability": "payable", - "type": "receive" - }, - { + "constant": true, "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "calledContract", + "name": "userAddress", "type": "address" - }, - { - "internalType": "string", - "name": "methodSignature", - "type": "string" } ], - "name": "Unauthorized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ + "name": "getAccruedInterest", + "outputs": [ { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlManager", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "getBlockNumber", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "NewAccessControlManager", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "OwnershipTransferStarted", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": 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": "contract IProtocolShareReserve", - "name": "oldProtocolShareReserve", + "name": "_vrtAddress", "type": "address" }, { - "indexed": true, - "internalType": "contract IProtocolShareReserve", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "ProtocolShareReserveUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, "internalType": "uint256", - "name": "reduceAmount", + "name": "_interestRatePerBlock", "type": "uint256" } ], - "name": "ReservesReduced", - "type": "event" + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { + "constant": true, "inputs": [], - "name": "WBNB", + "name": "interestRatePerBlock", "outputs": [ { - "internalType": "contract IWBNB", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "accessControlManager", + "name": "lastAccruingBlock", "outputs": [ { - "internalType": "contract IAccessControlManagerV8", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "contract IProtocolShareReserve", - "name": "_protocolShareReserve", - "type": "address" - }, - { - "internalType": "address", - "name": "accessControlManager", - "type": "address" - } - ], - "name": "initialize", + "constant": false, + "inputs": [], + "name": "pause", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "owner", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", @@ -45299,12 +45391,14 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "pendingImplementation", "outputs": [ { "internalType": "address", @@ -45312,169 +45406,175 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], - "name": "protocolShareReserve", - "outputs": [ + "name": "resume", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "internalType": "contract IProtocolShareReserve", - "name": "", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "stateMutability": "view", + "name": "setAccessControl", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "_lastAccruingBlock", "type": "uint256" } ], - "name": "reduceReserves", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", + "name": "setLastAccruingBlock", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "accessControlManager_", + "name": "", "type": "address" } ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "userInfo", + "outputs": [ { - "internalType": "contract IProtocolShareReserve", - "name": "protocolShareReserve_", + "internalType": "address", + "name": "userAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "accrualStartBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalPrincipalAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastWithdrawnBlockNumber", + "type": "uint256" } ], - "name": "setProtocolShareReserve", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "constant": true, + "inputs": [], + "name": "vaultPaused", + "outputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "vBNB", + "name": "vrt", "outputs": [ { - "internalType": "contract VTokenInterface", + "internalType": "contract IBEP20", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": false, + "inputs": [], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, "inputs": [ { "internalType": "address", - "name": "_logic", + "name": "tokenAddress", "type": "address" }, { "internalType": "address", - "name": "admin_", + "name": "receiver", "type": "address" }, { - "internalType": "bytes", - "name": "_data", - "type": "bytes" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "withdrawBep20", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" } ] }, - "VBNBAdmin_Implementation": { - "address": "0x8c15384f1346BD977A689C0c51BD369E8d7313cA", + "VRTVaultProxy_Proxy": { + "address": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334", "abi": [ - { - "inputs": [ - { - "internalType": "contract VTokenInterface", - "name": "_vBNB", - "type": "address" - }, - { - "internalType": "contract IWBNB", - "name": "_WBNB", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, { "inputs": [ { "internalType": "address", - "name": "sender", + "name": "implementation_", "type": "address" }, { "internalType": "address", - "name": "calledContract", + "name": "vrtAddress_", "type": "address" }, { - "internalType": "string", - "name": "methodSignature", - "type": "string" - } - ], - "name": "Unauthorized", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" + "internalType": "uint256", + "name": "interestRatePerBlock_", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, @@ -45482,160 +45582,148 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlManager", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlManager", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "previousOwner", + "name": "oldImplementation", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "newOwner", + "name": "newImplementation", "type": "address" } ], - "name": "OwnershipTransferStarted", + "name": "NewImplementation", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "previousOwner", + "name": "oldPendingAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "newOwner", + "name": "newPendingAdmin", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "NewPendingAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "contract IProtocolShareReserve", - "name": "oldProtocolShareReserve", + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", "type": "address" }, - { - "indexed": true, - "internalType": "contract IProtocolShareReserve", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "ProtocolShareReserveUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" } ], - "name": "ReservesReduced", + "name": "NewPendingImplementation", "type": "event" }, { + "payable": true, "stateMutability": "payable", "type": "fallback" }, { + "constant": false, "inputs": [], - "name": "WBNB", - "outputs": [ - { - "internalType": "contract IWBNB", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", + "name": "_acceptAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [], - "name": "acceptOwnership", + "name": "_acceptImplementation", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "accessControlManager", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "contract IAccessControlManagerV8", - "name": "", + "internalType": "address", + "name": "implementation_", "type": "address" } ], - "stateMutability": "view", + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ - { - "internalType": "contract IProtocolShareReserve", - "name": "_protocolShareReserve", - "type": "address" - }, { "internalType": "address", - "name": "accessControlManager", + "name": "newPendingAdmin", "type": "address" } ], - "name": "initialize", + "name": "_setPendingAdmin", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "owner", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "newPendingImplementation", "type": "address" } ], - "stateMutability": "view", + "name": "_setPendingImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { + "constant": true, "inputs": [], - "name": "pendingOwner", + "name": "admin", "outputs": [ { "internalType": "address", @@ -45643,123 +45731,78 @@ "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "protocolShareReserve", + "name": "implementation", "outputs": [ { - "internalType": "contract IProtocolShareReserve", + "internalType": "address", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "reduceReserves", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { + "constant": true, "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "accessControlManager_", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IProtocolShareReserve", - "name": "protocolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": true, "inputs": [], - "name": "vBNB", + "name": "pendingImplementation", "outputs": [ { - "internalType": "contract VTokenInterface", + "internalType": "address", "name": "", "type": "address" } ], + "payable": false, "stateMutability": "view", "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" } ] }, - "VBNBAdmin_Proxy": { - "address": "0x9A7890534d9d91d473F28cB97962d176e2B65f1d", + "VTreasury": { + "address": "0xF322942f644A996A617BD29c16bd7d231d9F35E9", "abi": [ { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "_logic", + "name": "previousOwner", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "admin_", + "name": "newOwner", "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" } ], - "stateMutability": "payable", - "type": "constructor" + "name": "OwnershipTransferred", + "type": "event" }, { "anonymous": false, @@ -45767,221 +45810,138 @@ { "indexed": false, "internalType": "address", - "name": "previousAdmin", + "name": "tokenAddress", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "beacon", + "name": "withdrawAddress", "type": "address" } ], - "name": "BeaconUpgraded", + "name": "WithdrawTreasuryBEP20", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": false, "internalType": "address", - "name": "implementation", + "name": "withdrawAddress", "type": "address" } ], - "name": "Upgraded", + "name": "WithdrawTreasuryBNB", "type": "event" }, { + "payable": true, "stateMutability": "payable", "type": "fallback" }, { + "constant": true, "inputs": [], - "name": "admin", + "name": "owner", "outputs": [ { "internalType": "address", - "name": "admin_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", + "name": "", "type": "address" } ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", + "payable": false, + "stateMutability": "view", "type": "function" }, { + "constant": false, "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], + "name": "renounceOwnership", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "newOwner", "type": "address" } ], - "name": "upgradeTo", + "name": "transferOwnership", "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { + "constant": false, "inputs": [ { "internalType": "address", - "name": "newImplementation", + "name": "tokenAddress", "type": "address" }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "VBep20Delegate": { - "address": "0x6E5cFf66C7b671fA1D5782866D80BD15955d79F6", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "withdrawAmount", "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" }, { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "withdrawAddress", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "Approval", - "type": "event" + "name": "withdrawTreasuryBEP20", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "accountBorrows", + "name": "withdrawAmount", "type": "uint256" }, { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" } ], - "name": "Borrow", - "type": "event" - }, + "name": "withdrawTreasuryBNB", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + } + ] + }, + "VaiController": { + "address": "0x43E330C8F8E301c665d825015fddf117e76676Dc", + "abi": [ { "anonymous": false, "inputs": [ @@ -46041,7 +46001,7 @@ "type": "uint256" } ], - "name": "LiquidateBorrow", + "name": "LiquidateVAI", "type": "event" }, { @@ -46056,23 +46016,11 @@ { "indexed": false, "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", + "name": "feeAmount", "type": "uint256" } ], - "name": "Mint", + "name": "MintFee", "type": "event" }, { @@ -46080,36 +46028,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" + "internalType": "bool", + "name": "previousMintEnabledOnlyForPrimeHolder", + "type": "bool" }, { "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" + "internalType": "bool", + "name": "newMintEnabledOnlyForPrimeHolder", + "type": "bool" } ], - "name": "MintBehalf", + "name": "MintOnlyForPrimeHolder", "type": "event" }, { @@ -46118,17 +46048,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "minter", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" + "internalType": "uint256", + "name": "mintVAIAmount", + "type": "uint256" } ], - "name": "NewAccessControlManager", + "name": "MintVAI", "type": "event" }, { @@ -46137,17 +46067,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControl", "type": "event" }, { @@ -46174,18 +46104,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", + "internalType": "address", + "name": "oldPrime", "type": "address" }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "newPrime", "type": "address" } ], - "name": "NewMarketInterestRateModel", + "name": "NewPrime", "type": "event" }, { @@ -46194,36 +46124,36 @@ { "indexed": false, "internalType": "address", - "name": "oldPendingAdmin", + "name": "oldTreasuryAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newPendingAdmin", + "name": "newTreasuryAddress", "type": "address" } ], - "name": "NewPendingAdmin", + "name": "NewTreasuryAddress", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "oldProtocolShareReserve", + "name": "oldTreasuryGuardian", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "newProtocolShareReserve", + "name": "newTreasuryGuardian", "type": "address" } ], - "name": "NewProtocolShareReserve", + "name": "NewTreasuryGuardian", "type": "event" }, { @@ -46232,17 +46162,17 @@ { "indexed": false, "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", + "name": "oldTreasuryPercent", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newReduceReservesBlockDelta", + "name": "newTreasuryPercent", "type": "uint256" } ], - "name": "NewReduceReservesBlockDelta", + "name": "NewTreasuryPercent", "type": "event" }, { @@ -46251,73 +46181,55 @@ { "indexed": false, "internalType": "uint256", - "name": "oldReserveFactorMantissa", + "name": "oldBaseRateMantissa", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newBaseRateMantissa", "type": "uint256" } ], - "name": "NewReserveFactor", + "name": "NewVAIBaseRate", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, { "indexed": false, "internalType": "uint256", - "name": "redeemTokens", + "name": "oldFloatRateMantissa", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "newFlatRateMantissa", "type": "uint256" } ], - "name": "Redeem", + "name": "NewVAIFloatRate", "type": "event" }, { "anonymous": false, "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "feeAmount", + "name": "oldMintCap", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "redeemTokens", + "name": "newMintCap", "type": "uint256" } ], - "name": "RedeemFee", + "name": "NewVAIMintCap", "type": "event" }, { @@ -46326,35 +46238,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldReceiver", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "borrower", + "name": "newReceiver", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" } ], - "name": "RepayBorrow", + "name": "NewVAIReceiver", "type": "event" }, { @@ -46363,100 +46257,48 @@ { "indexed": false, "internalType": "address", - "name": "benefactor", + "name": "oldVaiToken", "type": "address" }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "newVaiToken", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" } ], - "name": "ReservesReduced", + "name": "NewVaiToken", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "from", + "name": "payer", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "to", + "name": "borrower", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "repayVAIAmount", "type": "uint256" } ], - "name": "Transfer", + "name": "RepayVAI", "type": "event" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", + "name": "INITIAL_VAI_MINT_INDEX", "outputs": [ { "internalType": "uint256", @@ -46465,49 +46307,19 @@ } ], "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "contract VAIUnitroller", + "name": "unitroller", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", + "name": "_become", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -46518,7 +46330,7 @@ "inputs": [ { "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "comptroller_", "type": "address" } ], @@ -46538,54 +46350,22 @@ "constant": false, "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "internalType": "address", + "name": "newTreasuryGuardian", "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + }, { - "internalType": "address payable", - "name": "newPendingAdmin", + "internalType": "address", + "name": "newTreasuryAddress", "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + }, { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newTreasuryPercent", "type": "uint256" } ], - "name": "_setReserveFactor", + "name": "_setTreasuryData", "outputs": [ { "internalType": "uint256", @@ -46600,7 +46380,7 @@ { "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "accessControl", "outputs": [ { "internalType": "address", @@ -46612,32 +46392,11 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "accrueVAIInterest", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -46648,7 +46407,7 @@ "name": "admin", "outputs": [ { - "internalType": "address payable", + "internalType": "address", "name": "", "type": "address" } @@ -46659,19 +46418,8 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", + "inputs": [], + "name": "baseRateMantissa", "outputs": [ { "internalType": "uint256", @@ -46684,41 +46432,24 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bool", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "floatRateMantissa", "outputs": [ { "internalType": "uint256", @@ -46731,15 +46462,9 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", + "constant": true, + "inputs": [], + "name": "getBlocksPerYear", "outputs": [ { "internalType": "uint256", @@ -46748,41 +46473,25 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" + "internalType": "address", + "name": "minter", + "type": "address" } ], - "name": "borrow", + "name": "getMintableVAI", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ + }, { "internalType": "uint256", "name": "", @@ -46790,24 +46499,18 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", + "inputs": [], + "name": "getVAIAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -46815,7 +46518,7 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", @@ -46824,42 +46527,22 @@ }, { "internalType": "uint256", - "name": "borrowAmount", + "name": "repayAmount", "type": "uint256" } ], - "name": "borrowBehalf", + "name": "getVAICalculateRepayAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + }, { "internalType": "uint256", "name": "", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ + }, { "internalType": "uint256", "name": "", @@ -46872,28 +46555,19 @@ }, { "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ + "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "", + "internalType": "address", + "name": "minter", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", + "name": "getVAIMinterInterestIndex", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -46901,9 +46575,15 @@ "type": "function" }, { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVAIRepayAmount", "outputs": [ { "internalType": "uint256", @@ -46912,13 +46592,13 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "exchangeRateStored", + "name": "getVAIRepayRate", "outputs": [ { "internalType": "uint256", @@ -46932,30 +46612,9 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", + "inputs": [], + "name": "getVAIRepayRatePerBlock", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", @@ -46967,29 +46626,23 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "implementation", + "name": "isVenusVAIInitialized", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -47001,82 +46654,33 @@ "inputs": [ { "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", + "name": "borrower", "type": "address" }, { "internalType": "uint256", - "name": "initialExchangeRateMantissa_", + "name": "repayAmount", "type": "uint256" }, { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", + "type": "address" } ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, + "name": "liquidateVAI", + "outputs": [ { "internalType": "uint256", - "name": "initialExchangeRateMantissa_", + "name": "", "type": "uint256" }, { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -47084,12 +46688,12 @@ { "constant": true, "inputs": [], - "name": "interestRateModel", + "name": "mintCap", "outputs": [ { - "internalType": "contract InterestRateModel", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -47099,7 +46703,7 @@ { "constant": true, "inputs": [], - "name": "isVToken", + "name": "mintEnabledOnlyForPrimeHolder", "outputs": [ { "internalType": "bool", @@ -47111,47 +46715,16 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "mintAmount", + "name": "mintVAIAmount", "type": "uint256" } ], - "name": "mint", + "name": "mintVAI", "outputs": [ { "internalType": "uint256", @@ -47164,20 +46737,15 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" } ], - "name": "mintBehalf", + "name": "pastVAIInterest", "outputs": [ { "internalType": "uint256", @@ -47186,18 +46754,18 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "name", + "name": "pendingAdmin", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "payable": false, @@ -47207,10 +46775,10 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "pendingVAIControllerImplementation", "outputs": [ { - "internalType": "address payable", + "internalType": "address", "name": "", "type": "address" } @@ -47222,10 +46790,10 @@ { "constant": true, "inputs": [], - "name": "protocolShareReserve", + "name": "prime", "outputs": [ { - "internalType": "address payable", + "internalType": "address", "name": "", "type": "address" } @@ -47235,63 +46803,36 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", + "constant": true, + "inputs": [], + "name": "receiver", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, { "internalType": "uint256", - "name": "redeemTokens", + "name": "amount", "type": "uint256" } ], - "name": "redeemBehalf", + "name": "repayVAI", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ + }, { "internalType": "uint256", "name": "", @@ -47307,47 +46848,22 @@ "inputs": [ { "internalType": "address", - "name": "redeemer", + "name": "borrower", "type": "address" }, { "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlyingBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", + "name": "repayVAIBehalf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ + }, { "internalType": "uint256", "name": "", @@ -47355,26 +46871,20 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" } ], + "name": "setAccessControl", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -47382,71 +46892,44 @@ { "constant": false, "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "newBaseRateMantissa", "type": "uint256" } ], + "name": "setBaseRate", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "newFloatRateMantissa", "type": "uint256" } ], + "name": "setFloatRate", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "_mintCap", "type": "uint256" } ], + "name": "setMintCap", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -47456,18 +46939,12 @@ "inputs": [ { "internalType": "address", - "name": "newAccessControlManagerAddress", + "name": "prime_", "type": "address" } ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "setPrimeToken", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -47476,12 +46953,12 @@ "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "protcolShareReserve_", + "internalType": "address", + "name": "newReceiver", "type": "address" } ], - "name": "setProtocolShareReserve", + "name": "setReceiver", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -47491,21 +46968,21 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" + "internalType": "address", + "name": "vai_", + "type": "address" } ], - "name": "setReduceReservesBlockDelta", + "name": "setVAIToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "supplyRatePerBlock", + "name": "toggleOnlyPrimeHolderMint", "outputs": [ { "internalType": "uint256", @@ -47514,18 +46991,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "symbol", + "name": "treasuryAddress", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "payable": false, @@ -47535,12 +47012,12 @@ { "constant": true, "inputs": [], - "name": "totalBorrows", + "name": "treasuryGuardian", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -47548,9 +47025,9 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "totalBorrowsCurrent", + "name": "treasuryPercent", "outputs": [ { "internalType": "uint256", @@ -47559,18 +47036,18 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "totalReserves", + "name": "vaiControllerImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -47580,7 +47057,7 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "vaiMintIndex", "outputs": [ { "internalType": "uint256", @@ -47593,71 +47070,40 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", + "name": "venusVAIMinterIndex", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "underlying", + "name": "venusVAIState", "outputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, + { + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], "payable": false, @@ -47666,17 +47112,11 @@ } ] }, - "VRT": { - "address": "0x5f84ce30dc3cf7909101c69086c50de191895883", + "VaiUnitroller": { + "address": "0x004065D34C6b18cE4370ced1CeBDE94865DbFAFE", "abi": [ { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -47685,178 +47125,148 @@ "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" }, { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "detail", "type": "uint256" } ], - "name": "Approval", + "name": "Failure", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "fromDelegate", + "name": "oldAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "toDelegate", + "name": "newAdmin", "type": "address" } ], - "name": "DelegateChanged", + "name": "NewAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "delegate", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Freezed", + "name": "NewImplementation", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "_from", + "name": "oldPendingAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "_to", + "name": "newPendingAdmin", "type": "address" } ], - "name": "OwnershipTransferred", + "name": "NewPendingAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "from", + "name": "oldPendingImplementation", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "to", + "name": "newPendingImplementation", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "Transfer", + "name": "NewPendingImplementation", "type": "event" }, { - "anonymous": false, - "inputs": [], - "name": "UnFreezed", - "type": "event" + "payable": true, + "stateMutability": "payable", + "type": "fallback" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "DELEGATION_TYPEHASH", + "name": "_acceptAdmin", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "DOMAIN_TYPEHASH", + "name": "_acceptImplementation", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "newPendingAdmin", "type": "address" } ], - "name": "allowance", + "name": "_setPendingAdmin", "outputs": [ { "internalType": "uint256", @@ -47865,7 +47275,7 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -47873,21 +47283,16 @@ "inputs": [ { "internalType": "address", - "name": "spender", + "name": "newPendingImplementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" } ], - "name": "approve", + "name": "_setPendingImplementation", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -47896,19 +47301,28 @@ }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "admin", + "outputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "balanceOf", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -47917,29 +47331,13 @@ }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "pendingVAIControllerImplementation", + "outputs": [ { "internalType": "address", "name": "", "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" } ], "payable": false, @@ -47949,392 +47347,249 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "vaiControllerImplementation", "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ { "internalType": "address", - "name": "delegatee", + "name": "", "type": "address" } ], - "name": "delegate", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { + "indexed": false, "internalType": "uint256", - "name": "nonce", + "name": "error", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "expiry", + "name": "info", "type": "uint256" }, { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" } ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "liquidator", "type": "address" - } - ], - "name": "delegates", - "outputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "", + "name": "borrower", "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "freeze", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ + }, { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, "internalType": "address", - "name": "account", + "name": "vTokenCollateral", "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ + }, { - "internalType": "uint96", - "name": "", - "type": "uint96" + "indexed": false, + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "LiquidateVAI", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "account", + "name": "minter", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "blockNumber", + "name": "feeAmount", "type": "uint256" } ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "MintFee", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "minter", "type": "address" - } - ], - "name": "nonces", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "mintVAIAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "MintVAI", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "oldAccessControlAddress", "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ + }, { + "indexed": false, "internalType": "address", - "name": "", + "name": "newAccessControlAddress", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewAccessControl", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "dst", + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewComptroller", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "src", + "name": "oldTreasuryAddress", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "dst", + "name": "newTreasuryAddress", "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewTreasuryAddress", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "newOwner", + "name": "oldTreasuryGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryGuardian", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewTreasuryGuardian", + "type": "event" }, { - "constant": false, - "inputs": [], - "name": "unfreeze", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "VRTConverterProxy": { - "address": "0x92572fB60f4874d37917C53599cAe5b085B9Facd", - "abi": [ - { + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "address", - "name": "_vrtAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldTreasuryPercent", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "_conversionRatio", + "name": "newTreasuryPercent", "type": "uint256" - }, + } + ], + "name": "NewTreasuryPercent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "_conversionStartTime", + "name": "oldBaseRateMantissa", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "_conversionPeriod", + "name": "newBaseRateMantissa", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "NewVAIBaseRate", + "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" + "internalType": "uint256", + "name": "oldFloatRateMantissa", + "type": "uint256" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "newFlatRateMantissa", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "NewVAIFloatRate", "type": "event" }, { @@ -48342,18 +47597,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" + "internalType": "uint256", + "name": "oldMintCap", + "type": "uint256" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" + "internalType": "uint256", + "name": "newMintCap", + "type": "uint256" } ], - "name": "NewImplementation", + "name": "NewVAIMintCap", "type": "event" }, { @@ -48362,17 +47617,17 @@ { "indexed": false, "internalType": "address", - "name": "oldPendingAdmin", + "name": "oldReceiver", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newPendingAdmin", + "name": "newReceiver", "type": "address" } ], - "name": "NewPendingAdmin", + "name": "NewVAIReceiver", "type": "event" }, { @@ -48381,37 +47636,50 @@ { "indexed": false, "internalType": "address", - "name": "oldPendingImplementation", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newPendingImplementation", + "name": "borrower", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayVAIAmount", + "type": "uint256" } ], - "name": "NewPendingImplementation", + "name": "RepayVAI", "type": "event" }, { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, + "constant": true, "inputs": [], - "name": "_acceptAdmin", - "outputs": [], + "name": "INITIAL_VAI_MINT_INDEX", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, - "inputs": [], - "name": "_acceptImplementation", + "inputs": [ + { + "internalType": "contract VAIUnitroller", + "name": "unitroller", + "type": "address" + } + ], + "name": "_become", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -48421,13 +47689,19 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "implementation_", + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", "type": "address" } ], - "name": "_setImplementation", - "outputs": [], + "name": "_setComptroller", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -48437,26 +47711,51 @@ "inputs": [ { "internalType": "address", - "name": "newPendingAdmin", + "name": "newTreasuryGuardian", "type": "address" + }, + { + "internalType": "address", + "name": "newTreasuryAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newTreasuryPercent", + "type": "uint256" + } + ], + "name": "_setTreasuryData", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_setPendingAdmin", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "accessControl", + "outputs": [ { "internalType": "address", - "name": "newPendingImplementation", + "name": "", "type": "address" } ], - "name": "_setPendingImplementation", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "accrueVAIInterest", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -48480,12 +47779,12 @@ { "constant": true, "inputs": [], - "name": "implementation", + "name": "baseRateMantissa", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -48495,10 +47794,10 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "comptroller", "outputs": [ { - "internalType": "address", + "internalType": "contract ComptrollerInterface", "name": "", "type": "address" } @@ -48510,12 +47809,12 @@ { "constant": true, "inputs": [], - "name": "pendingImplementation", + "name": "floatRateMantissa", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -48523,126 +47822,163 @@ "type": "function" }, { + "constant": true, "inputs": [], + "name": "getBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getBlocksPerYear", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "conversionRatio", + "name": "", "type": "uint256" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "conversionStartTime", - "type": "uint256" - }, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "getMintableVAI", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "conversionPeriod", + "name": "", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "conversionEndTime", + "name": "", "type": "uint256" } ], - "name": "ConversionInfoSet", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getVAIAddress", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "reedeemer", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "indexed": false, "internalType": "address", - "name": "vrtAddress", + "name": "borrower", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "vrtAmount", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "getVAICalculateRepayAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", "type": "uint256" }, { - "indexed": false, - "internalType": "address", - "name": "xvsAddress", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "xvsAmount", + "name": "", "type": "uint256" } ], - "name": "TokenConverted", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, "internalType": "address", - "name": "to", + "name": "minter", "type": "address" - }, + } + ], + "name": "getVAIMinterInterestIndex", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "TokenWithdraw", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "xvsVestingAddress", + "name": "account", "type": "address" } ], - "name": "XVSVestingSet", - "type": "event" + "name": "getVAIRepayAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { "constant": true, "inputs": [], - "name": "DEAD_ADDRESS", + "name": "getVAIRepayRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -48650,15 +47986,24 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "getVAIRepayRatePerBlock", + "outputs": [ { - "internalType": "contract VRTConverterProxy", - "name": "vrtConverterProxy", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_become", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "initialize", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -48667,7 +48012,7 @@ { "constant": true, "inputs": [], - "name": "_notEntered", + "name": "isVenusVAIInitialized", "outputs": [ { "internalType": "bool", @@ -48680,24 +48025,45 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", "type": "address" } ], + "name": "liquidateVAI", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "conversionEndTime", + "name": "mintCap", "outputs": [ { "internalType": "uint256", @@ -48710,9 +48076,15 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "conversionPeriod", + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "mintVAIAmount", + "type": "uint256" + } + ], + "name": "mintVAI", "outputs": [ { "internalType": "uint256", @@ -48721,13 +48093,19 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "conversionRatio", + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pastVAIInterest", "outputs": [ { "internalType": "uint256", @@ -48742,12 +48120,12 @@ { "constant": true, "inputs": [], - "name": "conversionStartTime", + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -48755,24 +48133,24 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingVAIControllerImplementation", + "outputs": [ { - "internalType": "uint256", - "name": "vrtAmount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "convert", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "implementation", + "name": "receiver", "outputs": [ { "internalType": "address", @@ -48787,96 +48165,87 @@ { "constant": false, "inputs": [ - { - "internalType": "address", - "name": "_vrtAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - }, { "internalType": "uint256", - "name": "_conversionRatio", + "name": "repayVAIAmount", "type": "uint256" - }, + } + ], + "name": "repayVAI", + "outputs": [ { "internalType": "uint256", - "name": "_conversionStartTime", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "_conversionPeriod", + "name": "", "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "initialized", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" } ], + "name": "setAccessControl", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "isConversionActive", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "newBaseRateMantissa", + "type": "uint256" } ], + "name": "setBaseRate", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "newFloatRateMantissa", + "type": "uint256" } ], + "name": "setFloatRate", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "_mintCap", + "type": "uint256" } ], + "name": "setMintCap", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -48884,11 +48253,11 @@ "inputs": [ { "internalType": "address", - "name": "_xvsVestingAddress", + "name": "newReceiver", "type": "address" } ], - "name": "setXVSVesting", + "name": "setReceiver", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -48897,12 +48266,12 @@ { "constant": true, "inputs": [], - "name": "totalVrtConverted", + "name": "treasuryAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -48912,10 +48281,10 @@ { "constant": true, "inputs": [], - "name": "vrt", + "name": "treasuryGuardian", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "address", "name": "", "type": "address" } @@ -48927,7 +48296,7 @@ { "constant": true, "inputs": [], - "name": "vrtDecimalsMultiplier", + "name": "treasuryPercent", "outputs": [ { "internalType": "uint256", @@ -48942,10 +48311,10 @@ { "constant": true, "inputs": [], - "name": "xvs", + "name": "vaiControllerImplementation", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "address", "name": "", "type": "address" } @@ -48957,7 +48326,7 @@ { "constant": true, "inputs": [], - "name": "xvsDecimalsMultiplier", + "name": "vaiMintIndex", "outputs": [ { "internalType": "uint256", @@ -48971,59 +48340,73 @@ }, { "constant": true, - "inputs": [], - "name": "xvsVesting", - "outputs": [ + "inputs": [ { - "internalType": "contract IXVSVesting", + "internalType": "address", "name": "", "type": "address" } ], + "name": "venusVAIMinterIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "venusVAIState", + "outputs": [ + { + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, + { + "internalType": "uint32", + "name": "block", + "type": "uint32" + } + ], "payable": false, "stateMutability": "view", "type": "function" } ] }, - "VRTConverterProxy_Implementation": { - "address": "0x3192d0fb11c15629c403a6416abfcd7587b180b7", + "VaiUnitroller_Implementation": { + "address": "0x8a1e5db8f622b97f4bccec4684697199c1b1d11b", "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", - "name": "conversionRatio", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "conversionStartTime", + "name": "error", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "conversionPeriod", + "name": "info", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "conversionEndTime", + "name": "detail", "type": "uint256" } ], - "name": "ConversionInfoSet", + "name": "Failure", "type": "event" }, { @@ -49032,35 +48415,35 @@ { "indexed": false, "internalType": "address", - "name": "reedeemer", + "name": "liquidator", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "vrtAddress", + "name": "borrower", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "vrtAmount", + "name": "repayAmount", "type": "uint256" }, { "indexed": false, "internalType": "address", - "name": "xvsAddress", + "name": "vTokenCollateral", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "xvsAmount", + "name": "seizeTokens", "type": "uint256" } ], - "name": "TokenConverted", + "name": "LiquidateVAI", "type": "event" }, { @@ -49069,23 +48452,17 @@ { "indexed": false, "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "to", + "name": "minter", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "feeAmount", "type": "uint256" } ], - "name": "TokenWithdraw", + "name": "MintFee", "type": "event" }, { @@ -49094,122 +48471,219 @@ { "indexed": false, "internalType": "address", - "name": "xvsVestingAddress", + "name": "minter", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintVAIAmount", + "type": "uint256" } ], - "name": "XVSVestingSet", + "name": "MintVAI", "type": "event" }, { - "constant": true, - "inputs": [], - "name": "DEAD_ADDRESS", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewAccessControl", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "contract VRTConverterProxy", - "name": "vrtConverterProxy", + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewComptroller", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "_notEntered", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "address", + "name": "oldTreasuryAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryAddress", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewTreasuryAddress", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "address", - "name": "", + "name": "oldTreasuryGuardian", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newTreasuryGuardian", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewTreasuryGuardian", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "conversionEndTime", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "oldTreasuryPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTreasuryPercent", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewTreasuryPercent", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "conversionPeriod", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "oldBaseRateMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBaseRateMantissa", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewVAIBaseRate", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "conversionRatio", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "oldFloatRateMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newFlatRateMantissa", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewVAIFloatRate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMintCap", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMintCap", + "type": "uint256" + } + ], + "name": "NewVAIMintCap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldReceiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newReceiver", + "type": "address" + } + ], + "name": "NewVAIReceiver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayVAIAmount", + "type": "uint256" + } + ], + "name": "RepayVAI", + "type": "event" }, { "constant": true, "inputs": [], - "name": "conversionStartTime", + "name": "INITIAL_VAI_MINT_INDEX", "outputs": [ { "internalType": "uint256", @@ -49225,30 +48699,36 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "vrtAmount", - "type": "uint256" + "internalType": "contract VAIUnitroller", + "name": "unitroller", + "type": "address" } ], - "name": "convert", + "name": "_become", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "implementation", + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + } + ], + "name": "_setComptroller", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -49256,32 +48736,28 @@ "inputs": [ { "internalType": "address", - "name": "_vrtAddress", + "name": "newTreasuryGuardian", "type": "address" }, { "internalType": "address", - "name": "_xvsAddress", + "name": "newTreasuryAddress", "type": "address" }, { "internalType": "uint256", - "name": "_conversionRatio", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_conversionStartTime", + "name": "newTreasuryPercent", "type": "uint256" - }, + } + ], + "name": "_setTreasuryData", + "outputs": [ { "internalType": "uint256", - "name": "_conversionPeriod", + "name": "", "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -49289,12 +48765,12 @@ { "constant": true, "inputs": [], - "name": "initialized", + "name": "accessControl", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -49302,24 +48778,18 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "isConversionActive", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "accrueVAIInterest", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "admin", "outputs": [ { "internalType": "address", @@ -49334,12 +48804,12 @@ { "constant": true, "inputs": [], - "name": "pendingImplementation", + "name": "baseRateMantissa", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -49347,24 +48817,24 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "comptroller", + "outputs": [ { - "internalType": "address", - "name": "_xvsVestingAddress", + "internalType": "contract ComptrollerInterface", + "name": "", "type": "address" } ], - "name": "setXVSVesting", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "totalVrtConverted", + "name": "floatRateMantissa", "outputs": [ { "internalType": "uint256", @@ -49379,12 +48849,12 @@ { "constant": true, "inputs": [], - "name": "vrt", + "name": "getBlockNumber", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -49394,7 +48864,7 @@ { "constant": true, "inputs": [], - "name": "vrtDecimalsMultiplier", + "name": "getBlocksPerYear", "outputs": [ { "internalType": "uint256", @@ -49408,24 +48878,20 @@ }, { "constant": true, - "inputs": [], - "name": "xvs", - "outputs": [ + "inputs": [ { - "internalType": "contract IBEP20", - "name": "", + "internalType": "address", + "name": "minter", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsDecimalsMultiplier", + "name": "getMintableVAI", "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, { "internalType": "uint256", "name": "", @@ -49439,10 +48905,10 @@ { "constant": true, "inputs": [], - "name": "xvsVesting", + "name": "getVAIAddress", "outputs": [ { - "internalType": "contract IXVSVesting", + "internalType": "address", "name": "", "type": "address" } @@ -49450,202 +48916,94 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "VRTConverterProxy_Proxy": { - "address": "0x92572fB60f4874d37917C53599cAe5b085B9Facd", - "abi": [ + }, { + "constant": true, "inputs": [ { "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "address", - "name": "_vrtAddress", + "name": "borrower", "type": "address" }, { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - }, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "getVAICalculateRepayAmount", + "outputs": [ { "internalType": "uint256", - "name": "_conversionRatio", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "_conversionStartTime", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "_conversionPeriod", + "name": "", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, "internalType": "address", - "name": "newPendingImplementation", + "name": "minter", "type": "address" } ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "getVAIMinterInterestIndex", + "outputs": [ { - "internalType": "address", - "name": "implementation_", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_setImplementation", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "newPendingAdmin", + "name": "account", "type": "address" } ], - "name": "_setPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "getVAIRepayAmount", + "outputs": [ { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_setPendingImplementation", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "admin", + "name": "getVAIRepayRate", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -49655,12 +49013,12 @@ { "constant": true, "inputs": [], - "name": "implementation", + "name": "getVAIRepayRatePerBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -49668,247 +49026,131 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "pendingImplementation", + "name": "isVenusVAIInitialized", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "VRTVault": { - "address": "0x1405899732Cfe963EaB935a8bBa49c47FE996048", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminTransfered", - "type": "event" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "user", + "name": "borrower", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "interestAmount", + "name": "repayAmount", "type": "uint256" - } - ], - "name": "Claim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", + "type": "address" } ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "liquidateVAI", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldLastAccruingBlock", + "name": "", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newLastAccruingBlock", + "name": "", "type": "uint256" } ], - "name": "LastAccruingBlockChanged", - "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": "admin", - "type": "address" - } - ], - "name": "VaultPaused", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "mintCap", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "VaultResumed", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "totalPrincipalAmount", + "name": "mintVAIAmount", "type": "uint256" - }, + } + ], + "name": "mintVAI", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "accruedInterest", + "name": "", "type": "uint256" } ], - "name": "Withdraw", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "receiver", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "WithdrawToken", - "type": "event" - }, - { - "constant": false, - "inputs": [ + "name": "pastVAIInterest", + "outputs": [ { - "internalType": "contract IVRTVaultProxy", - "name": "vrtVaultProxy", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_become", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "_notEntered", + "name": "pendingAdmin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -49918,10 +49160,10 @@ { "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "pendingVAIControllerImplementation", "outputs": [ { - "internalType": "contract IAccessControlManagerV5", + "internalType": "address", "name": "", "type": "address" } @@ -49933,7 +49175,7 @@ { "constant": true, "inputs": [], - "name": "admin", + "name": "receiver", "outputs": [ { "internalType": "address", @@ -49949,21 +49191,38 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "account", - "type": "address" + "internalType": "uint256", + "name": "repayVAIAmount", + "type": "uint256" + } + ], + "name": "repayVAI", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "claim", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, - "inputs": [], - "name": "claim", + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "setAccessControl", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -49974,65 +49233,44 @@ "inputs": [ { "internalType": "uint256", - "name": "depositAmount", + "name": "newBaseRateMantissa", "type": "uint256" } ], - "name": "deposit", + "name": "setBaseRate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ - { - "internalType": "address", - "name": "userAddress", - "type": "address" - } - ], - "name": "getAccruedInterest", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "newFloatRateMantissa", "type": "uint256" } ], + "name": "setFloatRate", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "getBlockNumber", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_mintCap", "type": "uint256" } ], + "name": "setMintCap", + "outputs": [], "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -50040,16 +49278,11 @@ "inputs": [ { "internalType": "address", - "name": "_vrtAddress", + "name": "newReceiver", "type": "address" - }, - { - "internalType": "uint256", - "name": "_interestRatePerBlock", - "type": "uint256" } ], - "name": "initialize", + "name": "setReceiver", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -50058,12 +49291,12 @@ { "constant": true, "inputs": [], - "name": "interestRatePerBlock", + "name": "treasuryAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -50073,36 +49306,27 @@ { "constant": true, "inputs": [], - "name": "lastAccruingBlock", + "name": "treasuryGuardian", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "treasuryPercent", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -50112,7 +49336,7 @@ { "constant": true, "inputs": [], - "name": "pendingImplementation", + "name": "vaiControllerImplementation", "outputs": [ { "internalType": "address", @@ -50125,42 +49349,18 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "vaiMintIndex", + "outputs": [ { "internalType": "uint256", - "name": "_lastAccruingBlock", + "name": "", "type": "uint256" } ], - "name": "setLastAccruingBlock", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -50172,26 +49372,11 @@ "type": "address" } ], - "name": "userInfo", + "name": "venusVAIMinterIndex", "outputs": [ - { - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "accrualStartBlockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPrincipalAmount", - "type": "uint256" - }, { "internalType": "uint256", - "name": "lastWithdrawnBlockNumber", + "name": "", "type": "uint256" } ], @@ -50202,93 +49387,58 @@ { "constant": true, "inputs": [], - "name": "vaultPaused", + "name": "venusVAIState", "outputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vrt", - "outputs": [ + "internalType": "uint224", + "name": "index", + "type": "uint224" + }, { - "internalType": "contract IBEP20", - "name": "", - "type": "address" + "internalType": "uint32", + "name": "block", + "type": "uint32" } ], "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "VaiUnitroller_Proxy": { + "address": "0x004065D34C6b18cE4370ced1CeBDE94865DbFAFE", + "abi": [ { - "constant": false, "inputs": [], - "name": "withdraw", - "outputs": [], "payable": false, "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { + "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "error", "type": "uint256" - } - ], - "name": "withdrawBep20", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "VRTVaultProxy": { - "address": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" }, { - "internalType": "address", - "name": "vrtAddress_", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "interestRatePerBlock_", + "name": "detail", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "Failure", + "type": "event" }, { "anonymous": false, @@ -50375,7 +49525,13 @@ "constant": false, "inputs": [], "name": "_acceptAdmin", - "outputs": [], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50384,22 +49540,13 @@ "constant": false, "inputs": [], "name": "_acceptImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "outputs": [ { - "internalType": "address", - "name": "implementation_", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "_setImplementation", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50414,7 +49561,13 @@ } ], "name": "_setPendingAdmin", - "outputs": [], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50429,7 +49582,13 @@ } ], "name": "_setPendingImplementation", - "outputs": [], + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50452,7 +49611,7 @@ { "constant": true, "inputs": [], - "name": "implementation", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", @@ -50467,7 +49626,7 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "pendingVAIControllerImplementation", "outputs": [ { "internalType": "address", @@ -50482,7 +49641,7 @@ { "constant": true, "inputs": [], - "name": "pendingImplementation", + "name": "vaiControllerImplementation", "outputs": [ { "internalType": "address", @@ -50493,9 +49652,20 @@ "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "VenusChainlinkOracle": { + "address": "0x7FabdD617200C9CB4dcf3dd2C41273e60552068A", + "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "uint256", + "name": "maxStalePeriod_", + "type": "uint256" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -50504,38 +49674,19 @@ "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "user", + "name": "feed", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "interestAmount", - "type": "uint256" - } - ], - "name": "Claim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "string", + "name": "symbol", + "type": "string" } ], - "name": "Deposit", + "name": "FeedSet", "type": "event" }, { @@ -50544,17 +49695,17 @@ { "indexed": false, "internalType": "uint256", - "name": "oldLastAccruingBlock", + "name": "oldMaxStalePeriod", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newLastAccruingBlock", + "name": "newMaxStalePeriod", "type": "uint256" } ], - "name": "LastAccruingBlockChanged", + "name": "MaxStalePeriodUpdated", "type": "event" }, { @@ -50563,110 +49714,101 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlManager", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlManager", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "VaultPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", + "name": "newAdmin", "type": "address" } ], - "name": "VaultResumed", + "name": "NewAdmin", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "user", + "name": "asset", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "withdrawnAmount", + "name": "previousPriceMantissa", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalPrincipalAmount", + "name": "requestedPriceMantissa", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "accruedInterest", + "name": "newPriceMantissa", "type": "uint256" } ], - "name": "Withdraw", + "name": "PricePosted", "type": "event" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "tokenAddress", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ { - "indexed": true, "internalType": "address", - "name": "receiver", + "name": "asset", "type": "address" - }, + } + ], + "name": "assetPrices", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "WithdrawToken", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { "constant": true, - "inputs": [], - "name": "MAX_LAST_ACCRUING_BLOCK", + "inputs": [ + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "getFeed", "outputs": [ { - "internalType": "uint256", + "internalType": "contract AggregatorV2V3Interface", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -50674,24 +49816,30 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "contract IVRTVaultProxy", - "name": "vrtVaultProxy", + "internalType": "contract VToken", + "name": "vToken", "type": "address" } ], - "name": "_become", - "outputs": [], + "name": "getUnderlyingPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "_notEntered", + "name": "isPriceOracle", "outputs": [ { "internalType": "bool", @@ -50706,12 +49854,12 @@ { "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "maxStalePeriod", "outputs": [ { - "internalType": "contract IAccessControlManagerV5", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -50719,18 +49867,18 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "newAdmin", "type": "address" } ], + "name": "setAdmin", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -50738,11 +49886,16 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "asset", "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" } ], - "name": "claim", + "name": "setDirectPrice", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -50750,8 +49903,19 @@ }, { "constant": false, - "inputs": [], - "name": "claim", + "inputs": [ + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "address", + "name": "feed", + "type": "address" + } + ], + "name": "setFeed", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -50762,26 +49926,45 @@ "inputs": [ { "internalType": "uint256", - "name": "depositAmount", + "name": "newMaxStalePeriod", "type": "uint256" } ], - "name": "deposit", + "name": "setMaxStalePeriod", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { - "internalType": "address", - "name": "userAddress", + "internalType": "contract VToken", + "name": "vToken", "type": "address" + }, + { + "internalType": "uint256", + "name": "underlyingPriceMantissa", + "type": "uint256" } ], - "name": "getAccruedInterest", + "name": "setUnderlyingPrice", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "VenusLens": { + "address": "0xe4C455cBf870A86399043B8A36A669FfA1583e95", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "BLOCKS_PER_DAY", "outputs": [ { "internalType": "uint256", @@ -50796,7 +49979,7 @@ { "constant": true, "inputs": [], - "name": "getBlockNumber", + "name": "VTOKEN_ACTIONS", "outputs": [ { "internalType": "uint256", @@ -50810,15 +49993,43 @@ }, { "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller", + "type": "address" + }, { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], + "name": "getAccountLimits", + "outputs": [ + { + "components": [ + { + "internalType": "contract VToken[]", + "name": "markets", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortfall", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.AccountLimits", + "name": "", + "type": "tuple" + } + ], "payable": false, "stateMutability": "view", "type": "function" @@ -50827,31 +50038,65 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "_vrtAddress", + "internalType": "address payable", + "name": "account", "type": "address" }, + { + "internalType": "address", + "name": "comptrollerAddress", + "type": "address" + } + ], + "name": "getDailyXVS", + "outputs": [ { "internalType": "uint256", - "name": "_interestRatePerBlock", + "name": "", "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "interestRatePerBlock", + "inputs": [ + { + "internalType": "contract XVS", + "name": "xvs", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint32[]", + "name": "blockNumbers", + "type": "uint32[]" + } + ], + "name": "getVenusVotes", "outputs": [ { - "internalType": "uint256", + "components": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VenusVotes[]", "name": "", - "type": "uint256" + "type": "tuple[]" } ], "payable": false, @@ -50860,13 +50105,41 @@ }, { "constant": true, - "inputs": [], - "name": "lastAccruingBlock", + "inputs": [ + { + "internalType": "contract XVS", + "name": "xvs", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getXVSBalanceMetadata", "outputs": [ { - "internalType": "uint256", + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "internalType": "struct VenusLens.XVSBalanceMetadata", "name": "", - "type": "uint256" + "type": "tuple" } ], "payable": false, @@ -50875,48 +50148,229 @@ }, { "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], + "inputs": [ + { + "internalType": "contract XVS", + "name": "xvs", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getXVSBalanceMetadataExt", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votes", + "type": "uint256" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocated", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.XVSBalanceMetadataExt", + "name": "", + "type": "tuple" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "holder", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller", "type": "address" } ], + "name": "pendingRewards", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "distributorAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalRewards", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.PendingReward[]", + "name": "pendingRewards", + "type": "tuple[]" + } + ], + "internalType": "struct VenusLens.RewardSummary", + "name": "", + "type": "tuple" + } + ], "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingImplementation", + "constant": false, + "inputs": [ + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address payable", + "name": "account", + "type": "address" + } + ], + "name": "vTokenBalances", "outputs": [ { - "internalType": "address", + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balanceOf", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowBalanceCurrent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceOfUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenAllowance", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VTokenBalances", "name": "", - "type": "address" + "type": "tuple" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], + "inputs": [ + { + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + }, + { + "internalType": "address payable", + "name": "account", + "type": "address" + } + ], + "name": "vTokenBalancesAll", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balanceOf", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowBalanceCurrent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balanceOfUnderlying", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenAllowance", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VTokenBalances[]", + "name": "", + "type": "tuple[]" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50925,13 +50379,116 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract VToken", + "name": "vToken", "type": "address" } ], - "name": "setAccessControl", - "outputs": [], + "name": "vTokenMetadata", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exchangeRateCurrent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyRatePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowRatePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalReserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalCash", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isListed", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "collateralFactorMantissa", + "type": "uint256" + }, + { + "internalType": "address", + "name": "underlyingAssetAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "vTokenDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "venusSupplySpeed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "venusBorrowSpeed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dailySupplyXvs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dailyBorrowXvs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pausedActions", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VTokenMetadata", + "name": "", + "type": "tuple" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50940,13 +50497,116 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "_lastAccruingBlock", - "type": "uint256" + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + } + ], + "name": "vTokenMetadataAll", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "exchangeRateCurrent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyRatePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowRatePerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalReserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalCash", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isListed", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "collateralFactorMantissa", + "type": "uint256" + }, + { + "internalType": "address", + "name": "underlyingAssetAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "vTokenDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "underlyingDecimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "venusSupplySpeed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "venusBorrowSpeed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dailySupplyXvs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dailyBorrowXvs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pausedActions", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VTokenMetadata[]", + "name": "", + "type": "tuple[]" } ], - "name": "setLastAccruingBlock", - "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -50955,32 +50615,29 @@ "constant": true, "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "contract VToken", + "name": "vToken", "type": "address" } ], - "name": "userInfo", + "name": "vTokenUnderlyingPrice", "outputs": [ { - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "accrualStartBlockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPrincipalAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastWithdrawnBlockNumber", - "type": "uint256" + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "underlyingPrice", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VTokenUnderlyingPrice", + "name": "", + "type": "tuple" } ], "payable": false, @@ -50989,97 +50646,158 @@ }, { "constant": true, - "inputs": [], - "name": "vaultPaused", + "inputs": [ + { + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + } + ], + "name": "vTokenUnderlyingPriceAll", "outputs": [ { - "internalType": "bool", + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "underlyingPrice", + "type": "uint256" + } + ], + "internalType": "struct VenusLens.VTokenUnderlyingPrice[]", "name": "", - "type": "bool" + "type": "tuple[]" } ], "payable": false, "stateMutability": "view", "type": "function" + } + ] + }, + "WBETH": { + "address": "0xa2e3356610840701bdf5611a53974510ae27e2e1", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementationContract", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" }, { - "constant": true, "inputs": [], - "name": "vrt", + "name": "admin", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "address", "name": "", "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "withdraw", + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "inputs": [], + "name": "implementation", + "outputs": [ { "internalType": "address", - "name": "tokenAddress", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "newImplementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "withdrawBep20", + "name": "upgradeTo", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" - } - ] - }, - "VRTVaultProxy_Implementation": { - "address": "0xea98e94d35120b23f9f9f20a7314804d4ab491f1", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "user", + "name": "newImplementation", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "interestAmount", - "type": "uint256" + "internalType": "bytes", + "name": "data", + "type": "bytes" } ], - "name": "Claim", - "type": "event" + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { "anonymous": false, @@ -51087,55 +50805,61 @@ { "indexed": true, "internalType": "address", - "name": "user", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "value", "type": "uint256" } ], - "name": "Deposit", + "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldLastAccruingBlock", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "authorizer", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "newLastAccruingBlock", - "type": "uint256" + "indexed": true, + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" } ], - "name": "LastAccruingBlockChanged", + "name": "AuthorizationCanceled", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldAccessControlManager", + "name": "authorizer", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newAccessControlManager", - "type": "address" + "indexed": true, + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" } ], - "name": "NewAccessControlManager", + "name": "AuthorizationUsed", "type": "event" }, { @@ -51144,11 +50868,11 @@ { "indexed": true, "internalType": "address", - "name": "admin", + "name": "_account", "type": "address" } ], - "name": "VaultPaused", + "name": "Blacklisted", "type": "event" }, { @@ -51157,11 +50881,11 @@ { "indexed": true, "internalType": "address", - "name": "admin", + "name": "newBlacklister", "type": "address" } ], - "name": "VaultResumed", + "name": "BlacklisterChanged", "type": "event" }, { @@ -51170,96938 +50894,17 @@ { "indexed": true, "internalType": "address", - "name": "user", + "name": "burner", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalPrincipalAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accruedInterest", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "WithdrawToken", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_LAST_ACCRUING_BLOCK", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract IVRTVaultProxy", - "name": "vrtVaultProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_notEntered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManagerV5", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "claim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "claim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "depositAmount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "userAddress", - "type": "address" - } - ], - "name": "getAccruedInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_vrtAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_interestRatePerBlock", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "lastAccruingBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_lastAccruingBlock", - "type": "uint256" - } - ], - "name": "setLastAccruingBlock", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "userInfo", - "outputs": [ - { - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "accrualStartBlockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPrincipalAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastWithdrawnBlockNumber", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaultPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vrt", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawBep20", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "VRTVaultProxy_Proxy": { - "address": "0x98bF4786D72AAEF6c714425126Dd92f149e3F334", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "address", - "name": "vrtAddress_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "interestRatePerBlock_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "VTreasury": { - "address": "0xF322942f644A996A617BD29c16bd7d231d9F35E9", - "abi": [ - { - "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": false, - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - } - ], - "name": "WithdrawTreasuryBEP20", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - } - ], - "name": "WithdrawTreasuryBNB", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "withdrawAddress", - "type": "address" - } - ], - "name": "withdrawTreasuryBEP20", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "withdrawAmount", - "type": "uint256" - }, - { - "internalType": "address payable", - "name": "withdrawAddress", - "type": "address" - } - ], - "name": "withdrawTreasuryBNB", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - } - ] - }, - "VaiController": { - "address": "0x43E330C8F8E301c665d825015fddf117e76676Dc", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - } - ], - "name": "MintFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "previousMintEnabledOnlyForPrimeHolder", - "type": "bool" - }, - { - "indexed": false, - "internalType": "bool", - "name": "newMintEnabledOnlyForPrimeHolder", - "type": "bool" - } - ], - "name": "MintOnlyForPrimeHolder", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintVAIAmount", - "type": "uint256" - } - ], - "name": "MintVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControl", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPrime", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPrime", - "type": "address" - } - ], - "name": "NewPrime", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasuryAddress", - "type": "address" - } - ], - "name": "NewTreasuryAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryGuardian", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" - } - ], - "name": "NewTreasuryGuardian", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldTreasuryPercent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "NewTreasuryPercent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldBaseRateMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBaseRateMantissa", - "type": "uint256" - } - ], - "name": "NewVAIBaseRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldFloatRateMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newFlatRateMantissa", - "type": "uint256" - } - ], - "name": "NewVAIFloatRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMintCap", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMintCap", - "type": "uint256" - } - ], - "name": "NewVAIMintCap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldReceiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "NewVAIReceiver", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldVaiToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newVaiToken", - "type": "address" - } - ], - "name": "NewVaiToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayVAIAmount", - "type": "uint256" - } - ], - "name": "RepayVAI", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "INITIAL_VAI_MINT_INDEX", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VAIUnitroller", - "name": "unitroller", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" - }, - { - "internalType": "address", - "name": "newTreasuryAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "_setTreasuryData", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControl", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueVAIInterest", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "baseRateMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "floatRateMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlocksPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "getMintableVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "getVAICalculateRepayAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "getVAIMinterInterestIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVAIRepayAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIRepayRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIRepayRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVenusVAIInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mintCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mintEnabledOnlyForPrimeHolder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintVAIAmount", - "type": "uint256" - } - ], - "name": "mintVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "pastVAIInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingVAIControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "prime", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "receiver", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "repayVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "repayVAIBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newBaseRateMantissa", - "type": "uint256" - } - ], - "name": "setBaseRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newFloatRateMantissa", - "type": "uint256" - } - ], - "name": "setFloatRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_mintCap", - "type": "uint256" - } - ], - "name": "setMintCap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "prime_", - "type": "address" - } - ], - "name": "setPrimeToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "setReceiver", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "vai_", - "type": "address" - } - ], - "name": "setVAIToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "toggleOnlyPrimeHolderMint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryGuardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryPercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiMintIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusVAIMinterIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "venusVAIState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "VaiUnitroller": { - "address": "0x004065D34C6b18cE4370ced1CeBDE94865DbFAFE", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingVAIControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - } - ], - "name": "MintFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintVAIAmount", - "type": "uint256" - } - ], - "name": "MintVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControl", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasuryAddress", - "type": "address" - } - ], - "name": "NewTreasuryAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryGuardian", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" - } - ], - "name": "NewTreasuryGuardian", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldTreasuryPercent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "NewTreasuryPercent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldBaseRateMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBaseRateMantissa", - "type": "uint256" - } - ], - "name": "NewVAIBaseRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldFloatRateMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newFlatRateMantissa", - "type": "uint256" - } - ], - "name": "NewVAIFloatRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMintCap", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMintCap", - "type": "uint256" - } - ], - "name": "NewVAIMintCap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldReceiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "NewVAIReceiver", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayVAIAmount", - "type": "uint256" - } - ], - "name": "RepayVAI", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "INITIAL_VAI_MINT_INDEX", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VAIUnitroller", - "name": "unitroller", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" - }, - { - "internalType": "address", - "name": "newTreasuryAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "_setTreasuryData", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControl", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueVAIInterest", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "baseRateMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "floatRateMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlocksPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "getMintableVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "getVAICalculateRepayAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "getVAIMinterInterestIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVAIRepayAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIRepayRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIRepayRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVenusVAIInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mintCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintVAIAmount", - "type": "uint256" - } - ], - "name": "mintVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "pastVAIInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingVAIControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "receiver", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayVAIAmount", - "type": "uint256" - } - ], - "name": "repayVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newBaseRateMantissa", - "type": "uint256" - } - ], - "name": "setBaseRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newFloatRateMantissa", - "type": "uint256" - } - ], - "name": "setFloatRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_mintCap", - "type": "uint256" - } - ], - "name": "setMintCap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "setReceiver", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryGuardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryPercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiMintIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusVAIMinterIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "venusVAIState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "VaiUnitroller_Implementation": { - "address": "0x8a1e5db8f622b97f4bccec4684697199c1b1d11b", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - } - ], - "name": "MintFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintVAIAmount", - "type": "uint256" - } - ], - "name": "MintVAI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControl", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasuryAddress", - "type": "address" - } - ], - "name": "NewTreasuryAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldTreasuryGuardian", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" - } - ], - "name": "NewTreasuryGuardian", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldTreasuryPercent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "NewTreasuryPercent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldBaseRateMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBaseRateMantissa", - "type": "uint256" - } - ], - "name": "NewVAIBaseRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldFloatRateMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newFlatRateMantissa", - "type": "uint256" - } - ], - "name": "NewVAIFloatRate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMintCap", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMintCap", - "type": "uint256" - } - ], - "name": "NewVAIMintCap", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldReceiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "NewVAIReceiver", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayVAIAmount", - "type": "uint256" - } - ], - "name": "RepayVAI", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "INITIAL_VAI_MINT_INDEX", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VAIUnitroller", - "name": "unitroller", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newTreasuryGuardian", - "type": "address" - }, - { - "internalType": "address", - "name": "newTreasuryAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "newTreasuryPercent", - "type": "uint256" - } - ], - "name": "_setTreasuryData", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControl", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueVAIInterest", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "baseRateMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "floatRateMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlocksPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "getMintableVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "getVAICalculateRepayAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "getVAIMinterInterestIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getVAIRepayAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIRepayRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getVAIRepayRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVenusVAIInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "mintCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintVAIAmount", - "type": "uint256" - } - ], - "name": "mintVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "pastVAIInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingVAIControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "receiver", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayVAIAmount", - "type": "uint256" - } - ], - "name": "repayVAI", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newBaseRateMantissa", - "type": "uint256" - } - ], - "name": "setBaseRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newFloatRateMantissa", - "type": "uint256" - } - ], - "name": "setFloatRate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_mintCap", - "type": "uint256" - } - ], - "name": "setMintCap", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "setReceiver", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryGuardian", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "treasuryPercent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiMintIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "venusVAIMinterIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "venusVAIState", - "outputs": [ - { - "internalType": "uint224", - "name": "index", - "type": "uint224" - }, - { - "internalType": "uint32", - "name": "block", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "VaiUnitroller_Proxy": { - "address": "0x004065D34C6b18cE4370ced1CeBDE94865DbFAFE", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingVAIControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaiControllerImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "VenusChainlinkOracle": { - "address": "0x7FabdD617200C9CB4dcf3dd2C41273e60552068A", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "maxStalePeriod_", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "feed", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "symbol", - "type": "string" - } - ], - "name": "FeedSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMaxStalePeriod", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMaxStalePeriod", - "type": "uint256" - } - ], - "name": "MaxStalePeriodUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousPriceMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "requestedPriceMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPriceMantissa", - "type": "uint256" - } - ], - "name": "PricePosted", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "assetPrices", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - } - ], - "name": "getFeed", - "outputs": [ - { - "internalType": "contract AggregatorV2V3Interface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - } - ], - "name": "getUnderlyingPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isPriceOracle", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxStalePeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "setAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - } - ], - "name": "setDirectPrice", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "feed", - "type": "address" - } - ], - "name": "setFeed", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newMaxStalePeriod", - "type": "uint256" - } - ], - "name": "setMaxStalePeriod", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "underlyingPriceMantissa", - "type": "uint256" - } - ], - "name": "setUnderlyingPrice", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "VenusLens": { - "address": "0xe4C455cBf870A86399043B8A36A669FfA1583e95", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "BLOCKS_PER_DAY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "VTOKEN_ACTIONS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountLimits", - "outputs": [ - { - "components": [ - { - "internalType": "contract VToken[]", - "name": "markets", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "liquidity", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "shortfall", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.AccountLimits", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "comptrollerAddress", - "type": "address" - } - ], - "name": "getDailyXVS", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "contract XVS", - "name": "xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint32[]", - "name": "blockNumbers", - "type": "uint32[]" - } - ], - "name": "getVenusVotes", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VenusVotes[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "contract XVS", - "name": "xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getXVSBalanceMetadata", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - } - ], - "internalType": "struct VenusLens.XVSBalanceMetadata", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract XVS", - "name": "xvs", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getXVSBalanceMetadataExt", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" - }, - { - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allocated", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.XVSBalanceMetadataExt", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller", - "type": "address" - } - ], - "name": "pendingRewards", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "distributorAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "rewardTokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "totalRewards", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "address", - "name": "vTokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.PendingReward[]", - "name": "pendingRewards", - "type": "tuple[]" - } - ], - "internalType": "struct VenusLens.RewardSummary", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - }, - { - "internalType": "address payable", - "name": "account", - "type": "address" - } - ], - "name": "vTokenBalances", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balanceOf", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowBalanceCurrent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balanceOfUnderlying", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokenBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokenAllowance", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VTokenBalances", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - }, - { - "internalType": "address payable", - "name": "account", - "type": "address" - } - ], - "name": "vTokenBalancesAll", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balanceOf", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowBalanceCurrent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balanceOfUnderlying", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokenBalance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokenAllowance", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VTokenBalances[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - } - ], - "name": "vTokenMetadata", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "exchangeRateCurrent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supplyRatePerBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowRatePerBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalReserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCash", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isListed", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "collateralFactorMantissa", - "type": "uint256" - }, - { - "internalType": "address", - "name": "underlyingAssetAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "vTokenDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "underlyingDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "venusSupplySpeed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "venusBorrowSpeed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dailySupplyXvs", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dailyBorrowXvs", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pausedActions", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VTokenMetadata", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - } - ], - "name": "vTokenMetadataAll", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "exchangeRateCurrent", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "supplyRatePerBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrowRatePerBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalReserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalCash", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isListed", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "collateralFactorMantissa", - "type": "uint256" - }, - { - "internalType": "address", - "name": "underlyingAssetAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "vTokenDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "underlyingDecimals", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "venusSupplySpeed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "venusBorrowSpeed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dailySupplyXvs", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "dailyBorrowXvs", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pausedActions", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VTokenMetadata[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "contract VToken", - "name": "vToken", - "type": "address" - } - ], - "name": "vTokenUnderlyingPrice", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "underlyingPrice", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VTokenUnderlyingPrice", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "contract VToken[]", - "name": "vTokens", - "type": "address[]" - } - ], - "name": "vTokenUnderlyingPriceAll", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "vToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "underlyingPrice", - "type": "uint256" - } - ], - "internalType": "struct VenusLens.VTokenUnderlyingPrice[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "WBETH": { - "address": "0xa2e3356610840701bdf5611a53974510ae27e2e1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementationContract", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "AuthorizationCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "AuthorizationUsed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "Blacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newBlacklister", - "type": "address" - } - ], - "name": "BlacklisterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "burner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wBETHAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "referral", - "type": "address" - } - ], - "name": "DepositEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousReceiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "EthReceiverUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oracle", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newExchangeRate", - "type": "uint256" - } - ], - "name": "ExchangeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newMasterMinter", - "type": "address" - } - ], - "name": "MasterMinterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minterAllowedAmount", - "type": "uint256" - } - ], - "name": "MinterConfigured", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldMinter", - "type": "address" - } - ], - "name": "MinterRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "ethReceiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "MovedToStakingAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "unwrapAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "MovedToUnwrapAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "OperatorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "OracleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Pause", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "PauserChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wbethAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "RequestWithdrawEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "RescuerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "supplier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "SuppliedEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "UnBlacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpause", - "type": "event" - }, - { - "inputs": [], - "name": "CANCEL_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_ETH_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_EXCHANGE_RATE_UNIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_UNWRAP_ETH_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "authorizationState", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "blacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "blacklister", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "cancelAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minterAllowedAmount", - "type": "uint256" - } - ], - "name": "configureMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currency", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "decrement", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "referral", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ethReceiver", - "outputs": [ - { - "internalType": "address", - "name": "_ethReceiver", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "exchangeRate", - "outputs": [ - { - "internalType": "uint256", - "name": "_exchangeRate", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "increment", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenCurrency", - "type": "string" - }, - { - "internalType": "uint8", - "name": "tokenDecimals", - "type": "uint8" - }, - { - "internalType": "address", - "name": "newMasterMinter", - "type": "address" - }, - { - "internalType": "address", - "name": "newPauser", - "type": "address" - }, - { - "internalType": "address", - "name": "newBlacklister", - "type": "address" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "initializeV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "lostAndFound", - "type": "address" - } - ], - "name": "initializeV2_1", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "isBlacklisted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "masterMinter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "minterAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "moveToStakingAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "moveToUnwrapAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operator", - "outputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "oracle", - "outputs": [ - { - "internalType": "address", - "name": "_oracle", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validAfter", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validBefore", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "receiveWithAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "removeMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wbethAmount", - "type": "uint256" - } - ], - "name": "requestWithdrawEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "tokenContract", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "rescueERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "supplyEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validAfter", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validBefore", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "transferWithAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "unBlacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newBlacklister", - "type": "address" - } - ], - "name": "updateBlacklister", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newEthReceiver", - "type": "address" - } - ], - "name": "updateEthReceiver", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newExchangeRate", - "type": "uint256" - } - ], - "name": "updateExchangeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newMasterMinter", - "type": "address" - } - ], - "name": "updateMasterMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "updateOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "updateOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newPauser", - "type": "address" - } - ], - "name": "updatePauser", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "updateRescuer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "WBETH_Implementation": { - "address": "0xfe928a7d8be9c8cece7e97f0ed5704f4fa2cb42a", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "AuthorizationCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "AuthorizationUsed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "Blacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newBlacklister", - "type": "address" - } - ], - "name": "BlacklisterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "burner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wBETHAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "referral", - "type": "address" - } - ], - "name": "DepositEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousReceiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "EthReceiverUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oracle", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newExchangeRate", - "type": "uint256" - } - ], - "name": "ExchangeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newMasterMinter", - "type": "address" - } - ], - "name": "MasterMinterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minterAllowedAmount", - "type": "uint256" - } - ], - "name": "MinterConfigured", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldMinter", - "type": "address" - } - ], - "name": "MinterRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "ethReceiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "MovedToStakingAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "unwrapAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "MovedToUnwrapAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "OperatorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "OracleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Pause", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "PauserChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wbethAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "RequestWithdrawEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "RescuerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "supplier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "SuppliedEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "UnBlacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpause", - "type": "event" - }, - { - "inputs": [], - "name": "CANCEL_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_ETH_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_EXCHANGE_RATE_UNIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_UNWRAP_ETH_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "authorizationState", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "blacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "blacklister", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "cancelAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minterAllowedAmount", - "type": "uint256" - } - ], - "name": "configureMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currency", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "decrement", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "referral", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ethReceiver", - "outputs": [ - { - "internalType": "address", - "name": "_ethReceiver", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "exchangeRate", - "outputs": [ - { - "internalType": "uint256", - "name": "_exchangeRate", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "increment", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenCurrency", - "type": "string" - }, - { - "internalType": "uint8", - "name": "tokenDecimals", - "type": "uint8" - }, - { - "internalType": "address", - "name": "newMasterMinter", - "type": "address" - }, - { - "internalType": "address", - "name": "newPauser", - "type": "address" - }, - { - "internalType": "address", - "name": "newBlacklister", - "type": "address" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "initializeV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "lostAndFound", - "type": "address" - } - ], - "name": "initializeV2_1", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "isBlacklisted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "masterMinter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "minterAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "moveToStakingAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "moveToUnwrapAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operator", - "outputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "oracle", - "outputs": [ - { - "internalType": "address", - "name": "_oracle", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validAfter", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validBefore", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "receiveWithAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "removeMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wbethAmount", - "type": "uint256" - } - ], - "name": "requestWithdrawEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "tokenContract", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "rescueERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "supplyEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validAfter", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validBefore", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "transferWithAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "unBlacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newBlacklister", - "type": "address" - } - ], - "name": "updateBlacklister", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newEthReceiver", - "type": "address" - } - ], - "name": "updateEthReceiver", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newExchangeRate", - "type": "uint256" - } - ], - "name": "updateExchangeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newMasterMinter", - "type": "address" - } - ], - "name": "updateMasterMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "updateOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "updateOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newPauser", - "type": "address" - } - ], - "name": "updatePauser", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "updateRescuer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - }, - "WBETH_Proxy": { - "address": "0xa2e3356610840701bdf5611a53974510ae27e2e1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementationContract", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ] - }, - "WBNB": { - "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "guy", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "src", - "type": "address" - }, - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "wad", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "dst", - "type": "address" - }, - { - "name": "wad", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "deposit", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": true, - "name": "guy", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": true, - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "dst", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "src", - "type": "address" - }, - { - "indexed": false, - "name": "wad", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - } - ] - }, - "WhitepaperInterestRateModel": { - "address": "0x49fADE95f94e5EC7C1f4AE13a6d6f9ca18B2F430", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "baseRatePerYear", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "multiplierPerYear", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "baseRatePerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplierPerBlock", - "type": "uint256" - } - ], - "name": "NewInterestParams", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "baseRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "blocksPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "getBorrowRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserveFactorMantissa", - "type": "uint256" - } - ], - "name": "getSupplyRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isInterestRateModel", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "multiplierPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "cash", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "borrows", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "reserves", - "type": "uint256" - } - ], - "name": "utilizationRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - } - ] - }, - "XRP": { - "address": "0x1D2F0da169ceB9fC7B3144628dB156f3F6c60dBE", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "_decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "XVS": { - "address": "0xcF6BB5389c92Bdda8a3747Ddb454cB7a64626C63", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Freezed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_to", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "UnFreezed", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "freeze", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "rawAmount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "unfreeze", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "XVSStore": { - "address": "0x1e25CF968f12850003Db17E0Dba32108509C4359", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnerTransferred", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "emergencyRewardWithdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewardTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "safeRewardTransfer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - } - ], - "name": "setNewOwner", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "setPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_tokenAddress", - "type": "address" - }, - { - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "name": "setRewardToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "XVSVaultProxy": { - "address": "0x051100480289e704d20e9DB4804837068f3f9204", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingXVSVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Claim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChangedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChangedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ExecutedWithdrawal", - "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": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "allocPoints", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "rewardPerBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lockPeriod", - "type": "uint256" - } - ], - "name": "PoolAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldAllocPoints", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newAllocPoints", - "type": "uint256" - } - ], - "name": "PoolUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "RequestedWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldReward", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReward", - "type": "uint256" - } - ], - "name": "RewardAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldXvs", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "oldStore", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newXvs", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStore", - "type": "address" - } - ], - "name": "StoreUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldOwedAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newOwedAmount", - "type": "uint256" - } - ], - "name": "VaultDebtUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "VaultPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "VaultResumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldPeriod", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPeriod", - "type": "uint256" - } - ], - "name": "WithdrawalLockingPeriodUpdated", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_LOCK_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract IXVSVaultProxy", - "name": "xvsVaultProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManagerV5", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_allocPoint", - "type": "uint256" - }, - { - "internalType": "contract IBEP20", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rewardPerBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_lockPeriod", - "type": "uint256" - } - ], - "name": "add", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "claim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "executeWithdrawal", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getEligibleWithdrawalAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "withdrawalAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getRequestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getUserInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pendingWithdrawals", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getWithdrawalRequests", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "lockedUntil", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "afterUpgrade", - "type": "uint128" - } - ], - "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isStakedToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingReward", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "pendingRewardTransfers", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingWithdrawalsBeforeUpgrade", - "outputs": [ - { - "internalType": "uint256", - "name": "beforeUpgradeWithdrawalAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingXVSVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "poolInfos", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allocPoint", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastRewardBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accRewardPerShare", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockPeriod", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "rewardToken", - "type": "address" - } - ], - "name": "poolLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "requestWithdrawal", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewardTokenAmountsPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_allocPoint", - "type": "uint256" - } - ], - "name": "set", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rewardAmount", - "type": "uint256" - } - ], - "name": "setRewardAmountPerBlock", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newPeriod", - "type": "uint256" - } - ], - "name": "setWithdrawalLockingPeriod", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsStore", - "type": "address" - } - ], - "name": "setXvsStore", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalAllocPoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "updatePool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaultPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsStore", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "XVSVaultProxy_Implementation": { - "address": "0x413c1E1b77190BC84717F8cCe6EeAb0594E0af4e", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Claim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "fromDelegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" - } - ], - "name": "DelegateChangedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "previousBalance", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "DelegateVotesChangedV2", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ExecutedWithdrawal", - "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": "contract IPrime", - "name": "oldPrimeToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "contract IPrime", - "name": "newPrimeToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "oldPrimeRewardToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPrimeRewardToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldPrimePoolId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPrimePoolId", - "type": "uint256" - } - ], - "name": "NewPrimeToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "allocPoints", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "rewardPerBlockOrSecond", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lockPeriod", - "type": "uint256" - } - ], - "name": "PoolAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldAllocPoints", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newAllocPoints", - "type": "uint256" - } - ], - "name": "PoolUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "RequestedWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldReward", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReward", - "type": "uint256" - } - ], - "name": "RewardAmountUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldXvs", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "oldStore", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newXvs", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newStore", - "type": "address" - } - ], - "name": "StoreUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "userAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldOwedAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newOwedAmount", - "type": "uint256" - } - ], - "name": "VaultDebtUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "VaultPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "VaultResumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "rewardToken", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "pid", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldPeriod", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPeriod", - "type": "uint256" - } - ], - "name": "WithdrawalLockingPeriodUpdated", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MAX_LOCK_PERIOD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "SECONDS_PER_YEAR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract XVSVaultProxy", - "name": "xvsVaultProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManagerV5", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_allocPoint", - "type": "uint256" - }, - { - "internalType": "contract IBEP20", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rewardPerBlockOrSecond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_lockPeriod", - "type": "uint256" - } - ], - "name": "add", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "blocksOrSecondsPerYear", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "name": "checkpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "fromBlockOrSecond", - "type": "uint32" - }, - { - "internalType": "uint96", - "name": "votes", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "claim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - } - ], - "name": "delegate", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "executeWithdrawal", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBlockNumberOrTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getEligibleWithdrawalAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "withdrawalAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumberOrSecond", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint96", - "name": "", - "type": "uint96" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getRequestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getUserInfo", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardDebt", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pendingWithdrawals", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "getWithdrawalRequests", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint128", - "name": "lockedUntil", - "type": "uint128" - }, - { - "internalType": "uint128", - "name": "afterUpgrade", - "type": "uint128" - } - ], - "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", - "name": "", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bool", - "name": "timeBased_", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "blocksPerYear_", - "type": "uint256" - } - ], - "name": "initializeTimeManager", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isStakedToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isTimeBased", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "pause", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingReward", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "pendingRewardTransfers", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingWithdrawalsBeforeUpgrade", - "outputs": [ - { - "internalType": "uint256", - "name": "beforeUpgradeWithdrawalAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingXVSVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "poolInfos", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allocPoint", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastRewardBlockOrSecond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "accRewardPerShare", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lockPeriod", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "rewardToken", - "type": "address" - } - ], - "name": "poolLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "primePoolId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "primeRewardToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "primeToken", - "outputs": [ - { - "internalType": "contract IPrime", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "requestWithdrawal", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - } - ], - "name": "rewardTokenAmountsPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewardTokenAmountsPerBlockOrSecond", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_allocPoint", - "type": "uint256" - } - ], - "name": "set", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "setAccessControl", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract IPrime", - "name": "_primeToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_primeRewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_primePoolId", - "type": "uint256" - } - ], - "name": "setPrimeToken", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_rewardAmount", - "type": "uint256" - } - ], - "name": "setRewardAmountPerBlockOrSecond", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newPeriod", - "type": "uint256" - } - ], - "name": "setWithdrawalLockingPeriod", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_xvs", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsStore", - "type": "address" - } - ], - "name": "setXvsStore", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalAllocPoints", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "totalPendingWithdrawals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_rewardToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - } - ], - "name": "updatePool", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vaultPaused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsStore", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "XVSVaultProxy_Proxy": { - "address": "0x051100480289e704d20e9DB4804837068f3f9204", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingXVSVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "XVSVesting": { - "address": "0xA9dD0536Ab0699D60c28CE369Ff366a1e621BFf1", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "vrtConversionAddress", - "type": "address" - } - ], - "name": "VRTConversionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountClaimed", - "type": "uint256" - } - ], - "name": "VestedTokensClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - } - ], - "name": "XVSVested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "XVSWithdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "TOTAL_VESTING_TIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract XVSVestingProxy", - "name": "xvsVestingProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_notEntered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "depositAmount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getWithdrawableAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "totalWithdrawableAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalVestedAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalWithdrawnAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_vrtConversionAddress", - "type": "address" - } - ], - "name": "setVRTConverter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "vestings", - "outputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vrtConversionAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvs", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsDecimalsMultiplier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "XVSVestingProxy": { - "address": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "vrtConversionAddress", - "type": "address" - } - ], - "name": "VRTConversionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountClaimed", - "type": "uint256" - } - ], - "name": "VestedTokensClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - } - ], - "name": "XVSVested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "XVSWithdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "TOTAL_VESTING_TIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract XVSVestingProxy", - "name": "xvsVestingProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_notEntered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "depositAmount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getWithdrawableAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "totalWithdrawableAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalVestedAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalWithdrawnAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_vrtConversionAddress", - "type": "address" - } - ], - "name": "setVRTConverter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "vestings", - "outputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vrtConversionAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvs", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsDecimalsMultiplier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "XVSVestingProxy_Implementation": { - "address": "0xa9dd0536ab0699d60c28ce369ff366a1e621bff1", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "vrtConversionAddress", - "type": "address" - } - ], - "name": "VRTConversionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amountClaimed", - "type": "uint256" - } - ], - "name": "VestedTokensClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - } - ], - "name": "XVSVested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "XVSWithdrawn", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "TOTAL_VESTING_TIME", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract XVSVestingProxy", - "name": "xvsVestingProxy", - "type": "address" - } - ], - "name": "_become", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "_notEntered", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "depositAmount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCurrentTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getWithdrawableAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "totalWithdrawableAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalVestedAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalWithdrawnAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "initialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_vrtConversionAddress", - "type": "address" - } - ], - "name": "setVRTConverter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "vestings", - "outputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawnAmount", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "vrtConversionAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvs", - "outputs": [ - { - "internalType": "contract IBEP20", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "xvsDecimalsMultiplier", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "XVSVestingProxy_Proxy": { - "address": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "address", - "name": "_xvsAddress", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "NewPendingImplementation", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newPendingImplementation", - "type": "address" - } - ], - "name": "_setPendingImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "pancakeFactory": { - "address": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_feeToSetter", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "token0", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "token1", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "pair", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "PairCreated", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "INIT_CODE_PAIR_HASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "allPairs", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "allPairsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "tokenA", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenB", - "type": "address" - } - ], - "name": "createPair", - "outputs": [ - { - "internalType": "address", - "name": "pair", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "feeTo", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "feeToSetter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "getPair", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_feeTo", - "type": "address" - } - ], - "name": "setFeeTo", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "_feeToSetter", - "type": "address" - } - ], - "name": "setFeeToSetter", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "vAAVE": { - "address": "0x26DA28954763B92139ED49283625ceCAf52C6f94", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vAAVE_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vAAVE_Proxy": { - "address": "0x26DA28954763B92139ED49283625ceCAf52C6f94", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vADA": { - "address": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vADA_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vADA_Proxy": { - "address": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBCH": { - "address": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBCH_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBCH_Proxy": { - "address": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBETH": { - "address": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBETH_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBETH_Proxy": { - "address": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBNB": { - "address": "0xA07c5b74C9B40447a954e1466938b865b6BBea36", - "abi": [ - { - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "contract VToken", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "mint", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "repayBorrow", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - } - ], - "name": "repayBorrowBehalf", - "outputs": [], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] - }, - "vBTC": { - "address": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBTC_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBTC_Proxy": { - "address": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBUSD": { - "address": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBUSD_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vBUSD_Proxy": { - "address": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vCAKE": { - "address": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vCAKE_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vCAKE_Proxy": { - "address": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDAI": { - "address": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDAI_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDAI_Proxy": { - "address": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDOGE": { - "address": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDOGE_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDOGE_Proxy": { - "address": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDOT": { - "address": "0x1610bc33319e9398de5f57B33a5b184c806aD217", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDOT_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vDOT_Proxy": { - "address": "0x1610bc33319e9398de5f57B33a5b184c806aD217", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vETH": { - "address": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vETH_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vETH_Proxy": { - "address": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFDUSD": { - "address": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFDUSD_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFDUSD_Proxy": { - "address": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFIL": { - "address": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", + "name": "amount", "type": "uint256" } ], - "name": "AccrueInterest", + "name": "Burn", "type": "event" }, { @@ -148110,279 +50913,29 @@ { "indexed": true, "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", + "name": "ethAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "wBETHAmount", "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newPendingAdmin", + "name": "referral", "type": "address" } ], - "name": "NewPendingAdmin", + "name": "DepositEth", "type": "event" }, { @@ -148391,198 +50944,106 @@ { "indexed": true, "internalType": "address", - "name": "oldProtocolShareReserve", + "name": "previousReceiver", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "newProtocolShareReserve", + "name": "newReceiver", "type": "address" } ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", + "name": "EthReceiverUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "redeemer", + "name": "oracle", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", + "name": "newExchangeRate", "type": "uint256" } ], - "name": "Redeem", + "name": "ExchangeRateUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "redeemer", + "name": "newMasterMinter", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" } ], - "name": "RedeemFee", + "name": "MasterMinterChanged", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "payer", + "name": "minter", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", + "name": "amount", "type": "uint256" } ], - "name": "RepayBorrow", + "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "benefactor", + "name": "minter", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", + "name": "minterAllowedAmount", "type": "uint256" } ], - "name": "ReservesAdded", + "name": "MinterConfigured", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "protocolShareReserve", + "name": "oldMinter", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" } ], - "name": "ReservesReduced", + "name": "MinterRemoved", "type": "event" }, { @@ -148591,873 +51052,290 @@ { "indexed": true, "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", + "name": "ethReceiver", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "ethAmount", "type": "uint256" } ], - "name": "Transfer", + "name": "MovedToStakingAddress", "type": "event" }, { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ + "anonymous": false, + "inputs": [ { + "indexed": true, "internalType": "address", - "name": "", + "name": "unwrapAddress", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "MovedToUnwrapAddress", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "underlying_", + "name": "previousOperator", "type": "address" }, { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", + "indexed": true, + "internalType": "address", + "name": "newOperator", "type": "address" - }, + } + ], + "name": "OperatorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", + "indexed": true, + "internalType": "address", + "name": "newOracle", "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" } ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OracleUpdated", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", + "indexed": false, + "internalType": "address", + "name": "previousOwner", "type": "address" }, { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", + "indexed": false, + "internalType": "address", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" } ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Pause", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "PauserChanged", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "user", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "repayAmount", + "name": "wbethAmount", "type": "uint256" }, { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "ethAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "RequestWithdrawEth", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newRescuer", + "type": "address" } ], - "name": "mint", - "outputs": [ + "name": "RescuerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "supplier", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "ethAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "SuppliedEth", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "receiver", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "mintAmount", + "name": "value", "type": "uint256" } ], - "name": "mintBehalf", - "outputs": [ + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "UnBlacklisted", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [], - "name": "name", + "name": "Unpause", + "type": "event" + }, + { + "inputs": [], + "name": "CANCEL_AUTHORIZATION_TYPEHASH", "outputs": [ { - "internalType": "string", + "internalType": "bytes32", "name": "", - "type": "string" + "type": "bytes32" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "DOMAIN_SEPARATOR", "outputs": [ { - "internalType": "address payable", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "protocolShareReserve", + "name": "PERMIT_TYPEHASH", "outputs": [ { - "internalType": "address payable", + "internalType": "bytes32", "name": "", - "type": "address" + "type": "bytes32" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", + "inputs": [], + "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH", "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "inputs": [], + "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH", + "outputs": [ { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "redeemUnderlying", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_ETH_ADDRESS", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "reduceReservesBlockDelta", + "name": "_EXCHANGE_RATE_UNIT", "outputs": [ { "internalType": "uint256", @@ -149465,35 +51343,36 @@ "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "reduceReservesBlockNumber", + "name": "_UNWRAP_ETH_ADDRESS", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "repayBorrow", + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -149501,71 +51380,73 @@ "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "repayAmount", + "name": "value", "type": "uint256" } ], - "name": "repayBorrowBehalf", + "name": "approve", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "reserveFactorMantissa", + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "authorizer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + } + ], + "name": "authorizationState", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", + "name": "account", "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "seize", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -149573,178 +51454,213 @@ "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "newAccessControlManagerAddress", + "name": "_account", "type": "address" } ], - "name": "setAccessControlManager", + "name": "blacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blacklister", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", "type": "uint256" } ], - "payable": false, + "name": "burn", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "protcolShareReserve_", + "internalType": "address", + "name": "authorizer", "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "payable": false, + "name": "cancelAuthorization", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + }, { "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", + "name": "minterAllowedAmount", "type": "uint256" } ], - "name": "setReduceReservesBlockDelta", + "name": "configureMinter", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "supplyRatePerBlock", + "name": "currency", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "symbol", + "name": "decimals", "outputs": [ { - "internalType": "string", + "internalType": "uint8", "name": "", - "type": "string" + "type": "uint8" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "decrement", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" + }, + { + "internalType": "address", + "name": "referral", + "type": "address" } ], - "payable": false, + "name": "deposit", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "totalReserves", + "name": "ethReceiver", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_ethReceiver", + "type": "address" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [], - "name": "totalSupply", + "name": "exchangeRate", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "_exchangeRate", "type": "uint256" } ], - "payable": false, "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "address", - "name": "dst", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "increment", "type": "uint256" } ], - "name": "transfer", + "name": "increaseAllowance", "outputs": [ { "internalType": "bool", @@ -149752,629 +51668,519 @@ "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "string", + "name": "tokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenCurrency", + "type": "string" + }, + { + "internalType": "uint8", + "name": "tokenDecimals", + "type": "uint8" + }, { "internalType": "address", - "name": "src", + "name": "newMasterMinter", "type": "address" }, { "internalType": "address", - "name": "dst", + "name": "newPauser", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "newBlacklister", + "type": "address" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "transferFrom", - "outputs": [ + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "string", + "name": "newName", + "type": "string" } ], - "payable": false, + "name": "initializeV2", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "lostAndFound", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFIL_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, + "name": "initializeV2_1", + "outputs": [], "stateMutability": "nonpayable", - "type": "constructor" + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "isBlacklisted", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "AccrueInterest", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "owner", + "name": "account", "type": "address" - }, + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "masterMinter", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "Approval", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "borrower", + "name": "_to", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "accountBorrows", + "name": "_amount", "type": "uint256" - }, + } + ], + "name": "mint", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "Borrow", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "info", + "name": "amount", "type": "uint256" - }, + } + ], + "name": "mint", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "Failure", - "type": "event" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, "internalType": "address", - "name": "vTokenCollateral", + "name": "minter", "type": "address" - }, + } + ], + "name": "minterAllowance", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "seizeTokens", + "name": "", "type": "uint256" } ], - "name": "LiquidateBorrow", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "amount", "type": "uint256" } ], - "name": "Mint", - "type": "event" + "name": "moveToStakingAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "amount", "type": "uint256" } ], - "name": "MintBehalf", - "type": "event" + "name": "moveToUnwrapAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, + "inputs": [], + "name": "name", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "NewAccessControlManager", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "owner", "type": "address" } ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, + "name": "nonces", + "outputs": [ { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "NewComptroller", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, + "inputs": [], + "name": "operator", + "outputs": [ { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "_operator", "type": "address" } ], - "name": "NewMarketInterestRateModel", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, + "inputs": [], + "name": "oracle", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "newPendingAdmin", + "name": "_oracle", "type": "address" } ], - "name": "NewPendingAdmin", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, + "inputs": [], + "name": "owner", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newProtocolShareReserve", + "name": "", "type": "address" } ], - "name": "NewProtocolShareReserve", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, + "inputs": [], + "name": "paused", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "NewReserveFactor", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "pauser", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "redeemer", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "Redeem", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "redeemer", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "feeAmount", + "name": "value", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "redeemTokens", + "name": "deadline", "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "RedeemFee", - "type": "event" + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "payer", + "name": "from", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "borrower", + "name": "to", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "repayAmount", + "name": "value", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "accountBorrows", + "name": "validAfter", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "validBefore", "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" }, { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" + "internalType": "uint8", + "name": "v", + "type": "uint8" }, { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "ReservesAdded", - "type": "event" + "name": "receiveWithAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "minter", "type": "address" - }, + } + ], + "name": "removeMinter", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "indexed": false, "internalType": "uint256", - "name": "newTotalReserves", + "name": "wbethAmount", "type": "uint256" } ], - "name": "ReservesReduced", - "type": "event" + "name": "requestWithdrawEth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", + "internalType": "contract IERC20", + "name": "tokenContract", "type": "address" }, { - "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { - "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "rescueERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "constant": false, "inputs": [], - "name": "_acceptAdmin", + "name": "rescuer", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { "internalType": "uint256", - "name": "addAmount", + "name": "amount", "type": "uint256" } ], - "name": "_addReserves", + "name": "supplyEth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -150382,219 +52188,282 @@ "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, { "internalType": "uint256", - "name": "reduceAmount_", + "name": "value", "type": "uint256" } ], - "name": "_reduceReserves", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "_resignImplementation", + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", "outputs": [], - "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "from", "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validAfter", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validBefore", "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "payable": false, + "name": "transferWithAuthorization", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "internalType": "address", + "name": "_account", "type": "address" } ], - "name": "_setInterestRateModel", - "outputs": [ + "name": "unBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_newBlacklister", + "type": "address" } ], - "payable": false, + "name": "updateBlacklister", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "newPendingAdmin", + "internalType": "address", + "name": "newEthReceiver", "type": "address" } ], - "name": "_setPendingAdmin", - "outputs": [ + "name": "updateEthReceiver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "newExchangeRate", "type": "uint256" } ], - "payable": false, + "name": "updateExchangeRate", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" + "internalType": "address", + "name": "_newMasterMinter", + "type": "address" } ], - "name": "_setReserveFactor", - "outputs": [ + "name": "updateMasterMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newOperator", + "type": "address" } ], - "payable": false, + "name": "updateOperator", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "newOracle", "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "updateOracle", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_newPauser", + "type": "address" } ], - "payable": false, - "stateMutability": "view", + "name": "updatePauser", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newRescuer", + "type": "address" } ], - "payable": false, + "name": "updateRescuer", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, "inputs": [], - "name": "admin", + "name": "version", "outputs": [ { - "internalType": "address payable", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], - "payable": false, "stateMutability": "view", "type": "function" }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "WBNB": { + "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + "abi": [ { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", + "inputs": [], + "name": "name", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -150605,20 +52474,17 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "spender", + "name": "guy", "type": "address" }, { - "internalType": "uint256", - "name": "amount", + "name": "wad", "type": "uint256" } ], "name": "approve", "outputs": [ { - "internalType": "bool", "name": "", "type": "bool" } @@ -150629,17 +52495,10 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "totalSupply", "outputs": [ { - "internalType": "uint256", "name": "", "type": "uint256" } @@ -150652,17 +52511,23 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "owner", + "name": "src", + "type": "address" + }, + { + "name": "dst", "type": "address" + }, + { + "name": "wad", + "type": "uint256" } ], - "name": "balanceOfUnderlying", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -150673,59 +52538,57 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "borrowAmount", + "name": "wad", "type": "uint256" } ], - "name": "borrow", + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "borrowBalanceCurrent", + "name": "balanceOf", "outputs": [ { - "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -150736,22 +52599,19 @@ "constant": false, "inputs": [ { - "internalType": "address", - "name": "borrower", + "name": "dst", "type": "address" }, { - "internalType": "uint256", - "name": "borrowAmount", + "name": "wad", "type": "uint256" } ], - "name": "borrowBehalf", + "name": "transfer", "outputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -150759,44 +52619,31 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", + "name": "deposit", + "outputs": [], + "payable": true, + "stateMutability": "payable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ + "inputs": [ { - "internalType": "uint256", "name": "", - "type": "uint256" + "type": "address" + }, + { + "name": "", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", + "name": "allowance", "outputs": [ { - "internalType": "contract ComptrollerInterface", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -150804,90 +52651,133 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint8", - "name": "", - "type": "uint8" + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "guy", + "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Approval", + "type": "event" }, { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", + "indexed": true, + "name": "src", + "type": "address" + }, + { + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "wad", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", + "indexed": true, + "name": "dst", + "type": "address" + }, + { + "indexed": false, + "name": "wad", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "Deposit", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "address", - "name": "account", + "indexed": true, + "name": "src", "type": "address" + }, + { + "indexed": false, + "name": "wad", + "type": "uint256" } ], - "name": "getAccountSnapshot", - "outputs": [ + "name": "Withdrawal", + "type": "event" + } + ] + }, + "WhitepaperInterestRateModel": { + "address": "0x49fADE95f94e5EC7C1f4AE13a6d6f9ca18B2F430", + "abi": [ + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "baseRatePerYear", "type": "uint256" }, { "internalType": "uint256", - "name": "", + "name": "multiplierPerYear", "type": "uint256" - }, + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "baseRatePerBlock", "type": "uint256" }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "multiplierPerBlock", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewInterestParams", + "type": "event" }, { "constant": true, "inputs": [], - "name": "getCash", + "name": "baseRatePerBlock", "outputs": [ { "internalType": "uint256", @@ -150902,12 +52792,12 @@ { "constant": true, "inputs": [], - "name": "implementation", + "name": "blocksPerYear", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -150915,99 +52805,81 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, { "internalType": "uint256", - "name": "initialExchangeRateMantissa_", + "name": "cash", "type": "uint256" }, { - "internalType": "string", - "name": "name_", - "type": "string" + "internalType": "uint256", + "name": "borrows", + "type": "uint256" }, { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "initialExchangeRateMantissa_", + "name": "borrows", "type": "uint256" }, { - "internalType": "string", - "name": "name_", - "type": "string" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" }, { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "initialize", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "interestRateModel", + "name": "isInterestRateModel", "outputs": [ { - "internalType": "contract InterestRateModel", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -151017,12 +52889,12 @@ { "constant": true, "inputs": [], - "name": "isVToken", + "name": "multiplierPerBlock", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -151030,25 +52902,25 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address", - "name": "borrower", - "type": "address" + "internalType": "uint256", + "name": "cash", + "type": "uint256" }, { "internalType": "uint256", - "name": "repayAmount", + "name": "borrows", "type": "uint256" }, { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" + "internalType": "uint256", + "name": "reserves", + "type": "uint256" } ], - "name": "liquidateBorrow", + "name": "utilizationRate", "outputs": [ { "internalType": "uint256", @@ -151057,65 +52929,98 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" + } + ] + }, + "XRP": { + "address": "0x1D2F0da169ceB9fC7B3144628dB156f3F6c60dBE", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Approval", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "receiver", + "name": "previousOwner", "type": "address" }, { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "mintBehalf", - "outputs": [ + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "value", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Transfer", + "type": "event" }, { "constant": true, "inputs": [], - "name": "name", + "name": "_decimals", "outputs": [ { - "internalType": "string", + "internalType": "uint8", "name": "", - "type": "string" + "type": "uint8" } ], "payable": false, @@ -151125,12 +53030,12 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "_name", "outputs": [ { - "internalType": "address payable", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "payable": false, @@ -151140,12 +53045,12 @@ { "constant": true, "inputs": [], - "name": "protocolShareReserve", + "name": "_symbol", "outputs": [ { - "internalType": "address payable", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "payable": false, @@ -151153,15 +53058,20 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "redeem", + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -151170,70 +53080,45 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ + "internalType": "address", + "name": "spender", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", + "name": "approve", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "repayBorrow", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -151242,29 +53127,24 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, { "internalType": "uint256", - "name": "repayAmount", + "name": "amount", "type": "uint256" } ], - "name": "repayBorrowBehalf", + "name": "burn", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -151274,12 +53154,12 @@ { "constant": true, "inputs": [], - "name": "reserveFactorMantissa", + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, @@ -151291,68 +53171,62 @@ "inputs": [ { "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "seizeTokens", + "name": "subtractedValue", "type": "uint256" } ], - "name": "seize", + "name": "decreaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", + { + "constant": true, + "inputs": [], + "name": "getOwner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "protcolShareReserve_", + "internalType": "address", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" } ], - "name": "setProtocolShareReserve", + "name": "increaseAllowance", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -151364,16 +53238,16 @@ "inputs": [ { "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", + "name": "amount", "type": "uint256" } ], - "name": "setReduceReservesBlockDelta", + "name": "mint", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -151383,22 +53257,7 @@ { "constant": true, "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", + "name": "name", "outputs": [ { "internalType": "string", @@ -151413,12 +53272,12 @@ { "constant": true, "inputs": [], - "name": "totalBorrows", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -151428,14 +53287,8 @@ { "constant": false, "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "renounceOwnership", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -151443,12 +53296,12 @@ { "constant": true, "inputs": [], - "name": "totalReserves", + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -151475,7 +53328,7 @@ "inputs": [ { "internalType": "address", - "name": "dst", + "name": "recipient", "type": "address" }, { @@ -151501,12 +53354,12 @@ "inputs": [ { "internalType": "address", - "name": "src", + "name": "sender", "type": "address" }, { "internalType": "address", - "name": "dst", + "name": "recipient", "type": "address" }, { @@ -151528,113 +53381,37 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "newOwner", "type": "address" } ], + "name": "transferOwnership", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" } ] }, - "vFIL_Proxy": { - "address": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", + "XVS": { + "address": "0xcF6BB5389c92Bdda8a3747Ddb454cB7a64626C63", "abi": [ { "inputs": [ { "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", + "name": "account", "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -151664,380 +53441,200 @@ "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "delegator", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "fromDelegate", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "vTokenCollateral", + "name": "toDelegate", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "LiquidateBorrow", + "name": "DelegateChanged", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "minter", + "name": "delegate", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "mintAmount", + "name": "previousBalance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "mintTokens", + "name": "newBalance", "type": "uint256" } ], - "name": "Mint", + "name": "DelegateVotesChanged", "type": "event" }, { "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", + "inputs": [], + "name": "Freezed", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "indexed": true, + "internalType": "address", + "name": "_from", "type": "address" }, { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "indexed": true, + "internalType": "address", + "name": "_to", "type": "address" } ], - "name": "NewComptroller", + "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldImplementation", + "name": "from", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", + "name": "to", "type": "address" }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "NewMarketInterestRateModel", + "name": "Transfer", "type": "event" }, { "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", + "inputs": [], + "name": "UnFreezed", "type": "event" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "NewReserveFactor", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" + "internalType": "bytes32", + "name": "", + "type": "bytes32" } ], - "name": "Redeem", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "payer", + "name": "account", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "borrower", + "name": "spender", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" } ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, + "name": "allowance", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "newTotalReserves", + "name": "", "type": "uint256" } ], - "name": "ReservesAdded", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "admin", + "name": "spender", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "reduceAmount", + "name": "rawAmount", "type": "uint256" - }, + } + ], + "name": "approve", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "ReservesReduced", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "to", + "name": "account", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -152046,68 +53643,66 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "_addReserves", + "name": "checkpoints", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", + "constant": true, + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "uint256", + "internalType": "uint8", "name": "", - "type": "uint256" + "type": "uint8" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "delegatee", "type": "address" } ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "delegate", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -152117,128 +53712,127 @@ "inputs": [ { "internalType": "address", - "name": "implementation_", + "name": "delegatee", "type": "address" }, { - "internalType": "bool", - "name": "allowResign", - "type": "bool" + "internalType": "uint256", + "name": "nonce", + "type": "uint256" }, { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "_setImplementation", + "name": "delegateBySig", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "", "type": "address" } ], - "name": "_setInterestRateModel", + "name": "delegates", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "inputs": [], + "name": "freeze", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "_setReserveFactor", + "name": "getCurrentVotes", "outputs": [ { - "internalType": "uint256", + "internalType": "uint96", "name": "", - "type": "uint256" + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "blockNumber", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", + "name": "getPriorVotes", "outputs": [ { - "internalType": "uint256", + "internalType": "uint96", "name": "", - "type": "uint256" + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "admin", + "name": "name", "outputs": [ { - "internalType": "address payable", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "payable": false, @@ -152250,16 +53844,11 @@ "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "", "type": "address" } ], - "name": "allowance", + "name": "nonces", "outputs": [ { "internalType": "uint256", @@ -152272,46 +53861,50 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "approve", + "name": "numCheckpoints", "outputs": [ { - "internalType": "bool", + "internalType": "uint32", "name": "", - "type": "bool" + "type": "uint32" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", - "name": "owner", + "name": "", "type": "address" } ], - "name": "balanceOf", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "uint256", + "internalType": "string", "name": "", - "type": "uint256" + "type": "string" } ], "payable": false, @@ -152319,15 +53912,9 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", + "constant": true, + "inputs": [], + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -152336,24 +53923,29 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, { "internalType": "uint256", - "name": "borrowAmount", + "name": "rawAmount", "type": "uint256" } ], - "name": "borrow", + "name": "transfer", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -152365,16 +53957,26 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", "type": "address" + }, + { + "internalType": "uint256", + "name": "rawAmount", + "type": "uint256" } ], - "name": "borrowBalanceCurrent", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -152382,139 +53984,102 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "account", + "name": "newOwner", "type": "address" } ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "transferOwnership", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "unfreeze", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" - }, + } + ] + }, + "XVSStore": { + "address": "0x1e25CF968f12850003Db17E0Dba32108509C4359", + "abi": [ { - "constant": true, "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], "payable": false, - "stateMutability": "view", - "type": "function" + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "", + "indexed": true, + "internalType": "address", + "name": "oldAdmin", "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ + }, { - "internalType": "uint8", - "name": "", - "type": "uint8" + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "AdminTransferred", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, { - "internalType": "bytes", - "name": "", - "type": "bytes" + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewPendingAdmin", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, { - "internalType": "bytes", - "name": "", - "type": "bytes" + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "OwnerTransferred", + "type": "event" }, { "constant": false, "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "acceptAdmin", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -152522,12 +54087,12 @@ { "constant": true, "inputs": [], - "name": "exchangeRateStored", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -152535,50 +54100,34 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [ { "internalType": "address", - "name": "account", + "name": "_tokenAddress", "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" }, { "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", + "name": "_amount", "type": "uint256" } ], + "name": "emergencyRewardWithdraw", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "getCash", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -152588,7 +54137,7 @@ { "constant": true, "inputs": [], - "name": "implementation", + "name": "pendingAdmin", "outputs": [ { "internalType": "address", @@ -152602,23 +54151,14 @@ }, { "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ + "inputs": [ { - "internalType": "contract InterestRateModel", + "internalType": "address", "name": "", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", + "name": "rewardTokens", "outputs": [ { "internalType": "bool", @@ -152635,100 +54175,52 @@ "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "token", "type": "address" }, { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", + "internalType": "address", + "name": "_to", "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "_amount", "type": "uint256" } ], + "name": "safeRewardTransfer", + "outputs": [], "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address payable", - "name": "", + "internalType": "address", + "name": "_owner", "type": "address" } ], + "name": "setNewOwner", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_admin", + "type": "address" } ], + "name": "setPendingAdmin", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -152737,105 +54229,143 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "bool", + "name": "status", + "type": "bool" } ], + "name": "setRewardToken", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" + } + ] + }, + "XVSVaultProxy": { + "address": "0x051100480289e704d20e9DB4804837068f3f9204", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "repayAmount", + "name": "error", "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "borrower", + "name": "oldAdmin", "type": "address" }, { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "repayBorrowBehalf", - "outputs": [ + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewImplementation", + "type": "event" }, { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "NewPendingAdmin", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "liquidator", + "name": "oldPendingImplementation", "type": "address" }, { + "indexed": false, "internalType": "address", - "name": "borrower", + "name": "newPendingImplementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "seize", + "name": "NewPendingImplementation", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", "outputs": [ { "internalType": "uint256", @@ -152848,9 +54378,9 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "supplyRatePerBlock", + "name": "_acceptImplementation", "outputs": [ { "internalType": "uint256", @@ -152859,28 +54389,19 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", + "name": "_setPendingAdmin", "outputs": [ { "internalType": "uint256", @@ -152889,13 +54410,19 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "_setPendingImplementation", "outputs": [ { "internalType": "uint256", @@ -152910,12 +54437,12 @@ { "constant": true, "inputs": [], - "name": "totalReserves", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -152925,12 +54452,12 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "implementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -152938,66 +54465,24 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", + "constant": true, + "inputs": [], + "name": "pendingAdmin", "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, { "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "underlying", + "name": "pendingXVSVaultImplementation", "outputs": [ { "internalType": "address", @@ -153008,65 +54493,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vLINK": { - "address": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -153075,31 +54504,31 @@ "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "borrowIndex", + "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "amount", "type": "uint256" } ], - "name": "AccrueInterest", + "name": "Claim", "type": "event" }, { @@ -153108,116 +54537,110 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "delegator", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "fromDelegate", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" } ], - "name": "Approval", + "name": "DelegateChangedV2", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "delegate", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", + "name": "previousBalance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "newBalance", "type": "uint256" } ], - "name": "Borrow", + "name": "DelegateVotesChangedV2", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" }, { - "indexed": false, + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, "internalType": "uint256", - "name": "info", + "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "detail", + "name": "amount", "type": "uint256" } ], - "name": "Failure", + "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "liquidator", + "name": "user", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "rewardToken", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "repayAmount", + "name": "pid", "type": "uint256" }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "seizeTokens", + "name": "amount", "type": "uint256" } ], - "name": "LiquidateBorrow", + "name": "ExecutedWithdrawal", "type": "event" }, { @@ -153226,162 +54649,147 @@ { "indexed": false, "internalType": "address", - "name": "minter", + "name": "oldAccessControlManager", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" } ], - "name": "Mint", + "name": "NewAccessControlManager", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldAdmin", + "name": "rewardToken", "type": "address" }, { - "indexed": false, + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, "internalType": "address", - "name": "newAdmin", + "name": "token", "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" + "internalType": "uint256", + "name": "allocPoints", + "type": "uint256" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" + "internalType": "uint256", + "name": "rewardPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" } ], - "name": "NewComptroller", + "name": "PoolAdded", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldImplementation", + "name": "rewardToken", "type": "address" }, { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" + "internalType": "uint256", + "name": "oldAllocPoints", + "type": "uint256" }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" + "internalType": "uint256", + "name": "newAllocPoints", + "type": "uint256" } ], - "name": "NewMarketInterestRateModel", + "name": "PoolUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldPendingAdmin", + "name": "user", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newPendingAdmin", + "name": "rewardToken", "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "oldReserveFactorMantissa", + "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "amount", "type": "uint256" } ], - "name": "NewReserveFactor", + "name": "RequestedWithdrawal", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "redeemer", + "name": "rewardToken", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "redeemAmount", + "name": "oldReward", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "redeemTokens", + "name": "newReward", "type": "uint256" } ], - "name": "Redeem", + "name": "RewardAmountUpdated", "type": "event" }, { @@ -153390,85 +54798,73 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldXvs", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "borrower", + "name": "oldStore", "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" + "internalType": "address", + "name": "newXvs", + "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" + "internalType": "address", + "name": "newStore", + "type": "address" } ], - "name": "RepayBorrow", + "name": "StoreUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "benefactor", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "addAmount", + "name": "oldOwedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newTotalReserves", + "name": "newOwedAmount", "type": "uint256" } ], - "name": "ReservesAdded", + "name": "VaultDebtUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", "name": "admin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" } ], - "name": "ReservesReduced", + "name": "VaultPaused", "type": "event" }, { @@ -153477,34 +54873,78 @@ { "indexed": true, "internalType": "address", - "name": "from", + "name": "admin", "type": "address" - }, + } + ], + "name": "VaultResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "to", + "name": "rewardToken", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "oldPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPeriod", "type": "uint256" } ], - "name": "Transfer", + "name": "WithdrawalLockingPeriodUpdated", "type": "event" }, { - "payable": true, - "stateMutability": "payable", - "type": "fallback" + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "_acceptAdmin", + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_LOCK_PERIOD", "outputs": [ { "internalType": "uint256", @@ -153513,70 +54953,118 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" + "internalType": "contract IXVSVaultProxy", + "name": "xvsVaultProxy", + "type": "address" } ], - "name": "_addReserves", + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IAccessControlManagerV5", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "reduceAmount", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardPerBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockPeriod", "type": "uint256" } ], - "name": "_reduceReserves", + "name": "add", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "", "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "_setComptroller", + "name": "checkpoints", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "uint32", + "name": "fromBlock", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -153584,21 +55072,21 @@ "inputs": [ { "internalType": "address", - "name": "implementation_", + "name": "_account", "type": "address" }, { - "internalType": "bool", - "name": "allowResign", - "type": "bool" + "internalType": "address", + "name": "_rewardToken", + "type": "address" }, { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" + "internalType": "uint256", + "name": "_pid", + "type": "uint256" } ], - "name": "_setImplementation", + "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -153608,19 +55096,13 @@ "constant": false, "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "delegatee", "type": "address" } ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "delegate", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -153629,83 +55111,123 @@ "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "newPendingAdmin", + "internalType": "address", + "name": "delegatee", "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], + "name": "delegateBySig", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "_setReserveFactor", + "name": "delegates", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", "type": "uint256" } ], + "name": "deposit", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_pid", "type": "uint256" } ], + "name": "executeWithdrawal", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "admin", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", "outputs": [ { - "internalType": "address payable", + "internalType": "uint96", "name": "", - "type": "address" + "type": "uint96" } ], "payable": false, @@ -153717,20 +55239,25 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "_rewardToken", "type": "address" }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, { "internalType": "address", - "name": "spender", + "name": "_user", "type": "address" } ], - "name": "allowance", + "name": "getEligibleWithdrawalAmount", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "withdrawalAmount", "type": "uint256" } ], @@ -153739,29 +55266,29 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "account", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "blockNumber", "type": "uint256" } ], - "name": "approve", + "name": "getPriorVotes", "outputs": [ { - "internalType": "bool", + "internalType": "uint96", "name": "", - "type": "bool" + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -153769,11 +55296,21 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", "type": "address" } ], - "name": "balanceOf", + "name": "getRequestedAmount", "outputs": [ { "internalType": "uint256", @@ -153786,66 +55323,128 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "owner", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", "type": "address" } ], - "name": "balanceOfUnderlying", + "name": "getUserInfo", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingWithdrawals", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "borrowAmount", + "name": "_pid", "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" } ], - "name": "borrow", + "name": "getWithdrawalRequests", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "lockedUntil", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "afterUpgrade", + "type": "uint128" + } + ], + "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "borrowBalanceCurrent", + "name": "isStakedToken", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -153853,11 +55452,11 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "borrowBalanceStored", + "name": "nonces", "outputs": [ { "internalType": "uint256", @@ -153871,28 +55470,19 @@ }, { "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "inputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "numCheckpoints", "outputs": [ { - "internalType": "uint256", + "internalType": "uint32", "name": "", - "type": "uint256" + "type": "uint32" } ], "payable": false, @@ -153900,29 +55490,23 @@ "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], + "name": "pause", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "decimals", + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], "payable": false, @@ -153930,41 +55514,56 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" } ], - "name": "delegateToImplementation", + "name": "pendingReward", "outputs": [ { - "internalType": "bytes", + "internalType": "uint256", "name": "", - "type": "bytes" + "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "delegateToViewImplementation", + "name": "pendingRewardTransfers", "outputs": [ { - "internalType": "bytes", + "internalType": "uint256", "name": "", - "type": "bytes" + "type": "uint256" } ], "payable": false, @@ -153972,29 +55571,45 @@ "type": "function" }, { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingWithdrawalsBeforeUpgrade", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "beforeUpgradeWithdrawalAmount", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "exchangeRateStored", + "name": "pendingXVSVaultImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -154006,45 +55621,40 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ + }, { "internalType": "uint256", "name": "", "type": "uint256" + } + ], + "name": "poolInfos", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "token", + "type": "address" }, { "internalType": "uint256", - "name": "", + "name": "allocPoint", "type": "uint256" }, { "internalType": "uint256", - "name": "", + "name": "lastRewardBlock", "type": "uint256" }, { "internalType": "uint256", - "name": "", + "name": "accRewardPerShare", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "lockPeriod", "type": "uint256" } ], @@ -154054,43 +55664,19 @@ }, { "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", + "name": "rewardToken", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", + "name": "poolLength", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "payable": false, @@ -154102,77 +55688,50 @@ "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "_rewardToken", "type": "address" }, { "internalType": "uint256", - "name": "repayAmount", + "name": "_pid", "type": "uint256" }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ { "internalType": "uint256", - "name": "", + "name": "_amount", "type": "uint256" } ], + "name": "requestWithdrawal", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "inputs": [], + "name": "resume", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "name", - "outputs": [ + "inputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", + "name": "rewardTokenAmountsPerBlock", "outputs": [ { - "internalType": "address payable", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -154182,20 +55741,24 @@ { "constant": false, "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "redeemTokens", + "name": "_pid", "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "_allocPoint", "type": "uint256" } ], + "name": "set", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -154204,19 +55767,13 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" } ], + "name": "setAccessControl", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -154225,19 +55782,18 @@ "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_rewardAmount", "type": "uint256" } ], + "name": "setRewardAmountPerBlock", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -154247,97 +55803,61 @@ "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "_rewardToken", "type": "address" }, { "internalType": "uint256", - "name": "repayAmount", + "name": "_pid", "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "_newPeriod", "type": "uint256" } ], + "name": "setWithdrawalLockingPeriod", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "address", - "name": "liquidator", + "name": "_xvs", "type": "address" }, { "internalType": "address", - "name": "borrower", + "name": "_xvsStore", "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], + "name": "setXvsStore", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ + "inputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", + "name": "totalAllocPoints", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "payable": false, @@ -154345,44 +55865,49 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_pid", "type": "uint256" } ], + "name": "updatePool", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "totalBorrowsCurrent", + "name": "vaultPaused", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "totalReserves", + "name": "xvsAddress", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -154392,125 +55917,108 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "xvsStore", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" + } + ] + }, + "XVSVaultProxy_Implementation": { + "address": "0x413c1E1b77190BC84717F8cCe6EeAb0594E0af4e", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "dst", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", "type": "address" }, { + "indexed": true, "internalType": "uint256", - "name": "amount", + "name": "pid", "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Claim", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "src", + "name": "delegator", "type": "address" }, { + "indexed": true, "internalType": "address", - "name": "dst", + "name": "fromDelegate", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { + "indexed": true, "internalType": "address", - "name": "", + "name": "toDelegate", "type": "address" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" + "name": "DelegateChangedV2", + "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "borrowIndex", + "name": "previousBalance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "newBalance", "type": "uint256" } ], - "name": "AccrueInterest", + "name": "DelegateVotesChangedV2", "type": "event" }, { @@ -154519,15 +56027,21 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "user", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "rewardToken", "type": "address" }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", @@ -154535,38 +56049,38 @@ "type": "uint256" } ], - "name": "Approval", + "name": "Deposit", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "user", "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "accountBorrows", + "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "amount", "type": "uint256" } ], - "name": "Borrow", + "name": "ExecutedWithdrawal", "type": "event" }, { @@ -154574,167 +56088,191 @@ "inputs": [ { "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" }, { "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" } ], - "name": "Failure", + "name": "NewAccessControlManager", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "contract IPrime", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IPrime", + "name": "newPrimeToken", + "type": "address" + }, { "indexed": false, "internalType": "address", - "name": "liquidator", + "name": "oldPrimeRewardToken", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "borrower", + "name": "newPrimeRewardToken", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "repayAmount", + "name": "oldPrimePoolId", "type": "uint256" }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, { "indexed": false, "internalType": "uint256", - "name": "seizeTokens", + "name": "newPrimePoolId", "type": "uint256" } ], - "name": "LiquidateBorrow", + "name": "NewPrimeToken", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "minter", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "mintAmount", + "name": "allocPoints", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "mintTokens", + "name": "rewardPerBlockOrSecond", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "lockPeriod", "type": "uint256" } ], - "name": "Mint", + "name": "PoolAdded", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "receiver", + "name": "rewardToken", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "mintAmount", + "name": "pid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "mintTokens", + "name": "oldAllocPoints", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "newAllocPoints", "type": "uint256" } ], - "name": "MintBehalf", + "name": "PoolUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "user", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newAccessControlAddress", + "name": "rewardToken", "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "NewAccessControlManager", + "name": "RequestedWithdrawal", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldAdmin", + "name": "rewardToken", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" + "internalType": "uint256", + "name": "oldReward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReward", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "RewardAmountUpdated", "type": "event" }, { @@ -154742,56 +56280,61 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldXvs", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "oldStore", "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", + "internalType": "address", + "name": "newXvs", "type": "address" }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "newStore", "type": "address" } ], - "name": "NewMarketInterestRateModel", + "name": "StoreUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "oldPendingAdmin", + "name": "rewardToken", "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "newPendingAdmin", + "name": "userAddress", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldOwedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newOwedAmount", + "type": "uint256" } ], - "name": "NewPendingAdmin", + "name": "VaultDebtUpdated", "type": "event" }, { @@ -154800,229 +56343,393 @@ { "indexed": true, "internalType": "address", - "name": "oldProtocolShareReserve", + "name": "admin", "type": "address" - }, + } + ], + "name": "VaultPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "newProtocolShareReserve", + "name": "admin", "type": "address" } ], - "name": "NewProtocolShareReserve", + "name": "VaultResumed", "type": "event" }, { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", + "name": "oldPeriod", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newReduceReservesBlockDelta", + "name": "newPeriod", "type": "uint256" } ], - "name": "NewReduceReservesBlockDelta", + "name": "WithdrawalLockingPeriodUpdated", "type": "event" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_LOCK_PERIOD", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "oldReserveFactorMantissa", + "name": "", "type": "uint256" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SECONDS_PER_YEAR", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "", "type": "uint256" } ], - "name": "NewReserveFactor", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, + "inputs": [ + { + "internalType": "contract XVSVaultProxy", + "name": "xvsVaultProxy", + "type": "address" + } + ], + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV5", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "redeemer", + "name": "_rewardToken", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "redeemAmount", + "name": "_allocPoint", "type": "uint256" }, { - "indexed": false, + "internalType": "contract IBEP20", + "name": "_token", + "type": "address" + }, + { "internalType": "uint256", - "name": "redeemTokens", + "name": "_rewardPerBlockOrSecond", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "_lockPeriod", "type": "uint256" } ], - "name": "Redeem", - "type": "event" + "name": "add", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "redeemer", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "feeAmount", + "name": "", "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" }, { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" + "internalType": "uint32", + "name": "", + "type": "uint32" } ], - "name": "RedeemFee", - "type": "event" + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlockOrSecond", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "payer", + "name": "_account", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "borrower", + "name": "_rewardToken", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "repayAmount", + "name": "_pid", "type": "uint256" + } + ], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "accountBorrows", + "name": "nonce", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "expiry", "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], - "name": "RepayBorrow", - "type": "event" + "name": "delegateBySig", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "benefactor", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" } ], - "name": "ReservesAdded", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "_rewardToken", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "reduceAmount", + "name": "_pid", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "newTotalReserves", + "name": "_amount", "type": "uint256" } ], - "name": "ReservesReduced", - "type": "event" + "name": "deposit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "to", + "name": "_rewardToken", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "_pid", "type": "uint256" } ], - "name": "Transfer", - "type": "event" + "name": "executeWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "_acceptAdmin", + "name": "getBlockNumberOrTimestamp", "outputs": [ { "internalType": "uint256", @@ -155031,106 +56738,107 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" + "internalType": "address", + "name": "account", + "type": "address" } ], - "name": "_addReserves", + "name": "getCurrentVotes", "outputs": [ { - "internalType": "uint256", + "internalType": "uint96", "name": "", - "type": "uint256" + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "reduceAmount_", + "name": "_pid", "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" } ], - "name": "_reduceReserves", + "name": "getEligibleWithdrawalAmount", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "withdrawalAmount", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "account", "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumberOrSecond", + "type": "uint256" } ], - "name": "_setComptroller", + "name": "getPriorVotes", "outputs": [ { - "internalType": "uint256", + "internalType": "uint96", "name": "", - "type": "uint256" + "type": "uint96" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", "type": "address" } ], - "name": "_setInterestRateModel", + "name": "getRequestedAmount", "outputs": [ { "internalType": "uint256", @@ -155139,55 +56847,102 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address payable", - "name": "newPendingAdmin", + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", "type": "address" } ], - "name": "_setPendingAdmin", + "name": "getUserInfo", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingWithdrawals", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "_pid", "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" } ], - "name": "_setReserveFactor", + "name": "getWithdrawalRequests", "outputs": [ { - "internalType": "uint256", + "components": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "lockedUntil", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "afterUpgrade", + "type": "uint128" + } + ], + "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", "name": "", - "type": "uint256" + "type": "tuple[]" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -155200,44 +56955,55 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "bool", + "name": "timeBased_", + "type": "bool" + }, { "internalType": "uint256", - "name": "", + "name": "blocksPerYear_", "type": "uint256" } ], + "name": "initializeTimeManager", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [], - "name": "accrueInterest", + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isStakedToken", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "admin", + "name": "isTimeBased", "outputs": [ { - "internalType": "address payable", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -155249,16 +57015,11 @@ "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "", "type": "address" } ], - "name": "allowance", + "name": "nonces", "outputs": [ { "internalType": "uint256", @@ -155271,46 +57032,44 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "spender", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "approve", + "name": "numCheckpoints", "outputs": [ { - "internalType": "bool", + "internalType": "uint32", "name": "", - "type": "bool" + "type": "uint32" } ], "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", + "inputs": [], + "name": "pendingAdmin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -155318,15 +57077,25 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "owner", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", "type": "address" } ], - "name": "balanceOfUnderlying", + "name": "pendingReward", "outputs": [ { "internalType": "uint256", @@ -155335,19 +57104,24 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "borrow", + "name": "pendingRewardTransfers", "outputs": [ { "internalType": "uint256", @@ -155356,45 +57130,49 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "account", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", "type": "address" } ], - "name": "borrowBalanceCurrent", + "name": "pendingWithdrawalsBeforeUpgrade", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "beforeUpgradeWithdrawalAmount", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", + "inputs": [], + "name": "pendingXVSVaultImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -155402,35 +57180,61 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" }, { "internalType": "uint256", - "name": "borrowAmount", + "name": "", "type": "uint256" } ], - "name": "borrowBehalf", + "name": "poolInfos", "outputs": [ + { + "internalType": "contract IBEP20", + "name": "token", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardPerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockPeriod", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "borrowIndex", + "inputs": [ + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "poolLength", "outputs": [ { "internalType": "uint256", @@ -155445,7 +57249,7 @@ { "constant": true, "inputs": [], - "name": "borrowRatePerBlock", + "name": "primePoolId", "outputs": [ { "internalType": "uint256", @@ -155460,10 +57264,10 @@ { "constant": true, "inputs": [], - "name": "comptroller", + "name": "primeRewardToken", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "address", "name": "", "type": "address" } @@ -155475,12 +57279,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "primeToken", "outputs": [ { - "internalType": "uint8", + "internalType": "contract IPrime", "name": "", - "type": "uint8" + "type": "address" } ], "payable": false, @@ -155489,23 +57293,48 @@ }, { "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", "type": "uint256" } ], + "name": "requestWithdrawal", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "exchangeRateStored", + "name": "resume", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlock", "outputs": [ { "internalType": "uint256", @@ -155522,27 +57351,12 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "getAccountSnapshot", + "name": "rewardTokenAmountsPerBlockOrSecond", "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "uint256", "name": "", @@ -155554,75 +57368,65 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", "type": "uint256" } ], + "name": "set", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "newAccessControlAddress", "type": "address" } ], + "name": "setAccessControl", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", + "internalType": "contract IPrime", + "name": "_primeToken", "type": "address" }, { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", + "internalType": "address", + "name": "_primeRewardToken", "type": "address" }, { "internalType": "uint256", - "name": "initialExchangeRateMantissa_", + "name": "_primePoolId", "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" } ], - "name": "initialize", + "name": "setPrimeToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", @@ -155632,92 +57436,77 @@ "constant": false, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", + "internalType": "address", + "name": "_rewardToken", "type": "address" }, { "internalType": "uint256", - "name": "initialExchangeRateMantissa_", + "name": "_rewardAmount", "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" } ], - "name": "initialize", + "name": "setRewardAmountPerBlockOrSecond", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "contract InterestRateModel", - "name": "", + "internalType": "address", + "name": "_rewardToken", "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newPeriod", + "type": "uint256" } ], + "name": "setWithdrawalLockingPeriod", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "_xvs", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsStore", + "type": "address" } ], + "name": "setXvsStore", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", + "name": "", "type": "address" } ], - "name": "liquidateBorrow", + "name": "totalAllocPoints", "outputs": [ { "internalType": "uint256", @@ -155726,19 +57515,24 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "uint256", - "name": "mintAmount", + "name": "", "type": "uint256" } ], - "name": "mint", + "name": "totalPendingWithdrawals", "outputs": [ { "internalType": "uint256", @@ -155747,7 +57541,7 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -155755,23 +57549,17 @@ "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "_rewardToken", "type": "address" }, { "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", + "name": "_pid", "type": "uint256" } ], + "name": "updatePool", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -155779,12 +57567,12 @@ { "constant": true, "inputs": [], - "name": "name", + "name": "vaultPaused", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], "payable": false, @@ -155794,10 +57582,10 @@ { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "xvsAddress", "outputs": [ { - "internalType": "address payable", + "internalType": "address", "name": "", "type": "address" } @@ -155809,10 +57597,10 @@ { "constant": true, "inputs": [], - "name": "protocolShareReserve", + "name": "xvsStore", "outputs": [ { - "internalType": "address payable", + "internalType": "address", "name": "", "type": "address" } @@ -155820,53 +57608,128 @@ "payable": false, "stateMutability": "view", "type": "function" + } + ] + }, + "XVSVaultProxy_Proxy": { + "address": "0x051100480289e704d20e9DB4804837068f3f9204", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "uint256", - "name": "redeemTokens", + "name": "error", "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "Failure", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "redeemUnderlying", - "outputs": [ + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewImplementation", + "type": "event" }, { - "constant": true, + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, "inputs": [], - "name": "reduceReservesBlockDelta", + "name": "_acceptAdmin", "outputs": [ { "internalType": "uint256", @@ -155875,13 +57738,13 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "reduceReservesBlockNumber", + "name": "_acceptImplementation", "outputs": [ { "internalType": "uint256", @@ -155890,19 +57753,19 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], - "name": "repayBorrow", + "name": "_setPendingAdmin", "outputs": [ { "internalType": "uint256", @@ -155919,16 +57782,11 @@ "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "newPendingImplementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" } ], - "name": "repayBorrowBehalf", + "name": "_setPendingImplementation", "outputs": [ { "internalType": "uint256", @@ -155943,12 +57801,12 @@ { "constant": true, "inputs": [], - "name": "reserveFactorMantissa", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -155956,88 +57814,147 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ { "internalType": "address", - "name": "liquidator", + "name": "", "type": "address" - }, + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "borrower", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "seize", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingXVSVaultImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" + } + ] + }, + "XVSVesting": { + "address": "0xA9dD0536Ab0699D60c28CE369Ff366a1e621BFf1", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "newAccessControlManagerAddress", + "name": "vrtConversionAddress", "type": "address" } ], - "name": "setAccessControlManager", - "outputs": [ + "name": "VRTConversionSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amountClaimed", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "VestedTokensClaimed", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "address payable", - "name": "protcolShareReserve_", + "indexed": true, + "internalType": "address", + "name": "recipient", "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "startTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawnAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "XVSVested", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", + "name": "amount", "type": "uint256" } ], - "name": "setReduceReservesBlockDelta", + "name": "XVSWithdrawn", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "TOTAL_VESTING_TIME", "outputs": [ { "internalType": "uint256", @@ -156046,18 +57963,33 @@ } ], "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract XVSVestingProxy", + "name": "xvsVestingProxy", + "type": "address" + } + ], + "name": "_become", + "outputs": [], + "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "supplyRatePerBlock", + "name": "_notEntered", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, @@ -156067,12 +57999,12 @@ { "constant": true, "inputs": [], - "name": "symbol", + "name": "admin", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "payable": false, @@ -156080,24 +58012,29 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "depositAmount", "type": "uint256" } ], + "name": "deposit", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "totalBorrowsCurrent", + "name": "getCurrentTime", "outputs": [ { "internalType": "uint256", @@ -156106,17 +58043,33 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [], - "name": "totalReserves", + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getWithdrawableAmount", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "totalWithdrawableAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalVestedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalWithdrawnAmount", "type": "uint256" } ], @@ -156127,12 +58080,12 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "implementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -156144,16 +58097,20 @@ "inputs": [ { "internalType": "address", - "name": "dst", + "name": "_xvsAddress", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transfer", + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", "outputs": [ { "internalType": "bool", @@ -156162,44 +58119,28 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", + "constant": true, + "inputs": [], + "name": "pendingAdmin", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "underlying", + "name": "pendingImplementation", "outputs": [ { "internalType": "address", @@ -156210,234 +58151,138 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vLINK_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" + "internalType": "address", + "name": "_vrtConversionAddress", + "type": "address" } ], - "name": "AccrueInterest", - "type": "event" + "name": "setVRTConverter", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": true, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, "internalType": "address", - "name": "spender", + "name": "", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "", "type": "uint256" } ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ + "name": "vestings", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "borrower", + "name": "recipient", "type": "address" }, { - "indexed": false, "internalType": "uint256", - "name": "borrowAmount", + "name": "startTime", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "accountBorrows", + "name": "amount", "type": "uint256" }, { - "indexed": false, "internalType": "uint256", - "name": "totalBorrows", + "name": "withdrawnAmount", "type": "uint256" } ], - "name": "Borrow", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "vrtConversionAddress", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "Failure", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, + "constant": false, + "inputs": [], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvs", + "outputs": [ { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", + "internalType": "contract IBEP20", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" } ], - "name": "LiquidateBorrow", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "xvsDecimalsMultiplier", + "outputs": [ { - "indexed": false, "internalType": "uint256", - "name": "totalSupply", + "name": "", "type": "uint256" } ], - "name": "Mint", - "type": "event" - }, + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + }, + "XVSVestingProxy": { + "address": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", + "abi": [ { - "anonymous": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "payer", + "name": "implementation_", "type": "address" }, { - "indexed": false, "internalType": "address", - "name": "receiver", + "name": "_xvsAddress", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", - "type": "event" + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, @@ -156445,17 +58290,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -156464,17 +58309,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newImplementation", "type": "address" } ], - "name": "NewAdmin", + "name": "NewImplementation", "type": "event" }, { @@ -156482,18 +58327,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldPendingAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newPendingAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewPendingAdmin", "type": "event" }, { @@ -156501,126 +58346,153 @@ "inputs": [ { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", + "internalType": "address", + "name": "oldPendingImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "newPendingImplementation", "type": "address" } ], - "name": "NewMarketInterestRateModel", + "name": "NewPendingImplementation", "type": "event" }, { - "anonymous": false, + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, "inputs": [ { - "indexed": false, "internalType": "address", - "name": "oldPendingAdmin", + "name": "implementation_", "type": "address" - }, + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ { - "indexed": false, "internalType": "address", "name": "newPendingAdmin", "type": "address" } ], - "name": "NewPendingAdmin", - "type": "event" + "name": "_setPendingAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ { - "indexed": true, "internalType": "address", - "name": "oldProtocolShareReserve", + "name": "newPendingImplementation", "type": "address" - }, + } + ], + "name": "_setPendingImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ { - "indexed": true, "internalType": "address", - "name": "newProtocolShareReserve", + "name": "", "type": "address" } ], - "name": "NewProtocolShareReserve", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "NewReduceReservesBlockDelta", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "NewReserveFactor", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingImplementation", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "redeemer", + "name": "", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "Redeem", - "type": "event" + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { "anonymous": false, @@ -156628,23 +58500,11 @@ { "indexed": false, "internalType": "address", - "name": "redeemer", + "name": "vrtConversionAddress", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" } ], - "name": "RedeemFee", + "name": "VRTConversionSet", "type": "event" }, { @@ -156653,100 +58513,57 @@ { "indexed": false, "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", + "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", + "name": "amountClaimed", "type": "uint256" } ], - "name": "RepayBorrow", + "name": "VestedTokensClaimed", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "address", - "name": "benefactor", + "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", + "name": "startTime", "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "reduceAmount", + "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "newTotalReserves", + "name": "withdrawnAmount", "type": "uint256" } ], - "name": "ReservesReduced", + "name": "XVSVested", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "to", + "name": "recipient", "type": "address" }, { @@ -156756,13 +58573,13 @@ "type": "uint256" } ], - "name": "Transfer", + "name": "XVSWithdrawn", "type": "event" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "_acceptAdmin", + "name": "TOTAL_VESTING_TIME", "outputs": [ { "internalType": "uint256", @@ -156771,106 +58588,78 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "contract XVSVestingProxy", + "name": "xvsVestingProxy", + "type": "address" } ], + "name": "_become", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "_notEntered", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "_becomeImplementation", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", + "constant": true, + "inputs": [], + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "recipient", "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "depositAmount", "type": "uint256" } ], + "name": "deposit", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", + "constant": true, + "inputs": [], + "name": "getCurrentTime", "outputs": [ { "internalType": "uint256", @@ -156879,55 +58668,44 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "address payable", - "name": "newPendingAdmin", + "internalType": "address", + "name": "recipient", "type": "address" } ], - "name": "_setPendingAdmin", + "name": "getWithdrawableAmount", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "totalWithdrawableAmount", "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + }, { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "totalVestedAmount", "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "totalWithdrawnAmount", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "accessControlManager", + "name": "implementation", "outputs": [ { "internalType": "address", @@ -156940,42 +58718,42 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "_xvsAddress", + "type": "address" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [], - "name": "accrueInterest", + "name": "initialized", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "admin", + "name": "pendingAdmin", "outputs": [ { - "internalType": "address payable", + "internalType": "address", "name": "", "type": "address" } @@ -156986,24 +58764,13 @@ }, { "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", + "inputs": [], + "name": "pendingImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -157015,23 +58782,12 @@ "inputs": [ { "internalType": "address", - "name": "spender", + "name": "_vrtConversionAddress", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], + "name": "setVRTConverter", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -157041,15 +58797,35 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "", "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "balanceOf", + "name": "vestings", "outputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "startTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawnAmount", "type": "uint256" } ], @@ -157058,36 +58834,48 @@ "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "vrtConversionAddress", + "outputs": [ { "internalType": "address", - "name": "owner", + "name": "", "type": "address" } ], - "name": "balanceOfUnderlying", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvs", "outputs": [ { - "internalType": "uint256", + "internalType": "contract IBEP20", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", + "constant": true, + "inputs": [], + "name": "xvsDecimalsMultiplier", "outputs": [ { "internalType": "uint256", @@ -157096,81 +58884,106 @@ } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" + } + ] + }, + "XVSVestingProxy_Implementation": { + "address": "0xa9dd0536ab0699d60c28ce369ff366a1e621bff1", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "account", + "name": "vrtConversionAddress", "type": "address" } ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "VRTConversionSet", + "type": "event" }, { - "constant": true, + "anonymous": false, "inputs": [ { + "indexed": false, "internalType": "address", - "name": "account", + "name": "recipient", "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amountClaimed", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" + "name": "VestedTokensClaimed", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "borrower", + "name": "recipient", "type": "address" }, { + "indexed": false, "internalType": "uint256", - "name": "borrowAmount", + "name": "startTime", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawnAmount", "type": "uint256" } ], - "name": "borrowBehalf", - "outputs": [ + "name": "XVSVested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, { + "indexed": false, "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "XVSWithdrawn", + "type": "event" }, { "constant": true, "inputs": [], - "name": "borrowIndex", + "name": "TOTAL_VESTING_TIME", "outputs": [ { "internalType": "uint256", @@ -157183,29 +58996,29 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "contract XVSVestingProxy", + "name": "xvsVestingProxy", + "type": "address" } ], + "name": "_become", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "_notEntered", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "payable": false, @@ -157215,12 +59028,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "admin", "outputs": [ { - "internalType": "uint8", + "internalType": "address", "name": "", - "type": "uint8" + "type": "address" } ], "payable": false, @@ -157229,15 +59042,20 @@ }, { "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "depositAmount", "type": "uint256" } ], + "name": "deposit", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -157245,7 +59063,7 @@ { "constant": true, "inputs": [], - "name": "exchangeRateStored", + "name": "getCurrentTime", "outputs": [ { "internalType": "uint256", @@ -157262,45 +59080,25 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "recipient", "type": "address" } ], - "name": "getAccountSnapshot", + "name": "getWithdrawableAmount", "outputs": [ { "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", + "name": "totalWithdrawableAmount", "type": "uint256" }, { "internalType": "uint256", - "name": "", + "name": "totalVestedAmount", "type": "uint256" }, { "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", + "name": "totalWithdrawnAmount", "type": "uint256" } ], @@ -157328,38 +59126,8 @@ "inputs": [ { "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", + "name": "_xvsAddress", "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" } ], "name": "initialize", @@ -157369,52 +59137,27 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "initialize", - "outputs": [], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "interestRateModel", + "name": "pendingAdmin", "outputs": [ { - "internalType": "contract InterestRateModel", + "internalType": "address", "name": "", "type": "address" } @@ -157426,12 +59169,12 @@ { "constant": true, "inputs": [], - "name": "isVToken", + "name": "pendingImplementation", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, @@ -157443,101 +59186,88 @@ "inputs": [ { "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", + "name": "_vrtConversionAddress", "type": "address" } ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "setVRTConverter", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ + "internalType": "address", + "name": "", + "type": "address" + }, { "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ + "name": "vestings", + "outputs": [ { "internalType": "address", - "name": "receiver", + "name": "recipient", "type": "address" }, { "internalType": "uint256", - "name": "mintAmount", + "name": "startTime", "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawnAmount", "type": "uint256" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], - "name": "name", + "name": "vrtConversionAddress", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], - "name": "pendingAdmin", + "name": "xvs", "outputs": [ { - "internalType": "address payable", + "internalType": "contract IBEP20", "name": "", "type": "address" } @@ -157549,107 +59279,165 @@ { "constant": true, "inputs": [], - "name": "protocolShareReserve", + "name": "xvsDecimalsMultiplier", "outputs": [ { - "internalType": "address payable", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" + } + ] + }, + "XVSVestingProxy_Proxy": { + "address": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsAddress", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" } ], - "name": "redeem", - "outputs": [ + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "NewImplementation", + "type": "event" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], - "name": "redeemUnderlying", - "outputs": [ + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" } ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, + "constant": false, "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], + "name": "_acceptImplementation", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "implementation_", + "type": "address" } ], + "name": "_setImplementation", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" } ], + "name": "_setPendingAdmin", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -157659,23 +59447,12 @@ "inputs": [ { "internalType": "address", - "name": "borrower", + "name": "newPendingImplementation", "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], + "name": "_setPendingImplementation", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" @@ -157683,12 +59460,12 @@ { "constant": true, "inputs": [], - "name": "reserveFactorMantissa", + "name": "admin", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -157696,108 +59473,107 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", + "constant": true, + "inputs": [], + "name": "implementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "constant": false, - "inputs": [ + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ { "internalType": "address", - "name": "newAccessControlManagerAddress", + "name": "", "type": "address" } ], - "name": "setAccessControlManager", + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingImplementation", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" - }, + } + ] + }, + "pancakeFactory": { + "address": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73", + "abi": [ { - "constant": false, "inputs": [ { - "internalType": "address payable", - "name": "protcolShareReserve_", + "internalType": "address", + "name": "_feeToSetter", "type": "address" } ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], "payable": false, "stateMutability": "nonpayable", - "type": "function" + "type": "constructor" }, { - "constant": false, + "anonymous": false, "inputs": [ { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ + "indexed": true, + "internalType": "address", + "name": "token0", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "token1", + "type": "address" + }, { + "indexed": false, + "internalType": "address", + "name": "pair", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" } ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" + "name": "PairCreated", + "type": "event" }, { "constant": true, "inputs": [], - "name": "supplyRatePerBlock", + "name": "INIT_CODE_PAIR_HASH", "outputs": [ { - "internalType": "uint256", + "internalType": "bytes32", "name": "", - "type": "uint256" + "type": "bytes32" } ], "payable": false, @@ -157806,13 +59582,19 @@ }, { "constant": true, - "inputs": [], - "name": "symbol", + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allPairs", "outputs": [ { - "internalType": "string", + "internalType": "address", "name": "", - "type": "string" + "type": "address" } ], "payable": false, @@ -157822,7 +59604,7 @@ { "constant": true, "inputs": [], - "name": "totalBorrows", + "name": "allPairsLength", "outputs": [ { "internalType": "uint256", @@ -157836,13 +59618,24 @@ }, { "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", + "inputs": [ + { + "internalType": "address", + "name": "tokenA", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenB", + "type": "address" + } + ], + "name": "createPair", "outputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "pair", + "type": "address" } ], "payable": false, @@ -157852,12 +59645,12 @@ { "constant": true, "inputs": [], - "name": "totalReserves", + "name": "feeTo", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -157867,12 +59660,12 @@ { "constant": true, "inputs": [], - "name": "totalSupply", + "name": "feeToSetter", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "payable": false, @@ -157880,29 +59673,29 @@ "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ { "internalType": "address", - "name": "dst", + "name": "", "type": "address" }, { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "transfer", + "name": "getPair", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { @@ -157910,51 +59703,35 @@ "inputs": [ { "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", + "name": "_feeTo", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], + "name": "setFeeTo", + "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ + "constant": false, + "inputs": [ { "internalType": "address", - "name": "", + "name": "_feeToSetter", "type": "address" } ], + "name": "setFeeToSetter", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" } ] }, - "vLINK_Proxy": { - "address": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", + "vAAVE": { + "address": "0x26DA28954763B92139ED49283625ceCAf52C6f94", "abi": [ { "inputs": [ @@ -158187,6 +59964,37 @@ "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -158326,6 +60134,31 @@ "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -159091,6 +60924,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -159417,65 +61276,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vLTC": { - "address": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -159649,6 +61452,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -159660,17 +61469,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -159678,18 +61505,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -159698,17 +61525,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -159749,6 +61595,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -159788,11 +61672,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -159861,7 +61776,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -159905,11 +61820,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -159946,12 +61856,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -159967,6 +61892,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -159988,37 +61922,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -160060,7 +61969,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -160076,6 +61985,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -160279,24 +62203,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -160305,18 +62225,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -160326,12 +62246,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -160339,41 +62259,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -160476,6 +62384,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -160558,6 +62551,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -160588,6 +62607,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -160630,6 +62664,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -160723,6 +62787,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -160884,9 +63011,65 @@ "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "vADA": { + "address": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", + "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -161060,12 +63243,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -161077,35 +63254,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -161113,18 +63272,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -161133,36 +63292,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -161203,44 +63343,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -161280,42 +63382,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -161384,7 +63455,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -161428,6 +63499,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -161464,27 +63540,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -161500,15 +63561,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -161530,12 +63582,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -161577,7 +63654,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -161593,21 +63670,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -161810,32 +63872,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -161896,6 +63932,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -161992,91 +64070,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -162159,32 +64152,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -162215,21 +64182,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -162272,36 +64224,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -162395,69 +64317,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -162619,12 +64478,7 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vLTC_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ + }, { "inputs": [], "payable": false, @@ -164362,8 +66216,8 @@ } ] }, - "vLTC_Proxy": { - "address": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", + "vBCH": { + "address": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", "abi": [ { "inputs": [ @@ -165826,65 +67680,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vLUNA": { - "address": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -166058,6 +67856,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -166089,6 +67893,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -166100,17 +67910,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -166118,18 +67928,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -166137,18 +67947,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -166189,6 +67999,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -166228,6 +68076,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -166326,7 +68180,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -166370,11 +68224,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -166411,12 +68260,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -166432,6 +68296,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -166453,37 +68326,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -166525,7 +68373,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -166541,6 +68389,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -166744,24 +68607,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -166770,18 +68629,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -166791,12 +68650,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -166804,41 +68663,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -166941,6 +68788,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -167079,6 +69011,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -167121,6 +69068,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -167214,6 +69191,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -167375,9 +69415,65 @@ "payable": false, "stateMutability": "view", "type": "function" - }, + } + ] + }, + "vBETH": { + "address": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", + "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -167594,6 +69690,25 @@ "name": "NewComptroller", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -167676,31 +69791,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -167813,6 +69903,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -167849,21 +69944,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -167885,15 +69965,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -167915,6 +69986,31 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -168240,6 +70336,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -168336,91 +70474,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -168829,12 +70882,7 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vLUNA_Implementation": { - "address": "0xa43845cc2c0f74dace13f4adebdcc178eba49980", - "abi": [ + }, { "inputs": [], "payable": false, @@ -169010,11 +71058,73 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -169091,6 +71201,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -169130,6 +71278,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -169228,7 +71382,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -169328,7 +71482,7 @@ "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -169379,7 +71533,7 @@ "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -169421,7 +71575,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -169437,6 +71591,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -169639,6 +71808,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -169962,6 +72157,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -169992,6 +72213,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -170034,6 +72270,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -170127,6 +72393,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -170291,16 +72620,11 @@ } ] }, - "vLUNA_Proxy": { - "address": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", + "vBNB": { + "address": "0xA07c5b74C9B40447a954e1466938b865b6BBea36", "abi": [ { "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, { "internalType": "contract ComptrollerInterface", "name": "comptroller_", @@ -170335,16 +72659,6 @@ "internalType": "address payable", "name": "admin_", "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" } ], "payable": false, @@ -170525,37 +72839,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -170594,25 +72877,6 @@ "name": "NewComptroller", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -170695,31 +72959,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -170852,27 +73091,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -170915,31 +73133,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -171265,48 +73458,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], @@ -171389,18 +73540,43 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ + "constant": false, + "inputs": [ { - "internalType": "address", - "name": "", + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" } ], + "name": "initialize", + "outputs": [], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { @@ -171442,73 +73618,24 @@ "type": "address" }, { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", + "internalType": "contract VToken", "name": "vTokenCollateral", "type": "address" } ], "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", + "outputs": [], + "payable": true, + "stateMutability": "payable", "type": "function" }, { "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], + "inputs": [], "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", + "outputs": [], + "payable": true, + "stateMutability": "payable", "type": "function" }, { @@ -171585,23 +73712,11 @@ }, { "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], + "inputs": [], "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", + "outputs": [], + "payable": true, + "stateMutability": "payable", "type": "function" }, { @@ -171611,23 +73726,12 @@ "internalType": "address", "name": "borrower", "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" } ], "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", + "outputs": [], + "payable": true, + "stateMutability": "payable", "type": "function" }, { @@ -171822,26 +73926,11 @@ "payable": false, "stateMutability": "nonpayable", "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" } ] }, - "vMATIC": { - "address": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", + "vBTC": { + "address": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", "abi": [ { "inputs": [ @@ -172074,37 +74163,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -172244,31 +74302,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -173034,32 +75067,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -175124,11 +77131,62 @@ } ] }, - "vMATIC_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vBUSD": { + "address": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -175302,12 +77360,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -175319,35 +77371,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -175355,18 +77389,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -175375,36 +77409,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -175445,44 +77460,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -175522,42 +77499,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -175626,7 +77572,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -175670,6 +77616,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -175706,27 +77657,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -175742,15 +77678,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -175772,12 +77699,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -175819,7 +77771,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -175835,21 +77787,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -176052,32 +77989,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -176138,6 +78049,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -176234,91 +78187,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -176401,32 +78269,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -176457,21 +78299,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -176514,36 +78341,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -176637,69 +78434,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -176861,65 +78595,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vMATIC_Proxy": { - "address": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -177093,6 +78771,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -177124,6 +78808,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -177135,17 +78825,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -177153,18 +78843,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -177172,18 +78862,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -177224,6 +78914,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -177263,6 +78991,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -177361,7 +79095,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -177405,11 +79139,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -177446,12 +79175,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -177467,6 +79211,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -177488,37 +79241,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -177560,7 +79288,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -177576,6 +79304,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -177779,24 +79522,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -177805,18 +79544,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -177826,12 +79565,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -177839,41 +79578,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -177976,6 +79703,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -178114,6 +79926,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -178156,6 +79983,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -178249,6 +80106,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -178413,8 +80333,8 @@ } ] }, - "vSXP": { - "address": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", + "vCAKE": { + "address": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", "abi": [ { "inputs": [ @@ -178647,6 +80567,37 @@ "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -178786,6 +80737,31 @@ "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -179551,6 +81527,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -181615,11 +83617,62 @@ } ] }, - "vSXP_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vDAI": { + "address": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -181793,12 +83846,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -181810,35 +83857,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -181846,18 +83875,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -181866,36 +83895,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -181936,44 +83946,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -182013,42 +83985,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -182117,7 +84058,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -182161,6 +84102,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -182197,27 +84143,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -182233,15 +84164,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -182263,12 +84185,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -182310,7 +84257,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -182326,21 +84273,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -182543,32 +84475,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -182629,6 +84535,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -182725,91 +84673,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -182892,32 +84755,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -182948,21 +84785,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -183005,36 +84827,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -183128,69 +84920,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -183352,65 +85081,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vSXP_Proxy": { - "address": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -183584,6 +85257,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -183595,17 +85274,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -183613,18 +85310,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -183633,17 +85330,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -183684,6 +85400,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -183723,11 +85477,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -183796,7 +85581,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -183840,11 +85625,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -183881,12 +85661,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -183902,6 +85697,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -183923,37 +85727,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -183995,7 +85774,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -184011,6 +85790,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -184214,24 +86008,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -184240,18 +86030,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -184261,12 +86051,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -184274,41 +86064,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -184411,6 +86189,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -184493,6 +86356,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -184523,6 +86412,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -184565,6 +86469,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -184658,6 +86592,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -184822,8 +86819,8 @@ } ] }, - "vTRX": { - "address": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", + "vDOGE": { + "address": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", "abi": [ { "inputs": [ @@ -185056,37 +87053,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -186016,32 +87982,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -188106,8 +90046,8 @@ } ] }, - "vTRXOLD": { - "address": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", + "vDOT": { + "address": "0x1610bc33319e9398de5f57B33a5b184c806aD217", "abi": [ { "inputs": [ @@ -188340,37 +90280,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -188510,31 +90419,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -189300,32 +91184,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -191390,11 +93248,62 @@ } ] }, - "vTRXOLD_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vETH": { + "address": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -191568,12 +93477,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -191585,35 +93488,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -191621,18 +93506,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -191641,36 +93526,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -191711,44 +93577,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -191788,42 +93616,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -191892,7 +93689,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -191936,6 +93733,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -191972,27 +93774,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -192008,15 +93795,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -192038,12 +93816,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -192085,7 +93888,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -192101,21 +93904,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -192318,32 +94106,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -192404,6 +94166,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -192500,91 +94304,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -192667,32 +94386,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -192723,21 +94416,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -192780,36 +94458,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -192903,69 +94551,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -193127,65 +94712,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vTRXOLD_Proxy": { - "address": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -193359,6 +94888,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -193390,6 +94925,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -193401,17 +94942,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -193419,18 +94960,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -193438,18 +94979,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -193490,6 +95031,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -193529,6 +95108,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -193627,7 +95212,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -193671,11 +95256,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -193712,12 +95292,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -193733,6 +95328,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -193754,37 +95358,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -193826,7 +95405,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -193842,6 +95421,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -194045,24 +95639,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -194071,18 +95661,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -194092,12 +95682,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -194105,41 +95695,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -194242,6 +95820,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -194380,6 +96043,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -194422,6 +96100,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -194515,6 +96223,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -194679,11 +96450,62 @@ } ] }, - "vTRX_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vFDUSD": { + "address": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -194865,7 +96687,44 @@ "type": "uint256" } ], - "name": "Mint", + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "MintBehalf", "type": "event" }, { @@ -194874,35 +96733,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAccessControlAddress", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAccessControlManager", "type": "event" }, { @@ -194911,17 +96752,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -194929,18 +96770,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -194948,18 +96789,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -195225,6 +97066,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -195261,27 +97107,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -195297,15 +97128,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -195327,12 +97149,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -195374,7 +97221,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -195607,32 +97454,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -195693,6 +97514,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -195789,91 +97652,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -196192,69 +97970,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -196416,65 +98131,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vTRX_Proxy": { - "address": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -196648,6 +98307,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -196679,6 +98344,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -196690,17 +98361,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -196708,18 +98379,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -196727,18 +98398,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -196779,6 +98450,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -196818,6 +98527,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -196916,7 +98631,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -196960,11 +98675,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -197001,12 +98711,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -197022,6 +98747,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -197043,37 +98777,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -197115,7 +98824,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -197131,6 +98840,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -197333,6 +99057,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -197393,48 +99143,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], @@ -197531,6 +99239,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -197669,6 +99462,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -197711,6 +99519,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -197804,6 +99642,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -197968,8 +99869,8 @@ } ] }, - "vTUSD": { - "address": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", + "vFIL": { + "address": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", "abi": [ { "inputs": [ @@ -198202,37 +100103,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -198372,31 +100242,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -199162,32 +101007,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -201252,8 +103071,8 @@ } ] }, - "vTUSDOLD": { - "address": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", + "vLINK": { + "address": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", "abi": [ { "inputs": [ @@ -201486,37 +103305,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -201656,31 +103444,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -202446,32 +104209,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -204536,11 +106273,62 @@ } ] }, - "vTUSDOLD_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vLTC": { + "address": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -204714,12 +106502,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -204731,35 +106513,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -204767,18 +106531,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -204787,36 +106551,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -204857,44 +106602,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -204934,42 +106641,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -205038,7 +106714,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -205082,6 +106758,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -205118,27 +106799,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -205154,15 +106820,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -205184,12 +106841,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -205231,7 +106913,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -205247,21 +106929,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -205464,32 +107131,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -205550,6 +107191,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -205646,91 +107329,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -205813,32 +107411,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -205869,21 +107441,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -205926,36 +107483,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -206049,69 +107576,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -206273,65 +107737,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vTUSDOLD_Proxy": { - "address": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -206505,6 +107913,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -206536,6 +107950,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -206547,17 +107967,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -206565,18 +107985,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -206584,18 +108004,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -206636,6 +108056,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -206675,6 +108133,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -206773,7 +108237,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -206817,11 +108281,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -206858,12 +108317,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -206879,6 +108353,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -206900,37 +108383,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -206972,7 +108430,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -206988,6 +108446,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -207191,24 +108664,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -207217,18 +108686,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -207238,12 +108707,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -207251,41 +108720,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -207388,6 +108845,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -207526,6 +109068,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -207568,6 +109125,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -207661,6 +109248,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -207825,11 +109475,62 @@ } ] }, - "vTUSD_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vLUNA": { + "address": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -208003,12 +109704,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -208040,12 +109735,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "MintBehalf", @@ -208057,17 +109746,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -208075,18 +109764,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -208094,18 +109783,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -208146,44 +109835,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -208223,12 +109874,6 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", @@ -208327,7 +109972,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -208371,6 +110016,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -208407,27 +110057,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -208443,15 +110078,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -208473,12 +110099,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -208520,7 +110171,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -208536,21 +110187,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -208753,32 +110389,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -208839,6 +110449,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -208935,91 +110587,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -209158,21 +110725,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -209215,36 +110767,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -209338,69 +110860,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -209562,65 +111021,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vTUSD_Proxy": { - "address": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -209799,37 +111202,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -209868,25 +111240,6 @@ "name": "NewComptroller", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -210106,11 +111459,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -210147,6 +111495,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -210168,6 +111531,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -210189,31 +111561,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -210539,48 +111886,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], @@ -210677,6 +111982,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -210759,32 +112149,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -211114,8 +112478,8 @@ } ] }, - "vUSDC": { - "address": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", + "vMATIC": { + "address": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", "abi": [ { "inputs": [ @@ -211348,6 +112712,37 @@ "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -211487,6 +112882,31 @@ "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -212252,6 +113672,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -214316,11 +115762,62 @@ } ] }, - "vUSDC_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vSXP": { + "address": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -214494,12 +115991,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -214511,35 +116002,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -214547,18 +116020,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -214567,36 +116040,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -214637,44 +116091,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -214714,42 +116130,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -214818,7 +116203,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -214862,6 +116247,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -214898,27 +116288,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -214934,15 +116309,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -214964,12 +116330,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -215011,7 +116402,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -215027,21 +116418,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -215244,32 +116620,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -215330,6 +116680,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -215426,91 +116818,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -215593,32 +116900,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -215649,21 +116930,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -215706,36 +116972,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -215829,69 +117065,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -216053,65 +117226,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vUSDC_Proxy": { - "address": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -216285,6 +117402,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -216296,17 +117419,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -216314,18 +117455,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -216334,17 +117475,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -216385,6 +117545,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -216424,11 +117622,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -216497,7 +117726,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -216541,11 +117770,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -216582,12 +117806,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -216603,6 +117842,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -216624,37 +117872,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -216696,7 +117919,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -216712,6 +117935,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -216915,24 +118153,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -216941,18 +118175,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -216962,12 +118196,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -216975,41 +118209,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -217112,6 +118334,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -217194,6 +118501,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -217224,6 +118557,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -217266,6 +118614,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -217359,6 +118737,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -217523,8 +118964,8 @@ } ] }, - "vUSDT": { - "address": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", + "vTRX": { + "address": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", "abi": [ { "inputs": [ @@ -217757,6 +119198,37 @@ "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -217896,6 +119368,31 @@ "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -218661,6 +120158,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -220725,11 +122248,62 @@ } ] }, - "vUSDT_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vTRXOLD": { + "address": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -220903,12 +122477,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -220940,12 +122508,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "MintBehalf", @@ -220957,17 +122519,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -220975,18 +122537,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -220994,18 +122556,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -221046,44 +122608,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -221123,12 +122647,6 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", @@ -221227,7 +122745,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -221271,6 +122789,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -221307,27 +122830,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -221343,15 +122851,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -221373,12 +122872,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -221420,7 +122944,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -221436,21 +122960,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -221653,32 +123162,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -221739,6 +123222,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -221835,91 +123360,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -222058,21 +123498,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -222115,36 +123540,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -222238,69 +123633,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -222462,65 +123794,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vUSDT_Proxy": { - "address": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -222694,6 +123970,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -222705,17 +123987,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -222723,18 +124023,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -222743,17 +124043,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -222794,6 +124113,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -222833,11 +124190,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -222906,7 +124294,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -222950,11 +124338,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -222991,12 +124374,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -223012,6 +124410,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -223033,37 +124440,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -223105,7 +124487,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -223121,6 +124503,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -223324,24 +124721,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -223350,18 +124743,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -223371,12 +124764,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -223384,41 +124777,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -223521,6 +124902,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -223603,6 +125069,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -223633,6 +125125,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -223675,6 +125182,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -223768,6 +125305,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -223932,8 +125532,8 @@ } ] }, - "vUST": { - "address": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", + "vTUSD": { + "address": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", "abi": [ { "inputs": [ @@ -225654,11 +127254,73 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -225735,6 +127397,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -225774,6 +127474,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -225872,7 +127578,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -225972,7 +127678,7 @@ "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -226023,7 +127729,7 @@ "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -226065,7 +127771,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -226081,6 +127787,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -226283,6 +128004,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -226606,6 +128353,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -226636,6 +128409,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -226678,6 +128466,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -226771,6 +128589,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -226935,11 +128816,62 @@ } ] }, - "vUST_Implementation": { - "address": "0xa43845cc2c0f74dace13f4adebdcc178eba49980", + "vTUSDOLD": { + "address": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -227118,6 +129050,37 @@ "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -227156,6 +129119,25 @@ "name": "NewComptroller", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -227375,6 +129357,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -227411,21 +129398,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -227447,15 +129419,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -227477,6 +129440,31 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -227802,6 +129790,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -227898,91 +129928,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -228065,6 +130010,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -228391,65 +130362,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vUST_Proxy": { - "address": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -228623,6 +130538,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -228654,6 +130575,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -228665,17 +130592,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -228683,18 +130610,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -228702,18 +130629,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -228754,6 +130681,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -228793,6 +130758,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -228891,7 +130862,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -228935,11 +130906,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -228976,12 +130942,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -228997,6 +130978,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -229018,37 +131008,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -229090,7 +131055,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -229106,6 +131071,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -229309,24 +131289,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -229335,18 +131311,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -229356,12 +131332,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -229369,41 +131345,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -229506,6 +131470,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -229644,6 +131693,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -229686,6 +131750,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -229779,6 +131873,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -229943,8 +132100,8 @@ } ] }, - "vWBETH": { - "address": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", + "vUSDC": { + "address": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", "abi": [ { "inputs": [ @@ -230177,37 +132334,6 @@ "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -230347,31 +132473,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -231137,32 +133238,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -233227,11 +135302,62 @@ } ] }, - "vWBETH_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vUSDT": { + "address": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -233405,12 +135531,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -233422,35 +135542,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -233458,18 +135560,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -233478,36 +135580,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -233548,44 +135631,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -233625,42 +135670,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -233729,7 +135743,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -233773,6 +135787,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -233809,27 +135828,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -233845,15 +135849,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -233875,12 +135870,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -233922,7 +135942,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -233938,21 +135958,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -234155,32 +136160,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -234241,6 +136220,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -234337,91 +136358,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -234504,32 +136440,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -234560,21 +136470,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -234617,36 +136512,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -234740,69 +136605,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -234964,65 +136766,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vWBETH_Proxy": { - "address": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -235196,6 +136942,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -235227,6 +136979,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -235238,17 +136996,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -235256,18 +137014,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -235275,18 +137033,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -235327,6 +137085,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -235366,6 +137162,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -235464,7 +137266,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -235508,11 +137310,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -235549,12 +137346,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -235570,6 +137382,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -235591,37 +137412,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -235663,7 +137459,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -235679,6 +137475,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -235881,6 +137692,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -235941,48 +137778,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], @@ -236079,6 +137874,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -236217,6 +138097,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -236259,6 +138154,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -236352,6 +138277,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -236516,8 +138504,8 @@ } ] }, - "vXRP": { - "address": "0xB248a295732e0225acd3337607cc01068e3b9c10", + "vUST": { + "address": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", "abi": [ { "inputs": [ @@ -236750,6 +138738,37 @@ "name": "Mint", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + } + ], + "name": "MintBehalf", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -236889,6 +138908,31 @@ "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -237654,6 +139698,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -238156,73 +140226,11 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -238299,44 +140307,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -238376,12 +140346,6 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", @@ -238480,7 +140444,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -238580,7 +140544,7 @@ "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -238631,7 +140595,7 @@ "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -238673,7 +140637,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -238689,21 +140653,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -238906,32 +140855,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -239255,32 +141178,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -239311,21 +141208,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -239368,36 +141250,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -239491,69 +141343,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -239718,11 +141507,62 @@ } ] }, - "vXRP_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vWBETH": { + "address": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -239896,12 +141736,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -239933,12 +141767,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "MintBehalf", @@ -239950,17 +141778,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -239968,18 +141796,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -239987,18 +141815,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -240039,44 +141867,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -240116,12 +141906,6 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", @@ -240220,7 +142004,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -240264,6 +142048,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -240300,27 +142089,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -240336,15 +142110,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -240366,12 +142131,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -240413,7 +142203,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -240429,21 +142219,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -240646,32 +142421,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -240732,6 +142481,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -240828,91 +142619,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -241051,21 +142757,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -241108,36 +142799,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -241231,69 +142892,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -241455,65 +143053,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vXRP_Proxy": { - "address": "0xB248a295732e0225acd3337607cc01068e3b9c10", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -241687,6 +143229,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -241698,17 +143246,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -241716,18 +143282,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -241736,17 +143302,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -241787,6 +143372,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -241826,11 +143449,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -241899,7 +143553,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -241943,11 +143597,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -241984,12 +143633,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -242005,6 +143669,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -242026,37 +143699,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -242098,7 +143746,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -242114,6 +143762,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -242316,6 +143979,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -242376,48 +144065,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], @@ -242514,6 +144161,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -242596,6 +144328,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -242626,6 +144384,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -242668,6 +144441,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -242761,6 +144564,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -242925,8 +144791,8 @@ } ] }, - "vXVS": { - "address": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D", + "vXRP": { + "address": "0xB248a295732e0225acd3337607cc01068e3b9c10", "abi": [ { "inputs": [ @@ -246127,11 +147993,62 @@ } ] }, - "vXVS_Implementation": { - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", + "vXVS": { + "address": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -246305,12 +148222,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -246322,35 +148233,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -246358,18 +148251,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -246378,36 +148271,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -246448,44 +148322,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -246525,42 +148361,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -246629,7 +148434,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -246673,6 +148478,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -246709,27 +148519,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -246745,15 +148540,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -246775,12 +148561,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -246822,7 +148633,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -246838,21 +148649,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -247055,32 +148851,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -247141,6 +148911,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -247237,91 +149049,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -247404,32 +149131,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -247460,21 +149161,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -247517,36 +149203,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -247640,69 +149296,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -247864,65 +149457,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vXVS_Proxy": { - "address": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -248096,6 +149633,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -248107,17 +149650,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -248125,18 +149686,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -248145,17 +149706,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -248196,6 +149776,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -248235,11 +149853,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -248308,7 +149957,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -248352,11 +150001,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -248393,12 +150037,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -248414,6 +150073,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -248435,37 +150103,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -248507,7 +150150,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -248523,6 +150166,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -248726,24 +150384,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -248752,18 +150406,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -248773,12 +150427,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -248786,41 +150440,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -248923,6 +150565,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -249005,6 +150732,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -249035,6 +150788,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -249077,6 +150845,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -249170,6 +150968,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], diff --git a/deployments/bscmainnet/AAVE_Implementation.json b/deployments/bscmainnet/AAVE_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/AAVE_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/AAVE_Proxy.json b/deployments/bscmainnet/AAVE_Proxy.json deleted file mode 100644 index 365d8b851..000000000 --- a/deployments/bscmainnet/AAVE_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0xfb6115445Bff7b52FeB98650C87f44907E58f802", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/BETH_Implementation.json b/deployments/bscmainnet/BETH_Implementation.json deleted file mode 100644 index 500815087..000000000 --- a/deployments/bscmainnet/BETH_Implementation.json +++ /dev/null @@ -1,512 +0,0 @@ -{ - "address": "0x5c1ab3184b5cdf456f086e769dd66f19660376e2", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "BETH_RECEIVER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAW_OPERATOR", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "wBETH", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "wBETH_RECEIVER", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawBETH", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawWBETH", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/BETH_Proxy.json b/deployments/bscmainnet/BETH_Proxy.json deleted file mode 100644 index 4e3d04860..000000000 --- a/deployments/bscmainnet/BETH_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/DOGE_Implementation.json b/deployments/bscmainnet/DOGE_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/DOGE_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/DOGE_Proxy.json b/deployments/bscmainnet/DOGE_Proxy.json deleted file mode 100644 index d99ba7c37..000000000 --- a/deployments/bscmainnet/DOGE_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/FIL_Implementation.json b/deployments/bscmainnet/FIL_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/FIL_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/FIL_Proxy.json b/deployments/bscmainnet/FIL_Proxy.json deleted file mode 100644 index d798816fa..000000000 --- a/deployments/bscmainnet/FIL_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/LUNA_Implementation.json b/deployments/bscmainnet/LUNA_Implementation.json deleted file mode 100644 index 6a2e56793..000000000 --- a/deployments/bscmainnet/LUNA_Implementation.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "address": "0xb6f6d86a8f9879a9c87f643768d9efc38c1da6e7", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "initData", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/LUNA_Proxy.json b/deployments/bscmainnet/LUNA_Proxy.json deleted file mode 100644 index 0b05b57f0..000000000 --- a/deployments/bscmainnet/LUNA_Proxy.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "address": "0x156ab3346823B651294766e23e6Cf87254d68962", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "beacon", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/MATIC_Implementation.json b/deployments/bscmainnet/MATIC_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/MATIC_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/MATIC_Proxy.json b/deployments/bscmainnet/MATIC_Proxy.json deleted file mode 100644 index ace3e2531..000000000 --- a/deployments/bscmainnet/MATIC_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/TRXOLD_Implementation.json b/deployments/bscmainnet/TRXOLD_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/TRXOLD_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/TRXOLD_Proxy.json b/deployments/bscmainnet/TRXOLD_Proxy.json deleted file mode 100644 index d1d897a45..000000000 --- a/deployments/bscmainnet/TRXOLD_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/TUSDOLD_Implementation.json b/deployments/bscmainnet/TUSDOLD_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/TUSDOLD_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/TUSDOLD_Proxy.json b/deployments/bscmainnet/TUSDOLD_Proxy.json deleted file mode 100644 index 203dd57e0..000000000 --- a/deployments/bscmainnet/TUSDOLD_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0x14016E85a25aeb13065688cAFB43044C2ef86784", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/TUSD_Implementation.json b/deployments/bscmainnet/TUSD_Implementation.json deleted file mode 100644 index a7f40ad00..000000000 --- a/deployments/bscmainnet/TUSD_Implementation.json +++ /dev/null @@ -1,740 +0,0 @@ -{ - "address": "0x0d7adc70a18a5aef0bd6ecb098e1da0244c57711", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isBlacklisted", - "type": "bool" - } - ], - "name": "Blacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "burner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldFeed", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newFeed", - "type": "address" - } - ], - "name": "NewChainReserveFeed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldHeartbeat", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newHeartbeat", - "type": "uint256" - } - ], - "name": "NewChainReserveHeartbeat", - "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": [], - "name": "ProofOfReserveDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ProofOfReserveEnabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newMin", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMax", - "type": "uint256" - } - ], - "name": "SetBurnBounds", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "burnMax", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "burnMin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "canBurn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainReserveFeed", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainReserveHeartbeat", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claimOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disableProofOfReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "enableProofOfReserve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "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": "proofOfReserveEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_to", - "type": "address" - } - ], - "name": "reclaimEther", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IBEP20", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - } - ], - "name": "reclaimToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rounding", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bool", - "name": "_isBlacklisted", - "type": "bool" - } - ], - "name": "setBlacklisted", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_max", - "type": "uint256" - } - ], - "name": "setBurnBounds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bool", - "name": "_canBurn", - "type": "bool" - } - ], - "name": "setCanBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newFeed", - "type": "address" - } - ], - "name": "setChainReserveFeed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newHeartbeat", - "type": "uint256" - } - ], - "name": "setChainReserveHeartbeat", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/TUSD_Proxy.json b/deployments/bscmainnet/TUSD_Proxy.json deleted file mode 100644 index 388ff9061..000000000 --- a/deployments/bscmainnet/TUSD_Proxy.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "address": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "currentOwner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "pendingOwner", - "type": "address" - } - ], - "name": "NewPendingOwner", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "ProxyOwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "claimProxyOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "impl", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingProxyOwner", - "outputs": [ - { - "internalType": "address", - "name": "pendingOwner", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxyOwner", - "outputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferProxyOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/USDC_Implementation.json b/deployments/bscmainnet/USDC_Implementation.json deleted file mode 100644 index 8ca191fc5..000000000 --- a/deployments/bscmainnet/USDC_Implementation.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintable", - "type": "bool" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/USDC_Proxy.json b/deployments/bscmainnet/USDC_Proxy.json deleted file mode 100644 index 19dcac2d8..000000000 --- a/deployments/bscmainnet/USDC_Proxy.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "address": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "logic", - "type": "address" - }, - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/UST_Implementation.json b/deployments/bscmainnet/UST_Implementation.json deleted file mode 100644 index e57f17ff9..000000000 --- a/deployments/bscmainnet/UST_Implementation.json +++ /dev/null @@ -1,417 +0,0 @@ -{ - "address": "0xb6d7bbde7c46a8b784f4a19c7fda0de34b9577db", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "address", - "name": "spender_", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account_", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "chainId", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue_", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue_", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "uint64", - "name": "sequence_", - "type": "uint64" - }, - { - "internalType": "address", - "name": "owner_", - "type": "address" - }, - { - "internalType": "uint16", - "name": "chainId_", - "type": "uint16" - }, - { - "internalType": "bytes32", - "name": "nativeContract_", - "type": "bytes32" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nativeContract", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender_", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount_", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint64", - "name": "sequence_", - "type": "uint64" - } - ], - "name": "updateDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/UST_Proxy.json b/deployments/bscmainnet/UST_Proxy.json deleted file mode 100644 index 211ea9aaf..000000000 --- a/deployments/bscmainnet/UST_Proxy.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "address": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "beacon", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "beacon", - "type": "address" - } - ], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/WBETH_Implementation.json b/deployments/bscmainnet/WBETH_Implementation.json deleted file mode 100644 index 7aa6381a9..000000000 --- a/deployments/bscmainnet/WBETH_Implementation.json +++ /dev/null @@ -1,1658 +0,0 @@ -{ - "address": "0xfe928a7d8be9c8cece7e97f0ed5704f4fa2cb42a", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "AuthorizationCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "AuthorizationUsed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "Blacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newBlacklister", - "type": "address" - } - ], - "name": "BlacklisterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "burner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Burn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wBETHAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "referral", - "type": "address" - } - ], - "name": "DepositEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousReceiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newReceiver", - "type": "address" - } - ], - "name": "EthReceiverUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oracle", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newExchangeRate", - "type": "uint256" - } - ], - "name": "ExchangeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newMasterMinter", - "type": "address" - } - ], - "name": "MasterMinterChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minterAllowedAmount", - "type": "uint256" - } - ], - "name": "MinterConfigured", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldMinter", - "type": "address" - } - ], - "name": "MinterRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "ethReceiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "MovedToStakingAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "unwrapAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "MovedToUnwrapAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOperator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "OperatorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "OracleUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Pause", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "PauserChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "wbethAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "RequestWithdrawEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "RescuerChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "supplier", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethAmount", - "type": "uint256" - } - ], - "name": "SuppliedEth", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "UnBlacklisted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unpause", - "type": "event" - }, - { - "inputs": [], - "name": "CANCEL_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMIT_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_ETH_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_EXCHANGE_RATE_UNIT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_UNWRAP_ETH_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "approve", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - } - ], - "name": "authorizationState", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "blacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "blacklister", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authorizer", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "cancelAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minterAllowedAmount", - "type": "uint256" - } - ], - "name": "configureMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currency", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "decrement", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "referral", - "type": "address" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ethReceiver", - "outputs": [ - { - "internalType": "address", - "name": "_ethReceiver", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "exchangeRate", - "outputs": [ - { - "internalType": "uint256", - "name": "_exchangeRate", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "increment", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenCurrency", - "type": "string" - }, - { - "internalType": "uint8", - "name": "tokenDecimals", - "type": "uint8" - }, - { - "internalType": "address", - "name": "newMasterMinter", - "type": "address" - }, - { - "internalType": "address", - "name": "newPauser", - "type": "address" - }, - { - "internalType": "address", - "name": "newBlacklister", - "type": "address" - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newName", - "type": "string" - } - ], - "name": "initializeV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "lostAndFound", - "type": "address" - } - ], - "name": "initializeV2_1", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "isBlacklisted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "masterMinter", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "minterAllowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "moveToStakingAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "moveToUnwrapAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operator", - "outputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "oracle", - "outputs": [ - { - "internalType": "address", - "name": "_oracle", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pauser", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validAfter", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validBefore", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "receiveWithAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "minter", - "type": "address" - } - ], - "name": "removeMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wbethAmount", - "type": "uint256" - } - ], - "name": "requestWithdrawEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "tokenContract", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "rescueERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rescuer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "supplyEth", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validAfter", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validBefore", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "nonce", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "transferWithAuthorization", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "unBlacklist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newBlacklister", - "type": "address" - } - ], - "name": "updateBlacklister", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newEthReceiver", - "type": "address" - } - ], - "name": "updateEthReceiver", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newExchangeRate", - "type": "uint256" - } - ], - "name": "updateExchangeRate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newMasterMinter", - "type": "address" - } - ], - "name": "updateMasterMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "updateOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOracle", - "type": "address" - } - ], - "name": "updateOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newPauser", - "type": "address" - } - ], - "name": "updatePauser", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newRescuer", - "type": "address" - } - ], - "name": "updateRescuer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/WBETH_Proxy.json b/deployments/bscmainnet/WBETH_Proxy.json deleted file mode 100644 index 3da89059e..000000000 --- a/deployments/bscmainnet/WBETH_Proxy.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "address": "0xa2e3356610840701bdf5611a53974510ae27e2e1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "implementationContract", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vAAVE_Implementation.json b/deployments/bscmainnet/vAAVE_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vAAVE_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vAAVE_Proxy.json b/deployments/bscmainnet/vAAVE_Proxy.json deleted file mode 100644 index c3efcaeb2..000000000 --- a/deployments/bscmainnet/vAAVE_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x26DA28954763B92139ED49283625ceCAf52C6f94", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vADA_Implementation.json b/deployments/bscmainnet/vADA_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vADA_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vADA_Proxy.json b/deployments/bscmainnet/vADA_Proxy.json deleted file mode 100644 index e2f18ea8f..000000000 --- a/deployments/bscmainnet/vADA_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBCH_Implementation.json b/deployments/bscmainnet/vBCH_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vBCH_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBCH_Proxy.json b/deployments/bscmainnet/vBCH_Proxy.json deleted file mode 100644 index cf97735b7..000000000 --- a/deployments/bscmainnet/vBCH_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBETH_Implementation.json b/deployments/bscmainnet/vBETH_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vBETH_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBETH_Proxy.json b/deployments/bscmainnet/vBETH_Proxy.json deleted file mode 100644 index 77d6cb680..000000000 --- a/deployments/bscmainnet/vBETH_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBTC_Implementation.json b/deployments/bscmainnet/vBTC_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vBTC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBTC_Proxy.json b/deployments/bscmainnet/vBTC_Proxy.json deleted file mode 100644 index b4a757755..000000000 --- a/deployments/bscmainnet/vBTC_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBUSD_Implementation.json b/deployments/bscmainnet/vBUSD_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vBUSD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vBUSD_Proxy.json b/deployments/bscmainnet/vBUSD_Proxy.json deleted file mode 100644 index 788603a54..000000000 --- a/deployments/bscmainnet/vBUSD_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vCAKE_Implementation.json b/deployments/bscmainnet/vCAKE_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vCAKE_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vCAKE_Proxy.json b/deployments/bscmainnet/vCAKE_Proxy.json deleted file mode 100644 index 1531f1040..000000000 --- a/deployments/bscmainnet/vCAKE_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vDAI_Implementation.json b/deployments/bscmainnet/vDAI_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vDAI_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vDAI_Proxy.json b/deployments/bscmainnet/vDAI_Proxy.json deleted file mode 100644 index f62896124..000000000 --- a/deployments/bscmainnet/vDAI_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vDOGE_Implementation.json b/deployments/bscmainnet/vDOGE_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vDOGE_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vDOGE_Proxy.json b/deployments/bscmainnet/vDOGE_Proxy.json deleted file mode 100644 index d9289a047..000000000 --- a/deployments/bscmainnet/vDOGE_Proxy.json +++ /dev/null @@ -1,1493 +0,0 @@ -{ - "address": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vDOT_Implementation.json b/deployments/bscmainnet/vDOT_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vDOT_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vDOT_Proxy.json b/deployments/bscmainnet/vDOT_Proxy.json deleted file mode 100644 index 7d3d1744e..000000000 --- a/deployments/bscmainnet/vDOT_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x1610bc33319e9398de5f57B33a5b184c806aD217", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vETH_Implementation.json b/deployments/bscmainnet/vETH_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vETH_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vETH_Proxy.json b/deployments/bscmainnet/vETH_Proxy.json deleted file mode 100644 index ff46e0049..000000000 --- a/deployments/bscmainnet/vETH_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vFDUSD_Implementation.json b/deployments/bscmainnet/vFDUSD_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vFDUSD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vFDUSD_Proxy.json b/deployments/bscmainnet/vFDUSD_Proxy.json deleted file mode 100644 index e54400ca0..000000000 --- a/deployments/bscmainnet/vFDUSD_Proxy.json +++ /dev/null @@ -1,1685 +0,0 @@ -{ - "address": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vFIL_Implementation.json b/deployments/bscmainnet/vFIL_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vFIL_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vFIL_Proxy.json b/deployments/bscmainnet/vFIL_Proxy.json deleted file mode 100644 index c967c8b32..000000000 --- a/deployments/bscmainnet/vFIL_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vLINK_Implementation.json b/deployments/bscmainnet/vLINK_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vLINK_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vLINK_Proxy.json b/deployments/bscmainnet/vLINK_Proxy.json deleted file mode 100644 index 4c1adbf80..000000000 --- a/deployments/bscmainnet/vLINK_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vLTC_Implementation.json b/deployments/bscmainnet/vLTC_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vLTC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vLTC_Proxy.json b/deployments/bscmainnet/vLTC_Proxy.json deleted file mode 100644 index 8e8500786..000000000 --- a/deployments/bscmainnet/vLTC_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vLUNA_Implementation.json b/deployments/bscmainnet/vLUNA_Implementation.json deleted file mode 100644 index cff2f8f1c..000000000 --- a/deployments/bscmainnet/vLUNA_Implementation.json +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "address": "0xa43845cc2c0f74dace13f4adebdcc178eba49980", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vLUNA_Proxy.json b/deployments/bscmainnet/vLUNA_Proxy.json deleted file mode 100644 index 55c3876e3..000000000 --- a/deployments/bscmainnet/vLUNA_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vMATIC_Implementation.json b/deployments/bscmainnet/vMATIC_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vMATIC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vMATIC_Proxy.json b/deployments/bscmainnet/vMATIC_Proxy.json deleted file mode 100644 index ec75f5ceb..000000000 --- a/deployments/bscmainnet/vMATIC_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vSXP_Implementation.json b/deployments/bscmainnet/vSXP_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vSXP_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vSXP_Proxy.json b/deployments/bscmainnet/vSXP_Proxy.json deleted file mode 100644 index 10cd20609..000000000 --- a/deployments/bscmainnet/vSXP_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTRXOLD_Implementation.json b/deployments/bscmainnet/vTRXOLD_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vTRXOLD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTRXOLD_Proxy.json b/deployments/bscmainnet/vTRXOLD_Proxy.json deleted file mode 100644 index 80cb294f6..000000000 --- a/deployments/bscmainnet/vTRXOLD_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTRX_Implementation.json b/deployments/bscmainnet/vTRX_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vTRX_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTRX_Proxy.json b/deployments/bscmainnet/vTRX_Proxy.json deleted file mode 100644 index 45f81beaf..000000000 --- a/deployments/bscmainnet/vTRX_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTUSDOLD_Implementation.json b/deployments/bscmainnet/vTUSDOLD_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vTUSDOLD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTUSDOLD_Proxy.json b/deployments/bscmainnet/vTUSDOLD_Proxy.json deleted file mode 100644 index 9698ed96c..000000000 --- a/deployments/bscmainnet/vTUSDOLD_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTUSD_Implementation.json b/deployments/bscmainnet/vTUSD_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vTUSD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vTUSD_Proxy.json b/deployments/bscmainnet/vTUSD_Proxy.json deleted file mode 100644 index ad3277ca7..000000000 --- a/deployments/bscmainnet/vTUSD_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vUSDC_Implementation.json b/deployments/bscmainnet/vUSDC_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vUSDC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vUSDC_Proxy.json b/deployments/bscmainnet/vUSDC_Proxy.json deleted file mode 100644 index de132788f..000000000 --- a/deployments/bscmainnet/vUSDC_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vUSDT_Implementation.json b/deployments/bscmainnet/vUSDT_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vUSDT_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vUSDT_Proxy.json b/deployments/bscmainnet/vUSDT_Proxy.json deleted file mode 100644 index 59e337055..000000000 --- a/deployments/bscmainnet/vUSDT_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vUST_Implementation.json b/deployments/bscmainnet/vUST_Implementation.json deleted file mode 100644 index cff2f8f1c..000000000 --- a/deployments/bscmainnet/vUST_Implementation.json +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "address": "0xa43845cc2c0f74dace13f4adebdcc178eba49980", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vUST_Proxy.json b/deployments/bscmainnet/vUST_Proxy.json deleted file mode 100644 index 71c61b82b..000000000 --- a/deployments/bscmainnet/vUST_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vWBETH_Implementation.json b/deployments/bscmainnet/vWBETH_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vWBETH_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vWBETH_Proxy.json b/deployments/bscmainnet/vWBETH_Proxy.json deleted file mode 100644 index 7ccd7bcb2..000000000 --- a/deployments/bscmainnet/vWBETH_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vXRP_Implementation.json b/deployments/bscmainnet/vXRP_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vXRP_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vXRP_Proxy.json b/deployments/bscmainnet/vXRP_Proxy.json deleted file mode 100644 index 745301a40..000000000 --- a/deployments/bscmainnet/vXRP_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xB248a295732e0225acd3337607cc01068e3b9c10", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vXVS_Implementation.json b/deployments/bscmainnet/vXVS_Implementation.json deleted file mode 100644 index fdc772ccc..000000000 --- a/deployments/bscmainnet/vXVS_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet/vXVS_Proxy.json b/deployments/bscmainnet/vXVS_Proxy.json deleted file mode 100644 index ecb37c33e..000000000 --- a/deployments/bscmainnet/vXVS_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 1c0064109..c2d1c713d 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -126,89 +126,33 @@ "XVSVestingProxy_Proxy": "0xb28Dec7C7Ac80f4D0B6a1B711c39e444cDE8B2cE", "pancakeFactory": "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73", "vAAVE": "0x26DA28954763B92139ED49283625ceCAf52C6f94", - "vAAVE_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vAAVE_Proxy": "0x26DA28954763B92139ED49283625ceCAf52C6f94", "vADA": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", - "vADA_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vADA_Proxy": "0x9A0AF7FDb2065Ce470D72664DE73cAE409dA28Ec", "vBCH": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", - "vBCH_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vBCH_Proxy": "0x5F0388EBc2B94FA8E123F404b79cCF5f40b29176", "vBETH": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", - "vBETH_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vBETH_Proxy": "0x972207A639CC1B374B893cc33Fa251b55CEB7c07", "vBNB": "0xA07c5b74C9B40447a954e1466938b865b6BBea36", "vBTC": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", - "vBTC_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vBTC_Proxy": "0x882C173bC7Ff3b7786CA16dfeD3DFFfb9Ee7847B", "vBUSD": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", - "vBUSD_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vBUSD_Proxy": "0x95c78222B3D6e262426483D42CfA53685A67Ab9D", "vCAKE": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", - "vCAKE_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vCAKE_Proxy": "0x86aC3974e2BD0d60825230fa6F355fF11409df5c", "vDAI": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", - "vDAI_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vDAI_Proxy": "0x334b3eCB4DCa3593BCCC3c7EBD1A1C1d1780FBF1", "vDOGE": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", - "vDOGE_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vDOGE_Proxy": "0xec3422Ef92B2fb59e84c8B02Ba73F1fE84Ed8D71", "vDOT": "0x1610bc33319e9398de5f57B33a5b184c806aD217", - "vDOT_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vDOT_Proxy": "0x1610bc33319e9398de5f57B33a5b184c806aD217", "vETH": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", - "vETH_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vETH_Proxy": "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", "vFDUSD": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", - "vFDUSD_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vFDUSD_Proxy": "0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba", "vFIL": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", - "vFIL_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vFIL_Proxy": "0xf91d58b5aE142DAcC749f58A49FCBac340Cb0343", "vLINK": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", - "vLINK_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vLINK_Proxy": "0x650b940a1033B8A1b1873f78730FcFC73ec11f1f", "vLTC": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", - "vLTC_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vLTC_Proxy": "0x57A5297F2cB2c0AaC9D554660acd6D385Ab50c6B", "vLUNA": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", - "vLUNA_Implementation": "0xa43845cc2c0f74dace13f4adebdcc178eba49980", - "vLUNA_Proxy": "0xb91A659E88B51474767CD97EF3196A3e7cEDD2c8", "vMATIC": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", - "vMATIC_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vMATIC_Proxy": "0x5c9476FcD6a4F9a3654139721c949c2233bBbBc8", "vSXP": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", - "vSXP_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vSXP_Proxy": "0x2fF3d0F6990a40261c66E1ff2017aCBc282EB6d0", "vTRX": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", "vTRXOLD": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", - "vTRXOLD_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vTRXOLD_Proxy": "0x61eDcFe8Dd6bA3c891CB9bEc2dc7657B3B422E93", - "vTRX_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vTRX_Proxy": "0xC5D3466aA484B040eE977073fcF337f2c00071c1", "vTUSD": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", "vTUSDOLD": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", - "vTUSDOLD_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vTUSDOLD_Proxy": "0x08CEB3F4a7ed3500cA0982bcd0FC7816688084c3", - "vTUSD_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vTUSD_Proxy": "0xBf762cd5991cA1DCdDaC9ae5C638F5B5Dc3Bee6E", "vUSDC": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", - "vUSDC_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vUSDC_Proxy": "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", "vUSDT": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", - "vUSDT_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vUSDT_Proxy": "0xfD5840Cd36d94D7229439859C0112a4185BC0255", "vUST": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", - "vUST_Implementation": "0xa43845cc2c0f74dace13f4adebdcc178eba49980", - "vUST_Proxy": "0x78366446547D062f45b4C0f320cDaa6d710D87bb", "vWBETH": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", - "vWBETH_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vWBETH_Proxy": "0x6CFdEc747f37DAf3b87a35a1D9c8AD3063A1A8A0", "vXRP": "0xB248a295732e0225acd3337607cc01068e3b9c10", - "vXRP_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vXRP_Proxy": "0xB248a295732e0225acd3337607cc01068e3b9c10", - "vXVS": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D", - "vXVS_Implementation": "0xc3279442a5acacf0a2ecb015d1cddbb3e0f3f775", - "vXVS_Proxy": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D" + "vXVS": "0x151B1e2635A717bcDc836ECd6FbB62B674FE3E1D" } } diff --git a/deployments/bsctestnet.json b/deployments/bsctestnet.json index 24eba09e1..209d408e7 100644 --- a/deployments/bsctestnet.json +++ b/deployments/bsctestnet.json @@ -60393,11 +60393,62 @@ } ] }, - "vBTC_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", + "vBUSD": { + "address": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -60571,12 +60622,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -60588,35 +60633,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -60624,18 +60651,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -60644,36 +60671,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -60714,44 +60722,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -60791,42 +60761,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -60895,7 +60834,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -60939,6 +60878,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -60975,27 +60919,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -61011,15 +60940,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -61041,12 +60961,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -61088,7 +61033,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -61104,21 +61049,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -61321,32 +61251,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -61407,6 +61311,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -61503,91 +61449,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -61670,32 +61531,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -61726,21 +61561,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -61783,36 +61603,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -61906,69 +61696,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -62130,65 +61857,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vBTC_Proxy": { - "address": "0xb6e9322C49FD75a367Fcb17B0Fcd62C5070EbCBe", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -62362,6 +62033,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -62373,17 +62050,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -62391,18 +62086,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -62411,17 +62106,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -62462,6 +62176,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -62501,11 +62253,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -62574,7 +62357,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -62618,11 +62401,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -62659,12 +62437,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -62680,6 +62473,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -62701,37 +62503,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -62773,7 +62550,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -62789,6 +62566,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -62992,24 +62784,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -63018,18 +62806,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -63039,12 +62827,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -63052,41 +62840,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -63189,6 +62965,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -63271,6 +63132,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -63301,6 +63188,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -63343,6 +63245,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -63436,6 +63368,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -63600,8 +63595,8 @@ } ] }, - "vBUSD": { - "address": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", + "vETH": { + "address": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", "abi": [ { "inputs": [ @@ -66802,11 +66797,62 @@ } ] }, - "vBUSD_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", + "vFDUSD": { + "address": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -67085,6 +67131,25 @@ "name": "NewComptroller", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -67348,6 +67413,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -67384,27 +67454,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -67420,15 +67475,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -67450,12 +67496,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -67497,7 +67568,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -67730,32 +67801,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -67816,6 +67861,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -67912,91 +67999,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -68315,69 +68317,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -68539,65 +68478,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vBUSD_Proxy": { - "address": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -68771,6 +68654,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -68782,17 +68671,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -68800,18 +68707,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -68820,17 +68727,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -68871,6 +68797,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -68910,11 +68874,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -68983,7 +68978,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -69027,11 +69022,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -69068,12 +69058,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -69089,6 +69094,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -69110,37 +69124,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -69182,7 +69171,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -69198,6 +69187,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -69401,24 +69405,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -69427,18 +69427,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -69448,12 +69448,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -69461,41 +69461,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -69598,6 +69586,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -69680,6 +69753,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -69710,6 +69809,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -69731,6 +69845,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeemBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -69752,6 +69892,62 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlyingBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -69845,6 +70041,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -70009,8 +70268,8 @@ } ] }, - "vETH": { - "address": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", + "vLTC": { + "address": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", "abi": [ { "inputs": [ @@ -73211,11 +73470,62 @@ } ] }, - "vETH_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", + "vSXP": { + "address": "0x74469281310195A04840Daf6EdF576F559a3dE80", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -73389,73 +73699,11 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -73499,18 +73747,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewMarketInterestRateModel", + "name": "NewImplementation", "type": "event" }, { @@ -73518,56 +73766,37 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", "type": "address" } ], - "name": "NewPendingAdmin", + "name": "NewMarketInterestRateModel", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "oldProtocolShareReserve", + "name": "oldPendingAdmin", "type": "address" }, { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "newProtocolShareReserve", + "name": "newPendingAdmin", "type": "address" } ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", + "name": "NewPendingAdmin", "type": "event" }, { @@ -73609,42 +73838,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -73713,7 +73911,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -73757,6 +73955,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -73793,27 +73996,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -73829,15 +74017,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -73859,12 +74038,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -73906,7 +74110,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -73922,21 +74126,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -74139,32 +74328,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -74225,6 +74388,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -74321,91 +74526,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -74488,32 +74608,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -74544,21 +74638,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -74601,36 +74680,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -74724,69 +74773,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -74948,65 +74934,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vETH_Proxy": { - "address": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -75180,6 +75110,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -75191,17 +75127,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -75209,18 +75163,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -75229,17 +75183,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -75280,6 +75253,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -75319,11 +75330,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -75392,7 +75434,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -75436,11 +75478,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -75477,12 +75514,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -75498,6 +75550,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -75519,37 +75580,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -75591,7 +75627,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -75607,6 +75643,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -75810,24 +75861,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -75836,18 +75883,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -75857,12 +75904,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -75870,41 +75917,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -76005,42394 +76040,91 @@ ], "payable": false, "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFDUSD": { - "address": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeemBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlyingBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFDUSD_Implementation": { - "address": "0xdb1869ca9e008e102350f2e0c356500503a4d043", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeemBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlyingBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vFDUSD_Proxy": { - "address": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vLTC": { - "address": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vLTC_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vLTC_Proxy": { - "address": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vSXP": { - "address": "0x74469281310195A04840Daf6EdF576F559a3dE80", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vSXP_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vSXP_Proxy": { - "address": "0x74469281310195A04840Daf6EdF576F559a3dE80", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vTRX": { - "address": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vTRX_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vTRX_Proxy": { - "address": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vTUSD": { - "address": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vTUSD_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vTUSD_Proxy": { - "address": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vUSDC": { - "address": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vUSDC_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vUSDC_Proxy": { - "address": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ] - }, - "vUSDT": { - "address": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { @@ -118940,11 +76672,62 @@ } ] }, - "vUSDT_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", + "vTRX": { + "address": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -119118,12 +76901,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -119155,12 +76932,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "MintBehalf", @@ -119172,17 +76943,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -119190,18 +76961,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -119209,18 +76980,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -119261,44 +77032,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -119338,12 +77071,6 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", @@ -119442,7 +77169,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -119486,6 +77213,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -119522,27 +77254,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -119558,15 +77275,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -119588,12 +77296,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -119635,7 +77368,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -119651,21 +77384,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -119868,32 +77586,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -119954,6 +77646,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -120050,91 +77784,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -120273,21 +77922,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -120330,36 +77964,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -120453,69 +78057,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -120677,65 +78218,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vUSDT_Proxy": { - "address": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -120909,6 +78394,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -120920,17 +78411,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -120938,18 +78447,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -120958,17 +78467,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -121009,6 +78537,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -121048,11 +78614,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -121121,7 +78718,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -121165,11 +78762,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -121206,12 +78798,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -121227,6 +78834,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -121248,37 +78864,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -121320,7 +78911,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -121336,6 +78927,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -121539,24 +79145,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -121565,18 +79167,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -121586,12 +79188,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -121599,41 +79201,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -121736,6 +79326,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -121818,6 +79493,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -121848,6 +79549,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -121890,6 +79606,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -121983,6 +79729,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -122147,8 +79956,8 @@ } ] }, - "vWBETH": { - "address": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", + "vTUSD": { + "address": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", "abi": [ { "inputs": [ @@ -123869,6 +81678,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -123900,11 +81715,36 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -123981,6 +81821,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -124020,6 +81898,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -124118,7 +82002,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -124218,7 +82102,7 @@ "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -124269,7 +82153,7 @@ "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -124311,7 +82195,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -124327,6 +82211,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -124529,6 +82428,32 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -124908,6 +82833,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -124950,6 +82890,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -125043,6 +83013,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -125207,11 +83240,62 @@ } ] }, - "vWBETH_Implementation": { - "address": "0xc01902dbf72c2ccbfebadb9b7a9e23577893d3a3", + "vUSDC": { + "address": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -125396,29 +83480,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -125426,18 +83498,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -125445,18 +83517,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -125541,31 +83613,6 @@ "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -125678,6 +83725,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -125714,21 +83766,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -125750,15 +83787,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -125780,6 +83808,31 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -126105,6 +84158,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -126201,91 +84296,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -126368,32 +84378,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -126720,65 +84704,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vWBETH_Proxy": { - "address": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -126952,6 +84880,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -126983,6 +84917,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "MintBehalf", @@ -126994,17 +84934,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewAdmin", + "name": "NewAccessControlManager", "type": "event" }, { @@ -127012,18 +84952,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -127031,18 +84971,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -127083,6 +85023,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -127122,6 +85100,12 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", @@ -127220,7 +85204,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -127264,11 +85248,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -127305,12 +85284,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -127326,6 +85320,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -127347,37 +85350,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -127419,7 +85397,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -127435,6 +85413,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -127638,24 +85631,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -127664,18 +85653,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -127685,12 +85674,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -127698,41 +85687,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -127835,6 +85812,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -127973,6 +86035,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -128015,6 +86092,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -128108,6 +86215,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -128272,8 +86442,8 @@ } ] }, - "vXRP": { - "address": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", + "vUSDT": { + "address": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", "abi": [ { "inputs": [ @@ -131474,11 +89644,62 @@ } ] }, - "vXRP_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", + "vWBETH": { + "address": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -131652,12 +89873,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -131689,12 +89904,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "MintBehalf", @@ -131706,17 +89915,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAccessControlAddress", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAccessControlAddress", + "name": "newAdmin", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewAdmin", "type": "event" }, { @@ -131724,18 +89933,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAdmin", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAdmin", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAdmin", + "name": "NewComptroller", "type": "event" }, { @@ -131743,18 +89952,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldImplementation", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -131795,44 +90004,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -131872,12 +90043,6 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", @@ -131976,7 +90141,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -132020,6 +90185,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -132056,27 +90226,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -132092,15 +90247,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -132122,12 +90268,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -132169,7 +90340,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -132185,21 +90356,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -132402,32 +90558,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -132488,6 +90618,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -132584,91 +90756,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -132807,21 +90894,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -132864,36 +90936,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -132987,69 +91029,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -133211,65 +91190,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vXRP_Proxy": { - "address": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -133454,17 +91377,29 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -133472,18 +91407,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAdmin", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAdmin", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAdmin", "type": "event" }, { @@ -133491,18 +91426,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldImplementation", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newImplementation", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewImplementation", + "name": "NewComptroller", "type": "event" }, { @@ -133587,6 +91522,31 @@ "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -133699,11 +91659,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -133740,6 +91695,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -133761,6 +91731,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -133782,31 +91761,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -134132,48 +92086,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [], @@ -134270,6 +92182,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -134352,6 +92349,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -134681,8 +92704,8 @@ } ] }, - "vXVS": { - "address": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E", + "vXRP": { + "address": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", "abi": [ { "inputs": [ @@ -137883,11 +95906,62 @@ } ] }, - "vXVS_Implementation": { - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", + "vXVS": { + "address": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address payable", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -138061,12 +96135,6 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Mint", @@ -138078,35 +96146,17 @@ { "indexed": false, "internalType": "address", - "name": "payer", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "receiver", + "name": "newAdmin", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], - "name": "MintBehalf", + "name": "NewAdmin", "type": "event" }, { @@ -138114,18 +96164,18 @@ "inputs": [ { "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", "type": "address" } ], - "name": "NewAccessControlManager", + "name": "NewComptroller", "type": "event" }, { @@ -138134,36 +96184,17 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "oldImplementation", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "name": "newImplementation", "type": "address" } ], - "name": "NewComptroller", + "name": "NewImplementation", "type": "event" }, { @@ -138204,44 +96235,6 @@ "name": "NewPendingAdmin", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -138281,42 +96274,11 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" } ], "name": "Redeem", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -138385,7 +96347,7 @@ { "indexed": false, "internalType": "address", - "name": "protocolShareReserve", + "name": "admin", "type": "address" }, { @@ -138429,6 +96391,11 @@ "name": "Transfer", "type": "event" }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, { "constant": false, "inputs": [], @@ -138465,27 +96432,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount_", + "name": "reduceAmount", "type": "uint256" } ], @@ -138501,15 +96453,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ @@ -138531,12 +96474,37 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowResign", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "becomeImplementationData", + "type": "bytes" + } + ], + "name": "_setImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", + "name": "newInterestRateModel", "type": "address" } ], @@ -138578,7 +96546,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa_", + "name": "newReserveFactorMantissa", "type": "uint256" } ], @@ -138594,21 +96562,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": true, "inputs": [], @@ -138811,32 +96764,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -138897,6 +96824,48 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "delegateToViewImplementation", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [], @@ -138993,91 +96962,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -139160,32 +97044,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -139216,21 +97074,6 @@ "stateMutability": "view", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -139273,36 +97116,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, { "constant": false, "inputs": [ @@ -139396,69 +97209,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": true, "inputs": [], @@ -139620,65 +97370,9 @@ "payable": false, "stateMutability": "view", "type": "function" - } - ] - }, - "vXVS_Proxy": { - "address": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E", - "abi": [ + }, { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], + "inputs": [], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -139852,6 +97546,12 @@ "internalType": "uint256", "name": "mintTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Mint", @@ -139863,17 +97563,35 @@ { "indexed": false, "internalType": "address", - "name": "oldAdmin", + "name": "payer", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newAdmin", + "name": "receiver", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], - "name": "NewAdmin", + "name": "MintBehalf", "type": "event" }, { @@ -139881,18 +97599,18 @@ "inputs": [ { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", + "internalType": "address", + "name": "oldAccessControlAddress", "type": "address" }, { "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", + "internalType": "address", + "name": "newAccessControlAddress", "type": "address" } ], - "name": "NewComptroller", + "name": "NewAccessControlManager", "type": "event" }, { @@ -139901,17 +97619,36 @@ { "indexed": false, "internalType": "address", - "name": "oldImplementation", + "name": "oldAdmin", "type": "address" }, { "indexed": false, "internalType": "address", - "name": "newImplementation", + "name": "newAdmin", "type": "address" } ], - "name": "NewImplementation", + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", "type": "event" }, { @@ -139952,6 +97689,44 @@ "name": "NewPendingAdmin", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -139991,11 +97766,42 @@ "internalType": "uint256", "name": "redeemTokens", "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSupply", + "type": "uint256" } ], "name": "Redeem", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "RedeemFee", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -140064,7 +97870,7 @@ { "indexed": false, "internalType": "address", - "name": "admin", + "name": "protocolShareReserve", "type": "address" }, { @@ -140108,11 +97914,6 @@ "name": "Transfer", "type": "event" }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, { "constant": false, "inputs": [], @@ -140149,12 +97950,27 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "_becomeImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ { "internalType": "uint256", - "name": "reduceAmount", + "name": "reduceAmount_", "type": "uint256" } ], @@ -140170,6 +97986,15 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [], + "name": "_resignImplementation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": false, "inputs": [ @@ -140191,37 +98016,12 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, { "constant": false, "inputs": [ { "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", + "name": "newInterestRateModel_", "type": "address" } ], @@ -140263,7 +98063,7 @@ "inputs": [ { "internalType": "uint256", - "name": "newReserveFactorMantissa", + "name": "newReserveFactorMantissa_", "type": "uint256" } ], @@ -140279,6 +98079,21 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": true, "inputs": [], @@ -140482,24 +98297,20 @@ "type": "function" }, { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "borrowAmount", "type": "uint256" } ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", + "name": "borrowBehalf", "outputs": [ { "internalType": "uint256", @@ -140508,18 +98319,18 @@ } ], "payable": false, - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], - "name": "comptroller", + "name": "borrowIndex", "outputs": [ { - "internalType": "contract ComptrollerInterface", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "payable": false, @@ -140529,12 +98340,12 @@ { "constant": true, "inputs": [], - "name": "decimals", + "name": "borrowRatePerBlock", "outputs": [ { - "internalType": "uint8", + "internalType": "uint256", "name": "", - "type": "uint8" + "type": "uint256" } ], "payable": false, @@ -140542,41 +98353,29 @@ "type": "function" }, { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", + "constant": true, + "inputs": [], + "name": "comptroller", "outputs": [ { - "internalType": "bytes", + "internalType": "contract ComptrollerInterface", "name": "", - "type": "bytes" + "type": "address" } ], "payable": false, - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], "payable": false, @@ -140679,6 +98478,91 @@ "stateMutability": "view", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + } + ], + "name": "initialize", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -140761,6 +98645,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], @@ -140791,6 +98701,21 @@ "stateMutability": "view", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -140833,6 +98758,36 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, { "constant": false, "inputs": [ @@ -140926,6 +98881,69 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlManagerAddress", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address payable", + "name": "protcolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "newReduceReservesBlockDelta_", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, { "constant": true, "inputs": [], diff --git a/deployments/bsctestnet/vBTC_Implementation.json b/deployments/bsctestnet/vBTC_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vBTC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vBTC_Proxy.json b/deployments/bsctestnet/vBTC_Proxy.json deleted file mode 100644 index 4518661fa..000000000 --- a/deployments/bsctestnet/vBTC_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xb6e9322C49FD75a367Fcb17B0Fcd62C5070EbCBe", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vBUSD_Implementation.json b/deployments/bsctestnet/vBUSD_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vBUSD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vBUSD_Proxy.json b/deployments/bsctestnet/vBUSD_Proxy.json deleted file mode 100644 index a0df8fdf1..000000000 --- a/deployments/bsctestnet/vBUSD_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vETH_Implementation.json b/deployments/bsctestnet/vETH_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vETH_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vETH_Proxy.json b/deployments/bsctestnet/vETH_Proxy.json deleted file mode 100644 index 2ae82a6ca..000000000 --- a/deployments/bsctestnet/vETH_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vFDUSD_Implementation.json b/deployments/bsctestnet/vFDUSD_Implementation.json deleted file mode 100644 index 10f4f236a..000000000 --- a/deployments/bsctestnet/vFDUSD_Implementation.json +++ /dev/null @@ -1,1793 +0,0 @@ -{ - "address": "0xdb1869ca9e008e102350f2e0c356500503a4d043", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeemBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlyingBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vFDUSD_Proxy.json b/deployments/bsctestnet/vFDUSD_Proxy.json deleted file mode 100644 index e8e2dbf48..000000000 --- a/deployments/bsctestnet/vFDUSD_Proxy.json +++ /dev/null @@ -1,1685 +0,0 @@ -{ - "address": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vLTC_Implementation.json b/deployments/bsctestnet/vLTC_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vLTC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vLTC_Proxy.json b/deployments/bsctestnet/vLTC_Proxy.json deleted file mode 100644 index 3c5d027a6..000000000 --- a/deployments/bsctestnet/vLTC_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vSXP_Implementation.json b/deployments/bsctestnet/vSXP_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vSXP_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vSXP_Proxy.json b/deployments/bsctestnet/vSXP_Proxy.json deleted file mode 100644 index 7dc1848d1..000000000 --- a/deployments/bsctestnet/vSXP_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x74469281310195A04840Daf6EdF576F559a3dE80", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vTRX_Implementation.json b/deployments/bsctestnet/vTRX_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vTRX_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vTRX_Proxy.json b/deployments/bsctestnet/vTRX_Proxy.json deleted file mode 100644 index eb9e332a4..000000000 --- a/deployments/bsctestnet/vTRX_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vTUSD_Implementation.json b/deployments/bsctestnet/vTUSD_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vTUSD_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vTUSD_Proxy.json b/deployments/bsctestnet/vTUSD_Proxy.json deleted file mode 100644 index 5f24862c4..000000000 --- a/deployments/bsctestnet/vTUSD_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vUSDC_Implementation.json b/deployments/bsctestnet/vUSDC_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vUSDC_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vUSDC_Proxy.json b/deployments/bsctestnet/vUSDC_Proxy.json deleted file mode 100644 index 4dd34ece0..000000000 --- a/deployments/bsctestnet/vUSDC_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vUSDT_Implementation.json b/deployments/bsctestnet/vUSDT_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vUSDT_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vUSDT_Proxy.json b/deployments/bsctestnet/vUSDT_Proxy.json deleted file mode 100644 index 545bf80f1..000000000 --- a/deployments/bsctestnet/vUSDT_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vWBETH_Implementation.json b/deployments/bsctestnet/vWBETH_Implementation.json deleted file mode 100644 index 909530d15..000000000 --- a/deployments/bsctestnet/vWBETH_Implementation.json +++ /dev/null @@ -1,1517 +0,0 @@ -{ - "address": "0xc01902dbf72c2ccbfebadb9b7a9e23577893d3a3", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vWBETH_Proxy.json b/deployments/bsctestnet/vWBETH_Proxy.json deleted file mode 100644 index 24185fc85..000000000 --- a/deployments/bsctestnet/vWBETH_Proxy.json +++ /dev/null @@ -1,1550 +0,0 @@ -{ - "address": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vXRP_Implementation.json b/deployments/bsctestnet/vXRP_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vXRP_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vXRP_Proxy.json b/deployments/bsctestnet/vXRP_Proxy.json deleted file mode 100644 index c91f15be9..000000000 --- a/deployments/bsctestnet/vXRP_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vXVS_Implementation.json b/deployments/bsctestnet/vXVS_Implementation.json deleted file mode 100644 index 3e3755970..000000000 --- a/deployments/bsctestnet/vXVS_Implementation.json +++ /dev/null @@ -1,1741 +0,0 @@ -{ - "address": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "abi": [ - { - "inputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "MintBehalf", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAccessControlAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAccessControlAddress", - "type": "address" - } - ], - "name": "NewAccessControlManager", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldProtocolShareReserve", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newProtocolShareReserve", - "type": "address" - } - ], - "name": "NewProtocolShareReserve", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReduceReservesBlockDelta", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReduceReservesBlockDelta", - "type": "uint256" - } - ], - "name": "NewReduceReservesBlockDelta", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSupply", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "feeAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "RedeemFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "protocolShareReserve", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "_becomeImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount_", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "_resignImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel_", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa_", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accessControlManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mintBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "protocolShareReserve", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reduceReservesBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newAccessControlManagerAddress", - "type": "address" - } - ], - "name": "setAccessControlManager", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "protcolShareReserve_", - "type": "address" - } - ], - "name": "setProtocolShareReserve", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReduceReservesBlockDelta_", - "type": "uint256" - } - ], - "name": "setReduceReservesBlockDelta", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet/vXVS_Proxy.json b/deployments/bsctestnet/vXVS_Proxy.json deleted file mode 100644 index 46fcaa362..000000000 --- a/deployments/bsctestnet/vXVS_Proxy.json +++ /dev/null @@ -1,1468 +0,0 @@ -{ - "address": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlying_", - "type": "address" - }, - { - "internalType": "contract ComptrollerInterface", - "name": "comptroller_", - "type": "address" - }, - { - "internalType": "contract InterestRateModel", - "name": "interestRateModel_", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialExchangeRateMantissa_", - "type": "uint256" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals_", - "type": "uint8" - }, - { - "internalType": "address payable", - "name": "admin_", - "type": "address" - }, - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "cashPrior", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "interestAccumulated", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowIndex", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "AccrueInterest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "Borrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "error", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "info", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "detail", - "type": "uint256" - } - ], - "name": "Failure", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address", - "name": "vTokenCollateral", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "LiquidateBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "minter", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "mintTokens", - "type": "uint256" - } - ], - "name": "Mint", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "oldComptroller", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "NewComptroller", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "oldInterestRateModel", - "type": "address" - }, - { - "indexed": false, - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "NewMarketInterestRateModel", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldReserveFactorMantissa", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "NewReserveFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "redeemer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "payer", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "accountBorrows", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBorrows", - "type": "uint256" - } - ], - "name": "RepayBorrow", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "benefactor", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalReserves", - "type": "uint256" - } - ], - "name": "ReservesReduced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "payable": true, - "stateMutability": "payable", - "type": "fallback" - }, - { - "constant": false, - "inputs": [], - "name": "_acceptAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "addAmount", - "type": "uint256" - } - ], - "name": "_addReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "reduceAmount", - "type": "uint256" - } - ], - "name": "_reduceReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "newComptroller", - "type": "address" - } - ], - "name": "_setComptroller", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "implementation_", - "type": "address" - }, - { - "internalType": "bool", - "name": "allowResign", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "becomeImplementationData", - "type": "bytes" - } - ], - "name": "_setImplementation", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "contract InterestRateModel", - "name": "newInterestRateModel", - "type": "address" - } - ], - "name": "_setInterestRateModel", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address payable", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "_setPendingAdmin", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "newReserveFactorMantissa", - "type": "uint256" - } - ], - "name": "_setReserveFactor", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "accrueInterest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "balanceOfUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "borrowAmount", - "type": "uint256" - } - ], - "name": "borrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "borrowBalanceStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "borrowRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "comptroller", - "outputs": [ - { - "internalType": "contract ComptrollerInterface", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "delegateToViewImplementation", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "exchangeRateCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "exchangeRateStored", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getAccountSnapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getCash", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "interestRateModel", - "outputs": [ - { - "internalType": "contract InterestRateModel", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isVToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - }, - { - "internalType": "contract VTokenInterface", - "name": "vTokenCollateral", - "type": "address" - } - ], - "name": "liquidateBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "mintAmount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemTokens", - "type": "uint256" - } - ], - "name": "redeem", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "redeemAmount", - "type": "uint256" - } - ], - "name": "redeemUnderlying", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrow", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "repayAmount", - "type": "uint256" - } - ], - "name": "repayBorrowBehalf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "reserveFactorMantissa", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "address", - "name": "borrower", - "type": "address" - }, - { - "internalType": "uint256", - "name": "seizeTokens", - "type": "uint256" - } - ], - "name": "seize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "supplyRatePerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalBorrows", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "totalBorrowsCurrent", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "src", - "type": "address" - }, - { - "internalType": "address", - "name": "dst", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } - ], - "numDeployments": 1 -} diff --git a/deployments/bsctestnet_addresses.json b/deployments/bsctestnet_addresses.json index 479837ec4..4619a607c 100644 --- a/deployments/bsctestnet_addresses.json +++ b/deployments/bsctestnet_addresses.json @@ -83,43 +83,17 @@ "pancakeFactory": "0x182859893230dC89b114d6e2D547BFFE30474a21", "vBNB": "0x2E7222e51c0f6e98610A1543Aa3836E092CDe62c", "vBTC": "0xb6e9322C49FD75a367Fcb17B0Fcd62C5070EbCBe", - "vBTC_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vBTC_Proxy": "0xb6e9322C49FD75a367Fcb17B0Fcd62C5070EbCBe", "vBUSD": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", - "vBUSD_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vBUSD_Proxy": "0x08e0A5575De71037aE36AbfAfb516595fE68e5e4", "vETH": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", - "vETH_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vETH_Proxy": "0x162D005F0Fff510E54958Cfc5CF32A3180A84aab", "vFDUSD": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", - "vFDUSD_Implementation": "0xdb1869ca9e008e102350f2e0c356500503a4d043", - "vFDUSD_Proxy": "0xF06e662a00796c122AaAE935EC4F0Be3F74f5636", "vLTC": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", - "vLTC_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vLTC_Proxy": "0xAfc13BC065ABeE838540823431055D2ea52eBA52", "vSXP": "0x74469281310195A04840Daf6EdF576F559a3dE80", - "vSXP_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vSXP_Proxy": "0x74469281310195A04840Daf6EdF576F559a3dE80", "vTRX": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", - "vTRX_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vTRX_Proxy": "0x369Fea97f6fB7510755DCA389088d9E2e2819278", "vTUSD": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", - "vTUSD_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vTUSD_Proxy": "0xEFAACF73CE2D38ED40991f29E72B12C74bd4cf23", "vUSDC": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", - "vUSDC_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vUSDC_Proxy": "0xD5C4C2e2facBEB59D0216D0595d63FcDc6F9A1a7", "vUSDT": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", - "vUSDT_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vUSDT_Proxy": "0xb7526572FFE56AB9D7489838Bf2E18e3323b441A", "vWBETH": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", - "vWBETH_Implementation": "0xc01902dbf72c2ccbfebadb9b7a9e23577893d3a3", - "vWBETH_Proxy": "0x35566ED3AF9E537Be487C98b1811cDf95ad0C32b", "vXRP": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", - "vXRP_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vXRP_Proxy": "0x488aB2826a154da01CC4CC16A8C83d4720D3cA2C", - "vXVS": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E", - "vXVS_Implementation": "0x8d79c8f4400fe68fd17040539fe5e1706c1f2850", - "vXVS_Proxy": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E" + "vXVS": "0x6d6F697e34145Bb95c54E77482d97cc261Dc237E" } } From 21ed31eae5d42a5234820c3b0aab2e2012b9c2e8 Mon Sep 17 00:00:00 2001 From: coreyar Date: Mon, 29 Jul 2024 14:52:35 +0000 Subject: [PATCH 53/85] feat: updating deployment files --- deployments/bscmainnet_addresses.json | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index c2d1c713d..cd2e8fea3 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -3,27 +3,19 @@ "chainId": "56", "addresses": { "AAVE": "0xfb6115445Bff7b52FeB98650C87f44907E58f802", - "AAVE_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "AAVE_Proxy": "0xfb6115445Bff7b52FeB98650C87f44907E58f802", "ADA": "0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47", "BCH": "0x8fF795a6F4D97E7887C79beA79aba5cc76444aDf", "BETH": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", - "BETH_Implementation": "0x5c1ab3184b5cdf456f086e769dd66f19660376e2", - "BETH_Proxy": "0x250632378E573c6Be1AC2f97Fcdf00515d0Aa91B", "BTCB": "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c", "BUSD": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", "CAKE": "0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", "ComptrollerLens": "0x50F618A2EAb0fB55e87682BbFd89e38acb2735cD", "DAI": "0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3", "DOGE": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", - "DOGE_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "DOGE_Proxy": "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", "DOT": "0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402", "DefaultProxyAdmin": "0x6beb6D2695B67FEb73ad4f172E8E2975497187e4", "ETH": "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", "FIL": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", - "FIL_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "FIL_Proxy": "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", "InterestRateModelVBNB": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5", "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", @@ -36,14 +28,10 @@ "LINK": "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", "LTC": "0x4338665CBB7B2485A8855A139b75D5e34AB0DB94", "LUNA": "0x156ab3346823B651294766e23e6Cf87254d68962", - "LUNA_Implementation": "0xb6f6d86a8f9879a9c87f643768d9efc38c1da6e7", - "LUNA_Proxy": "0x156ab3346823B651294766e23e6Cf87254d68962", "Liquidator": "0x0870793286aada55d39ce7f82fb2766e8004cf43", "Liquidator_Implementation": "0xE26cE9b5FDd602225cCcC4cef7FAE596Dcf2A965", "Liquidator_Proxy": "0x0870793286aada55d39ce7f82fb2766e8004cf43", "MATIC": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", - "MATIC_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "MATIC_Proxy": "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", "MarketFacet": "0x9622522d94BdEe9b1d7C2CD944e3ed74B33BD9Cf", "MoveDebtDelegate": "0x89621C48EeC04A85AfadFD37d32077e65aFe2226", "MoveDebtDelegate_Implementation": "0x8439932C45e646FcC1009690417A65BF48f68Ce7", @@ -66,22 +54,12 @@ "SwapRouterCorePool": "0x8938E6dA30b59c1E27d5f70a94688A89F7c815a4", "TRX": "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3", "TRXOLD": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", - "TRXOLD_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "TRXOLD_Proxy": "0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B", "TUSD": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", "TUSDOLD": "0x14016E85a25aeb13065688cAFB43044C2ef86784", - "TUSDOLD_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "TUSDOLD_Proxy": "0x14016E85a25aeb13065688cAFB43044C2ef86784", - "TUSD_Implementation": "0x0d7adc70a18a5aef0bd6ecb098e1da0244c57711", - "TUSD_Proxy": "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", "TokenRedeemer": "0xC53ffda840B51068C64b2E052a5715043f634bcd", "USDC": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", - "USDC_Implementation": "0xba5fe23f8a3a24bed3236f05f2fcf35fd0bf0b5c", - "USDC_Proxy": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d", "USDT": "0x55d398326f99059fF775485246999027B3197955", "UST": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", - "UST_Implementation": "0xb6d7bbde7c46a8b784f4a19c7fda0de34b9577db", - "UST_Proxy": "0x3d4350cD54aeF9f9b2C29435e0fa809957B3F30a", "Unitroller": "0xfD36E2c2a6789Db23113685031d7F16329158384", "Unitroller_Implementation": "0x347ba9559fFC65A94af0F6a513037Cd4982b7b18", "Unitroller_Proxy": "0xfD36E2c2a6789Db23113685031d7F16329158384", @@ -110,8 +88,6 @@ "VenusChainlinkOracle": "0x7FabdD617200C9CB4dcf3dd2C41273e60552068A", "VenusLens": "0xe4C455cBf870A86399043B8A36A669FfA1583e95", "WBETH": "0xa2e3356610840701bdf5611a53974510ae27e2e1", - "WBETH_Implementation": "0xfe928a7d8be9c8cece7e97f0ed5704f4fa2cb42a", - "WBETH_Proxy": "0xa2e3356610840701bdf5611a53974510ae27e2e1", "WBNB": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "WhitepaperInterestRateModel": "0x49fADE95f94e5EC7C1f4AE13a6d6f9ca18B2F430", "XRP": "0x1D2F0da169ceB9fC7B3144628dB156f3F6c60dBE", From cfc8829f00d31472ba08d95cc838a55ef71ea77b Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Mon, 29 Jul 2024 20:26:51 +0530 Subject: [PATCH 54/85] chore: yarn.lock updated --- yarn.lock | 4180 ++++++++++++++++++++++++++++------------------------- 1 file changed, 2185 insertions(+), 1995 deletions(-) diff --git a/yarn.lock b/yarn.lock index 89e55c01d..46ffd6f6e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,20 +5,13 @@ __metadata: version: 6 cacheKey: 8 -"@aashutoshrathi/word-wrap@npm:^1.2.3": - version: 1.2.6 - resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" - checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd - languageName: node - linkType: hard - "@ampproject/remapping@npm:^2.1.0": - version: 2.2.1 - resolution: "@ampproject/remapping@npm:2.2.1" + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" dependencies: - "@jridgewell/gen-mapping": ^0.3.0 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 03c04fd526acc64a1f4df22651186f3e5ef0a9d6d6530ce4482ec9841269cf7a11dbb8af79237c282d721c5312024ff17529cd72cc4768c11e999b58e2302079 + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.24 + checksum: d3ad7b89d973df059c4e8e6d7c972cbeb1bb2f18f002a3bd04ae0707da214cb06cc06929b65aa2313b9347463df2914772298bae8b1d7973f246bb3f2ab3e8f0 languageName: node linkType: hard @@ -45,12 +38,12 @@ __metadata: linkType: hard "@aws-sdk/types@npm:^3.1.0": - version: 3.449.0 - resolution: "@aws-sdk/types@npm:3.449.0" + version: 3.609.0 + resolution: "@aws-sdk/types@npm:3.609.0" dependencies: - "@smithy/types": ^2.4.0 - tslib: ^2.5.0 - checksum: df63355242cdc05066249b1548025dbc5c209f7fe65a76d50fccfcff731045b48a7aafafed795cbe2db1120757e8bfd7adb82d852c57563648084c7be4e1d4de + "@smithy/types": ^3.3.0 + tslib: ^2.6.2 + checksum: 522768d08f104065b0ff6a37eddaa7803186014acee1c0011b3dbd3ef841e47ae694e58f608aeec8a39d22d644d759ade996fe51d18b880617778dc2dbbe1ede languageName: node linkType: hard @@ -63,20 +56,20 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.22.13": - version: 7.22.13 - resolution: "@babel/code-frame@npm:7.22.13" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/code-frame@npm:7.24.7" dependencies: - "@babel/highlight": ^7.22.13 - chalk: ^2.4.2 - checksum: 22e342c8077c8b77eeb11f554ecca2ba14153f707b85294fcf6070b6f6150aae88a7b7436dd88d8c9289970585f3fe5b9b941c5aa3aa26a6d5a8ef3f292da058 + "@babel/highlight": ^7.24.7 + picocolors: ^1.0.0 + checksum: 830e62cd38775fdf84d612544251ce773d544a8e63df667728cc9e0126eeef14c6ebda79be0f0bc307e8318316b7f58c27ce86702e0a1f5c321d842eb38ffda4 languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.9": - version: 7.23.3 - resolution: "@babel/compat-data@npm:7.23.3" - checksum: 52fff649d4e25b10e29e8a9b1c9ef117f44d354273c17b5ef056555f8e5db2429b35df4c38bdfb6865d23133e0fba92e558d31be87bb8457db4ac688646fdbf1 +"@babel/compat-data@npm:^7.24.8": + version: 7.25.0 + resolution: "@babel/compat-data@npm:7.25.0" + checksum: 2ddcf8517f15eb03a712707b5d4fb146e4db44f8ebd821c29ca19f2808ee2f013c7b2c1d5d686b255ffbfa417368d61ee563ccd5d3639ed4293ce308a5d5d481 languageName: node linkType: hard @@ -114,139 +107,142 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.17.3, @babel/generator@npm:^7.17.7, @babel/generator@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/generator@npm:7.23.3" +"@babel/generator@npm:^7.17.3, @babel/generator@npm:^7.17.7, @babel/generator@npm:^7.25.0": + version: 7.25.0 + resolution: "@babel/generator@npm:7.25.0" dependencies: - "@babel/types": ^7.23.3 - "@jridgewell/gen-mapping": ^0.3.2 - "@jridgewell/trace-mapping": ^0.3.17 + "@babel/types": ^7.25.0 + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.25 jsesc: ^2.5.1 - checksum: b6e71cca852d4e1aa01a28a30b8c74ffc3b8d56ccb7ae3ee783028ee015f63ad861a2e386c3eb490a9a8634db485a503a33521680f4af510151e90346c46da17 + checksum: bf25649dde4068bff8e387319bf820f2cb3b1af7b8c0cfba0bd90880656427c8bad96cd5cb6db7058d20cffe93149ee59da16567018ceaa21ecaefbf780a785c languageName: node linkType: hard "@babel/helper-compilation-targets@npm:^7.17.7": - version: 7.22.15 - resolution: "@babel/helper-compilation-targets@npm:7.22.15" + version: 7.24.8 + resolution: "@babel/helper-compilation-targets@npm:7.24.8" dependencies: - "@babel/compat-data": ^7.22.9 - "@babel/helper-validator-option": ^7.22.15 - browserslist: ^4.21.9 + "@babel/compat-data": ^7.24.8 + "@babel/helper-validator-option": ^7.24.8 + browserslist: ^4.23.1 lru-cache: ^5.1.1 semver: ^6.3.1 - checksum: ce85196769e091ae54dd39e4a80c2a9df1793da8588e335c383d536d54f06baf648d0a08fc873044f226398c4ded15c4ae9120ee18e7dfd7c639a68e3cdc9980 + checksum: 40c9e87212fffccca387504b259a629615d7df10fc9080c113da6c51095d3e8b622a1409d9ed09faf2191628449ea28d582179c5148e2e993a3140234076b8da languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.16.7, @babel/helper-environment-visitor@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-environment-visitor@npm:7.22.20" - checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 +"@babel/helper-environment-visitor@npm:^7.16.7": + version: 7.24.7 + resolution: "@babel/helper-environment-visitor@npm:7.24.7" + dependencies: + "@babel/types": ^7.24.7 + checksum: 079d86e65701b29ebc10baf6ed548d17c19b808a07aa6885cc141b690a78581b180ee92b580d755361dc3b16adf975b2d2058b8ce6c86675fcaf43cf22f2f7c6 languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.16.7, @babel/helper-function-name@npm:^7.23.0": - version: 7.23.0 - resolution: "@babel/helper-function-name@npm:7.23.0" +"@babel/helper-function-name@npm:^7.16.7": + version: 7.24.7 + resolution: "@babel/helper-function-name@npm:7.24.7" dependencies: - "@babel/template": ^7.22.15 - "@babel/types": ^7.23.0 - checksum: e44542257b2d4634a1f979244eb2a4ad8e6d75eb6761b4cfceb56b562f7db150d134bc538c8e6adca3783e3bc31be949071527aa8e3aab7867d1ad2d84a26e10 + "@babel/template": ^7.24.7 + "@babel/types": ^7.24.7 + checksum: 142ee08922074dfdc0ff358e09ef9f07adf3671ab6eef4fca74dcf7a551f1a43717e7efa358c9e28d7eea84c28d7f177b7a58c70452fc312ae3b1893c5dab2a4 languageName: node linkType: hard -"@babel/helper-hoist-variables@npm:^7.16.7, @babel/helper-hoist-variables@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-hoist-variables@npm:7.22.5" +"@babel/helper-hoist-variables@npm:^7.16.7": + version: 7.24.7 + resolution: "@babel/helper-hoist-variables@npm:7.24.7" dependencies: - "@babel/types": ^7.22.5 - checksum: 394ca191b4ac908a76e7c50ab52102669efe3a1c277033e49467913c7ed6f7c64d7eacbeabf3bed39ea1f41731e22993f763b1edce0f74ff8563fd1f380d92cc + "@babel/types": ^7.24.7 + checksum: 6cfdcf2289cd12185dcdbdf2435fa8d3447b797ac75851166de9fc8503e2fd0021db6baf8dfbecad3753e582c08e6a3f805c8d00cbed756060a877d705bd8d8d languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-module-imports@npm:7.22.15" +"@babel/helper-module-imports@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-module-imports@npm:7.24.7" dependencies: - "@babel/types": ^7.22.15 - checksum: ecd7e457df0a46f889228f943ef9b4a47d485d82e030676767e6a2fdcbdaa63594d8124d4b55fd160b41c201025aec01fc27580352b1c87a37c9c6f33d116702 + "@babel/traverse": ^7.24.7 + "@babel/types": ^7.24.7 + checksum: 8ac15d96d262b8940bc469052a048e06430bba1296369be695fabdf6799f201dd0b00151762b56012a218464e706bc033f27c07f6cec20c6f8f5fd6543c67054 languageName: node linkType: hard "@babel/helper-module-transforms@npm:^7.17.7": - version: 7.23.3 - resolution: "@babel/helper-module-transforms@npm:7.23.3" - dependencies: - "@babel/helper-environment-visitor": ^7.22.20 - "@babel/helper-module-imports": ^7.22.15 - "@babel/helper-simple-access": ^7.22.5 - "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/helper-validator-identifier": ^7.22.20 + version: 7.25.0 + resolution: "@babel/helper-module-transforms@npm:7.25.0" + dependencies: + "@babel/helper-module-imports": ^7.24.7 + "@babel/helper-simple-access": ^7.24.7 + "@babel/helper-validator-identifier": ^7.24.7 + "@babel/traverse": ^7.25.0 peerDependencies: "@babel/core": ^7.0.0 - checksum: 5d0895cfba0e16ae16f3aa92fee108517023ad89a855289c4eb1d46f7aef4519adf8e6f971e1d55ac20c5461610e17213f1144097a8f932e768a9132e2278d71 + checksum: 12270fe101a03e46e68d8166aca423c829472f735cd40b674a50c3061954475c840b0baee57ba546d5a51796715e0db8f781f556fb93e71529e5343bd3b6bd57 languageName: node linkType: hard -"@babel/helper-simple-access@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-simple-access@npm:7.22.5" +"@babel/helper-simple-access@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-simple-access@npm:7.24.7" dependencies: - "@babel/types": ^7.22.5 - checksum: fe9686714caf7d70aedb46c3cce090f8b915b206e09225f1e4dbc416786c2fdbbee40b38b23c268b7ccef749dd2db35f255338fb4f2444429874d900dede5ad2 + "@babel/traverse": ^7.24.7 + "@babel/types": ^7.24.7 + checksum: ddbf55f9dea1900213f2a1a8500fabfd21c5a20f44dcfa957e4b0d8638c730f88751c77f678644f754f1a1dc73f4eb8b766c300deb45a9daad000e4247957819 languageName: node linkType: hard -"@babel/helper-split-export-declaration@npm:^7.16.7, @babel/helper-split-export-declaration@npm:^7.22.6": - version: 7.22.6 - resolution: "@babel/helper-split-export-declaration@npm:7.22.6" +"@babel/helper-split-export-declaration@npm:^7.16.7": + version: 7.24.7 + resolution: "@babel/helper-split-export-declaration@npm:7.24.7" dependencies: - "@babel/types": ^7.22.5 - checksum: e141cace583b19d9195f9c2b8e17a3ae913b7ee9b8120246d0f9ca349ca6f03cb2c001fd5ec57488c544347c0bb584afec66c936511e447fd20a360e591ac921 + "@babel/types": ^7.24.7 + checksum: e3ddc91273e5da67c6953f4aa34154d005a00791dc7afa6f41894e768748540f6ebcac5d16e72541aea0c89bee4b89b4da6a3d65972a0ea8bfd2352eda5b7e22 languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-string-parser@npm:7.22.5" - checksum: 836851ca5ec813077bbb303acc992d75a360267aa3b5de7134d220411c852a6f17de7c0d0b8c8dcc0f567f67874c00f4528672b2a4f1bc978a3ada64c8c78467 +"@babel/helper-string-parser@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-string-parser@npm:7.24.8" + checksum: 39b03c5119216883878655b149148dc4d2e284791e969b19467a9411fccaa33f7a713add98f4db5ed519535f70ad273cdadfd2eb54d47ebbdeac5083351328ce languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc +"@babel/helper-validator-identifier@npm:^7.16.7, @babel/helper-validator-identifier@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-validator-identifier@npm:7.24.7" + checksum: 6799ab117cefc0ecd35cd0b40ead320c621a298ecac88686a14cffceaac89d80cdb3c178f969861bf5fa5e4f766648f9161ea0752ecfe080d8e89e3147270257 languageName: node linkType: hard -"@babel/helper-validator-option@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helper-validator-option@npm:7.22.15" - checksum: 68da52b1e10002a543161494c4bc0f4d0398c8fdf361d5f7f4272e95c45d5b32d974896d44f6a0ea7378c9204988879d73613ca683e13bd1304e46d25ff67a8d +"@babel/helper-validator-option@npm:^7.24.8": + version: 7.24.8 + resolution: "@babel/helper-validator-option@npm:7.24.8" + checksum: a52442dfa74be6719c0608fee3225bd0493c4057459f3014681ea1a4643cd38b68ff477fe867c4b356da7330d085f247f0724d300582fa4ab9a02efaf34d107c languageName: node linkType: hard "@babel/helpers@npm:^7.17.8": - version: 7.23.2 - resolution: "@babel/helpers@npm:7.23.2" + version: 7.25.0 + resolution: "@babel/helpers@npm:7.25.0" dependencies: - "@babel/template": ^7.22.15 - "@babel/traverse": ^7.23.2 - "@babel/types": ^7.23.0 - checksum: aaf4828df75ec460eaa70e5c9f66e6dadc28dae3728ddb7f6c13187dbf38030e142194b83d81aa8a31bbc35a5529a5d7d3f3cf59d5d0b595f5dd7f9d8f1ced8e + "@babel/template": ^7.25.0 + "@babel/types": ^7.25.0 + checksum: 739e3704ff41a30f5eaac469b553f4d3ab02be6ced083f5925851532dfbd9efc5c347728e77b754ed0b262a4e5e384e60932a62c192d338db7e4b7f3adf9f4a7 languageName: node linkType: hard -"@babel/highlight@npm:^7.22.13": - version: 7.22.20 - resolution: "@babel/highlight@npm:7.22.20" +"@babel/highlight@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/highlight@npm:7.24.7" dependencies: - "@babel/helper-validator-identifier": ^7.22.20 + "@babel/helper-validator-identifier": ^7.24.7 chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: 84bd034dca309a5e680083cd827a766780ca63cef37308404f17653d32366ea76262bd2364b2d38776232f2d01b649f26721417d507e8b4b6da3e4e739f6d134 + picocolors: ^1.0.0 + checksum: 5cd3a89f143671c4ac129960024ba678b669e6fc673ce078030f5175002d1d3d52bc10b22c5b916a6faf644b5028e9a4bd2bb264d053d9b05b6a98690f1d46f1 languageName: node linkType: hard @@ -259,23 +255,23 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.17.3, @babel/parser@npm:^7.17.8, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/parser@npm:7.23.3" +"@babel/parser@npm:^7.17.3, @babel/parser@npm:^7.17.8, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0": + version: 7.25.0 + resolution: "@babel/parser@npm:7.25.0" bin: parser: ./bin/babel-parser.js - checksum: 4aa7366e401b5467192c1dbf2bef99ac0958c45ef69ed6704abbae68f98fab6409a527b417d1528fddc49d7664450670528adc7f45abb04db5fafca7ed766d57 + checksum: e0f0f5a0d323c8ebaa7caa5a982ce82a87d1f7176939642020beed021024af523e69e30b8918be82d02666742dfe0aad562c65edfd1a696785d76a2882e7904c languageName: node linkType: hard -"@babel/template@npm:^7.16.7, @babel/template@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/template@npm:7.22.15" +"@babel/template@npm:^7.16.7, @babel/template@npm:^7.24.7, @babel/template@npm:^7.25.0": + version: 7.25.0 + resolution: "@babel/template@npm:7.25.0" dependencies: - "@babel/code-frame": ^7.22.13 - "@babel/parser": ^7.22.15 - "@babel/types": ^7.22.15 - checksum: 1f3e7dcd6c44f5904c184b3f7fe280394b191f2fed819919ffa1e529c259d5b197da8981b6ca491c235aee8dbad4a50b7e31304aa531271cb823a4a24a0dd8fd + "@babel/code-frame": ^7.24.7 + "@babel/parser": ^7.25.0 + "@babel/types": ^7.25.0 + checksum: 3f2db568718756d0daf2a16927b78f00c425046b654cd30b450006f2e84bdccaf0cbe6dc04994aa1f5f6a4398da2f11f3640a4d3ee31722e43539c4c919c817b languageName: node linkType: hard @@ -297,21 +293,18 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.17.3, @babel/traverse@npm:^7.23.2": - version: 7.23.3 - resolution: "@babel/traverse@npm:7.23.3" +"@babel/traverse@npm:^7.17.3, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.25.0": + version: 7.25.1 + resolution: "@babel/traverse@npm:7.25.1" dependencies: - "@babel/code-frame": ^7.22.13 - "@babel/generator": ^7.23.3 - "@babel/helper-environment-visitor": ^7.22.20 - "@babel/helper-function-name": ^7.23.0 - "@babel/helper-hoist-variables": ^7.22.5 - "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/parser": ^7.23.3 - "@babel/types": ^7.23.3 - debug: ^4.1.0 + "@babel/code-frame": ^7.24.7 + "@babel/generator": ^7.25.0 + "@babel/parser": ^7.25.0 + "@babel/template": ^7.25.0 + "@babel/types": ^7.25.0 + debug: ^4.3.1 globals: ^11.1.0 - checksum: f4e0c05f2f82368b9be7e1fed38cfcc2e1074967a8b76ac837b89661adbd391e99d0b1fd8c31215ffc3a04d2d5d7ee5e627914a09082db84ec5606769409fe2b + checksum: c22a5ced9aef2669fd18936e3d919481cc4c12055f2e3b91e0761b2f89e26e4c6b51bfc4577f1a52ddb8734199d9917ec09027a378a6eb25ffe844704741f50e languageName: node linkType: hard @@ -325,25 +318,21 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.8.3": - version: 7.23.0 - resolution: "@babel/types@npm:7.23.0" +"@babel/types@npm:^7.17.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.8.3": + version: 7.25.0 + resolution: "@babel/types@npm:7.25.0" dependencies: - "@babel/helper-string-parser": ^7.22.5 - "@babel/helper-validator-identifier": ^7.22.20 + "@babel/helper-string-parser": ^7.24.8 + "@babel/helper-validator-identifier": ^7.24.7 to-fast-properties: ^2.0.0 - checksum: 215fe04bd7feef79eeb4d33374b39909ce9cad1611c4135a4f7fdf41fe3280594105af6d7094354751514625ea92d0875aba355f53e86a92600f290e77b0e604 + checksum: 58645192c73ea1adf72b3311c46e6f656bb3f52adb285c3ae0566e62a3d9ea1998449e88c6590501cb7aa9fe3411bb66288c961b9ebb5c4e9c433bad8619efaa languageName: node linkType: hard -"@babel/types@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/types@npm:7.23.3" - dependencies: - "@babel/helper-string-parser": ^7.22.5 - "@babel/helper-validator-identifier": ^7.22.20 - to-fast-properties: ^2.0.0 - checksum: b96f1ec495351aeb2a5f98dd494aafa17df02a351548ae96999460f35c933261c839002a34c1e83552ff0d9f5e94d0b5b8e105d38131c7c9b0f5a6588676f35d +"@balena/dockerignore@npm:^1.0.2": + version: 1.0.2 + resolution: "@balena/dockerignore@npm:1.0.2" + checksum: 0d39f8fbcfd1a983a44bced54508471ab81aaaa40e2c62b46a9f97eac9d6b265790799f16919216db486331dedaacdde6ecbd6b7abe285d39bc50de111991699 languageName: node linkType: hard @@ -358,52 +347,6 @@ __metadata: languageName: node linkType: hard -"@chainsafe/as-sha256@npm:^0.3.1": - version: 0.3.1 - resolution: "@chainsafe/as-sha256@npm:0.3.1" - checksum: 58ea733be1657b0e31dbf48b0dba862da0833df34a81c1460c7352f04ce90874f70003cbf34d0afb9e5e53a33ee2d63a261a8b12462be85b2ba0a6f7f13d6150 - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.4.2": - version: 0.4.2 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - checksum: f9cfcb2132a243992709715dbd28186ab48c7c0c696f29d30857693cca5526bf753974a505ef68ffd5623bbdbcaa10f9083f4dd40bf99eb6408e451cc26a1a9e - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.5.0": - version: 0.5.0 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.5.0" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - checksum: 2c67203da776c79cd3a6132e2d672fe132393b2e63dc71604e3134acc8c0ec25cc5e431051545939ea0f7c5ff2066fb806b9e5cab974ca085d046226a1671f7d - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:^0.10.0": - version: 0.10.2 - resolution: "@chainsafe/ssz@npm:0.10.2" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - "@chainsafe/persistent-merkle-tree": ^0.5.0 - checksum: 6bb70cf741d0a19dd0b28b3f6f067b96fa39f556e2eefa6ac745b21db9c3b3a8393dc3cca8ff4a6ce065ed71ddc3fb1b2b390a92004b9d01067c26e2558e5503 - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:^0.9.2": - version: 0.9.4 - resolution: "@chainsafe/ssz@npm:0.9.4" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - "@chainsafe/persistent-merkle-tree": ^0.4.2 - case: ^1.6.3 - checksum: c6eaedeae9e5618b3c666ff4507a27647f665a8dcf17d5ca86da4ed4788c5a93868f256d0005467d184fdf35ec03f323517ec2e55ec42492d769540a2ec396bc - languageName: node - linkType: hard - "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -618,12 +561,10 @@ __metadata: linkType: hard "@defi-wonderland/smock@npm:^2.2.0, @defi-wonderland/smock@npm:^2.3.4": - version: 2.3.5 - resolution: "@defi-wonderland/smock@npm:2.3.5" + version: 2.4.0 + resolution: "@defi-wonderland/smock@npm:2.4.0" dependencies: - "@nomicfoundation/ethereumjs-evm": ^1.0.0-rc.3 - "@nomicfoundation/ethereumjs-util": ^8.0.0-rc.3 - "@nomicfoundation/ethereumjs-vm": ^6.0.0-rc.3 + "@nomicfoundation/ethereumjs-util": ^9.0.4 diff: ^5.0.0 lodash.isequal: ^4.5.0 lodash.isequalwith: ^4.4.0 @@ -635,8 +576,8 @@ __metadata: "@ethersproject/abstract-signer": ^5 "@nomiclabs/hardhat-ethers": ^2 ethers: ^5 - hardhat: ^2 - checksum: b3c408fb43cd7b02bf6f3b3a392758944ee4d4ad9d92a5bcb595b2bdf7ebe702d052b8631afba0b408e80185b1db22d655dc63feba82365f5f1f6786eb98d859 + hardhat: ^2.21.0 + checksum: 421f97cfa9a8f7bbdafc6521723f5ed0c3b7cd0462dc7d1a143a2de9cbdac46dd6acd7db619aa03a09d62695c5337fb17699259db2d5e4ddb530f5f55ef4ef30 languageName: node linkType: hard @@ -652,15 +593,15 @@ __metadata: linkType: hard "@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.1": - version: 4.10.0 - resolution: "@eslint-community/regexpp@npm:4.10.0" - checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b + version: 4.11.0 + resolution: "@eslint-community/regexpp@npm:4.11.0" + checksum: 97d2fe46690b69417a551bd19a3dc53b6d9590d2295c43cc4c4e44e64131af541e2f4a44d5c12e87de990403654d3dae9d33600081f3a2f0386b368abc9111ec languageName: node linkType: hard -"@eslint/eslintrc@npm:^2.1.3": - version: 2.1.3 - resolution: "@eslint/eslintrc@npm:2.1.3" +"@eslint/eslintrc@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/eslintrc@npm:2.1.4" dependencies: ajv: ^6.12.4 debug: ^4.3.2 @@ -671,14 +612,14 @@ __metadata: js-yaml: ^4.1.0 minimatch: ^3.1.2 strip-json-comments: ^3.1.1 - checksum: 5c6c3878192fe0ddffa9aff08b4e2f3bcc8f1c10d6449b7295a5f58b662019896deabfc19890455ffd7e60a5bd28d25d0eaefb2f78b2d230aae3879af92b89e5 + checksum: 10957c7592b20ca0089262d8c2a8accbad14b4f6507e35416c32ee6b4dbf9cad67dfb77096bbd405405e9ada2b107f3797fe94362e1c55e0b09d6e90dd149127 languageName: node linkType: hard -"@eslint/js@npm:8.53.0": - version: 8.53.0 - resolution: "@eslint/js@npm:8.53.0" - checksum: e0d5cfb0000aaee237c8e6d6d6e366faa60b1ef7f928ce17778373aa44d3b886368f6d5e1f97f913f0f16801aad016db8b8df78418c9d18825c15590328028af +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 315dc65b0e9893e2bff139bddace7ea601ad77ed47b4550e73da8c9c2d2766c7a575c3cddf17ef85b8fd6a36ff34f91729d0dcca56e73ca887c10df91a41b0bb languageName: node linkType: hard @@ -966,7 +907,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.4.4, @ethersproject/providers@npm:^5.6.8, @ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": +"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.4.4, @ethersproject/providers@npm:^5.6.8, @ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.2": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" dependencies: @@ -1142,9 +1083,9 @@ __metadata: linkType: hard "@fastify/busboy@npm:^2.0.0": - version: 2.1.0 - resolution: "@fastify/busboy@npm:2.1.0" - checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 + version: 2.1.1 + resolution: "@fastify/busboy@npm:2.1.1" + checksum: 42c32ef75e906c9a4809c1e1930a5ca6d4ddc8d138e1a8c8ba5ea07f997db32210617d23b2e4a85fe376316a41a1a0439fc6ff2dedf5126d96f45a9d80754fb2 languageName: node linkType: hard @@ -1155,14 +1096,14 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13": - version: 0.11.13 - resolution: "@humanwhocodes/config-array@npm:0.11.13" +"@humanwhocodes/config-array@npm:^0.11.14": + version: 0.11.14 + resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: - "@humanwhocodes/object-schema": ^2.0.1 - debug: ^4.1.1 + "@humanwhocodes/object-schema": ^2.0.2 + debug: ^4.3.1 minimatch: ^3.0.5 - checksum: f8ea57b0d7ed7f2d64cd3944654976829d9da91c04d9c860e18804729a33f7681f78166ef4c761850b8c324d362f7d53f14c5c44907a6b38b32c703ff85e4805 + checksum: 861ccce9eaea5de19546653bccf75bf09fe878bc39c3aab00aeee2d2a0e654516adad38dd1098aab5e3af0145bbcbf3f309bdf4d964f8dab9dcd5834ae4c02f2 languageName: node linkType: hard @@ -1173,10 +1114,10 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^2.0.1": - version: 2.0.1 - resolution: "@humanwhocodes/object-schema@npm:2.0.1" - checksum: 24929487b1ed48795d2f08346a0116cc5ee4634848bce64161fb947109352c562310fd159fc64dda0e8b853307f5794605191a9547f7341158559ca3c8262a45 +"@humanwhocodes/object-schema@npm:^2.0.2": + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: d3b78f6c5831888c6ecc899df0d03bcc25d46f3ad26a11d7ea52944dc36a35ef543fad965322174238d677a43d5c694434f6607532cff7077062513ad7022631 languageName: node linkType: hard @@ -1201,35 +1142,35 @@ __metadata: languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.3 - resolution: "@jridgewell/gen-mapping@npm:0.3.3" +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" dependencies: - "@jridgewell/set-array": ^1.0.1 + "@jridgewell/set-array": ^1.2.1 "@jridgewell/sourcemap-codec": ^1.4.10 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab + "@jridgewell/trace-mapping": ^0.3.24 + checksum: ff7a1764ebd76a5e129c8890aa3e2f46045109dabde62b0b6c6a250152227647178ff2069ea234753a690d8f3c4ac8b5e7b267bbee272bffb7f3b0a370ab6e52 languageName: node linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.1 - resolution: "@jridgewell/resolve-uri@npm:3.1.1" - checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 83b85f72c59d1c080b4cbec0fef84528963a1b5db34e4370fa4bd1e3ff64a0d80e0cee7369d11d73c704e0286fb2865b530acac7a871088fbe92b5edf1000870 languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.0.1": - version: 1.1.2 - resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": - version: 1.4.15 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" - checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 05df4f2538b3b0f998ea4c1cd34574d0feba216fa5d4ccaef0187d12abf82eafe6021cec8b49f9bb4d90f2ba4582ccc581e72986a5fcf4176ae0cfeb04cf52ec languageName: node linkType: hard @@ -1243,13 +1184,13 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.20 - resolution: "@jridgewell/trace-mapping@npm:0.3.20" +"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: "@jridgewell/resolve-uri": ^3.1.0 "@jridgewell/sourcemap-codec": ^1.4.14 - checksum: cd1a7353135f385909468ff0cf20bdd37e59f2ee49a13a966dedf921943e222082c583ade2b579ff6cd0d8faafcb5461f253e1bf2a9f48fec439211fdbe788f5 + checksum: 9d3c40d225e139987b50c48988f8717a54a8c994d8a948ee42e1412e08988761d0754d7d10b803061cc3aebf35f92a5dbbab493bd0e1a9ef9e89a2130e83ba34 languageName: node linkType: hard @@ -1283,6 +1224,157 @@ __metadata: languageName: node linkType: hard +"@matterlabs/hardhat-zksync-deploy@npm:^0.11.0": + version: 0.11.0 + resolution: "@matterlabs/hardhat-zksync-deploy@npm:0.11.0" + dependencies: + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + chai: ^4.3.4 + chalk: ^4.1.2 + fs-extra: ^11.2.0 + glob: ^10.4.1 + lodash: ^4.17.21 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + ts-morph: ^22.0.0 + peerDependencies: + ethers: ~5.7.2 + hardhat: ^2.14.0 + zksync-ethers: ^5.8.0 + checksum: 82305a8b9426bce5a4b59944ebfa88909d4dff37c7bcbd28866c62eb3ca3858c20686155ed3cb69217bfb9774ede07ed9df2126bb4d34249b36e1424c389fe56 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-node@npm:^0.2.0": + version: 0.2.0 + resolution: "@matterlabs/hardhat-zksync-node@npm:0.2.0" + dependencies: + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + axios: ^1.7.2 + chai: ^4.3.4 + chalk: ^4.1.2 + fs-extra: ^11.2.0 + proxyquire: ^2.1.3 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + undici: ^6.18.2 + peerDependencies: + hardhat: ^2.14.0 + zksync-ethers: ^5.8.0 + checksum: 9c769b069f841dfc7ce66c01169842f9b159d6b9cb424dd5c44b44b3c7acc1e83a158c48cce124e7084c08880f8e13e453be8e57c447928c042840c07457f3e0 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-solc@npm:^1.2.0, @matterlabs/hardhat-zksync-solc@npm:^1.2.1": + version: 1.2.1 + resolution: "@matterlabs/hardhat-zksync-solc@npm:1.2.1" + dependencies: + "@nomiclabs/hardhat-docker": ^2.0.2 + chai: ^4.3.4 + chalk: ^4.1.2 + debug: ^4.3.5 + dockerode: ^4.0.2 + fs-extra: ^11.2.0 + proper-lockfile: ^4.1.2 + semver: ^7.6.2 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + undici: ^6.18.2 + peerDependencies: + hardhat: ^2.22.5 + checksum: b83add58be577845d8715e21dee8b712af7f37de5c8edf4b6544f5f37d7ae9f3586ce5749fc44416210f0c6d235f1f9773126e7ab58926a612f30d12e1ac7c80 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-upgradable@npm:^0.5.0": + version: 0.5.1 + resolution: "@matterlabs/hardhat-zksync-upgradable@npm:0.5.1" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@openzeppelin/upgrades-core": ~1.29.0 + chalk: ^4.1.2 + compare-versions: ^6.1.0 + dockerode: ^3.3.4 + ethereumjs-util: ^7.1.5 + ethers: ~5.7.2 + fs-extra: ^11.2.0 + hardhat: ^2.14.0 + proper-lockfile: ^4.1.2 + solidity-ast: ^0.4.56 + zksync-ethers: ^5.8.0 + peerDependencies: + "@openzeppelin/contracts-upgradeable": ^4.9.2 + checksum: 00ae82ad8cf3e64479a36898253dac2edb8ca9e51b3cbb9d16cb61c41218d259a6136cd2ede4366c8934ab3b27635133ca4b4000f51ab8dc1321ae42eedbfefb + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync-verify@npm:0.7.0, @matterlabs/hardhat-zksync-verify@npm:^0.7.0": + version: 0.7.0 + resolution: "@matterlabs/hardhat-zksync-verify@npm:0.7.0" + dependencies: + "@ethersproject/abi": ^5.7.0 + "@ethersproject/address": 5.7.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@nomicfoundation/hardhat-verify": ^2.0.8 + "@openzeppelin/contracts": ^4.9.2 + axios: ^1.7.2 + cbor: ^9.0.2 + chai: ^4.3.4 + chalk: ^4.1.2 + debug: ^4.3.5 + hardhat: ^2.14.0 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + zksync-ethers: ^5.8.0 + peerDependencies: + "@nomicfoundation/hardhat-verify": ^2.0.8 + checksum: 58223280b58bc33a49e600f499d5ea902bf135d3b9ebde61a8a25b63cb16d266195e43df8d645d8ed48098dfd148e7b623db3ead0563944548088f72ad7de698 + languageName: node + linkType: hard + +"@matterlabs/hardhat-zksync@npm:^0.2.0": + version: 0.2.0 + resolution: "@matterlabs/hardhat-zksync@npm:0.2.0" + dependencies: + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-node": ^0.2.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@matterlabs/hardhat-zksync-upgradable": ^0.5.0 + "@matterlabs/hardhat-zksync-verify": ^0.7.0 + "@matterlabs/zksync-contracts": ^0.6.1 + "@nomicfoundation/hardhat-verify": ^2.0.8 + "@nomiclabs/hardhat-ethers": ^2.2.1 + "@openzeppelin/contracts": ^4.9.2 + "@openzeppelin/contracts-upgradeable": ^4.9.2 + "@openzeppelin/upgrades-core": ^1.27.0 + chai: ^4.3.7 + ethers: ~5.7.2 + hardhat: ^2.14.0 + sinon: ^18.0.0 + sinon-chai: ^3.7.0 + zksync-ethers: ^5.8.0 + peerDependencies: + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-node": ^0.2.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.0 + "@matterlabs/hardhat-zksync-upgradable": ^0.5.0 + "@matterlabs/hardhat-zksync-verify": ^0.7.0 + checksum: 124e545e8b6e23313669352cadc4047cb738064595f9722707bd841a15b7d0ba14a3992e62e9847f445b0f18569f81b37274f1a66bf294949d6c6dcc1326f958 + languageName: node + linkType: hard + +"@matterlabs/zksync-contracts@npm:^0.6.1": + version: 0.6.2 + resolution: "@matterlabs/zksync-contracts@npm:0.6.2" + peerDependencies: + "@openzeppelin/contracts": 4.6.0 + "@openzeppelin/contracts-upgradeable": 4.6.0 + checksum: 971249b1c05590254df5544ae0a9d0b9e6956d565311daff2c515c829d8bd43838d486f76d483241f86183fe80a1d35029758d6c756c23c3bbfb249870ec7ea7 + languageName: node + linkType: hard + "@metamask/eth-sig-util@npm:^4.0.0": version: 4.0.1 resolution: "@metamask/eth-sig-util@npm:4.0.1" @@ -1296,12 +1388,12 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": - version: 1.1.0 - resolution: "@noble/curves@npm:1.1.0" +"@noble/curves@npm:1.4.2, @noble/curves@npm:~1.4.0": + version: 1.4.2 + resolution: "@noble/curves@npm:1.4.2" dependencies: - "@noble/hashes": 1.3.1 - checksum: 2658cdd3f84f71079b4e3516c47559d22cf4b55c23ac8ee9d2b1f8e5b72916d9689e59820e0f9d9cb4a46a8423af5b56dc6bb7782405c88be06a015180508db5 + "@noble/hashes": 1.4.0 + checksum: c475a83c4263e2c970eaba728895b9b5d67e0ca880651e9c6e3efdc5f6a4f07ceb5b043bf71c399fc80fada0b8706e69d0772bffdd7b9de2483b988973a34cba languageName: node linkType: hard @@ -1312,17 +1404,10 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.1": - version: 1.3.1 - resolution: "@noble/hashes@npm:1.3.1" - checksum: 7fdefc0f7a0c1ec27acc6ff88841793e3f93ec4ce6b8a6a12bfc0dd70ae6b7c4c82fe305fdfeda1735d5ad4a9eebe761e6693b3d355689c559e91242f4bc95b1 - languageName: node - linkType: hard - -"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 +"@noble/hashes@npm:1.4.0, @noble/hashes@npm:^1.4.0, @noble/hashes@npm:~1.4.0": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 languageName: node linkType: hard @@ -1360,317 +1445,117 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-block@npm:4.2.2": - version: 4.2.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-tx": 4.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - checksum: 174a251d9c4e0bb9c1a7a6e77c52f1b2b4708d8135dba55c1025776248258ce905e4383a79da0ce7ac4e67e03b6c56351ca634a771b5eae976ed97498fc163f9 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-block@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - checksum: 7ff744f44a01f1c059ca7812a1cfc8089f87aa506af6cb39c78331dca71b32993cbd6fa05ad03f8c4f4fab73bb998a927af69e0d8ff01ae192ee5931606e09f5 +"@nomicfoundation/edr-darwin-arm64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.4.2" + checksum: 7835e998c2ef83924efac0694bb4392f6abf770dc7f935dd28abc1a291f830cade14750d83a46a3205338e4ddff943dda60a9849317cf42edd38d7a2ce843588 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:6.2.2": - version: 6.2.2 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:6.2.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-ethash": 2.0.5 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-util": 8.0.6 - abstract-level: ^1.0.3 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - level: ^8.0.0 - lru-cache: ^5.1.1 - memory-level: ^1.0.0 - checksum: 5933600bf005ec3e33f6fdd0b3582b80ed7eac8fa776fc86f21de8a6ac3614e3262c48ad3737015c19558165aecd7b13a8056e96afd61511d0605411e0264871 +"@nomicfoundation/edr-darwin-x64@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" + checksum: 94daa26610621e85cb025feb37bb93e9b89c59f908bf3eae70720d2b86632dbb1236420ae3ae6f685d563ba52519d5f860e68ccd898fa1fced831961dea2c08a languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-ethash": 3.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - abstract-level: ^1.0.3 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - level: ^8.0.0 - lru-cache: ^5.1.1 - memory-level: ^1.0.0 - checksum: b7e440dcd73e32aa72d13bfd28cb472773c9c60ea808a884131bf7eb3f42286ad594a0864215f599332d800f3fe1f772fff4b138d2dcaa8f41e4d8389bff33e7 +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" + checksum: a7181e237f6ece8bd97e0f75972044dbf584c506bbac5bef586d9f7d627a2c07a279a2d892837bbedc80ea3dfb39fa66becc297238b5d715a942eed2a50745cd languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:3.1.2": - version: 3.1.2 - resolution: "@nomicfoundation/ethereumjs-common@npm:3.1.2" - dependencies: - "@nomicfoundation/ethereumjs-util": 8.0.6 - crc-32: ^1.2.0 - checksum: b886e47bb4da26b42bf9e905c5f073db62d2ad1b740d50898012580b501868839fcf08430debe3fca927b4d73e01628c1b0b2e84401feb551245dacfac045404 +"@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" + checksum: 5a849484b7a104a7e1497774c4117afc58f64d57d30889d4f6f676dddb5c695192c0789b8be0b71171a2af770167a28aa301ae3ece7a2a156d82d94388639b66 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:4.0.2": - version: 4.0.2 - resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.2" - dependencies: - "@nomicfoundation/ethereumjs-util": 9.0.2 - crc-32: ^1.2.0 - checksum: f0d84704d6254d374299c19884312bd5666974b4b6f342d3f10bc76e549de78d20e45a53d25fbdc146268a52335497127e4f069126da7c60ac933a158e704887 +"@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" + checksum: 0520dd9a583976fd0f49dfe6c23227f03cd811a395dc5eed1a2922b4358d7c71fdcfea8f389d4a0e23b4ec53e1435959a544380f94e48122a75f94a42b177ac7 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:2.0.5": - version: 2.0.5 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.5" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - abstract-level: ^1.0.3 - bigint-crypto-utils: ^3.0.23 - ethereum-cryptography: 0.1.3 - checksum: 0b03c8771602cfa64c9d35e5686326d0bfecb7dc0874cd9ff737cae0ec401396187d8499c103b8858fed5b9bd930e132b8fd09d19b3f0649df36d7d0fdf4d27c +"@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" + checksum: 80c3b4346d8c27539bc005b09db233dedd8930310d1a049827661e69a8e03be9cbac27eb620a6ae9bfd46a2fbe22f83cee5af8d9e63178925d74d9c656246708 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:3.0.2": - version: 3.0.2 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - abstract-level: ^1.0.3 - bigint-crypto-utils: ^3.0.23 - ethereum-cryptography: 0.1.3 - checksum: e4011e4019dd9b92f7eeebfc1e6c9a9685c52d8fd0ee4f28f03e50048a23b600c714490827f59fdce497b3afb503b3fd2ebf6815ff307e9949c3efeff1403278 +"@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": + version: 0.4.2 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" + checksum: 736fb866fd5c2708560cbd5ae72815b5fc96e650cd74bc8bab0a1cb0e8baede4f595fdceb445c159814a6a7e8e691de227a5db49f61b3cd0ddfafd5715b397ab languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:1.3.2, @nomicfoundation/ethereumjs-evm@npm:^1.0.0-rc.3": - version: 1.3.2 - resolution: "@nomicfoundation/ethereumjs-evm@npm:1.3.2" +"@nomicfoundation/edr@npm:^0.4.1": + version: 0.4.2 + resolution: "@nomicfoundation/edr@npm:0.4.2" dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - "@types/async-eventemitter": ^0.2.1 - async-eventemitter: ^0.2.4 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 4a051f36968574ffbee5d3c401ebf1c81899b69a0692c372fced67691fe18f26741f26d1781e79dfa52136af888e561d80de4fd7dd59000d640c51bd8b130023 + "@nomicfoundation/edr-darwin-arm64": 0.4.2 + "@nomicfoundation/edr-darwin-x64": 0.4.2 + "@nomicfoundation/edr-linux-arm64-gnu": 0.4.2 + "@nomicfoundation/edr-linux-arm64-musl": 0.4.2 + "@nomicfoundation/edr-linux-x64-gnu": 0.4.2 + "@nomicfoundation/edr-linux-x64-musl": 0.4.2 + "@nomicfoundation/edr-win32-x64-msvc": 0.4.2 + checksum: 8c8457257b59ed9a29d88b7492e98e974d24e8318903e876a14dc0f6d5dc77948cd9053937d9730f54f920ba82ce3d244cab518d068359bcc20df88623f171ef languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.2" +"@nomicfoundation/ethereumjs-common@npm:4.0.4": + version: 4.0.4 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" dependencies: - "@ethersproject/providers": ^5.7.1 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: a23cf570836ddc147606b02df568069de946108e640f902358fef67e589f6b371d856056ee44299d9b4e3497f8ae25faa45e6b18fefd90e9b222dc6a761d85f0 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-rlp@npm:4.0.3": - version: 4.0.3 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:4.0.3" - bin: - rlp: bin/rlp - checksum: 14fc83701dd52323fae705786549ab07482ace315de69a586bb948b6f21ec529794cef8248af0b5c7e8f8b05fbadfbe222754b305841fa2189bfbc8f1eb064a2 + "@nomicfoundation/ethereumjs-util": 9.0.4 + checksum: ce3f6e4ae15b976efdb7ccda27e19aadb62b5ffee209f9503e68b4fd8633715d4d697c0cc10ccd35f5e4e977edd05100d0f214e28880ec64fff77341dc34fcdf languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" +"@nomicfoundation/ethereumjs-rlp@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" bin: - rlp: bin/rlp - checksum: a74434cadefca9aa8754607cc1ad7bb4bbea4ee61c6214918e60a5bbee83206850346eb64e39fd1fe97f854c7ec0163e01148c0c881dda23881938f0645a0ef2 + rlp: bin/rlp.cjs + checksum: ee2c2e5776c73801dc5ed636f4988b599b4563c2d0037da542ea57eb237c69dd1ac555f6bcb5e06f70515b6459779ba0d68252a6e105132b4659ab4bf62919b0 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-statemanager@npm:1.0.5": - version: 1.0.5 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-util": 8.0.6 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - functional-red-black-tree: ^1.0.1 - checksum: 0f88743900b2211deb5d2393bf111ef63411ce533387a6d06c48cc9ac1f4fc38f968cdecc4712ebdafdebc3c4c2ce6bd1abd82989f4f4f515d3f571981d38f9f - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - js-sdsl: ^4.1.4 - checksum: 3ab6578e252e53609afd98d8ba42a99f182dcf80252f23ed9a5e0471023ffb2502130f85fc47fa7c94cd149f9be799ed9a0942ca52a143405be9267f4ad94e64 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-trie@npm:5.0.5": - version: 5.0.5 - resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.5" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: bed56b55093275166c40d0aa097b32d348b3795cbfdc3797d48d136a578161431e70f30bcf453b74b52f77b897d79b61a3fb9d1abd10187c0cb7f25e40dea9c5 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-trie@npm:6.0.2": - version: 6.0.2 - resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@types/readable-stream": ^2.3.13 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: d4da918d333851b9f2cce7dbd25ab5753e0accd43d562d98fd991b168b6a08d1794528f0ade40fe5617c84900378376fe6256cdbe52c8d66bf4c53293bbc7c40 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-tx@npm:4.1.2": - version: 4.1.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:4.1.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - checksum: 209622bdc56e5f1267e5d2de69ed18388b141edc568f739f0ed865aecfe96e07c381aab779ed0adacefeae4da5be64fa1110a02e481e9a7c343bf0d53f4fd1b9 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-tx@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" - dependencies: - "@chainsafe/ssz": ^0.9.2 - "@ethersproject/providers": ^5.7.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - checksum: 0bbcea75786b2ccb559afe2ecc9866fb4566a9f157b6ffba4f50960d14f4b3da2e86e273f6fadda9b860e67cfcabf589970fb951b328cb5f900a585cd21842a2 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-util@npm:8.0.6, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": - version: 8.0.6 - resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.6" +"@nomicfoundation/ethereumjs-tx@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" dependencies: - "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-rlp": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 ethereum-cryptography: 0.1.3 - checksum: 7a51c2069702750d94bf6bc5afd4a26c50321fe42504339d5275b60974941451eb41232f8a08c307797bcd498f20a3b27074351a76abdfc36a5e74473a7eda01 + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 0f1c87716682ccbcf4d92ffc6cf8ab557e658b90319d82be3219a091a736859f8803c73c98e4863682e3e86d264751c472d33ff6d3c3daf4e75b5f01d0af8fa3 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:9.0.2": - version: 9.0.2 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" +"@nomicfoundation/ethereumjs-util@npm:9.0.4, @nomicfoundation/ethereumjs-util@npm:^9.0.4": + version: 9.0.4 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" dependencies: - "@chainsafe/ssz": ^0.10.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.4 ethereum-cryptography: 0.1.3 - checksum: 3a08f7b88079ef9f53b43da9bdcb8195498fd3d3911c2feee2571f4d1204656053f058b2f650471c86f7d2d0ba2f814768c7cfb0f266eede41c848356afc4900 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-vm@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 1c25ba4d0644cadb8a2b0241a4bb02e578bfd7f70e3492b855c2ab5c120cb159cb8f7486f84dc1597884bd1697feedbfb5feb66e91352afb51f3694fd8e4a043 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-vm@npm:^6.0.0-rc.3": - version: 6.4.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:6.4.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-blockchain": 6.2.2 - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-evm": 1.3.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-statemanager": 1.0.5 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-tx": 4.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - "@types/async-eventemitter": ^0.2.1 - async-eventemitter: ^0.2.4 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - functional-red-black-tree: ^1.0.1 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 9138b8cce872a51fe2e378942c52fc6c54d8126ff094ba6bb78cbb630cafa20d7fbaa2b08bdcf7cad6de78e19ce68493ddbcc2e02acb7c803b866dc121274ea7 + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 754439f72b11cad2d8986707ad020077dcc763c4055f73e2668a0b4cadb22aa4407faa9b3c587d9eb5b97ac337afbe037eb642bc1d5a16197284f83db3462cbe languageName: node linkType: hard @@ -1693,37 +1578,26 @@ __metadata: linkType: hard "@nomicfoundation/hardhat-ethers@npm:^3.0.0": - version: 3.0.5 - resolution: "@nomicfoundation/hardhat-ethers@npm:3.0.5" + version: 3.0.6 + resolution: "@nomicfoundation/hardhat-ethers@npm:3.0.6" dependencies: debug: ^4.1.1 lodash.isequal: ^4.5.0 peerDependencies: ethers: ^6.1.0 hardhat: ^2.0.0 - checksum: 34b092dfec68f8d8673c96af717660327edc814bc5c9cdb5bc1f82d5bde2b18bc9b9d3499a632784a3d4f2505ac174217e55d31b546b7eaa77a5bb30b3c80bb4 + checksum: 31a9b5aeb7b42cf3d8bcd1f11e680ce7018874a4c63b16b01a928fb34d2bd3e0f046fc4c7180e01bcd8b8b398874fc370317165284b3f543c4f3d1fbdcfbf05d languageName: node linkType: hard -"@nomicfoundation/hardhat-network-helpers@npm:^1.0.10": - version: 1.0.10 - resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.10" - dependencies: - ethereumjs-util: ^7.1.4 - peerDependencies: - hardhat: ^2.9.5 - checksum: 675da8d3229946a2bac0df9d1b5cc278bba9cd1a8214b5ff6099dcba874d913df07b9772a2ead0cb7ea2ced6b3fa430a73f94a3e257ae105493931c38fc7bf61 - languageName: node - linkType: hard - -"@nomicfoundation/hardhat-network-helpers@npm:^1.0.8": - version: 1.0.9 - resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.9" +"@nomicfoundation/hardhat-network-helpers@npm:^1.0.10, @nomicfoundation/hardhat-network-helpers@npm:^1.0.8": + version: 1.0.11 + resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.11" dependencies: ethereumjs-util: ^7.1.4 peerDependencies: hardhat: ^2.9.5 - checksum: ff378795075af853aeaacb7bc0783928d947d7f9fb043c046fcaffdf1e1219c4af47b18ea7fa2c10fe0b25daef48f13ae8b103bc11ea494ecdfbe34a3dcdf936 + checksum: b1566de2b0ff6de0fa825b13befd9a3318538e45c2d7e54b52dbf724b9ea5019365f1cf6962f4b89313747da847b575692783cfe03b60dbff3a2e419e135c3fb languageName: node linkType: hard @@ -1754,97 +1628,90 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1" - conditions: os=freebsd & cpu=x64 +"@nomicfoundation/hardhat-verify@npm:^2.0.8": + version: 2.0.8 + resolution: "@nomicfoundation/hardhat-verify@npm:2.0.8" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@ethersproject/address": ^5.0.2 + cbor: ^8.1.0 + chalk: ^2.4.2 + debug: ^4.1.1 + lodash.clonedeep: ^4.5.0 + semver: ^6.3.0 + table: ^6.8.0 + undici: ^5.14.0 + peerDependencies: + hardhat: ^2.0.4 + checksum: 2c6d239a08e7aca26625ab8c3637e5e7c1e7c8a88f62fb80c6a008fd56352431856aaf79b7a24b1755a6ee48d1423995e02d85a58ea53ceb5552b30c03073c97 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1" - conditions: os=linux & cpu=arm64 & libc=glibc +"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.2" + checksum: 5bf3cf3f88e39d7b684f0ca75621b794b62e2676eb63c6977e847acc9c827bdc132143cc84e46be2797b93edc522f2c6f85bf5501fd7b8c85b346fb27e4dd488 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1" - conditions: os=linux & cpu=arm64 & libc=musl +"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.2" + checksum: 8061dc7749d97409ccde4a2e529316c29f83f2d07c78ffea87803777229e2a7d967bbb8bda564903ab5e9e89ad3b46cbcb060621209d1c6e4212c4b1b096c076 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1" - conditions: os=linux & cpu=x64 & libc=glibc +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.2" + checksum: 46111d18446ea5d157628c202d1ee1fc3444b32a0e3aa24337bbb407653606a79a3b199bf1e5fe5f74c5c78833cf243e492f20ab6a1503137e89f2236b3ecfe7 languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1" - conditions: os=linux & cpu=x64 & libc=musl +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.2" + checksum: 588e81e7b36cbe80b9d2c502dc2db4bf8706732bcea6906b79bac202eb441fa2f4b9f703c30d82a17ed2a4402eaf038057fb14fc1c16eac5ade103ff9b085cdc languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1" - conditions: os=win32 & cpu=arm64 +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.2" + checksum: 26f8307bde4a2c7609d297f2af6a50cad87aa46e914326b09d5cb424b4f45f0f75e982f9fcb9ee3361a2f9b141fcc9c10a665ddbc9686e01b017c639fbfb500b languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1" - conditions: os=win32 & cpu=ia32 +"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.2" + checksum: d3628bae4f04bcdb2f1dec1d6790cdf97812e7e5c0a426f4227acc97883fa3165017a800375237e36bc588f0fb4971b0936a372869a801a97f42336ee4e42feb languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1" - conditions: os=win32 & cpu=x64 +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.2": + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.2" + checksum: 4a7d34d8419608cc343b6c028e07bd9ec72fd4ab82ccd36807ccf0fc8ad708b8d5baae9121532073ef08b2deb24d9c3a6f7b627c26f91f2a7de0cdb7024238f1 languageName: node linkType: hard "@nomicfoundation/solidity-analyzer@npm:^0.1.0": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.1" - dependencies: - "@nomicfoundation/solidity-analyzer-darwin-arm64": 0.1.1 - "@nomicfoundation/solidity-analyzer-darwin-x64": 0.1.1 - "@nomicfoundation/solidity-analyzer-freebsd-x64": 0.1.1 - "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": 0.1.1 - "@nomicfoundation/solidity-analyzer-linux-arm64-musl": 0.1.1 - "@nomicfoundation/solidity-analyzer-linux-x64-gnu": 0.1.1 - "@nomicfoundation/solidity-analyzer-linux-x64-musl": 0.1.1 - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": 0.1.1 - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": 0.1.1 - "@nomicfoundation/solidity-analyzer-win32-x64-msvc": 0.1.1 + version: 0.1.2 + resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.2" + dependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64": 0.1.2 + "@nomicfoundation/solidity-analyzer-darwin-x64": 0.1.2 + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": 0.1.2 + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": 0.1.2 + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": 0.1.2 + "@nomicfoundation/solidity-analyzer-linux-x64-musl": 0.1.2 + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": 0.1.2 dependenciesMeta: "@nomicfoundation/solidity-analyzer-darwin-arm64": optional: true "@nomicfoundation/solidity-analyzer-darwin-x64": optional: true - "@nomicfoundation/solidity-analyzer-freebsd-x64": - optional: true "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": optional: true "@nomicfoundation/solidity-analyzer-linux-arm64-musl": @@ -1853,17 +1720,24 @@ __metadata: optional: true "@nomicfoundation/solidity-analyzer-linux-x64-musl": optional: true - "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": - optional: true - "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": - optional: true "@nomicfoundation/solidity-analyzer-win32-x64-msvc": optional: true - checksum: 038cffafd5769e25256b5b8bef88d95cc1c021274a65c020cf84aceb3237752a3b51645fdb0687f5516a2bdfebf166fcf50b08ab64857925100213e0654b266b + checksum: 0de3a317658345b9012285665bb4c810a98b3668bcf32a118912fda00e5760fa2c77d0a92bce6b687dcc7b4bb34b0a83f8e6748bfa68660a2303d781ca728aef + languageName: node + linkType: hard + +"@nomiclabs/hardhat-docker@npm:^2.0.2": + version: 2.0.2 + resolution: "@nomiclabs/hardhat-docker@npm:2.0.2" + dependencies: + dockerode: ^2.5.8 + fs-extra: ^7.0.1 + node-fetch: ^2.6.0 + checksum: 1e019c2050668326e006a046d3285a11bf1830bfc222c2957eb8f9a5b262c9b5061ae42abbf2346f3e1bb46c98aa767c3651c0f842192f3171b28b1deafc4d05 languageName: node linkType: hard -"@nomiclabs/hardhat-ethers@npm:^2.2.3": +"@nomiclabs/hardhat-ethers@npm:^2.2.1, @nomiclabs/hardhat-ethers@npm:^2.2.3": version: 2.2.3 resolution: "@nomiclabs/hardhat-ethers@npm:2.2.3" peerDependencies: @@ -1874,8 +1748,8 @@ __metadata: linkType: hard "@nomiclabs/hardhat-etherscan@npm:^3.1.0": - version: 3.1.7 - resolution: "@nomiclabs/hardhat-etherscan@npm:3.1.7" + version: 3.1.8 + resolution: "@nomiclabs/hardhat-etherscan@npm:3.1.8" dependencies: "@ethersproject/abi": ^5.1.2 "@ethersproject/address": ^5.0.2 @@ -1889,20 +1763,20 @@ __metadata: undici: ^5.14.0 peerDependencies: hardhat: ^2.0.4 - checksum: 32d74e567e78a940a79cbe49c5dee0eb5cda0a4c0c34a9badfaf13d45e6054d9e717c28b8d2b0b20f29721a484af15a52d391fb60768222c4b13de92ef0f72b3 + checksum: 13864380d104705a54668adf2fb37a87d1147a064c1d29dbc356390e7254d5c7501b9b3af9c4ec2f9d9ff642a01417d5d35970d626fe706f5f4830820ae89ecb languageName: node linkType: hard "@npmcli/agent@npm:^2.0.0": - version: 2.2.0 - resolution: "@npmcli/agent@npm:2.2.0" + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" dependencies: agent-base: ^7.1.0 http-proxy-agent: ^7.0.0 https-proxy-agent: ^7.0.1 lru-cache: ^10.0.1 - socks-proxy-agent: ^8.0.1 - checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 + socks-proxy-agent: ^8.0.3 + checksum: 67de7b88cc627a79743c88bab35e023e23daf13831a8aa4e15f998b92f5507b644d8ffc3788afc8e64423c612e0785a6a92b74782ce368f49a6746084b50d874 languageName: node linkType: hard @@ -1996,11 +1870,11 @@ __metadata: linkType: hard "@npmcli/fs@npm:^3.1.0": - version: 3.1.0 - resolution: "@npmcli/fs@npm:3.1.0" + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" dependencies: semver: ^7.3.5 - checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + checksum: d960cab4b93adcb31ce223bfb75c5714edbd55747342efb67dcc2f25e023d930a7af6ece3e75f2f459b6f38fc14d031c766f116cd124fdc937fd33112579e820 languageName: node linkType: hard @@ -2265,17 +2139,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts-upgradeable@npm:^4.6.0": - version: 4.9.5 - resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.5" - checksum: d5d9bad93fe2a88a8336060901d45f185ebfe1fed9844b1fe50e8641d946588c6e69a5a8f1694f0bd073c913b4b9a5c34316acfc17d8f75228adecbcb635ea62 - languageName: node - linkType: hard - -"@openzeppelin/contracts-upgradeable@npm:^4.7.3, @openzeppelin/contracts-upgradeable@npm:^4.8.0, @openzeppelin/contracts-upgradeable@npm:^4.8.3": - version: 4.9.3 - resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.3" - checksum: bda0240b1d44c913ec5a4e109c622f216c2bbd7b468d210822f75782a5f7fe0609d08bf03b78b253333625e99e507cf2f75212f1de3b274bd9fc64ae967aeec3 +"@openzeppelin/contracts-upgradeable@npm:^4.6.0, @openzeppelin/contracts-upgradeable@npm:^4.7.3, @openzeppelin/contracts-upgradeable@npm:^4.8.0, @openzeppelin/contracts-upgradeable@npm:^4.8.3, @openzeppelin/contracts-upgradeable@npm:^4.9.2": + version: 4.9.6 + resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.6" + checksum: 481075e7222cab025ae55304263fca69a2d04305521957bc16d2aece9fa2b86b6914711724822493e3d04df7e793469cd0bcb1e09f0ddd10cb4e360ac7eed12a languageName: node linkType: hard @@ -2286,30 +2153,30 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.9.3, @openzeppelin/contracts@npm:^4.3.3, @openzeppelin/contracts@npm:^4.6.0, @openzeppelin/contracts@npm:^4.8.3": +"@openzeppelin/contracts@npm:4.9.3": version: 4.9.3 resolution: "@openzeppelin/contracts@npm:4.9.3" checksum: 4932063e733b35fa7669b9fe2053f69b062366c5c208b0c6cfa1ac451712100c78acff98120c3a4b88d94154c802be05d160d71f37e7d74cadbe150964458838 languageName: node linkType: hard -"@openzeppelin/contracts@npm:^4.4.1": - version: 4.9.5 - resolution: "@openzeppelin/contracts@npm:4.9.5" - checksum: 2cddeb08c006a8f99c5cc40cc80aecb449fd941cd1a92ebda315d77f48c4b4d487798a1254bffbc3ec811b390365d14665e92dbb2dd8f45aacef479d69d94574 +"@openzeppelin/contracts@npm:^4.3.3, @openzeppelin/contracts@npm:^4.4.1, @openzeppelin/contracts@npm:^4.6.0, @openzeppelin/contracts@npm:^4.8.3, @openzeppelin/contracts@npm:^4.9.2": + version: 4.9.6 + resolution: "@openzeppelin/contracts@npm:4.9.6" + checksum: 274b6e968268294f12d5ca4f0278f6e6357792c8bb4d76664f83dbdc325f780541538a127e6a6e97e4f018088b42f65952014dec9c745c0fa25081f43ef9c4bf languageName: node linkType: hard "@openzeppelin/defender-base-client@npm:^1.46.0": - version: 1.52.0 - resolution: "@openzeppelin/defender-base-client@npm:1.52.0" + version: 1.54.6 + resolution: "@openzeppelin/defender-base-client@npm:1.54.6" dependencies: amazon-cognito-identity-js: ^6.0.1 async-retry: ^1.3.3 axios: ^1.4.0 lodash: ^4.17.19 node-fetch: ^2.6.0 - checksum: 7857a656a534e54ae94f50d6bb7ad6a17860375581a792c293f15707ae66088a02e2eb7213bb8e7e00496ea4e86330cbcee1a383c517f0d2e959c76a3722cdcd + checksum: 75b260a545fd734b7678d5591b29847f5211466bad25caca95fc24490c36d49b419b1ef06e6abc9dc6c9b4be97ae2957e033f3050a8675ddd246da817eaedd83 languageName: node linkType: hard @@ -2351,8 +2218,8 @@ __metadata: linkType: hard "@openzeppelin/upgrades-core@npm:^1.27.0": - version: 1.31.1 - resolution: "@openzeppelin/upgrades-core@npm:1.31.1" + version: 1.34.4 + resolution: "@openzeppelin/upgrades-core@npm:1.34.4" dependencies: cbor: ^9.0.0 chalk: ^4.1.0 @@ -2364,7 +2231,25 @@ __metadata: solidity-ast: ^0.4.51 bin: openzeppelin-upgrades-core: dist/cli/cli.js - checksum: 5b424201e2deb41e8d1be00375768d8477b190ba70ca5af2385fb2437f9804be8fd5fee717c47734e3058a9568b52cad4101de47ef760abcf839e007df3eb2dd + checksum: a9dba51a78871088828d2eddf9d1b72fe31717f9a5216dd1f8a1fb20667d6396f805e0bdd92b476a2cfbab9efc3f42724dfdcd9a7e8b5f5953604be6ec4080aa + languageName: node + linkType: hard + +"@openzeppelin/upgrades-core@npm:~1.29.0": + version: 1.29.0 + resolution: "@openzeppelin/upgrades-core@npm:1.29.0" + dependencies: + cbor: ^9.0.0 + chalk: ^4.1.0 + compare-versions: ^6.0.0 + debug: ^4.1.1 + ethereumjs-util: ^7.0.3 + minimist: ^1.2.7 + proper-lockfile: ^4.1.1 + solidity-ast: ^0.4.26 + bin: + openzeppelin-upgrades-core: dist/cli/cli.js + checksum: 99dea5d180b56670ff01d0f4fd99f19def5904b0d764b5c79106878d866c7fd6576c1523661a71170947ef06ab83fbb189cd65747bfcd6b20c8ea29adcea8a0a languageName: node linkType: hard @@ -2402,10 +2287,10 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.1.0": - version: 1.1.3 - resolution: "@scure/base@npm:1.1.3" - checksum: 1606ab8a4db898cb3a1ada16c15437c3bce4e25854fadc8eb03ae93cbbbac1ed90655af4b0be3da37e12056fef11c0374499f69b9e658c9e5b7b3e06353c630c +"@scure/base@npm:~1.1.0, @scure/base@npm:~1.1.6": + version: 1.1.7 + resolution: "@scure/base@npm:1.1.7" + checksum: d9084be9a2f27971df1684af9e40bb750e86f549345e1bb3227fb61673c0c83569c92c1cb0a4ddccb32650b39d3cd3c145603b926ba751c9bc60c27317549b20 languageName: node linkType: hard @@ -2420,14 +2305,14 @@ __metadata: languageName: node linkType: hard -"@scure/bip32@npm:1.3.1": - version: 1.3.1 - resolution: "@scure/bip32@npm:1.3.1" +"@scure/bip32@npm:1.4.0": + version: 1.4.0 + resolution: "@scure/bip32@npm:1.4.0" dependencies: - "@noble/curves": ~1.1.0 - "@noble/hashes": ~1.3.1 - "@scure/base": ~1.1.0 - checksum: 394d65f77a40651eba21a5096da0f4233c3b50d422864751d373fcf142eeedb94a1149f9ab1dbb078086dab2d0bc27e2b1afec8321bf22d4403c7df2fea5bfe2 + "@noble/curves": ~1.4.0 + "@noble/hashes": ~1.4.0 + "@scure/base": ~1.1.6 + checksum: eff491651cbf2bea8784936de75af5fc020fc1bbb9bcb26b2cfeefbd1fb2440ebfaf30c0733ca11c0ae1e272a2ef4c3c34ba5c9fb3e1091c3285a4272045b0c6 languageName: node linkType: hard @@ -2441,13 +2326,13 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.2.1": - version: 1.2.1 - resolution: "@scure/bip39@npm:1.2.1" +"@scure/bip39@npm:1.3.0": + version: 1.3.0 + resolution: "@scure/bip39@npm:1.3.0" dependencies: - "@noble/hashes": ~1.3.0 - "@scure/base": ~1.1.0 - checksum: c5bd6f1328fdbeae2dcdd891825b1610225310e5e62a4942714db51066866e4f7bef242c7b06a1b9dcc8043a4a13412cf5c5df76d3b10aa9e36b82e9b6e3eeaa + "@noble/hashes": ~1.4.0 + "@scure/base": ~1.1.6 + checksum: dbb0b27df753eb6c6380010b25cc9a9ea31f9cb08864fc51e69e5880ff7e2b8f85b72caea1f1f28af165e83b72c48dd38617e43fc632779d025b50ba32ea759e languageName: node linkType: hard @@ -2659,12 +2544,57 @@ __metadata: languageName: node linkType: hard -"@smithy/types@npm:^2.4.0": - version: 2.5.0 - resolution: "@smithy/types@npm:2.5.0" +"@sinonjs/commons@npm:^2.0.0": + version: 2.0.0 + resolution: "@sinonjs/commons@npm:2.0.0" + dependencies: + type-detect: 4.0.8 + checksum: 5023ba17edf2b85ed58262313b8e9b59e23c6860681a9af0200f239fe939e2b79736d04a260e8270ddd57196851dde3ba754d7230be5c5234e777ae2ca8af137 + languageName: node + linkType: hard + +"@sinonjs/commons@npm:^3.0.0, @sinonjs/commons@npm:^3.0.1": + version: 3.0.1 + resolution: "@sinonjs/commons@npm:3.0.1" + dependencies: + type-detect: 4.0.8 + checksum: a7c3e7cc612352f4004873747d9d8b2d4d90b13a6d483f685598c945a70e734e255f1ca5dc49702515533c403b32725defff148177453b3f3915bcb60e9d4601 + languageName: node + linkType: hard + +"@sinonjs/fake-timers@npm:^11.2.2": + version: 11.2.2 + resolution: "@sinonjs/fake-timers@npm:11.2.2" + dependencies: + "@sinonjs/commons": ^3.0.0 + checksum: 68c29b0e1856fdc280df03ddbf57c726420b78e9f943a241b471edc018fb14ff36fdc1daafd6026cba08c3c7f50c976fb7ae11b88ff44cd7f609692ca7d25158 + languageName: node + linkType: hard + +"@sinonjs/samsam@npm:^8.0.0": + version: 8.0.0 + resolution: "@sinonjs/samsam@npm:8.0.0" + dependencies: + "@sinonjs/commons": ^2.0.0 + lodash.get: ^4.4.2 + type-detect: ^4.0.8 + checksum: 95e40d0bb9f7288e27c379bee1b03c3dc51e7e78b9d5ea6aef66a690da7e81efc4715145b561b449cefc5361a171791e3ce30fb1a46ab247d4c0766024c60a60 + languageName: node + linkType: hard + +"@sinonjs/text-encoding@npm:^0.7.2": + version: 0.7.2 + resolution: "@sinonjs/text-encoding@npm:0.7.2" + checksum: fe690002a32ba06906cf87e2e8fe84d1590294586f2a7fd180a65355b53660c155c3273d8011a5f2b77209b819aa7306678ae6e4aea0df014bd7ffd4bbbcf1ab + languageName: node + linkType: hard + +"@smithy/types@npm:^3.3.0": + version: 3.3.0 + resolution: "@smithy/types@npm:3.3.0" dependencies: - tslib: ^2.5.0 - checksum: 9e03dcf6c9ae7239218ccecae0a04d5f0aaab42e17a326590becfd68f1b15ba1291ed408501efab4a20a0542d995b5a859ab58ca83cd4f3e2dbf430785e207a6 + tslib: ^2.6.2 + checksum: 29bb5f83c41e32f8d4094a2aba2d3dfbd763ab5943784a700f3fa22df0dcf0ccac1b1907f7a87fbb9f6f2269fcd4750524bcb48f892249e200ffe397c0981309 languageName: node linkType: hard @@ -2686,7 +2616,7 @@ __metadata: languageName: node linkType: hard -"@solidity-parser/parser@npm:^0.16.0, @solidity-parser/parser@npm:^0.16.2": +"@solidity-parser/parser@npm:^0.16.0": version: 0.16.2 resolution: "@solidity-parser/parser@npm:0.16.2" dependencies: @@ -2695,6 +2625,20 @@ __metadata: languageName: node linkType: hard +"@solidity-parser/parser@npm:^0.17.0": + version: 0.17.0 + resolution: "@solidity-parser/parser@npm:0.17.0" + checksum: 2f47732c9a4f6b264ce6c8a0544bd5a0805f824d3c40a8a253e59d5dbe9a98163f55c06460232f57a6b389bb5235c18d0563f94425202ec2f859d88f2378e0ac + languageName: node + linkType: hard + +"@solidity-parser/parser@npm:^0.18.0": + version: 0.18.0 + resolution: "@solidity-parser/parser@npm:0.18.0" + checksum: 970d991529d632862fa88e107531339d84df35bf0374e31e8215ce301b19a01ede33fccf4d374402649814263f8bc278a8e6d62a0129bb877539fbdd16a604cc + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -2720,10 +2664,22 @@ __metadata: languageName: node linkType: hard +"@ts-morph/common@npm:~0.23.0": + version: 0.23.0 + resolution: "@ts-morph/common@npm:0.23.0" + dependencies: + fast-glob: ^3.3.2 + minimatch: ^9.0.3 + mkdirp: ^3.0.1 + path-browserify: ^1.0.1 + checksum: 96463742ec1114900901ded8aecc2c9664b20119454a56c896042e6a5e5b153af1d986467362d737ed0130506aeac9655731922dc8c4e851a16f9c1a8a8099b4 + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": - version: 1.0.9 - resolution: "@tsconfig/node10@npm:1.0.9" - checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df + version: 1.0.11 + resolution: "@tsconfig/node10@npm:1.0.11" + checksum: 51fe47d55fe1b80ec35e6e5ed30a13665fd3a531945350aa74a14a1e82875fb60b350c2f2a5e72a64831b1b6bc02acb6760c30b3738b54954ec2dea82db7a267 languageName: node linkType: hard @@ -2780,15 +2736,6 @@ __metadata: languageName: node linkType: hard -"@types/async-eventemitter@npm:^0.2.1": - version: 0.2.4 - resolution: "@types/async-eventemitter@npm:0.2.4" - dependencies: - "@types/events": "*" - checksum: cee62e258cf02a45688a3f6f517b623270a9c2779dfd2f53b52e0efbcb0282d7078c3ce1fafb2af257aefdb892acc09ba51d93647930885414ec719437430bf7 - languageName: node - linkType: hard - "@types/bn.js@npm:^4.11.3": version: 4.11.6 resolution: "@types/bn.js@npm:4.11.6" @@ -2816,17 +2763,10 @@ __metadata: languageName: node linkType: hard -"@types/chai@npm:*": - version: 4.3.10 - resolution: "@types/chai@npm:4.3.10" - checksum: cb9ebe31f5da2d72c4b9362ec4efb33497355372270163c0290f6b9c389934ff178dac933be6b2911a125f15972c0379603736ea83ad10bfca933b6aaf6c0c5b - languageName: node - linkType: hard - -"@types/chai@npm:^4.3.1": - version: 4.3.11 - resolution: "@types/chai@npm:4.3.11" - checksum: d0c05fe5d02b2e6bbca2bd4866a2ab20a59cf729bc04af0060e7a3277eaf2fb65651b90d4c74b0ebf1d152b4b1d49fa8e44143acef276a2bbaa7785fbe5642d3 +"@types/chai@npm:*, @types/chai@npm:^4.3.1": + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: bb5f52d1b70534ed8b4bf74bd248add003ffe1156303802ea367331607c06b494da885ffbc2b674a66b4f90c9ee88759790a5f243879f6759f124f22328f5e95 languageName: node linkType: hard @@ -2839,13 +2779,6 @@ __metadata: languageName: node linkType: hard -"@types/events@npm:*": - version: 3.0.3 - resolution: "@types/events@npm:3.0.3" - checksum: 50af9312fab001fd6bd4bb3ff65830f940877e6778de140a92481a0d9bf5f4853d44ec758a8800ef60e0598ac43ed1b5688116a3c65906ae54e989278d6c7c82 - languageName: node - linkType: hard - "@types/form-data@npm:0.0.33": version: 0.0.33 resolution: "@types/form-data@npm:0.0.33" @@ -2901,11 +2834,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 20.9.0 - resolution: "@types/node@npm:20.9.0" + version: 22.0.0 + resolution: "@types/node@npm:22.0.0" dependencies: - undici-types: ~5.26.4 - checksum: bfd927da6bff8a32051fa44bb47ca32a56d2c8bc8ba0170770f181cc1fa3c0b05863c9b930f0ba8604a48d5eb0d319166601709ca53bf2deae0025d8b6c6b8a3 + undici-types: ~6.11.1 + checksum: ef58d59bbffd9a79449ef632ea9a4f3b006496926cac2717368f80fdd152b1937e44093c17c9fac74650309c9d5387bb5c5bf4fd304adafebcbda1e6e4435fe4 languageName: node linkType: hard @@ -2924,11 +2857,11 @@ __metadata: linkType: hard "@types/node@npm:^18.7.1": - version: 18.18.9 - resolution: "@types/node@npm:18.18.9" + version: 18.19.42 + resolution: "@types/node@npm:18.19.42" dependencies: undici-types: ~5.26.4 - checksum: 629ce20357586144031cb43d601617eef45e59460dea6b1e123f708e6885664f44d54f65e5b72b2614af5b8613f3652ced832649c0b991accbc6a85139befa51 + checksum: 3f976583d3f4ff6040187f98e838337d59134e53bfe1cf241d8143e87e6f9507a1ad0aa435ea550c21d76c6cabb78f63a410413de476764f45695378cc022377 languageName: node linkType: hard @@ -2970,19 +2903,9 @@ __metadata: linkType: hard "@types/qs@npm:^6.2.31, @types/qs@npm:^6.9.7": - version: 6.9.10 - resolution: "@types/qs@npm:6.9.10" - checksum: 3e479ee056bd2b60894baa119d12ecd33f20a25231b836af04654e784c886f28a356477630430152a86fba253da65d7ecd18acffbc2a8877a336e75aa0272c67 - languageName: node - linkType: hard - -"@types/readable-stream@npm:^2.3.13": - version: 2.3.15 - resolution: "@types/readable-stream@npm:2.3.15" - dependencies: - "@types/node": "*" - safe-buffer: ~5.1.1 - checksum: ec36f525cad09b6c65a1dafcb5ad99b9e2ed824ec49b7aa23180ac427e5d35b8a0706193ecd79ab4253a283ad485ba03d5917a98daaaa144f0ea34f4823e9d82 + version: 6.9.15 + resolution: "@types/qs@npm:6.9.15" + checksum: 97d8208c2b82013b618e7a9fc14df6bd40a73e1385ac479b6896bafc7949a46201c15f42afd06e86a05e914f146f495f606b6fb65610cc60cf2e0ff743ec38a2 languageName: node linkType: hard @@ -2996,9 +2919,9 @@ __metadata: linkType: hard "@types/semver@npm:^7.3.12": - version: 7.5.5 - resolution: "@types/semver@npm:7.5.5" - checksum: 533e6c93d1262d65f449423d94a445f7f3db0672e7429f21b6a1636d6051dbab3a2989ddcda9b79c69bb37830931d09fc958a65305a891357f5cea3257c297f5 + version: 7.5.8 + resolution: "@types/semver@npm:7.5.8" + checksum: ea6f5276f5b84c55921785a3a27a3cd37afee0111dfe2bcb3e03c31819c197c782598f17f0b150a69d453c9584cd14c4c4d7b9a55d2c5e6cacd4d66fdb3b3663 languageName: node linkType: hard @@ -3142,29 +3065,13 @@ __metadata: linkType: hard "@venusprotocol/governance-contracts@npm:^2.1.0": - version: 2.1.0 - resolution: "@venusprotocol/governance-contracts@npm:2.1.0" + version: 2.2.0 + resolution: "@venusprotocol/governance-contracts@npm:2.2.0" dependencies: "@venusprotocol/solidity-utilities": 2.0.0 hardhat-deploy-ethers: ^0.3.0-beta.13 module-alias: ^2.2.2 - checksum: af3f5e8705e54c99a86f47007ce67a04bb1f110c679ad2f9d722f548883b1eb14a28b54c46ee8340d7fa1ba097e1e4d788c98850ee046abe4d91a0315879ec9f - languageName: node - linkType: hard - -"@venusprotocol/isolated-pools@npm:^2.3.0": - version: 2.4.0 - resolution: "@venusprotocol/isolated-pools@npm:2.4.0" - dependencies: - "@nomiclabs/hardhat-ethers": ^2.2.3 - "@openzeppelin/contracts": ^4.8.3 - "@openzeppelin/contracts-upgradeable": ^4.8.3 - "@openzeppelin/hardhat-upgrades": ^1.21.0 - "@solidity-parser/parser": ^0.13.2 - ethers: ^5.7.0 - hardhat-deploy: ^0.11.14 - module-alias: ^2.2.2 - checksum: c67b2d1eaf2ae7cae1e7b73799ec1dd0ffd3bc996bea09fc6e6c909f416f65fa168bd0690034ce8882da0d0b9a8825032dde3dd15bad392a5a5cad32bf697a73 + checksum: 8e6ba9b824a47cc03b296e4cfa2f9781e30e412710dd71f1e52d7b0d41d8cd6efb0b877239edadbf4eb382bda57436d96a4ee5cac6d0fae29b555ccdb68fc8c0 languageName: node linkType: hard @@ -3189,44 +3096,26 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/protocol-reserve@npm:^1.1.0": - version: 1.2.0 - resolution: "@venusprotocol/protocol-reserve@npm:1.2.0" - dependencies: - "@nomiclabs/hardhat-ethers": ^2.2.3 - "@openzeppelin/contracts": ^4.8.3 - "@openzeppelin/contracts-upgradeable": ^4.8.3 - "@openzeppelin/hardhat-upgrades": ^1.21.0 - "@solidity-parser/parser": ^0.13.2 - "@venusprotocol/solidity-utilities": ^1.0.1 - ethers: ^5.7.0 - hardhat-deploy: ^0.11.14 - module-alias: ^2.2.2 - checksum: 9225fba3254a9a4f2ce6e004a43844db15771d1047e871e8ab306440df8bde6dcdab1e45a4ce1172e1119b04ed5f53242ef561cb26f9a411fa2178c246899fa9 - languageName: node - linkType: hard - -"@venusprotocol/protocol-reserve@npm:^1.4.0": - version: 1.4.0 - resolution: "@venusprotocol/protocol-reserve@npm:1.4.0" +"@venusprotocol/protocol-reserve@npm:^1.1.0, @venusprotocol/protocol-reserve@npm:^1.4.0": + version: 1.5.0 + resolution: "@venusprotocol/protocol-reserve@npm:1.5.0" dependencies: "@nomiclabs/hardhat-ethers": ^2.2.3 "@openzeppelin/contracts": ^4.8.3 "@openzeppelin/contracts-upgradeable": ^4.8.3 "@openzeppelin/hardhat-upgrades": ^1.21.0 "@solidity-parser/parser": ^0.13.2 - "@venusprotocol/isolated-pools": ^2.3.0 "@venusprotocol/solidity-utilities": ^1.3.0 ethers: ^5.7.0 hardhat-deploy: ^0.11.14 module-alias: ^2.2.2 - checksum: 6b9bc35ac7cdb2d828312c9ebcba1c55e3b63d6d8d237affa7b5baf94b5c2a86e296552c153a5c077f9b6178cc73c7fd20804126509a8a8670c5b50eeae41d2d + checksum: 813bc162103ab756e84bbb0e65fd416ed105cb4a06f9fe55d4a2a066af5bd63b11ca9f2c791376148114ce2b469970c8fe29c85ee1d47f9da9841f2eac8b01e0 languageName: node linkType: hard "@venusprotocol/protocol-reserve@npm:^2.0.0": - version: 2.0.0 - resolution: "@venusprotocol/protocol-reserve@npm:2.0.0" + version: 2.2.0 + resolution: "@venusprotocol/protocol-reserve@npm:2.2.0" dependencies: "@nomiclabs/hardhat-ethers": ^2.2.3 "@openzeppelin/contracts": ^4.8.3 @@ -3238,39 +3127,25 @@ __metadata: ethers: ^5.7.0 hardhat-deploy: ^0.11.14 module-alias: ^2.2.2 - checksum: a0e1f2621b7c29649755e518c87e7e93a452a9dadbc82dc434e5fa3728091a928038af6c40c532f6880beea0f1e06e43f0690df2e53e516b8973838be3a21984 + checksum: ae875b95c1adabcc73ca52f74bf3f875c15e8a29cc6cbdf08038542692e5c397d986424194f1e1819659b0bc17d53770e75e7f74304ecbee24e9e84dd4ef79ed languageName: node linkType: hard -"@venusprotocol/solidity-utilities@npm:2.0.0, @venusprotocol/solidity-utilities@npm:^2.0.0": +"@venusprotocol/solidity-utilities@npm:2.0.0": version: 2.0.0 resolution: "@venusprotocol/solidity-utilities@npm:2.0.0" checksum: 87a2ce2fd1d702bc04c4e98d675b904176c7f2489476e8da586d1782b48faae92aa4f2ba894737773d189ba72a6b274f1464cf2e0308e62758303d0adde749e6 languageName: node linkType: hard -"@venusprotocol/solidity-utilities@npm:^1.0.1": - version: 1.1.0 - resolution: "@venusprotocol/solidity-utilities@npm:1.1.0" - checksum: 3b17ec451cd0ba5aaea76686c7bef35757fb158709214be094f73ebd0d643c79817159f7aa162cc694e1a5ee1f02b20e26211a65929113b985827959aae99fa7 - languageName: node - linkType: hard - -"@venusprotocol/solidity-utilities@npm:^1.1.0, @venusprotocol/solidity-utilities@npm:^1.2.0": - version: 1.2.0 - resolution: "@venusprotocol/solidity-utilities@npm:1.2.0" - checksum: b3d17a6747330da2e24a27dc0741e26a5def95307136abbcba5231fa7d9104d47458e4f0e436846aa83f6f968f67251fb6e0a8f71f4257b4151dffb6cf19810a - languageName: node - linkType: hard - -"@venusprotocol/solidity-utilities@npm:^1.3.0": +"@venusprotocol/solidity-utilities@npm:^1.1.0, @venusprotocol/solidity-utilities@npm:^1.2.0, @venusprotocol/solidity-utilities@npm:^1.3.0": version: 1.3.0 resolution: "@venusprotocol/solidity-utilities@npm:1.3.0" checksum: d1109365a5e01959c47b25fb129373db93792e60bf1bc0ed324b63c2a64f6e4a7878ebf016cfade94bc41a2c1245d3e861fdc6b8c5844ac210ed1d73e7307e72 languageName: node linkType: hard -"@venusprotocol/solidity-utilities@npm:^2.0.3": +"@venusprotocol/solidity-utilities@npm:^2.0.0, @venusprotocol/solidity-utilities@npm:^2.0.3": version: 2.0.3 resolution: "@venusprotocol/solidity-utilities@npm:2.0.3" checksum: 5f196d61989e1b276b6f2d515c0410f3af07deee9bec58a6657e61d46b1810b2da6e2880d1ec737fd410f23a035c2db47b6a3ab2274cac229cabfcf03d4424ac @@ -3293,8 +3168,8 @@ __metadata: linkType: hard "@venusprotocol/token-bridge@npm:^2.0.0": - version: 2.0.0 - resolution: "@venusprotocol/token-bridge@npm:2.0.0" + version: 2.1.0 + resolution: "@venusprotocol/token-bridge@npm:2.1.0" dependencies: "@layerzerolabs/solidity-examples": ^1.0.0 "@openzeppelin/contracts": ^4.8.3 @@ -3303,7 +3178,7 @@ __metadata: "@solidity-parser/parser": ^0.13.2 ethers: ^5.7.0 module-alias: ^2.2.2 - checksum: 9e0c77ae7d1dc9e5df18157c00052cb30ccc166c1ad0abafffe2cc8baa4ea5f64f34cb283a9754c664a982dc1dd6c1e8133bbabedc1924a1615bd1a7d69f95fb + checksum: 022163873126822b7cd84bd470b2f7bdb439cad1ac78136a5956418803bdc873360de28ab8d1e50f28ab80add900d56660c8273ac132ba47bbd3c3890b67b046 languageName: node linkType: hard @@ -3352,10 +3227,15 @@ __metadata: "@ethersproject/abstract-signer": ^5 "@ethersproject/bytes": ^5.0.0 "@ethersproject/providers": ^5.6.8 + "@matterlabs/hardhat-zksync": ^0.2.0 + "@matterlabs/hardhat-zksync-deploy": ^0.11.0 + "@matterlabs/hardhat-zksync-solc": ^1.2.1 + "@matterlabs/hardhat-zksync-verify": 0.7.0 "@nomicfoundation/hardhat-chai-matchers": ^1.0.3 "@nomicfoundation/hardhat-ethers": ^3.0.0 "@nomicfoundation/hardhat-network-helpers": ^1.0.10 "@nomicfoundation/hardhat-toolbox": ^2.0.0 + "@nomicfoundation/hardhat-verify": ^2.0.8 "@nomiclabs/hardhat-etherscan": ^3.1.0 "@openzeppelin/contracts": 4.9.3 "@openzeppelin/contracts-upgradeable": ^4.8.0 @@ -3384,7 +3264,7 @@ __metadata: ethers: ^5.7.0 hardhat: ^2.19.2 hardhat-contract-sizer: ^2.8.0 - hardhat-deploy: ^0.11.14 + hardhat-deploy: ^0.12.4 hardhat-deploy-ethers: ^0.3.0-beta.13 hardhat-gas-reporter: ^1.0.8 husky: ^8.0.1 @@ -3399,76 +3279,76 @@ __metadata: typechain: ^8.1.0 typescript: ^4.7.4 web3-utils: ^1.7.5 + zksync-ethers: ^5.9.1 languageName: unknown linkType: soft -"@vue/compiler-core@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/compiler-core@npm:3.3.8" +"@vue/compiler-core@npm:3.4.34": + version: 3.4.34 + resolution: "@vue/compiler-core@npm:3.4.34" dependencies: - "@babel/parser": ^7.23.0 - "@vue/shared": 3.3.8 + "@babel/parser": ^7.24.7 + "@vue/shared": 3.4.34 + entities: ^4.5.0 estree-walker: ^2.0.2 - source-map-js: ^1.0.2 - checksum: 772e9ec2049b53f3ee69f657f93e6b7a14a24aa51d2baecaa311805c6a328b944358143bf01ca58f189ad3e5239e2b057e1877e98c42939a8dd7b281741ec71c + source-map-js: ^1.2.0 + checksum: 397e76fec66bb5481b32823aa9530e9810bb39c33b5ac78b4488e8814f5779bbc4d1d85cac98fe96c3036e83105ccad0fb813e15cb8b5d201343dfef99750041 languageName: node linkType: hard -"@vue/compiler-dom@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/compiler-dom@npm:3.3.8" +"@vue/compiler-dom@npm:3.4.34": + version: 3.4.34 + resolution: "@vue/compiler-dom@npm:3.4.34" dependencies: - "@vue/compiler-core": 3.3.8 - "@vue/shared": 3.3.8 - checksum: f897be7f08217e98d9b6cdf2f4663453f44cbddc4b84b74b3f979d78fc4b71021f4acfb1a5051b6af05378349ff423a37471ba595bde9c2441e610ba0b4f36d4 + "@vue/compiler-core": 3.4.34 + "@vue/shared": 3.4.34 + checksum: 6ba068d0274048eb25e3ef9665bbe6e4f9a65841ab4fd22336a6c5b760e9474c8260b31f514fbce3f3bf23e55e452c4be58cf35efafdb42c6a2d524e27cec1ca languageName: node linkType: hard "@vue/compiler-sfc@npm:^3.2.40": - version: 3.3.8 - resolution: "@vue/compiler-sfc@npm:3.3.8" - dependencies: - "@babel/parser": ^7.23.0 - "@vue/compiler-core": 3.3.8 - "@vue/compiler-dom": 3.3.8 - "@vue/compiler-ssr": 3.3.8 - "@vue/reactivity-transform": 3.3.8 - "@vue/shared": 3.3.8 + version: 3.4.34 + resolution: "@vue/compiler-sfc@npm:3.4.34" + dependencies: + "@babel/parser": ^7.24.7 + "@vue/compiler-core": 3.4.34 + "@vue/compiler-dom": 3.4.34 + "@vue/compiler-ssr": 3.4.34 + "@vue/shared": 3.4.34 estree-walker: ^2.0.2 - magic-string: ^0.30.5 - postcss: ^8.4.31 - source-map-js: ^1.0.2 - checksum: 7f931f3fe3fd117974b20f497267e9c29fea83d5703fe65aad5f0ea63c9563581b186acf02cdd1d85526395f0067dde9d05c5e522d9cffba2168b16c4a9414d9 + magic-string: ^0.30.10 + postcss: ^8.4.39 + source-map-js: ^1.2.0 + checksum: e9fc4ee40372d7b5e18eb8921aa469bf224a6e6fbc33fe1a73dd16ee89c914f5ceb912e4e61453841de00e2a1dbc52e92b556e62436342637efbc19129d97eb2 languageName: node linkType: hard -"@vue/compiler-ssr@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/compiler-ssr@npm:3.3.8" +"@vue/compiler-ssr@npm:3.4.34": + version: 3.4.34 + resolution: "@vue/compiler-ssr@npm:3.4.34" dependencies: - "@vue/compiler-dom": 3.3.8 - "@vue/shared": 3.3.8 - checksum: eddfbc884c0340ce0acccca503a10c04dc0bf8b612fb4220f7e6d41f9efe1c44fed37615ea5fc62d73e62c4900f55c44175f5d0a17d25b607367cbb127e61b67 + "@vue/compiler-dom": 3.4.34 + "@vue/shared": 3.4.34 + checksum: f066036859f6de1882a941e1fce7904d3bb091f858ab1ad40926e9d5bbb92ece883835e267a93b07d938c048480d51109cb776047d02b8bbe47fe4282d1bb78e languageName: node linkType: hard -"@vue/reactivity-transform@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/reactivity-transform@npm:3.3.8" - dependencies: - "@babel/parser": ^7.23.0 - "@vue/compiler-core": 3.3.8 - "@vue/shared": 3.3.8 - estree-walker: ^2.0.2 - magic-string: ^0.30.5 - checksum: cc846146fe88aad18c9b7a5597862bee6763ad8c5afb9985a407c25430e9b512c450cf67972f944ab41f9cf3fd5237fd741c31a85a6c0961c49774cedbd0f2ff +"@vue/shared@npm:3.4.34": + version: 3.4.34 + resolution: "@vue/shared@npm:3.4.34" + checksum: 6383d05a23137b66a9f2b4e18ca7da874eab4b059db1ce62c0f1220c99670a8349987ef9f376e832b208afa521041323c0b6860f7e1dd55974b78c128df74fc7 languageName: node linkType: hard -"@vue/shared@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/shared@npm:3.3.8" - checksum: d5bd795977c885017498e839f5462bc2b046fb4a4c4bf925b82ac0eaf883c1cf9203d69f17160f7be7b3c1d9acb5513d57010b401407b63f3c36c7af87778fae +"JSONStream@npm:1.3.2": + version: 1.3.2 + resolution: "JSONStream@npm:1.3.2" + dependencies: + jsonparse: ^1.2.0 + through: ">=2.2.7 <3" + bin: + JSONStream: ./bin.js + checksum: d83b86f846eaeba7b947181245b977bb7e32c49e25d210234ecbf6b2d9128924610224e150558deeb65d063b07b8c28e5a1a4ab8daeb89d4c34e718047f046fd languageName: node linkType: hard @@ -3505,21 +3385,6 @@ __metadata: languageName: node linkType: hard -"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": - version: 1.0.3 - resolution: "abstract-level@npm:1.0.3" - dependencies: - buffer: ^6.0.3 - catering: ^2.1.0 - is-buffer: ^2.0.5 - level-supports: ^4.0.0 - level-transcoder: ^1.0.1 - module-error: ^1.0.1 - queue-microtask: ^1.2.3 - checksum: 70d61a3924526ebc257b138992052f9ff571a6cee5a7660836e37a1cc7081273c3acf465dd2f5e1897b38dc743a6fd9dba14a5d8a2a9d39e5787cd3da99f301d - languageName: node - linkType: hard - "acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" @@ -3530,25 +3395,20 @@ __metadata: linkType: hard "acorn-walk@npm:^8.1.1": - version: 8.3.0 - resolution: "acorn-walk@npm:8.3.0" - checksum: 15ea56ab6529135be05e7d018f935ca80a572355dd3f6d3cd717e36df3346e0f635a93ae781b1c7942607693e2e5f3ef81af5c6fc697bbadcc377ebda7b7f5f6 + version: 8.3.3 + resolution: "acorn-walk@npm:8.3.3" + dependencies: + acorn: ^8.11.0 + checksum: 0f09d351fc30b69b2b9982bf33dc30f3d35a34e030e5f1ed3c49fc4e3814a192bf3101e4c30912a0595410f5e91bb70ddba011ea73398b3ecbfe41c7334c6dd0 languageName: node linkType: hard -"acorn@npm:^8.4.1, acorn@npm:^8.9.0": - version: 8.11.2 - resolution: "acorn@npm:8.11.2" +"acorn@npm:^8.11.0, acorn@npm:^8.4.1, acorn@npm:^8.9.0": + version: 8.12.1 + resolution: "acorn@npm:8.12.1" bin: acorn: bin/acorn - checksum: 818450408684da89423e3daae24e4dc9b68692db8ab49ea4569c7c5abb7a3f23669438bf129cc81dfdada95e1c9b944ee1bfca2c57a05a4dc73834a612fbf6a7 - languageName: node - linkType: hard - -"address@npm:^1.0.1": - version: 1.2.2 - resolution: "address@npm:1.2.2" - checksum: ace439960c1e3564d8f523aff23a841904bf33a2a7c2e064f7f60a064194075758b9690e65bd9785692a4ef698a998c57eb74d145881a1cecab8ba658ddb1607 + checksum: 677880034aee5bdf7434cc2d25b641d7bedb0b5ef47868a78dadabedccf58e1c5457526d9d8249cd253f2df087e081c3fe7d903b448d8e19e5131a3065b83c07 languageName: node linkType: hard @@ -3575,12 +3435,12 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" dependencies: debug: ^4.3.4 - checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + checksum: 51c158769c5c051482f9ca2e6e1ec085ac72b5a418a9b31b4e82fe6c0a6699adb94c1c42d246699a587b3335215037091c79e0de512c516f73b6ea844202f037 languageName: node linkType: hard @@ -3616,27 +3476,27 @@ __metadata: linkType: hard "ajv@npm:^8.0.1, ajv@npm:^8.11.0": - version: 8.12.0 - resolution: "ajv@npm:8.12.0" + version: 8.17.1 + resolution: "ajv@npm:8.17.1" dependencies: - fast-deep-equal: ^3.1.1 + fast-deep-equal: ^3.1.3 + fast-uri: ^3.0.1 json-schema-traverse: ^1.0.0 require-from-string: ^2.0.2 - uri-js: ^4.2.2 - checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 + checksum: 1797bf242cfffbaf3b870d13565bd1716b73f214bb7ada9a497063aada210200da36e3ed40237285f3255acc4feeae91b1fb183625331bad27da95973f7253d9 languageName: node linkType: hard "amazon-cognito-identity-js@npm:^6.0.1": - version: 6.3.7 - resolution: "amazon-cognito-identity-js@npm:6.3.7" + version: 6.3.13 + resolution: "amazon-cognito-identity-js@npm:6.3.13" dependencies: "@aws-crypto/sha256-js": 1.2.2 buffer: 4.9.2 fast-base64-decode: ^1.0.0 isomorphic-unfetch: ^3.0.0 js-cookie: ^2.2.1 - checksum: 51e2ecffa4e1c7084dc0c6b568ddb12be195c758a1a6dc0a305fc279ea8a2e5c53a72ebde913013f0df61a6542186484658115034d30dd3772c989b4d20f7152 + checksum: 8a608ef1b99fca57d87103ceb2706d38e499a548d7724f194d50a709fa564ec63dbc703ded6a106e112d5443d06859f40e242815c25c465fdee4806bbce79459 languageName: node linkType: hard @@ -3647,14 +3507,16 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:4.1.1": - version: 4.1.1 - resolution: "ansi-colors@npm:4.1.1" - checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 +"ansi-align@npm:^3.0.0": + version: 3.0.1 + resolution: "ansi-align@npm:3.0.1" + dependencies: + string-width: ^4.1.0 + checksum: 6abfa08f2141d231c257162b15292467081fa49a208593e055c866aa0455b57f3a86b5a678c190c618faa79b4c59e254493099cb700dd9cf2293c6be2c8f5d8d languageName: node linkType: hard -"ansi-colors@npm:^4.1.1": +"ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e @@ -3671,11 +3533,9 @@ __metadata: linkType: hard "ansi-escapes@npm:^6.2.0": - version: 6.2.0 - resolution: "ansi-escapes@npm:6.2.0" - dependencies: - type-fest: ^3.0.0 - checksum: f0bc667d5f1ededc3ea89b73c34f0cba95473525b07e1290ddfd3fc868c94614e95f3549f5c4fd0c05424af7d3fd298101fb3d9a52a597d3782508b340783bd7 + version: 6.2.1 + resolution: "ansi-escapes@npm:6.2.1" + checksum: 4bdbabe0782a1d4007157798f8acab745d1d5e440c872e6792880d08025e0baababa6b85b36846e955fde7d1e4bf572cdb1fddf109de196e9388d7a1c55ce30d languageName: node linkType: hard @@ -3826,13 +3686,13 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "array-buffer-byte-length@npm:1.0.0" +"array-buffer-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: - call-bind: ^1.0.2 - is-array-buffer: ^3.0.1 - checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + call-bind: ^1.0.5 + is-array-buffer: ^3.0.4 + checksum: 53524e08f40867f6a9f35318fafe467c32e45e9c682ba67b11943e167344d2febc0f6977a17e699b05699e805c3e8f073d876f8bbf1b559ed494ad2cd0fae09e languageName: node linkType: hard @@ -3858,30 +3718,32 @@ __metadata: linkType: hard "array.prototype.findlast@npm:^1.2.2": - version: 1.2.3 - resolution: "array.prototype.findlast@npm:1.2.3" + version: 1.2.5 + resolution: "array.prototype.findlast@npm:1.2.5" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - es-shim-unscopables: ^1.0.0 - get-intrinsic: ^1.2.1 - checksum: 853d359bac5c4ce7354e5f2f2930f09eb47eeed18b6d6fb630cf6fa1fe4f32217fd27d07ee4aeeb3d1fd710538cf7bc00d4efc34df64da49fff0b13f57b0d66f + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-shim-unscopables: ^1.0.2 + checksum: 83ce4ad95bae07f136d316f5a7c3a5b911ac3296c3476abe60225bc4a17938bf37541972fcc37dd5adbc99cbb9c928c70bbbfc1c1ce549d41a415144030bb446 languageName: node linkType: hard -"arraybuffer.prototype.slice@npm:^1.0.2": - version: 1.0.2 - resolution: "arraybuffer.prototype.slice@npm:1.0.2" +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" dependencies: - array-buffer-byte-length: ^1.0.0 - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - get-intrinsic: ^1.2.1 - is-array-buffer: ^3.0.2 + array-buffer-byte-length: ^1.0.1 + call-bind: ^1.0.5 + define-properties: ^1.2.1 + es-abstract: ^1.22.3 + es-errors: ^1.2.1 + get-intrinsic: ^1.2.3 + is-array-buffer: ^3.0.4 is-shared-array-buffer: ^1.0.2 - checksum: c200faf437786f5b2c80d4564ff5481c886a16dee642ef02abdc7306c7edd523d1f01d1dd12b769c7eb42ac9bc53874510db19a92a2c035c0f6696172aafa5d3 + checksum: 352259cba534dcdd969c92ab002efd2ba5025b2e3b9bead3973150edbdf0696c629d7f4b3f061c5931511e8207bdc2306da614703c820b45dabce39e3daf7e3e languageName: node linkType: hard @@ -3899,6 +3761,15 @@ __metadata: languageName: node linkType: hard +"asn1@npm:^0.2.6": + version: 0.2.6 + resolution: "asn1@npm:0.2.6" + dependencies: + safer-buffer: ~2.1.0 + checksum: 39f2ae343b03c15ad4f238ba561e626602a3de8d94ae536c46a4a93e69578826305366dc09fbb9b56aec39b4982a463682f259c38e59f6fa380cd72cd61e493d + languageName: node + linkType: hard + "assertion-error@npm:^1.1.0": version: 1.1.0 resolution: "assertion-error@npm:1.1.0" @@ -3920,15 +3791,6 @@ __metadata: languageName: node linkType: hard -"async-eventemitter@npm:^0.2.4": - version: 0.2.4 - resolution: "async-eventemitter@npm:0.2.4" - dependencies: - async: ^2.4.0 - checksum: b9e77e0f58ebd7188c50c23d613d1263e0ab501f5e677e02b57cc97d7032beaf60aafa189887e7105569c791e212df4af00b608be1e9a4c425911d577124911e - languageName: node - linkType: hard - "async-retry@npm:^1.3.3": version: 1.3.3 resolution: "async-retry@npm:1.3.3" @@ -3945,15 +3807,6 @@ __metadata: languageName: node linkType: hard -"async@npm:^2.4.0": - version: 2.6.4 - resolution: "async@npm:2.6.4" - dependencies: - lodash: ^4.17.14 - checksum: a52083fb32e1ebe1d63e5c5624038bb30be68ff07a6c8d7dfe35e47c93fc144bd8652cbec869e0ac07d57dde387aa5f1386be3559cdee799cb1f789678d88e19 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -3968,10 +3821,12 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.5": - version: 1.0.5 - resolution: "available-typed-arrays@npm:1.0.5" - checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: ^1.0.0 + checksum: 1aa3ffbfe6578276996de660848b6e95669d9a95ad149e3dd0c0cda77db6ee1dbd9d1dd723b65b6d277b882dd0c4b91a654ae9d3cf9e1254b7e93e4908d78fd3 languageName: node linkType: hard @@ -3984,14 +3839,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.4.0, axios@npm:^1.5.1": - version: 1.6.1 - resolution: "axios@npm:1.6.1" +"axios@npm:^1.4.0, axios@npm:^1.5.1, axios@npm:^1.7.2": + version: 1.7.2 + resolution: "axios@npm:1.7.2" dependencies: - follow-redirects: ^1.15.0 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 573f03f59b7487d54551b16f5e155d1d130ad4864ed32d1da93d522b78a57123b34e3bde37f822a65ee297e79f1db840f9ad6514addff50d3cbf5caeed39e8dc + checksum: e457e2b0ab748504621f6fa6609074ac08c824bf0881592209dfa15098ece7e88495300e02cd22ba50b3468fd712fe687e629dcb03d6a3f6a51989727405aedf languageName: node linkType: hard @@ -4003,11 +3858,11 @@ __metadata: linkType: hard "base-x@npm:^3.0.2": - version: 3.0.9 - resolution: "base-x@npm:3.0.9" + version: 3.0.10 + resolution: "base-x@npm:3.0.10" dependencies: safe-buffer: ^5.0.1 - checksum: 957101d6fd09e1903e846fd8f69fd7e5e3e50254383e61ab667c725866bec54e5ece5ba49ce385128ae48f9ec93a26567d1d5ebb91f4d56ef4a9cc0d5a5481e8 + checksum: 52307739559e81d9980889de2359cb4f816cc0eb9a463028fa3ab239ab913d9044a1b47b4520f98e68453df32a457b8ba58b8d0ee7e757fc3fb971f3fa7a1482 languageName: node linkType: hard @@ -4018,6 +3873,15 @@ __metadata: languageName: node linkType: hard +"bcrypt-pbkdf@npm:^1.0.2": + version: 1.0.2 + resolution: "bcrypt-pbkdf@npm:1.0.2" + dependencies: + tweetnacl: ^0.14.3 + checksum: 4edfc9fe7d07019609ccf797a2af28351736e9d012c8402a07120c4453a3b789a15f2ee1530dc49eee8f7eb9379331a8dd4b3766042b9e502f74a68e7f662291 + languageName: node + linkType: hard + "bech32@npm:1.1.4": version: 1.1.4 resolution: "bech32@npm:1.1.4" @@ -4032,13 +3896,6 @@ __metadata: languageName: node linkType: hard -"bigint-crypto-utils@npm:^3.0.23": - version: 3.3.0 - resolution: "bigint-crypto-utils@npm:3.3.0" - checksum: 9598ce57b23f776c8936d44114c9f051e62b5fa654915b664784cbcbacc5aa0485f4479571c51ff58008abb1210c0d6a234853742f07cf84bda890f2a1e01000 - languageName: node - linkType: hard - "bignumber.js@npm:^9.1.2": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -4061,9 +3918,30 @@ __metadata: linkType: hard "binary-extensions@npm:^2.0.0, binary-extensions@npm:^2.2.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 + languageName: node + linkType: hard + +"bl@npm:^1.0.0": + version: 1.2.3 + resolution: "bl@npm:1.2.3" + dependencies: + readable-stream: ^2.3.5 + safe-buffer: ^5.1.1 + checksum: 123f097989ce2fa9087ce761cd41176aaaec864e28f7dfe5c7dab8ae16d66d9844f849c3ad688eb357e3c5e4f49b573e3c0780bb8bc937206735a3b6f8569a5f + languageName: node + linkType: hard + +"bl@npm:^4.0.3": + version: 4.1.0 + resolution: "bl@npm:4.1.0" + dependencies: + buffer: ^5.5.0 + inherits: ^2.0.4 + readable-stream: ^3.4.0 + checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662 languageName: node linkType: hard @@ -4102,6 +3980,22 @@ __metadata: languageName: node linkType: hard +"boxen@npm:^5.1.2": + version: 5.1.2 + resolution: "boxen@npm:5.1.2" + dependencies: + ansi-align: ^3.0.0 + camelcase: ^6.2.0 + chalk: ^4.1.0 + cli-boxes: ^2.2.1 + string-width: ^4.2.2 + type-fest: ^0.20.2 + widest-line: ^3.1.0 + wrap-ansi: ^7.0.0 + checksum: 82d03e42a72576ff235123f17b7c505372fe05c83f75f61e7d4fa4bcb393897ec95ce766fecb8f26b915f0f7a7227d66e5ec7cef43f5b2bd9d3aeed47ec55877 + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -4121,12 +4015,12 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" +"braces@npm:^3.0.3, braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" dependencies: - fill-range: ^7.0.1 - checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 + fill-range: ^7.1.1 + checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69 languageName: node linkType: hard @@ -4137,19 +4031,7 @@ __metadata: languageName: node linkType: hard -"browser-level@npm:^1.0.1": - version: 1.0.1 - resolution: "browser-level@npm:1.0.1" - dependencies: - abstract-level: ^1.0.2 - catering: ^2.1.1 - module-error: ^1.0.2 - run-parallel-limit: ^1.1.0 - checksum: 67fbc77ce832940bfa25073eccff279f512ad56f545deb996a5b23b02316f5e76f4a79d381acc27eda983f5c9a2566aaf9c97e4fdd0748288c4407307537a29b - languageName: node - linkType: hard - -"browser-stdout@npm:1.3.1": +"browser-stdout@npm:^1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" checksum: b717b19b25952dd6af483e368f9bcd6b14b87740c3d226c2977a65e84666ffd67000bddea7d911f111a9b6ddc822b234de42d52ab6507bce4119a4cc003ef7b3 @@ -4170,17 +4052,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.21.9": - version: 4.22.1 - resolution: "browserslist@npm:4.22.1" +"browserslist@npm:^4.23.1": + version: 4.23.2 + resolution: "browserslist@npm:4.23.2" dependencies: - caniuse-lite: ^1.0.30001541 - electron-to-chromium: ^1.4.535 - node-releases: ^2.0.13 - update-browserslist-db: ^1.0.13 + caniuse-lite: ^1.0.30001640 + electron-to-chromium: ^1.4.820 + node-releases: ^2.0.14 + update-browserslist-db: ^1.1.0 bin: browserslist: cli.js - checksum: 7e6b10c53f7dd5d83fd2b95b00518889096382539fed6403829d447e05df4744088de46a571071afb447046abc3c66ad06fbc790e70234ec2517452e32ffd862 + checksum: 8212af37f6ca6355da191cf2d4ad49bd0b82854888b9a7e103638fada70d38cbe36d28feeeaa98344cb15d9128f9f74bcc8ce1bfc9011b5fd14381c1c6fb542c languageName: node linkType: hard @@ -4204,6 +4086,30 @@ __metadata: languageName: node linkType: hard +"buffer-alloc-unsafe@npm:^1.1.0": + version: 1.1.0 + resolution: "buffer-alloc-unsafe@npm:1.1.0" + checksum: c5e18bf51f67754ec843c9af3d4c005051aac5008a3992938dda1344e5cfec77c4b02b4ca303644d1e9a6e281765155ce6356d85c6f5ccc5cd21afc868def396 + languageName: node + linkType: hard + +"buffer-alloc@npm:^1.2.0": + version: 1.2.0 + resolution: "buffer-alloc@npm:1.2.0" + dependencies: + buffer-alloc-unsafe: ^1.1.0 + buffer-fill: ^1.0.0 + checksum: 560cd27f3cbe73c614867da373407d4506309c62fe18de45a1ce191f3785ec6ca2488d802ff82065798542422980ca25f903db078c57822218182c37c3576df5 + languageName: node + linkType: hard + +"buffer-fill@npm:^1.0.0": + version: 1.0.0 + resolution: "buffer-fill@npm:1.0.0" + checksum: c29b4723ddeab01e74b5d3b982a0c6828f2ded49cef049ddca3dac661c874ecdbcecb5dd8380cf0f4adbeb8cff90a7de724126750a1f1e5ebd4eb6c59a1315b1 + languageName: node + linkType: hard + "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -4229,13 +4135,13 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" +"buffer@npm:^5.5.0": + version: 5.7.1 + resolution: "buffer@npm:5.7.1" dependencies: base64-js: ^1.3.1 - ieee754: ^1.2.1 - checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + ieee754: ^1.1.13 + checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 languageName: node linkType: hard @@ -4246,12 +4152,19 @@ __metadata: languageName: node linkType: hard +"buildcheck@npm:~0.0.6": + version: 0.0.6 + resolution: "buildcheck@npm:0.0.6" + checksum: ad61759dc98d62e931df2c9f54ccac7b522e600c6e13bdcfdc2c9a872a818648c87765ee209c850f022174da4dd7c6a450c00357c5391705d26b9c5807c2a076 + languageName: node + linkType: hard + "builtins@npm:^5.0.0": - version: 5.0.1 - resolution: "builtins@npm:5.0.1" + version: 5.1.0 + resolution: "builtins@npm:5.1.0" dependencies: semver: ^7.0.0 - checksum: 66d204657fe36522822a95b288943ad11b58f5eaede235b11d8c4edaa28ce4800087d44a2681524c340494aadb120a0068011acabe99d30e8f11a7d826d83515 + checksum: 76327fa85b8e253b26e52f79988148013ea742691b4ab15f7228ebee47dd757832da308c9d4e4fc89763a1773e3f25a9836fff6315df85c7c6c72190436bf11d languageName: node linkType: hard @@ -4289,33 +4202,35 @@ __metadata: linkType: hard "cacache@npm:^18.0.0": - version: 18.0.0 - resolution: "cacache@npm:18.0.0" + version: 18.0.4 + resolution: "cacache@npm:18.0.4" dependencies: "@npmcli/fs": ^3.1.0 fs-minipass: ^3.0.0 glob: ^10.2.2 lru-cache: ^10.0.1 minipass: ^7.0.3 - minipass-collect: ^1.0.2 + minipass-collect: ^2.0.1 minipass-flush: ^1.0.5 minipass-pipeline: ^1.2.4 p-map: ^4.0.0 ssri: ^10.0.0 tar: ^6.1.11 unique-filename: ^3.0.0 - checksum: 2cd6bf15551abd4165acb3a4d1ef0593b3aa2fd6853ae16b5bb62199c2faecf27d36555a9545c0e07dd03347ec052e782923bdcece724a24611986aafb53e152 + checksum: b7422c113b4ec750f33beeca0f426a0024c28e3172f332218f48f963e5b970647fa1ac05679fe5bb448832c51efea9fda4456b9a95c3a1af1105fe6c1833cde2 languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.4, call-bind@npm:^1.0.5": - version: 1.0.5 - resolution: "call-bind@npm:1.0.5" +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 function-bind: ^1.1.2 - get-intrinsic: ^1.2.1 - set-function-length: ^1.1.1 - checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 + get-intrinsic: ^1.2.4 + set-function-length: ^1.2.1 + checksum: 295c0c62b90dd6522e6db3b0ab1ce26bdf9e7404215bda13cfee25b626b5ff1a7761324d58d38b1ef1607fc65aca2d06e44d2e18d0dfc6c14b465b00d8660029 languageName: node linkType: hard @@ -4344,17 +4259,17 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.0.0": +"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001541": - version: 1.0.30001562 - resolution: "caniuse-lite@npm:1.0.30001562" - checksum: 414ed45ae47a432607be1c9588bd478440acb033e46ede74c97501bfdb9ba4b1615e221d3ce7c7be55e1e0834725fd1ce5bf5e037bb9dd384c8e85b5e83dc6d1 +"caniuse-lite@npm:^1.0.30001640": + version: 1.0.30001643 + resolution: "caniuse-lite@npm:1.0.30001643" + checksum: e39991c13a0fd8f5c2aa99c9128188e4c4e9d6a203c3da6270c36285460ef152c5e9410ee4db560aa723904668946afe50541dce9636ab5e61434ba71dc22955 languageName: node linkType: hard @@ -4370,13 +4285,6 @@ __metadata: languageName: node linkType: hard -"case@npm:^1.6.3": - version: 1.6.3 - resolution: "case@npm:1.6.3" - checksum: febe73278f910b0d28aab7efd6f51c235f9aa9e296148edb56dfb83fd58faa88308c30ce9a0122b6e53e0362c44f4407105bd5ef89c46860fc2b184e540fd68d - languageName: node - linkType: hard - "caseless@npm:^0.12.0, caseless@npm:~0.12.0": version: 0.12.0 resolution: "caseless@npm:0.12.0" @@ -4384,13 +4292,6 @@ __metadata: languageName: node linkType: hard -"catering@npm:^2.1.0, catering@npm:^2.1.1": - version: 2.1.1 - resolution: "catering@npm:2.1.1" - checksum: 205daefa69c935b0c19f3d8f2e0a520dd69aebe9bda55902958003f7c9cff8f967dfb90071b421bd6eb618576f657a89d2bc0986872c9bc04bbd66655e9d4bd6 - languageName: node - linkType: hard - "cbor@npm:^8.1.0": version: 8.1.0 resolution: "cbor@npm:8.1.0" @@ -4400,29 +4301,29 @@ __metadata: languageName: node linkType: hard -"cbor@npm:^9.0.0": - version: 9.0.1 - resolution: "cbor@npm:9.0.1" +"cbor@npm:^9.0.0, cbor@npm:^9.0.2": + version: 9.0.2 + resolution: "cbor@npm:9.0.2" dependencies: nofilter: ^3.1.0 - checksum: 42333ac3d42cc3f6fcc7a529e68417a2dd8099eda43ca4be1304cdc5bc7494efe058e2db8a3d3b46ae60d69c7331ea813c22dbd019c4ac592d23e599d72bbcc9 + checksum: 925edae7bf964be5a26dba1b7ba6311ac12b6a66234dc958958997a0576cdc740632dc19852a5b84d8a75101936bea1fe122dc22539d6e11f4539c731853ba2e languageName: node linkType: hard "chai-as-promised@npm:^7.1.1": - version: 7.1.1 - resolution: "chai-as-promised@npm:7.1.1" + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" dependencies: check-error: ^1.0.2 peerDependencies: - chai: ">= 2.1.2 < 5" - checksum: 7262868a5b51a12af4e432838ddf97a893109266a505808e1868ba63a12de7ee1166e9d43b5c501a190c377c1b11ecb9ff8e093c89f097ad96c397e8ec0f8d6a + chai: ">= 2.1.2 < 6" + checksum: 671ee980054eb23a523875c1d22929a2ac05d89b5428e1fd12800f54fc69baf41014667b87e2368e2355ee2a3140d3e3d7d5a1f8638b07cfefd7fe38a149e3f6 languageName: node linkType: hard -"chai@npm:^4.3.4, chai@npm:^4.3.6": - version: 4.3.10 - resolution: "chai@npm:4.3.10" +"chai@npm:^4.3.4, chai@npm:^4.3.6, chai@npm:^4.3.7": + version: 4.5.0 + resolution: "chai@npm:4.5.0" dependencies: assertion-error: ^1.1.0 check-error: ^1.0.3 @@ -4430,8 +4331,8 @@ __metadata: get-func-name: ^2.0.2 loupe: ^2.3.6 pathval: ^1.1.1 - type-detect: ^4.0.8 - checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d + type-detect: ^4.1.0 + checksum: 70e5a8418a39e577e66a441cc0ce4f71fd551a650a71de30dd4e3e31e75ed1f5aa7119cf4baf4a2cb5e85c0c6befdb4d8a05811fad8738c1a6f3aa6a23803821 languageName: node linkType: hard @@ -4479,9 +4380,9 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.4.0, chokidar@npm:^3.5.2": - version: 3.5.3 - resolution: "chokidar@npm:3.5.3" +"chokidar@npm:^3.4.0, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" dependencies: anymatch: ~3.1.2 braces: ~3.0.2 @@ -4494,7 +4395,14 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: b49fcde40176ba007ff361b198a2d35df60d9bb2a5aab228279eb810feae9294a6b4649ab15981304447afe1e6ffbf4788ad5db77235dc770ab777c6e771980c + checksum: d2f29f499705dcd4f6f3bbed79a9ce2388cf530460122eed3b9c48efeab7a4e28739c6551fd15bec9245c6b9eeca7a32baa64694d64d9b6faeb74ddb8c4a413d + languageName: node + linkType: hard + +"chownr@npm:^1.0.1, chownr@npm:^1.1.1": + version: 1.1.4 + resolution: "chownr@npm:1.1.4" + checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d languageName: node linkType: hard @@ -4531,20 +4439,6 @@ __metadata: languageName: node linkType: hard -"classic-level@npm:^1.2.0": - version: 1.3.0 - resolution: "classic-level@npm:1.3.0" - dependencies: - abstract-level: ^1.0.2 - catering: ^2.1.0 - module-error: ^1.0.1 - napi-macros: ^2.2.2 - node-gyp: latest - node-gyp-build: ^4.3.0 - checksum: 773da48aef52a041115d413fee8340b357a4da2eb505764f327183b155edd7cc9d24819eb4f707c83dbdae8588024f5dddeb322125567c59d5d1f6f16334cdb9 - languageName: node - linkType: hard - "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -4552,6 +4446,13 @@ __metadata: languageName: node linkType: hard +"cli-boxes@npm:^2.2.1": + version: 2.2.1 + resolution: "cli-boxes@npm:2.2.1" + checksum: be79f8ec23a558b49e01311b39a1ea01243ecee30539c880cf14bf518a12e223ef40c57ead0cb44f509bffdffc5c129c746cd50d863ab879385370112af4f585 + languageName: node + linkType: hard + "cli-columns@npm:^4.0.0": version: 4.0.0 resolution: "cli-columns@npm:4.0.0" @@ -4577,15 +4478,15 @@ __metadata: linkType: hard "cli-table3@npm:^0.6.0, cli-table3@npm:^0.6.2, cli-table3@npm:^0.6.3": - version: 0.6.3 - resolution: "cli-table3@npm:0.6.3" + version: 0.6.5 + resolution: "cli-table3@npm:0.6.5" dependencies: "@colors/colors": 1.5.0 string-width: ^4.2.0 dependenciesMeta: "@colors/colors": optional: true - checksum: 09897f68467973f827c04e7eaadf13b55f8aec49ecd6647cc276386ea660059322e2dd8020a8b6b84d422dbdd619597046fa89cbbbdc95b2cea149a2df7c096c + checksum: ab7afbf4f8597f1c631f3ee6bb3481d0bfeac8a3b81cffb5a578f145df5c88003b6cfff46046a7acae86596fdd03db382bfa67f20973b6b57425505abc47e42c languageName: node linkType: hard @@ -4627,6 +4528,13 @@ __metadata: languageName: node linkType: hard +"code-block-writer@npm:^13.0.1": + version: 13.0.2 + resolution: "code-block-writer@npm:13.0.2" + checksum: 8052ae6f27ef73366bd5df04b6f9beced493261fcaef5cbd0f3853644b5e0aa5af18d099b96448be88ea3d000c7b180207d371044edd9fcf98fea22c9f8ba3a1 + languageName: node + linkType: hard + "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -4725,13 +4633,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:3.0.2": - version: 3.0.2 - resolution: "commander@npm:3.0.2" - checksum: 6d14ad030d1904428139487ed31febcb04c1604db2b8d9fae711f60ee6718828dc0e11602249e91c8a97b0e721e9c6d53edbc166bad3cde1596851d59a8f824d - languageName: node - linkType: hard - "commander@npm:^10.0.0": version: 10.0.1 resolution: "commander@npm:10.0.1" @@ -4739,6 +4640,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^8.1.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 0f82321821fc27b83bd409510bb9deeebcfa799ff0bf5d102128b500b7af22872c0c92cb6a0ebc5a4cf19c6b550fba9cedfa7329d18c6442a625f851377bacf0 + languageName: node + linkType: hard + "common-ancestor-path@npm:^1.0.1": version: 1.0.1 resolution: "common-ancestor-path@npm:1.0.1" @@ -4756,10 +4664,10 @@ __metadata: languageName: node linkType: hard -"compare-versions@npm:^6.0.0": - version: 6.1.0 - resolution: "compare-versions@npm:6.1.0" - checksum: d4e2a45706a023d8d0b6680338b66b79e20bd02d1947f0ac6531dab634cbed89fa373b3f03d503c5e489761194258d6e1bae67a07f88b1efc61648454f2d47e7 +"compare-versions@npm:^6.0.0, compare-versions@npm:^6.1.0": + version: 6.1.1 + resolution: "compare-versions@npm:6.1.1" + checksum: 73fe6c4f52d22efe28f0a3be10df2afd704e10b3593360cd963e86b33a7a263c263b41a1361b69c30a0fe68bfa70fef90860c1cf2ef41502629d4402890fcd57 languageName: node linkType: hard @@ -4770,7 +4678,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2": +"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2, concat-stream@npm:~1.6.2": version: 1.6.2 resolution: "concat-stream@npm:1.6.2" dependencies: @@ -4949,12 +4857,14 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": - version: 1.2.2 - resolution: "crc-32@npm:1.2.2" - bin: - crc32: bin/crc32.njs - checksum: ad2d0ad0cbd465b75dcaeeff0600f8195b686816ab5f3ba4c6e052a07f728c3e70df2e3ca9fd3d4484dc4ba70586e161ca5a2334ec8bf5a41bf022a6103ff243 +"cpu-features@npm:~0.0.9": + version: 0.0.10 + resolution: "cpu-features@npm:0.0.10" + dependencies: + buildcheck: ~0.0.6 + nan: ^2.19.0 + node-gyp: latest + checksum: ab17e25cea0b642bdcfd163d3d872be4cc7d821e854d41048557799e990d672ee1cc7bd1d4e7c4de0309b1683d4c001d36ba8569b5035d1e7e2ff2d681f681d7 languageName: node linkType: hard @@ -5033,6 +4943,39 @@ __metadata: languageName: node linkType: hard +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: ce24348f3c6231223b216da92e7e6a57a12b4af81a23f27eff8feabdf06acfb16c00639c8b705ca4d167f761cfc756e27e5f065d0a1f840c10b907fdaf8b988c + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: dbb3200edcb7c1ef0d68979834f81d64fd8cab2f7691b3a4c6b97e67f22182f3ec2c8602efd7b76997b55af6ff8bce485829c1feda4fa2165a6b71fb7baa4269 + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: 7f0bf8720b7414ca719eedf1846aeec392f2054d7af707c5dc9a753cc77eb8625f067fa901e0b5127e831f9da9056138d894b9c2be79c27a21f6db5824f009c2 + languageName: node + linkType: hard + "dateformat@npm:^3.0.0": version: 3.0.3 resolution: "dateformat@npm:3.0.3" @@ -5047,15 +4990,24 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": - version: 4.3.4 - resolution: "debug@npm:4.3.4" +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5": + version: 4.3.6 + resolution: "debug@npm:4.3.6" dependencies: ms: 2.1.2 peerDependenciesMeta: supports-color: optional: true - checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + checksum: 1630b748dea3c581295e02137a9f5cbe2c1d85fea35c1e6597a65ca2b16a6fce68cec61b299d480787ef310ba927dc8c92d3061faba0ad06c6a724672f66be7f + languageName: node + linkType: hard + +"debug@npm:^3.2.6": + version: 3.2.7 + resolution: "debug@npm:3.2.7" + dependencies: + ms: ^2.1.1 + checksum: b3d8c5940799914d30314b7c3304a43305fd0715581a919dacb8b3176d024a782062368405b47491516d2091d6462d4d11f2f4974a405048094f8bfebfa3071c languageName: node linkType: hard @@ -5091,11 +5043,11 @@ __metadata: linkType: hard "deep-eql@npm:^4.0.1, deep-eql@npm:^4.1.3": - version: 4.1.3 - resolution: "deep-eql@npm:4.1.3" + version: 4.1.4 + resolution: "deep-eql@npm:4.1.4" dependencies: type-detect: ^4.0.0 - checksum: 7f6d30cb41c713973dc07eaadded848b2ab0b835e518a88b91bea72f34e08c4c71d167a722a6f302d3a6108f05afd8e6d7650689a84d5d29ec7fe6220420397f + checksum: 01c3ca78ff40d79003621b157054871411f94228ceb9b2cab78da913c606631c46e8aa79efc4aa0faf3ace3092acd5221255aab3ef0e8e7b438834f0ca9a16c7 languageName: node linkType: hard @@ -5122,18 +5074,18 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": - version: 1.1.1 - resolution: "define-data-property@npm:1.1.1" +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" dependencies: - get-intrinsic: ^1.2.1 + es-define-property: ^1.0.0 + es-errors: ^1.3.0 gopd: ^1.0.1 - has-property-descriptors: ^1.0.0 - checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d + checksum: 8068ee6cab694d409ac25936eb861eea704b7763f7f342adbdfe337fc27c78d7ae0eff2364b2917b58c508d723c7a074326d068eef2e45c4edcd85cf94d0313b languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": +"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -5188,19 +5140,6 @@ __metadata: languageName: node linkType: hard -"detect-port@npm:^1.3.0": - version: 1.5.1 - resolution: "detect-port@npm:1.5.1" - dependencies: - address: ^1.0.1 - debug: 4 - bin: - detect: bin/detect-port.js - detect-port: bin/detect-port.js - checksum: b48da9340481742547263d5d985e65d078592557863402ecf538511735e83575867e94f91fe74405ea19b61351feb99efccae7e55de9a151d5654e3417cea05b - languageName: node - linkType: hard - "dezalgo@npm:^1.0.0": version: 1.0.4 resolution: "dezalgo@npm:1.0.4" @@ -5211,13 +5150,6 @@ __metadata: languageName: node linkType: hard -"diff@npm:5.0.0": - version: 5.0.0 - resolution: "diff@npm:5.0.0" - checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46 - languageName: node - linkType: hard - "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -5225,10 +5157,10 @@ __metadata: languageName: node linkType: hard -"diff@npm:^5.0.0, diff@npm:^5.1.0": - version: 5.1.0 - resolution: "diff@npm:5.1.0" - checksum: c7bf0df7c9bfbe1cf8a678fd1b2137c4fb11be117a67bc18a0e03ae75105e8533dbfb1cda6b46beb3586ef5aed22143ef9d70713977d5fb1f9114e21455fba90 +"diff@npm:^5.0.0, diff@npm:^5.1.0, diff@npm:^5.2.0": + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 12b63ca9c36c72bafa3effa77121f0581b4015df18bc16bac1f8e263597735649f1a173c26f7eba17fb4162b073fee61788abe49610e6c70a2641fe1895443fd languageName: node linkType: hard @@ -5250,6 +5182,75 @@ __metadata: languageName: node linkType: hard +"docker-modem@npm:^1.0.8": + version: 1.0.9 + resolution: "docker-modem@npm:1.0.9" + dependencies: + JSONStream: 1.3.2 + debug: ^3.2.6 + readable-stream: ~1.0.26-4 + split-ca: ^1.0.0 + checksum: b34829f5abecf28332f1870c88bdf795750520264e9fdc8e9041058f18b1846543061ee32fb21ff14e9da6b5498af6b2cb4d96422d8c2dc02d9f622b01f34fe6 + languageName: node + linkType: hard + +"docker-modem@npm:^3.0.0": + version: 3.0.8 + resolution: "docker-modem@npm:3.0.8" + dependencies: + debug: ^4.1.1 + readable-stream: ^3.5.0 + split-ca: ^1.0.1 + ssh2: ^1.11.0 + checksum: e3675c9b1ad800be8fb1cb9c5621fbef20a75bfedcd6e01b69808eadd7f0165681e4e30d1700897b788a67dbf4769964fcccd19c3d66f6d2499bb7aede6b34df + languageName: node + linkType: hard + +"docker-modem@npm:^5.0.3": + version: 5.0.3 + resolution: "docker-modem@npm:5.0.3" + dependencies: + debug: ^4.1.1 + readable-stream: ^3.5.0 + split-ca: ^1.0.1 + ssh2: ^1.15.0 + checksum: 68f4948591622860ca95c10a01cae7f53ff2b2e8435b73b901698083b24ceb24208da12c1db2c47f073d48bc2f64a274cbf30e3c73979734f6fb3fbdf5bdb72e + languageName: node + linkType: hard + +"dockerode@npm:^2.5.8": + version: 2.5.8 + resolution: "dockerode@npm:2.5.8" + dependencies: + concat-stream: ~1.6.2 + docker-modem: ^1.0.8 + tar-fs: ~1.16.3 + checksum: 01381da98f98a3236b735fb2bb2a66f521da39200a2a11b83777cee3b104b32966ba7dfeb93f3fa8ab85b5e639265842d66f576e7db9562b1049564c2af6ec84 + languageName: node + linkType: hard + +"dockerode@npm:^3.3.4": + version: 3.3.5 + resolution: "dockerode@npm:3.3.5" + dependencies: + "@balena/dockerignore": ^1.0.2 + docker-modem: ^3.0.0 + tar-fs: ~2.0.1 + checksum: 7f6650422b07fa7ea9d5801f04b1a432634446b5fe37b995b8302b953b64e93abf1bb4596c2fb574ba47aafee685ef2ab959cc86c9654add5a26d09541bbbcc6 + languageName: node + linkType: hard + +"dockerode@npm:^4.0.2": + version: 4.0.2 + resolution: "dockerode@npm:4.0.2" + dependencies: + "@balena/dockerignore": ^1.0.2 + docker-modem: ^5.0.3 + tar-fs: ~2.0.1 + checksum: 4d36633d04ac5f662b0322d2fa4fe51fb1dd5a45f00b07379196ee5ff5dae13688a9ec1adf1edeaefab5eb22f3ae2219f62026241555a8bcf7edb396bbb5a92f + languageName: node + linkType: hard + "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -5276,9 +5277,9 @@ __metadata: linkType: hard "dotenv@npm:^16.0.1": - version: 16.3.1 - resolution: "dotenv@npm:16.3.1" - checksum: 15d75e7279018f4bafd0ee9706593dd14455ddb71b3bcba9c52574460b7ccaf67d5cf8b2c08a5af1a9da6db36c956a04a1192b101ee102a3e0cf8817bbcf3dfd + version: 16.4.5 + resolution: "dotenv@npm:16.4.5" + checksum: 301a12c3d44fd49888b74eb9ccf9f07a1f5df43f489e7fcb89647a2edcd84c42d6bc349dc8df099cd18f07c35c7b04685c1a4f3e6a6a9e6b30f8d48c15b7f49c languageName: node linkType: hard @@ -5298,14 +5299,14 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.535": - version: 1.4.582 - resolution: "electron-to-chromium@npm:1.4.582" - checksum: a87ea18b4fbad7c96ae5fe587c3273c3878ee52b08c8a7acd6156949d05fd370f91809691126b0cee223a6cdd4688e6ff2f086c6603a712d004485f36a4b9093 +"electron-to-chromium@npm:^1.4.820": + version: 1.5.2 + resolution: "electron-to-chromium@npm:1.5.2" + checksum: 530a9a4dc4aa0220abf564be49b7090470eac6e9a03acb667deadaf139c7f65466b4540ff5699677f9370f2a05619e89fc089f81603d36d33dc5acc75f12171e languageName: node linkType: hard -"elliptic@npm:6.5.4, elliptic@npm:^6.5.2, elliptic@npm:^6.5.4": +"elliptic@npm:6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" dependencies: @@ -5320,6 +5321,21 @@ __metadata: languageName: node linkType: hard +"elliptic@npm:^6.5.2, elliptic@npm:^6.5.4": + version: 6.5.6 + resolution: "elliptic@npm:6.5.6" + dependencies: + bn.js: ^4.11.9 + brorand: ^1.1.0 + hash.js: ^1.0.0 + hmac-drbg: ^1.0.1 + inherits: ^2.0.4 + minimalistic-assert: ^1.0.1 + minimalistic-crypto-utils: ^1.0.1 + checksum: 213d778ccfe99ec8f0f871b1cc96a10ac3763d9175215d0a9dc026f291e5f50fea6f635e4e47b4506f9ada25aeb703bd807d8737b880dbb24d092a3001c6d97d + languageName: node + linkType: hard + "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -5350,6 +5366,15 @@ __metadata: languageName: node linkType: hard +"end-of-stream@npm:^1.0.0, end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" + dependencies: + once: ^1.4.0 + checksum: 530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b + languageName: node + linkType: hard + "enquirer@npm:^2.3.0, enquirer@npm:^2.3.6": version: 2.4.1 resolution: "enquirer@npm:2.4.1" @@ -5360,6 +5385,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 853f8ebd5b425d350bffa97dd6958143179a5938352ccae092c62d1267c4e392a039be1bae7d51b6e4ffad25f51f9617531fedf5237f15df302ccfb452cbf2d7 + languageName: node + linkType: hard + "env-ci@npm:^5.0.0": version: 5.5.0 resolution: "env-ci@npm:5.5.0" @@ -5379,9 +5411,9 @@ __metadata: linkType: hard "erc721a@npm:^4.2.3": - version: 4.2.3 - resolution: "erc721a@npm:4.2.3" - checksum: 0b2223678219d9b4a228da880cca9aab396ebe9cb59baf34a5501d4d9d297024d492ee5335c1983cd4c3bd15deef5e162c4837d27ac5ab5bf66e01591ead425c + version: 4.3.0 + resolution: "erc721a@npm:4.3.0" + checksum: deede7094e88daa1ecc11f1b114fb10db3a6b0557087e8f0ceca31eaaec643d75028d308f3a97e615cd1a09087095d61196ac938b73f6d56c222c4cf4a1430b8 languageName: node linkType: hard @@ -5401,65 +5433,97 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1": - version: 1.22.3 - resolution: "es-abstract@npm:1.22.3" +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2": + version: 1.23.3 + resolution: "es-abstract@npm:1.23.3" dependencies: - array-buffer-byte-length: ^1.0.0 - arraybuffer.prototype.slice: ^1.0.2 - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.5 - es-set-tostringtag: ^2.0.1 + array-buffer-byte-length: ^1.0.1 + arraybuffer.prototype.slice: ^1.0.3 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 + data-view-buffer: ^1.0.1 + data-view-byte-length: ^1.0.1 + data-view-byte-offset: ^1.0.0 + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-set-tostringtag: ^2.0.3 es-to-primitive: ^1.2.1 function.prototype.name: ^1.1.6 - get-intrinsic: ^1.2.2 - get-symbol-description: ^1.0.0 + get-intrinsic: ^1.2.4 + get-symbol-description: ^1.0.2 globalthis: ^1.0.3 gopd: ^1.0.1 - has-property-descriptors: ^1.0.0 - has-proto: ^1.0.1 + has-property-descriptors: ^1.0.2 + has-proto: ^1.0.3 has-symbols: ^1.0.3 - hasown: ^2.0.0 - internal-slot: ^1.0.5 - is-array-buffer: ^3.0.2 + hasown: ^2.0.2 + internal-slot: ^1.0.7 + is-array-buffer: ^3.0.4 is-callable: ^1.2.7 - is-negative-zero: ^2.0.2 + is-data-view: ^1.0.1 + is-negative-zero: ^2.0.3 is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.2 + is-shared-array-buffer: ^1.0.3 is-string: ^1.0.7 - is-typed-array: ^1.1.12 + is-typed-array: ^1.1.13 is-weakref: ^1.0.2 object-inspect: ^1.13.1 object-keys: ^1.1.1 - object.assign: ^4.1.4 - regexp.prototype.flags: ^1.5.1 - safe-array-concat: ^1.0.1 - safe-regex-test: ^1.0.0 - string.prototype.trim: ^1.2.8 - string.prototype.trimend: ^1.0.7 - string.prototype.trimstart: ^1.0.7 - typed-array-buffer: ^1.0.0 - typed-array-byte-length: ^1.0.0 - typed-array-byte-offset: ^1.0.0 - typed-array-length: ^1.0.4 + object.assign: ^4.1.5 + regexp.prototype.flags: ^1.5.2 + safe-array-concat: ^1.1.2 + safe-regex-test: ^1.0.3 + string.prototype.trim: ^1.2.9 + string.prototype.trimend: ^1.0.8 + string.prototype.trimstart: ^1.0.8 + typed-array-buffer: ^1.0.2 + typed-array-byte-length: ^1.0.1 + typed-array-byte-offset: ^1.0.2 + typed-array-length: ^1.0.6 unbox-primitive: ^1.0.2 - which-typed-array: ^1.1.13 - checksum: b1bdc962856836f6e72be10b58dc128282bdf33771c7a38ae90419d920fc3b36cc5d2b70a222ad8016e3fc322c367bf4e9e89fc2bc79b7e933c05b218e83d79a + which-typed-array: ^1.1.15 + checksum: f840cf161224252512f9527306b57117192696571e07920f777cb893454e32999206198b4f075516112af6459daca282826d1735c450528470356d09eff3a9ae languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.1": - version: 2.0.2 - resolution: "es-set-tostringtag@npm:2.0.2" +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" dependencies: - get-intrinsic: ^1.2.2 - has-tostringtag: ^1.0.0 - hasown: ^2.0.0 - checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 + get-intrinsic: ^1.2.4 + checksum: f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 + languageName: node + linkType: hard + +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5 + languageName: node + linkType: hard + +"es-object-atoms@npm:^1.0.0": + version: 1.0.0 + resolution: "es-object-atoms@npm:1.0.0" + dependencies: + es-errors: ^1.3.0 + checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" + dependencies: + get-intrinsic: ^1.2.4 + has-tostringtag: ^1.0.2 + hasown: ^2.0.1 + checksum: 7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0": +"es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -5479,17 +5543,10 @@ __metadata: languageName: node linkType: hard -"escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: a3e2a99f07acb74b3ad4989c48ca0c3140f69f923e56d0cba0526240ee470b91010f9d39001f2a4a313841d237ede70a729e92125191ba5d21e74b106800b133 - languageName: node - linkType: hard - -"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 +"escalade@npm:^3.1.1, escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 1ec0977aa2772075493002bdbd549d595ff6e9393b1cb0d7d6fcaf78c750da0c158f180938365486f75cb69fba20294351caddfce1b46552a7b6c3cde52eaa02 languageName: node linkType: hard @@ -5500,6 +5557,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + "escodegen@npm:1.8.x": version: 1.8.1 resolution: "escodegen@npm:1.8.1" @@ -5558,14 +5622,14 @@ __metadata: linkType: hard "eslint@npm:^8.25.0": - version: 8.53.0 - resolution: "eslint@npm:8.53.0" + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@eslint-community/regexpp": ^4.6.1 - "@eslint/eslintrc": ^2.1.3 - "@eslint/js": 8.53.0 - "@humanwhocodes/config-array": ^0.11.13 + "@eslint/eslintrc": ^2.1.4 + "@eslint/js": 8.57.0 + "@humanwhocodes/config-array": ^0.11.14 "@humanwhocodes/module-importer": ^1.0.1 "@nodelib/fs.walk": ^1.2.8 "@ungap/structured-clone": ^1.2.0 @@ -5601,7 +5665,7 @@ __metadata: text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: 2da808655c7aa4b33f8970ba30d96b453c3071cc4d6cd60d367163430677e32ff186b65270816b662d29139283138bff81f28dddeb2e73265495245a316ed02c + checksum: 3a48d7ff85ab420a8447e9810d8087aea5b1df9ef68c9151732b478de698389ee656fd895635b5f2871c89ee5a2652b3f343d11e9db6f8486880374ebc74a2d9 languageName: node linkType: hard @@ -5637,11 +5701,11 @@ __metadata: linkType: hard "esquery@npm:^1.4.2": - version: 1.5.0 - resolution: "esquery@npm:1.5.0" + version: 1.6.0 + resolution: "esquery@npm:1.6.0" dependencies: estraverse: ^5.1.0 - checksum: aefb0d2596c230118656cd4ec7532d447333a410a48834d80ea648b1e7b5c9bc9ed8b5e33a89cb04e487b60d622f44cf5713bf4abed7c97343edefdc84a35900 + checksum: 08ec4fe446d9ab27186da274d979558557fbdbbd10968fa9758552482720c54152a5640e08b9009e5a30706b66aba510692054d4129d32d0e12e05bbc0b96fb2 languageName: node linkType: hard @@ -5716,11 +5780,11 @@ __metadata: linkType: hard "ethereum-bloom-filters@npm:^1.0.6": - version: 1.0.10 - resolution: "ethereum-bloom-filters@npm:1.0.10" + version: 1.2.0 + resolution: "ethereum-bloom-filters@npm:1.2.0" dependencies: - js-sha3: ^0.8.0 - checksum: 4019cc6f9274ae271a52959194a72f6e9b013366f168f922dc3b349319faf7426bf1010125ee0676b4f75714fe4a440edd4e7e62342c121a046409f4cd4c0af9 + "@noble/hashes": ^1.4.0 + checksum: 3a4d11495a5845483b78eca6455a915835d691df09a8c5754785c6bdfb5d18382d7e65b066a1c092493c1d87850c6a77243136996a231baec82f22c727e15258 languageName: node linkType: hard @@ -5760,14 +5824,14 @@ __metadata: linkType: hard "ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": - version: 2.1.2 - resolution: "ethereum-cryptography@npm:2.1.2" + version: 2.2.1 + resolution: "ethereum-cryptography@npm:2.2.1" dependencies: - "@noble/curves": 1.1.0 - "@noble/hashes": 1.3.1 - "@scure/bip32": 1.3.1 - "@scure/bip39": 1.2.1 - checksum: 2e8f7b8cc90232ae838ab6a8167708e8362621404d26e79b5d9e762c7b53d699f7520aff358d9254de658fcd54d2d0af168ff909943259ed27dc4cef2736410c + "@noble/curves": 1.4.2 + "@noble/hashes": 1.4.0 + "@scure/bip32": 1.4.0 + "@scure/bip39": 1.3.0 + checksum: 1466e4c417b315a6ac67f95088b769fafac8902b495aada3c6375d827e5a7882f9e0eea5f5451600d2250283d9198b8a3d4d996e374e07a80a324e29136f25c6 languageName: node linkType: hard @@ -5796,7 +5860,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.0.3, ethereumjs-util@npm:^7.1.4": +"ethereumjs-util@npm:^7.0.3, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -5809,7 +5873,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2": +"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -5923,7 +5987,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9": +"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": version: 3.3.2 resolution: "fast-glob@npm:3.3.2" dependencies: @@ -5950,6 +6014,13 @@ __metadata: languageName: node linkType: hard +"fast-uri@npm:^3.0.1": + version: 3.0.1 + resolution: "fast-uri@npm:3.0.1" + checksum: 106143ff83705995225dcc559411288f3337e732bb2e264e79788f1914b6bd8f8bc3683102de60b15ba00e6ebb443633cabac77d4ebc5cb228c47cf955e199ff + languageName: node + linkType: hard + "fastest-levenshtein@npm:^1.0.12": version: 1.0.16 resolution: "fastest-levenshtein@npm:1.0.16" @@ -5958,11 +6029,11 @@ __metadata: linkType: hard "fastq@npm:^1.6.0": - version: 1.15.0 - resolution: "fastq@npm:1.15.0" + version: 1.17.1 + resolution: "fastq@npm:1.17.1" dependencies: reusify: ^1.0.4 - checksum: 0170e6bfcd5d57a70412440b8ef600da6de3b2a6c5966aeaf0a852d542daff506a0ee92d6de7679d1de82e644bce69d7a574a6c93f0b03964b5337eed75ada1a + checksum: a8c5b26788d5a1763f88bae56a8ddeee579f935a831c5fe7a8268cea5b0a91fbfe705f612209e02d639b881d7b48e461a50da4a10cfaa40da5ca7cc9da098d88 languageName: node linkType: hard @@ -5993,12 +6064,22 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-keys@npm:^1.0.2": + version: 1.0.2 + resolution: "fill-keys@npm:1.0.2" + dependencies: + is-object: ~1.0.1 + merge-descriptors: ~1.0.0 + checksum: 6ac5ff60ff08f2f44d19e919c9ca579f4efaaa8c88232b4aab5a5b5522aeb8ec91501956e780cb2b44574fe4a4a337e9b43187829267d0b66a6bfedbafae893f + languageName: node + linkType: hard + +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: ^5.0.1 - checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 + checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798 languageName: node linkType: hard @@ -6011,16 +6092,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:5.0.0, find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: ^6.0.0 - path-exists: ^4.0.0 - checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 - languageName: node - linkType: hard - "find-up@npm:^2.0.0, find-up@npm:^2.1.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" @@ -6040,6 +6111,16 @@ __metadata: languageName: node linkType: hard +"find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + "find-versions@npm:^4.0.0": version: 4.0.0 resolution: "find-versions@npm:4.0.0" @@ -6070,9 +6151,9 @@ __metadata: linkType: hard "flatted@npm:^3.2.9": - version: 3.2.9 - resolution: "flatted@npm:3.2.9" - checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 + version: 3.3.1 + resolution: "flatted@npm:3.3.1" + checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 languageName: node linkType: hard @@ -6085,13 +6166,13 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.0": - version: 1.15.3 - resolution: "follow-redirects@npm:1.15.3" +"follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: 584da22ec5420c837bd096559ebfb8fe69d82512d5585004e36a3b4a6ef6d5905780e0c74508c7b72f907d1fa2b7bd339e613859e9c304d0dc96af2027fd0231 + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 languageName: node linkType: hard @@ -6105,12 +6186,12 @@ __metadata: linkType: hard "foreground-child@npm:^3.1.0": - version: 3.1.1 - resolution: "foreground-child@npm:3.1.1" + version: 3.2.1 + resolution: "foreground-child@npm:3.2.1" dependencies: cross-spawn: ^7.0.0 signal-exit: ^4.0.1 - checksum: 139d270bc82dc9e6f8bc045fe2aae4001dc2472157044fdfad376d0a3457f77857fa883c1c8b21b491c6caade9a926a4bed3d3d2e8d3c9202b151a4cbbd0bcd5 + checksum: 3e2e844d6003c96d70affe8ae98d7eaaba269a868c14d997620c088340a8775cd5d2d9043e6ceebae1928d8d9a874911c4d664b9a267e8995945df20337aebc0 languageName: node linkType: hard @@ -6167,16 +6248,10 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^0.30.0": - version: 0.30.0 - resolution: "fs-extra@npm:0.30.0" - dependencies: - graceful-fs: ^4.1.2 - jsonfile: ^2.1.0 - klaw: ^1.0.0 - path-is-absolute: ^1.0.0 - rimraf: ^2.2.8 - checksum: 6edfd65fc813baa27f1603778c0f5ec11f8c5006a20b920437813ee2023eba18aeec8bef1c89b2e6c84f9fc90fdc7c916f4a700466c8c69d22a35d018f2570f0 +"fs-constants@npm:^1.0.0": + version: 1.0.0 + resolution: "fs-constants@npm:1.0.0" + checksum: 18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d languageName: node linkType: hard @@ -6191,14 +6266,14 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^11.0.0": - version: 11.1.1 - resolution: "fs-extra@npm:11.1.1" +"fs-extra@npm:^11.0.0, fs-extra@npm:^11.2.0": + version: 11.2.0 + resolution: "fs-extra@npm:11.2.0" dependencies: graceful-fs: ^4.2.0 jsonfile: ^6.0.1 universalify: ^2.0.0 - checksum: fb883c68245b2d777fbc1f2082c9efb084eaa2bbf9fddaa366130d196c03608eebef7fb490541276429ee1ca99f317e2d73e96f5ca0999eefedf5a624ae1edfd + checksum: b12e42fa40ba47104202f57b8480dd098aa931c2724565e5e70779ab87605665594e76ee5fb00545f772ab9ace167fe06d2ab009c416dc8c842c5ae6df7aa7e8 languageName: node linkType: hard @@ -6306,13 +6381,6 @@ __metadata: languageName: node linkType: hard -"functional-red-black-tree@npm:^1.0.1": - version: 1.0.1 - resolution: "functional-red-black-tree@npm:1.0.1" - checksum: ca6c170f37640e2d94297da8bb4bf27a1d12bea3e00e6a3e007fd7aa32e37e000f5772acf941b4e4f3cf1c95c3752033d0c509af157ad8f526e7f00723b9eb9f - languageName: node - linkType: hard - "functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" @@ -6357,15 +6425,16 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2": - version: 1.2.2 - resolution: "get-intrinsic@npm:1.2.2" +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" dependencies: + es-errors: ^1.3.0 function-bind: ^1.1.2 has-proto: ^1.0.1 has-symbols: ^1.0.3 hasown: ^2.0.0 - checksum: 447ff0724df26829908dc033b62732359596fcf66027bc131ab37984afb33842d9cd458fd6cecadfe7eac22fd8a54b349799ed334cf2726025c921c7250e7417 + checksum: 414e3cdf2c203d1b9d7d33111df746a4512a1aa622770b361dadddf8ed0b5aeb26c560f49ca077e24bfafb0acb55ca908d1f709216ccba33ffc548ec8a79a951 languageName: node linkType: hard @@ -6383,13 +6452,14 @@ __metadata: languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.1.1 - checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + call-bind: ^1.0.5 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + checksum: e1cb53bc211f9dbe9691a4f97a46837a553c4e7caadd0488dc24ac694db8a390b93edd412b48dcdd0b4bbb4c595de1709effc75fc87c0839deedc6968f5bd973 languageName: node linkType: hard @@ -6406,16 +6476,16 @@ __metadata: linkType: hard "git-log-parser@npm:^1.2.0": - version: 1.2.0 - resolution: "git-log-parser@npm:1.2.0" + version: 1.2.1 + resolution: "git-log-parser@npm:1.2.1" dependencies: argv-formatter: ~1.0.0 spawn-error-forwarder: ~1.0.0 split2: ~1.0.0 stream-combiner2: ~1.1.1 through2: ~2.0.0 - traverse: ~0.6.6 - checksum: 57294e72f91920d3262ff51fb0fd81dba1465c9e1b25961e19c757ae39bb38e72dd4a5da40649eeb368673b08be449a0844a2bafc0c0ded7375a8a56a6af8640 + traverse: 0.6.8 + checksum: 05567a3437f2c4a63c6cf4d78fcb915994fbbcfc3b2a04ae116195f593d5faf81e76b2aa500cebb22169ac522f357235c6ca758c405fcf7f7854642141a4084c languageName: node linkType: hard @@ -6480,18 +6550,19 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.3.10 - resolution: "glob@npm:10.3.10" +"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": + version: 10.4.5 + resolution: "glob@npm:10.4.5" dependencies: foreground-child: ^3.1.0 - jackspeak: ^2.3.5 - minimatch: ^9.0.1 - minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - path-scurry: ^1.10.1 + jackspeak: ^3.1.2 + minimatch: ^9.0.4 + minipass: ^7.1.2 + package-json-from-dist: ^1.0.0 + path-scurry: ^1.11.1 bin: glob: dist/esm/bin.mjs - checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + checksum: 0bc725de5e4862f9f387fd0f2b274baf16850dcd2714502ccf471ee401803997983e2c05590cb65f9675a3c6f2a58e7a53f9e365704108c6ad3cbf1d60934c4a languageName: node linkType: hard @@ -6522,7 +6593,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.1, glob@npm:^8.0.3": +"glob@npm:^8.0.1, glob@npm:^8.0.3, glob@npm:^8.1.0": version: 8.1.0 resolution: "glob@npm:8.1.0" dependencies: @@ -6572,20 +6643,21 @@ __metadata: linkType: hard "globals@npm:^13.19.0": - version: 13.23.0 - resolution: "globals@npm:13.23.0" + version: 13.24.0 + resolution: "globals@npm:13.24.0" dependencies: type-fest: ^0.20.2 - checksum: 194c97cf8d1ef6ba59417234c2386549c4103b6e5f24b1ff1952de61a4753e5d2069435ba629de711a6480b1b1d114a98e2ab27f85e966d5a10c319c3bbd3dc3 + checksum: 56066ef058f6867c04ff203b8a44c15b038346a62efbc3060052a1016be9f56f4cf0b2cd45b74b22b81e521a889fc7786c73691b0549c2f3a6e825b3d394f43c languageName: node linkType: hard "globalthis@npm:^1.0.3": - version: 1.0.3 - resolution: "globalthis@npm:1.0.3" + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" dependencies: - define-properties: ^1.1.3 - checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 + define-properties: ^1.2.1 + gopd: ^1.0.1 + checksum: 39ad667ad9f01476474633a1834a70842041f70a55571e8dcef5fb957980a92da5022db5430fca8aecc5d47704ae30618c0bc877a579c70710c904e9ef06108a languageName: node linkType: hard @@ -6635,7 +6707,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -6731,8 +6803,8 @@ __metadata: linkType: hard "hardhat-deploy@npm:^0.11.14": - version: 0.11.43 - resolution: "hardhat-deploy@npm:0.11.43" + version: 0.11.45 + resolution: "hardhat-deploy@npm:0.11.45" dependencies: "@ethersproject/abi": ^5.7.0 "@ethersproject/abstract-signer": ^5.7.0 @@ -6751,178 +6823,72 @@ __metadata: chokidar: ^3.5.2 debug: ^4.3.2 enquirer: ^2.3.6 - ethers: ^5.7.0 - form-data: ^4.0.0 - fs-extra: ^10.0.0 - match-all: ^1.2.6 - murmur-128: ^0.2.1 - qs: ^6.9.4 - zksync-web3: ^0.14.3 - checksum: 498c9b1485fa73161cef24eeeaaab749097df8c5a53df3f22e3c23cb825adf3006289778f0f5a433a7efcd58df3e18034f09dd4650d714d8f0b08c1e79527590 - languageName: node - linkType: hard - -"hardhat-gas-reporter@npm:^1.0.6, hardhat-gas-reporter@npm:^1.0.8": - version: 1.0.9 - resolution: "hardhat-gas-reporter@npm:1.0.9" - dependencies: - array-uniq: 1.0.3 - eth-gas-reporter: ^0.2.25 - sha1: ^1.1.1 - peerDependencies: - hardhat: ^2.0.2 - checksum: 77f8f8d085ff3d9d7787f0227e5355e1800f7d6707bc70171e0567bf69706703ae7f6f53dce1be1d409e7e71e3629a434c94b546bdbbc1e4c1af47cd5d0c6776 - languageName: node - linkType: hard - -"hardhat@npm:^2.16.1": - version: 2.18.1 - resolution: "hardhat@npm:2.18.1" - dependencies: - "@ethersproject/abi": ^5.1.2 - "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@nomicfoundation/ethereumjs-vm": 7.0.2 - "@nomicfoundation/solidity-analyzer": ^0.1.0 - "@sentry/node": ^5.18.1 - "@types/bn.js": ^5.1.0 - "@types/lru-cache": ^5.1.0 - adm-zip: ^0.4.16 - aggregate-error: ^3.0.0 - ansi-escapes: ^4.3.0 - chalk: ^2.4.2 - chokidar: ^3.4.0 - ci-info: ^2.0.0 - debug: ^4.1.1 - enquirer: ^2.3.0 - env-paths: ^2.2.0 - ethereum-cryptography: ^1.0.3 - ethereumjs-abi: ^0.6.8 - find-up: ^2.1.0 - fp-ts: 1.19.3 - fs-extra: ^7.0.1 - glob: 7.2.0 - immutable: ^4.0.0-rc.12 - io-ts: 1.10.4 - keccak: ^3.0.2 - lodash: ^4.17.11 - mnemonist: ^0.38.0 - mocha: ^10.0.0 - p-map: ^4.0.0 - raw-body: ^2.4.1 - resolve: 1.17.0 - semver: ^6.3.0 - solc: 0.7.3 - source-map-support: ^0.5.13 - stacktrace-parser: ^0.1.10 - tsort: 0.0.1 - undici: ^5.14.0 - uuid: ^8.3.2 - ws: ^7.4.6 - peerDependencies: - ts-node: "*" - typescript: "*" - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - bin: - hardhat: internal/cli/bootstrap.js - checksum: 34a6b4f27e4412e8878c8612a36c92ae79acea5168514bddb7eb4654be5ea92e19f4b2618e8e789361c8f54eaf10ebe6469042c22bbaae66254e5e3a5a63c3b1 + ethers: ^5.7.0 + form-data: ^4.0.0 + fs-extra: ^10.0.0 + match-all: ^1.2.6 + murmur-128: ^0.2.1 + qs: ^6.9.4 + zksync-web3: ^0.14.3 + checksum: 7ecce33c3305857bdd1873a25d391e27ae9f581df75757035cb028ace7bb5fbb83f053435e843bc3d925e7fd8412c3dc582797fe5b4bbe1fef7f3dd989a7c878 languageName: node linkType: hard -"hardhat@npm:^2.19.2": - version: 2.19.2 - resolution: "hardhat@npm:2.19.2" +"hardhat-deploy@npm:^0.12.4": + version: 0.12.4 + resolution: "hardhat-deploy@npm:0.12.4" dependencies: - "@ethersproject/abi": ^5.1.2 - "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@nomicfoundation/ethereumjs-vm": 7.0.2 - "@nomicfoundation/solidity-analyzer": ^0.1.0 - "@sentry/node": ^5.18.1 - "@types/bn.js": ^5.1.0 - "@types/lru-cache": ^5.1.0 - adm-zip: ^0.4.16 - aggregate-error: ^3.0.0 - ansi-escapes: ^4.3.0 - chalk: ^2.4.2 - chokidar: ^3.4.0 - ci-info: ^2.0.0 - debug: ^4.1.1 - enquirer: ^2.3.0 - env-paths: ^2.2.0 - ethereum-cryptography: ^1.0.3 - ethereumjs-abi: ^0.6.8 - find-up: ^2.1.0 - fp-ts: 1.19.3 - fs-extra: ^7.0.1 - glob: 7.2.0 - immutable: ^4.0.0-rc.12 - io-ts: 1.10.4 - keccak: ^3.0.2 - lodash: ^4.17.11 - mnemonist: ^0.38.0 - mocha: ^10.0.0 - p-map: ^4.0.0 - raw-body: ^2.4.1 - resolve: 1.17.0 - semver: ^6.3.0 - solc: 0.7.3 - source-map-support: ^0.5.13 - stacktrace-parser: ^0.1.10 - tsort: 0.0.1 - undici: ^5.14.0 - uuid: ^8.3.2 - ws: ^7.4.6 + "@ethersproject/abi": ^5.7.0 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/constants": ^5.7.0 + "@ethersproject/contracts": ^5.7.0 + "@ethersproject/providers": ^5.7.2 + "@ethersproject/solidity": ^5.7.0 + "@ethersproject/transactions": ^5.7.0 + "@ethersproject/wallet": ^5.7.0 + "@types/qs": ^6.9.7 + axios: ^0.21.1 + chalk: ^4.1.2 + chokidar: ^3.5.2 + debug: ^4.3.2 + enquirer: ^2.3.6 + ethers: ^5.7.0 + form-data: ^4.0.0 + fs-extra: ^10.0.0 + match-all: ^1.2.6 + murmur-128: ^0.2.1 + qs: ^6.9.4 + zksync-ethers: ^5.0.0 + checksum: 995a20a7ae8d10d2b961690e0903cd2a4a07198bc3d20a15d4734f2d9aade261b6f0ffb9e01b8fc013de34b687e401ed0c90dfc4d592571576f133ce8cbf3003 + languageName: node + linkType: hard + +"hardhat-gas-reporter@npm:^1.0.6, hardhat-gas-reporter@npm:^1.0.8": + version: 1.0.10 + resolution: "hardhat-gas-reporter@npm:1.0.10" + dependencies: + array-uniq: 1.0.3 + eth-gas-reporter: ^0.2.25 + sha1: ^1.1.1 peerDependencies: - ts-node: "*" - typescript: "*" - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - bin: - hardhat: internal/cli/bootstrap.js - checksum: 0b5499890e46750ca8c51bbe1205599b1424a2e5293b40c9f7cb56320d56b9935fbd4e276de370e07664ae81fa57dc7ab227bf2b2363f5732ef9f06df1a9a6d9 + hardhat: ^2.0.2 + checksum: caaec13ab3fcda47b8768257e4416b5fd0e8ef3aca5369aa8195419d3d4a948cc182075333651df44215cfc629d088f5ed9f762c8c14ae5a4b4a4f2613e583d0 languageName: node linkType: hard -"hardhat@npm:^2.8.0": - version: 2.19.4 - resolution: "hardhat@npm:2.19.4" +"hardhat@npm:^2.14.0, hardhat@npm:^2.16.1, hardhat@npm:^2.19.2, hardhat@npm:^2.8.0": + version: 2.22.6 + resolution: "hardhat@npm:2.22.6" dependencies: "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@nomicfoundation/ethereumjs-vm": 7.0.2 + "@nomicfoundation/edr": ^0.4.1 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-tx": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 "@nomicfoundation/solidity-analyzer": ^0.1.0 "@sentry/node": ^5.18.1 "@types/bn.js": ^5.1.0 @@ -6930,6 +6896,7 @@ __metadata: adm-zip: ^0.4.16 aggregate-error: ^3.0.0 ansi-escapes: ^4.3.0 + boxen: ^5.1.2 chalk: ^2.4.2 chokidar: ^3.4.0 ci-info: ^2.0.0 @@ -6952,7 +6919,7 @@ __metadata: raw-body: ^2.4.1 resolve: 1.17.0 semver: ^6.3.0 - solc: 0.7.3 + solc: 0.8.26 source-map-support: ^0.5.13 stacktrace-parser: ^0.1.10 tsort: 0.0.1 @@ -6969,7 +6936,7 @@ __metadata: optional: true bin: hardhat: internal/cli/bootstrap.js - checksum: 05dcaeab5bb641e74426ad47acfda903dcd3fd229b0d30f45b9de1d3c54fe6364161f3c88517984233d18f5b9294a050500ca7336b6ca069fa259fede6f5acb1 + checksum: 5aec1824db3575d63754de18c2629bcd820bc836d836f8a6346bcd9aa2ae4c397e090c43ea482ee765b704e018001015b5c84c5ded301a6a1144129c1a4c509b languageName: node linkType: hard @@ -7001,19 +6968,19 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0": - version: 1.0.1 - resolution: "has-property-descriptors@npm:1.0.1" +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" dependencies: - get-intrinsic: ^1.2.2 - checksum: 2bcc6bf6ec6af375add4e4b4ef586e43674850a91ad4d46666d0b28ba8e1fd69e424c7677d24d60f69470ad0afaa2f3197f508b20b0bb7dd99a8ab77ffc4b7c4 + es-define-property: ^1.0.0 + checksum: fcbb246ea2838058be39887935231c6d5788babed499d0e9d0cc5737494c48aba4fe17ba1449e0d0fbbb1e36175442faa37f9c427ae357d6ccb1d895fbcd3de3 languageName: node linkType: hard -"has-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "has-proto@npm:1.0.1" - checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: fe7c3d50b33f50f3933a04413ed1f69441d21d2d2944f81036276d30635cad9279f6b43bc8f32036c31ebdfcf6e731150f46c1907ad90c669ffe9b066c3ba5c4 languageName: node linkType: hard @@ -7024,12 +6991,12 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0": - version: 1.0.0 - resolution: "has-tostringtag@npm:1.0.0" +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" dependencies: - has-symbols: ^1.0.2 - checksum: cc12eb28cb6ae22369ebaad3a8ab0799ed61270991be88f208d508076a1e99abe4198c965935ce85ea90b60c94ddda73693b0920b58e7ead048b4a391b502c1c + has-symbols: ^1.0.3 + checksum: 999d60bb753ad714356b2c6c87b7fb74f32463b8426e159397da4bde5bca7e598ab1073f4d8d4deafac297f2eb311484cd177af242776bf05f0d11565680468d languageName: node linkType: hard @@ -7061,16 +7028,16 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0": - version: 2.0.0 - resolution: "hasown@npm:2.0.0" +"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" dependencies: function-bind: ^1.1.2 - checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + checksum: e8516f776a15149ca6c6ed2ae3110c417a00b62260e222590e54aa367cbcd6ed99122020b37b7fbdf05748df57b265e70095d7bf35a47660587619b15ffb93db languageName: node linkType: hard -"he@npm:1.2.0": +"he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" bin: @@ -7173,12 +7140,12 @@ __metadata: linkType: hard "http-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "http-proxy-agent@npm:7.0.0" + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" dependencies: agent-base: ^7.1.0 debug: ^4.3.4 - checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + checksum: 670858c8f8f3146db5889e1fa117630910101db601fff7d5a8aa637da0abedf68c899f03d3451cac2f83bcc4c3d2dabf339b3aa00ff8080571cceb02c3ce02f3 languageName: node linkType: hard @@ -7202,12 +7169,12 @@ __metadata: linkType: hard "https-proxy-agent@npm:^7.0.0, https-proxy-agent@npm:^7.0.1": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" + version: 7.0.5 + resolution: "https-proxy-agent@npm:7.0.5" dependencies: agent-base: ^7.0.2 debug: 4 - checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + checksum: 2e1a28960f13b041a50702ee74f240add8e75146a5c37fc98f1960f0496710f6918b3a9fe1e5aba41e50f58e6df48d107edd9c405c5f0d73ac260dabf2210857 languageName: node linkType: hard @@ -7254,7 +7221,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": +"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -7271,16 +7238,16 @@ __metadata: linkType: hard "ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.2.4 - resolution: "ignore@npm:5.2.4" - checksum: 3d4c309c6006e2621659311783eaea7ebcd41fe4ca1d78c91c473157ad6666a57a2df790fe0d07a12300d9aac2888204d7be8d59f9aaf665b1c7fcdb432517ef + version: 5.3.1 + resolution: "ignore@npm:5.3.1" + checksum: 71d7bb4c1dbe020f915fd881108cbe85a0db3d636a0ea3ba911393c53946711d13a9b1143c7e70db06d571a5822c0a324a6bcde5c9904e7ca5047f01f1bf8cd3 languageName: node linkType: hard "immutable@npm:^4.0.0-rc.12": - version: 4.3.4 - resolution: "immutable@npm:4.3.4" - checksum: de3edd964c394bab83432429d3fb0b4816b42f56050f2ca913ba520bd3068ec3e504230d0800332d3abc478616e8f55d3787424a90d0952e6aba864524f1afc3 + version: 4.3.7 + resolution: "immutable@npm:4.3.7" + checksum: 1c50eb053bb300796551604afff554066f041aa8e15926cf98f6d11d9736b62ad12531c06515dd96375258653878b4736f8051cd20b640f5f976d09fa640e3ec languageName: node linkType: hard @@ -7339,7 +7306,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": +"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 @@ -7375,14 +7342,14 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.5": - version: 1.0.6 - resolution: "internal-slot@npm:1.0.6" +"internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" dependencies: - get-intrinsic: ^1.2.2 + es-errors: ^1.3.0 hasown: ^2.0.0 side-channel: ^1.0.4 - checksum: 7872454888047553ce97a3fa1da7cc054a28ec5400a9c2e9f4dbe4fe7c1d041cb8e8301467614b80d4246d50377aad2fb58860b294ed74d6700cc346b6f89549 + checksum: cadc5eea5d7d9bc2342e93aae9f31f04c196afebb11bde97448327049f492cd7081e18623ae71388aac9cd237b692ca3a105be9c68ac39c1dec679d7409e33eb languageName: node linkType: hard @@ -7412,6 +7379,16 @@ __metadata: languageName: node linkType: hard +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: 1.1.0 + sprintf-js: ^1.1.3 + checksum: aa15f12cfd0ef5e38349744e3654bae649a34c3b10c77a674a167e99925d1549486c5b14730eebce9fea26f6db9d5e42097b00aa4f9f612e68c79121c71652dc + languageName: node + linkType: hard + "ip-regex@npm:^4.1.0": version: 4.3.0 resolution: "ip-regex@npm:4.3.0" @@ -7419,21 +7396,13 @@ __metadata: languageName: node linkType: hard -"ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": - version: 3.0.2 - resolution: "is-array-buffer@npm:3.0.2" +"is-array-buffer@npm:^3.0.4": + version: 3.0.4 + resolution: "is-array-buffer@npm:3.0.4" dependencies: call-bind: ^1.0.2 - get-intrinsic: ^1.2.0 - is-typed-array: ^1.1.10 - checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + get-intrinsic: ^1.2.1 + checksum: e4e3e6ef0ff2239e75371d221f74bc3c26a03564a22efb39f6bb02609b598917ddeecef4e8c877df2a25888f247a98198959842a5e73236bc7f22cabdf6351a7 languageName: node linkType: hard @@ -7472,13 +7441,6 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^2.0.5": - version: 2.0.5 - resolution: "is-buffer@npm:2.0.5" - checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 - languageName: node - linkType: hard - "is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" @@ -7496,11 +7458,20 @@ __metadata: linkType: hard "is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1": - version: 2.13.1 - resolution: "is-core-module@npm:2.13.1" + version: 2.15.0 + resolution: "is-core-module@npm:2.15.0" dependencies: - hasown: ^2.0.0 - checksum: 256559ee8a9488af90e4bad16f5583c6d59e92f0742e9e8bb4331e758521ee86b810b93bae44f390766ffbc518a0488b18d9dab7da9a5ff997d499efc9403f7c + hasown: ^2.0.2 + checksum: a9f7a52707c9b59d7164094d183bda892514fc3ba3139f245219c7abe7f6e8d3e2cdcf861f52a891a467f785f1dfa5d549f73b0ee715f4ba56e8882d335ea585 + languageName: node + linkType: hard + +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: ^1.1.13 + checksum: 4ba4562ac2b2ec005fefe48269d6bd0152785458cd253c746154ffb8a8ab506a29d0cfb3b74af87513843776a88e4981ae25c89457bf640a33748eab1a7216b5 languageName: node linkType: hard @@ -7557,10 +7528,10 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.2": - version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: c1e6b23d2070c0539d7b36022d5a94407132411d01aba39ec549af824231f3804b1aea90b5e4e58e807a65d23ceb538ed6e355ce76b267bdd86edb757ffcbdcd languageName: node linkType: hard @@ -7587,6 +7558,13 @@ __metadata: languageName: node linkType: hard +"is-object@npm:~1.0.1": + version: 1.0.2 + resolution: "is-object@npm:1.0.2" + checksum: 971219c4b1985b9751f65e4c8296d3104f0457b0e8a70849e848a4a2208bc47317d73b3b85d4a369619cb2df8284dc22584cb2695a7d99aca5e8d0aa64fc075a + languageName: node + linkType: hard + "is-path-cwd@npm:^2.2.0": version: 2.2.0 resolution: "is-path-cwd@npm:2.2.0" @@ -7632,12 +7610,12 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "is-shared-array-buffer@npm:1.0.2" +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": + version: 1.0.3 + resolution: "is-shared-array-buffer@npm:1.0.3" dependencies: - call-bind: ^1.0.2 - checksum: 9508929cf14fdc1afc9d61d723c6e8d34f5e117f0bffda4d97e7a5d88c3a8681f633a74f8e3ad1fe92d5113f9b921dc5ca44356492079612f9a247efbce7032a + call-bind: ^1.0.7 + checksum: a4fff602c309e64ccaa83b859255a43bb011145a42d3f56f67d9268b55bc7e6d98a5981a1d834186ad3105d6739d21547083fe7259c76c0468483fc538e716d8 languageName: node linkType: hard @@ -7675,12 +7653,12 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.9": - version: 1.1.12 - resolution: "is-typed-array@npm:1.1.12" +"is-typed-array@npm:^1.1.13": + version: 1.1.13 + resolution: "is-typed-array@npm:1.1.13" dependencies: - which-typed-array: ^1.1.11 - checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + which-typed-array: ^1.1.14 + checksum: 150f9ada183a61554c91e1c4290086d2c100b0dff45f60b028519be72a8db964da403c48760723bf5253979b8dffe7b544246e0e5351dcd05c5fdb1dcc1dc0f0 languageName: node linkType: hard @@ -7700,6 +7678,13 @@ __metadata: languageName: node linkType: hard +"isarray@npm:0.0.1": + version: 0.0.1 + resolution: "isarray@npm:0.0.1" + checksum: 49191f1425681df4a18c2f0f93db3adb85573bcdd6a4482539d98eac9e705d8961317b01175627e860516a2fc45f8f9302db26e5a380a97a520e272e2a40a8d4 + languageName: node + linkType: hard + "isarray@npm:^1.0.0, isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" @@ -7751,16 +7736,16 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.5": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" +"jackspeak@npm:^3.1.2": + version: 3.4.3 + resolution: "jackspeak@npm:3.4.3" dependencies: "@isaacs/cliui": ^8.0.2 "@pkgjs/parseargs": ^0.11.0 dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + checksum: be31027fc72e7cc726206b9f560395604b82e0fddb46c4cbf9f97d049bcef607491a5afc0699612eaa4213ca5be8fd3e1e7cd187b3040988b65c9489838a7c00 languageName: node linkType: hard @@ -7785,13 +7770,6 @@ __metadata: languageName: node linkType: hard -"js-sdsl@npm:^4.1.4": - version: 4.4.2 - resolution: "js-sdsl@npm:4.4.2" - checksum: ba705adc1788bf3c6f6c8e5077824f2bb4f0acab5a984420ce5cc492c7fff3daddc26335ad2c9a67d4f5e3241ec790f9e5b72a625adcf20cf321d2fd85e62b8b - languageName: node - linkType: hard - "js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" @@ -7818,7 +7796,7 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": +"js-yaml@npm:^4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" dependencies: @@ -7829,6 +7807,13 @@ __metadata: languageName: node linkType: hard +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 944f924f2bd67ad533b3850eee47603eed0f6ae425fd1ee8c760f477e8c34a05f144c1bd4f5a5dd1963141dc79a2c55f89ccc5ab77d039e7077f3ad196b64965 + languageName: node + linkType: hard + "jsesc@npm:^2.5.1": version: 2.5.2 resolution: "jsesc@npm:2.5.2" @@ -7903,18 +7888,6 @@ __metadata: languageName: node linkType: hard -"jsonfile@npm:^2.1.0": - version: 2.4.0 - resolution: "jsonfile@npm:2.4.0" - dependencies: - graceful-fs: ^4.1.6 - dependenciesMeta: - graceful-fs: - optional: true - checksum: f5064aabbc9e35530dc471d8b203ae1f40dbe949ddde4391c6f6a6d310619a15f0efdae5587df594d1d70c555193aaeee9d2ed4aec9ffd5767bd5e4e62d49c3d - languageName: node - linkType: hard - "jsonfile@npm:^4.0.0": version: 4.0.0 resolution: "jsonfile@npm:4.0.0" @@ -7968,6 +7941,13 @@ __metadata: languageName: node linkType: hard +"just-extend@npm:^6.2.0": + version: 6.2.0 + resolution: "just-extend@npm:6.2.0" + checksum: 022024d6f687c807963b97a24728a378799f7e4af7357d1c1f90dedb402943d5c12be99a5136654bed8362c37a358b1793feaad3366896f239a44e17c5032d86 + languageName: node + linkType: hard + "keccak@npm:^3.0.0, keccak@npm:^3.0.2": version: 3.0.4 resolution: "keccak@npm:3.0.4" @@ -7996,45 +7976,6 @@ __metadata: languageName: node linkType: hard -"klaw@npm:^1.0.0": - version: 1.3.1 - resolution: "klaw@npm:1.3.1" - dependencies: - graceful-fs: ^4.1.9 - dependenciesMeta: - graceful-fs: - optional: true - checksum: 8f69e4797c26e7c3f2426bfa85f38a3da3c2cb1b4c6bd850d2377aed440d41ce9d806f2885c2e2e224372c56af4b1d43b8a499adecf9a05e7373dc6b8b7c52e4 - languageName: node - linkType: hard - -"level-supports@npm:^4.0.0": - version: 4.0.1 - resolution: "level-supports@npm:4.0.1" - checksum: d4552b42bb8cdeada07b0f6356c7a90fefe76279147331f291aceae26e3e56d5f927b09ce921647c0230bfe03ddfbdcef332be921e5c2194421ae2bfa3cf6368 - languageName: node - linkType: hard - -"level-transcoder@npm:^1.0.1": - version: 1.0.1 - resolution: "level-transcoder@npm:1.0.1" - dependencies: - buffer: ^6.0.3 - module-error: ^1.0.1 - checksum: 304f08d802faf3491a533b6d87ad8be3cabfd27f2713bbe9d4c633bf50fcb9460eab5a6776bf015e101ead7ba1c1853e05e7f341112f17a9d0cb37ee5a421a25 - languageName: node - linkType: hard - -"level@npm:^8.0.0": - version: 8.0.0 - resolution: "level@npm:8.0.0" - dependencies: - browser-level: ^1.0.1 - classic-level: ^1.2.0 - checksum: 13eb25bd71bfdca6cd714d1233adf9da97de9a8a4bf9f28d62a390b5c96d0250abaf983eb90eb8c4e89c7a985bb330750683d106f12670e5ea8fba1d7e608a1f - languageName: node - linkType: hard - "levn@npm:^0.4.1": version: 0.4.1 resolution: "levn@npm:0.4.1" @@ -8251,6 +8192,13 @@ __metadata: languageName: node linkType: hard +"lodash.clonedeep@npm:^4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeep@npm:4.5.0" + checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 + languageName: node + linkType: hard + "lodash.escaperegexp@npm:^4.1.2": version: 4.1.2 resolution: "lodash.escaperegexp@npm:4.1.2" @@ -8258,6 +8206,13 @@ __metadata: languageName: node linkType: hard +"lodash.get@npm:^4.4.2": + version: 4.4.2 + resolution: "lodash.get@npm:4.4.2" + checksum: e403047ddb03181c9d0e92df9556570e2b67e0f0a930fcbbbd779370972368f5568e914f913e93f3b08f6d492abc71e14d4e9b7a18916c31fa04bd2306efe545 + languageName: node + linkType: hard + "lodash.isequal@npm:^4.5.0": version: 4.5.0 resolution: "lodash.isequal@npm:4.5.0" @@ -8370,7 +8325,7 @@ __metadata: languageName: node linkType: hard -"log-symbols@npm:4.1.0": +"log-symbols@npm:^4.1.0": version: 4.1.0 resolution: "log-symbols@npm:4.1.0" dependencies: @@ -8389,12 +8344,10 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.2 - resolution: "lru-cache@npm:10.0.2" - dependencies: - semver: ^7.3.5 - checksum: 83ad0e899d79f48574bdda131fe8157c6d65cbd073a6e78e0d1a3467a85dce1ef4d8dc9fd618a56c57a068271501c81d54471e13f84dd121e046b155ed061ed4 +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": + version: 10.4.3 + resolution: "lru-cache@npm:10.4.3" + checksum: 6476138d2125387a6d20f100608c2583d415a4f64a0fecf30c9e2dda976614f09cad4baa0842447bd37dd459a7bd27f57d9d8f8ce558805abd487c583f3d774a languageName: node linkType: hard @@ -8430,12 +8383,12 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.5": - version: 0.30.5 - resolution: "magic-string@npm:0.30.5" +"magic-string@npm:^0.30.10": + version: 0.30.11 + resolution: "magic-string@npm:0.30.11" dependencies: - "@jridgewell/sourcemap-codec": ^1.4.15 - checksum: da10fecff0c0a7d3faf756913ce62bd6d5e7b0402be48c3b27bfd651b90e29677e279069a63b764bcdc1b8ecdcdb898f29a5c5ec510f2323e8d62ee057a6eb18 + "@jridgewell/sourcemap-codec": ^1.5.0 + checksum: e041649453c9a3f31d2e731fc10e38604d50e20d3585cd48bc7713a6e2e1a3ad3012105929ca15750d59d0a3f1904405e4b95a23b7e69dc256db3c277a73a3ca languageName: node linkType: hard @@ -8471,8 +8424,8 @@ __metadata: linkType: hard "make-fetch-happen@npm:^13.0.0": - version: 13.0.0 - resolution: "make-fetch-happen@npm:13.0.0" + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" dependencies: "@npmcli/agent": ^2.0.0 cacache: ^18.0.0 @@ -8483,9 +8436,10 @@ __metadata: minipass-flush: ^1.0.5 minipass-pipeline: ^1.2.4 negotiator: ^0.6.3 + proc-log: ^4.2.0 promise-retry: ^2.0.1 ssri: ^10.0.0 - checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af + checksum: 5c9fad695579b79488fa100da05777213dd9365222f85e4757630f8dd2a21a79ddd3206c78cfd6f9b37346819681782b67900ac847a57cf04190f52dda5343fd languageName: node linkType: hard @@ -8542,13 +8496,6 @@ __metadata: languageName: node linkType: hard -"mcl-wasm@npm:^0.7.1": - version: 0.7.9 - resolution: "mcl-wasm@npm:0.7.9" - checksum: 6b6ed5084156b98b2db70b223e1ba2c01953970b48a2e0c4ea3eeb9296610e6b3bfb2a2cce9e92e2d7ad61778b5f5a630e705e663835e915ba188c174a0a37fa - languageName: node - linkType: hard - "md5.js@npm:^1.3.4": version: 1.3.5 resolution: "md5.js@npm:1.3.5" @@ -8560,17 +8507,6 @@ __metadata: languageName: node linkType: hard -"memory-level@npm:^1.0.0": - version: 1.0.0 - resolution: "memory-level@npm:1.0.0" - dependencies: - abstract-level: ^1.0.0 - functional-red-black-tree: ^1.0.1 - module-error: ^1.0.1 - checksum: 80b1b7aedaf936e754adbcd7b9303018c3684fb32f9992fd967c448f145d177f16c724fbba9ed3c3590a9475fd563151eae664d69b83d2ad48714852e9fc5c72 - languageName: node - linkType: hard - "memorystream@npm:^0.3.1": version: 0.3.1 resolution: "memorystream@npm:0.3.1" @@ -8597,6 +8533,13 @@ __metadata: languageName: node linkType: hard +"merge-descriptors@npm:~1.0.0": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -8619,12 +8562,12 @@ __metadata: linkType: hard "micromatch@npm:^4.0.0, micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" dependencies: - braces: ^3.0.2 + braces: ^3.0.3 picomatch: ^2.3.1 - checksum: 02a17b671c06e8fefeeb6ef996119c1e597c942e632a21ef589154f23898c9c6a9858526246abb14f8bca6e77734aa9dcf65476fca47cedfb80d9577d52843fc + checksum: 3cde047d70ad80cf60c787b77198d680db3b8c25b23feb01de5e2652205d9c19f43bd81882f69a0fd1f0cde6a7a122d774998aad3271ddb1b8accf8a0f480cf7 languageName: node linkType: hard @@ -8690,16 +8633,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:5.0.1": - version: 5.0.1 - resolution: "minimatch@npm:5.0.1" - dependencies: - brace-expansion: ^2.0.1 - checksum: b34b98463da4754bc526b244d680c69d4d6089451ebe512edaf6dd9eeed0279399cfa3edb19233513b8f830bf4bfcad911dddcdf125e75074100d52f724774f0 - languageName: node - linkType: hard - -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": +"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6": version: 5.1.6 resolution: "minimatch@npm:5.1.6" dependencies: @@ -8708,12 +8642,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" +"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": + version: 9.0.5 + resolution: "minimatch@npm:9.0.5" dependencies: brace-expansion: ^2.0.1 - checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + checksum: 2c035575eda1e50623c731ec6c14f65a85296268f749b9337005210bb2b34e2705f8ef1a358b188f69892286ab99dc42c8fb98a57bde55c8d81b3023c19cea28 languageName: node linkType: hard @@ -8744,6 +8678,15 @@ __metadata: languageName: node linkType: hard +"minipass-collect@npm:^2.0.1": + version: 2.0.1 + resolution: "minipass-collect@npm:2.0.1" + dependencies: + minipass: ^7.0.3 + checksum: b251bceea62090f67a6cced7a446a36f4cd61ee2d5cea9aee7fff79ba8030e416327a1c5aa2908dc22629d06214b46d88fdab8c51ac76bacbf5703851b5ad342 + languageName: node + linkType: hard + "minipass-fetch@npm:^2.0.3": version: 2.1.2 resolution: "minipass-fetch@npm:2.1.2" @@ -8760,8 +8703,8 @@ __metadata: linkType: hard "minipass-fetch@npm:^3.0.0": - version: 3.0.4 - resolution: "minipass-fetch@npm:3.0.4" + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" dependencies: encoding: ^0.1.13 minipass: ^7.0.3 @@ -8770,7 +8713,7 @@ __metadata: dependenciesMeta: encoding: optional: true - checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + checksum: 8047d273236157aab27ab7cd8eab7ea79e6ecd63e8f80c3366ec076cb9a0fed550a6935bab51764369027c414647fd8256c2a20c5445fb250c483de43350de83 languageName: node linkType: hard @@ -8784,12 +8727,12 @@ __metadata: linkType: hard "minipass-json-stream@npm:^1.0.1": - version: 1.0.1 - resolution: "minipass-json-stream@npm:1.0.1" + version: 1.0.2 + resolution: "minipass-json-stream@npm:1.0.2" dependencies: jsonparse: ^1.3.1 minipass: ^3.0.0 - checksum: 791b696a27d1074c4c08dab1bf5a9f3201145c2933e428f45d880467bce12c60de4703203d2928de4b162d0ae77b0bb4b55f96cb846645800aa0eb4919b3e796 + checksum: 24b9c6208b72e47a5a28058642e86f27d17e285e4cd5ba41d698568bb91f0566a7ff31f0e7dfb7ebd3dc603d016ac75b82e3ffe96340aa294048da87489ff18c languageName: node linkType: hard @@ -8827,10 +8770,10 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": - version: 7.0.4 - resolution: "minipass@npm:7.0.4" - checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3 languageName: node linkType: hard @@ -8844,6 +8787,13 @@ __metadata: languageName: node linkType: hard +"mkdirp-classic@npm:^0.5.2": + version: 0.5.3 + resolution: "mkdirp-classic@npm:0.5.3" + checksum: 3f4e088208270bbcc148d53b73e9a5bd9eef05ad2cbf3b3d0ff8795278d50dd1d11a8ef1875ff5aea3fa888931f95bfcb2ad5b7c1061cfefd6284d199e6776ac + languageName: node + linkType: hard + "mkdirp-infer-owner@npm:^2.0.0": version: 2.0.0 resolution: "mkdirp-infer-owner@npm:2.0.0" @@ -8855,7 +8805,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:0.5.x": +"mkdirp@npm:0.5.x, mkdirp@npm:^0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -8875,6 +8825,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d + languageName: node + linkType: hard + "mnemonist@npm:^0.38.0": version: 0.38.5 resolution: "mnemonist@npm:0.38.5" @@ -8884,35 +8843,34 @@ __metadata: languageName: node linkType: hard -"mocha@npm:10.2.0, mocha@npm:^10.0.0, mocha@npm:^10.2.0": - version: 10.2.0 - resolution: "mocha@npm:10.2.0" - dependencies: - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.3 - debug: 4.3.4 - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 7.2.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.0.1 - ms: 2.1.3 - nanoid: 3.3.3 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.2.1 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 +"mocha@npm:^10.0.0, mocha@npm:^10.2.0": + version: 10.7.0 + resolution: "mocha@npm:10.7.0" + dependencies: + ansi-colors: ^4.1.3 + browser-stdout: ^1.3.1 + chokidar: ^3.5.3 + debug: ^4.3.5 + diff: ^5.2.0 + escape-string-regexp: ^4.0.0 + find-up: ^5.0.0 + glob: ^8.1.0 + he: ^1.2.0 + js-yaml: ^4.1.0 + log-symbols: ^4.1.0 + minimatch: ^5.1.6 + ms: ^2.1.3 + serialize-javascript: ^6.0.2 + strip-json-comments: ^3.1.1 + supports-color: ^8.1.1 + workerpool: ^6.5.1 + yargs: ^16.2.0 + yargs-parser: ^20.2.9 + yargs-unparser: ^2.0.0 bin: _mocha: bin/_mocha mocha: bin/mocha.js - checksum: 406c45eab122ffd6ea2003c2f108b2bc35ba036225eee78e0c784b6fa2c7f34e2b13f1dbacef55a4fdf523255d76e4f22d1b5aacda2394bd11666febec17c719 + checksum: e04c4ce7a61cacf0edd66a8e5ce04b14c1adaaac66c1c7765d5408f3c27b75583e104baa92709c40f207b7ff51bc80b85c4aa7b4e5ce25dbddd1e55d66aa774b languageName: node linkType: hard @@ -8930,10 +8888,10 @@ __metadata: languageName: node linkType: hard -"module-error@npm:^1.0.1, module-error@npm:^1.0.2": - version: 1.0.2 - resolution: "module-error@npm:1.0.2" - checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 +"module-not-found-error@npm:^1.0.1": + version: 1.0.1 + resolution: "module-not-found-error@npm:1.0.1" + checksum: ebd65339d4d5980dd55cd32dbf112ec02b8e33f30866312b94caeee4783322259f18cf2270e9d2e600df3bd1876c35612b87f5c2525c21885fb1f83e85a9b9b0 languageName: node linkType: hard @@ -8944,7 +8902,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.2": +"ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -8969,16 +8927,16 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:3.3.3": - version: 3.3.3 - resolution: "nanoid@npm:3.3.3" - bin: - nanoid: bin/nanoid.cjs - checksum: ada019402a07464a694553c61d2dca8a4353645a7d92f2830f0d487fedff403678a0bee5323a46522752b2eab95a0bc3da98b6cccaa7c0c55cd9975130e6d6f0 +"nan@npm:^2.18.0, nan@npm:^2.19.0": + version: 2.20.0 + resolution: "nan@npm:2.20.0" + dependencies: + node-gyp: latest + checksum: eb09286e6c238a3582db4d88c875db73e9b5ab35f60306090acd2f3acae21696c9b653368b4a0e32abcef64ee304a923d6223acaddd16169e5eaaf5c508fb533 languageName: node linkType: hard -"nanoid@npm:^3.3.6": +"nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" bin: @@ -8987,13 +8945,6 @@ __metadata: languageName: node linkType: hard -"napi-macros@npm:^2.2.2": - version: 2.2.2 - resolution: "napi-macros@npm:2.2.2" - checksum: c6f9bd71cdbbc37ddc3535aa5be481238641d89585b8a3f4d301cb89abf459e2d294810432bb7d12056d1f9350b1a0899a5afcf460237a3da6c398cf0fec7629 - languageName: node - linkType: hard - "natural-compare-lite@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare-lite@npm:1.4.0" @@ -9029,6 +8980,19 @@ __metadata: languageName: node linkType: hard +"nise@npm:^6.0.0": + version: 6.0.0 + resolution: "nise@npm:6.0.0" + dependencies: + "@sinonjs/commons": ^3.0.0 + "@sinonjs/fake-timers": ^11.2.2 + "@sinonjs/text-encoding": ^0.7.2 + just-extend: ^6.2.0 + path-to-regexp: ^6.2.1 + checksum: 86d6ebe5baf239b73e97cd4125b03bf5f5d934fabbbf044b801dfc709d786908f68b00eac9ebd08662c20eab39a53ac4f09084885d241e994eb3f502e3b8b618 + languageName: node + linkType: hard + "node-addon-api@npm:^2.0.0": version: 2.0.2 resolution: "node-addon-api@npm:2.0.2" @@ -9061,14 +9025,14 @@ __metadata: languageName: node linkType: hard -"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": - version: 4.6.1 - resolution: "node-gyp-build@npm:4.6.1" +"node-gyp-build@npm:^4.2.0": + version: 4.8.1 + resolution: "node-gyp-build@npm:4.8.1" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: c3676d337b36803bc7792e35bf7fdcda7cdcb7e289b8f9855a5535702a82498eb976842fefcf487258c58005ca32ce3d537fbed91280b04409161dcd7232a882 + checksum: fe6e95da6f4608c1a98655f6bf2fe4e8dd9c877cd13256056a8acaf585cc7f98718823fe9366be11b78c2f332d5a184b00cf07a4af96c9d8fea45f640c019f98 languageName: node linkType: hard @@ -9094,8 +9058,8 @@ __metadata: linkType: hard "node-gyp@npm:latest": - version: 10.0.1 - resolution: "node-gyp@npm:10.0.1" + version: 10.2.0 + resolution: "node-gyp@npm:10.2.0" dependencies: env-paths: ^2.2.0 exponential-backoff: ^3.1.1 @@ -9103,20 +9067,20 @@ __metadata: graceful-fs: ^4.2.6 make-fetch-happen: ^13.0.0 nopt: ^7.0.0 - proc-log: ^3.0.0 + proc-log: ^4.1.0 semver: ^7.3.5 - tar: ^6.1.2 + tar: ^6.2.1 which: ^4.0.0 bin: node-gyp: bin/node-gyp.js - checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f + checksum: 0233759d8c19765f7fdc259a35eb046ad86c3d09e22f7384613ae2b89647dd27fcf833fdf5293d9335041e91f9b1c539494225959cdb312a5c8080b7534b926f languageName: node linkType: hard -"node-releases@npm:^2.0.13": - version: 2.0.13 - resolution: "node-releases@npm:2.0.13" - checksum: 17ec8f315dba62710cae71a8dad3cd0288ba943d2ece43504b3b1aa8625bf138637798ab470b1d9035b0545996f63000a8a926e0f6d35d0996424f8b6d36dda3 +"node-releases@npm:^2.0.14": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: ef55a3d853e1269a6d6279b7692cd6ff3e40bc74947945101138745bfdc9a5edabfe72cb19a31a8e45752e1910c4c65c77d931866af6357f242b172b7283f5b3 languageName: node linkType: hard @@ -9150,13 +9114,13 @@ __metadata: linkType: hard "nopt@npm:^7.0.0": - version: 7.2.0 - resolution: "nopt@npm:7.2.0" + version: 7.2.1 + resolution: "nopt@npm:7.2.1" dependencies: abbrev: ^2.0.0 bin: nopt: bin/nopt.js - checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 + checksum: 6fa729cc77ce4162cfad8abbc9ba31d4a0ff6850c3af61d59b505653bef4781ec059f8890ecfe93ee8aa0c511093369cca88bfc998101616a2904e715bbbb7c9 languageName: node linkType: hard @@ -9452,10 +9416,10 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": - version: 1.13.1 - resolution: "object-inspect@npm:1.13.1" - checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f +"object-inspect@npm:^1.13.1": + version: 1.13.2 + resolution: "object-inspect@npm:1.13.2" + checksum: 9f850b3c045db60e0e97746e809ee4090d6ce62195af17dd1e9438ac761394a7d8ec4f7906559aea5424eaf61e35d3e53feded2ccd5f62fcc7d9670d3c8eb353 languageName: node linkType: hard @@ -9466,15 +9430,15 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.4": - version: 4.1.4 - resolution: "object.assign@npm:4.1.4" +"object.assign@npm:^4.1.5": + version: 4.1.5 + resolution: "object.assign@npm:4.1.5" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.4 + call-bind: ^1.0.5 + define-properties: ^1.2.1 has-symbols: ^1.0.3 object-keys: ^1.1.1 - checksum: 76cab513a5999acbfe0ff355f15a6a125e71805fcf53de4e9d4e082e1989bdb81d1e329291e1e4e0ae7719f0e4ef80e88fb2d367ae60500d79d25a6224ac8864 + checksum: f9aeac0541661370a1fc86e6a8065eb1668d3e771f7dbb33ee54578201336c057b21ee61207a186dd42db0c62201d91aac703d20d12a79fc79c353eed44d4e25 languageName: node linkType: hard @@ -9485,7 +9449,7 @@ __metadata: languageName: node linkType: hard -"once@npm:1.x, once@npm:^1.3.0, once@npm:^1.4.0": +"once@npm:1.x, once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -9527,16 +9491,16 @@ __metadata: linkType: hard "optionator@npm:^0.9.3": - version: 0.9.3 - resolution: "optionator@npm:0.9.3" + version: 0.9.4 + resolution: "optionator@npm:0.9.4" dependencies: - "@aashutoshrathi/word-wrap": ^1.2.3 deep-is: ^0.1.3 fast-levenshtein: ^2.0.6 levn: ^0.4.1 prelude-ls: ^1.2.1 type-check: ^0.4.0 - checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a + word-wrap: ^1.2.5 + checksum: ecbd010e3dc73e05d239976422d9ef54a82a13f37c11ca5911dff41c98a6c7f0f163b27f922c37e7f8340af9d36febd3b6e9cef508f3339d4c393d7276d716bb languageName: node linkType: hard @@ -9668,6 +9632,13 @@ __metadata: languageName: node linkType: hard +"package-json-from-dist@npm:^1.0.0": + version: 1.0.0 + resolution: "package-json-from-dist@npm:1.0.0" + checksum: ac706ec856a5a03f5261e4e48fa974f24feb044d51f84f8332e2af0af04fbdbdd5bbbfb9cbbe354190409bc8307c83a9e38c6672c3c8855f709afb0006a009ea + languageName: node + linkType: hard + "pacote@npm:^13.0.3, pacote@npm:^13.6.1, pacote@npm:^13.6.2": version: 13.6.2 resolution: "pacote@npm:13.6.2" @@ -9748,6 +9719,13 @@ __metadata: languageName: node linkType: hard +"path-browserify@npm:^1.0.1": + version: 1.0.1 + resolution: "path-browserify@npm:1.0.1" + checksum: c6d7fa376423fe35b95b2d67990060c3ee304fc815ff0a2dc1c6c3cfaff2bd0d572ee67e18f19d0ea3bbe32e8add2a05021132ac40509416459fffee35200699 + languageName: node + linkType: hard + "path-exists@npm:^3.0.0": version: 3.0.0 resolution: "path-exists@npm:3.0.0" @@ -9783,13 +9761,20 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.1": - version: 1.10.1 - resolution: "path-scurry@npm:1.10.1" +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" dependencies: - lru-cache: ^9.1.1 || ^10.0.0 + lru-cache: ^10.2.0 minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + checksum: 890d5abcd593a7912dcce7cf7c6bf7a0b5648e3dee6caf0712c126ca0a65c7f3d7b9d769072a4d1baf370f61ce493ab5b038d59988688e0c5f3f646ee3c69023 + languageName: node + linkType: hard + +"path-to-regexp@npm:^6.2.1": + version: 6.2.2 + resolution: "path-to-regexp@npm:6.2.2" + checksum: b7b0005c36f5099f9ed1fb20a820d2e4ed1297ffe683ea1d678f5e976eb9544f01debb281369dabdc26da82e6453901bf71acf2c7ed14b9243536c2a45286c33 languageName: node linkType: hard @@ -9820,10 +9805,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 languageName: node linkType: hard @@ -9865,24 +9850,31 @@ __metadata: languageName: node linkType: hard +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: b32d403ece71e042385cc7856385cecf1cd8e144fa74d2f1de40d1e16035dba097bc189715925e79b67bdd1472796ff168d3a90d296356c9c94d272d5b95f3ae + languageName: node + linkType: hard + "postcss-selector-parser@npm:^6.0.10": - version: 6.0.13 - resolution: "postcss-selector-parser@npm:6.0.13" + version: 6.1.1 + resolution: "postcss-selector-parser@npm:6.1.1" dependencies: cssesc: ^3.0.0 util-deprecate: ^1.0.2 - checksum: f89163338a1ce3b8ece8e9055cd5a3165e79a15e1c408e18de5ad8f87796b61ec2d48a2902d179ae0c4b5de10fccd3a325a4e660596549b040bc5ad1b465f096 + checksum: 1c6a5adfc3c19c6e1e7d94f8addb89a5166fcca72c41f11713043d381ecbe82ce66360c5524e904e17b54f7fc9e6a077994ff31238a456bc7320c3e02e88d92e languageName: node linkType: hard -"postcss@npm:^8.4.31": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" +"postcss@npm:^8.4.39": + version: 8.4.40 + resolution: "postcss@npm:8.4.40" dependencies: - nanoid: ^3.3.6 - picocolors: ^1.0.0 - source-map-js: ^1.0.2 - checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea + nanoid: ^3.3.7 + picocolors: ^1.0.1 + source-map-js: ^1.2.0 + checksum: afd0cc49d2169dcd96c0f17e155c5d75de048956306a3017f1cfa6a7d66b941592245bed20f7796ceeccb2d8967749b623be2c7b010a74f67ea10fb5bdb8ba28 languageName: node linkType: hard @@ -9901,15 +9893,15 @@ __metadata: linkType: hard "prettier-plugin-solidity@npm:^1.0.0-beta.24": - version: 1.2.0 - resolution: "prettier-plugin-solidity@npm:1.2.0" + version: 1.3.1 + resolution: "prettier-plugin-solidity@npm:1.3.1" dependencies: - "@solidity-parser/parser": ^0.16.2 + "@solidity-parser/parser": ^0.17.0 semver: ^7.5.4 - solidity-comments-extractor: ^0.0.7 + solidity-comments-extractor: ^0.0.8 peerDependencies: prettier: ">=2.3.0" - checksum: 96dc9751a7393dfbfb1fcc08d662fd8e69df9ddf51ad70172e6915e86a61491f93f3051ea716deb50ae6023f50b64aa064ffef81224405fba92566124250edb2 + checksum: 286bf3b5899d7fad66e49c78ebac164bacfbf419f874a932ed99e491d97d77e91fa03ca068197939d3696ba7991db9e5258390dd42dee8d2184fa8c2e11921e4 languageName: node linkType: hard @@ -9929,10 +9921,10 @@ __metadata: languageName: node linkType: hard -"proc-log@npm:^3.0.0": - version: 3.0.0 - resolution: "proc-log@npm:3.0.0" - checksum: 02b64e1b3919e63df06f836b98d3af002b5cd92655cab18b5746e37374bfb73e03b84fe305454614b34c25b485cc687a9eebdccf0242cda8fda2475dd2c97e02 +"proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 98f6cd012d54b5334144c5255ecb941ee171744f45fca8b43b58ae5a0c1af07352475f481cadd9848e7f0250376ee584f6aa0951a856ff8f021bdfbff4eb33fc languageName: node linkType: hard @@ -9992,7 +9984,7 @@ __metadata: languageName: node linkType: hard -"proper-lockfile@npm:^4.1.1": +"proper-lockfile@npm:^4.1.1, proper-lockfile@npm:^4.1.2": version: 4.1.2 resolution: "proper-lockfile@npm:4.1.2" dependencies: @@ -10017,6 +10009,37 @@ __metadata: languageName: node linkType: hard +"proxyquire@npm:^2.1.3": + version: 2.1.3 + resolution: "proxyquire@npm:2.1.3" + dependencies: + fill-keys: ^1.0.2 + module-not-found-error: ^1.0.1 + resolve: ^1.11.1 + checksum: a320f1a04d65aeb41625bfd6bbf848492523b730b07926b6c1ed48f9342f2a30c4a4c0b399e07391e76691b65f604773327767c33a8578e5e4ab19299ba46a02 + languageName: node + linkType: hard + +"pump@npm:^1.0.0": + version: 1.0.3 + resolution: "pump@npm:1.0.3" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: 61fe58694f9900020a5cf5bc765d74396891c201afecf06659df2f5874fd832be4e19e2f95cc72d8b9eb98ace0a4db3cebf7343f9fc893a930577be29e3ad8b5 + languageName: node + linkType: hard + +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 + languageName: node + linkType: hard + "punycode@npm:^2.1.0": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -10041,15 +10064,15 @@ __metadata: linkType: hard "qs@npm:^6.4.0, qs@npm:^6.9.4": - version: 6.11.2 - resolution: "qs@npm:6.11.2" + version: 6.12.3 + resolution: "qs@npm:6.12.3" dependencies: - side-channel: ^1.0.4 - checksum: e812f3c590b2262548647d62f1637b6989cc56656dc960b893fe2098d96e1bd633f36576f4cd7564dfbff9db42e17775884db96d846bebe4f37420d073ecdc0b + side-channel: ^1.0.6 + checksum: 9a9228a623bc36d41648237667d7342fb8d64d1cfeb29e474b0c44591ba06ac507e2d726f60eca5af8dc420e5dd23370af408ef8c28e0405675c7187b736a693 languageName: node linkType: hard -"queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": +"queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 @@ -10159,7 +10182,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.6.0": +"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -10170,7 +10193,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.2, readable-stream@npm:^2.2.2, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.2, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -10185,6 +10208,18 @@ __metadata: languageName: node linkType: hard +"readable-stream@npm:~1.0.26-4": + version: 1.0.34 + resolution: "readable-stream@npm:1.0.34" + dependencies: + core-util-is: ~1.0.0 + inherits: ~2.0.1 + isarray: 0.0.1 + string_decoder: ~0.10.x + checksum: 85042c537e4f067daa1448a7e257a201070bfec3dd2706abdbd8ebc7f3418eb4d3ed4b8e5af63e2544d69f88ab09c28d5da3c0b77dc76185fddd189a59863b60 + languageName: node + linkType: hard + "readdir-scoped-modules@npm:^1.1.0": version: 1.1.0 resolution: "readdir-scoped-modules@npm:1.1.0" @@ -10250,14 +10285,15 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.1": - version: 1.5.1 - resolution: "regexp.prototype.flags@npm:1.5.1" +"regexp.prototype.flags@npm:^1.5.2": + version: 1.5.2 + resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - set-function-name: ^2.0.0 - checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 + call-bind: ^1.0.6 + define-properties: ^1.2.1 + es-errors: ^1.3.0 + set-function-name: ^2.0.1 + checksum: d7f333667d5c564e2d7a97c56c3075d64c722c9bb51b2b4df6822b2e8096d623a5e63088fb4c83df919b6951ef8113841de8b47de7224872fa6838bc5d8a7d64 languageName: node linkType: hard @@ -10295,7 +10331,7 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.0, require-from-string@npm:^2.0.2": +"require-from-string@npm:^2.0.2": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b @@ -10348,7 +10384,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.6, resolve@npm:^1.10.0": +"resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.11.1": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -10377,7 +10413,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin": +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.11.1#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" dependencies: @@ -10411,17 +10447,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.2.8": - version: 2.7.1 - resolution: "rimraf@npm:2.7.1" - dependencies: - glob: ^7.1.3 - bin: - rimraf: ./bin.js - checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd - languageName: node - linkType: hard - "rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" @@ -10454,15 +10479,6 @@ __metadata: languageName: node linkType: hard -"run-parallel-limit@npm:^1.1.0": - version: 1.1.0 - resolution: "run-parallel-limit@npm:1.1.0" - dependencies: - queue-microtask: ^1.2.2 - checksum: 672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -10472,13 +10488,6 @@ __metadata: languageName: node linkType: hard -"rustbn.js@npm:~0.2.0": - version: 0.2.0 - resolution: "rustbn.js@npm:0.2.0" - checksum: 2148e7ba34e70682907ee29df4784639e6eb025481b2c91249403b7ec57181980161868d9aa24822a5075dd1bb5a180dfedc77309e5f0d27b6301f9b563af99a - languageName: node - linkType: hard - "rxjs@npm:^7.2.0": version: 7.8.1 resolution: "rxjs@npm:7.8.1" @@ -10488,15 +10497,15 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.0.1": - version: 1.0.1 - resolution: "safe-array-concat@npm:1.0.1" +"safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.2.1 + call-bind: ^1.0.7 + get-intrinsic: ^1.2.4 has-symbols: ^1.0.3 isarray: ^2.0.5 - checksum: 001ecf1d8af398251cbfabaf30ed66e3855127fbceee178179524b24160b49d15442f94ed6c0db0b2e796da76bb05b73bf3cc241490ec9c2b741b41d33058581 + checksum: a3b259694754ddfb73ae0663829e396977b99ff21cbe8607f35a469655656da8e271753497e59da8a7575baa94d2e684bea3e10ddd74ba046c0c9b4418ffa0c4 languageName: node linkType: hard @@ -10514,18 +10523,18 @@ __metadata: languageName: node linkType: hard -"safe-regex-test@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-regex-test@npm:1.0.0" +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.1.3 + call-bind: ^1.0.6 + es-errors: ^1.3.0 is-regex: ^1.1.4 - checksum: bc566d8beb8b43c01b94e67de3f070fd2781685e835959bbbaaec91cc53381145ca91f69bd837ce6ec244817afa0a5e974fc4e40a2957f0aca68ac3add1ddd34 + checksum: 6c7d392ff1ae7a3ae85273450ed02d1d131f1d2c76e177d6b03eb88e6df8fa062639070e7d311802c1615f351f18dc58f9454501c58e28d5ffd9b8f502ba6489 languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 @@ -10638,7 +10647,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.5.4, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.4": +"semver@npm:7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -10658,12 +10667,21 @@ __metadata: languageName: node linkType: hard -"serialize-javascript@npm:6.0.0": - version: 6.0.0 - resolution: "serialize-javascript@npm:6.0.0" +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.4, semver@npm:^7.6.2": + version: 7.6.3 + resolution: "semver@npm:7.6.3" + bin: + semver: bin/semver.js + checksum: 4110ec5d015c9438f322257b1c51fe30276e5f766a3f64c09edd1d7ea7118ecbc3f379f3b69032bacf13116dc7abc4ad8ce0d7e2bd642e26b0d271b56b61a7d8 + languageName: node + linkType: hard + +"serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" dependencies: randombytes: ^2.1.0 - checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93 + checksum: c4839c6206c1d143c0f80763997a361310305751171dd95e4b57efee69b8f6edd8960a0b7fbfc45042aadff98b206d55428aee0dc276efe54f100899c7fa8ab7 languageName: node linkType: hard @@ -10674,26 +10692,29 @@ __metadata: languageName: node linkType: hard -"set-function-length@npm:^1.1.1": - version: 1.1.1 - resolution: "set-function-length@npm:1.1.1" +"set-function-length@npm:^1.2.1": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" dependencies: - define-data-property: ^1.1.1 - get-intrinsic: ^1.2.1 + define-data-property: ^1.1.4 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 gopd: ^1.0.1 - has-property-descriptors: ^1.0.0 - checksum: c131d7569cd7e110cafdfbfbb0557249b538477624dfac4fc18c376d879672fa52563b74029ca01f8f4583a8acb35bb1e873d573a24edb80d978a7ee607c6e06 + has-property-descriptors: ^1.0.2 + checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72 languageName: node linkType: hard -"set-function-name@npm:^2.0.0": - version: 2.0.1 - resolution: "set-function-name@npm:2.0.1" +"set-function-name@npm:^2.0.1": + version: 2.0.2 + resolution: "set-function-name@npm:2.0.2" dependencies: - define-data-property: ^1.0.1 + define-data-property: ^1.1.4 + es-errors: ^1.3.0 functions-have-names: ^1.2.3 - has-property-descriptors: ^1.0.0 - checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + has-property-descriptors: ^1.0.2 + checksum: d6229a71527fd0404399fc6227e0ff0652800362510822a291925c9d7b48a1ca1a468b11b281471c34cd5a2da0db4f5d7ff315a61d26655e77f6e971e6d0c80f languageName: node linkType: hard @@ -10762,14 +10783,15 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" +"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" dependencies: - call-bind: ^1.0.0 - get-intrinsic: ^1.0.2 - object-inspect: ^1.9.0 - checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245 + call-bind: ^1.0.7 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + object-inspect: ^1.13.1 + checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97 languageName: node linkType: hard @@ -10798,6 +10820,30 @@ __metadata: languageName: node linkType: hard +"sinon-chai@npm:^3.7.0": + version: 3.7.0 + resolution: "sinon-chai@npm:3.7.0" + peerDependencies: + chai: ^4.0.0 + sinon: ">=4.0.0" + checksum: 49a353d8eb66cc6db35ac452f6965c72778aa090d1f036dd1e54ba88594b1c3f314b1a403eaff22a4e314f94dc92d9c7d03cbb88c21d89e814293bf5b299964d + languageName: node + linkType: hard + +"sinon@npm:^18.0.0": + version: 18.0.0 + resolution: "sinon@npm:18.0.0" + dependencies: + "@sinonjs/commons": ^3.0.1 + "@sinonjs/fake-timers": ^11.2.2 + "@sinonjs/samsam": ^8.0.0 + diff: ^5.2.0 + nise: ^6.0.0 + supports-color: ^7 + checksum: 5d7bc61c6c3d89cd8ba5a03b2f782703ae9637aa592ace3da041c0ce18aa36d4752a46276d822f9e982c0c886322935099d87508850051a2668241650e77b9c3 + languageName: node + linkType: hard + "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -10834,43 +10880,41 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^8.0.1": - version: 8.0.2 - resolution: "socks-proxy-agent@npm:8.0.2" +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.4 + resolution: "socks-proxy-agent@npm:8.0.4" dependencies: - agent-base: ^7.0.2 + agent-base: ^7.1.1 debug: ^4.3.4 - socks: ^2.7.1 - checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d + socks: ^2.8.3 + checksum: b2ec5051d85fe49072f9a250c427e0e9571fd09d5db133819192d078fd291276e1f0f50f6dbc04329b207738b1071314cee8bdbb4b12e27de42dbcf1d4233c67 languageName: node linkType: hard -"socks@npm:^2.6.2, socks@npm:^2.7.1": - version: 2.7.1 - resolution: "socks@npm:2.7.1" +"socks@npm:^2.6.2, socks@npm:^2.8.3": + version: 2.8.3 + resolution: "socks@npm:2.8.3" dependencies: - ip: ^2.0.0 + ip-address: ^9.0.5 smart-buffer: ^4.2.0 - checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + checksum: 7a6b7f6eedf7482b9e4597d9a20e09505824208006ea8f2c49b71657427f3c137ca2ae662089baa73e1971c62322d535d9d0cf1c9235cf6f55e315c18203eadd languageName: node linkType: hard -"solc@npm:0.7.3": - version: 0.7.3 - resolution: "solc@npm:0.7.3" +"solc@npm:0.8.26": + version: 0.8.26 + resolution: "solc@npm:0.8.26" dependencies: command-exists: ^1.2.8 - commander: 3.0.2 + commander: ^8.1.0 follow-redirects: ^1.12.1 - fs-extra: ^0.30.0 js-sha3: 0.8.0 memorystream: ^0.3.1 - require-from-string: ^2.0.0 semver: ^5.5.0 tmp: 0.0.33 bin: - solcjs: solcjs - checksum: 2d8eb16c6d8f648213c94dc8d977cffe5099cba7d41c82d92d769ef71ae8320a985065ce3d6c306440a85f8e8d2b27fb30bdd3ac38f69e5c1fa0ab8a3fb2f217 + solcjs: solc.js + checksum: e3eaeac76e60676377b357af8f3919d4c8c6a74b74112b49279fe8c74a3dfa1de8afe4788689fc307453bde336edc8572988d2cf9e909f84d870420eb640400c languageName: node linkType: hard @@ -10905,39 +10949,38 @@ __metadata: languageName: node linkType: hard -"solidity-ast@npm:^0.4.38, solidity-ast@npm:^0.4.51": - version: 0.4.53 - resolution: "solidity-ast@npm:0.4.53" +"solidity-ast@npm:^0.4.26, solidity-ast@npm:^0.4.38, solidity-ast@npm:^0.4.51, solidity-ast@npm:^0.4.56": + version: 0.4.56 + resolution: "solidity-ast@npm:0.4.56" dependencies: array.prototype.findlast: ^1.2.2 - checksum: f23918d9c0a9e34a1955388037b90614ccf8d3ba0c821c650d546147fac1ed98d87de10c9bbde86c46bceaabb2d6985d059587c502ff3c566626cb11e507b7dc + checksum: 124cd54dc187860c83f4e8a3cbc41f890fbd0aaad4695356763034bdc782046eac414b161b7f354e423e075dba303d6bef213682df8932fee5d143d52135cd4e languageName: node linkType: hard -"solidity-comments-extractor@npm:^0.0.7": - version: 0.0.7 - resolution: "solidity-comments-extractor@npm:0.0.7" - checksum: a5cedf2310709969bc1783a6c336171478536f2f0ea96ad88437e0ef1e8844c0b37dd75591b0a824ec9c30640ea7e31b5f03128e871e6235bef3426617ce96c4 +"solidity-comments-extractor@npm:^0.0.8": + version: 0.0.8 + resolution: "solidity-comments-extractor@npm:0.0.8" + checksum: ad025fc968e2d744b4270710c2f7f55b43d8046ab3f155fd880a7768d6fd163a93ea98f62be3b1115a29ba815bd8b5736bb5ffd1feff79083eca1bf273108d07 languageName: node linkType: hard "solidity-coverage@npm:^0.8.4": - version: 0.8.5 - resolution: "solidity-coverage@npm:0.8.5" + version: 0.8.12 + resolution: "solidity-coverage@npm:0.8.12" dependencies: "@ethersproject/abi": ^5.0.9 - "@solidity-parser/parser": ^0.16.0 + "@solidity-parser/parser": ^0.18.0 chalk: ^2.4.2 death: ^1.1.0 - detect-port: ^1.3.0 difflib: ^0.2.4 fs-extra: ^8.1.0 ghost-testrpc: ^0.0.2 global-modules: ^2.0.0 globby: ^10.0.1 jsonschema: ^1.2.4 - lodash: ^4.17.15 - mocha: 10.2.0 + lodash: ^4.17.21 + mocha: ^10.2.0 node-emoji: ^1.10.0 pify: ^4.0.1 recursive-readdir: ^2.2.2 @@ -10949,7 +10992,7 @@ __metadata: hardhat: ^2.11.0 bin: solidity-coverage: plugins/bin.js - checksum: c9ca4deda9383c1db425117e72677f8908dcb2263ad41cfc1821c96afcfd5e8070146b87cd2c4b0812612fb707896928c07b776347143db838e486b4c938b394 + checksum: 8839416986fc76d27931dca885d915717fea3d7bae3cd2506f315f8b0583b50e05bd25a0d481262ad6cf2786966f603b6481b1658810e4add5761ce96cf5ffe4 languageName: node linkType: hard @@ -10965,10 +11008,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2": - version: 1.0.2 - resolution: "source-map-js@npm:1.0.2" - checksum: c049a7fc4deb9a7e9b481ae3d424cc793cb4845daa690bc5a05d428bf41bf231ced49b4cf0c9e77f9d42fdb3d20d6187619fc586605f5eabe995a316da8d377c +"source-map-js@npm:^1.2.0": + version: 1.2.0 + resolution: "source-map-js@npm:1.2.0" + checksum: 791a43306d9223792e84293b00458bf102a8946e7188f3db0e4e22d8d530b5f80a4ce468eb5ec0bf585443ad55ebbd630bf379c98db0b1f317fd902500217f97 languageName: node linkType: hard @@ -11023,9 +11066,9 @@ __metadata: linkType: hard "spdx-exceptions@npm:^2.1.0": - version: 2.3.0 - resolution: "spdx-exceptions@npm:2.3.0" - checksum: cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 languageName: node linkType: hard @@ -11040,9 +11083,16 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.16 - resolution: "spdx-license-ids@npm:3.0.16" - checksum: 5cdaa85aaa24bd02f9353a2e357b4df0a4f205cb35655f3fd0a5674a4fb77081f28ffd425379214bc3be2c2b7593ce1215df6bcc75884aeee0a9811207feabe2 + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 457825df5dd1fc0135b0bb848c896143f70945cc2da148afc71c73ed0837d1d651f809006e406d82109c9dd71a8cb39785a3604815fe46bc0548e9d3976f6b69 + languageName: node + linkType: hard + +"split-ca@npm:^1.0.0, split-ca@npm:^1.0.1": + version: 1.0.1 + resolution: "split-ca@npm:1.0.1" + checksum: 1e7409938a95ee843fe2593156a5735e6ee63772748ee448ea8477a5a3e3abde193c3325b3696e56a5aff07c7dcf6b1f6a2f2a036895b4f3afe96abb366d893f languageName: node linkType: hard @@ -11073,6 +11123,13 @@ __metadata: languageName: node linkType: hard +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: a3fdac7b49643875b70864a9d9b469d87a40dfeaf5d34d9d0c5b1cda5fd7d065531fcb43c76357d62254c57184a7b151954156563a4d6a747015cfb41021cad0 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -11080,12 +11137,29 @@ __metadata: languageName: node linkType: hard +"ssh2@npm:^1.11.0, ssh2@npm:^1.15.0": + version: 1.15.0 + resolution: "ssh2@npm:1.15.0" + dependencies: + asn1: ^0.2.6 + bcrypt-pbkdf: ^1.0.2 + cpu-features: ~0.0.9 + nan: ^2.18.0 + dependenciesMeta: + cpu-features: + optional: true + nan: + optional: true + checksum: 56baa07dc0dd8d97aefa05033b8a95d220a34b2f203aa9116173d7adc5e9fd46be22d7cfed99cdd9f5548862ae44abd1ec136e20ea856d5c470a0df0e5aea9d1 + languageName: node + linkType: hard + "ssri@npm:^10.0.0": - version: 10.0.5 - resolution: "ssri@npm:10.0.5" + version: 10.0.6 + resolution: "ssri@npm:10.0.6" dependencies: minipass: ^7.0.3 - checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + checksum: 4603d53a05bcd44188747d38f1cc43833b9951b5a1ee43ba50535bdfc5fe4a0897472dbe69837570a5417c3c073377ef4f8c1a272683b401857f72738ee57299 languageName: node linkType: hard @@ -11131,7 +11205,7 @@ __metadata: languageName: node linkType: hard -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": +"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.0.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.2, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" dependencies: @@ -11163,36 +11237,37 @@ __metadata: languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.8": - version: 1.2.8 - resolution: "string.prototype.trim@npm:1.2.8" +"string.prototype.trim@npm:^1.2.9": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.0 + es-object-atoms: ^1.0.0 + checksum: ea2df6ec1e914c9d4e2dc856fa08228e8b1be59b59e50b17578c94a66a176888f417264bb763d4aac638ad3b3dad56e7a03d9317086a178078d131aa293ba193 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimend@npm:1.0.7" +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: cc3bd2de08d8968a28787deba9a3cb3f17ca5f9f770c91e7e8fa3e7d47f079bad70fadce16f05dda9f261788be2c6e84a942f618c3bed31e42abc5c1084f8dfd languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimstart@npm:1.0.7" +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: df1007a7f580a49d692375d996521dc14fd103acda7f3034b3c558a60b82beeed3a64fa91e494e164581793a8ab0ae2f59578a49896a7af6583c1f20472bce96 languageName: node linkType: hard @@ -11205,6 +11280,13 @@ __metadata: languageName: node linkType: hard +"string_decoder@npm:~0.10.x": + version: 0.10.31 + resolution: "string_decoder@npm:0.10.31" + checksum: fe00f8e303647e5db919948ccb5ce0da7dea209ab54702894dd0c664edd98e5d4df4b80d6fabf7b9e92b237359d21136c95bf068b2f7760b772ca974ba970202 + languageName: node + linkType: hard + "string_decoder@npm:~1.1.1": version: 1.1.1 resolution: "string_decoder@npm:1.1.1" @@ -11273,7 +11355,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -11287,15 +11369,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:8.1.1": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: ^4.0.0 - checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 - languageName: node - linkType: hard - "supports-color@npm:^3.1.0": version: 3.2.3 resolution: "supports-color@npm:3.2.3" @@ -11314,7 +11387,7 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": +"supports-color@npm:^7, supports-color@npm:^7.0.0, supports-color@npm:^7.1.0": version: 7.2.0 resolution: "supports-color@npm:7.2.0" dependencies: @@ -11323,6 +11396,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + "supports-hyperlinks@npm:^2.3.0": version: 2.3.0 resolution: "supports-hyperlinks@npm:2.3.0" @@ -11373,21 +11455,73 @@ __metadata: linkType: hard "table@npm:^6.8.0, table@npm:^6.8.1": - version: 6.8.1 - resolution: "table@npm:6.8.1" + version: 6.8.2 + resolution: "table@npm:6.8.2" dependencies: ajv: ^8.0.1 lodash.truncate: ^4.4.2 slice-ansi: ^4.0.0 string-width: ^4.2.3 strip-ansi: ^6.0.1 - checksum: 08249c7046125d9d0a944a6e96cfe9ec66908d6b8a9db125531be6eb05fa0de047fd5542e9d43b4f987057f00a093b276b8d3e19af162a9c40db2681058fd306 + checksum: 61188652f53a980d1759ca460ca8dea5c5322aece3210457e7084882f053c2b6a870041295e08a82cb1d676e31b056406845d94b0abf3c79a4b104777bec413b languageName: node linkType: hard -"tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.2.0 - resolution: "tar@npm:6.2.0" +"tar-fs@npm:~1.16.3": + version: 1.16.3 + resolution: "tar-fs@npm:1.16.3" + dependencies: + chownr: ^1.0.1 + mkdirp: ^0.5.1 + pump: ^1.0.0 + tar-stream: ^1.1.2 + checksum: 0c78aa173cde0df44e5fbbd85077240b8340444bff5ec026539e9e20806ca31b5d4b8cee58befe5c1dae7fa47cd1bb3f9a0efebf2212c2bfbad31f23de329c79 + languageName: node + linkType: hard + +"tar-fs@npm:~2.0.1": + version: 2.0.1 + resolution: "tar-fs@npm:2.0.1" + dependencies: + chownr: ^1.1.1 + mkdirp-classic: ^0.5.2 + pump: ^3.0.0 + tar-stream: ^2.0.0 + checksum: 26cd297ed2421bc8038ce1a4ca442296b53739f409847d495d46086e5713d8db27f2c03ba2f461d0f5ddbc790045628188a8544f8ae32cbb6238b279b68d0247 + languageName: node + linkType: hard + +"tar-stream@npm:^1.1.2": + version: 1.6.2 + resolution: "tar-stream@npm:1.6.2" + dependencies: + bl: ^1.0.0 + buffer-alloc: ^1.2.0 + end-of-stream: ^1.0.0 + fs-constants: ^1.0.0 + readable-stream: ^2.3.0 + to-buffer: ^1.1.1 + xtend: ^4.0.0 + checksum: a5d49e232d3e33321bbd150381b6a4e5046bf12b1c2618acb95435b7871efde4d98bd1891eb2200478a7142ef7e304e033eb29bbcbc90451a2cdfa1890e05245 + languageName: node + linkType: hard + +"tar-stream@npm:^2.0.0": + version: 2.2.0 + resolution: "tar-stream@npm:2.2.0" + dependencies: + bl: ^4.0.3 + end-of-stream: ^1.4.1 + fs-constants: ^1.0.0 + inherits: ^2.0.3 + readable-stream: ^3.1.1 + checksum: 699831a8b97666ef50021c767f84924cfee21c142c2eb0e79c63254e140e6408d6d55a065a2992548e72b06de39237ef2b802b99e3ece93ca3904a37622a66f3 + languageName: node + linkType: hard + +"tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2, tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 @@ -11395,7 +11529,7 @@ __metadata: minizlib: ^2.1.1 mkdirp: ^1.0.3 yallist: ^4.0.0 - checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + checksum: f1322768c9741a25356c11373bce918483f40fa9a25c69c59410c8a1247632487edef5fe76c5f12ac51a6356d2f1829e96d2bc34098668a2fc34d76050ac2b6c languageName: node linkType: hard @@ -11494,6 +11628,13 @@ __metadata: languageName: node linkType: hard +"to-buffer@npm:^1.1.1": + version: 1.1.1 + resolution: "to-buffer@npm:1.1.1" + checksum: 6c897f58c2bdd8b8b1645ea515297732fec6dafb089bf36d12370c102ff5d64abf2be9410e0b1b7cfc707bada22d9a4084558010bfc78dd7023748dc5dd9a1ce + languageName: node + linkType: hard + "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -11524,10 +11665,10 @@ __metadata: languageName: node linkType: hard -"traverse@npm:~0.6.6": - version: 0.6.7 - resolution: "traverse@npm:0.6.7" - checksum: 21018085ab72f717991597e12e2b52446962ed59df591502e4d7e1a709bc0a989f7c3d451aa7d882666ad0634f1546d696c5edecda1f2fc228777df7bb529a1e +"traverse@npm:0.6.8": + version: 0.6.8 + resolution: "traverse@npm:0.6.8" + checksum: ef22abfc73fe2052403093b6747febbfeb52dcf827db1ca0542a78932c918706b9b12c373ef27e1c3e07e3e92eb1c646b4fe97b936fe775d59cbce7da417e13b languageName: node linkType: hard @@ -11568,9 +11709,19 @@ __metadata: languageName: node linkType: hard +"ts-morph@npm:^22.0.0": + version: 22.0.0 + resolution: "ts-morph@npm:22.0.0" + dependencies: + "@ts-morph/common": ~0.23.0 + code-block-writer: ^13.0.1 + checksum: 7bf0ec8cc9ab2a4ce528ec249634db315caa01b5783259484fd91ac0dae2f05b94d9c53ba236939fad2b8ab882e7fce1c82a689ab7c9a4a9dcec5c1160d77264 + languageName: node + linkType: hard + "ts-node@npm:^10.8.1, ts-node@npm:^10.9.1": - version: 10.9.1 - resolution: "ts-node@npm:10.9.1" + version: 10.9.2 + resolution: "ts-node@npm:10.9.2" dependencies: "@cspotcode/source-map-support": ^0.8.0 "@tsconfig/node10": ^1.0.7 @@ -11602,7 +11753,7 @@ __metadata: ts-node-script: dist/bin-script.js ts-node-transpile-only: dist/bin-transpile.js ts-script: dist/bin-script-deprecated.js - checksum: 090adff1302ab20bd3486e6b4799e90f97726ed39e02b39e566f8ab674fd5bd5f727f43615debbfc580d33c6d9d1c6b1b3ce7d8e3cca3e20530a145ffa232c35 + checksum: fde256c9073969e234526e2cfead42591b9a2aec5222bac154b0de2fa9e4ceb30efcd717ee8bc785a56f3a119bdd5aa27b333d9dbec94ed254bd26f8944c67ac languageName: node linkType: hard @@ -11613,10 +11764,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.5.0": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad +"tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.6.2": + version: 2.6.3 + resolution: "tslib@npm:2.6.3" + checksum: 74fce0e100f1ebd95b8995fbbd0e6c91bdd8f4c35c00d4da62e285a3363aaa534de40a80db30ecfd388ed7c313c42d930ee0eaf108e8114214b180eec3dbe6f5 languageName: node linkType: hard @@ -11645,6 +11796,13 @@ __metadata: languageName: node linkType: hard +"tweetnacl@npm:^0.14.3": + version: 0.14.5 + resolution: "tweetnacl@npm:0.14.5" + checksum: 6061daba1724f59473d99a7bb82e13f211cdf6e31315510ae9656fefd4779851cb927adad90f3b488c8ed77c106adc0421ea8055f6f976ff21b27c5c4e918487 + languageName: node + linkType: hard + "tweetnacl@npm:^1.0.3": version: 1.0.3 resolution: "tweetnacl@npm:1.0.3" @@ -11670,13 +11828,20 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": +"type-detect@npm:4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 languageName: node linkType: hard +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8, type-detect@npm:^4.1.0": + version: 4.1.0 + resolution: "type-detect@npm:4.1.0" + checksum: 3b32f873cd02bc7001b00a61502b7ddc4b49278aabe68d652f732e1b5d768c072de0bc734b427abf59d0520a5f19a2e07309ab921ef02018fa1cb4af155cdb37 + languageName: node + linkType: hard + "type-fest@npm:^0.16.0": version: 0.16.0 resolution: "type-fest@npm:0.16.0" @@ -11726,13 +11891,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^3.0.0": - version: 3.13.1 - resolution: "type-fest@npm:3.13.1" - checksum: c06b0901d54391dc46de3802375f5579868949d71f93b425ce564e19a428a0d411ae8d8cb0e300d330071d86152c3ea86e744c3f2860a42a79585b6ec2fdae8e - languageName: node - linkType: hard - "typechain@npm:^8.1.0": version: 8.3.2 resolution: "typechain@npm:8.3.2" @@ -11755,50 +11913,55 @@ __metadata: languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-buffer@npm:1.0.0" +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.2.1 - is-typed-array: ^1.1.10 - checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-typed-array: ^1.1.13 + checksum: 02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-length@npm:1.0.0" +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" dependencies: - call-bind: ^1.0.2 + call-bind: ^1.0.7 for-each: ^0.3.3 - has-proto: ^1.0.1 - is-typed-array: ^1.1.10 - checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: f65e5ecd1cf76b1a2d0d6f631f3ea3cdb5e08da106c6703ffe687d583e49954d570cc80434816d3746e18be889ffe53c58bf3e538081ea4077c26a41055b216d languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-offset@npm:1.0.0" +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-byte-offset@npm:1.0.2" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 for-each: ^0.3.3 - has-proto: ^1.0.1 - is-typed-array: ^1.1.10 - checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: c8645c8794a621a0adcc142e0e2c57b1823bbfa4d590ad2c76b266aa3823895cf7afb9a893bf6685e18454ab1b0241e1a8d885a2d1340948efa4b56add4b5f67 languageName: node linkType: hard -"typed-array-length@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-length@npm:1.0.4" +"typed-array-length@npm:^1.0.6": + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" dependencies: - call-bind: ^1.0.2 + call-bind: ^1.0.7 for-each: ^0.3.3 - is-typed-array: ^1.1.9 - checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + possible-typed-array-names: ^1.0.0 + checksum: f0315e5b8f0168c29d390ff410ad13e4d511c78e6006df4a104576844812ee447fcc32daab1f3a76c9ef4f64eff808e134528b5b2439de335586b392e9750e5c languageName: node linkType: hard @@ -11810,12 +11973,12 @@ __metadata: linkType: hard "typescript@npm:^4.6.4 || ^5.2.2": - version: 5.2.2 - resolution: "typescript@npm:5.2.2" + version: 5.5.4 + resolution: "typescript@npm:5.5.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 7912821dac4d962d315c36800fe387cdc0a6298dba7ec171b350b4a6e988b51d7b8f051317786db1094bd7431d526b648aba7da8236607febb26cf5b871d2d3c + checksum: b309040f3a1cd91c68a5a58af6b9fdd4e849b8c42d837b2c2e73f9a4f96a98c4f1ed398a9aab576ee0a4748f5690cf594e6b99dbe61de7839da748c41e6d6ca8 languageName: node linkType: hard @@ -11830,12 +11993,12 @@ __metadata: linkType: hard "typescript@patch:typescript@^4.6.4 || ^5.2.2#~builtin": - version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=bda367" + version: 5.5.4 + resolution: "typescript@patch:typescript@npm%3A5.5.4#~builtin::version=5.5.4&hash=bda367" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 07106822b4305de3f22835cbba949a2b35451cad50888759b6818421290ff95d522b38ef7919e70fb381c5fe9c1c643d7dea22c8b31652a717ddbd57b7f4d554 + checksum: fc52962f31a5bcb716d4213bef516885e4f01f30cea797a831205fc9ef12b405a40561c40eae3127ab85ba1548e7df49df2bcdee6b84a94bfbe3a0d7eff16b14 languageName: node linkType: hard @@ -11864,11 +12027,11 @@ __metadata: linkType: hard "uglify-js@npm:^3.1.4": - version: 3.17.4 - resolution: "uglify-js@npm:3.17.4" + version: 3.19.1 + resolution: "uglify-js@npm:3.19.1" bin: uglifyjs: bin/uglifyjs - checksum: 7b3897df38b6fc7d7d9f4dcd658599d81aa2b1fb0d074829dd4e5290f7318dbca1f4af2f45acb833b95b1fe0ed4698662ab61b87e94328eb4c0a0d3435baf924 + checksum: c71e455b0adcc75631effbcc8fa868e3e906c97b73be034ccdb1373babfa30c3378356febec6bd9abe756dad80ba156af9654b9540244ab9950b56d2543cd54b languageName: node linkType: hard @@ -11891,12 +12054,26 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.11.1": + version: 6.11.1 + resolution: "undici-types@npm:6.11.1" + checksum: d7fc11bded93bc55ef3b88464e856ab061a747cf50ef2eff5df5ba3be18b9fcafe60e1b36a8c99e28aac2eade12891d32a504f2a32422452c44662e598e3b188 + languageName: node + linkType: hard + "undici@npm:^5.14.0": - version: 5.27.2 - resolution: "undici@npm:5.27.2" + version: 5.28.4 + resolution: "undici@npm:5.28.4" dependencies: "@fastify/busboy": ^2.0.0 - checksum: 22bbdd763798700979986546d70072b67223189353d2a811efa9c6e44476161a0d1781ffe24115221f69a1b344b95d5926bd39a6eb760a2cd8804781cec0c5eb + checksum: a8193132d84540e4dc1895ecc8dbaa176e8a49d26084d6fbe48a292e28397cd19ec5d13bc13e604484e76f94f6e334b2bdc740d5f06a6e50c44072818d0c19f9 + languageName: node + linkType: hard + +"undici@npm:^6.18.2": + version: 6.19.4 + resolution: "undici@npm:6.19.4" + checksum: 15cfdc84c5cae7df5c1199dd72d51074e1f86d22ed7dbf54252606aacb826fc532503fa6bb1d365e99acd31fe67eecd955ce856c7d5a8deee590e52e3b1f2802 languageName: node linkType: hard @@ -11980,17 +12157,17 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.13": - version: 1.0.13 - resolution: "update-browserslist-db@npm:1.0.13" +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" dependencies: - escalade: ^3.1.1 - picocolors: ^1.0.0 + escalade: ^3.1.2 + picocolors: ^1.0.1 peerDependencies: browserslist: ">= 4.21.0" bin: update-browserslist-db: cli.js - checksum: 1e47d80182ab6e4ad35396ad8b61008ae2a1330221175d0abd37689658bdb61af9b705bfc41057fd16682474d79944fb2d86767c5ed5ae34b6276b9bed353322 + checksum: 7b74694d96f0c360f01b702e72353dc5a49df4fe6663d3ee4e5c628f061576cddf56af35a3a886238c01dd3d8f231b7a86a8ceaa31e7a9220ae31c1c1238e562 languageName: node linkType: hard @@ -12076,8 +12253,8 @@ __metadata: linkType: hard "web3-utils@npm:^1.3.6, web3-utils@npm:^1.7.5": - version: 1.10.3 - resolution: "web3-utils@npm:1.10.3" + version: 1.10.4 + resolution: "web3-utils@npm:1.10.4" dependencies: "@ethereumjs/util": ^8.1.0 bn.js: ^5.2.1 @@ -12087,7 +12264,7 @@ __metadata: number-to-bn: 1.7.0 randombytes: ^2.1.0 utf8: 3.0.0 - checksum: 353226710b2089a8e84f2b97cc765093e3018b850d3a6d60c92fe012829fa15a54ad15d432f1927bc185c6ef5100397a32fd4a896da5f514817c3f53583df134 + checksum: a1535817a4653f1b5cc868aa19305158122379078a41e13642e1ba64803f6f8e5dd2fb8c45c033612b8f52dde42d8008afce85296c0608276fe1513dece66a49 languageName: node linkType: hard @@ -12121,16 +12298,16 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.13": - version: 1.1.13 - resolution: "which-typed-array@npm:1.1.13" +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.4 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 for-each: ^0.3.3 gopd: ^1.0.1 - has-tostringtag: ^1.0.0 - checksum: 3828a0d5d72c800e369d447e54c7620742a4cc0c9baf1b5e8c17e9b6ff90d8d861a3a6dd4800f1953dbf80e5e5cec954a289e5b4a223e3bee4aeb1f8c5f33309 + has-tostringtag: ^1.0.2 + checksum: 65227dcbfadf5677aacc43ec84356d17b5500cb8b8753059bb4397de5cd0c2de681d24e1a7bd575633f976a95f88233abfd6549c2105ef4ebd58af8aa1807c75 languageName: node linkType: hard @@ -12176,7 +12353,16 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:~1.2.3": +"widest-line@npm:^3.1.0": + version: 3.1.0 + resolution: "widest-line@npm:3.1.0" + dependencies: + string-width: ^4.0.0 + checksum: 03db6c9d0af9329c37d74378ff1d91972b12553c7d72a6f4e8525fe61563fa7adb0b9d6e8d546b7e059688712ea874edd5ded475999abdeedf708de9849310e0 + languageName: node + linkType: hard + +"word-wrap@npm:^1.2.5, word-wrap@npm:~1.2.3": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" checksum: f93ba3586fc181f94afdaff3a6fef27920b4b6d9eaefed0f428f8e07adea2a7f54a5f2830ce59406c8416f033f86902b91eb824072354645eea687dff3691ccb @@ -12200,10 +12386,10 @@ __metadata: languageName: node linkType: hard -"workerpool@npm:6.2.1": - version: 6.2.1 - resolution: "workerpool@npm:6.2.1" - checksum: c2c6eebbc5225f10f758d599a5c016fa04798bcc44e4c1dffb34050cd361d7be2e97891aa44419e7afe647b1f767b1dc0b85a5e046c409d890163f655028b09d +"workerpool@npm:^6.5.1": + version: 6.5.1 + resolution: "workerpool@npm:6.5.1" + checksum: f86d13f9139c3a57c5a5867e81905cd84134b499849405dec2ffe5b1acd30dabaa1809f6f6ee603a7c65e1e4325f21509db6b8398eaf202c8b8f5809e26a2e16 languageName: node linkType: hard @@ -12262,8 +12448,8 @@ __metadata: linkType: hard "ws@npm:^7.4.6": - version: 7.5.9 - resolution: "ws@npm:7.5.9" + version: 7.5.10 + resolution: "ws@npm:7.5.10" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ^5.0.2 @@ -12272,11 +12458,11 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + checksum: f9bb062abf54cc8f02d94ca86dcd349c3945d63851f5d07a3a61c2fcb755b15a88e943a63cf580cbdb5b74436d67ef6b67f745b8f7c0814e411379138e1863cb languageName: node linkType: hard -"xtend@npm:~4.0.1": +"xtend@npm:^4.0.0, xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -12311,14 +12497,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:20.2.4": - version: 20.2.4 - resolution: "yargs-parser@npm:20.2.4" - checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924 - languageName: node - linkType: hard - -"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3": +"yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" checksum: 8bb69015f2b0ff9e17b2c8e6bfe224ab463dd00ca211eece72a4cd8a906224d2703fb8a326d36fdd0e68701e201b2a60ed7cf81ce0fd9b3799f9fe7745977ae3 @@ -12332,7 +12511,7 @@ __metadata: languageName: node linkType: hard -"yargs-unparser@npm:2.0.0": +"yargs-unparser@npm:^2.0.0": version: 2.0.0 resolution: "yargs-unparser@npm:2.0.0" dependencies: @@ -12344,7 +12523,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:16.2.0, yargs@npm:^16.2.0": +"yargs@npm:^16.2.0": version: 16.2.0 resolution: "yargs@npm:16.2.0" dependencies: @@ -12388,6 +12567,17 @@ __metadata: languageName: node linkType: hard +"zksync-ethers@npm:^5.0.0, zksync-ethers@npm:^5.8.0, zksync-ethers@npm:^5.9.1": + version: 5.9.1 + resolution: "zksync-ethers@npm:5.9.1" + dependencies: + ethers: ~5.7.0 + peerDependencies: + ethers: ~5.7.0 + checksum: c9e54677de296b328805c617e8e39aee8abe74c906a335f6431687301f06b30e70337b9b2136e5eece8b275f3523404e3e78956f4f8a82b47a638a08347ce459 + languageName: node + linkType: hard + "zksync-web3@npm:^0.14.3": version: 0.14.4 resolution: "zksync-web3@npm:0.14.4" From fc3f3311785de87931f1704c7d3a246dd5b194e6 Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Mon, 29 Jul 2024 14:59:37 +0000 Subject: [PATCH 55/85] feat: updating deployment files --- deployments/zksyncsepolia.json | 2173 ++++++++++++++++++++++ deployments/zksyncsepolia_addresses.json | 9 + 2 files changed, 2182 insertions(+) create mode 100644 deployments/zksyncsepolia.json create mode 100644 deployments/zksyncsepolia_addresses.json diff --git a/deployments/zksyncsepolia.json b/deployments/zksyncsepolia.json new file mode 100644 index 000000000..7c9dc9d4d --- /dev/null +++ b/deployments/zksyncsepolia.json @@ -0,0 +1,2173 @@ +{ + "name": "zksyncsepolia", + "chainId": "300", + "contracts": { + "XVSStore": { + "address": "0xf0DaEFE5f5df4170426F88757EcdF45430332d88", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnerTransferred", + "type": "event" + }, + { + "constant": false, + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "emergencyRewardWithdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokens", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "safeRewardTransfer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "setNewOwner", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "status", + "type": "bool" + } + ], + "name": "setRewardToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "XVSVaultProxy": { + "address": "0x825f9EE3b2b1C159a5444A111A70607f3918564e", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "info", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "detail", + "type": "uint256" + } + ], + "name": "Failure", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldPendingImplementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "NewPendingImplementation", + "type": "event" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "_acceptImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "_setPendingAdmin", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newPendingImplementation", + "type": "address" + } + ], + "name": "_setPendingImplementation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingXVSVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + }, + "XVSVaultProxy_Implementation": { + "address": "0x553d7bd61c4D9E1c23bcdcCA49e859a77FE6aa67", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChangedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChangedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ExecutedWithdrawal", + "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": "contract IPrime", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract IPrime", + "name": "newPrimeToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldPrimeRewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newPrimeRewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldPrimePoolId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPrimePoolId", + "type": "uint256" + } + ], + "name": "NewPrimeToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allocPoints", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardPerBlockOrSecond", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" + } + ], + "name": "PoolAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldAllocPoints", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAllocPoints", + "type": "uint256" + } + ], + "name": "PoolUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "RequestedWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldReward", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReward", + "type": "uint256" + } + ], + "name": "RewardAmountUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldXvs", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldStore", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newXvs", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newStore", + "type": "address" + } + ], + "name": "StoreUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldOwedAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newOwedAmount", + "type": "uint256" + } + ], + "name": "VaultDebtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "VaultPaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "admin", + "type": "address" + } + ], + "name": "VaultResumed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "pid", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldPeriod", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPeriod", + "type": "uint256" + } + ], + "name": "WithdrawalLockingPeriodUpdated", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "DELEGATION_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "DOMAIN_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "MAX_LOCK_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "SECONDS_PER_YEAR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract XVSVaultProxy", + "name": "xvsVaultProxy", + "type": "address" + } + ], + "name": "_become", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV5", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, + { + "internalType": "contract IBEP20", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardPerBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_lockPeriod", + "type": "uint256" + } + ], + "name": "add", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "checkpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "fromBlockOrSecond", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "votes", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "claim", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "deposit", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "executeWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getCurrentVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getEligibleWithdrawalAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "withdrawalAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumberOrSecond", + "type": "uint256" + } + ], + "name": "getPriorVotes", + "outputs": [ + { + "internalType": "uint96", + "name": "", + "type": "uint96" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getRequestedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getUserInfo", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "pendingWithdrawals", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "getWithdrawalRequests", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "lockedUntil", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "afterUpgrade", + "type": "uint128" + } + ], + "internalType": "struct XVSVaultStorageV1.WithdrawalRequest[]", + "name": "", + "type": "tuple[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "bool", + "name": "timeBased_", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "blocksPerYear_", + "type": "uint256" + } + ], + "name": "initializeTimeManager", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isStakedToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "numCheckpoints", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "pause", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "pendingRewardTransfers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_user", + "type": "address" + } + ], + "name": "pendingWithdrawalsBeforeUpgrade", + "outputs": [ + { + "internalType": "uint256", + "name": "beforeUpgradeWithdrawalAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "pendingXVSVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "poolInfos", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlockOrSecond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardPerShare", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockPeriod", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + } + ], + "name": "poolLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primePoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primeRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "primeToken", + "outputs": [ + { + "internalType": "contract IPrime", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "requestWithdrawal", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "resume", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewardTokenAmountsPerBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + } + ], + "name": "set", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "newAccessControlAddress", + "type": "address" + } + ], + "name": "setAccessControl", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "contract IPrime", + "name": "_primeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_primeRewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_primePoolId", + "type": "uint256" + } + ], + "name": "setPrimeToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_rewardAmount", + "type": "uint256" + } + ], + "name": "setRewardAmountPerBlockOrSecond", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newPeriod", + "type": "uint256" + } + ], + "name": "setWithdrawalLockingPeriod", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_xvs", + "type": "address" + }, + { + "internalType": "address", + "name": "_xvsStore", + "type": "address" + } + ], + "name": "setXvsStore", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalAllocPoints", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "totalPendingWithdrawals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "_rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pid", + "type": "uint256" + } + ], + "name": "updatePool", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "vaultPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "xvsStore", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ] + } + } +} diff --git a/deployments/zksyncsepolia_addresses.json b/deployments/zksyncsepolia_addresses.json new file mode 100644 index 000000000..37c5ed453 --- /dev/null +++ b/deployments/zksyncsepolia_addresses.json @@ -0,0 +1,9 @@ +{ + "name": "zksyncsepolia", + "chainId": "300", + "addresses": { + "XVSStore": "0xf0DaEFE5f5df4170426F88757EcdF45430332d88", + "XVSVaultProxy": "0x825f9EE3b2b1C159a5444A111A70607f3918564e", + "XVSVaultProxy_Implementation": "0x553d7bd61c4D9E1c23bcdcCA49e859a77FE6aa67" + } +} From 5ac3308fea334ea0f3d2f5bb03b72864713a06b9 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Mon, 29 Jul 2024 15:11:53 +0000 Subject: [PATCH 56/85] chore(release): 9.2.0-dev.5 [skip ci] ## [9.2.0-dev.5](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.4...v9.2.0-dev.5) (2024-07-29) ### Features * updating deployment files ([21ed31e](https://github.com/VenusProtocol/venus-protocol/commit/21ed31eae5d42a5234820c3b0aab2e2012b9c2e8)) ### Bug Fixes * remove outdated addresses ([a12ea8f](https://github.com/VenusProtocol/venus-protocol/commit/a12ea8f32627e193f302d5848bb018c7d8df59de)) --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02eae1e5d..7d79d1807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [9.2.0-dev.5](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.4...v9.2.0-dev.5) (2024-07-29) + + +### Features + +* updating deployment files ([21ed31e](https://github.com/VenusProtocol/venus-protocol/commit/21ed31eae5d42a5234820c3b0aab2e2012b9c2e8)) + + +### Bug Fixes + +* remove outdated addresses ([a12ea8f](https://github.com/VenusProtocol/venus-protocol/commit/a12ea8f32627e193f302d5848bb018c7d8df59de)) + ## [9.2.0-dev.4](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.3...v9.2.0-dev.4) (2024-07-23) diff --git a/package.json b/package.json index 882d7233f..f204bd0d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.4", + "version": "9.2.0-dev.5", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 414bd7d71eac5ce5eefd16ffcb5971c08c20f75e Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 30 Jul 2024 00:09:52 +0530 Subject: [PATCH 57/85] fix: vpb-02 --- .../TwoKinksInterestRateModel.sol | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 203907e27..cd5e3434e 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -169,13 +169,26 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { return _max(0, ((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); } else if (util < KINK_2) { int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); - int256 rate2 = (((util - KINK_1) * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; + int256 slope2Util; + unchecked { + slope2Util = util - KINK_1; + } + int256 rate2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; return _max(0, rate1 + rate2); } else { int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); - int256 rate2 = (((KINK_2 - KINK_1) * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; - int256 rate3 = (((util - KINK_2) * JUMP_MULTIPLIER_PER_BLOCK) / expScale); + int256 slope2Util; + + unchecked { + slope2Util = KINK_2 - KINK_1; + } + int256 rate2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; + int256 slope3Util; + unchecked { + slope3Util = util - KINK_2; + } + int256 rate3 = ((slope3Util * JUMP_MULTIPLIER_PER_BLOCK) / expScale); return _max(0, rate1 + rate2 + rate3); } From 191b1c4d2c29d77ca5b79072881ea9d631adf2d6 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 30 Jul 2024 00:15:46 +0530 Subject: [PATCH 58/85] fix: vpb-01 --- .../TwoKinksInterestRateModel.sol | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index cd5e3434e..1cd7f6b63 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -166,7 +166,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 expScale = int256(EXP_SCALE); if (util < KINK_1) { - return _max(0, ((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); + return _max(((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); } else if (util < KINK_2) { int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); int256 slope2Util; @@ -175,7 +175,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { } int256 rate2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; - return _max(0, rate1 + rate2); + return _max(rate1 + rate2); } else { int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); int256 slope2Util; @@ -190,17 +190,17 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { } int256 rate3 = ((slope3Util * JUMP_MULTIPLIER_PER_BLOCK) / expScale); - return _max(0, rate1 + rate2 + rate3); + return _max(rate1 + rate2 + rate3); } } /** - * @notice Returns the larger of two numbers - * @param a The first number - * @param b The second number - * @return The larger of the two numbers + * @notice Returns 0 if number is less than 0, otherwise returns the input + * @param number The first number + * @return The maximum of 0 and input number */ - function _max(int256 a, int256 b) internal pure returns (uint256) { - return uint256(a > b ? a : b); + function _max(int256 number) internal pure returns (uint256) { + int256 zero; + return uint256(number > zero ? number : zero); } } From a4061b3c612ea137697707f396388ad7551e6ff6 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:30:31 +0530 Subject: [PATCH 59/85] refactor: add external deployments & update block number --- hardhat.config.zksync.ts | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts index d5d4b6e65..349f304e2 100644 --- a/hardhat.config.zksync.ts +++ b/hardhat.config.zksync.ts @@ -23,7 +23,11 @@ extendConfig((config: HardhatConfig) => { config.external = { ...config.external, deployments: { - zksyncsepolia: [], + zksyncsepolia: [ + "node_modules/@venusprotocol/governance-contracts/deployments/zksyncsepolia", + "node_modules/@venusprotocol/oracle/deployments/zksyncsepolia", + "node_modules/@venusprotocol/token-bridge/deployments/zksyncsepolia", + ], }, }; } @@ -31,18 +35,6 @@ extendConfig((config: HardhatConfig) => { const config: HardhatUserConfig = { defaultNetwork: "hardhat", - zksolc: { - version: "1.5.1", - compilerSource: "binary", - settings: { - metadata: { - // do not include the metadata hash, since this is machine dependent - // and we want all generated code to be deterministic - // https://docs.soliditylang.org/en/v0.7.6/metadata.html - bytecodeHash: "none", - }, - }, - }, solidity: { compilers: [ { @@ -138,7 +130,7 @@ function isFork() { loggingEnabled: false, forking: { url: process.env[`ARCHIVE_NODE_${process.env.FORKED_NETWORK}`] || "https://sepolia.era.zksync.dev", - blockNumber: 21068448, // TODO: change this + blockNumber: 40392000, }, accounts: { accountsBalance: "1000000000000000000", From 4c9be09cc591e9f1eff5a596e699d380340c8073 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Tue, 30 Jul 2024 11:36:11 +0530 Subject: [PATCH 60/85] fix: vpb-01 --- .../InterestRateModels/TwoKinksInterestRateModel.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 1cd7f6b63..51e0eea12 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -166,7 +166,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 expScale = int256(EXP_SCALE); if (util < KINK_1) { - return _max(((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); + return _minCap(((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); } else if (util < KINK_2) { int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); int256 slope2Util; @@ -175,7 +175,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { } int256 rate2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; - return _max(rate1 + rate2); + return _minCap(rate1 + rate2); } else { int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); int256 slope2Util; @@ -190,7 +190,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { } int256 rate3 = ((slope3Util * JUMP_MULTIPLIER_PER_BLOCK) / expScale); - return _max(rate1 + rate2 + rate3); + return _minCap(rate1 + rate2 + rate3); } } @@ -199,7 +199,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { * @param number The first number * @return The maximum of 0 and input number */ - function _max(int256 number) internal pure returns (uint256) { + function _minCap(int256 number) internal pure returns (uint256) { int256 zero; return uint256(number > zero ? number : zero); } From 571632700882626edbf2bfea20ad5ce5ae9fbefc Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Tue, 30 Jul 2024 20:42:47 +0530 Subject: [PATCH 61/85] feat: Prime deployments on zksync sepolia --- deploy/012-deploy-prime.ts | 21 +- deploy/013-configure-prime.ts | 1 + .../zksyncsepolia/DefaultProxyAdmin.json | 257 ++ deployments/zksyncsepolia/Prime.json | 2113 +++++++++++ .../zksyncsepolia/PrimeLiquidityProvider.json | 1184 +++++++ ...PrimeLiquidityProvider_Implementation.json | 1544 +++++++++ .../PrimeLiquidityProvider_Proxy.json | 346 ++ .../zksyncsepolia/Prime_Implementation.json | 3078 +++++++++++++++++ deployments/zksyncsepolia/Prime_Proxy.json | 356 ++ .../9555bbe1dbe04211a0576a409872928f.json | 91 + .../a07e32c825b2843ec874f32e153cc512.json | 280 ++ hardhat.config.zksync.ts | 8 + package.json | 1 + yarn.lock | 10 + 14 files changed, 9288 insertions(+), 2 deletions(-) create mode 100644 deployments/zksyncsepolia/DefaultProxyAdmin.json create mode 100644 deployments/zksyncsepolia/Prime.json create mode 100644 deployments/zksyncsepolia/PrimeLiquidityProvider.json create mode 100644 deployments/zksyncsepolia/PrimeLiquidityProvider_Implementation.json create mode 100644 deployments/zksyncsepolia/PrimeLiquidityProvider_Proxy.json create mode 100644 deployments/zksyncsepolia/Prime_Implementation.json create mode 100644 deployments/zksyncsepolia/Prime_Proxy.json create mode 100644 deployments/zksyncsepolia/solcInputs/9555bbe1dbe04211a0576a409872928f.json create mode 100644 deployments/zksyncsepolia/solcInputs/a07e32c825b2843ec874f32e153cc512.json diff --git a/deploy/012-deploy-prime.ts b/deploy/012-deploy-prime.ts index f3d25e130..2cef17c49 100644 --- a/deploy/012-deploy-prime.ts +++ b/deploy/012-deploy-prime.ts @@ -25,6 +25,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { bsctestnet: TEN_MINUTES, sepolia: TEN_MINUTES, arbitrumsepolia: TEN_MINUTES, + zksyncsepolia: TEN_MINUTES, bscmainnet: NINETY_DAYS, ethereum: NINETY_DAYS, arbitrumone: NINETY_DAYS, @@ -37,6 +38,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { bscmainnet: 0, ethereum: 0, arbitrumone: 0, + zksyncsepolia: 0, hardhat: 0, }; @@ -45,6 +47,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { sepolia: 2_628_000, // 12 sec per block arbitrumsepolia: 0, // time based contracts arbitrumone: 0, // time based contracts + zksyncsepolia: 0, // time based contracts bscmainnet: 10_512_000, ethereum: 2_628_000, hardhat: 100, @@ -73,10 +76,16 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2", // ARBITRUM SEPOLIA MULTISIG arbitrumone: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0", // ARBITRUM ONE MULTISIG + zksyncsepolia: "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866", // ZKSYNC SEPOLIA MULTISIG bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"), bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"), }; + // Explicitly mentioning Default Proxy Admin contract path to fetch it from hardhat-deploy instead of OpenZeppelin + // as zksync doesnot compile OpenZeppelin contracts using zksolc. It is backward compatible for all networks as well. + const defaultProxyAdmin = await hre.artifacts.readArtifact( + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol:ProxyAdmin", + ); await deploy("PrimeLiquidityProvider", { from: deployer, log: true, @@ -84,11 +93,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { args: [isTimeBased, blocksPerYear[networkName]], proxy: { owner: network.name === "hardhat" ? deployer : adminAccount[networkName], - proxyContract: "OpenZeppelinTransparentProxy", + proxyContract: "OptimizedTransparentUpgradeableProxy", execute: { methodName: "initialize", args: [acmAddress, [], [], [], loopsLimit], }, + viaAdminContract: { + name: "DefaultProxyAdmin", + artifact: defaultProxyAdmin, + }, }, }); @@ -109,7 +122,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { ], proxy: { owner: network.name === "hardhat" ? deployer : adminAccount[networkName], - proxyContract: "OpenZeppelinTransparentProxy", + proxyContract: "OptimizedTransparentUpgradeableProxy", execute: { methodName: "initialize", args: [ @@ -125,6 +138,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { loopsLimit, ], }, + viaAdminContract: { + name: "DefaultProxyAdmin", + artifact: defaultProxyAdmin, + }, }, }); }; diff --git a/deploy/013-configure-prime.ts b/deploy/013-configure-prime.ts index 9f4af241a..1c1482c76 100644 --- a/deploy/013-configure-prime.ts +++ b/deploy/013-configure-prime.ts @@ -18,6 +18,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { opbnbmainnet: "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207", // OPBNBMAINNET MULTISIG arbitrumsepolia: "0x1426A5Ae009c4443188DA8793751024E358A61C2", // ARBITRUM SEPOLIA MULTISIG arbitrumone: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0", // ARBITRUM ONE MULTISIG + zksyncsepolia: "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866", // ZKSYNC SEPOLIA MULTISIG bscmainnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"), bsctestnet: await getContractAddressOrNullAddress(deployments, "NormalTimelock"), }; diff --git a/deployments/zksyncsepolia/DefaultProxyAdmin.json b/deployments/zksyncsepolia/DefaultProxyAdmin.json new file mode 100644 index 000000000..f7c4d6cad --- /dev/null +++ b/deployments/zksyncsepolia/DefaultProxyAdmin.json @@ -0,0 +1,257 @@ +{ + "address": "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "transactionIndex": 0, + "gasUsed": "364870", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x74b7e32f4f601804098dd0a5f03e1ce79bd9cf5ca2e0f61c66ea5c5cf67cd2c4", + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3525997, + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x0000000000000000000000000000000000000000000000000000b8a03399de00", + "logIndex": 0, + "blockHash": "0x74b7e32f4f601804098dd0a5f03e1ce79bd9cf5ca2e0f61c66ea5c5cf67cd2c4" + }, + { + "transactionIndex": 0, + "blockNumber": 3525997, + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x0000000000000000000000000000000000000000000000000000a18c2d26a240", + "logIndex": 1, + "blockHash": "0x74b7e32f4f601804098dd0a5f03e1ce79bd9cf5ca2e0f61c66ea5c5cf67cd2c4" + }, + { + "transactionIndex": 0, + "blockNumber": 3525997, + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "address": "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000a2f83de95e9f28ed443132c331b6a9c9b7a9f866" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x74b7e32f4f601804098dd0a5f03e1ce79bd9cf5ca2e0f61c66ea5c5cf67cd2c4" + }, + { + "transactionIndex": 0, + "blockNumber": 3525997, + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010000e91bc36b81ae7fcebca55cd011bb3ba3cc6a751c63e18d521694e18654", + "0x00000000000000000000000018e44f588a4dcf2f7145d35a5c226e129040b6d3" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x74b7e32f4f601804098dd0a5f03e1ce79bd9cf5ca2e0f61c66ea5c5cf67cd2c4" + }, + { + "transactionIndex": 0, + "blockNumber": 3525997, + "transactionHash": "0x3b17607caf583ccf46839a9aecd2fbda0a2c478dc1d29425cbb009fc40842678", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000000ec833c81a40", + "logIndex": 4, + "blockHash": "0x74b7e32f4f601804098dd0a5f03e1ce79bd9cf5ca2e0f61c66ea5c5cf67cd2c4" + } + ], + "blockNumber": 3525997, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": ["0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866"], + "numDeployments": 1, + "bytecode": "0x00010000000000020002000000000002000000000301034f00000000010300190000006001100270000000bd0410019700000001002001900000002f0000c13d000000800a0000390000004000a0043f000000040040008c000002450000413d000000000143034f000000000203043b000000e002200270000000c40020009c0000006a0000213d000000ca0020009c000000af0000213d000000cd0020009c000000d00000613d000000ce0020009c000002450000c13d0000000001000416000000000001004b000002450000c13d000000000100041a000000bf051001970000000002000411000000000025004b000001c90000c13d000000c001100197000000000010041b0000000001000414000000bd0010009c000000bd01008041000000c001100210000000c1011001c70000800d020000390000000303000039000000c204000041000000000600001902ef02e50000040f0000000100200190000002450000613d0000000001000019000002f00001042e0000000001000416000000000001004b000002450000c13d0000001f01400039000000be011001970000008001100039000000400010043f0000001f0140018f0000000502400272000000410000613d000000800500003900000005062002100000008006600039000000000703034f000000007807043c0000000005850436000000000065004b0000003d0000c13d000000000001004b000000500000613d0000000502200210000000000323034f00000003011002100000008002200039000000000502043300000000051501cf000000000515022f000000000303043b0000010001100089000000000313022f00000000011301cf000000000151019f0000000000120435000000200040008c000002450000413d000000800600043d000000bf0060009c000002450000213d000000000100041a000000c002100197000000000262019f000000000020041b0000000002000414000000bf05100197000000bd0020009c000000bd02008041000000c001200210000000c1011001c70000800d020000390000000303000039000000c20400004102ef02e50000040f0000000100200190000002450000613d000000200100003900000100001004430000012000000443000000c301000041000002f00001042e000000c50020009c000000bb0000213d000000c80020009c000000e10000613d000000c90020009c000002450000c13d000000440040008c000002450000413d0000000001000416000000000001004b000002450000c13d0000000401300370000000000401043b000000bf0040009c000002450000213d0000002401300370000000000301043b000000bf0030009c000002450000213d000000000100041a000000bf011001970000000002000411000000000021004b000001c90000c13d000100000003001d000000d7010000410000000000100439000200000004001d00000004004004430000000001000414000000bd0010009c000000bd01008041000000c001100210000000d8011001c7000080020200003902ef02ea0000040f0000000100200190000002360000613d000000000101043b000000000001004b00000002020000290000000103000029000002450000613d000000400400043d000000d9010000410000000000140435000000040140003900000000003104350000000001000414000000040020008c000000ae0000613d000000bd0040009c000000bd0300004100000000030440190000004003300210000000bd0010009c000000bd01008041000000c001100210000000000131019f000000da011001c7000200000004001d02ef02e50000040f000000020400002900000000030100190000006003300270000000bd0030019d0000000100200190000002710000613d000001a80000013d000000cb0020009c0000016a0000613d000000cc0020009c000002450000c13d0000000001000416000000000001004b000002450000c13d000000000100041a000000bf01100197000000800010043f000000e101000041000002f00001042e000000c60020009c000001ad0000613d000000c70020009c000002450000c13d000000240040008c000002450000413d0000000002000416000000000002004b000002450000c13d0000000402300370000000000202043b000000bf0020009c000002450000213d000000cf03000041000000800030043f0000000003000414000000040020008c000001d20000c13d00000000040000310000000002000019000001dd0000013d000000240040008c000002450000413d0000000002000416000000000002004b000002450000c13d0000000402300370000000000202043b000000bf0020009c000002450000213d000000e403000041000000800030043f0000000003000414000000040020008c000001e60000c13d00000000050000310000000002000019000001f00000013d000000640040008c000002450000413d0000000401300370000000000901043b000000bf0090009c000002450000213d0000002401300370000000000801043b000000bf0080009c000002450000213d0000004401300370000000000201043b000000d10020009c000002450000213d0000002301200039000000000041004b000002450000813d0000000405200039000000000153034f000000000101043b000000d10010009c000002300000213d0000001f06100039000000e7066001970000003f06600039000000e706600197000000db0060009c000002300000213d0000008006600039000000400060043f000000800010043f00000000021200190000002402200039000000000042004b000002450000213d000200000008001d0000002002500039000000000223034f0000001f0310018f0000000504100272000001120000613d000000a0050000390000000506400210000000a006600039000000000702034f000000007807043c0000000005850436000000000065004b0000010e0000c13d000000000003004b000001210000613d0000000504400210000000000242034f0000000303300210000000a004400039000000000504043300000000053501cf000000000535022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000252019f0000000000240435000000a0011000390000000000010435000000000100041a000000bf011001970000000002000411000000000021004b000002810000c13d000000d7010000410000000000100439000100000009001d00000004009004430000000001000414000000bd0010009c000000bd01008041000000c001100210000000d8011001c7000080020200003902ef02ea0000040f0000000100200190000002360000613d000000000101043b000000000001004b0000000203000029000002450000613d000000400400043d000000240140003900000040020000390000000000210435000000de010000410000000000140435000000040140003900000000003104350000004402400039000000800100043d0000000000120435000200000004001d0000006402400039000000000001004b000001500000613d00000000030000190000000004230019000000a005300039000000000505043300000000005404350000002003300039000000000013004b000001490000413d0000000002210019000000000002043500000000040004140000000102000029000000040020008c000002c20000613d0000001f01100039000000e70110019700000000030004160000006402100039000000bd0040009c000000bd04008041000000c0014002100000000204000029000000bd0040009c000000bd040080410000004004400210000000000003004b000002b30000c13d000000bd0020009c000000bd020080410000006002200210000000000242019f000000000121019f0000000102000029000002bc0000013d000000440040008c000002450000413d0000000001000416000000000001004b000002450000c13d0000000401300370000000000401043b000000bf0040009c000002450000213d0000002401300370000000000301043b000000bf0030009c000002450000213d000000000100041a000000bf011001970000000002000411000000000021004b000001c90000c13d000100000003001d000000d7010000410000000000100439000200000004001d00000004004004430000000001000414000000bd0010009c000000bd01008041000000c001100210000000d8011001c7000080020200003902ef02ea0000040f0000000100200190000002360000613d000000000101043b000000000001004b00000002020000290000000103000029000002450000613d000000400400043d000000e2010000410000000000140435000000040140003900000000003104350000000001000414000000040020008c000001a80000613d000000bd0040009c000000bd0300004100000000030440190000004003300210000000bd0010009c000000bd01008041000000c001100210000000000131019f000000da011001c7000200000004001d02ef02e50000040f000000020400002900000000030100190000006003300270000000bd0030019d0000000100200190000002910000613d000000d10040009c000002300000213d000000400040043f0000000001000019000002f00001042e000000240040008c000002450000413d0000000001000416000000000001004b000002450000c13d0000000401300370000000000601043b000000bf0060009c000002450000213d000000000100041a000000bf051001970000000002000411000000000025004b000001c90000c13d000000000006004b000002370000c13d000000d301000041000000800010043f0000002001000039000000840010043f0000002601000039000000a40010043f000000d401000041000000c40010043f000000d501000041000000e40010043f000000d601000041000002f100010430000000d301000041000000800010043f0000002001000039000000840010043f000000a40010043f000000dc01000041000000c40010043f000000e301000041000002f100010430000000bd0030009c000000bd03008041000000c001300210000000d0011001c702ef02ea0000040f000000800a000039000000010220015f00000000030100190000006003300270000000bd0030019d000000bd04300197000000000004004b000002020000c13d00000060030000390000000100200190000002450000c13d00000000010304330000000002a1001900000000010a0019000001f90000013d000000bd0030009c000000bd03008041000000c001300210000000d0011001c702ef02ea0000040f000000010220015f00000000030100190000006003300270000000bd0030019d000000bd05300197000000000005004b0000022e0000c13d000000600400003900000080030000390000000100200190000002450000c13d00000000010404330000000002310019000000000103001902ef02d90000040f000000bf01100197000000400200043d0000000000120435000000bd0020009c000000bd020080410000004001200210000000d2011001c7000002f00001042e000000d10040009c000002300000213d0000001f03400039000000e7033001970000003f03300039000000e705300197000000400300043d0000000005530019000000000035004b00000000060000190000000106004039000000d10050009c000002300000213d0000000100600190000002300000c13d000000400050043f0000001f0540018f000000000a43043600000005044002720000021e0000613d000000050640021000000000066a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000068004b0000021a0000c13d000000000005004b000001e00000613d0000000504400210000000000141034f00000000044a00190000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000001e00000013d000000e50050009c000002470000413d000000e60100004100000000001004350000004101000039000000040010043f000000da01000041000002f100010430000000000001042f000000c001100197000000000161019f000000000010041b0000000001000414000000bd0010009c000000bd01008041000000c001100210000000c1011001c70000800d020000390000000303000039000000c20400004102ef02e50000040f00000001002001900000002d0000c13d0000000001000019000002f1000104300000001f03500039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000043004b00000000060000190000000106004039000000d10030009c000002300000213d0000000100600190000002300000c13d000000400030043f0000001f0650018f00000000035404360000000505500272000002610000613d00000005075002100000000007730019000000000801034f0000000009030019000000008a08043c0000000009a90436000000000079004b0000025d0000c13d000000000006004b000001f40000613d0000000505500210000000000151034f00000000055300190000000306600210000000000705043300000000076701cf000000000767022f000000000101043b0000010006600089000000000161022f00000000016101cf000000000171019f0000000000150435000001f40000013d000000bd03300197000000400200043d0000001f0430018f00000005053002720000027e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000068004b0000027a0000c13d000000000004004b000002ad0000613d000002a00000013d000000400100043d0000004402100039000000dc030000410000000000320435000000d302000041000000000021043500000024021000390000002003000039000000000032043500000004021000390000000000320435000000bd0010009c000000bd010080410000004001100210000000dd011001c7000002f100010430000000bd03300197000000400200043d0000001f0430018f00000005053002720000029e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000068004b0000029a0000c13d000000000004004b000002ad0000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000bd0020009c000000bd020080410000004002200210000000000112019f000002f1000104300000006005200210000000df0020009c000000e005008041000000c1024001c70000000002520019000000000112001900008009020000390000000104000029000000000500001902ef02e50000040f00000000030100190000006003300270000000bd0030019d0000000100200190000002c90000613d0000000201000029000000d10010009c000002300000213d0000000201000029000000400010043f0000000001000019000002f00001042e000000bd03300197000000400200043d0000001f0430018f00000005053002720000000505500210000002d60000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000068004b000002d20000c13d000000000004004b000002ad0000613d000002a10000013d0000000002120049000000e80020009c000002e20000213d0000001f0020008c000002e20000a13d0000000001010433000000bf0010009c000002e20000213d000000000001042d0000000001000019000002f100010430000000000001042f000002e8002104210000000102000039000000000001042d0000000002000019000000000001042d000002ed002104230000000102000039000000000001042d0000000002000019000000000001042d000002ef00000432000002f00001042e000002f1000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000009623609c00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000f3b7dead000000000000000000000000000000000000000000000000000000009623609d0000000000000000000000000000000000000000000000000000000099a88ec4000000000000000000000000000000000000000000000000000000007eff275d000000000000000000000000000000000000000000000000000000007eff275e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000204e1c7a00000000000000000000000000000000000000000000000000000000715018a6f851a440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000002000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000640000000000000000000000004f1ef28600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000000000000200000008000000000000000008f2839700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000008000000000000000005c60da1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000004e487b7100000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", + "deployedBytecode": "0x00010000000000020002000000000002000000000301034f00000000010300190000006001100270000000bd0410019700000001002001900000002f0000c13d000000800a0000390000004000a0043f000000040040008c000002450000413d000000000143034f000000000203043b000000e002200270000000c40020009c0000006a0000213d000000ca0020009c000000af0000213d000000cd0020009c000000d00000613d000000ce0020009c000002450000c13d0000000001000416000000000001004b000002450000c13d000000000100041a000000bf051001970000000002000411000000000025004b000001c90000c13d000000c001100197000000000010041b0000000001000414000000bd0010009c000000bd01008041000000c001100210000000c1011001c70000800d020000390000000303000039000000c204000041000000000600001902ef02e50000040f0000000100200190000002450000613d0000000001000019000002f00001042e0000000001000416000000000001004b000002450000c13d0000001f01400039000000be011001970000008001100039000000400010043f0000001f0140018f0000000502400272000000410000613d000000800500003900000005062002100000008006600039000000000703034f000000007807043c0000000005850436000000000065004b0000003d0000c13d000000000001004b000000500000613d0000000502200210000000000323034f00000003011002100000008002200039000000000502043300000000051501cf000000000515022f000000000303043b0000010001100089000000000313022f00000000011301cf000000000151019f0000000000120435000000200040008c000002450000413d000000800600043d000000bf0060009c000002450000213d000000000100041a000000c002100197000000000262019f000000000020041b0000000002000414000000bf05100197000000bd0020009c000000bd02008041000000c001200210000000c1011001c70000800d020000390000000303000039000000c20400004102ef02e50000040f0000000100200190000002450000613d000000200100003900000100001004430000012000000443000000c301000041000002f00001042e000000c50020009c000000bb0000213d000000c80020009c000000e10000613d000000c90020009c000002450000c13d000000440040008c000002450000413d0000000001000416000000000001004b000002450000c13d0000000401300370000000000401043b000000bf0040009c000002450000213d0000002401300370000000000301043b000000bf0030009c000002450000213d000000000100041a000000bf011001970000000002000411000000000021004b000001c90000c13d000100000003001d000000d7010000410000000000100439000200000004001d00000004004004430000000001000414000000bd0010009c000000bd01008041000000c001100210000000d8011001c7000080020200003902ef02ea0000040f0000000100200190000002360000613d000000000101043b000000000001004b00000002020000290000000103000029000002450000613d000000400400043d000000d9010000410000000000140435000000040140003900000000003104350000000001000414000000040020008c000000ae0000613d000000bd0040009c000000bd0300004100000000030440190000004003300210000000bd0010009c000000bd01008041000000c001100210000000000131019f000000da011001c7000200000004001d02ef02e50000040f000000020400002900000000030100190000006003300270000000bd0030019d0000000100200190000002710000613d000001a80000013d000000cb0020009c0000016a0000613d000000cc0020009c000002450000c13d0000000001000416000000000001004b000002450000c13d000000000100041a000000bf01100197000000800010043f000000e101000041000002f00001042e000000c60020009c000001ad0000613d000000c70020009c000002450000c13d000000240040008c000002450000413d0000000002000416000000000002004b000002450000c13d0000000402300370000000000202043b000000bf0020009c000002450000213d000000cf03000041000000800030043f0000000003000414000000040020008c000001d20000c13d00000000040000310000000002000019000001dd0000013d000000240040008c000002450000413d0000000002000416000000000002004b000002450000c13d0000000402300370000000000202043b000000bf0020009c000002450000213d000000e403000041000000800030043f0000000003000414000000040020008c000001e60000c13d00000000050000310000000002000019000001f00000013d000000640040008c000002450000413d0000000401300370000000000901043b000000bf0090009c000002450000213d0000002401300370000000000801043b000000bf0080009c000002450000213d0000004401300370000000000201043b000000d10020009c000002450000213d0000002301200039000000000041004b000002450000813d0000000405200039000000000153034f000000000101043b000000d10010009c000002300000213d0000001f06100039000000e7066001970000003f06600039000000e706600197000000db0060009c000002300000213d0000008006600039000000400060043f000000800010043f00000000021200190000002402200039000000000042004b000002450000213d000200000008001d0000002002500039000000000223034f0000001f0310018f0000000504100272000001120000613d000000a0050000390000000506400210000000a006600039000000000702034f000000007807043c0000000005850436000000000065004b0000010e0000c13d000000000003004b000001210000613d0000000504400210000000000242034f0000000303300210000000a004400039000000000504043300000000053501cf000000000535022f000000000202043b0000010003300089000000000232022f00000000023201cf000000000252019f0000000000240435000000a0011000390000000000010435000000000100041a000000bf011001970000000002000411000000000021004b000002810000c13d000000d7010000410000000000100439000100000009001d00000004009004430000000001000414000000bd0010009c000000bd01008041000000c001100210000000d8011001c7000080020200003902ef02ea0000040f0000000100200190000002360000613d000000000101043b000000000001004b0000000203000029000002450000613d000000400400043d000000240140003900000040020000390000000000210435000000de010000410000000000140435000000040140003900000000003104350000004402400039000000800100043d0000000000120435000200000004001d0000006402400039000000000001004b000001500000613d00000000030000190000000004230019000000a005300039000000000505043300000000005404350000002003300039000000000013004b000001490000413d0000000002210019000000000002043500000000040004140000000102000029000000040020008c000002c20000613d0000001f01100039000000e70110019700000000030004160000006402100039000000bd0040009c000000bd04008041000000c0014002100000000204000029000000bd0040009c000000bd040080410000004004400210000000000003004b000002b30000c13d000000bd0020009c000000bd020080410000006002200210000000000242019f000000000121019f0000000102000029000002bc0000013d000000440040008c000002450000413d0000000001000416000000000001004b000002450000c13d0000000401300370000000000401043b000000bf0040009c000002450000213d0000002401300370000000000301043b000000bf0030009c000002450000213d000000000100041a000000bf011001970000000002000411000000000021004b000001c90000c13d000100000003001d000000d7010000410000000000100439000200000004001d00000004004004430000000001000414000000bd0010009c000000bd01008041000000c001100210000000d8011001c7000080020200003902ef02ea0000040f0000000100200190000002360000613d000000000101043b000000000001004b00000002020000290000000103000029000002450000613d000000400400043d000000e2010000410000000000140435000000040140003900000000003104350000000001000414000000040020008c000001a80000613d000000bd0040009c000000bd0300004100000000030440190000004003300210000000bd0010009c000000bd01008041000000c001100210000000000131019f000000da011001c7000200000004001d02ef02e50000040f000000020400002900000000030100190000006003300270000000bd0030019d0000000100200190000002910000613d000000d10040009c000002300000213d000000400040043f0000000001000019000002f00001042e000000240040008c000002450000413d0000000001000416000000000001004b000002450000c13d0000000401300370000000000601043b000000bf0060009c000002450000213d000000000100041a000000bf051001970000000002000411000000000025004b000001c90000c13d000000000006004b000002370000c13d000000d301000041000000800010043f0000002001000039000000840010043f0000002601000039000000a40010043f000000d401000041000000c40010043f000000d501000041000000e40010043f000000d601000041000002f100010430000000d301000041000000800010043f0000002001000039000000840010043f000000a40010043f000000dc01000041000000c40010043f000000e301000041000002f100010430000000bd0030009c000000bd03008041000000c001300210000000d0011001c702ef02ea0000040f000000800a000039000000010220015f00000000030100190000006003300270000000bd0030019d000000bd04300197000000000004004b000002020000c13d00000060030000390000000100200190000002450000c13d00000000010304330000000002a1001900000000010a0019000001f90000013d000000bd0030009c000000bd03008041000000c001300210000000d0011001c702ef02ea0000040f000000010220015f00000000030100190000006003300270000000bd0030019d000000bd05300197000000000005004b0000022e0000c13d000000600400003900000080030000390000000100200190000002450000c13d00000000010404330000000002310019000000000103001902ef02d90000040f000000bf01100197000000400200043d0000000000120435000000bd0020009c000000bd020080410000004001200210000000d2011001c7000002f00001042e000000d10040009c000002300000213d0000001f03400039000000e7033001970000003f03300039000000e705300197000000400300043d0000000005530019000000000035004b00000000060000190000000106004039000000d10050009c000002300000213d0000000100600190000002300000c13d000000400050043f0000001f0540018f000000000a43043600000005044002720000021e0000613d000000050640021000000000066a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000068004b0000021a0000c13d000000000005004b000001e00000613d0000000504400210000000000141034f00000000044a00190000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f0000000000140435000001e00000013d000000e50050009c000002470000413d000000e60100004100000000001004350000004101000039000000040010043f000000da01000041000002f100010430000000000001042f000000c001100197000000000161019f000000000010041b0000000001000414000000bd0010009c000000bd01008041000000c001100210000000c1011001c70000800d020000390000000303000039000000c20400004102ef02e50000040f00000001002001900000002d0000c13d0000000001000019000002f1000104300000001f03500039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000043004b00000000060000190000000106004039000000d10030009c000002300000213d0000000100600190000002300000c13d000000400030043f0000001f0650018f00000000035404360000000505500272000002610000613d00000005075002100000000007730019000000000801034f0000000009030019000000008a08043c0000000009a90436000000000079004b0000025d0000c13d000000000006004b000001f40000613d0000000505500210000000000151034f00000000055300190000000306600210000000000705043300000000076701cf000000000767022f000000000101043b0000010006600089000000000161022f00000000016101cf000000000171019f0000000000150435000001f40000013d000000bd03300197000000400200043d0000001f0430018f00000005053002720000027e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000068004b0000027a0000c13d000000000004004b000002ad0000613d000002a00000013d000000400100043d0000004402100039000000dc030000410000000000320435000000d302000041000000000021043500000024021000390000002003000039000000000032043500000004021000390000000000320435000000bd0010009c000000bd010080410000004001100210000000dd011001c7000002f100010430000000bd03300197000000400200043d0000001f0430018f00000005053002720000029e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000068004b0000029a0000c13d000000000004004b000002ad0000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000bd0020009c000000bd020080410000004002200210000000000112019f000002f1000104300000006005200210000000df0020009c000000e005008041000000c1024001c70000000002520019000000000112001900008009020000390000000104000029000000000500001902ef02e50000040f00000000030100190000006003300270000000bd0030019d0000000100200190000002c90000613d0000000201000029000000d10010009c000002300000213d0000000201000029000000400010043f0000000001000019000002f00001042e000000bd03300197000000400200043d0000001f0430018f00000005053002720000000505500210000002d60000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000068004b000002d20000c13d000000000004004b000002ad0000613d000002a10000013d0000000002120049000000e80020009c000002e20000213d0000001f0020008c000002e20000a13d0000000001010433000000bf0010009c000002e20000213d000000000001042d0000000001000019000002f100010430000000000001042f000002e8002104210000000102000039000000000001042d0000000002000019000000000001042d000002ed002104230000000102000039000000000001042d0000000002000019000000000001042d000002ef00000432000002f00001042e000002f1000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000009623609c00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000f3b7dead000000000000000000000000000000000000000000000000000000009623609d0000000000000000000000000000000000000000000000000000000099a88ec4000000000000000000000000000000000000000000000000000000007eff275d000000000000000000000000000000000000000000000000000000007eff275e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000204e1c7a00000000000000000000000000000000000000000000000000000000715018a6f851a440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff000000000000000000000000000000000000002000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000640000000000000000000000004f1ef28600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000000000000200000008000000000000000008f2839700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000008000000000000000005c60da1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000004e487b7100000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" +} diff --git a/deployments/zksyncsepolia/Prime.json b/deployments/zksyncsepolia/Prime.json new file mode 100644 index 000000000..3079f00f2 --- /dev/null +++ b/deployments/zksyncsepolia/Prime.json @@ -0,0 +1,2113 @@ +{ + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AssetAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "ExpTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "IneligibleToClaim", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAlphaArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidComptroller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFixedPoint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "name": "InvalidFraction", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimestamp", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnNonRealResult", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "MarketAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "MarketNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoScoreUpdatesRequired", + "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": [], + "name": "UserHasNoPrimeToken", + "type": "error" + }, + { + "inputs": [], + "name": "WaitMoreTime", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldNumerator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "oldDenominator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newNumerator", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "newDenominator", + "type": "uint128" + } + ], + "name": "AlphaUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InterestClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "MarketAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldRevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRevocableLimit", + "type": "uint256" + } + ], + "name": "MintLimitsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldBorrowMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowMultiplier", + "type": "uint256" + } + ], + "name": "MultiplierUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "StakedAtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "TokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "UserScoreUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "MAXIMUM_XVS_CAP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_STAKED_XVS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NATIVE_MARKET", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STAKING_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WRAPPED_NATIVE_TOKEN", + "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": "vToken", + "type": "address" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "accrueInterestAndUpdateScore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "addMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "alphaDenominator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "alphaNumerator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "calculateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimTimeRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsStaked", + "type": "uint256" + } + ], + "name": "estimateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllMarkets", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getInterestAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getPendingRewards", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PrimeStorageV1.PendingReward[]", + "name": "pendingRewards", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "incomeDistributionYearly", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "xvsVault_", + "type": "address" + }, + { + "internalType": "address", + "name": "xvsVaultRewardToken_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "xvsVaultPoolId_", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "alphaNumerator_", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "alphaDenominator_", + "type": "uint128" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "primeLiquidityProvider_", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "poolRegistry_", + "type": "address" + } + ], + "name": "initializeV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "interests", + "outputs": [ + { + "internalType": "uint256", + "name": "accrued", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "score", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "irrevocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isScoreUpdated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "isUserPrimeHolder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + }, + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumOfMembersScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextScoreUpdateRoundId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingScoreUpdates", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primeLiquidityProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_irrevocableLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_revocableLimit", + "type": "uint256" + } + ], + "name": "setLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "timestamps", + "type": "uint256[]" + } + ], + "name": "setStakedAt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakedAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "togglePause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalIrrevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalRevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalScoreUpdatesRequired", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "unreleasedPLPIncome", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_alphaNumerator", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_alphaDenominator", + "type": "uint128" + } + ], + "name": "updateAlpha", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "updateMultipliers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "updateScores", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vTokenForAsset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "xvsUpdated", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultPoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "transactionIndex": 0, + "gasUsed": "33803737", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca", + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x000000000000000000000000000000000000000000000000000451d8792c3a2b", + "logIndex": 0, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000006992cfa0e5eb", + "logIndex": 1, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000042639e7691189f8b87ee0e1d209af763855156c4" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd01", + "logIndex": 4, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0xc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014", + "logIndex": 5, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258"], + "data": "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "logIndex": 6, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 7, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018e44f588a4dcf2f7145d35a5c226e129040b6d3", + "logIndex": 8, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010001afcc567b844d80e587a198ec7038e2f06ff403702a919819e3ef63c3a8", + "0x00000000000000000000000072b85930f7f8d00ace5ead10a315c17b8954fbcf" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x0000000000000000000000000000000000000000000000000000e7aa04252600", + "logIndex": 10, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + } + ], + "blockNumber": 3549333, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "0xb1a250f2000000000000000000000000825f9ee3b2b1c159a5444a111a70607f3918564e0000000000000000000000003aecac43a2ebe5d8184e650403bf9f656f9d1cfa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd010000000000000000000000003407c349f80e4e9544c73ca1e9334ceea72665170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000748853b3be26c46b4562fd314dfb82708f395bdf0000000000000000000000000000000000000000000000000000000000000014" + ], + "numDeployments": 1, + "solcInputHash": "9555bbe1dbe04211a0576a409872928f", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bec47f69510a4ace724a15533969ce9479ea9dfef773b1da341c64e8f507cb9b\",\"dweb:/ipfs/QmSu6KnnhhcRAEtdqYncLKw6JEByiptoZR7paqQv2x5CVu\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4f5abfc32db1d44fd3d38d902879eaeaad827781bb9f954d3ccb8639c55db3c0\",\"dweb:/ipfs/QmVSkxFgWphaUx6w9XdvgwJJuxABdpuVQEbABbRmzd3XFc\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9cbd3212cc9e1dbc383b66ef6b750d58c07c4d73d404c6ec55e4bfed25a8fb6f\",\"dweb:/ipfs/QmPN8XajdLkydiQv2146q1M7nGqYk67Z5SNSjbzFU9MiM5\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://60941294a981f6e3ee77c19e503b64c4114b4e7f3261cf489d6898fdd4916522\",\"dweb:/ipfs/QmQVmckpCRrtkCwyPG7ksVo59yjZdtpNerJDzw3hQVB62A\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0bc227c71372eb216b7965a91a09c843e9e9670369af0410d924cf4208a8dabe\",\"dweb:/ipfs/QmTR55ug3diUCsVedV8C6ShstCcbqSNPVEvmCpqc91pEDf\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dbaba7fe0fe556cc5ed291e03d271fd27d395250141ecfb57a4b30d528958ff9\",\"dweb:/ipfs/QmWT653X2DyZo8nqEcmFe3yTkrCJv3ptbZLhbgLU3y6abe\"]},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c270574add213952363bf451bd512acab5fc48c5a06fc05ad75e99eb4b044b99\",\"dweb:/ipfs/QmNQyg2ZvM59Q6FFg1ukJah2xpg8kvDZnTLRVLtMGKuHL1\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "deployedBytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "execute": { + "methodName": "initialize", + "args": [ + "0x825f9EE3b2b1C159a5444A111A70607f3918564e", + "0x3AeCac43A2ebe5D8184e650403bf9F656F9D1cfA", + 0, + 1, + 2, + "0xD07f543d47c3a8997D6079958308e981AC14CD01", + "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "0x0000000000000000000000000000000000000000", + "0x748853B3bE26c46b4562Fd314dfb82708F395bDf", + 20 + ] + }, + "implementation": "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/zksyncsepolia/PrimeLiquidityProvider.json b/deployments/zksyncsepolia/PrimeLiquidityProvider.json new file mode 100644 index 000000000..04efc1bf2 --- /dev/null +++ b/deployments/zksyncsepolia/PrimeLiquidityProvider.json @@ -0,0 +1,1184 @@ +{ + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "FundsTransferIsPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "speed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSpeed", + "type": "uint256" + } + ], + "name": "InvalidDistributionSpeed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenAlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "TokenNotInitialized", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "MaxTokenDistributionSpeedUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPrimeToken", + "type": "address" + } + ], + "name": "PrimeTokenUpdated", + "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": "sweepAmount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenDistributionInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "TokenDistributionSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferredToPrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensAccrued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "token_", + "type": "address" + } + ], + "name": "accrueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "getEffectiveDistributionSpeed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + } + ], + "name": "initializeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "lastAccruedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAccruedBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxTokenDistributionSpeeds", + "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": "pauseFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "releaseFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resumeFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setMaxTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "prime_", + "type": "address" + } + ], + "name": "setPrimeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "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": "token_", + "type": "address" + } + ], + "name": "tokenAmountAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenDistributionSpeeds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "transactionIndex": 0, + "gasUsed": "19434767", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536", + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x000000000000000000000000000000000000000000000000000291a90686384c", + "logIndex": 0, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000003ec92f07af4c", + "logIndex": 1, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c2897703257c8cb174ed1ec87fa96d1847b4cd5c" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd01", + "logIndex": 4, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0xc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014", + "logIndex": 5, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 6, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018e44f588a4dcf2f7145d35a5c226e129040b6d3", + "logIndex": 7, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010001afcc567b844d80e587a198ec7038e2f06ff403702a919819e3ef63c3a8", + "0x0000000000000000000000003407c349f80e4e9544c73ca1e9334ceea7266517" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000000098fa9be93d40", + "logIndex": 9, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + } + ], + "blockNumber": 3549326, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "0xe458a65d000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd0100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "9555bbe1dbe04211a0576a409872928f", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bec47f69510a4ace724a15533969ce9479ea9dfef773b1da341c64e8f507cb9b\",\"dweb:/ipfs/QmSu6KnnhhcRAEtdqYncLKw6JEByiptoZR7paqQv2x5CVu\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4f5abfc32db1d44fd3d38d902879eaeaad827781bb9f954d3ccb8639c55db3c0\",\"dweb:/ipfs/QmVSkxFgWphaUx6w9XdvgwJJuxABdpuVQEbABbRmzd3XFc\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9cbd3212cc9e1dbc383b66ef6b750d58c07c4d73d404c6ec55e4bfed25a8fb6f\",\"dweb:/ipfs/QmPN8XajdLkydiQv2146q1M7nGqYk67Z5SNSjbzFU9MiM5\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://60941294a981f6e3ee77c19e503b64c4114b4e7f3261cf489d6898fdd4916522\",\"dweb:/ipfs/QmQVmckpCRrtkCwyPG7ksVo59yjZdtpNerJDzw3hQVB62A\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0bc227c71372eb216b7965a91a09c843e9e9670369af0410d924cf4208a8dabe\",\"dweb:/ipfs/QmTR55ug3diUCsVedV8C6ShstCcbqSNPVEvmCpqc91pEDf\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dbaba7fe0fe556cc5ed291e03d271fd27d395250141ecfb57a4b30d528958ff9\",\"dweb:/ipfs/QmWT653X2DyZo8nqEcmFe3yTkrCJv3ptbZLhbgLU3y6abe\"]},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c270574add213952363bf451bd512acab5fc48c5a06fc05ad75e99eb4b044b99\",\"dweb:/ipfs/QmNQyg2ZvM59Q6FFg1ukJah2xpg8kvDZnTLRVLtMGKuHL1\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "deployedBytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "execute": { + "methodName": "initialize", + "args": ["0xD07f543d47c3a8997D6079958308e981AC14CD01", [], [], [], 20] + }, + "implementation": "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} diff --git a/deployments/zksyncsepolia/PrimeLiquidityProvider_Implementation.json b/deployments/zksyncsepolia/PrimeLiquidityProvider_Implementation.json new file mode 100644 index 000000000..d73895a7d --- /dev/null +++ b/deployments/zksyncsepolia/PrimeLiquidityProvider_Implementation.json @@ -0,0 +1,1544 @@ +{ + "address": "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "abi": [ + { + "inputs": [ + { + "internalType": "bool", + "name": "_timeBased", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_blocksPerYear", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "FundsTransferIsPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "speed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSpeed", + "type": "uint256" + } + ], + "name": "InvalidDistributionSpeed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenAlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "TokenNotInitialized", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "MaxTokenDistributionSpeedUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPrimeToken", + "type": "address" + } + ], + "name": "PrimeTokenUpdated", + "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": "sweepAmount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenDistributionInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "TokenDistributionSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferredToPrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensAccrued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "token_", + "type": "address" + } + ], + "name": "accrueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "getEffectiveDistributionSpeed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + } + ], + "name": "initializeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "lastAccruedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAccruedBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxTokenDistributionSpeeds", + "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": "pauseFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "releaseFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resumeFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setMaxTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "prime_", + "type": "address" + } + ], + "name": "setPrimeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "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": "token_", + "type": "address" + } + ], + "name": "tokenAmountAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenDistributionSpeeds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "transactionIndex": 0, + "gasUsed": "958330102", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6", + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x0000000000000000000000000000000000000000000000000075ccb679754326", + "logIndex": 0, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000000b3f048cd4bea6", + "logIndex": 1, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x0000000000000000000000000000000000008008", + "topics": ["0x27fe8c0b49f49507b9d4fe5968c9f49edfe5c9df277d433a07a0717ede97638d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003b20000000000000000000000000000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000800ec2968c04491f1da87f0c5d21675124ead7a084e89b299b0acac4e33c40e1128b", + "logIndex": 2, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x0000000000000000000000000000000000008008", + "topics": [ + "0x3a36e47291f4201faf137fab081d92295bce2d53be2c6ca68ba82c7faa9ce241", + "0x000000000000000000000000000000000000000000000000000000000000800e", + "0xc2968c04491f1da87f0c5d21675124ead7a084e89b299b0acac4e33c40e1128b" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004bda056a00000000000000000000038201008041000003820210009c000000000101043b0000000001000414000000c00110021000000001022001900e040dff0000040f00000a3c0000c13d00000a3c0000213d00000e060001043000000a3c0000613d000003c8011001c700000000001004350000801002000039000000200010043f00000382020080410000000000320435000000000101041a000000400100043d0000000000210435000000000101004b0000800d020000390000000e01000029000000400110021000000a3c0000413d000000000202004b0e040dfa0000040f000000000112019f000003820320009cffffffffffffffff00000000001004390000000101200190000000c00220021000000000020004140000000001000019000000800010043f0000000002000416000000000201041a000000400200043d00000e050001042e000000000001042d0000000001000416000000000021041b000000000202043b00000130010000390000000e02000029000000000200001900000000040340190000002004000039000000240230008c0000800b02000039000003d0011001c700000002030000390000012e01000039000000400010043f000000000701034f00000a440000613d0000000401100370000000200130008c000003d301000041000000040010043f000003e30100004100000000003104350000000008980436000000007907043c0000000e050000290000038c011001c700000131010000390000000103000039000003820310009c00000004021000390000000001000412000000040420003900000a3c0000813d000000000434004b0000002304200039000003c10420009c00000024021000390000004402100039000000330100003900000b740000613d00000005055002100002000000010355000003bf011001c70000004001200210000003820120009c00000000001204350000000501100210000000a00010043f0000000002000411000000000221004b000003820330019700000060033002700000000003010019000000000001042f000000000121019f000003cf01000041000003d101000041000000020110008c000000010210008c0000000400100443000000000604004b000000000968004b000000000802001900000005053002720000001f0430018f0000001f01400039000000000003001f000000000707043b000000200430008c000003d3011001c700000040010000390000000303000039000e00000002001d000003bc0210009c00000000030000310000042d0000c13d000003bc0220009c0000800502000039000003ce011001c70000002400100443000003cd01000041000000600210018f000003bd0100004100000001022000390000012f01000039000000fb0100003900000020030000390000038a020000410000006402100039000004620000013d0000000002000410000000000232004b000000000404043b000000000302041a0e040ca80000040f0000008001000039000000840010043f000003d701000041000003bc011001970000000402100370000000000301004b000000000141034f0200000200000000020000000000000000000382030080410000000601000029000000410100003900000004012000390000000802000029000000000031041b00000a520000c13d000000000215004b00000040022002100000006001300210000000000652001900000a450000c13d000007860000613d000005b40000613d0000000000410435000003c10410009c00000001020040390000000000560435000000000585019f00000000055701cf000000000757022f0000010005500089000000000858022f00000000085801cf00000000080604330000000305500210000000000761034f0000000506600210000000000705004b00000005064002720000001f0540018f000003820300004100000020010000390000038a010000410000002403200039000800000001001d00000065010000390000000d03000029000007860000c13d0000000b03000029000003e601000041000003bc05200197000003bc0110009c000e00000001001d0000000101100367000000000131004b000003c10110009c0000000b020000290000000502200210000003c10440009c000000000441034f0000002402100370000d00000002001d000000000201004b0000000504400210000000000201043b6f6e7472616374207a61626c653a2063496e697469616c690000006001100210000000000204004b0000040b0330019700000001020000390000005101000039000003820230009c000003da020000410000022c0000013d000000090300002900000020021000390000000a02000029000003d804000041000000010330019000000001030040390000000003000019000000000332004b0000000002430019000000000301041a0000000004050019000500000001001d00000000006504350000000007870436000000006806043c000000030a00002900000a440000013d000000000121034f00000001010003670000000000150435000000000161019f00000000014101cf000000000141022f0000010004400089000000000646022f00000000064601cf000000000605043300000003044002100000000005520019000000000151034f0000000000200435000000000012041b00000000010a043300000a3e0000c13d00000a3e0000213d00000000066a00190000000009b8004b00000000080a0019000000000141019f000000400430021000000000030a40190000038203a0009c000000c40010043f000000a40010043f000003bc0220019700000000010004110000000000130435000003d6010000410000000c020000290000000000430435000c00000001001d000004650000613d000000000032041b000b00000001001d0000038b011001c7000000000010041b000000800020043f000003c704000041000003be022001970e040ddc0000040f000003cd02000041000000000400041500000044030000390000800501000039000000040320008c0000000401a00039000000400a00043d000d00000001001d000000c901000039000000ff011001900000000a01000029000a00000001001d000000c001000039000003a20000013d000003230000013d0000012d01000039000000000121004b000b00000002001d000000010200c039000000000014043553616665455243325061757361626c65000000440000000000000024000000000000002000000000000000040000000000000000ffffffff00000dc30000613d000000000131019f000000000091043500000000090004110000038204008041000003820340009c000000400230021000000000013100490e040c960000040f0000004003300210000000000503004b00000c4a0000213d0000000000240435000000400400043d00000b8a0000c13d000000020300002900000b630000613d000000010b00002900030000000a001d00000b760000613d000000110100003900000a070000613d000000050210006b0000000209000029000300000001001d0000000b021003600000000e0100006b000900000002001d000003820420009c0000000d0120006b0000002203000039000003cb03000041000003ca03000041000003cc04000041000000fb04000039000000000200041a000000000363019f000003be03200197000003bc06100197000003db01000041000003e5020000410000800202000039000003c3011001c7000003c2010000410000000000520435000003d202000041000003d90400004100000004322000f900000004030000290000071f0000613d00000a520000413d0000000505000029000000000686019f00000000066701cf000000000767022f0000010006600089000000000868022f00000000086801cf00000000080504330000000306600210000000000751034f0000001f06400190000000000601034f0000000505400272000600000001001d000400000002001d00000a4b0000613d0000000d0120006c0000000d0210006c000000000102041a00000007023000290000000e030000290000000502100210000000080120006c0000000b0120006c000003d404000041000000000102004b0000000d01000029000005a80000013d00000000066200190000000506500210000003c904000041000003bc02300197000000000042041b000003be0430019700000097020000390000000001a20019000003eb011001c7000003f101000041000000e40010043f000000000202041a0e040bbc0000040f0e040a720000040f000003dc011001c700000008010000290000009701000039000004650000013d00000000003004350000000d05000029000003d5040000410000002003200039000e00000000001d0000000a0120006c0000000e0210006c000000c00010043f000000e0010000390000000901100029000900240020003d000e00000004001d000000440230008c00000401033001970000000a0110002900000020020000390000038d0400004100000385011001c70000000003000411000003e0011001c700000000051a0436000001ef0000013d00000004010000390000000901000029000700240020003d0000000d02000029000d00000004001d000000ff04300190000000c9020000390000000001000410000000000301043b000000007807043c0000001f02300039000000400020043f0003000000000002028f04e79483a579238a7f617a7383c4f625962bae216aed269b953726e298234a3fa2930000000018c5e8ab00000000ffffffffffffffe07472616374000000206e6f6e2d636f6e2063616c6c20746f416464726573733a6f6e20646964206e206f706572617469303a20455243323065640000000000006f742073756363657fffffffffffffff6c206661696c65646576656c2063616c303a206c6f772d6cffffffffffffffbfffffffffffffff80a9059cbb00000000ffffffffffff00ffffffffffffffff0064726573730000006e616765722061646e74726f6c206d61616365737320636f696e76616c696420000000400000008000000064000000806865206f776e65726973206e6f7420742063616c6c6572204f776e61626c653a261a0ee31b55c312b272badc10e0e11741ee66f93961c567a80c25cc8959419df4eaf5010000000048f5c3ed000000000000004400000080ebdbfc544b05a258000d11b0c9f74754cd4e420270b5ea7462e78cea01bee3203a20706175736564657228290000000064735472616e7366706175736546756ecf479181000000005dbdba411f5d54d5d9e7c5ef37b65ed9aa4770aff0c3d9166d25be279134f4ec0000002400000080000000840000008072000000000000006e6577206f776e656e6f7420746865206c6c657220697320537465703a2063614f776e61626c653229000000000000002875696e743235366f70734c696d69747365744d61784c6f5d2900000000000075696e743235365b64726573735b5d2c53706565642861647269627574696f6e6b656e73446973747365744d6178546f000000640000000075736564000000003a206e6f742070617bd38aeae4b073aafdd244a5e8aa4e53ff9c91a7834c1ba45db9ee0a495bf2e666657228290000006e64735472616e73726573756d65467580ae98f50000000000000004000000805f6f132c00000000ac866d4f5167db94de29a1b14f2221637f0189dd1f26ba0ccf4d0ac7a2f943724e487b7100000000743235365b5d290073735b5d2c75696e65642861646472657574696f6e5370657344697374726962736574546f6b656e6973206e6f742069696e6700000000006e697469616c697af257f6360000000039f1e9ba0000000041ea4b59000000008b1bc57702abf3a520b9d8ea3b076b09ae505374632391262a139b40b9bf8c8976825ac986af05898f01ad2e0212a0e5b31aec1f39f01d9ffe854c4c4e633d5b70a08231000000000de0b6b3a76400007433c3bf5031be01b2153580843330b53d2dc08e3c9bddbd2351eb1e51f0d96d5169e3be39b1a8186edbb21bc0864d6d68912f23d8bb1d12cf6e06116a82c1b4076a39d6000000003c209e9336465bd123bf29dc2df74b6f266b0e7a08c0454b42cbb15ccdc3cad608cc6b5d955391325d622183e25ac5afcd93958e4c903827796b89b91644bc98ab882de59d99a32eff553aecb10793d015d089f94afb7896310ab089e4439a4cbd77fb31d467aafaf675768eb1ae369c86f71ea459f8fc17c2d09fef144f7c8a4c6f6f70734c696d616c6964206d61786c65723a20496e76436f6d7074726f6c697400000000000031fe014601293aa0fe4e111b00cd2b0ca5c30e0888f3093e66fd58e82f7b31a20000004000000000e3b4186f6b6457e019497f9722a3daaf1344cd1fd0a4f2848be0079c53165914ffffffffffff0000697320616c726561616c697a65640000647920696e697469023a8d90e8508b8302500962caba6a1568e884a7374b41e01806aa1896bbf265d8c362d765e22700fa1faef420bfe791c7c124b9cd0de2d338d16b8cac22d99fffffffff00000000000000200000008000000000231f82bb00000000192e7a7b000000000e32cb860000000043bf7283000000003131b065000000005c975abb000000005a38f84d000000005a38f84c000000003131b0640000000064aff9ec00000000637c9b4e00000000715018a6000000006857249c000000006857249b0000000080d45a2d0000000079ba5097000000008da5cb5b000000008aadf799000000008aadf7980000000079ba509600000000637c9b4d000000009d3cc5430000000093920bf800000000a666642b000000009dd5428e000000009dd5428d00000000bc2f7dc300000000b4a0bdf300000000c32094c700000000be26317e00000000be26317d00000000b4a0bdf200000000c7ee005e00000000c7ad089500000000e1d146fb00000000ce82e84100000000ce82e84000000000e458a65d00000000e30c397800000000fa7781ff00000000f2fde38b00000000f2fde38a00000000e30c397700000000c7ad08940000000093920bf70000010000000100000000020000000060cefb38474024988a09c465da9592146a682f133852f6797f26b83ff96e1f2b000000840000000008c379a000000000697320696e697469616c697a696e6700ae0fcab3000000000000000001e1338009c8f7ec0000000000000001ffffffe000000e040000043200000e020021042300000dfd0021042100000df90000613d00000000020500190000040e011001c7000003820130009c00000de20000413d000000000631004b000000000161043a000000000606003100000005066002700000000006640019000000050620021000000dea0000413d000000050130008c0000000000200439000000000501001900000dda0000613d00000dc40000c13d00000db60000613d00000024012000390000004401200039000000640120003900000da30000613d0000002004200039000000000014041b00000d900000813d000000000513004b000000000304041a00000d750000613d000003be03300197000000650200003900000d580000613d00000d460000c13d00000d4a0000613d0000000303000029000300000004001d0000000001080019000000640240003900000004014000390000040d0100004100000024014000390000006002000039000000440140003900000d260000613d00000d1e0000c13d00000d1e0000a13d0000001f0130008c000000400040043f00000d200000c13d000000010110019000000d200000213d000003c10240009c0000000101004039000000000114004b0000000004a10019000000600110018f000000010800002900000d3e0000613d00000d020000613d00000cef0000c13d00000cf30000613d000000020b00002900020000000b001d000000c00340021000000000011300190000000003a300490000001f03300039000100000008001d00000d080000013d00000cce0000c13d000000040520008c00000000040004140000000000040435000000000431001900000cbd0000413d000000000635004b00000020055000390000000000760435000000000707043300000000075400190000000006150019000000000500001900000cc40000613d0000006401a000390000004401a000390000000043080434000000000b1a04360000040c0100004100000040030000390000002401a00039000000000801001900000000012100190000040b022001970000000000020435000000000231001900000c9b0000413d000000000532004b000000200220003900000000060604330000000006240019000000000521001900000ca20000613d000000000203004b000000000132043600000000430104340000001d030000390000040a0300004100000060014002100000004002b00210000003820b0080410000038202b0009c0000002a0300003900000409030000410000040803000041000000240240003900000000002304350000000403400039000200000004001d00000c7c0000c13d000000000109001900000c680000613d00000c500000c13d00000000010b043300000c500000a13d0000001f0140008c00000c500000213d000004070240009c00000c490000613d000000000401043300000c850000613d000000020100002900000c840000613d0000000400a0044300010000000b001d00020000000c001d00000c3d0000c13d00000c520000613d00000000040c0433000000800b000039000000600c00003900000bde0000c13d0000038201100197000003820010019d0000006001100270000000010220018f000000010a00002900010000000a001d000200000009001d00000000020a0019000000000232019f0000006002200210000003820430009c00000c220000013d000000000353019f00000000033401cf000000000434022f0000010003300089000000000535022f00000000053501cf0000000005010433000000030330021000000000011b0019000000000414034f00000c220000613d00000bf50000c13d000000000857004b00000000070b0019000000000604034f00000000051b001900000bf90000613d00000005011002720000000204000367000000000b1c04360000001f0310018f000000400030043f00000c4a0000c13d0000000104400190000003c10530009c000000010400403900000000040000190000000004c3004b00000000033c0019000000400c00043d0000003f033000390000001f0310003900000c200000613d000000000100003100000c080000c13d0000000404a0008c00000000020404330000040602000041000000a0014000390000000000190435000000c001400039000004050190009c000000400090043f000003bc0a100197000000800940003900000c4a0000813d000004040240009c00000044020000390000000000250435000000240540003900000000005304350000040305000041000000200340003900000000003504350000004405400039000200000000000200000bb60000613d00000ba40000c13d00000ba80000613d0000000603000029000000050200002900000006050000290000000404004029000000040350006b00000002050000290004000000150051000000040220006b00000002322000f900020004302000bd0000000502300069000000040200006b00000b8a0000413d000000030500002900000b740000413d00000b960000c13d00000b960000213d00000b9c0000613d00000b070000613d00000af40000c13d00000af80000613d000100000005001d00000b0b0000013d00000adb0000c13d0000000602000029000400000001001d000200000002001d00000abd0000c13d000000050120006b00000aa10000013d00000b900000c13d00000a9e0000613d00000b7f0000613d00000b770000613d000003bc01100198000600000000000200000a6b0000c13d00000a6f0000613d000007ae0000013d00000a4d0000013d0000075a0000013d000008420000c13d00000009020000290000000405008029000000040350006c0005000500100071000000030220006b00040003302000bd0000000802300069000000030200006b00000000010104330000000501000029000000050120002900000a630000613d0000000505500029000009ab0000613d000009980000c13d000000000897004b00000005070000290000099c0000613d000000000203401900000382020000410000000503000029000009af0000013d000009810000c13d000000040220008c000500000002001d000200000001001d000000000112043600000a170000613d000000080120006b0000094e0000c13d000009430000613d000008420000613d00000a5b0000413d0000000b0210006c000008fc0000c13d0000000804000029000000060230002900000a580000c13d0000087e0000c13d000008730000613d0000000c012000290000082c0000813d000a00000002001d000008470000013d000a00000000001d0000040201200197000004650000c13d000000010100006b000008400000c13d0000000d0100006b000005260000013d000008140000c13d000008180000613d0000036b0000013d0000000d04000029000008240000813d00000000003404350000002004100039000000000034041b0000081b0000813d000000000432004b000000000303043b00000001033003670000008403000039000000fb020000390000040102200197000000000454019f000007990000613d0000ff0002200190000003700000013d00000a500000013d0000002b03000039000003df03000041000003de03000041000007b00000c13d0000ff00011001900000002e03000039000003c503000041000003c403000041000000000100001f0000000501100270000007960000c13d0000000e0200006b000000000102c019000000010300006b00000101011001bf000003c60130019700000001021001bf00000401013001970000078c0000c13d000000000201001f00000005022002700000000101006039000000010110008c000000ff0110018f000007890000c13d001000000000001d0008000500100218000000100110008a000000000100041500000a3c0000013d000005d70000c13d0000000604004029000000060350006b00000004050000290006000000150051000000060220006b00040006302000bd0000000a02300069000000060200006b000000000109043300000000019200190000080c0000613d0000000005590019000006c30000613d000006b00000c13d0000000008a7004b0000000007090019000006b40000613d0000000509000029000300000005001d000500000009001d0000000003094019000003820390009c000006c70000013d000006980000c13d00000004019000390000000005190436000000400900043d0000072f0000613d0000000a0120006b000006670000c13d0000065c0000613d000005d70000613d000007a70000413d000006150000c13d0000000d02100360000007a20000613d000e00000003001d000003bc0130009c00000009012000290000000c01000029000004650000813d000c00000002001d000005dc0000013d000c00000000001d000000080100006b0000000a030000290000000c06000029000003f3040000410000000000510435000005a20000c13d000005a60000613d0000053e0000413d000007550000c13d000005730000013d000005680000613d000003bc0120009c000000000103004b0000012d020000390000000e011001af000003be01100197000003e404000041000005200000c13d000005240000613d000000a402200039000000000054043500000084042001bf000003f404000041000005ba0000a13d000000000435004b0000000a05000029000000800300043d000000200330008c00000080012001bf0000059a0000613d0000008006600039000005010000613d000004ee0000c13d000000a00890008c0000000009890436000004f20000613d0000008009000039000003f2011001c7000003fe011001c7000000000414019f000003fa01000041000003e501000041000005280000c13d000000000106004b0000000d020020290000000c0110006b000005180000613d000004970000613d000004840000c13d000004880000613d0000000c0a0000290000000b0b000029000b00000005001d000c0000000a001d000003f901000041000003e904000041000003f001000041000003ef0100004100000029010000390000001003000039000003f603000041000003fd01000041000003fc010000410000040001000041000003ff010000410000002501000039000004cd0000c13d0000003302000039000003fb04000041000000000001041b000004c90000c13d000004670000c13d000000000112004b000000160440008a001500000000001d001600000001001d0e040d5e0000040f000004460000c13d000000000212004b000003bc021001970e040dcb0000040f000003c004000041000000000262019f000000000115004b000003bc05100197000003bc0160009c000000000601043b000003a50000013d0000000403200039000003dd030000410000000e04000029000005d00000813d000003e201000041000003e1010000410000002f0100003900000007011000290000000902200029000000010100c039000000140440008a001300200000003d001400000001001d000002c10000413d0000000c040000290000000000400435000000000112034f000003bc0340009c000000000403043b000000000332034f00000001020003670000000b031000290000000a0100006b000003680000413d000003ed01000041000003ec0100004100000032010000390000000b02200029000b00240020003d000003f70400004100000001033001bf000004360000c13d000003f5010000410000001401000039000003f801000041000000a40030043f000003dd020000410000053b0000813d000000000231004b0000000b01000029000a00240020003d0000002703000039000003890300004100000388030000410000038e01000041000001200010044300000003010000390000010000200443000001e000300443000001c000100443000001a000100443000001800020044300000160002004430000014000000443000000800200043d000000a00100043d000000c00300043d000000ff01000039000000ff014001bf000002160000613d000000ff0550008c000000ff0540018f000002230000c13d0000ff0005400190000000000400041a000000c00030043f0000038702000041000003ab0120009c000003c50000613d000003aa0420009c0000000006000019000000000043041b000003be04400197000000000403041a0000006503000039000000000335004b000003b00120009c000003b50000613d000003af0120009c000003940220009c0000037a0000613d000003930420009c000003e701000041000004c30000c13d000000000156004b0000000e060000290000039f0220009c000003750000613d0000039e0420009c0e040da50000040f000000120440008a001100400000003d001200000001001d000003990120009c0000032f0000613d000003980420009c0000049b0000013d0000046b0000c13d000003a40220009c000003280000613d000003a30420009c000003150000013d000003b60120009c000002600000613d000003b50120009c000003bb0220009c000003d10000613d000003ba0420009c000004100000613d000003b90420009c0000038402000041000001f50000c13d000000000302004b0e040d770000040f000003ee010000410000001901000039000000240130008c000003ad0120009c000003a90000613d000003ac0120009c000001e40000213d000003a90420009c0000077c0000013d000007630000c13d00080005002002180000000f0220008a0000000002000415000f00000002001d00000001020060390000075f0000c13d0001ff0000100194000900000001001d000000000100041a0000000601100029000600240020003d00000064021003700000000702200029000b00000004001d00000044021003700000000c02200029000c00240020003d000000a40230008c000003960220009c0000031f0000613d000003950420009c000001b70000213d000003920420009c0000043b0000013d0000001403000039000003ea03000041000004520000c13d000003e8010000410000001501000039000003a10120009c0000031a0000613d000003a00120009c000001990000213d0000039d0420009c000003b80220009c000002370000613d000003b70420009c000001480000213d000003b40420009c000001360000a13d000003b30420009c0000039b0120009c000003070000613d0000039a0120009c000001800000213d000003970420009c000000c00000213d000003910420009c000005050000013d000004de0000c13d000a00000003001d000000040420008c0000004401100370000c03bc0020019b000e03bc0020019b000000640230008c000003b20220009c000003970000613d000003b10420009c000001c70000213d000003ae0420009c000001180000213d000003a80420009c000000900000a13d000003a70420009c000001f60000013d0000038602000041000001ed0000c13d000001310000613d000001000200043d000000e00100043d000000400130008c000000000151019f00000000012101cf000000000121022f0000010002200089000000000525022f00000000052501cf0000000005040433000000e0044000390000000302200210000000420000613d000000000502004b0000002f0000c13d000000000865004b0000000005850436000000e0066000390000000506400210000000e005000039000000330000613d00000005043002720000001f0230018f000000e00220003900000383022001970000009d0000013d000003a60220009c000002820000613d000003a50420009c000001530000213d000003a20420009c000000a40000213d0000039c0420009c000000830000213d000003900420009c000000520000a13d0000038f0420009c000000e002200270000000040230008c0000008002000039000000210000c13d00010000000103550002000000310355001600000000000201af0569005e005d005c0568056700060566056501ae0564001900c90563056205610560055f055e055d055c055b055a055905580008003200190025001a000805570025001a000801ad0556055501ae05540553055205510550054f003801ac054e054d054c054b054a00c8008f0549054805470546054500030544054305420541012405400019053f00c7002f0123005b0008053e008e053d001a053c053b0045053a0539053805370536053505340533053205310008053000190025001a0008008d002c052f00c60076000900c5002c052e012200760009052d01ab00500012008c005a01210075008b002401aa008a0004002e052c052b052a0074003b00310030052905280527052605250524052305220008002a001500080120011f05210520051f051e051d051c051b0008003200190025001a0008003a000300730009000d002d011e051a05190518051705160008002a00150008011d0037051500240514005900890088001301a9008701a80513004f05120011004e05110510050f050e050d050c050b0008050a00190025001a0008008d002c00720076000900c5002c004d0009004c004b004a004900c4008601a700c30009050901a600c20508008500090507002c004d0009004c004b004a004900c40086050600c3000901a500c100c20505008500090504002c004d0009004c004b004a0049008f0003011c00c000090503011b0058050200bf00090501050004ff04fe01a4011a002f04fd04fc04fb04fa04f9001504f804f704f604f504f404f304f2000804f10019002a00150008011d003704f0002404ef00590089008801a300be000304ee0023002804ed04ec001304eb01a204ea04e904e804e704e60008003200190025001a0008003a000300730009000d0036011e04e504e404e30008002a0015000801190012011a04e204e104e004df0008003200190025001a0008003a000300bd00bc00090017000d0036000f0004000200010005000c000e00070006000b0003001201180117008b01a10116008400140004002e011504de0074003b0031003004dd04dc04db04da0008002a00150008004804d904d801140113011204d700c80111011004d60027005700560010005501a0002804d504d404d30008003200190025001a0008003a000300bd00bc000900500012008c005a012100750120002600bb04d204d104d004cf002400ba000a04ce04cd04cc0008003200190025001a0008003a000300730009000d0044011e04cb04ca04c90008002a001500080050002600bb019f04c8007504c704c604c504c4010f002b0004000200010005005400160071010e04c3008304c204c104c00008002a001500080050011f001304bf0014000200010018019e000a00350059010d04be04bd04bc04bb04ba04b904b804b7010c04b6002700570056001000550022001d00100021001c004300160045019d001b0020000b04b504b404b304b204b1019c04b004af007004ae04ad04ac04ab04aa04a900280013008204a80011004f04a70011004e04a6001100810014004700800011000200010018010b000a003200190025001a0008008d002c004d0009004c004b004a0049008f0003010a00c0000904a504a40058019b00bf000900500012008c005a01210075007f001200b904a304a204a1010d008a04a0049f000a002a00150008011d0037049e0024049d005900890088001301a9008701a8049c019a049b0109005a00140002000100180022001d00100021001c004300160045049a0083019900190025001a0008008d002c004d0009004c004b004a004900c40086019800c300090499002e00c204980085000900c5002c004d0009004c004b004a0049008f0003011c00c000090197011b0058019600bf00090195003704970024049600590495019400890088007f001201930494002e019200b804930108019100170058049204910490048f048e00090196048d00030107048c0036000f0004000200010005000c000e01a700070006000b0003001200270190048b010600570056001000550022001d00100021001c000c00160035018f018e001b00b70020000b018d007e000f0004000200010005000c000e00070006000b00030105002b002e007d00720192048a018c002a00150008004804890488011401130112048700c8011101100015002304860024007c0028002a00150008018b011f002a0015000800b60012008c0024007c0028002a0015000801040024007c0028019900190025001a0008008d002c004d0009004c004b004a004900c40086019800c300090197002e00c204850085000900c5002c004d0009004c004b004a0049008f000300b500c0000901a5018a0058048400bf00090195003704830024048200590481019400890088007f001201930480002700b4047f0106047e0011047d01030056001000550189000a002a00150008007f047c003200190025001a0008003a047b047a000900500012047901020478007500b60026010f0477002b000400020001000500540016007104760083003200190025001a0008003a000300730009000d007e000f0023047500120024007c0028002a0015000800b600120474010204730472047100230028002a0015000800480470046f011401130112046e00c8011101100024007c0028003200190025001a0008003a000300730009018800230028003200190025001a0008003a000300bd00bc000901200012008c005a046d046c01190012011a046b001701880017000d0044000f0004000200010005000c000e00070006000b00030026046a001300c600140002000100180022001d00100021001c00430016003504690042001b0020000b0017005a00b7018700230028003200190025001a0008003a000300730009046801860101019f0085007500c7046700b3002400b2008a04660100046500ff046401850184000a00b3002400b2008a0100046300ff0462000a004f04610011004e04600011008100140047008000110002000100180183000a00b3002400b2008a045f0100045e00ff045d01850184000a019a0109005a00140002000100180022001d00100021001c004300160045045c001b0020000b00230028045b002400ba000a00fe00b100fd00fc00460001000500fb006f045a0459000704580457005e005d005c006e0031003000b000af0456003800fa0041004000f9045500ae045400ad00ac00f800ab00aa00a900a8006d00a700a600a500a400a3006c005300060453006b007b0182005b002f00a200a100f7000600f60037003b001900f501070017000d0044000f0004000200010005000c000e00070006000b000300120452002f04510013001400020001001801a000280450044f044e002400ba000a044d002400ba000a018100870180044c017f017e010d00590004000200010005044b00160045017d0083004600010005044a00070449005e005d005c006e0031003000b000af0448003801ac04470446044500ae044400ad00ac00ab044300aa00a900a8006d00a700a600a500a400a3006c005300060442006b007b0441003704400019043f043e043d043c043b00a0043a04390438001100180189000a0027006a00690437017c017b0038006800410040006704360066009f0052017a00c600040002000100050054001600710435001b0020000b017904340433043200f40023002804310108019100170058019b00be00c90430000900c60178009e007a001f004800650070007900040002000100050078007700070006003900030064042f0063009d0062001f000400020001000500340033000700060039042e0061001f00040002000100050034003300070006003901a60003010700f3002d000f0004000200010005000c000e0007018e0006000b00030026001a042d0105002b00040002000100050054001600350177001b0020000b002e007d00720176042c018c0027006a00690052042b009c00380068004100400067042a0066009f00f200f100f000ef00ee00ed000300ec00eb00ea00e900e8009b001d0010009a001c000a042900180022001d00100021001c004300160071042800420427001b0020000b017900c10426018700230028002e017500b804250108042404230105007d042201750421042001740122041f011800be01ab041e0009018d002d000f0004000200010005000c000e041d000701730006000b000300120015041c00e7041b002c00720076000900b9017200e6000301180017000d007e000f0004000200010005000c000e00070006000b00c90171008e041a010400f40170002e041900f30036000f0004000200010005000c000e00070006000b000300260122016f0418002e0178009e00f3002d000f0004000200010005000c000e00070006000b000300120015016e007a001f00480065007000790004000200010005007800770007000600390003006404170063009d0062001f00040002000100050034003300070006041600e50061001f0004000200010005003400330007000600390003011c0017000d002d000f0004000200010005000c000e00070006000b0003002604150414016d0036000f0004000200010005000c000e00070006000b00030012016c0413008b04120411008400140004002e011504100074003b00310030040f040e00b1040d00fc00460001000500fb006f040c040b000700e4040a005e005d005c006e00310030016b0409016a040800e300e204070406016904050052016804040167016601650164006d016301620161016000e1006c005300060403006b007b0402005b002f00a200a100f7000600f60037003b0019040100e00017000d0044000f0004000200010005000c000e0007015f0006000b000300120099015e0400015d0099015d015c03ff03fe015b03fd009803fc0017000d0044000f0004000200010005000c000e000703fb03fa00df03f90006000b000300de00dd00dc00db00da00d90098002b001300a00002000100180022001d00100021001c00430016003500d80042001b0020000b0017000d002d000f0004000200010005000c000e00070006000b000300d7002b0017000d0036000f0004000200010005000c000e00070006000b000300b70097001300d6001100c100140002000100180022001d00100021001c000c00160035015a0042001b002003f803f700130159001400470158000200010018006f000a03f603f503f403f30157001f01aa00650004000200010005015601550007000600390003001503f201a403f103f0002303ef009603ee03ed03ec00d503eb03ea03e903e803e703e6010c03e503e40013015401a2018a03e303e20013008203e10011004f03e00011004e03df00d403de03dd0013008203dc0011004f03db0011004e03da00d4001300d30014004703d9002700b4010301530057009500b7003f03d800b60026010f002b0102015200500026015101500097000400bb000200010005005400160071010e001b0020000b0013014f03d703d6018100870180004203d5017f00d60158017e00140002000100180022001d00100021001c000c00160045017d001b0020000b0119002603d4002b001303d3018603d203d103d003cf03ce014e03cd03cc03cb00140002000100180022001d00100021001c000c00160045014d001b0020000b007f0012017003ca002700b403c903c80027006a006903c7017c017b0038006800410040006703c60066009f03c50082014c0011004f014b0011004e014a00d400c1014900b800d7014900b803c403c303c203c1014f03c0010c00130045003f0002000100180022014800100021001c00430016019d008303bf03be00d7007d03bd016f03bc011b0174014703bb010a00be000300bd00bc00090146009e007a001f00480065007000790004000200010005007800770007000600390003006403ba0063009d0062001f0004000200010005003400330007000603b900e50061001f000400020001000500340033000700060039000300b50017000d002d000f0004000200010005000c000e00070006000b00030026001a03b80096002b000400020001000500540016003501770042001b0020000b00e70145002c00720076000900d503b700e6000300b50017000d0036000f0004000200010005000c000e00070006000b000300120027019003b6010600570056001000550022001d00100021001c000c00160035018f0042001b0020000b0017000d007e000f0004000200010005000c000e00070006000b00030096002b00e70145002c00720076000900d5017200e60003010a0017000d007e000f0004000200010005000c000e00070006000b00c90171008e03b5010400f403b403b30017000d0036000f0004000200010005000c000e00070006000b000300260147017603b20146009e0017000d002d000f0004000200010005000c000e00070006000b000300120015016e007a001f00480065007000790004000200010005007800770007000600390003006403b10063009d0062001f0004000200010005003400330007000603b000e50061001f000400020001000500340033000700060039000300b50017000d002d000f0004000200010005000c000e00070006000b00030026016d03af03ae0036000f0004000200010005000c000e00070006000b0003001201440027008b03ad03ac03ab0095008400140004002e03aa03a90074003b0031003003a803a700d203a603a5009a0046000100050060006f002e0007005e005d005c006e00310030016b014303a4016a03a300e300e203a203a1016903a000520168039f0167016601650164006d016301620161016000e1006c00530006039e006b007b039d005b002f00a200a100f7000600f60037003b0019039c039b00e00017000d0044000f0004000200010005000c000e00070006000b000300120142015e039a014101420141015c03990398015b0397009803960017000d0044000f0004000200010005000c000e0007015f0395039400df0006000b000300de00dd00dc00db00da00d90098002b001300a00002000100180022001d00100021001c00430016003500d80042001b0020000b0017000d002d000f0004000200010005000c000e00070006000b00030096002b0017000d0036000f0004000200010005000c000e00070006000b000300b90097001300d60011039300140002000100180022001d00100021001c000c00160035015a0042001b002003920023000a003e000d0094003d003c000a005f003e000d00d1003d003c000a001300d300140047017300110391003e000d0140003d003c000a001301590390002700b4010301530057009500b9038f0027006a00690052038e009c00380068004100400067038d0066009f017a038c038b038a016c000d002d000f0004000200010005000c000e0007000600510003001200150389007a001f004800650070007900040002000100050078007700070006013f000300640388006303870062001f000403860061001f00040002000100050034003300070006013f000300e00093000d002d000f0004000200010005000c000e0007000600510003002603850384002903830036000f0004000200010005000c000e0007000600510003001203820117008b01a101160084001400040381011503800074003b00310030037f00fe00b100fd00fc00460001000500fb006f013e037e0007013d00e4005e005d005c006e0031003000b000af037d003800fa0041004000f9037c00ae037b00ad00ac00f800ab00aa00a900a8006d00a700a600a500a400a3006c00530006037a006b007b0182005b002f00a200a10379000603780037003b037700f501440093000d0044000f0004000200010005000c000e000703760006005100030012009903750374013c0099013c013b0373037203710370013a036f0093000d0044000f0004000200010005000c000e0007036e036d00df036c00060051000300de00dd00dc00db00da00d9013a002b001300a00002000100180022001d00100021001c00430016003500d8036b001b002000510093000d002d000f0004000200010005000c000e0007000600510003036a002b00290023000a005f001301540014000200010018019e000a001300d30014004703690011000200010018006f000a003e000d0140003d003c000a003e000d00d1003d003c000a003e000d0094003d003c000a0027006a006900520368009c0038006800410040006703670066036600f200f100f000ef00ee00ed000300ec00eb00ea00e900e8009b001d0010009a0060000a03650139036403630362036103600101035f035e035d0138035c035b035a03590358035701370356003700b20355035403530014035200040351035000d0034f008e034e034d00cf034c00cf034b034a03490348034703460137034503440343034203410340033f0058033e033d033c033b00e300e2033a033901360338033703360335033403330332008603310330032f032e003f032d032c0092013501480010032b032a004600010005001c032903280327001b0326014303250053032403230322008e03210320031f031e001a031d00ce031c031b031a0157001f03190004000200010005015601550007000603180003001503170316031500ce013d03140313031203110310030f00c7002f0123005b030e0015030d0029003e000d0094003d003c000a0023000a030c00ce030b0139030a008101380309019c030803070134013b01330002000100d2009200cd01320060000a0013008203060011004f03050011004e0304001100810014004700800011000200010018010b000a0303030203010131013003000060000a005f0013004f02ff0011004e02fe0011008100140047008000110002000100180183000a02fd02fc02fb02fa002f02f902f802f700e102f602f502f402f302f201ad02f102f0002901af02ef018b0026011702ee02ed003f02ec02eb0116012f012e02ea02e9003f02e80101013602e702e602e502e402e302e202e102e002df02de02dd02dc02db02da0074003b0031003002d902d802d700cf02d602d50046000100cd00fe00b100fd0135012d0131013002d4012d013e02d3000702d200e4005e005d005c006e0031003000b000af02d1003800fa0041004000f902d000ae02cf00ad00ac00f800ab00aa00a900a8006d00a700a600a500a400a3006c00530006012f02ce02cd006b02cc02cb02ca002302c902c802c702c602c502c402c302c200f500c7002f0123005b02c1001502c000290023000a003e000d0094003d003c000a02bf02be001402bd0084001402bc012402bb012e02ba02b902b8013402b701330002000100d2009200cd01320060000a0027006a0069005202b6009c0038006800410040006702b5006602b400f200f100f000ef00ee00ed000300ec00eb00ea00e900e8009b001d0010009a001c000a02b3008702b20109015200500026015101500097000400bb000200010005005400160071010e001b002002b100290023000a0027014e02b002af02ae02ad02ac012400110056001000550022001d00100021001c000c00160045014d001b002002ab002902aa014c003f02a9014b003f02a8014a003f00b3005700950080003f005600100055010b000a0023000a006402a7006302a60062001f00040002000100050034003300070006012c000300290061001f00040002000100050034003300070006012c00030029005f003e000d00d1003d003c000a005f0022001d001000210046000100180060000c000e0007000602a5000300290023000a02a402a302a202a101a3002f02a0029f029e029d029c007d029b029a02990092009b0022001d00100021001c0298029700070006029600030029005f029500d00029002f0029029400d00029002f002902930028000a0000000000000000012b0000000000000292029100000000000000000000012a00000000000000000290028f000000000000028e00000000000000cc00cb00ca028d028c00000000000000000000028b00000091000001290000028a028902880287028600000285000000000000000002840000000000000283000000000000028200000000000002810000000000000280000000000000027f000000000000027e000000000000027d000000000000027c000000000000027b000000000000027a0000000000000279000000000000027800000000000002770000000000000276000000000000027500000000000002740000000000000273000000000000027200000000000002710000000000000270000000000000026f000000000000026e000000000000026d000000000000026c000000000000026b000000000000026a0000000000000269000000000000026800000000000002670000000000000266000000000000026500000000000002640000000000000263000000000000026200000000000002610000000000000260000000000000025f000000000000025e000000000000025d000000000000025c000000000000025b000000000000025a000000000000025900000000000002580000012b001e001e0000000002570000001e02560000000000910000000000000255025402530252000000000000001e02510250024f024e0090000001280000024d024c0000000000cc00cb00ca024b001e001e001e024a0249024802470246009100000245000002440243024202410240000000000000023f023e023d023c023b023a0239023802370236023502340090000001270000023302320231023000900000012a0000022f022e022d022c022b0000000000000000000001280000022a0229022802270226022502240223000000000000022202210000000000000220021f021e021d021c021b021a02190218000000000000021700000000000000000000012700000216000000000000021502140000000000cc00cb00ca02130000000001290000021202110210020f020e020d00000000020c000000000000020b020a0209020802070000000000000000000002060000020500000000000002040203020200000201020001ff01fe012601fd01fc00000000000001fb000001fa01f901f801f701f601f501f4000001f301f201f101f001ef01ee01ed01ec01eb01ea000000000000000001e900000000000001e8000001e701e601e501e401e300000000000001e201e101e00000012601df0000000001de01dd01dc01db0000000001da000001d900000000000001d800000000000001d701d601d501d401d301d201d101d00000000001cf00000091000001ce000001cd01cc01cb01ca01c9000000000000001e001e001e01c8001e001e001e01c701c600000000000000000000000001c500000000000001c4012501c301c201c101c0001e001e001e01bf01be00000000012501bd01bc01bb01ba01b901b801b7001e001e001e01b601b500000000000001b40000000000000090000000000000000000000000000001b301b201b101b0000000000000", + "logIndex": 3, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x0000000000000000000000000000000000008004", + "topics": [ + "0xc94722ff13eacf53547c4741dab5228353a05938ffcdd5d4a2d533ae0e618287", + "0x01000411415659999cf05776a17cbc34d654d74fa29aa6002beea5511a28674f", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 5, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x01000411415659999cf05776a17cbc34d654d74fa29aa6002beea5511a28674f", + "0x000000000000000000000000c2897703257c8cb174ed1ec87fa96d1847b4cd5c" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + }, + { + "transactionIndex": 0, + "blockNumber": 3549325, + "transactionHash": "0x2932899d01989a85c49d94755117b824fe7a81d583c9416906b6956eff56ed76", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000156fca8ff1f700", + "logIndex": 7, + "blockHash": "0x77740b86420f8bb7daede7a5111201df8819ed904b9913345b13561bfd73cab6" + } + ], + "blockNumber": 3549325, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [true, 0], + "numDeployments": 1, + "solcInputHash": "a07e32c825b2843ec874f32e153cc512", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_timeBased\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_blocksPerYear\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AddressesMustDiffer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FundsTransferIsPaused\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"sweepAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArguments\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBlocksPerYear\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCaller\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"speed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSpeed\",\"type\":\"uint256\"}],\"name\":\"InvalidDistributionSpeed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTimeBasedConfiguration\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"loopsLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredLoops\",\"type\":\"uint256\"}],\"name\":\"MaxLoopsLimitExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_\",\"type\":\"address\"}],\"name\":\"TokenNotInitialized\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLoopsLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newmaxLoopsLimit\",\"type\":\"uint256\"}],\"name\":\"MaxLoopsLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSpeed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSpeed\",\"type\":\"uint256\"}],\"name\":\"MaxTokenDistributionSpeedUpdated\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldPrimeToken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPrimeToken\",\"type\":\"address\"}],\"name\":\"PrimeTokenUpdated\",\"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\":\"sweepAmount\",\"type\":\"uint256\"}],\"name\":\"SweepToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenDistributionInitialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSpeed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSpeed\",\"type\":\"uint256\"}],\"name\":\"TokenDistributionSpeedUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenTransferredToPrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokensAccrued\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_MAX_DISTRIBUTION_SPEED\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"token_\",\"type\":\"address\"}],\"name\":\"accrueTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blocksOrSecondsPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumberOrTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_\",\"type\":\"address\"}],\"name\":\"getEffectiveDistributionSpeed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokens_\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"distributionSpeeds_\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxDistributionSpeeds_\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"loopsLimit_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens_\",\"type\":\"address[]\"}],\"name\":\"initializeTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isTimeBased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_\",\"type\":\"address\"}],\"name\":\"lastAccruedBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastAccruedBlockOrSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLoopsLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxTokenDistributionSpeeds\",\"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\":\"pauseFundsTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"prime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token_\",\"type\":\"address\"}],\"name\":\"releaseFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resumeFundsTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"loopsLimit\",\"type\":\"uint256\"}],\"name\":\"setMaxLoopsLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens_\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"maxDistributionSpeeds_\",\"type\":\"uint256[]\"}],\"name\":\"setMaxTokensDistributionSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prime_\",\"type\":\"address\"}],\"name\":\"setPrimeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens_\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"distributionSpeeds_\",\"type\":\"uint256[]\"}],\"name\":\"setTokensDistributionSpeed\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20Upgradeable\",\"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\":\"token_\",\"type\":\"address\"}],\"name\":\"tokenAmountAccrued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenDistributionSpeeds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"accrueTokens(address)\":{\"custom:event\":\"Emits TokensAccrued event\",\"params\":{\"token_\":\"Address of the token\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"getBlockNumberOrTimestamp()\":{\"details\":\"Function to simply retrieve block number or block timestamp\",\"returns\":{\"_0\":\"Current block number or block timestamp\"}},\"getEffectiveDistributionSpeed(address)\":{\"params\":{\"token_\":\"Address of the token\"},\"returns\":{\"_0\":\"speed returns the per block or second reward\"}},\"initialize(address,address[],uint256[],uint256[],uint256)\":{\"custom:error\":\"Throw InvalidArguments on different length of tokens and speeds array\",\"details\":\"Initializes the deployer to owner\",\"params\":{\"accessControlManager_\":\"AccessControlManager contract address\",\"distributionSpeeds_\":\"New distribution speeds for tokens\",\"loopsLimit_\":\"Maximum number of loops allowed in a single transaction\",\"tokens_\":\"Array of addresses of the tokens\"}},\"initializeTokens(address[])\":{\"custom:access\":\"Only Governance\",\"params\":{\"tokens_\":\"Array of addresses of the tokens to be intialized\"}},\"lastAccruedBlock(address)\":{\"params\":{\"token_\":\"Address of the token\"},\"returns\":{\"_0\":\"blockNumberOrSecond returns the last accrued block or second\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pauseFundsTransfer()\":{\"custom:access\":\"Controlled by ACM\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"pendingOwner()\":{\"details\":\"Returns the address of the pending owner.\"},\"releaseFunds(address)\":{\"custom:error\":\"Throw InvalidArguments on Zero address(token)Throw FundsTransferIsPaused is pausedThrow InvalidCaller if the sender is not the Prime contract\",\"custom:event\":\"Emits TokenTransferredToPrime event\",\"params\":{\"token_\":\"The token to release to the Prime contract\"}},\"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.\"},\"resumeFundsTransfer()\":{\"custom:access\":\"Controlled by ACM\"},\"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\"}},\"setMaxLoopsLimit(uint256)\":{\"custom:access\":\"Controlled by ACM\",\"custom:event\":\"Emits MaxLoopsLimitUpdated event on success\",\"params\":{\"loopsLimit\":\"Limit for the max loops can execute at a time\"}},\"setMaxTokensDistributionSpeed(address[],uint256[])\":{\"custom:access\":\"Controlled by ACM\",\"custom:error\":\"Throw InvalidArguments on different length of tokens and speeds array\",\"params\":{\"maxDistributionSpeeds_\":\"New distribution speeds for tokens\",\"tokens_\":\"Array of addresses of the tokens\"}},\"setPrimeToken(address)\":{\"custom:access\":\"Only owner\",\"custom:event\":\"Emits PrimeTokenUpdated event\",\"params\":{\"prime_\":\"The new address of the prime token contract\"}},\"setTokensDistributionSpeed(address[],uint256[])\":{\"custom:access\":\"Controlled by ACM\",\"custom:error\":\"Throw InvalidArguments on different length of tokens and speeds array\",\"params\":{\"distributionSpeeds_\":\"New distribution speeds for tokens\",\"tokens_\":\"Array of addresses of the tokens\"}},\"sweepToken(address,address,uint256)\":{\"custom:access\":\"Only Governance\",\"custom:error\":\"Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\",\"custom:event\":\"Emits SweepToken event\",\"params\":{\"amount_\":\"The amount of tokens needs to transfer\",\"to_\":\"The address of the recipient\",\"token_\":\"The address of the ERC-20 token to sweep\"}},\"tokenAmountAccrued(address)\":{\"params\":{\"token_\":\"Address of the token\"},\"returns\":{\"_0\":\"returns the amount of accrued tokens for the token provided\"}},\"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.\"}},\"title\":\"PrimeLiquidityProvider\",\"version\":1},\"userdoc\":{\"errors\":{\"AddressesMustDiffer()\":[{\"notice\":\"Error thrown when argument value in setter is same as previous value\"}],\"FundsTransferIsPaused()\":[{\"notice\":\"Error thrown when funds transfer is paused\"}],\"InsufficientBalance(uint256,uint256)\":[{\"notice\":\"Error thrown when PrimeLiquidityProvider's balance is less than sweep amount\"}],\"InvalidArguments()\":[{\"notice\":\"Thrown when arguments are passed are invalid\"}],\"InvalidBlocksPerYear()\":[{\"notice\":\"Thrown when blocks per year is invalid\"}],\"InvalidCaller()\":[{\"notice\":\"Thrown when caller is not the desired caller\"}],\"InvalidDistributionSpeed(uint256,uint256)\":[{\"notice\":\"Thrown when distribution speed is greater than maxTokenDistributionSpeeds[tokenAddress]\"}],\"InvalidTimeBasedConfiguration()\":[{\"notice\":\"Thrown when time based but blocks per year is provided\"}],\"MaxLoopsLimitExceeded(uint256,uint256)\":[{\"notice\":\"Thrown an error on maxLoopsLimit exceeds for any loop\"}],\"TokenAlreadyInitialized(address)\":[{\"notice\":\"Thrown when token is initialized\"}],\"TokenNotInitialized(address)\":[{\"notice\":\"Error thrown when accrueTokens is called for an uninitialized token\"}],\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"events\":{\"MaxLoopsLimitUpdated(uint256,uint256)\":{\"notice\":\"Emitted when max loops limit is set\"},\"MaxTokenDistributionSpeedUpdated(address,uint256,uint256)\":{\"notice\":\"Emitted when a new max distribution speed for token is set\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"PrimeTokenUpdated(address,address)\":{\"notice\":\"Emitted when prime token contract address is changed\"},\"SweepToken(address,address,uint256)\":{\"notice\":\"Emitted on sweep token success\"},\"TokenDistributionInitialized(address)\":{\"notice\":\"Emitted when a token distribution is initialized\"},\"TokenDistributionSpeedUpdated(address,uint256,uint256)\":{\"notice\":\"Emitted when a new token distribution speed is set\"},\"TokenTransferredToPrime(address,uint256)\":{\"notice\":\"Emitted when token is transferred to the prime contract\"},\"TokensAccrued(address,uint256)\":{\"notice\":\"Emitted when distribution state(Index and block or second) is updated\"}},\"kind\":\"user\",\"methods\":{\"DEFAULT_MAX_DISTRIBUTION_SPEED()\":{\"notice\":\"The default max token distribution speed\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"accrueTokens(address)\":{\"notice\":\"Accrue token by updating the distribution state\"},\"blocksOrSecondsPerYear()\":{\"notice\":\"Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored\"},\"getEffectiveDistributionSpeed(address)\":{\"notice\":\"Get rewards per block or second for token\"},\"initialize(address,address[],uint256[],uint256[],uint256)\":{\"notice\":\"PrimeLiquidityProvider initializer\"},\"initializeTokens(address[])\":{\"notice\":\"Initialize the distribution of the token\"},\"isTimeBased()\":{\"notice\":\"Acknowledges if a contract is time based or not\"},\"lastAccruedBlock(address)\":{\"notice\":\"Get the last accrued block or second for token\"},\"lastAccruedBlockOrSecond(address)\":{\"notice\":\"The block or second till which rewards are distributed for an asset\"},\"maxTokenDistributionSpeeds(address)\":{\"notice\":\"The max token distribution speed for token\"},\"pauseFundsTransfer()\":{\"notice\":\"Pause fund transfer of tokens to Prime contract\"},\"prime()\":{\"notice\":\"Address of the Prime contract\"},\"releaseFunds(address)\":{\"notice\":\"Claim all the token accrued till last block or second\"},\"resumeFundsTransfer()\":{\"notice\":\"Resume fund transfer of tokens to Prime contract\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setMaxLoopsLimit(uint256)\":{\"notice\":\"Set the limit for the loops can iterate to avoid the DOS\"},\"setMaxTokensDistributionSpeed(address[],uint256[])\":{\"notice\":\"Set max distribution speed for token (amount of maximum token distribute per block or second)\"},\"setPrimeToken(address)\":{\"notice\":\"Set the prime token contract address\"},\"setTokensDistributionSpeed(address[],uint256[])\":{\"notice\":\"Set distribution speed (amount of token distribute per block or second)\"},\"sweepToken(address,address,uint256)\":{\"notice\":\"A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\"},\"tokenAmountAccrued(address)\":{\"notice\":\"Get the tokens accrued\"},\"tokenDistributionSpeeds(address)\":{\"notice\":\"The rate at which token is distributed (per block or second)\"}},\"notice\":\"PrimeLiquidityProvider is used to fund Prime\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/Prime/PrimeLiquidityProvider.sol\":\"PrimeLiquidityProvider\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ec6df2255fadc251ea905043c47bf55170ee6cb5d7ca8b5c8ed54c84eac9d09e\",\"dweb:/ipfs/QmaokWfuL59uarki5yoDGbPzh4cErzEfnAzfmesTNJNXE9\"]},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8\",\"dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B\"]},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad\",\"dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c25f742ff154998d19a669e2508c3597b363e123ce9144cd0fcf6521229f401f\",\"dweb:/ipfs/QmQXRuFzStEWqeEPbhQU6cAg9PaSowxJVo4PDKyRod7dco\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol\":{\"keccak256\":\"0xd60f939a3ca0199014d079b4dd66aa757954334947d81eb5c1d35d7a83061ab3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce6e5ae4633559c2aad156be884a96f7a9beb8dd31b1b630a6de55972e3af622\",\"dweb:/ipfs/QmQasz4sQoexkrvB7wCQAY6NbMoCtPS7AqomymRoJGYz85\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d03ebe5406134f0c4a017dee625ff615031194493bd1e88504e5c8fae55bc166\",\"dweb:/ipfs/QmUZV5bMbgk2PAkV3coouSeSainHN2jhqaQDJaA7hQRyu2\"]},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"keccak256\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://38db65a77297d8df3345797277a624d81706bde2e9ede230a140e8ca2a027040\",\"dweb:/ipfs/QmWKcmtyyvi3dhAJHkdAKGNrsKcMxKQ6c82ArtDqe8tncG\"]},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://8120bda3990193388d0cc5f551510ef1eab685387a58a88ab607b5149e51acde\",\"dweb:/ipfs/QmNSX9ai6GbN4wQukM29rFkcWDFhqStUTtKe6XtreTvRcN\"]},\"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\":{\"keccak256\":\"0x4c25e30635485d162177effa384eee51768b0141a567a0da16ff6ad673274166\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://5d71ed301eb76292bce7b3500482452c397b766507222d00f3982b65520d156b\",\"dweb:/ipfs/QmcF3yPyr6hWQUA6wfEi6Hq1TEUtbxFP9MAcYQy4D2tFHC\"]},\"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\":{\"keccak256\":\"0x57a2bbb9b8e02b1c0a5c0e305fef1328a22db56c3d4b148c362010a6e767243c\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://01c6af010cbff93563f2175d48702f5d901beb59b0e3315ed2a5583dfa53ee21\",\"dweb:/ipfs/QmY7sfvoQ1kEQtLhPdSA3bQdV4u3hT563RSvuCtgSrQUmx\"]},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"keccak256\":\"0x14de93ead464da249af31bea0e3bcfb62ec693bea3475fb4d90f055ac81dc5eb\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://6134b92b2bc5bad1c6e088d0d092736eede6dfe2cf7dadc573f1396a9d690274\",\"dweb:/ipfs/QmXwKV4SY7CdCaCaDqXudcLxVLB4vUfbwMiH9kH6HhWpiy\"]},\"contracts/Tokens/Prime/Interfaces/IPrimeLiquidityProvider.sol\":{\"keccak256\":\"0x4dca0341931008bcd81de18e627c2d0cd4f9d0be67db4d8f0d678d11ba0d330f\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://0f22bd137fd0e20237ab3a4f072c53fa0d891f089a99ab4a9b814ce69e653910\",\"dweb:/ipfs/QmPFT7qpMmtJCSUX6fJR9mQo4pDZFaFKjS1grZLdG1gPnd\"]},\"contracts/Tokens/Prime/PrimeLiquidityProvider.sol\":{\"keccak256\":\"0x8fa6826d33694827d2007991f36311a5c1e3a1bc9809e8e704e0de0ce26c83ff\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://a6e160231c462c942500e1df30454ca6d27b01f95cb3eec5ff1064c0bc3da597\",\"dweb:/ipfs/QmVwfCRSwYhBsiSUB4CoEfPGUrhgZEgrHgAiRj2BP6KUEa\"]},\"contracts/Tokens/Prime/PrimeLiquidityProviderStorage.sol\":{\"keccak256\":\"0x697e43e039edbec0f14857b1d118fa55f5ca87b2b284dad0a363013d885e7c29\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://3b74717a34e226f658751a60ba80b5953c49b59fa91f365dbd4c1396df1e2e5b\",\"dweb:/ipfs/QmWhZrg4XxUGWiyuoWmihBa1oJDB9ieUfog2j2GVgvqPtE\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x00030000000000020016000000000002000000000301001900000060033002700000038203300197000200000031035500010000000103550000000102200190000000210000c13d0000008002000039000000400020043f000000040230008c00000a3c0000413d000000000201043b000000e0022002700000038f0420009c000000520000a13d000003900420009c000000830000213d0000039c0420009c000000a40000213d000003a20420009c000001530000213d000003a50420009c000002820000613d000003a60220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000009d0000013d0000000002000416000000000202004b00000a3c0000c13d0000001f023000390000038302200197000000e002200039000000400020043f0000001f0230018f0000000504300272000000330000613d000000e0050000390000000506400210000000e006600039000000000701034f000000007807043c0000000005850436000000000865004b0000002f0000c13d000000000502004b000000420000613d0000000504400210000000000141034f0000000302200210000000e004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000400130008c00000a3c0000413d000000e00100043d000000000201004b0000000002000019000000010200c039000000000221004b00000a3c0000c13d000001000200043d000000000301004b000001310000613d000000000202004b000001ed0000c13d00000386020000410000000103000039000001f60000013d000003a70420009c000000900000a13d000003a80420009c000001180000213d000003ae0420009c000001c70000213d000003b10420009c000003970000613d000003b20220009c00000a3c0000c13d000000640230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000e03bc0020019b000d00000002001d000003bc0220009c00000a3c0000213d0000002402100370000000000202043b000c03bc0020019b000b00000002001d000003bc0220009c00000a3c0000213d0000004401100370000000000301043b0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d000003d701000041000000800010043f0000000001000410000000840010043f00000000010004140000000e02000029000000040420008c000a00000003001d000004de0000c13d0000000003000031000000200130008c00000020040000390000000004034019000005050000013d000003910420009c000000c00000213d000003970420009c000001800000213d0000039a0120009c000003070000613d0000039b0120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000012d01000039000003230000013d000003b30420009c000001360000a13d000003b40420009c000001480000213d000003b70420009c000002370000613d000003b80220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000013001000039000003a20000013d0000039d0420009c000001990000213d000003a00120009c0000031a0000613d000003a10120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001501000039000000800010043f000003e801000041000000a00010043f00000080010000390e040ca80000040f000000400100043d000000c902000039000000000302041a000000ff04300190000004520000c13d0000004402100039000003ea030000410000000000320435000000240210003900000014030000390000043b0000013d000003920420009c000001b70000213d000003950420009c0000031f0000613d000003960220009c00000a3c0000c13d000000a40230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000d00000004001d000003c10440009c00000a3c0000213d000c00240020003d0000000d0200002900000005022002100000000c02200029000000000232004b00000a3c0000213d0000004402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000b00000004001d000003c10440009c00000a3c0000213d000700240020003d0000000b0200002900000005022002100000000702200029000000000232004b00000a3c0000213d0000006402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000a00000001001d000003c10110009c00000a3c0000213d000600240020003d0000000a0100002900000005011002100000000601100029000000000131004b00000a3c0000213d000000000100041a000900000001001d0001ff00001001940000075f0000c13d0000000901000029000000ff0110019000000000020000190000000102006039000f00000002001d00000000020004150000000f0220008a0008000500200218000000000101004b000007630000c13d0000077c0000013d000003a90420009c000001e40000213d000003ac0120009c000003a90000613d000003ad0120009c00000a3c0000c13d000000240130008c00000a3c0000413d0000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001901000039000000800010043f000003ee01000041000000a00010043f00000080010000390e040ca80000040f00000004010000390000000101100367000000000101043b0e040d770000040f000000000100001900000e050001042e000000000302004b000001f50000c13d000000400100043d0000038402000041000001ef0000013d000003b90420009c000004100000613d000003ba0420009c000003d10000613d000003bb0220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000012e01000039000003a20000013d000003b50120009c000002600000613d000003b60120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d000000c901000039000000000101041a000000ff01100190000003150000013d000003a30420009c000003280000613d000003a40220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000d00000001001d000000400a00043d000003d70100004100000000051a04360000000401a000390000000002000410000000000021043500000000010004140000000e02000029000000040320008c0000046b0000c13d0000000003000031000000200130008c000000200400003900000000040340190000049b0000013d000003980420009c0000032f0000613d000003990120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000000001000412001200000001001d001100400000003d000080050100003900000044030000390000000004000415000000120440008a0000000504400210000003cd020000410e040ddc0000040f0e040da50000040f000000400200043d0000000000120435000003820120009c00000382020080410000004001200210000003e0011001c700000e050001042e0000039e0420009c000003750000613d0000039f0220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d0000012d01000039000000000201041a000003bc052001970000000e06000029000000000156004b000004c30000c13d000003e701000041000000800010043f000003e60100004100000e0600010430000003930420009c0000037a0000613d000003940220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000013101000039000003a20000013d000003af0120009c000003b50000613d000003b00120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000003301000039000000000201041a000003bc052001970000000003000411000000000335004b0000042d0000c13d0000006503000039000000000403041a000003be04400197000000000043041b000003be02200197000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410000000006000019000004620000013d000003aa0420009c000003c50000613d000003ab0120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000003301000039000003230000013d000000400100043d00000387020000410000000000210435000003820210009c0000038201008041000000400110021000000385011001c700000e06000104300000000203000039000000a00010043f000000800020043f000000c00030043f000000000400041a0000ff0005400190000002230000c13d000000ff0540018f000000ff0550008c000002160000613d000000ff014001bf000000000010041b000000ff01000039000000400200043d0000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d0200003900000001030000390000038d040000410e040dfa0000040f000000010120019000000a3c0000613d000000c00300043d000000a00100043d000000800200043d0000014000000443000001600020044300000020020000390000018000200443000001a0001004430000004001000039000001c000100443000001e0003004430000010000200443000000030100003900000120001004430000038e0100004100000e050001042e000000400100043d0000006402100039000003880300004100000000003204350000004402100039000003890300004100000000003204350000002402100039000000270300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c000003820100804100000040011002100000038b011001c700000e0600010430000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000b00000001001d000003c10110009c00000a3c0000213d000a00240020003d0000000b0100002900000005011002100000000a01100029000000000131004b00000a3c0000213d0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d000000fb01000039000000000101041a0000000b03000029000000000231004b0000053b0000813d000003dd02000041000000800020043f000000840010043f000000a40030043f000003f80100004100000e06000104300000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001401000039000000800010043f000003f501000041000000a00010043f00000080010000390e040ca80000040f000000400100043d000000c902000039000000000302041a000000ff04300190000004360000c13d000004010330019700000001033001bf000000000032041b00000000020004110000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000103000039000003f704000041000004620000013d000000440230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000003c10440009c00000a3c0000213d000b00240020003d0000000e0200002900000005022002100000000b02200029000000000232004b00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000a00000001001d000003c10110009c00000a3c0000213d000900240020003d0000000a0100002900000005011002100000000901100029000000000131004b00000a3c0000213d000000e001000039000000400010043f0000003201000039000000800010043f000003ec01000041000000a00010043f000003ed01000041000000c00010043f00000080010000390e040ca80000040f000000fb01000039000000000101041a0000000e0210006c000003680000413d0000000e020000290000000a0120006c000007860000c13d0000000a0100006b000004650000613d000e00000000001d0000000e0100002900000005011002100000000b031000290000000102000367000000000332034f000000000403043b000003bc0340009c00000a3c0000213d0000000901100029000000000112034f000000000101043b000c00000001001d00000000004004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c70000801002000039000d00000004001d0e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000400200043d00000020032000390000000c0400002900000000004304350000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d5040000410000000d050000290e040dfa0000040f0000000d03000029000000010120019000000a3c0000613d00000000003004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000c02000029000000000021041b0000000e020000290000000102200039000e00000002001d0000000a0120006c000002c10000413d000004650000013d0000000001000416000000000101004b00000a3c0000c13d0000000001000412001400000001001d001300200000003d000080050100003900000044030000390000000004000415000000140440008a0000000504400210000003cd020000410e040ddc0000040f000000000101004b0000000001000019000000010100c039000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000009701000039000003230000013d0000000001000416000000000101004b00000a3c0000c13d0000006501000039000000000101041a000003bc01100197000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d000003d601000041000000800010043f000003bd0100004100000e050001042e000000440230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000003c10440009c00000a3c0000213d000900240020003d0000000e0200002900000005022002100000000902200029000000000232004b00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000800000001001d000003c10110009c00000a3c0000213d000700240020003d000000080100002900000005011002100000000701100029000000000131004b00000a3c0000213d000000e001000039000000400010043f0000002f01000039000000800010043f000003e101000041000000a00010043f000003e201000041000000c00010043f00000080010000390e040ca80000040f000000fb01000039000000000101041a0000000e0210006c000005d00000813d000000400200043d00000024032000390000000e040000290000000000430435000003dd03000041000000000032043500000004032000390000000000130435000003820120009c00000382020080410000004001200210000003dc011001c700000e06000104300000000001000416000000000101004b00000a3c0000c13d000000fb01000039000003a50000013d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000601043b000003bc0160009c00000a3c0000213d0000003301000039000000000101041a000003bc051001970000000001000411000000000115004b0000042d0000c13d0000006501000039000000000201041a000003be02200197000000000262019f000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c004000041000004620000013d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000012f01000039000000200010043f00000000010000190e040dcb0000040f000000000101041a000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000006501000039000000000101041a000003bc021001970000000001000411000000000212004b000004460000c13d0e040d5e0000040f000000000100001900000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000000001000412001600000001001d001500000000001d000080050100003900000044030000390000000004000415000000160440008a0000000504400210000003cd020000410e040ddc0000040f000000800010043f000003bd0100004100000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d0e040a720000040f000000000100001900000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000012d01000039000000000101041a000003bc011001970000000002000411000000000112004b000004670000c13d000000c901000039000000000101041a000000ff01100190000004c90000c13d0000000e010000290e040a720000040f0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000000000001041b000000400100043d000d00000002001d0000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003fb040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000020004110000000d030000290e040bbc0000040f000000000100001900000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d0000003302000039000000000202041a000003bc022001970000000003000411000000000232004b0000042d0000c13d000000000201004b000004cd0000c13d0000038a01000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f000003ff01000041000000c40010043f0000040001000041000000e40010043f000003f10100004100000e06000104300000038a01000041000000800010043f0000002001000039000000840010043f000000a40010043f000003fc01000041000000c40010043f000003fd0100004100000e06000104300000004402100039000003f60300004100000000003204350000002402100039000000100300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c00000382010080410000004001100210000003eb011001c700000e06000104300000038a01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000003ef01000041000000c40010043f000003f001000041000000e40010043f000003f10100004100000e06000104300000040103300197000000000032041b00000000020004110000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000103000039000003e9040000410e040dfa0000040f000000010120019000000a3c0000613d000000000100001900000e050001042e000003f901000041000000800010043f000003e60100004100000e06000104300000038203a0009c000003820300004100000000030a40190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c7000c0000000a001d000b00000005001d0e040dff0000040f0000000b0b0000290000000c0a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000004880000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000004840000c13d000000000705004b000004970000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000005180000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d00000000010a0433000c00000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a0000000c0110006b00000000020000190000000d02002029000000400100043d0000000000210435000003820210009c00000382010080410000004001100210000003e0011001c700000e050001042e000000000106004b000005280000c13d000003e501000041000000800010043f000003e60100004100000e0600010430000003fa01000041000000800010043f000003e60100004100000e06000104300000009702000039000000000302041a000003be04300197000000000414019f000000000042041b000003bc02300197000000800020043f000000a00010043f0000000001000414000003820210009c0000038201008041000000c001100210000003fe011001c70000800d020000390000000103000039000003c904000041000004620000013d000003820310009c0000038201008041000000c001100210000003f2011001c70e040dff0000040f0000008009000039000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000004f20000613d000000000701034f000000007807043c0000000009890436000000a00890008c000004ee0000c13d000000000705004b000005010000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000059a0000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200330008c00000a3c0000413d000000800300043d0000000a05000029000000000435004b000005ba0000a13d000003f404000041000000000041043500000084042001bf0000000000540435000000a40220003900000000003204350000004001100210000003dc011001c700000e0600010430000000400200043d0000001f0430018f0000000505300272000005240000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005200000c13d000000000604004b000005b40000613d0000000505500210000005a80000013d000d00000002001d0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003e4040000410e040dfa0000040f000000010120019000000a3c0000613d0000000d01000029000003be011001970000000e011001af0000012d02000039000000000012041b000000000100001900000e050001042e000000000103004b000004650000613d000e00000000001d0000000e0100002900000005011002100000000a011000290000000101100367000000000201043b000003bc0120009c00000a3c0000213d000d00000002001d000000000102004b000007860000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000005680000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000005730000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d0000000d02000029000000000101043b000c00000001001d00000000002004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000d05000029000000010220019000000a3c0000613d000000000101043b000000000201041a000000000202004b000007550000c13d0000000c02000029000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000203000039000003d4040000410e040dfa0000040f000000010120019000000a3c0000613d0000000e020000290000000102200039000e00000002001d0000000b0120006c0000053e0000413d000004650000013d000000400200043d0000001f0430018f00000005053002720000000505500210000005a60000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005a20000c13d000000000604004b000005b40000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000112019f00000e0600010430000000000051043500000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000303000039000003f3040000410000000e050000290000000c060000290e040dfa0000040f000000010120019000000a3c0000613d0000000d010000290000000b020000290000000a030000290e040bbc0000040f000000000100001900000e050001042e0000000e02000029000000080120006c000007860000c13d000000080100006b000004650000613d000c00000000001d000005dc0000013d0000000c020000290000000102200039000c00000002001d000000080120006c000004650000813d0000000c010000290000000502100210000b00000002001d0000000901200029000d00000001001d0000000101100367000000000301043b000003bc0130009c00000a3c0000213d00000000003004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c70000801002000039000e00000003001d0e040dff0000040f0000000e03000029000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b000007a20000613d00000001010003670000000d02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d0000000b030000290000000702300029000000000121034f000000000101043b000d00000001001d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000201043b000000000102041a000000000301004b000006150000c13d000003d601000041000000000012041b0000000d0210006c0000000e02000029000007a70000413d00000000002004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000b00000002001d0000000d0120006c000005d70000613d0000000e02000029000000000102004b000007860000613d00000000002004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b00000a4b0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c0000065c0000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f0000000102200190000006670000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000a00000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a0000000a0120006b0000072f0000613d000400000002001d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000600000001001d000000400900043d000003d701000041000000000519043600000004019000390000000002000410000000000021043500000000010004140000000e02000029000000040320008c000006980000c13d0000000003000031000000200130008c00000020040000390000000004034019000006c70000013d000003820390009c000003820300004100000000030940190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c7000500000009001d000300000005001d0e040dff0000040f000000030a0000290000000509000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000000505400272000006b40000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000006b00000c13d0000001f06400190000006c30000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000080c0000613d0000001f01400039000000600210018f0000000001920019000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d0000000001090433000500000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000505000029000000010220019000000a3c0000613d000000000101043b000000000101041a000000000215004b00000a520000413d000000060200006b0000071f0000613d000000000215004b0000071f0000613d00000004030000290000000a0230006900040006302000bd00000004322000f9000000060220006b00000a520000c13d00060000001500510000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000405000029000000060350006b00000000040500190000000604004029000000010220019000000a3c0000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000a520000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d8040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000a02000029000000000021041b0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000d03000029000000000031041b000000400100043d000000200210003900000000003204350000000b020000290000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d9040000410000000e050000290e040dfa0000040f0000000101200190000005d70000c13d00000a3c0000013d000000400100043d000003d202000041000000000021043500000004021000390000000000520435000003820210009c00000382010080410000004001100210000003d3011001c700000e06000104300000000001000415000000100110008a0008000500100218001000000000001d000003c2010000410000000000100439000000000100041000000004001004430000000001000414000003820210009c0000038201008041000000c001100210000003c3011001c700008002020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000000101004b000007890000c13d0000000901000029000000ff0110018f000000010110008c0000000001000019000000010100603900000008020000290000000502200270000000000201001f0000078c0000c13d0000000903000029000004010130019700000001021001bf000003c60130019700000101011001bf000000010300006b000000000102c019000000000010041b0000000e0200006b000007960000c13d000000400100043d000003e502000041000001ef0000013d00000008010000290000000501100270000000000100001f000000400100043d0000006402100039000003c40300004100000000003204350000004402100039000003c503000041000000000032043500000024021000390000002e030000390000022c0000013d0000ff0001100190000007b00000c13d000000400100043d0000006402100039000003de0300004100000000003204350000004402100039000003df03000041000000000032043500000024021000390000002b030000390000022c0000013d000000400100043d000003da020000410000000000210435000000040210003900000a500000013d000000400200043d00000024032000390000000000130435000003db01000041000000000012043500000004012000390000000d030000290000000000310435000003700000013d0000006501000039000000000201041a000003be02200197000000000021041b0000000001000411000003bc061001970000003301000039000000000201041a000003be03200197000000000363019f000000000031041b0000000001000414000003bc05200197000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410e040dfa0000040f000000010120019000000a3c0000613d000000400100043d000000000200041a0000ff0002200190000007990000613d0000009702000039000000000302041a000003be043001970000000e05000029000000000454019f000000000042041b00000020021000390000000000520435000003bc023001970000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003c9040000410e040dfa0000040f000000010120019000000a3c0000613d000000c901000039000000000201041a0000040102200197000000000021041b000000400100043d000000fb02000039000000000202041a00000084030000390000000103300367000000000303043b000000000432004b0000081b0000813d000000fb04000039000000000034041b000000200410003900000000003404350000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003cc040000410e040dfa0000040f000000010120019000000a3c0000613d000000fb01000039000000000101041a0000000d0210006c000008240000813d000000400200043d00000024032000390000000d040000290000036b0000013d000000400200043d0000001f0430018f0000000505300272000008180000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000008140000c13d000000000604004b000005b40000613d000005260000013d0000006402100039000003ca0300004100000000003204350000004402100039000003cb030000410000000000320435000000240210003900000022030000390000022c0000013d0000000b020000290000000d0120006b000007860000c13d0000000a020000290000000d0120006b000007860000c13d0000000d0100006b000008400000c13d000000010100006b000004650000c13d000000000200041a0000040201200197000000000010041b000000400100043d00000001030000390000000000310435000003820210009c000003820100804100000040011002100000000002000414000003820420009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000038d04000041000004620000013d000a00000000001d000008470000013d0000000a020000290000000102200039000a00000002001d0000000d0120006c0000082c0000813d0000000a010000290000000502100210000900000002001d0000000c01200029000b00000001001d0000000101100367000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000000e0100006b000007860000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000008730000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f00000001022001900000087e0000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000800000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000000000202004b00000a580000c13d0000000802000029000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000203000039000003d4040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d00000001010003670000000b02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d00000009030000290000000602300029000000000121034f000000000101043b000800000001001d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000400200043d0000002003200039000000080400002900000000004304350000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d5040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000802000029000000000021041b00000001010003670000000b02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d00000009030000290000000702300029000000000121034f000000000101043b000b00000001001d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000201043b000000000102041a000000000301004b000008fc0000c13d000003d601000041000000000012041b0000000b0210006c00000a5b0000413d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000900000002001d0000000b0120006c000008420000613d0000000e0100006b000007860000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b00000a4b0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000009430000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f00000001022001900000094e0000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000800000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000400000002001d000000080120006b00000a170000613d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000300000001001d000000400200043d000003d7010000410000000001120436000200000001001d000500000002001d00000004012000390000000002000410000000000021043500000000010004140000000e02000029000000040220008c000009810000c13d0000000003000031000000200130008c00000020040000390000000004034019000009af0000013d0000000503000029000003820230009c000003820200004100000000020340190000004002200210000003820310009c0000038201008041000000c001100210000000000121019f000003d3011001c70000000e020000290e040dff0000040f000000000301001900000060033002700000038203300197000000200430008c00000020040000390000000004034019000000050540027200000002090000290000099c0000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000897004b000009980000c13d0000001f06400190000009ab0000613d0000000505500210000000000751034f00000005055000290000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000000a630000613d0000001f01400039000000600210018f0000000501200029000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d00000005010000290000000001010433000500000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000050210006b00000a520000413d000000030200006b00000a070000613d000000050210006b00000a070000613d0000000403000029000000080230006900040003302000bd00000004322000f9000000030220006b00000a520000c13d00050005001000710000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000505000029000000040350006c00000004050080290000000004050019000000010220019000000a3c0000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000a520000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d8040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000802000029000000000021041b0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000b03000029000000000031041b000000400100043d0000002002100039000000000032043500000009020000290000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d9040000410000000e050000290e040dfa0000040f0000000101200190000008420000c13d000000000100001900000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000000001042f000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000000400100043d000003da02000041000000000021043500000004021000390000000e0300002900000000003204350000075a0000013d000003e30100004100000000001004350000001101000039000000040010043f000003d30100004100000e0600010430000000400100043d000003d20200004100000a4d0000013d000000400200043d00000024032000390000000000130435000003db01000041000000000012043500000004012000390000000b03000029000007ae0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000000a6f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000a6b0000c13d000000000604004b000005b40000613d000005a80000013d0006000000000002000003bc0110019800000b770000613d000600000001001d00000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000101041a000000000101004b00000b7f0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000b760000613d000000000101043b000000010210008c00000a9e0000613d000000020110008c00000b900000c13d000003d1010000410000000000100439000000000100041400000aa10000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000b760000613d000000000101043b000500000001001d000000060100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000201041a000000050120006b00000abd0000c13d000000000001042d000200000002001d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000101041a000400000001001d000000400a00043d000003d70100004100000000051a04360000000401a000390000000002000410000000000021043500000000010004140000000602000029000000040320008c00000adb0000c13d0000000003000031000000200130008c0000002004000039000000000403401900000b0b0000013d0000038203a0009c000003820300004100000000030a40190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c700030000000a001d000100000005001d0e040dff0000040f000000010b000029000000030a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200000af80000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00000af40000c13d000000000705004b00000b070000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000000b9c0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000003c10410009c00000b960000213d000000010220019000000b960000c13d000000400010043f000000200130008c00000b740000413d00000000010a0433000300000001001d000000060100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000305000029000000010220019000000b740000613d000000000101043b000000000101041a000000000215004b00000b8a0000413d000000040200006b00000b630000613d000000000215004b00000b630000613d0000000203000029000000050230006900020004302000bd00000002322000f9000000040220006b00000b8a0000c13d0004000000150051000000060100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000205000029000000040350006b00000000040500190000000404004029000000010220019000000b740000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000b8a0000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d80400004100000006050000290e040dfa0000040f000000010120019000000b740000613d000000060100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b0000000502000029000000000021041b000000000001042d000000000100001900000e0600010430000000000001042f000000400100043d000003e5020000410000000000210435000003820210009c0000038201008041000000400110021000000385011001c700000e0600010430000000400100043d000003da020000410000000000210435000000040210003900000006030000290000000000320435000003820210009c00000382010080410000004001100210000003d3011001c700000e0600010430000003e30100004100000000001004350000001101000039000000040010043f000003d30100004100000e0600010430000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000400200043d0000001f0430018f0000000505300272000000050550021000000ba80000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000ba40000c13d000000000604004b00000bb60000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000121019f00000e06000104300002000000000002000000400400043d00000044054000390000000000350435000000200340003900000403050000410000000000530435000003bc022001970000002405400039000000000025043500000044020000390000000000240435000004040240009c00000c4a0000813d0000008009400039000003bc0a100197000000400090043f000004050190009c00000c4a0000213d000000c001400039000000400010043f00000020010000390000000000190435000000a00140003900000406020000410000000000210435000000000204043300000000010004140000000404a0008c00000c080000c13d00000001020000390000000001000031000000000301004b00000c200000613d0000001f031000390000040b033001970000003f033000390000040b03300197000000400c00043d00000000033c00190000000004c3004b00000000040000190000000104004039000003c10530009c00000c4a0000213d000000010440019000000c4a0000c13d000000400030043f0000001f0310018f000000000b1c043600000002040003670000000501100272000000050110021000000bf90000613d00000000051b0019000000000604034f00000000070b0019000000006806043c0000000007870436000000000857004b00000bf50000c13d000000000503004b00000c220000613d000000000414034f00000000011b00190000000303300210000000000501043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f000000000031043500000c220000013d000003820430009c00000382030080410000004003300210000003820420009c00000382020080410000006002200210000000000232019f000003820310009c0000038201008041000000c001100210000000000112019f00000000020a0019000200000009001d00010000000a001d0e040dfa0000040f000000010a0000290000000209000029000000010220018f00020000000103550000006001100270000003820010019d0000038201100197000000000301004b00000bde0000c13d000000600c000039000000800b00003900000000040c0433000000000202004b00000c520000613d000000000204004b00000c3d0000c13d00020000000c001d00010000000b001d000003c20100004100000000001004390000000400a004430000000001000414000003820210009c0000038201008041000000c001100210000003c3011001c700008002020000390e040dff0000040f000000010220019000000c840000613d000000000101043b000000000101004b000000020100002900000c850000613d0000000004010433000000000204004b000000010b00002900000c490000613d000004070240009c00000c500000213d0000001f0140008c00000c500000a13d00000000010b0433000000000201004b0000000002000019000000010200c039000000000221004b00000c500000c13d000000000101004b00000c680000613d000000000001042d000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000000100001900000e06000104300000000001090019000000000204004b00000c7c0000c13d000000400400043d000200000004001d0000038a02000041000000000024043500000004034000390000002002000039000000000023043500000024024000390e040c960000040f00000002030000290000000001310049000003820210009c0000038201008041000003820230009c000003820300804100000060011002100000004002300210000000000121019f00000e0600010430000000400100043d00000064021000390000040803000041000000000032043500000044021000390000040903000041000000000032043500000024021000390000002a0300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c000003820100804100000040011002100000038b011001c700000e06000104300000038202b0009c000003820b0080410000004002b00210000003820340009c00000382040080410000006001400210000000000121019f00000e0600010430000000000001042f000000400100043d00000044021000390000040a03000041000000000032043500000024021000390000001d0300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c00000382010080410000004001100210000003eb011001c700000e060001043000000000430104340000000001320436000000000203004b00000ca20000613d000000000200001900000000052100190000000006240019000000000606043300000000006504350000002002200039000000000532004b00000c9b0000413d000000000231001900000000000204350000001f023000390000040b022001970000000001210019000000000001042d000300000000000200000000080100190000009701000039000000000201041a000000400a00043d0000002401a00039000000400300003900000000003104350000040c01000041000000000b1a04360000000401a000390000000009000411000000000091043500000000430804340000004401a0003900000000003104350000006401a00039000003bc02200197000000000503004b00000cc40000613d000000000500001900000000061500190000000007540019000000000707043300000000007604350000002005500039000000000635004b00000cbd0000413d000000000431001900000000000404350000000004000414000000040520008c00000cce0000c13d0000000003000031000000200130008c0000002004000039000000000403401900000d080000013d000100000008001d0000001f033000390000040b033001970000000003a300490000000001130019000003820310009c000003820100804100000060011002100000038203a0009c000003820300004100000000030a40190000004003300210000000000131019f000003820340009c0000038204008041000000c003400210000000000131019f00030000000a001d00020000000b001d0e040dff0000040f000000020b000029000000030a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200000cf30000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00000cef0000c13d000000000705004b00000d020000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000000000900041100000d3e0000613d00000001080000290000001f01400039000000600110018f0000000004a10019000000000114004b00000000010000190000000101004039000003c10240009c00000d200000213d000000010110019000000d200000c13d000000400040043f0000001f0130008c00000d1e0000a13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b00000d1e0000c13d000000000101004b00000d260000613d000000000001042d000000000100001900000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e06000104300000004401400039000000600200003900000000002104350000002401400039000000000200041000000000002104350000040d0100004100000000001404350000000401400039000000000091043500000064024000390000000001080019000300000004001d0e040c960000040f00000003030000290000000001310049000003820210009c0000038201008041000003820230009c000003820300804100000060011002100000004002300210000000000121019f00000e0600010430000000400200043d0000001f0430018f0000000505300272000000050550021000000d4a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d460000c13d000000000604004b00000d580000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000112019f00000e06000104300000006502000039000000000302041a000003be03300197000000000032041b000003bc061001970000003301000039000000000201041a000003be03200197000000000363019f000000000031041b0000000001000414000003bc05200197000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410e040dfa0000040f000000010120019000000d750000613d000000000001042d000000000100001900000e0600010430000000400200043d000000fb04000039000000000304041a000000000513004b00000d900000813d000000000014041b000000200420003900000000001404350000000000320435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003cc040000410e040dfa0000040f000000010120019000000da30000613d000000000001042d0000006401200039000003ca0300004100000000003104350000004401200039000003cb0300004100000000003104350000002401200039000000220300003900000000003104350000038a010000410000000000120435000000040120003900000020030000390000000000310435000003820120009c000003820200804100000040012002100000038b011001c700000e0600010430000000000100001900000e0600010430000000010210008c00000db60000613d000000020110008c00000dc40000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000dc30000613d000000000101043b000000000001042d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000dc30000613d000000000101043b000000000001042d000000000001042f000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000000000001042f0000000002000414000003820320009c0000038202008041000000c002200210000003820310009c00000382010080410000004001100210000000000121019f000003c8011001c700008010020000390e040dff0000040f000000010220019000000dda0000613d000000000101043b000000000001042d000000000100001900000e060001043000000000050100190000000000200439000000050130008c00000dea0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000631004b00000de20000413d000003820130009c000003820300804100000060013002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000040e011001c700000000020500190e040dff0000040f000000010220019000000df90000613d000000000101043b000000000001042d000000000001042f00000dfd002104210000000102000039000000000001042d0000000002000019000000000001042d00000e02002104230000000102000039000000000001042d0000000002000019000000000001042d00000e040000043200000e050001042e00000e0600010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe009c8f7ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380ae0fcab300000000000000000000000000000000000000000000000000000000616c697a696e6700000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e69746908c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000002000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249800000002000000000000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000093920bf700000000000000000000000000000000000000000000000000000000c7ad089400000000000000000000000000000000000000000000000000000000e30c397700000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fa7781ff00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000e458a65d00000000000000000000000000000000000000000000000000000000ce82e84000000000000000000000000000000000000000000000000000000000ce82e84100000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000c7ee005e00000000000000000000000000000000000000000000000000000000b4a0bdf200000000000000000000000000000000000000000000000000000000be26317d00000000000000000000000000000000000000000000000000000000be26317e00000000000000000000000000000000000000000000000000000000c32094c700000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000bc2f7dc3000000000000000000000000000000000000000000000000000000009dd5428d000000000000000000000000000000000000000000000000000000009dd5428e00000000000000000000000000000000000000000000000000000000a666642b0000000000000000000000000000000000000000000000000000000093920bf8000000000000000000000000000000000000000000000000000000009d3cc54300000000000000000000000000000000000000000000000000000000637c9b4d0000000000000000000000000000000000000000000000000000000079ba5096000000000000000000000000000000000000000000000000000000008aadf798000000000000000000000000000000000000000000000000000000008aadf799000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000079ba50970000000000000000000000000000000000000000000000000000000080d45a2d000000000000000000000000000000000000000000000000000000006857249b000000000000000000000000000000000000000000000000000000006857249c00000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000637c9b4e0000000000000000000000000000000000000000000000000000000064aff9ec000000000000000000000000000000000000000000000000000000003131b064000000000000000000000000000000000000000000000000000000005a38f84c000000000000000000000000000000000000000000000000000000005a38f84d000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000003131b0650000000000000000000000000000000000000000000000000000000043bf7283000000000000000000000000000000000000000000000000000000000e32cb8600000000000000000000000000000000000000000000000000000000192e7a7b00000000000000000000000000000000000000000000000000000000231f82bb000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000038d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700000000000000000000000000000000000000000000000000ffffffffffffffff1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0020000000000000000000000000000000000004000000000000000000000000066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa06974000000000000000000000000000000000000000000000000000000000000436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696dc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd1076a39d6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000cf6e06116a82c1b468912f23d8bb1d126edbb21bc0864d6d5169e3be39b1a8182351eb1e51f0d96d3d2dc08e3c9bddbdb2153580843330b57433c3bf5031be010000000000000000000000000000000000000000000000000de0b6b3a764000070a0823100000000000000000000000000000000000000000000000000000000fe854c4c4e633d5bb31aec1f39f01d9f8f01ad2e0212a0e576825ac986af05892a139b40b9bf8c89ae5053746323912620b9d8ea3b076b098b1bc57702abf3a541ea4b590000000000000000000000000000000000000000000000000000000039f1e9ba000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000f257f636000000000000000000000000000000000000000000000000000000006e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420690000000000000000000000000000000000000020000000000000000000000000736574546f6b656e73446973747269627574696f6e537065656428616464726573735b5d2c75696e743235365b5d2900000000000000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000cf4d0ac7a2f943727f0189dd1f26ba0cde29a1b14f222163ac866d4f5167db945f6f132c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000080000000000000000080ae98f500000000000000000000000000000000000000000000000000000000726573756d6546756e64735472616e73666572282900000000000000000000005db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5061757361626c653a206e6f742070617573656400000000000000000000000000000000000000000000000000000000000000640000000000000000000000007365744d6178546f6b656e73446973747269627574696f6e537065656428616464726573735b5d2c75696e743235365b5d2900000000000000000000000000007365744d61784c6f6f70734c696d69742875696e7432353629000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000000000000000000000000000000000000000000240000008000000000000000006d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5cf47918100000000000000000000000000000000000000000000000000000000706175736546756e64735472616e7366657228290000000000000000000000005061757361626c653a207061757365640000000000000000000000000000000062e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258000000000000000000000000000000000000004400000080000000000000000048f5c3ed00000000000000000000000000000000000000000000000000000000f4eaf50100000000000000000000000000000000000000000000000000000000a80c25cc8959419d41ee66f93961c567b272badc10e0e117261a0ee31b55c3124f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000640000008000000000000000000200000000000000000000000000000000000040000000800000000000000000696e76616c696420616365737320636f6e74726f6c206d616e616765722061646472657373000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffa9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff80000000000000000000000000000000000000000000000000ffffffffffffffbf5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe018c5e8ab000000000000000000000000000000000000000000000000000000004a3fa2930000000000000000000000000000000000000000000000000000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000269b953726e29823f625962bae216aed238a7f617a7383c4028f04e79483a579", + "deployedBytecode": "0x00030000000000020016000000000002000000000301001900000060033002700000038203300197000200000031035500010000000103550000000102200190000000210000c13d0000008002000039000000400020043f000000040230008c00000a3c0000413d000000000201043b000000e0022002700000038f0420009c000000520000a13d000003900420009c000000830000213d0000039c0420009c000000a40000213d000003a20420009c000001530000213d000003a50420009c000002820000613d000003a60220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000009d0000013d0000000002000416000000000202004b00000a3c0000c13d0000001f023000390000038302200197000000e002200039000000400020043f0000001f0230018f0000000504300272000000330000613d000000e0050000390000000506400210000000e006600039000000000701034f000000007807043c0000000005850436000000000865004b0000002f0000c13d000000000502004b000000420000613d0000000504400210000000000141034f0000000302200210000000e004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000400130008c00000a3c0000413d000000e00100043d000000000201004b0000000002000019000000010200c039000000000221004b00000a3c0000c13d000001000200043d000000000301004b000001310000613d000000000202004b000001ed0000c13d00000386020000410000000103000039000001f60000013d000003a70420009c000000900000a13d000003a80420009c000001180000213d000003ae0420009c000001c70000213d000003b10420009c000003970000613d000003b20220009c00000a3c0000c13d000000640230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000e03bc0020019b000d00000002001d000003bc0220009c00000a3c0000213d0000002402100370000000000202043b000c03bc0020019b000b00000002001d000003bc0220009c00000a3c0000213d0000004401100370000000000301043b0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d000003d701000041000000800010043f0000000001000410000000840010043f00000000010004140000000e02000029000000040420008c000a00000003001d000004de0000c13d0000000003000031000000200130008c00000020040000390000000004034019000005050000013d000003910420009c000000c00000213d000003970420009c000001800000213d0000039a0120009c000003070000613d0000039b0120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000012d01000039000003230000013d000003b30420009c000001360000a13d000003b40420009c000001480000213d000003b70420009c000002370000613d000003b80220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000013001000039000003a20000013d0000039d0420009c000001990000213d000003a00120009c0000031a0000613d000003a10120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001501000039000000800010043f000003e801000041000000a00010043f00000080010000390e040ca80000040f000000400100043d000000c902000039000000000302041a000000ff04300190000004520000c13d0000004402100039000003ea030000410000000000320435000000240210003900000014030000390000043b0000013d000003920420009c000001b70000213d000003950420009c0000031f0000613d000003960220009c00000a3c0000c13d000000a40230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000d00000004001d000003c10440009c00000a3c0000213d000c00240020003d0000000d0200002900000005022002100000000c02200029000000000232004b00000a3c0000213d0000004402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000b00000004001d000003c10440009c00000a3c0000213d000700240020003d0000000b0200002900000005022002100000000702200029000000000232004b00000a3c0000213d0000006402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000a00000001001d000003c10110009c00000a3c0000213d000600240020003d0000000a0100002900000005011002100000000601100029000000000131004b00000a3c0000213d000000000100041a000900000001001d0001ff00001001940000075f0000c13d0000000901000029000000ff0110019000000000020000190000000102006039000f00000002001d00000000020004150000000f0220008a0008000500200218000000000101004b000007630000c13d0000077c0000013d000003a90420009c000001e40000213d000003ac0120009c000003a90000613d000003ad0120009c00000a3c0000c13d000000240130008c00000a3c0000413d0000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001901000039000000800010043f000003ee01000041000000a00010043f00000080010000390e040ca80000040f00000004010000390000000101100367000000000101043b0e040d770000040f000000000100001900000e050001042e000000000302004b000001f50000c13d000000400100043d0000038402000041000001ef0000013d000003b90420009c000004100000613d000003ba0420009c000003d10000613d000003bb0220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000012e01000039000003a20000013d000003b50120009c000002600000613d000003b60120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d000000c901000039000000000101041a000000ff01100190000003150000013d000003a30420009c000003280000613d000003a40220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000d00000001001d000000400a00043d000003d70100004100000000051a04360000000401a000390000000002000410000000000021043500000000010004140000000e02000029000000040320008c0000046b0000c13d0000000003000031000000200130008c000000200400003900000000040340190000049b0000013d000003980420009c0000032f0000613d000003990120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000000001000412001200000001001d001100400000003d000080050100003900000044030000390000000004000415000000120440008a0000000504400210000003cd020000410e040ddc0000040f0e040da50000040f000000400200043d0000000000120435000003820120009c00000382020080410000004001200210000003e0011001c700000e050001042e0000039e0420009c000003750000613d0000039f0220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d0000012d01000039000000000201041a000003bc052001970000000e06000029000000000156004b000004c30000c13d000003e701000041000000800010043f000003e60100004100000e0600010430000003930420009c0000037a0000613d000003940220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000013101000039000003a20000013d000003af0120009c000003b50000613d000003b00120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000003301000039000000000201041a000003bc052001970000000003000411000000000335004b0000042d0000c13d0000006503000039000000000403041a000003be04400197000000000043041b000003be02200197000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410000000006000019000004620000013d000003aa0420009c000003c50000613d000003ab0120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000003301000039000003230000013d000000400100043d00000387020000410000000000210435000003820210009c0000038201008041000000400110021000000385011001c700000e06000104300000000203000039000000a00010043f000000800020043f000000c00030043f000000000400041a0000ff0005400190000002230000c13d000000ff0540018f000000ff0550008c000002160000613d000000ff014001bf000000000010041b000000ff01000039000000400200043d0000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d0200003900000001030000390000038d040000410e040dfa0000040f000000010120019000000a3c0000613d000000c00300043d000000a00100043d000000800200043d0000014000000443000001600020044300000020020000390000018000200443000001a0001004430000004001000039000001c000100443000001e0003004430000010000200443000000030100003900000120001004430000038e0100004100000e050001042e000000400100043d0000006402100039000003880300004100000000003204350000004402100039000003890300004100000000003204350000002402100039000000270300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c000003820100804100000040011002100000038b011001c700000e0600010430000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000b00000001001d000003c10110009c00000a3c0000213d000a00240020003d0000000b0100002900000005011002100000000a01100029000000000131004b00000a3c0000213d0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d000000fb01000039000000000101041a0000000b03000029000000000231004b0000053b0000813d000003dd02000041000000800020043f000000840010043f000000a40030043f000003f80100004100000e06000104300000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001401000039000000800010043f000003f501000041000000a00010043f00000080010000390e040ca80000040f000000400100043d000000c902000039000000000302041a000000ff04300190000004360000c13d000004010330019700000001033001bf000000000032041b00000000020004110000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000103000039000003f704000041000004620000013d000000440230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000003c10440009c00000a3c0000213d000b00240020003d0000000e0200002900000005022002100000000b02200029000000000232004b00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000a00000001001d000003c10110009c00000a3c0000213d000900240020003d0000000a0100002900000005011002100000000901100029000000000131004b00000a3c0000213d000000e001000039000000400010043f0000003201000039000000800010043f000003ec01000041000000a00010043f000003ed01000041000000c00010043f00000080010000390e040ca80000040f000000fb01000039000000000101041a0000000e0210006c000003680000413d0000000e020000290000000a0120006c000007860000c13d0000000a0100006b000004650000613d000e00000000001d0000000e0100002900000005011002100000000b031000290000000102000367000000000332034f000000000403043b000003bc0340009c00000a3c0000213d0000000901100029000000000112034f000000000101043b000c00000001001d00000000004004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c70000801002000039000d00000004001d0e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000400200043d00000020032000390000000c0400002900000000004304350000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d5040000410000000d050000290e040dfa0000040f0000000d03000029000000010120019000000a3c0000613d00000000003004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000c02000029000000000021041b0000000e020000290000000102200039000e00000002001d0000000a0120006c000002c10000413d000004650000013d0000000001000416000000000101004b00000a3c0000c13d0000000001000412001400000001001d001300200000003d000080050100003900000044030000390000000004000415000000140440008a0000000504400210000003cd020000410e040ddc0000040f000000000101004b0000000001000019000000010100c039000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000009701000039000003230000013d0000000001000416000000000101004b00000a3c0000c13d0000006501000039000000000101041a000003bc01100197000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d000003d601000041000000800010043f000003bd0100004100000e050001042e000000440230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000003c10440009c00000a3c0000213d000900240020003d0000000e0200002900000005022002100000000902200029000000000232004b00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000800000001001d000003c10110009c00000a3c0000213d000700240020003d000000080100002900000005011002100000000701100029000000000131004b00000a3c0000213d000000e001000039000000400010043f0000002f01000039000000800010043f000003e101000041000000a00010043f000003e201000041000000c00010043f00000080010000390e040ca80000040f000000fb01000039000000000101041a0000000e0210006c000005d00000813d000000400200043d00000024032000390000000e040000290000000000430435000003dd03000041000000000032043500000004032000390000000000130435000003820120009c00000382020080410000004001200210000003dc011001c700000e06000104300000000001000416000000000101004b00000a3c0000c13d000000fb01000039000003a50000013d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000601043b000003bc0160009c00000a3c0000213d0000003301000039000000000101041a000003bc051001970000000001000411000000000115004b0000042d0000c13d0000006501000039000000000201041a000003be02200197000000000262019f000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c004000041000004620000013d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000012f01000039000000200010043f00000000010000190e040dcb0000040f000000000101041a000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000006501000039000000000101041a000003bc021001970000000001000411000000000212004b000004460000c13d0e040d5e0000040f000000000100001900000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000000001000412001600000001001d001500000000001d000080050100003900000044030000390000000004000415000000160440008a0000000504400210000003cd020000410e040ddc0000040f000000800010043f000003bd0100004100000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d0e040a720000040f000000000100001900000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000012d01000039000000000101041a000003bc011001970000000002000411000000000112004b000004670000c13d000000c901000039000000000101041a000000ff01100190000004c90000c13d0000000e010000290e040a720000040f0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000000000001041b000000400100043d000d00000002001d0000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003fb040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000020004110000000d030000290e040bbc0000040f000000000100001900000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d0000003302000039000000000202041a000003bc022001970000000003000411000000000232004b0000042d0000c13d000000000201004b000004cd0000c13d0000038a01000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f000003ff01000041000000c40010043f0000040001000041000000e40010043f000003f10100004100000e06000104300000038a01000041000000800010043f0000002001000039000000840010043f000000a40010043f000003fc01000041000000c40010043f000003fd0100004100000e06000104300000004402100039000003f60300004100000000003204350000002402100039000000100300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c00000382010080410000004001100210000003eb011001c700000e06000104300000038a01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000003ef01000041000000c40010043f000003f001000041000000e40010043f000003f10100004100000e06000104300000040103300197000000000032041b00000000020004110000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000103000039000003e9040000410e040dfa0000040f000000010120019000000a3c0000613d000000000100001900000e050001042e000003f901000041000000800010043f000003e60100004100000e06000104300000038203a0009c000003820300004100000000030a40190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c7000c0000000a001d000b00000005001d0e040dff0000040f0000000b0b0000290000000c0a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000004880000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000004840000c13d000000000705004b000004970000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000005180000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d00000000010a0433000c00000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a0000000c0110006b00000000020000190000000d02002029000000400100043d0000000000210435000003820210009c00000382010080410000004001100210000003e0011001c700000e050001042e000000000106004b000005280000c13d000003e501000041000000800010043f000003e60100004100000e0600010430000003fa01000041000000800010043f000003e60100004100000e06000104300000009702000039000000000302041a000003be04300197000000000414019f000000000042041b000003bc02300197000000800020043f000000a00010043f0000000001000414000003820210009c0000038201008041000000c001100210000003fe011001c70000800d020000390000000103000039000003c904000041000004620000013d000003820310009c0000038201008041000000c001100210000003f2011001c70e040dff0000040f0000008009000039000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000004f20000613d000000000701034f000000007807043c0000000009890436000000a00890008c000004ee0000c13d000000000705004b000005010000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000059a0000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200330008c00000a3c0000413d000000800300043d0000000a05000029000000000435004b000005ba0000a13d000003f404000041000000000041043500000084042001bf0000000000540435000000a40220003900000000003204350000004001100210000003dc011001c700000e0600010430000000400200043d0000001f0430018f0000000505300272000005240000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005200000c13d000000000604004b000005b40000613d0000000505500210000005a80000013d000d00000002001d0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003e4040000410e040dfa0000040f000000010120019000000a3c0000613d0000000d01000029000003be011001970000000e011001af0000012d02000039000000000012041b000000000100001900000e050001042e000000000103004b000004650000613d000e00000000001d0000000e0100002900000005011002100000000a011000290000000101100367000000000201043b000003bc0120009c00000a3c0000213d000d00000002001d000000000102004b000007860000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000005680000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000005730000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d0000000d02000029000000000101043b000c00000001001d00000000002004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000d05000029000000010220019000000a3c0000613d000000000101043b000000000201041a000000000202004b000007550000c13d0000000c02000029000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000203000039000003d4040000410e040dfa0000040f000000010120019000000a3c0000613d0000000e020000290000000102200039000e00000002001d0000000b0120006c0000053e0000413d000004650000013d000000400200043d0000001f0430018f00000005053002720000000505500210000005a60000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005a20000c13d000000000604004b000005b40000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000112019f00000e0600010430000000000051043500000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000303000039000003f3040000410000000e050000290000000c060000290e040dfa0000040f000000010120019000000a3c0000613d0000000d010000290000000b020000290000000a030000290e040bbc0000040f000000000100001900000e050001042e0000000e02000029000000080120006c000007860000c13d000000080100006b000004650000613d000c00000000001d000005dc0000013d0000000c020000290000000102200039000c00000002001d000000080120006c000004650000813d0000000c010000290000000502100210000b00000002001d0000000901200029000d00000001001d0000000101100367000000000301043b000003bc0130009c00000a3c0000213d00000000003004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c70000801002000039000e00000003001d0e040dff0000040f0000000e03000029000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b000007a20000613d00000001010003670000000d02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d0000000b030000290000000702300029000000000121034f000000000101043b000d00000001001d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000201043b000000000102041a000000000301004b000006150000c13d000003d601000041000000000012041b0000000d0210006c0000000e02000029000007a70000413d00000000002004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000b00000002001d0000000d0120006c000005d70000613d0000000e02000029000000000102004b000007860000613d00000000002004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b00000a4b0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c0000065c0000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f0000000102200190000006670000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000a00000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a0000000a0120006b0000072f0000613d000400000002001d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000600000001001d000000400900043d000003d701000041000000000519043600000004019000390000000002000410000000000021043500000000010004140000000e02000029000000040320008c000006980000c13d0000000003000031000000200130008c00000020040000390000000004034019000006c70000013d000003820390009c000003820300004100000000030940190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c7000500000009001d000300000005001d0e040dff0000040f000000030a0000290000000509000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000000505400272000006b40000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000006b00000c13d0000001f06400190000006c30000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000080c0000613d0000001f01400039000000600210018f0000000001920019000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d0000000001090433000500000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000505000029000000010220019000000a3c0000613d000000000101043b000000000101041a000000000215004b00000a520000413d000000060200006b0000071f0000613d000000000215004b0000071f0000613d00000004030000290000000a0230006900040006302000bd00000004322000f9000000060220006b00000a520000c13d00060000001500510000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000405000029000000060350006b00000000040500190000000604004029000000010220019000000a3c0000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000a520000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d8040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000a02000029000000000021041b0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000d03000029000000000031041b000000400100043d000000200210003900000000003204350000000b020000290000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d9040000410000000e050000290e040dfa0000040f0000000101200190000005d70000c13d00000a3c0000013d000000400100043d000003d202000041000000000021043500000004021000390000000000520435000003820210009c00000382010080410000004001100210000003d3011001c700000e06000104300000000001000415000000100110008a0008000500100218001000000000001d000003c2010000410000000000100439000000000100041000000004001004430000000001000414000003820210009c0000038201008041000000c001100210000003c3011001c700008002020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000000101004b000007890000c13d0000000901000029000000ff0110018f000000010110008c0000000001000019000000010100603900000008020000290000000502200270000000000201001f0000078c0000c13d0000000903000029000004010130019700000001021001bf000003c60130019700000101011001bf000000010300006b000000000102c019000000000010041b0000000e0200006b000007960000c13d000000400100043d000003e502000041000001ef0000013d00000008010000290000000501100270000000000100001f000000400100043d0000006402100039000003c40300004100000000003204350000004402100039000003c503000041000000000032043500000024021000390000002e030000390000022c0000013d0000ff0001100190000007b00000c13d000000400100043d0000006402100039000003de0300004100000000003204350000004402100039000003df03000041000000000032043500000024021000390000002b030000390000022c0000013d000000400100043d000003da020000410000000000210435000000040210003900000a500000013d000000400200043d00000024032000390000000000130435000003db01000041000000000012043500000004012000390000000d030000290000000000310435000003700000013d0000006501000039000000000201041a000003be02200197000000000021041b0000000001000411000003bc061001970000003301000039000000000201041a000003be03200197000000000363019f000000000031041b0000000001000414000003bc05200197000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410e040dfa0000040f000000010120019000000a3c0000613d000000400100043d000000000200041a0000ff0002200190000007990000613d0000009702000039000000000302041a000003be043001970000000e05000029000000000454019f000000000042041b00000020021000390000000000520435000003bc023001970000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003c9040000410e040dfa0000040f000000010120019000000a3c0000613d000000c901000039000000000201041a0000040102200197000000000021041b000000400100043d000000fb02000039000000000202041a00000084030000390000000103300367000000000303043b000000000432004b0000081b0000813d000000fb04000039000000000034041b000000200410003900000000003404350000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003cc040000410e040dfa0000040f000000010120019000000a3c0000613d000000fb01000039000000000101041a0000000d0210006c000008240000813d000000400200043d00000024032000390000000d040000290000036b0000013d000000400200043d0000001f0430018f0000000505300272000008180000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000008140000c13d000000000604004b000005b40000613d000005260000013d0000006402100039000003ca0300004100000000003204350000004402100039000003cb030000410000000000320435000000240210003900000022030000390000022c0000013d0000000b020000290000000d0120006b000007860000c13d0000000a020000290000000d0120006b000007860000c13d0000000d0100006b000008400000c13d000000010100006b000004650000c13d000000000200041a0000040201200197000000000010041b000000400100043d00000001030000390000000000310435000003820210009c000003820100804100000040011002100000000002000414000003820420009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000038d04000041000004620000013d000a00000000001d000008470000013d0000000a020000290000000102200039000a00000002001d0000000d0120006c0000082c0000813d0000000a010000290000000502100210000900000002001d0000000c01200029000b00000001001d0000000101100367000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000000e0100006b000007860000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000008730000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f00000001022001900000087e0000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000800000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000000000202004b00000a580000c13d0000000802000029000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000203000039000003d4040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d00000001010003670000000b02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d00000009030000290000000602300029000000000121034f000000000101043b000800000001001d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000400200043d0000002003200039000000080400002900000000004304350000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d5040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000802000029000000000021041b00000001010003670000000b02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d00000009030000290000000702300029000000000121034f000000000101043b000b00000001001d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000201043b000000000102041a000000000301004b000008fc0000c13d000003d601000041000000000012041b0000000b0210006c00000a5b0000413d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000900000002001d0000000b0120006c000008420000613d0000000e0100006b000007860000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b00000a4b0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000009430000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f00000001022001900000094e0000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000800000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000400000002001d000000080120006b00000a170000613d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000300000001001d000000400200043d000003d7010000410000000001120436000200000001001d000500000002001d00000004012000390000000002000410000000000021043500000000010004140000000e02000029000000040220008c000009810000c13d0000000003000031000000200130008c00000020040000390000000004034019000009af0000013d0000000503000029000003820230009c000003820200004100000000020340190000004002200210000003820310009c0000038201008041000000c001100210000000000121019f000003d3011001c70000000e020000290e040dff0000040f000000000301001900000060033002700000038203300197000000200430008c00000020040000390000000004034019000000050540027200000002090000290000099c0000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000897004b000009980000c13d0000001f06400190000009ab0000613d0000000505500210000000000751034f00000005055000290000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000000a630000613d0000001f01400039000000600210018f0000000501200029000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d00000005010000290000000001010433000500000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000050210006b00000a520000413d000000030200006b00000a070000613d000000050210006b00000a070000613d0000000403000029000000080230006900040003302000bd00000004322000f9000000030220006b00000a520000c13d00050005001000710000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000505000029000000040350006c00000004050080290000000004050019000000010220019000000a3c0000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000a520000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d8040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000802000029000000000021041b0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000b03000029000000000031041b000000400100043d0000002002100039000000000032043500000009020000290000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d9040000410000000e050000290e040dfa0000040f0000000101200190000008420000c13d000000000100001900000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000000001042f000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000000400100043d000003da02000041000000000021043500000004021000390000000e0300002900000000003204350000075a0000013d000003e30100004100000000001004350000001101000039000000040010043f000003d30100004100000e0600010430000000400100043d000003d20200004100000a4d0000013d000000400200043d00000024032000390000000000130435000003db01000041000000000012043500000004012000390000000b03000029000007ae0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000000a6f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000a6b0000c13d000000000604004b000005b40000613d000005a80000013d0006000000000002000003bc0110019800000b770000613d000600000001001d00000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000101041a000000000101004b00000b7f0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000b760000613d000000000101043b000000010210008c00000a9e0000613d000000020110008c00000b900000c13d000003d1010000410000000000100439000000000100041400000aa10000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000b760000613d000000000101043b000500000001001d000000060100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000201041a000000050120006b00000abd0000c13d000000000001042d000200000002001d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000101041a000400000001001d000000400a00043d000003d70100004100000000051a04360000000401a000390000000002000410000000000021043500000000010004140000000602000029000000040320008c00000adb0000c13d0000000003000031000000200130008c0000002004000039000000000403401900000b0b0000013d0000038203a0009c000003820300004100000000030a40190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c700030000000a001d000100000005001d0e040dff0000040f000000010b000029000000030a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200000af80000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00000af40000c13d000000000705004b00000b070000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000000b9c0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000003c10410009c00000b960000213d000000010220019000000b960000c13d000000400010043f000000200130008c00000b740000413d00000000010a0433000300000001001d000000060100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000305000029000000010220019000000b740000613d000000000101043b000000000101041a000000000215004b00000b8a0000413d000000040200006b00000b630000613d000000000215004b00000b630000613d0000000203000029000000050230006900020004302000bd00000002322000f9000000040220006b00000b8a0000c13d0004000000150051000000060100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000205000029000000040350006b00000000040500190000000404004029000000010220019000000b740000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000b8a0000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d80400004100000006050000290e040dfa0000040f000000010120019000000b740000613d000000060100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b0000000502000029000000000021041b000000000001042d000000000100001900000e0600010430000000000001042f000000400100043d000003e5020000410000000000210435000003820210009c0000038201008041000000400110021000000385011001c700000e0600010430000000400100043d000003da020000410000000000210435000000040210003900000006030000290000000000320435000003820210009c00000382010080410000004001100210000003d3011001c700000e0600010430000003e30100004100000000001004350000001101000039000000040010043f000003d30100004100000e0600010430000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000400200043d0000001f0430018f0000000505300272000000050550021000000ba80000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000ba40000c13d000000000604004b00000bb60000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000121019f00000e06000104300002000000000002000000400400043d00000044054000390000000000350435000000200340003900000403050000410000000000530435000003bc022001970000002405400039000000000025043500000044020000390000000000240435000004040240009c00000c4a0000813d0000008009400039000003bc0a100197000000400090043f000004050190009c00000c4a0000213d000000c001400039000000400010043f00000020010000390000000000190435000000a00140003900000406020000410000000000210435000000000204043300000000010004140000000404a0008c00000c080000c13d00000001020000390000000001000031000000000301004b00000c200000613d0000001f031000390000040b033001970000003f033000390000040b03300197000000400c00043d00000000033c00190000000004c3004b00000000040000190000000104004039000003c10530009c00000c4a0000213d000000010440019000000c4a0000c13d000000400030043f0000001f0310018f000000000b1c043600000002040003670000000501100272000000050110021000000bf90000613d00000000051b0019000000000604034f00000000070b0019000000006806043c0000000007870436000000000857004b00000bf50000c13d000000000503004b00000c220000613d000000000414034f00000000011b00190000000303300210000000000501043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f000000000031043500000c220000013d000003820430009c00000382030080410000004003300210000003820420009c00000382020080410000006002200210000000000232019f000003820310009c0000038201008041000000c001100210000000000112019f00000000020a0019000200000009001d00010000000a001d0e040dfa0000040f000000010a0000290000000209000029000000010220018f00020000000103550000006001100270000003820010019d0000038201100197000000000301004b00000bde0000c13d000000600c000039000000800b00003900000000040c0433000000000202004b00000c520000613d000000000204004b00000c3d0000c13d00020000000c001d00010000000b001d000003c20100004100000000001004390000000400a004430000000001000414000003820210009c0000038201008041000000c001100210000003c3011001c700008002020000390e040dff0000040f000000010220019000000c840000613d000000000101043b000000000101004b000000020100002900000c850000613d0000000004010433000000000204004b000000010b00002900000c490000613d000004070240009c00000c500000213d0000001f0140008c00000c500000a13d00000000010b0433000000000201004b0000000002000019000000010200c039000000000221004b00000c500000c13d000000000101004b00000c680000613d000000000001042d000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000000100001900000e06000104300000000001090019000000000204004b00000c7c0000c13d000000400400043d000200000004001d0000038a02000041000000000024043500000004034000390000002002000039000000000023043500000024024000390e040c960000040f00000002030000290000000001310049000003820210009c0000038201008041000003820230009c000003820300804100000060011002100000004002300210000000000121019f00000e0600010430000000400100043d00000064021000390000040803000041000000000032043500000044021000390000040903000041000000000032043500000024021000390000002a0300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c000003820100804100000040011002100000038b011001c700000e06000104300000038202b0009c000003820b0080410000004002b00210000003820340009c00000382040080410000006001400210000000000121019f00000e0600010430000000000001042f000000400100043d00000044021000390000040a03000041000000000032043500000024021000390000001d0300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c00000382010080410000004001100210000003eb011001c700000e060001043000000000430104340000000001320436000000000203004b00000ca20000613d000000000200001900000000052100190000000006240019000000000606043300000000006504350000002002200039000000000532004b00000c9b0000413d000000000231001900000000000204350000001f023000390000040b022001970000000001210019000000000001042d000300000000000200000000080100190000009701000039000000000201041a000000400a00043d0000002401a00039000000400300003900000000003104350000040c01000041000000000b1a04360000000401a000390000000009000411000000000091043500000000430804340000004401a0003900000000003104350000006401a00039000003bc02200197000000000503004b00000cc40000613d000000000500001900000000061500190000000007540019000000000707043300000000007604350000002005500039000000000635004b00000cbd0000413d000000000431001900000000000404350000000004000414000000040520008c00000cce0000c13d0000000003000031000000200130008c0000002004000039000000000403401900000d080000013d000100000008001d0000001f033000390000040b033001970000000003a300490000000001130019000003820310009c000003820100804100000060011002100000038203a0009c000003820300004100000000030a40190000004003300210000000000131019f000003820340009c0000038204008041000000c003400210000000000131019f00030000000a001d00020000000b001d0e040dff0000040f000000020b000029000000030a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200000cf30000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00000cef0000c13d000000000705004b00000d020000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000000000900041100000d3e0000613d00000001080000290000001f01400039000000600110018f0000000004a10019000000000114004b00000000010000190000000101004039000003c10240009c00000d200000213d000000010110019000000d200000c13d000000400040043f0000001f0130008c00000d1e0000a13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b00000d1e0000c13d000000000101004b00000d260000613d000000000001042d000000000100001900000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e06000104300000004401400039000000600200003900000000002104350000002401400039000000000200041000000000002104350000040d0100004100000000001404350000000401400039000000000091043500000064024000390000000001080019000300000004001d0e040c960000040f00000003030000290000000001310049000003820210009c0000038201008041000003820230009c000003820300804100000060011002100000004002300210000000000121019f00000e0600010430000000400200043d0000001f0430018f0000000505300272000000050550021000000d4a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d460000c13d000000000604004b00000d580000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000112019f00000e06000104300000006502000039000000000302041a000003be03300197000000000032041b000003bc061001970000003301000039000000000201041a000003be03200197000000000363019f000000000031041b0000000001000414000003bc05200197000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410e040dfa0000040f000000010120019000000d750000613d000000000001042d000000000100001900000e0600010430000000400200043d000000fb04000039000000000304041a000000000513004b00000d900000813d000000000014041b000000200420003900000000001404350000000000320435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003cc040000410e040dfa0000040f000000010120019000000da30000613d000000000001042d0000006401200039000003ca0300004100000000003104350000004401200039000003cb0300004100000000003104350000002401200039000000220300003900000000003104350000038a010000410000000000120435000000040120003900000020030000390000000000310435000003820120009c000003820200804100000040012002100000038b011001c700000e0600010430000000000100001900000e0600010430000000010210008c00000db60000613d000000020110008c00000dc40000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000dc30000613d000000000101043b000000000001042d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000dc30000613d000000000101043b000000000001042d000000000001042f000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000000000001042f0000000002000414000003820320009c0000038202008041000000c002200210000003820310009c00000382010080410000004001100210000000000121019f000003c8011001c700008010020000390e040dff0000040f000000010220019000000dda0000613d000000000101043b000000000001042d000000000100001900000e060001043000000000050100190000000000200439000000050130008c00000dea0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000631004b00000de20000413d000003820130009c000003820300804100000060013002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000040e011001c700000000020500190e040dff0000040f000000010220019000000df90000613d000000000101043b000000000001042d000000000001042f00000dfd002104210000000102000039000000000001042d0000000002000019000000000001042d00000e02002104230000000102000039000000000001042d0000000002000019000000000001042d00000e040000043200000e050001042e00000e0600010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe009c8f7ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380ae0fcab300000000000000000000000000000000000000000000000000000000616c697a696e6700000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e69746908c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000002000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249800000002000000000000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000093920bf700000000000000000000000000000000000000000000000000000000c7ad089400000000000000000000000000000000000000000000000000000000e30c397700000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fa7781ff00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000e458a65d00000000000000000000000000000000000000000000000000000000ce82e84000000000000000000000000000000000000000000000000000000000ce82e84100000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000c7ee005e00000000000000000000000000000000000000000000000000000000b4a0bdf200000000000000000000000000000000000000000000000000000000be26317d00000000000000000000000000000000000000000000000000000000be26317e00000000000000000000000000000000000000000000000000000000c32094c700000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000bc2f7dc3000000000000000000000000000000000000000000000000000000009dd5428d000000000000000000000000000000000000000000000000000000009dd5428e00000000000000000000000000000000000000000000000000000000a666642b0000000000000000000000000000000000000000000000000000000093920bf8000000000000000000000000000000000000000000000000000000009d3cc54300000000000000000000000000000000000000000000000000000000637c9b4d0000000000000000000000000000000000000000000000000000000079ba5096000000000000000000000000000000000000000000000000000000008aadf798000000000000000000000000000000000000000000000000000000008aadf799000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000079ba50970000000000000000000000000000000000000000000000000000000080d45a2d000000000000000000000000000000000000000000000000000000006857249b000000000000000000000000000000000000000000000000000000006857249c00000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000637c9b4e0000000000000000000000000000000000000000000000000000000064aff9ec000000000000000000000000000000000000000000000000000000003131b064000000000000000000000000000000000000000000000000000000005a38f84c000000000000000000000000000000000000000000000000000000005a38f84d000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000003131b0650000000000000000000000000000000000000000000000000000000043bf7283000000000000000000000000000000000000000000000000000000000e32cb8600000000000000000000000000000000000000000000000000000000192e7a7b00000000000000000000000000000000000000000000000000000000231f82bb000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000038d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700000000000000000000000000000000000000000000000000ffffffffffffffff1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0020000000000000000000000000000000000004000000000000000000000000066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa06974000000000000000000000000000000000000000000000000000000000000436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696dc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd1076a39d6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000cf6e06116a82c1b468912f23d8bb1d126edbb21bc0864d6d5169e3be39b1a8182351eb1e51f0d96d3d2dc08e3c9bddbdb2153580843330b57433c3bf5031be010000000000000000000000000000000000000000000000000de0b6b3a764000070a0823100000000000000000000000000000000000000000000000000000000fe854c4c4e633d5bb31aec1f39f01d9f8f01ad2e0212a0e576825ac986af05892a139b40b9bf8c89ae5053746323912620b9d8ea3b076b098b1bc57702abf3a541ea4b590000000000000000000000000000000000000000000000000000000039f1e9ba000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000f257f636000000000000000000000000000000000000000000000000000000006e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420690000000000000000000000000000000000000020000000000000000000000000736574546f6b656e73446973747269627574696f6e537065656428616464726573735b5d2c75696e743235365b5d2900000000000000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000cf4d0ac7a2f943727f0189dd1f26ba0cde29a1b14f222163ac866d4f5167db945f6f132c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000080000000000000000080ae98f500000000000000000000000000000000000000000000000000000000726573756d6546756e64735472616e73666572282900000000000000000000005db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5061757361626c653a206e6f742070617573656400000000000000000000000000000000000000000000000000000000000000640000000000000000000000007365744d6178546f6b656e73446973747269627574696f6e537065656428616464726573735b5d2c75696e743235365b5d2900000000000000000000000000007365744d61784c6f6f70734c696d69742875696e7432353629000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000000000000000000000000000000000000000000240000008000000000000000006d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5cf47918100000000000000000000000000000000000000000000000000000000706175736546756e64735472616e7366657228290000000000000000000000005061757361626c653a207061757365640000000000000000000000000000000062e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258000000000000000000000000000000000000004400000080000000000000000048f5c3ed00000000000000000000000000000000000000000000000000000000f4eaf50100000000000000000000000000000000000000000000000000000000a80c25cc8959419d41ee66f93961c567b272badc10e0e117261a0ee31b55c3124f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000640000008000000000000000000200000000000000000000000000000000000040000000800000000000000000696e76616c696420616365737320636f6e74726f6c206d616e616765722061646472657373000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffa9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff80000000000000000000000000000000000000000000000000ffffffffffffffbf5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe018c5e8ab000000000000000000000000000000000000000000000000000000004a3fa2930000000000000000000000000000000000000000000000000000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000269b953726e29823f625962bae216aed238a7f617a7383c4028f04e79483a579", + "devdoc": { + "author": "Venus", + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "accrueTokens(address)": { + "custom:event": "Emits TokensAccrued event", + "params": { + "token_": "Address of the token" + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "getBlockNumberOrTimestamp()": { + "details": "Function to simply retrieve block number or block timestamp", + "returns": { + "_0": "Current block number or block timestamp" + } + }, + "getEffectiveDistributionSpeed(address)": { + "params": { + "token_": "Address of the token" + }, + "returns": { + "_0": "speed returns the per block or second reward" + } + }, + "initialize(address,address[],uint256[],uint256[],uint256)": { + "custom:error": "Throw InvalidArguments on different length of tokens and speeds array", + "details": "Initializes the deployer to owner", + "params": { + "accessControlManager_": "AccessControlManager contract address", + "distributionSpeeds_": "New distribution speeds for tokens", + "loopsLimit_": "Maximum number of loops allowed in a single transaction", + "tokens_": "Array of addresses of the tokens" + } + }, + "initializeTokens(address[])": { + "custom:access": "Only Governance", + "params": { + "tokens_": "Array of addresses of the tokens to be intialized" + } + }, + "lastAccruedBlock(address)": { + "params": { + "token_": "Address of the token" + }, + "returns": { + "_0": "blockNumberOrSecond returns the last accrued block or second" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pauseFundsTransfer()": { + "custom:access": "Controlled by ACM" + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "pendingOwner()": { + "details": "Returns the address of the pending owner." + }, + "releaseFunds(address)": { + "custom:error": "Throw InvalidArguments on Zero address(token)Throw FundsTransferIsPaused is pausedThrow InvalidCaller if the sender is not the Prime contract", + "custom:event": "Emits TokenTransferredToPrime event", + "params": { + "token_": "The token to release to the Prime contract" + } + }, + "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." + }, + "resumeFundsTransfer()": { + "custom:access": "Controlled by ACM" + }, + "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" + } + }, + "setMaxLoopsLimit(uint256)": { + "custom:access": "Controlled by ACM", + "custom:event": "Emits MaxLoopsLimitUpdated event on success", + "params": { + "loopsLimit": "Limit for the max loops can execute at a time" + } + }, + "setMaxTokensDistributionSpeed(address[],uint256[])": { + "custom:access": "Controlled by ACM", + "custom:error": "Throw InvalidArguments on different length of tokens and speeds array", + "params": { + "maxDistributionSpeeds_": "New distribution speeds for tokens", + "tokens_": "Array of addresses of the tokens" + } + }, + "setPrimeToken(address)": { + "custom:access": "Only owner", + "custom:event": "Emits PrimeTokenUpdated event", + "params": { + "prime_": "The new address of the prime token contract" + } + }, + "setTokensDistributionSpeed(address[],uint256[])": { + "custom:access": "Controlled by ACM", + "custom:error": "Throw InvalidArguments on different length of tokens and speeds array", + "params": { + "distributionSpeeds_": "New distribution speeds for tokens", + "tokens_": "Array of addresses of the tokens" + } + }, + "sweepToken(address,address,uint256)": { + "custom:access": "Only Governance", + "custom:error": "Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract", + "custom:event": "Emits SweepToken event", + "params": { + "amount_": "The amount of tokens needs to transfer", + "to_": "The address of the recipient", + "token_": "The address of the ERC-20 token to sweep" + } + }, + "tokenAmountAccrued(address)": { + "params": { + "token_": "Address of the token" + }, + "returns": { + "_0": "returns the amount of accrued tokens for the token provided" + } + }, + "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." + } + }, + "title": "PrimeLiquidityProvider", + "version": 1 + }, + "userdoc": { + "errors": { + "AddressesMustDiffer()": [ + { + "notice": "Error thrown when argument value in setter is same as previous value" + } + ], + "FundsTransferIsPaused()": [ + { + "notice": "Error thrown when funds transfer is paused" + } + ], + "InsufficientBalance(uint256,uint256)": [ + { + "notice": "Error thrown when PrimeLiquidityProvider's balance is less than sweep amount" + } + ], + "InvalidArguments()": [ + { + "notice": "Thrown when arguments are passed are invalid" + } + ], + "InvalidBlocksPerYear()": [ + { + "notice": "Thrown when blocks per year is invalid" + } + ], + "InvalidCaller()": [ + { + "notice": "Thrown when caller is not the desired caller" + } + ], + "InvalidDistributionSpeed(uint256,uint256)": [ + { + "notice": "Thrown when distribution speed is greater than maxTokenDistributionSpeeds[tokenAddress]" + } + ], + "InvalidTimeBasedConfiguration()": [ + { + "notice": "Thrown when time based but blocks per year is provided" + } + ], + "MaxLoopsLimitExceeded(uint256,uint256)": [ + { + "notice": "Thrown an error on maxLoopsLimit exceeds for any loop" + } + ], + "TokenAlreadyInitialized(address)": [ + { + "notice": "Thrown when token is initialized" + } + ], + "TokenNotInitialized(address)": [ + { + "notice": "Error thrown when accrueTokens is called for an uninitialized token" + } + ], + "Unauthorized(address,address,string)": [ + { + "notice": "Thrown when the action is prohibited by AccessControlManager" + } + ] + }, + "events": { + "MaxLoopsLimitUpdated(uint256,uint256)": { + "notice": "Emitted when max loops limit is set" + }, + "MaxTokenDistributionSpeedUpdated(address,uint256,uint256)": { + "notice": "Emitted when a new max distribution speed for token is set" + }, + "NewAccessControlManager(address,address)": { + "notice": "Emitted when access control manager contract address is changed" + }, + "PrimeTokenUpdated(address,address)": { + "notice": "Emitted when prime token contract address is changed" + }, + "SweepToken(address,address,uint256)": { + "notice": "Emitted on sweep token success" + }, + "TokenDistributionInitialized(address)": { + "notice": "Emitted when a token distribution is initialized" + }, + "TokenDistributionSpeedUpdated(address,uint256,uint256)": { + "notice": "Emitted when a new token distribution speed is set" + }, + "TokenTransferredToPrime(address,uint256)": { + "notice": "Emitted when token is transferred to the prime contract" + }, + "TokensAccrued(address,uint256)": { + "notice": "Emitted when distribution state(Index and block or second) is updated" + } + }, + "kind": "user", + "methods": { + "DEFAULT_MAX_DISTRIBUTION_SPEED()": { + "notice": "The default max token distribution speed" + }, + "accessControlManager()": { + "notice": "Returns the address of the access control manager contract" + }, + "accrueTokens(address)": { + "notice": "Accrue token by updating the distribution state" + }, + "blocksOrSecondsPerYear()": { + "notice": "Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored" + }, + "getEffectiveDistributionSpeed(address)": { + "notice": "Get rewards per block or second for token" + }, + "initialize(address,address[],uint256[],uint256[],uint256)": { + "notice": "PrimeLiquidityProvider initializer" + }, + "initializeTokens(address[])": { + "notice": "Initialize the distribution of the token" + }, + "isTimeBased()": { + "notice": "Acknowledges if a contract is time based or not" + }, + "lastAccruedBlock(address)": { + "notice": "Get the last accrued block or second for token" + }, + "lastAccruedBlockOrSecond(address)": { + "notice": "The block or second till which rewards are distributed for an asset" + }, + "maxTokenDistributionSpeeds(address)": { + "notice": "The max token distribution speed for token" + }, + "pauseFundsTransfer()": { + "notice": "Pause fund transfer of tokens to Prime contract" + }, + "prime()": { + "notice": "Address of the Prime contract" + }, + "releaseFunds(address)": { + "notice": "Claim all the token accrued till last block or second" + }, + "resumeFundsTransfer()": { + "notice": "Resume fund transfer of tokens to Prime contract" + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of AccessControlManager" + }, + "setMaxLoopsLimit(uint256)": { + "notice": "Set the limit for the loops can iterate to avoid the DOS" + }, + "setMaxTokensDistributionSpeed(address[],uint256[])": { + "notice": "Set max distribution speed for token (amount of maximum token distribute per block or second)" + }, + "setPrimeToken(address)": { + "notice": "Set the prime token contract address" + }, + "setTokensDistributionSpeed(address[],uint256[])": { + "notice": "Set distribution speed (amount of token distribute per block or second)" + }, + "sweepToken(address,address,uint256)": { + "notice": "A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user" + }, + "tokenAmountAccrued(address)": { + "notice": "Get the tokens accrued" + }, + "tokenDistributionSpeeds(address)": { + "notice": "The rate at which token is distributed (per block or second)" + } + }, + "notice": "PrimeLiquidityProvider is used to fund Prime", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 244, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 247, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1503, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 116, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 236, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 25, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 104, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 5991, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_accessControlManager", + "offset": 0, + "slot": "151", + "type": "t_contract(IAccessControlManagerV8)6176" + }, + { + "astId": 5996, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 427, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool" + }, + { + "astId": 532, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 6233, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "maxLoopsLimit", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 6238, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 22204, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "prime", + "offset": 0, + "slot": "301", + "type": "t_address" + }, + { + "astId": 22209, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "tokenDistributionSpeeds", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 22214, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "maxTokenDistributionSpeeds", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 22219, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "lastAccruedBlockOrSecond", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 22224, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "_tokenAmountAccrued", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 22229, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "306", + "type": "t_array(t_uint256)45_storage" + }, + { + "astId": 6319, + "contract": "contracts/Tokens/Prime/PrimeLiquidityProvider.sol:PrimeLiquidityProvider", + "label": "__gap", + "offset": 0, + "slot": "351", + "type": "t_array(t_uint256)48_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)48_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAccessControlManagerV8)6176": { + "encoding": "inplace", + "label": "contract IAccessControlManagerV8", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "factoryDeps": [ + "0x00030000000000020016000000000002000000000301001900000060033002700000038203300197000200000031035500010000000103550000000102200190000000210000c13d0000008002000039000000400020043f000000040230008c00000a3c0000413d000000000201043b000000e0022002700000038f0420009c000000520000a13d000003900420009c000000830000213d0000039c0420009c000000a40000213d000003a20420009c000001530000213d000003a50420009c000002820000613d000003a60220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000009d0000013d0000000002000416000000000202004b00000a3c0000c13d0000001f023000390000038302200197000000e002200039000000400020043f0000001f0230018f0000000504300272000000330000613d000000e0050000390000000506400210000000e006600039000000000701034f000000007807043c0000000005850436000000000865004b0000002f0000c13d000000000502004b000000420000613d0000000504400210000000000141034f0000000302200210000000e004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000400130008c00000a3c0000413d000000e00100043d000000000201004b0000000002000019000000010200c039000000000221004b00000a3c0000c13d000001000200043d000000000301004b000001310000613d000000000202004b000001ed0000c13d00000386020000410000000103000039000001f60000013d000003a70420009c000000900000a13d000003a80420009c000001180000213d000003ae0420009c000001c70000213d000003b10420009c000003970000613d000003b20220009c00000a3c0000c13d000000640230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000e03bc0020019b000d00000002001d000003bc0220009c00000a3c0000213d0000002402100370000000000202043b000c03bc0020019b000b00000002001d000003bc0220009c00000a3c0000213d0000004401100370000000000301043b0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d000003d701000041000000800010043f0000000001000410000000840010043f00000000010004140000000e02000029000000040420008c000a00000003001d000004de0000c13d0000000003000031000000200130008c00000020040000390000000004034019000005050000013d000003910420009c000000c00000213d000003970420009c000001800000213d0000039a0120009c000003070000613d0000039b0120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000012d01000039000003230000013d000003b30420009c000001360000a13d000003b40420009c000001480000213d000003b70420009c000002370000613d000003b80220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000013001000039000003a20000013d0000039d0420009c000001990000213d000003a00120009c0000031a0000613d000003a10120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001501000039000000800010043f000003e801000041000000a00010043f00000080010000390e040ca80000040f000000400100043d000000c902000039000000000302041a000000ff04300190000004520000c13d0000004402100039000003ea030000410000000000320435000000240210003900000014030000390000043b0000013d000003920420009c000001b70000213d000003950420009c0000031f0000613d000003960220009c00000a3c0000c13d000000a40230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000d00000004001d000003c10440009c00000a3c0000213d000c00240020003d0000000d0200002900000005022002100000000c02200029000000000232004b00000a3c0000213d0000004402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000b00000004001d000003c10440009c00000a3c0000213d000700240020003d0000000b0200002900000005022002100000000702200029000000000232004b00000a3c0000213d0000006402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000a00000001001d000003c10110009c00000a3c0000213d000600240020003d0000000a0100002900000005011002100000000601100029000000000131004b00000a3c0000213d000000000100041a000900000001001d0001ff00001001940000075f0000c13d0000000901000029000000ff0110019000000000020000190000000102006039000f00000002001d00000000020004150000000f0220008a0008000500200218000000000101004b000007630000c13d0000077c0000013d000003a90420009c000001e40000213d000003ac0120009c000003a90000613d000003ad0120009c00000a3c0000c13d000000240130008c00000a3c0000413d0000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001901000039000000800010043f000003ee01000041000000a00010043f00000080010000390e040ca80000040f00000004010000390000000101100367000000000101043b0e040d770000040f000000000100001900000e050001042e000000000302004b000001f50000c13d000000400100043d0000038402000041000001ef0000013d000003b90420009c000004100000613d000003ba0420009c000003d10000613d000003bb0220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000012e01000039000003a20000013d000003b50120009c000002600000613d000003b60120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d000000c901000039000000000101041a000000ff01100190000003150000013d000003a30420009c000003280000613d000003a40220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000d00000001001d000000400a00043d000003d70100004100000000051a04360000000401a000390000000002000410000000000021043500000000010004140000000e02000029000000040320008c0000046b0000c13d0000000003000031000000200130008c000000200400003900000000040340190000049b0000013d000003980420009c0000032f0000613d000003990120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000000001000412001200000001001d001100400000003d000080050100003900000044030000390000000004000415000000120440008a0000000504400210000003cd020000410e040ddc0000040f0e040da50000040f000000400200043d0000000000120435000003820120009c00000382020080410000004001200210000003e0011001c700000e050001042e0000039e0420009c000003750000613d0000039f0220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d0000012d01000039000000000201041a000003bc052001970000000e06000029000000000156004b000004c30000c13d000003e701000041000000800010043f000003e60100004100000e0600010430000003930420009c0000037a0000613d000003940220009c00000a3c0000c13d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000013101000039000003a20000013d000003af0120009c000003b50000613d000003b00120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000003301000039000000000201041a000003bc052001970000000003000411000000000335004b0000042d0000c13d0000006503000039000000000403041a000003be04400197000000000043041b000003be02200197000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410000000006000019000004620000013d000003aa0420009c000003c50000613d000003ab0120009c00000a3c0000c13d0000000001000416000000000101004b00000a3c0000c13d0000003301000039000003230000013d000000400100043d00000387020000410000000000210435000003820210009c0000038201008041000000400110021000000385011001c700000e06000104300000000203000039000000a00010043f000000800020043f000000c00030043f000000000400041a0000ff0005400190000002230000c13d000000ff0540018f000000ff0550008c000002160000613d000000ff014001bf000000000010041b000000ff01000039000000400200043d0000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d0200003900000001030000390000038d040000410e040dfa0000040f000000010120019000000a3c0000613d000000c00300043d000000a00100043d000000800200043d0000014000000443000001600020044300000020020000390000018000200443000001a0001004430000004001000039000001c000100443000001e0003004430000010000200443000000030100003900000120001004430000038e0100004100000e050001042e000000400100043d0000006402100039000003880300004100000000003204350000004402100039000003890300004100000000003204350000002402100039000000270300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c000003820100804100000040011002100000038b011001c700000e0600010430000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000b00000001001d000003c10110009c00000a3c0000213d000a00240020003d0000000b0100002900000005011002100000000a01100029000000000131004b00000a3c0000213d0000003301000039000000000101041a000003bc011001970000000002000411000000000121004b0000042d0000c13d000000fb01000039000000000101041a0000000b03000029000000000231004b0000053b0000813d000003dd02000041000000800020043f000000840010043f000000a40030043f000003f80100004100000e06000104300000000001000416000000000101004b00000a3c0000c13d000000c001000039000000400010043f0000001401000039000000800010043f000003f501000041000000a00010043f00000080010000390e040ca80000040f000000400100043d000000c902000039000000000302041a000000ff04300190000004360000c13d000004010330019700000001033001bf000000000032041b00000000020004110000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000103000039000003f704000041000004620000013d000000440230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000003c10440009c00000a3c0000213d000b00240020003d0000000e0200002900000005022002100000000b02200029000000000232004b00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000a00000001001d000003c10110009c00000a3c0000213d000900240020003d0000000a0100002900000005011002100000000901100029000000000131004b00000a3c0000213d000000e001000039000000400010043f0000003201000039000000800010043f000003ec01000041000000a00010043f000003ed01000041000000c00010043f00000080010000390e040ca80000040f000000fb01000039000000000101041a0000000e0210006c000003680000413d0000000e020000290000000a0120006c000007860000c13d0000000a0100006b000004650000613d000e00000000001d0000000e0100002900000005011002100000000b031000290000000102000367000000000332034f000000000403043b000003bc0340009c00000a3c0000213d0000000901100029000000000112034f000000000101043b000c00000001001d00000000004004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c70000801002000039000d00000004001d0e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000400200043d00000020032000390000000c0400002900000000004304350000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d5040000410000000d050000290e040dfa0000040f0000000d03000029000000010120019000000a3c0000613d00000000003004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000c02000029000000000021041b0000000e020000290000000102200039000e00000002001d0000000a0120006c000002c10000413d000004650000013d0000000001000416000000000101004b00000a3c0000c13d0000000001000412001400000001001d001300200000003d000080050100003900000044030000390000000004000415000000140440008a0000000504400210000003cd020000410e040ddc0000040f000000000101004b0000000001000019000000010100c039000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000009701000039000003230000013d0000000001000416000000000101004b00000a3c0000c13d0000006501000039000000000101041a000003bc01100197000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d000003d601000041000000800010043f000003bd0100004100000e050001042e000000440230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000441034f000000000404043b000e00000004001d000003c10440009c00000a3c0000213d000900240020003d0000000e0200002900000005022002100000000902200029000000000232004b00000a3c0000213d0000002402100370000000000202043b000003c10420009c00000a3c0000213d0000002304200039000000000434004b00000a3c0000813d0000000404200039000000000141034f000000000101043b000800000001001d000003c10110009c00000a3c0000213d000700240020003d000000080100002900000005011002100000000701100029000000000131004b00000a3c0000213d000000e001000039000000400010043f0000002f01000039000000800010043f000003e101000041000000a00010043f000003e201000041000000c00010043f00000080010000390e040ca80000040f000000fb01000039000000000101041a0000000e0210006c000005d00000813d000000400200043d00000024032000390000000e040000290000000000430435000003dd03000041000000000032043500000004032000390000000000130435000003820120009c00000382020080410000004001200210000003dc011001c700000e06000104300000000001000416000000000101004b00000a3c0000c13d000000fb01000039000003a50000013d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000601043b000003bc0160009c00000a3c0000213d0000003301000039000000000101041a000003bc051001970000000001000411000000000115004b0000042d0000c13d0000006501000039000000000201041a000003be02200197000000000262019f000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c004000041000004620000013d000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d00000000001004350000012f01000039000000200010043f00000000010000190e040dcb0000040f000000000101041a000000800010043f000003bd0100004100000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000006501000039000000000101041a000003bc021001970000000001000411000000000212004b000004460000c13d0e040d5e0000040f000000000100001900000e050001042e0000000001000416000000000101004b00000a3c0000c13d0000000001000412001600000001001d001500000000001d000080050100003900000044030000390000000004000415000000160440008a0000000504400210000003cd020000410e040ddc0000040f000000800010043f000003bd0100004100000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d0e040a720000040f000000000100001900000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000012d01000039000000000101041a000003bc011001970000000002000411000000000112004b000004670000c13d000000c901000039000000000101041a000000ff01100190000004c90000c13d0000000e010000290e040a720000040f0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000000000001041b000000400100043d000d00000002001d0000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003fb040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000020004110000000d030000290e040bbc0000040f000000000100001900000e050001042e000000240230008c00000a3c0000413d0000000002000416000000000202004b00000a3c0000c13d0000000401100370000000000101043b000003bc0210009c00000a3c0000213d0000003302000039000000000202041a000003bc022001970000000003000411000000000232004b0000042d0000c13d000000000201004b000004cd0000c13d0000038a01000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f000003ff01000041000000c40010043f0000040001000041000000e40010043f000003f10100004100000e06000104300000038a01000041000000800010043f0000002001000039000000840010043f000000a40010043f000003fc01000041000000c40010043f000003fd0100004100000e06000104300000004402100039000003f60300004100000000003204350000002402100039000000100300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c00000382010080410000004001100210000003eb011001c700000e06000104300000038a01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000003ef01000041000000c40010043f000003f001000041000000e40010043f000003f10100004100000e06000104300000040103300197000000000032041b00000000020004110000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000103000039000003e9040000410e040dfa0000040f000000010120019000000a3c0000613d000000000100001900000e050001042e000003f901000041000000800010043f000003e60100004100000e06000104300000038203a0009c000003820300004100000000030a40190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c7000c0000000a001d000b00000005001d0e040dff0000040f0000000b0b0000290000000c0a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000004880000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000004840000c13d000000000705004b000004970000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000005180000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d00000000010a0433000c00000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a0000000c0110006b00000000020000190000000d02002029000000400100043d0000000000210435000003820210009c00000382010080410000004001100210000003e0011001c700000e050001042e000000000106004b000005280000c13d000003e501000041000000800010043f000003e60100004100000e0600010430000003fa01000041000000800010043f000003e60100004100000e06000104300000009702000039000000000302041a000003be04300197000000000414019f000000000042041b000003bc02300197000000800020043f000000a00010043f0000000001000414000003820210009c0000038201008041000000c001100210000003fe011001c70000800d020000390000000103000039000003c904000041000004620000013d000003820310009c0000038201008041000000c001100210000003f2011001c70e040dff0000040f0000008009000039000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000004f20000613d000000000701034f000000007807043c0000000009890436000000a00890008c000004ee0000c13d000000000705004b000005010000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000059a0000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200330008c00000a3c0000413d000000800300043d0000000a05000029000000000435004b000005ba0000a13d000003f404000041000000000041043500000084042001bf0000000000540435000000a40220003900000000003204350000004001100210000003dc011001c700000e0600010430000000400200043d0000001f0430018f0000000505300272000005240000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005200000c13d000000000604004b000005b40000613d0000000505500210000005a80000013d000d00000002001d0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003e4040000410e040dfa0000040f000000010120019000000a3c0000613d0000000d01000029000003be011001970000000e011001af0000012d02000039000000000012041b000000000100001900000e050001042e000000000103004b000004650000613d000e00000000001d0000000e0100002900000005011002100000000a011000290000000101100367000000000201043b000003bc0120009c00000a3c0000213d000d00000002001d000000000102004b000007860000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000005680000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000005730000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d0000000d02000029000000000101043b000c00000001001d00000000002004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000d05000029000000010220019000000a3c0000613d000000000101043b000000000201041a000000000202004b000007550000c13d0000000c02000029000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000203000039000003d4040000410e040dfa0000040f000000010120019000000a3c0000613d0000000e020000290000000102200039000e00000002001d0000000b0120006c0000053e0000413d000004650000013d000000400200043d0000001f0430018f00000005053002720000000505500210000005a60000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000005a20000c13d000000000604004b000005b40000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000112019f00000e0600010430000000000051043500000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000303000039000003f3040000410000000e050000290000000c060000290e040dfa0000040f000000010120019000000a3c0000613d0000000d010000290000000b020000290000000a030000290e040bbc0000040f000000000100001900000e050001042e0000000e02000029000000080120006c000007860000c13d000000080100006b000004650000613d000c00000000001d000005dc0000013d0000000c020000290000000102200039000c00000002001d000000080120006c000004650000813d0000000c010000290000000502100210000b00000002001d0000000901200029000d00000001001d0000000101100367000000000301043b000003bc0130009c00000a3c0000213d00000000003004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c70000801002000039000e00000003001d0e040dff0000040f0000000e03000029000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b000007a20000613d00000001010003670000000d02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d0000000b030000290000000702300029000000000121034f000000000101043b000d00000001001d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000201043b000000000102041a000000000301004b000006150000c13d000003d601000041000000000012041b0000000d0210006c0000000e02000029000007a70000413d00000000002004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000b00000002001d0000000d0120006c000005d70000613d0000000e02000029000000000102004b000007860000613d00000000002004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b00000a4b0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c0000065c0000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f0000000102200190000006670000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000a00000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a0000000a0120006b0000072f0000613d000400000002001d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000600000001001d000000400900043d000003d701000041000000000519043600000004019000390000000002000410000000000021043500000000010004140000000e02000029000000040320008c000006980000c13d0000000003000031000000200130008c00000020040000390000000004034019000006c70000013d000003820390009c000003820300004100000000030940190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c7000500000009001d000300000005001d0e040dff0000040f000000030a0000290000000509000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000000505400272000006b40000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000006b00000c13d0000001f06400190000006c30000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000080c0000613d0000001f01400039000000600210018f0000000001920019000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d0000000001090433000500000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000505000029000000010220019000000a3c0000613d000000000101043b000000000101041a000000000215004b00000a520000413d000000060200006b0000071f0000613d000000000215004b0000071f0000613d00000004030000290000000a0230006900040006302000bd00000004322000f9000000060220006b00000a520000c13d00060000001500510000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000405000029000000060350006b00000000040500190000000604004029000000010220019000000a3c0000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000a520000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d8040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000a02000029000000000021041b0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000d03000029000000000031041b000000400100043d000000200210003900000000003204350000000b020000290000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d9040000410000000e050000290e040dfa0000040f0000000101200190000005d70000c13d00000a3c0000013d000000400100043d000003d202000041000000000021043500000004021000390000000000520435000003820210009c00000382010080410000004001100210000003d3011001c700000e06000104300000000001000415000000100110008a0008000500100218001000000000001d000003c2010000410000000000100439000000000100041000000004001004430000000001000414000003820210009c0000038201008041000000c001100210000003c3011001c700008002020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000000101004b000007890000c13d0000000901000029000000ff0110018f000000010110008c0000000001000019000000010100603900000008020000290000000502200270000000000201001f0000078c0000c13d0000000903000029000004010130019700000001021001bf000003c60130019700000101011001bf000000010300006b000000000102c019000000000010041b0000000e0200006b000007960000c13d000000400100043d000003e502000041000001ef0000013d00000008010000290000000501100270000000000100001f000000400100043d0000006402100039000003c40300004100000000003204350000004402100039000003c503000041000000000032043500000024021000390000002e030000390000022c0000013d0000ff0001100190000007b00000c13d000000400100043d0000006402100039000003de0300004100000000003204350000004402100039000003df03000041000000000032043500000024021000390000002b030000390000022c0000013d000000400100043d000003da020000410000000000210435000000040210003900000a500000013d000000400200043d00000024032000390000000000130435000003db01000041000000000012043500000004012000390000000d030000290000000000310435000003700000013d0000006501000039000000000201041a000003be02200197000000000021041b0000000001000411000003bc061001970000003301000039000000000201041a000003be03200197000000000363019f000000000031041b0000000001000414000003bc05200197000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410e040dfa0000040f000000010120019000000a3c0000613d000000400100043d000000000200041a0000ff0002200190000007990000613d0000009702000039000000000302041a000003be043001970000000e05000029000000000454019f000000000042041b00000020021000390000000000520435000003bc023001970000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003c9040000410e040dfa0000040f000000010120019000000a3c0000613d000000c901000039000000000201041a0000040102200197000000000021041b000000400100043d000000fb02000039000000000202041a00000084030000390000000103300367000000000303043b000000000432004b0000081b0000813d000000fb04000039000000000034041b000000200410003900000000003404350000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003cc040000410e040dfa0000040f000000010120019000000a3c0000613d000000fb01000039000000000101041a0000000d0210006c000008240000813d000000400200043d00000024032000390000000d040000290000036b0000013d000000400200043d0000001f0430018f0000000505300272000008180000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000008140000c13d000000000604004b000005b40000613d000005260000013d0000006402100039000003ca0300004100000000003204350000004402100039000003cb030000410000000000320435000000240210003900000022030000390000022c0000013d0000000b020000290000000d0120006b000007860000c13d0000000a020000290000000d0120006b000007860000c13d0000000d0100006b000008400000c13d000000010100006b000004650000c13d000000000200041a0000040201200197000000000010041b000000400100043d00000001030000390000000000310435000003820210009c000003820100804100000040011002100000000002000414000003820420009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000038d04000041000004620000013d000a00000000001d000008470000013d0000000a020000290000000102200039000a00000002001d0000000d0120006c0000082c0000813d0000000a010000290000000502100210000900000002001d0000000c01200029000b00000001001d0000000101100367000000000101043b000e00000001001d000003bc0110009c00000a3c0000213d0000000e0100006b000007860000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000008730000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f00000001022001900000087e0000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000800000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000000000202004b00000a580000c13d0000000802000029000000000021041b0000000001000414000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000203000039000003d4040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d00000001010003670000000b02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d00000009030000290000000602300029000000000121034f000000000101043b000800000001001d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000400200043d0000002003200039000000080400002900000000004304350000000000120435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d5040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000802000029000000000021041b00000001010003670000000b02100360000000000202043b000e00000002001d000003bc0220009c00000a3c0000213d00000009030000290000000702300029000000000121034f000000000101043b000b00000001001d0000000e0100002900000000001004350000012f01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000201043b000000000102041a000000000301004b000008fc0000c13d000003d601000041000000000012041b0000000b0210006c00000a5b0000413d0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000900000002001d0000000b0120006c000008420000613d0000000e0100006b000007860000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000000101004b00000a4b0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000000010210008c000009430000613d000000020110008c00000a450000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f00000001022001900000094e0000c13d00000a440000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000a440000613d000000000101043b000800000001001d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000201041a000400000002001d000000080120006b00000a170000613d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000300000001001d000000400200043d000003d7010000410000000001120436000200000001001d000500000002001d00000004012000390000000002000410000000000021043500000000010004140000000e02000029000000040220008c000009810000c13d0000000003000031000000200130008c00000020040000390000000004034019000009af0000013d0000000503000029000003820230009c000003820200004100000000020340190000004002200210000003820310009c0000038201008041000000c001100210000000000121019f000003d3011001c70000000e020000290e040dff0000040f000000000301001900000060033002700000038203300197000000200430008c00000020040000390000000004034019000000050540027200000002090000290000099c0000613d000000000601034f0000000507000029000000006806043c0000000007870436000000000897004b000009980000c13d0000001f06400190000009ab0000613d0000000505500210000000000751034f00000005055000290000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000000a630000613d0000001f01400039000000600210018f0000000501200029000000000221004b00000000020000190000000102004039000003c10410009c00000a3e0000213d000000010220019000000a3e0000c13d000000400010043f000000200130008c00000a3c0000413d00000005010000290000000001010433000500000001001d0000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b000000000101041a000000050210006b00000a520000413d000000030200006b00000a070000613d000000050210006b00000a070000613d0000000403000029000000080230006900040003302000bd00000004322000f9000000030220006b00000a520000c13d00050005001000710000000e0100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000505000029000000040350006c00000004050080290000000004050019000000010220019000000a3c0000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000a520000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d8040000410000000e050000290e040dfa0000040f000000010120019000000a3c0000613d0000000e0100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000802000029000000000021041b0000000e0100002900000000001004350000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000a3c0000613d000000000101043b0000000b03000029000000000031041b000000400100043d0000002002100039000000000032043500000009020000290000000000210435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000203000039000003d9040000410000000e050000290e040dfa0000040f0000000101200190000008420000c13d000000000100001900000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000000001042f000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000000400100043d000003da02000041000000000021043500000004021000390000000e0300002900000000003204350000075a0000013d000003e30100004100000000001004350000001101000039000000040010043f000003d30100004100000e0600010430000000400100043d000003d20200004100000a4d0000013d000000400200043d00000024032000390000000000130435000003db01000041000000000012043500000004012000390000000b03000029000007ae0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000000a6f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000a6b0000c13d000000000604004b000005b40000613d000005a80000013d0006000000000002000003bc0110019800000b770000613d000600000001001d00000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000101041a000000000101004b00000b7f0000613d000003cd01000041000000000010043900000000010004120000000400100443000000400100003900000024001004430000000001000414000003820210009c0000038201008041000000c001100210000003ce011001c700008005020000390e040dff0000040f000000010220019000000b760000613d000000000101043b000000010210008c00000a9e0000613d000000020110008c00000b900000c13d000003d1010000410000000000100439000000000100041400000aa10000013d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000b760000613d000000000101043b000500000001001d000000060100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000201041a000000050120006b00000abd0000c13d000000000001042d000200000002001d0000012e01000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b000000000101041a000400000001001d000000400a00043d000003d70100004100000000051a04360000000401a000390000000002000410000000000021043500000000010004140000000602000029000000040320008c00000adb0000c13d0000000003000031000000200130008c0000002004000039000000000403401900000b0b0000013d0000038203a0009c000003820300004100000000030a40190000004004300210000003820310009c0000038201008041000000c001100210000000000141019f000003d3011001c700030000000a001d000100000005001d0e040dff0000040f000000010b000029000000030a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200000af80000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00000af40000c13d000000000705004b00000b070000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000000b9c0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000003c10410009c00000b960000213d000000010220019000000b960000c13d000000400010043f000000200130008c00000b740000413d00000000010a0433000300000001001d000000060100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000305000029000000010220019000000b740000613d000000000101043b000000000101041a000000000215004b00000b8a0000413d000000040200006b00000b630000613d000000000215004b00000b630000613d0000000203000029000000050230006900020004302000bd00000002322000f9000000040220006b00000b8a0000c13d0004000000150051000000060100002900000000001004350000013101000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f0000000205000029000000040350006b00000000040500190000000404004029000000010220019000000b740000613d000000000101043b000000000301041a0000000002430019000000000332004b00000000030000190000000103004039000000010330019000000b8a0000c13d000000000021041b000000400100043d0000000000410435000003820210009c000003820100804100000040011002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000038c011001c70000800d020000390000000203000039000003d80400004100000006050000290e040dfa0000040f000000010120019000000b740000613d000000060100002900000000001004350000013001000039000000200010043f0000000001000414000003820210009c0000038201008041000000c001100210000003c8011001c700008010020000390e040dff0000040f000000010220019000000b740000613d000000000101043b0000000502000029000000000021041b000000000001042d000000000100001900000e0600010430000000000001042f000000400100043d000003e5020000410000000000210435000003820210009c0000038201008041000000400110021000000385011001c700000e0600010430000000400100043d000003da020000410000000000210435000000040210003900000006030000290000000000320435000003820210009c00000382010080410000004001100210000003d3011001c700000e0600010430000003e30100004100000000001004350000001101000039000000040010043f000003d30100004100000e0600010430000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000400200043d0000001f0430018f0000000505300272000000050550021000000ba80000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000ba40000c13d000000000604004b00000bb60000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000121019f00000e06000104300002000000000002000000400400043d00000044054000390000000000350435000000200340003900000403050000410000000000530435000003bc022001970000002405400039000000000025043500000044020000390000000000240435000004040240009c00000c4a0000813d0000008009400039000003bc0a100197000000400090043f000004050190009c00000c4a0000213d000000c001400039000000400010043f00000020010000390000000000190435000000a00140003900000406020000410000000000210435000000000204043300000000010004140000000404a0008c00000c080000c13d00000001020000390000000001000031000000000301004b00000c200000613d0000001f031000390000040b033001970000003f033000390000040b03300197000000400c00043d00000000033c00190000000004c3004b00000000040000190000000104004039000003c10530009c00000c4a0000213d000000010440019000000c4a0000c13d000000400030043f0000001f0310018f000000000b1c043600000002040003670000000501100272000000050110021000000bf90000613d00000000051b0019000000000604034f00000000070b0019000000006806043c0000000007870436000000000857004b00000bf50000c13d000000000503004b00000c220000613d000000000414034f00000000011b00190000000303300210000000000501043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f000000000031043500000c220000013d000003820430009c00000382030080410000004003300210000003820420009c00000382020080410000006002200210000000000232019f000003820310009c0000038201008041000000c001100210000000000112019f00000000020a0019000200000009001d00010000000a001d0e040dfa0000040f000000010a0000290000000209000029000000010220018f00020000000103550000006001100270000003820010019d0000038201100197000000000301004b00000bde0000c13d000000600c000039000000800b00003900000000040c0433000000000202004b00000c520000613d000000000204004b00000c3d0000c13d00020000000c001d00010000000b001d000003c20100004100000000001004390000000400a004430000000001000414000003820210009c0000038201008041000000c001100210000003c3011001c700008002020000390e040dff0000040f000000010220019000000c840000613d000000000101043b000000000101004b000000020100002900000c850000613d0000000004010433000000000204004b000000010b00002900000c490000613d000004070240009c00000c500000213d0000001f0140008c00000c500000a13d00000000010b0433000000000201004b0000000002000019000000010200c039000000000221004b00000c500000c13d000000000101004b00000c680000613d000000000001042d000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e0600010430000000000100001900000e06000104300000000001090019000000000204004b00000c7c0000c13d000000400400043d000200000004001d0000038a02000041000000000024043500000004034000390000002002000039000000000023043500000024024000390e040c960000040f00000002030000290000000001310049000003820210009c0000038201008041000003820230009c000003820300804100000060011002100000004002300210000000000121019f00000e0600010430000000400100043d00000064021000390000040803000041000000000032043500000044021000390000040903000041000000000032043500000024021000390000002a0300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c000003820100804100000040011002100000038b011001c700000e06000104300000038202b0009c000003820b0080410000004002b00210000003820340009c00000382040080410000006001400210000000000121019f00000e0600010430000000000001042f000000400100043d00000044021000390000040a03000041000000000032043500000024021000390000001d0300003900000000003204350000038a020000410000000000210435000000040210003900000020030000390000000000320435000003820210009c00000382010080410000004001100210000003eb011001c700000e060001043000000000430104340000000001320436000000000203004b00000ca20000613d000000000200001900000000052100190000000006240019000000000606043300000000006504350000002002200039000000000532004b00000c9b0000413d000000000231001900000000000204350000001f023000390000040b022001970000000001210019000000000001042d000300000000000200000000080100190000009701000039000000000201041a000000400a00043d0000002401a00039000000400300003900000000003104350000040c01000041000000000b1a04360000000401a000390000000009000411000000000091043500000000430804340000004401a0003900000000003104350000006401a00039000003bc02200197000000000503004b00000cc40000613d000000000500001900000000061500190000000007540019000000000707043300000000007604350000002005500039000000000635004b00000cbd0000413d000000000431001900000000000404350000000004000414000000040520008c00000cce0000c13d0000000003000031000000200130008c0000002004000039000000000403401900000d080000013d000100000008001d0000001f033000390000040b033001970000000003a300490000000001130019000003820310009c000003820100804100000060011002100000038203a0009c000003820300004100000000030a40190000004003300210000000000131019f000003820340009c0000038204008041000000c003400210000000000131019f00030000000a001d00020000000b001d0e040dff0000040f000000020b000029000000030a000029000000000301001900000060033002700000038203300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200000cf30000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00000cef0000c13d000000000705004b00000d020000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000000000900041100000d3e0000613d00000001080000290000001f01400039000000600110018f0000000004a10019000000000114004b00000000010000190000000101004039000003c10240009c00000d200000213d000000010110019000000d200000c13d000000400040043f0000001f0130008c00000d1e0000a13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b00000d1e0000c13d000000000101004b00000d260000613d000000000001042d000000000100001900000e0600010430000003e30100004100000000001004350000004101000039000000040010043f000003d30100004100000e06000104300000004401400039000000600200003900000000002104350000002401400039000000000200041000000000002104350000040d0100004100000000001404350000000401400039000000000091043500000064024000390000000001080019000300000004001d0e040c960000040f00000003030000290000000001310049000003820210009c0000038201008041000003820230009c000003820300804100000060011002100000004002300210000000000121019f00000e0600010430000000400200043d0000001f0430018f0000000505300272000000050550021000000d4a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00000d460000c13d000000000604004b00000d580000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000003820320009c00000382020080410000004002200210000000000112019f00000e06000104300000006502000039000000000302041a000003be03300197000000000032041b000003bc061001970000003301000039000000000201041a000003be03200197000000000363019f000000000031041b0000000001000414000003bc05200197000003820210009c0000038201008041000000c001100210000003bf011001c70000800d020000390000000303000039000003c7040000410e040dfa0000040f000000010120019000000d750000613d000000000001042d000000000100001900000e0600010430000000400200043d000000fb04000039000000000304041a000000000513004b00000d900000813d000000000014041b000000200420003900000000001404350000000000320435000003820120009c000003820200804100000040012002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f000003c8011001c70000800d020000390000000103000039000003cc040000410e040dfa0000040f000000010120019000000da30000613d000000000001042d0000006401200039000003ca0300004100000000003104350000004401200039000003cb0300004100000000003104350000002401200039000000220300003900000000003104350000038a010000410000000000120435000000040120003900000020030000390000000000310435000003820120009c000003820200804100000040012002100000038b011001c700000e0600010430000000000100001900000e0600010430000000010210008c00000db60000613d000000020110008c00000dc40000c13d000003d10100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000dc30000613d000000000101043b000000000001042d000003cf0100004100000000001004390000000001000414000003820210009c0000038201008041000000c001100210000003d0011001c70000800b020000390e040dff0000040f000000010220019000000dc30000613d000000000101043b000000000001042d000000000001042f000003e30100004100000000001004350000005101000039000000040010043f000003d30100004100000e0600010430000000000001042f0000000002000414000003820320009c0000038202008041000000c002200210000003820310009c00000382010080410000004001100210000000000121019f000003c8011001c700008010020000390e040dff0000040f000000010220019000000dda0000613d000000000101043b000000000001042d000000000100001900000e060001043000000000050100190000000000200439000000050130008c00000dea0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000631004b00000de20000413d000003820130009c000003820300804100000060013002100000000002000414000003820320009c0000038202008041000000c002200210000000000112019f0000040e011001c700000000020500190e040dff0000040f000000010220019000000df90000613d000000000101043b000000000001042d000000000001042f00000dfd002104210000000102000039000000000001042d0000000002000019000000000001042d00000e02002104230000000102000039000000000001042d0000000002000019000000000001042d00000e040000043200000e050001042e00000e0600010430000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe009c8f7ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380ae0fcab300000000000000000000000000000000000000000000000000000000616c697a696e6700000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e69746908c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000002000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249800000002000000000000000000000000000001000000010000000000000000000000000000000000000000000000000000000000000000000000000093920bf700000000000000000000000000000000000000000000000000000000c7ad089400000000000000000000000000000000000000000000000000000000e30c397700000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fa7781ff00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000e458a65d00000000000000000000000000000000000000000000000000000000ce82e84000000000000000000000000000000000000000000000000000000000ce82e84100000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000c7ee005e00000000000000000000000000000000000000000000000000000000b4a0bdf200000000000000000000000000000000000000000000000000000000be26317d00000000000000000000000000000000000000000000000000000000be26317e00000000000000000000000000000000000000000000000000000000c32094c700000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000bc2f7dc3000000000000000000000000000000000000000000000000000000009dd5428d000000000000000000000000000000000000000000000000000000009dd5428e00000000000000000000000000000000000000000000000000000000a666642b0000000000000000000000000000000000000000000000000000000093920bf8000000000000000000000000000000000000000000000000000000009d3cc54300000000000000000000000000000000000000000000000000000000637c9b4d0000000000000000000000000000000000000000000000000000000079ba5096000000000000000000000000000000000000000000000000000000008aadf798000000000000000000000000000000000000000000000000000000008aadf799000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000079ba50970000000000000000000000000000000000000000000000000000000080d45a2d000000000000000000000000000000000000000000000000000000006857249b000000000000000000000000000000000000000000000000000000006857249c00000000000000000000000000000000000000000000000000000000715018a600000000000000000000000000000000000000000000000000000000637c9b4e0000000000000000000000000000000000000000000000000000000064aff9ec000000000000000000000000000000000000000000000000000000003131b064000000000000000000000000000000000000000000000000000000005a38f84c000000000000000000000000000000000000000000000000000000005a38f84d000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000003131b0650000000000000000000000000000000000000000000000000000000043bf7283000000000000000000000000000000000000000000000000000000000e32cb8600000000000000000000000000000000000000000000000000000000192e7a7b00000000000000000000000000000000000000000000000000000000231f82bb000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000020000000800000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000038d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700000000000000000000000000000000000000000000000000ffffffffffffffff1806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0020000000000000000000000000000000000004000000000000000000000000066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa06974000000000000000000000000000000000000000000000000000000000000436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696dc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d95539132020000020000000000000000000000000000000400000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd1076a39d6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000cf6e06116a82c1b468912f23d8bb1d126edbb21bc0864d6d5169e3be39b1a8182351eb1e51f0d96d3d2dc08e3c9bddbdb2153580843330b57433c3bf5031be010000000000000000000000000000000000000000000000000de0b6b3a764000070a0823100000000000000000000000000000000000000000000000000000000fe854c4c4e633d5bb31aec1f39f01d9f8f01ad2e0212a0e576825ac986af05892a139b40b9bf8c89ae5053746323912620b9d8ea3b076b098b1bc57702abf3a541ea4b590000000000000000000000000000000000000000000000000000000039f1e9ba000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000f257f636000000000000000000000000000000000000000000000000000000006e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f7420690000000000000000000000000000000000000020000000000000000000000000736574546f6b656e73446973747269627574696f6e537065656428616464726573735b5d2c75696e743235365b5d2900000000000000000000000000000000004e487b7100000000000000000000000000000000000000000000000000000000cf4d0ac7a2f943727f0189dd1f26ba0cde29a1b14f222163ac866d4f5167db945f6f132c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000080000000000000000080ae98f500000000000000000000000000000000000000000000000000000000726573756d6546756e64735472616e73666572282900000000000000000000005db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5061757361626c653a206e6f742070617573656400000000000000000000000000000000000000000000000000000000000000640000000000000000000000007365744d6178546f6b656e73446973747269627574696f6e537065656428616464726573735b5d2c75696e743235365b5d2900000000000000000000000000007365744d61784c6f6f70734c696d69742875696e7432353629000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000000000000000000000000000000000000000000240000008000000000000000006d25be279134f4ecaa4770aff0c3d916d9e7c5ef37b65ed95dbdba411f5d54d5cf47918100000000000000000000000000000000000000000000000000000000706175736546756e64735472616e7366657228290000000000000000000000005061757361626c653a207061757365640000000000000000000000000000000062e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258000000000000000000000000000000000000004400000080000000000000000048f5c3ed00000000000000000000000000000000000000000000000000000000f4eaf50100000000000000000000000000000000000000000000000000000000a80c25cc8959419d41ee66f93961c567b272badc10e0e117261a0ee31b55c3124f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000640000008000000000000000000200000000000000000000000000000000000040000000800000000000000000696e76616c696420616365737320636f6e74726f6c206d616e616765722061646472657373000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffa9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff80000000000000000000000000000000000000000000000000ffffffffffffffbf5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe018c5e8ab000000000000000000000000000000000000000000000000000000004a3fa2930000000000000000000000000000000000000000000000000000000002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000269b953726e29823f625962bae216aed238a7f617a7383c4028f04e79483a579" + ] +} diff --git a/deployments/zksyncsepolia/PrimeLiquidityProvider_Proxy.json b/deployments/zksyncsepolia/PrimeLiquidityProvider_Proxy.json new file mode 100644 index 000000000..74f067e4b --- /dev/null +++ b/deployments/zksyncsepolia/PrimeLiquidityProvider_Proxy.json @@ -0,0 +1,346 @@ +{ + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "transactionIndex": 0, + "gasUsed": "19434767", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536", + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x000000000000000000000000000000000000000000000000000291a90686384c", + "logIndex": 0, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000003ec92f07af4c", + "logIndex": 1, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000c2897703257c8cb174ed1ec87fa96d1847b4cd5c" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd01", + "logIndex": 4, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0xc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014", + "logIndex": 5, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 6, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018e44f588a4dcf2f7145d35a5c226e129040b6d3", + "logIndex": 7, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010001afcc567b844d80e587a198ec7038e2f06ff403702a919819e3ef63c3a8", + "0x0000000000000000000000003407c349f80e4e9544c73ca1e9334ceea7266517" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + }, + { + "transactionIndex": 0, + "blockNumber": 3549326, + "transactionHash": "0x3dd530cc4b77b7befeb022fe5f26f9c9bdc0123b10f9691df598e77ad2bfefa1", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000000098fa9be93d40", + "logIndex": 9, + "blockHash": "0xf1aaa59a7bb1ed0d44ea9b45706f42e81484643c31cb6180701a2d83ccbf0536" + } + ], + "blockNumber": 3549326, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "0xe458a65d000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd0100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "9555bbe1dbe04211a0576a409872928f", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bec47f69510a4ace724a15533969ce9479ea9dfef773b1da341c64e8f507cb9b\",\"dweb:/ipfs/QmSu6KnnhhcRAEtdqYncLKw6JEByiptoZR7paqQv2x5CVu\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4f5abfc32db1d44fd3d38d902879eaeaad827781bb9f954d3ccb8639c55db3c0\",\"dweb:/ipfs/QmVSkxFgWphaUx6w9XdvgwJJuxABdpuVQEbABbRmzd3XFc\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9cbd3212cc9e1dbc383b66ef6b750d58c07c4d73d404c6ec55e4bfed25a8fb6f\",\"dweb:/ipfs/QmPN8XajdLkydiQv2146q1M7nGqYk67Z5SNSjbzFU9MiM5\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://60941294a981f6e3ee77c19e503b64c4114b4e7f3261cf489d6898fdd4916522\",\"dweb:/ipfs/QmQVmckpCRrtkCwyPG7ksVo59yjZdtpNerJDzw3hQVB62A\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0bc227c71372eb216b7965a91a09c843e9e9670369af0410d924cf4208a8dabe\",\"dweb:/ipfs/QmTR55ug3diUCsVedV8C6ShstCcbqSNPVEvmCpqc91pEDf\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dbaba7fe0fe556cc5ed291e03d271fd27d395250141ecfb57a4b30d528958ff9\",\"dweb:/ipfs/QmWT653X2DyZo8nqEcmFe3yTkrCJv3ptbZLhbgLU3y6abe\"]},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c270574add213952363bf451bd512acab5fc48c5a06fc05ad75e99eb4b044b99\",\"dweb:/ipfs/QmNQyg2ZvM59Q6FFg1ukJah2xpg8kvDZnTLRVLtMGKuHL1\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "deployedBytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + }, + "factoryDeps": [ + "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6" + ] +} diff --git a/deployments/zksyncsepolia/Prime_Implementation.json b/deployments/zksyncsepolia/Prime_Implementation.json new file mode 100644 index 000000000..9bd5d6271 --- /dev/null +++ b/deployments/zksyncsepolia/Prime_Implementation.json @@ -0,0 +1,3078 @@ +{ + "address": "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_wrappedNativeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_nativeMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blocksPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_stakingPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumStakedXVS", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maximumXVSCap", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_timeBased", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AssetAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "ExpTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "IneligibleToClaim", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAlphaArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidComptroller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFixedPoint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "name": "InvalidFraction", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimestamp", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnNonRealResult", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "MarketAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "MarketNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoScoreUpdatesRequired", + "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": [], + "name": "UserHasNoPrimeToken", + "type": "error" + }, + { + "inputs": [], + "name": "WaitMoreTime", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldNumerator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "oldDenominator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newNumerator", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "newDenominator", + "type": "uint128" + } + ], + "name": "AlphaUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InterestClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "MarketAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldRevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRevocableLimit", + "type": "uint256" + } + ], + "name": "MintLimitsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldBorrowMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowMultiplier", + "type": "uint256" + } + ], + "name": "MultiplierUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "StakedAtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "TokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "UserScoreUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "MAXIMUM_XVS_CAP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_STAKED_XVS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NATIVE_MARKET", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STAKING_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WRAPPED_NATIVE_TOKEN", + "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": "vToken", + "type": "address" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "accrueInterestAndUpdateScore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "addMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "alphaDenominator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "alphaNumerator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "calculateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimTimeRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsStaked", + "type": "uint256" + } + ], + "name": "estimateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllMarkets", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getInterestAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getPendingRewards", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PrimeStorageV1.PendingReward[]", + "name": "pendingRewards", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "incomeDistributionYearly", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "xvsVault_", + "type": "address" + }, + { + "internalType": "address", + "name": "xvsVaultRewardToken_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "xvsVaultPoolId_", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "alphaNumerator_", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "alphaDenominator_", + "type": "uint128" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "primeLiquidityProvider_", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "poolRegistry_", + "type": "address" + } + ], + "name": "initializeV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "interests", + "outputs": [ + { + "internalType": "uint256", + "name": "accrued", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "score", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "irrevocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isScoreUpdated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "isUserPrimeHolder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + }, + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumOfMembersScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextScoreUpdateRoundId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingScoreUpdates", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primeLiquidityProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_irrevocableLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_revocableLimit", + "type": "uint256" + } + ], + "name": "setLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "timestamps", + "type": "uint256[]" + } + ], + "name": "setStakedAt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakedAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "togglePause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalIrrevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalRevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalScoreUpdatesRequired", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "unreleasedPLPIncome", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_alphaNumerator", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_alphaDenominator", + "type": "uint128" + } + ], + "name": "updateAlpha", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "updateMultipliers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "updateScores", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vTokenForAsset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "xvsUpdated", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultPoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "transactionIndex": 0, + "gasUsed": "3268703881", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c", + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x000000000000000000000000000000000000000000000000018efd220b18b754", + "logIndex": 0, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x000000000000000000000000000000000000000000000000002617442c8e0854", + "logIndex": 1, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x0000000000000000000000000000000000008008", + "topics": ["0x27fe8c0b49f49507b9d4fe5968c9f49edfe5c9df277d433a07a0717ede97638d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003b70000000000000000000000000000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000800e41fc960f9ad8f8ae3879b1b81ee694cad40b8e6e1b3fb2c05344c494b7136906", + "logIndex": 2, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x0000000000000000000000000000000000008008", + "topics": [ + "0x3a36e47291f4201faf137fab081d92295bce2d53be2c6ca68ba82c7faa9ce241", + "0x000000000000000000000000000000000000000000000000000000000000800e", + "0x41fc960f9ad8f8ae3879b1b81ee694cad40b8e6e1b3fb2c05344c494b7136906" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000001055a0f7c0000000000000000000000010220019000000fd701008041000000c00110021000000000010004143f553f500000040f00000fd70210009c000000000101043b00001053011001c7000000200010043f00008010020000390000000000100435000000000101041a000000000701034f0000000008980436000000007907043c0000000004034019000022570000c13d000000200400003900003f5700010430000000400200043d000022570000613d000022570000213d000000000968004b0000000003010019000200000001035500000fd7033001970000006003300270000000000604004b000000000802001900000005053002720000001f0430018f000000200130008c0000000505500210ffffffffffffffff000000000101004b0000000002000019000022570000413d0000001f01400039000000000003001f000000000707043b000000400010043f00000fd901100197000000200430008c0000000400100443000000000100001900000f810000213d00000000002104350000000000100439000000000100041200000fd7020080410000004001100210000000400100043d0000000003000031000000000201041a00000014010000290000104c011001c7000080050200003900001054011001c70000104601000041000000000020043500001d770000613d00000fd70300004100000fd70310009c0000013301000039000000000021041b00000024001004430000000006620019000000050650021000000000065200193f553f4b0000040f00000fd70320009c0000101a0000c13d000000600110018f00000fdb011001c70000104c01000041000000040010043f000010630100004100000000003204350000000102004039000000040320008c00001f710000613d000000000001042d000000000705004b0000000000560435000000000112019f0000000001000416000000000202004b000000000585019f00000000055701cf000000000757022f0000010005500089000000000858022f00000000085801cf00000000080604330000000305500210000000000761034f000000050660021000000005064002720000001f0540018f000000140200002900000000001504350000000000120435000000000221004b00000000006504350000000002000416000011d40000013d000000000686019f00000000066701cf000000000767022f0000010006600089000000000868022f00000000086801cf00000000080504330000000306600210000000000751034f0000001f064001900000000007870436000000006806043c0000000505400272000000000601034f00000002011000390000800d02000039000000000202043b000000000141019f000000ff0110019000000013010000290000000002000414000000130200002900000080010000390000104e0410009c00000040043002100000000101200190000000c002200210000000800010043f00003f560001042e000001340100003900000fd90110009c001300000001001d000000000300001900000fd90210009c00000000055900190000000007090019000000000202041a000038120000c13d0000004002200210000000400a00043d000000600210018f0000000008a7004b000000000223004b00000000080a001900000f810000c13d000000000113019f000000000001043500000000066a00190000000009b8004b000000110100003900000000010a043300000fd7010000410000000000340435000000000123004b000001400100003900000000001304350000001202000029000000400900043d000000000112004b00000fd9022001970000000401100370000032b50000613d000000000121019f00000001011000390000000103300190000000000301041a000000400030043f000000040420008c000080020200003900001057011001c70000000001090433000000240230008c0000000000000001000000600130021000000000030304330000000103004039000000030110003900000fd70030019d00001059010000410000000000200439000000000309401900000fd70390009c00001055010000410000006001000039001400000001001d0000012d01000039000000000201004b000000000161019f00000000014101cf000000000141022f0000010004400089000000000646022f00000000064601cf000000000605043300000003044002100000000005520019000000000151034f000000000012041b00000000030a401900000fd703a0009c001200000001001d0000105602000041000000000121004b000000000303041a00000fd90220009c0000283f0000613d000000410100003900000000060000190000000103000039000000200230008c00000fd70410009c000000040110003900000fe2011001c700003e370000213d00002b4a0000613d000000070100002900000000020204330000004000a0043f00000000010104330000104e0210009c000000000131004b000000c00100003900000a4e0000013d0000000402100370000032b70000213d000000000001042f0000000009a8004b00000fd70300804100000001011001900000000101004039000000080200002900000fd70340009c000000000332004b00000000121200d9000000000203001900000141010000390000000000140435000000400100003900003e3d0000c13d00002da10000613d00000009010000290000000801000029000700000001001d00001d6b0000013d0000000000310435000000070200002900000012010000290000000501000029000000060200002900000000051a04360000000001a20019000000000031041b0000101a0000413d000000400090043f000000000192001900000135010000390000000102200039000000a00010043f3f553f1c0000040f001400000002001d000900000001001d000800000001001d000000240210003900000044021000390000001303000029000000600400003900000000433200d900000012030000290000000c020000290000000005190436000000440230008c00003e350000413d0000007f066002700000000005570019000035200000c13d0000000302000029000600000001001d00000000066b0019000000400b00043d000000000302041a0000000402100039000000400120021000000fd70120009c0000000a010000290000104d2110012a000000000305004b000b00000001001d000000400400043d000000000131019f0000004003300210000001370100003900000000022300190000000001910019000000020300003900000d860000013d00000132010000393f5525850000040f001300000002001d00000f520000013d0000013b0100003900000000986800d90000000008700049000010c10760009c0000007f05500210000000090200002900000001011001af000300000005001d0000000c01000029000000000001041b000000000032041b00000000040000190000105c011001c7000000000321004b0000000a0200002900000000435100d90000104d1210012a0000000d01000029000500000001001d000000400040043f0000000d020000290000000401400039000d00000001001d000000000897004b000000c00350021000000fd70500804100000fd70350009c000000000500041400000000055a0019000000600130008c0000104d0330009c0000104d423000d10000104e0130009c0000105801000041000000000023041b0000001101000029001100000001001d001200000002001d0000394a0000c13d000032bd0000613d0000000502000029000000060300002900000000080b001900000fd702000041000400000002001d000000040200002900000000050000190000001102000029000000200300003900000fe0020000410000006402100039000000010310003900000024011003700000800b0200003900001060011001c7000000000113004b000000000403004b00000fd70430009c00000fd90210019700000000315200a9000000000404041a0000000609000029000a00000001001d000c00000001001d0000104e0140009c0000000003044019000001420100003900000000010a401900000fd701a0009c00001083011001c7000000040590003900000001022001bf000000010110036700000005011002100000000004000415000000440300003900008005010000390000013a010000390000002402100370800000000000000000003f150000613d00003e370000c13d0000372f0000013d0000000005650019000036d50000213d00000009050000290000000b0100002900002a350000613d0000000601000029000029100000613d0000000001a10019000000000ab10019000000020b000029000100000006001d000300000001001d0000006003200039000000000302004b00000010020000290000105b03300197001000000002001d001100000002001d000000000100041100000003030000390000105f01000041000000200020043f0000013402000039000000120120008c000000c0033002100000000003000414000600000005001d0000000d0a000029000000000109401900000fd70190009c00000000070a0019000000000213004b00000000020a0433000000000019043500001dd60000a13d0000101a0000613d000000e00100003900001047010000410000013601000039000000400020043f020000000000000000003f090000013d00003e430000613d00000000764600a90000000005560019000900000005001d0000000803000029000032b50000413d00000000030b401900000fd703b0009c000028470000213d0000000405a0003900000000010b04330000104e02a0009c00000fd70230009c00000060011002100000004002200039000000000432043600000011030000290000001305000029000022570000013d00000f700000c13d000200000001001d000010a5020000410000ff0001100190000000200140008c000010460000013d0000003301000039000000000102041a000000000043041b000d00000005001d000000000431004b000000000505043300000000311200d90000000b02000029000000030a000029000600000002001d00000fd704008041000001370200003900000000020b04330000104b020000410000000e090000290000000401900039000000600430008c0000000f020000290000104e0190009c00000000031904360000105201200041000400000001001d000f00000001001d0000001405000029000010b0022001970000013c0100003900000131020000390000000201000029000200000002001d000000000204004b000000c40010043f000000a40010043f000000200100003900000fe001000041000000000141034f0000000504400210000000000201043b000000040230008c020000020000000000003ef50000613d00003e350000613d00003e350000213d00000000764700a900000000987600d9000010c10880009c0000007f0780027000000000684600a90000000b431000fa0000000b0300006b0000000b312000b9000000090b000029000033860000613d00000000051b0436000032be0000c13d000032b70000c13d000000090a000029000000080b00002900002daa0000213d0000000a0a000029000a00000005001d00002bc30000613d000000010b00002900000001020000290000000703000029000028410000c13d0000000401a00039000000040a0000290001004000300218000200000003001d0000250e0000213d0000250b0000613d0000001f0130008c00000000011a004b0000003201000039000000400230021000000000214600d900000000564300a900000000042100490000105a0320009c00000001020000390000012f02000039000000000030043500000001033000390000008001100039001000000001001d0000013d01000039000000040120003900000aa40000013d00001f720000613d00000fd903300197000000010100c03900000fe1011001c70000006501000039000000000010041b0000105b02200197000000000301004b00000020020000390000000f01000029000000000404043b3f55356a0000040f00000001022002700000001202200089000000ff0120008c000000040120008c0000107902000041000000000334004b000010960220009c000000000556004b000010960440009c000000000653004b0000104d5120012a0000104d5340012a00000000321400d900001095010000410000000c050000290000000c09000029000c00000009001d00000fd90240019700000000002504350000109405000041000001420400003900000fd90420009c0000000009a100190000000c0a0000290000109101000041000000000002043500000060012000390000008001200039000000a0012000390000001304000029000000c00340021000000000040004140000104e0290009c000d00000006001d0000104a02000041000800000002001d00000000020904330000104e04a0009c00000000021a004b0000104801000041000000000301043b000000e00210018f00000138010000390000000b0a0000290000000d030000290000000a011001af0000001309000029000000120a000029001300000009001d00000c6b0000613d000e00000001001d000700000002001d0000012e030000390000107c02200197000000ff0320019000000f700000613d0000104e0110009c0000000404200039000022570000813d000000000434004b00000023042000390000104e0420009c000000000224004b000000010200c039000000c00010043f000000840010043f000000010300c0390003000000000002000000f1aaddd774ffffffffffffffe07fffffffffffffff6f6e7472616374207a61626c653a2063496e697469616c6900003ee90000013d0000000c04000029000039d70000613d000300000002001d000039500000613d000010c10770009c00000000058500190000007f0670027000000000674600a90000000008066019000035260000213d0000337a0000013d000000050a000029000032b50000213d00090000000a001d00002df70000613d00002da30000c13d0000000a0300002900002da90000613d000100000000000200000002030000293f5539e50000040f000100000001001d000600000004001d0000284d0000613d0000000000910435000000040320006a000000040300002900040000000a001d00000000001a04350000104e01a0009c00000000031a0436000000060b0000290000250d0000613d000000000205001900000000020a401900000fd702a0009c0000000402a0003900000000042a043600000000020b401900000fd702b0009c000023880000613d00000002040000290000000303000029000000000023043500000000654400a90000000c030000290000104e0310009c0000000001310049000000400320003900000000004304350000013d0200003900000000021300490000000302200039000000000004043500000040042000390000001204000029001200000004001d0000000f090000290000000f0a0000290000001209000029001200000009001d000000010220008a000000000103041a00000fd90230019700000010090000290000000e020000290000001003000029001000000009001d0000000403000039001300000003001d000001200020043f3f55263a0000040f3f553f2d0000040f0000104602000041000f00000002001d000010640220009c0000013803000039000000200400803900000000040000310000004002100039000001000010043f0000013e010000393f5523c70000040f0000107d040000410000105b04400197000000000403041a00000fd905200197000000a001000039000001350200003900000f6d0000013d000000000200041100000f700000013d0000109c04000041000000000114004b0000000f0120006c0000013001000039000000800410027000001064031001970000101a0000213d000e00000009001d0000104d0660009c0000000906000029000300000006001d000c0000000a001d0000106e0110009c00000000011404360000109301000041001300000004001d0000109201000041000000040520008c00000009040000290000109104000041000000000406004b00000000010b401900000fd701b0009c00000000004204350000004000b0043f000000000ba100190000000e0a000029000e00000005001d0000000003018019000000130a0000290000004404a0003900000139030000390000000e010000290000000d09000029000b00000003001d0000108e040000410000017e0000813d00000130020000390000012f030000390000000102100039000010af0210009c00000f700000813d00000010011000290000012f010000390000012e01000039000000140300002900000064021003700000109901000041000000e40010043f00000f560000c13d000000000232004b00000c900000013d000000000151019f1000000000000000000000000000000370f5a893b608861e63afbe7ab2082c004da2cbf1be5828002f16ac6c59de70001152aaa3bf81cc00fffffffffffffffe02582ab704279ec0fffffffffffffffc000afe10820813d7000000000001c846fffffffffffffff85361666545524332ffffffffffffff0029000000000000002875696e74323536732c75696e74323500000040000000800000004400000000000000240000000000000020000000800000002000000000000000040000000000000000ffffffff0000000805000029000000080a00002900080000000a001d000c00000004001d000900000006001d0000000a0b000029000000040440008c0000000d04000029000039830000613d000039400000013d0000000506000029000039530000c13d000039530000213d00080000000b001d000039250000613d0000111f053001980000111c05300198000010c1053001980000111705300198000011140530019800001111053001980000110e053001980000007f0880027000000000c89800a90000007f0aa0027000000005088002100000000008000415000000ff02200212000010d10850009c000010ce0850009c000010cb0850009c000010c90950009c000037300000013d000037300000413d000037f40000613d000000000304004b0000106d0340009c0000000005000002000000000556004900000000050004150000106d0750009c0000000006000415000000000667019f000000ff06600212000010c10790009c000000000907c019000000000809004b0000000007096019000000000778019f0000000008970049000000ff0770021200000000898900d900000000090a60190000000009a50049000000000779013f0000106fa960012c00000000086500490000106f050000410000000001050019000000000521004b000035730000613d000035640000613d0000351e0000613d0000351e0000413d00000000065a0436000035260000c13d0000000004010433000000000503004b0000000707000029000010b1033001970000000000240435000000090300002900000024024000390000000504000029000400000004001d00050000000a001d0000000002090019000500000005001d00060000000b001d000000080110006b000032be0000413d00002e8d0000613d00002deb0000013d000000020a000029000600000009001d00002da10000413d000c00000000000200000007050000290000000101000029000500000002001d000100000004001d0000013503000039000029af0000613d000700000003001d00080000000000020000005f0130008c0000000001b20019000000000a79004b0000000009a90436000000008a08043c00000000090b0019000000000801034f00000000076b001900000000004104350000013904000039000100000002001d0000290f0000613d0000288f0000613d000028410000413d0000283f0000413d0000269b0000613d00000fd90120019700090000000000023f5525730000040f00000044014000390000104e0240009c0000000004a1001900000000090004110000000008010019000000000203004b0000256d0000613d000025140000c13d0000250b0000413d000000070a00002900070000000a001d000023c10000613d000000000242004b00000000314200a900000003040000290000002400000443000200000004001d00030000000a001d000000040250008c000010b3020000410000238b0000c13d0000238b0000213d000000010a00002900020000000b001d00000000061b0436000000030500002900000fd90540019700000010030000390000108203000041000000220300003900001080030000410000107f030000410000108104000041000000000203041a000000c9020000390000000000520435000010a702000041000000000363019f0000105b0320019700000fd90610019700000000411200d9000000000401004b00000000421300a90000000004050019000000010420008c00000000433400a9000000010400603900000001052001900000000a04000039000000fb0300003900001f670000013d000000100400006b000000010440019000000001011001bf0000000d0110017f000001000100008a0000105601000041000000120320008c000000800100043d00000010010000290000105201300041000000000201043300000000004504350000000004040433000000600420003900000040041000390000000003310436000000000607004b000000c004100039000000000464004b000000000800001900000000090000190000106d0530009c000000000857004b000000010110008a00000011431000fa000000110300006b00000011312000b9000500000004001d00120000000a001d000013100000613d0000000e0320006a000e00000002001d0000000e030000290000000b011001af000c00000003001d000015180000613d000012c80000c13d0000000401000029000000020120006c3f552bd60000040f00000fd90130009c000000110a000029000000000005043500000060051000393f5529a40000040f000000110420006b0000002002100039000000200240008c0000107e04000041000000000042041b0000105b043001970000009702000039000000c002400039000000a002400039000000c00100043d000000140230006a000000000601041a0000000006050019000000c9010000390000000c011001af001300000005001d000001360200003900000014070000293f552e180000040f000001a00010043f000001800020043f000000600210003900000000320104343f5533a20000040f00000014040000290000000101100029000000800020043f000000ff0210019000000143010000390000000f033001af0000013b0200003900001e310000c13d000000000100041a000c00050010021800000000010004150000000401000039000010900400004100000139010000390000013f01000039000001a00000043f000001800000043f000001600000043f000001400000043f000001200000043f000001000000043f000000e00000043f000000c00000043f000000a00000043f000000800000043f000001c00100003900000001044000390000000000760435000000000707043300000fd906600197000010310000613d000000800300043d0000008001400039000010500140009c000001400400043d000001400040043f000000e00010043f00000fe304000041000000000013041b000000000200041a3f552f130000040f3f552efd0000040f000010a1020000410000000001030019000000000302001900000000040200190000106904000041000000000503041a000000c9030000390000000d01000039001400000000001d0000000502200210000000040120006c00000000423100a900000000030204330000000003040019000000010320008c00000000311300a9000000010300603900000000543300a900000001042001900000000a0300003900000001010000390000000005290436000000000119004b0000000b030000290000000a05000029000000060a00002900000012431000fa000000120300006b00000012312000b900000000065904360000104e0490009c000000000219004b0000004001200039000000000649043600000009546000f900090000406200ad0000000009b100190000000d0600002900000000055b001900000000070b00190000000402b0003900000000072b043600000000060a04330000104e02b0009c00000000062a0436000000000a9100190000004001a0003900000000065a001900130000000a001d0000000403a0003900000000003a043500001090030000410000002404a000390000000000540435000d00000002001d000a004000300218000c00000005001d001200000005001d0000017e0000213d000009580000c13d000000110120006c000000110100006b001000240020003d001400000004001d0000009701000039000010ac02000041000000130110006b0000001901000039000010450000013d000000000102004b00000131010000390000106b010000410000002a010000390000004401100370000000000300041100000fd90320009c00000000012101cf000000000121022f0000010002200089000000000525022f00000000052501cf00000000050404330000000302200210000000000502004b000000007807043c00000005043002720000001f0230018f0000001f0230003900000080020000396f8aee7eaa1e443bd3b0ecce166072855ec0fd7d608c8b3beb0ece0d1a8adb87ffffffffffffffa0ffffffffffffffecffffffffffffe54879c4747a00000000c3b2a8f40000000066697420696e2061646f65736e2774203a2076616c75652053616665436173746e20696e743235361086170d00000000d8d00cf112e4d4a888415abbe9a76bea78c7f81824d62ebf783eafef1c0a8f3976b441c27035c6a1910b022db7ae67ce20000000000000003de1db4dd55f29a7a45af1e1f40c333ba0ae5e4eb1b479dc63afbe7ab2082ba1400000000000000096ff7d5b6f99fcd8d3094c70f034de4beb3ad1aa9866ebb34da2cbf1be5827f95fb8ac404e7a79e35bf0a8b1457695355d6f63c1482a7c862f16ac6c59de6f8d7477440d6d157750b1cc971a9bb5b986db76eae12d0295711152aaa3bf81cb9f00000000000000026d3bfdb93db96d024c902e273a58678d000000000000001bfd15e0265855c47a02582ab704279e8e000000000000000438212a05747799917a9f51c31b7c2f8000000000000005d25dfe6a33c07f738f000afe10820813d60000000000000008220ad7b97bf6e99e42a000812488fc5c000000000043cbaf2e56d32fb9f99744000000000000001021c3677c82b40000000000000001c63800000000001c6380ffffffffffffff80ffffffffffe39c800000000001a9d4800000000017499f00ffffffffe8b66100000000012ebd13000000000e30dce400fffffff1cf231c000000009c197dcc0000000618fee9f800fffff9e701160800000036e0f639b8000001b707b1cdc000fffe48f84e324000000c0135dca04000004807432bc18000ffb7f8bcd43e80000168244fdac7800005a0913f6b1e0000fa5f6ec094e2000010e1b3be415a00000fffffffffffffff8888888888888888088888888888888800000000000000077777777777777778f777777777777777000000000000000600000000000000059d89d89d89d89d8909d89d89d89d89d89999999999999999199999999999999924924924924924921249249249249249e38e38e38e38e38e0e38e38e38e38e38ba2e8ba2e8ba2e8b0ba2e8ba2e8ba2e8aaaaaaaaaaaaaaaa2aaaaaaaaaaaaaaa1f58934f97aea57df0000000000000001f58934f97aea57ee000000000000000c00000000000000080000000000000012e900000000000002e900000000000014f76164760000000ffffffffffffffe8fffffffffffffff04f761647600000010000000733048c5bffffffffffffff607472616374000000206e6f6e2d636f6e2063616c6c20746f416464726573733a62700326219adbba14348c55b257a01d10a60ff6084c8471c7edf5cfe443c04a6f6e20646964206e206f706572617469303a20455243323065640000000000006f742073756363656c206661696c65646576656c2063616c303a206c6f772d6cffffffffffffff3fa9059cbb00000000192e7a7b00000000bc14fc573f099249bd19466126b466921b60176bc4235a9ae22de1457cb61fb6ffffffffffffffc04a3fa2930000000018c5e8ab00000000a666642b00000000ffffffffffff00ff6865206f776e65726973206e6f7420742063616c6c6572204f776e61626c653ae55fb50900000000870b0a0ac0b1835561a466aacd492501883e903e0612c4926c52f3e195bdc5342c75696e743235367365744c696d6974000000040000008038d22ee80000000075d724f600000000e4c70c15177d8b1b1f18b25ed1601680f5408fe78ae11465a699df4aa8f89fc17f97254800000000ffffffffffffffbf000000640000008000c4e3d100000000beb98cab00000000817f5ce6daa33537faced385bafba688ac1c12a64572a8c091e78a55b6df3a0e73286164647265736c7469706c6965727570646174654d75b7d0949700000000ccb96e74168198cca8b8b1167444d0b4ca055f74be75814609d2594e8892dace947d5a84000000006e743235365b5d296573735b5d2c756964417428616464727365745374616b65000000840000008072000000000000006e6577206f776e656e6f7420746865206c6c657220697320537465703a2063614f776e61626c65320de0b6b3a763fffffc57d4df0000000041976e090000000096e85ced00000000b62cad6900000000358ae0360000000098e1b31b0000000089ec88d8d78b86bb2c35ea627bf7ecf3614ac4a5d1e95ca05272e69bcef8da96ce5fe7a3ecd69f4568608b4e36def5711719b8fa26918a7ddd032f28700d4e4b73735b5d290000006f6c2c6164647265697373756528626f6f70734c696d69747365744d61784c6f72657373290000006275726e28616464000000a000000080e6c4247b00000000e07adb40000000006973206e6f742069696e6700000000006e697469616c697a6e616765722061646e74726f6c206d61616365737320636f696e76616c696420647265737300000000000064000000003a207061757365645061757361626c65bd77fb31d467aafaf675768eb1ae369c86f71ea459f8fc17c2d09fef144f7c8a4c6f6f70734c696d616c6964206d61786c65723a20496e76436f6d7074726f6c697400000000000031fe014601293aa0fe4e111b00cd2b0ca5c30e0888f3093e66fd58e82f7b31a2e3b4186f6b6457e019497f9722a3daaf1344cd1fd0a4f2848be0079c53165914ffffffffffff0000697320616c726561616c697a65640000647920696e697469313ce56700000000000000600000008083aebebd00000000f486040c00000000f257f636000000003804360e4d8ba9a2897e0d5a6b836521bf4ef6084dc2f48c1322eaea77217179dc0d0aab000000008e8f294b000000000313b28500000000ffffffffffffff5f7aee632d000000003629000000000000362c75696e743235732c61646472657374286164647265736164644d61726b65ebdbfc544b05a258000d11b0c9f74754cd4e420270b5ea7462e78cea01bee3207bd38aeae4b073aafdd244a5e8aa4e53ff9c91a7834c1ba45db9ee0a495bf2e67573652829000000746f67676c6550614724ef8f363d378d9919baf05be731f0a0586803b53902139122c3fdea27242331323829000000003132382c75696e747068612875696e74757064617465416c4e487b71000000003c209e9336465bd123bf29dc2df74b6f266b0e7a08c0454b42cbb15ccdc3cad608cc6b5d955391325d622183e25ac5afcd93958e4c903827796b89b91644bc98d8c362d765e22700fa1faef420bfe791c7c124b9cd0de2d338d16b8cac22d99fffffffff00000000ffffffffffffff9ffa7781ff000000008aadf79900000000023a8d90e8508b8302500962caba6a1568e884a7374b41e01806aa1896bbf2656f307dc3000000000000004000000000abf994dd8474090d463f5be0ebb1923285262482997e409adf37d27e88e3bd0bffffffffffffff1fffffffffffffff7f0de0b6b3a764000070a0823100000000182df0f50000000000000024000001c095dd919300000000ab882de59d99a32eff553aecb10793d015d089f94afb7896310ab089e4439a4c000000000e32cb86000000000104db1b000000001b9ce575000000001b3f8c5e000000001b3f8c5d00000000207add91000000001bffac890000000029b6eca90000000024e6baf20000000024e6baf1000000001bffac880000000038f6a4340000000037f23cd3000000004e71d92d00000000487b0dfb00000000487b0dfa00000000594a67ee0000000055d36c98000000005d536d30000000005c975abb000000005c975aba0000000055d36c970000000037f23cd2000000006426b4a7000000005fe3b56700000000715018a6000000006857249c000000006857249b000000007dafcd890000000079ba5097000000007ef82070000000007dc0d1d0000000007dc0d1cf0000000079ba509600000000856c3aa40000000080d45a2d0000000088d742c20000000088bead730000000088bead72000000008da5cb5b0000000089afcb44000000009565d3d2000000009198e515000000008e8f294b000000008e8f294a0000000089afcb430000000080d45a2c000000005fe3b56600000000a15753dc000000009f6506ce00000000b0772d0b00000000afcff50f00000000afcff50e00000000b4a0bdf300000000b1a250f200000000b9eb69f600000000b7f2d25800000000b7f2d25700000000b1a250f100000000bc5dc4c300000000ba437c6800000000be26317e00000000bd212c0e00000000bd212c0d00000000c4ae316800000000c3db3c3600000000c86d1a7800000000c7ad089500000000c7ad089400000000c3db3c3500000000ba437c6700000000ce85361300000000cdaa21b700000000d65bd24100000000cf329d1600000000cf329d1500000000da6ab4f800000000d88b9d2e00000000e1d146fb00000000e18f882200000000e18f882100000000d88b9d2d00000000e4676f3700000000e30c397800000000ee6b13fc00000000e486033900000000e486033800000000f2fde38b00000000ef36bbde00000000fe1006ad00000000fa6d5f1800000000f6ed201700000000f6ed201600000000ef36bbdd00000000e30c397700000000cdaa21b6000000009f6506cd0000024000000100000000020000000060cefb38474024988a09c465da9592146a682f133852f6797f26b83ff96e1f2b000000840000000008c379a000000000697320696e697469616c697a696e6700ae0fcab3000000000000000001e1338009c8f7ec0000000000000001ffffffe000003f550000043200003f530021042300003f4e0021042100003f4a0000613d0000112c011001c700000fd70130009c00003f330000413d000000000631004b000000000161043a000000000606003100000005066002700000000006640019000000050620021000003f3b0000413d000000050130008c000000000501001900003f2b0000613d00003f030000c13d00003f070000613d00003ee20000c13d00003ee60000613d00003ed30000c13d00003ed70000613d00003ec40000c13d00003ec80000613d00003eb50000c13d00003eb90000613d00003ea60000c13d00003eaa0000613d00003e970000c13d00003e9b0000613d00003e880000c13d00003e8c0000613d00003e790000c13d00003e7d0000613d00003e6a0000c13d00003e6e0000613d00003ef50000013d00003ee90000c13d00003e5b0000c13d00003e5f0000613d00003f150000013d00003f090000c13d00003e4c0000c13d00003e500000613d00003e2c0000613d00003e1e0000213d00003e260000013d00003e1b0000c13d00003e3d0000213d00003eda0000613d00003dff0000613d00003dec0000c13d00003df00000613d000d0000000a001d00003e030000013d00003dd30000c13d00000000052a043600003efb0000613d00003db40000613d00003da10000c13d00003da50000613d0000000d0b000029000d0000000b001d000000400420021000003db80000013d00003d870000c13d00003dc80000013d00003d7c0000c13d0000000a0120002900000004542000fa00003d480000613d000000040400006b00000004423000b900003d490000a13d00003d490000013d00003d3f0000813d000a00000000001d00003d390000c13d00003d390000013d000a0000303400e10000000a764000fa00003d2e0000413d0000000a645000b900003d380000a13d00003d390000413d0000000605000029000000040110006c00000004321000b90000000a0220006c0000000a241000b900003d300000613d00003ecb0000613d00003d030000613d00003cf00000c13d00003cf40000613d000000030b00002900003d070000013d00003cd70000c13d00003cc50000613d00003cbe0000613d00003ca50000613d00003c9e0000613d00003ebc0000613d00003c790000613d00003c660000c13d00003c6a0000613d00003c7f0000613d00003ead0000613d00003c2e0000613d00003c1b0000c13d00003c1f0000613d00003c320000013d00003c020000c13d00003e9e0000613d00003bdf0000613d00003e8f0000613d00003bab0000613d00003e800000613d00003b6b0000613d00003b580000c13d00003b5c0000613d00003b710000613d000a104d4040013200000000064a043600000005546000f900003b350000613d00050000402600ad00000000020c0433000000000ac1001900003e710000613d00000000066c001900003b210000613d00003b0e0000c13d00000000080c001900003b120000613d0000000c0c000029000c0000000c001d00000000010c401900000fd701c0009c00003b280000613d0000000402c0003900000000052c043600000000060b04330000004000c0043f0000104e02c0009c000000000cb1001900003e620000613d00003add0000613d00003aca0000c13d00003ace0000613d000a0000000b001d00003ae30000613d00000000052b04360000104e04b0009c00000000021b004b00003e530000613d00003a970000613d00003a840000c13d00003a880000613d000a0000000a001d00003a9b0000013d00003a6b0000c13d0000000b0120006900003e3d0000413d000b00000002001d0000004001b0003900003e350000a13d00003e440000613d00003a2d0000613d00003a1b0000c13d00003a1f0000613d0000000b0b000029000b0000000b001d00003a310000013d00003a020000c13d000c00000002001d0000004401b000390000000404b0003900000000004b04350000002405b00039000d000000000002000039d90000c13d00000000325100d9000039d50000613d00000000615400a90000000005230049000039d90000413d000039df0000813d0000112b0320009c000039710000c13d000039750000613d000039770000013d000039610000c13d000039650000613d00000000327500d9000027100220008c00000000324500d9000039480000213d00002710654000c9000039260000613d000000000507004b00000000518500d9000027100110008c00000000611500d900002710651000c900000000512100d90000393f0000013d0000393a0000a13d000000000512004b000039380000613d000000000508004b00000000542300d900000000544300d900000000536400a9000000000393004b00000000534100d900000000319400a900000000144100d90000393f0000c13d000000000108004b000039280000813d000000000341004b000000000362004b000000000296001900000000434100d9000039130000613d000000000151004b0000390d0000613d0000000409000029000000060800002900000000325100a9000039510000413d000039590000613d000038df0000613d000038cc0000c13d000038d00000613d000800000004001d000038e30000013d000038b20000c13d000039510000213d000039510000a13d000039690000613d000038900000613d0000387d0000c13d000038810000613d000038950000013d000038620000c13d000038a50000013d000038570000c13d000800000008001d000200000007001d000000000107004b000038020000013d0000112402000041000037380000013d000000140880008c00001109088001970000112a876000d10000112702000041000037ff0000013d00001128020000410000001201000039000037370000013d000038070000813d0000017c0880008c000037360000413d0000017c967000c900001ab80880008c000011080880019700001129876000d1000037350000013d000037df0000813d000011070880009c000037340000413d00001107967000d1000011060880009c000011050880019700001104876000d1000037330000013d000037ca0000813d000011030880009c000037320000413d00001103967000d1000011020880009c000011010880019700001100876000d1000037310000013d000037b50000813d000010ff0880009c000010ff967000d1000010fe0880009c000010fd876000d1000000000501c019000000000205004b00000000010560190000000002510049000000ff0110021200000000255200d900000000020360190000106f02300099000000000121013f0000106f3110012c00000000050360190000106f053000990000106f3240012c000010c10250009c000000000502c0190000000002056019000000000223019f000000000352004900000000356300d900000000030760190000106f03700099000000000252013f0000106f7210012c0000007f0120021000000000060160190000106f061000990000106f1520012c000036290000413d000011233430c12a000011224340c0d10000112103300198000011205440012a000010df544000d1000037790000613d000037620000c13d0000375e0000c13d0000375a0000c13d000037560000c13d000037520000c13d0000374e0000c13d0000110d5440012a0000110c544000d1000037790000013d000037770000c13d0000111e5440012a0000111d544000d1000037750000613d0000111b5440012a0000111a544000d1000037730000613d000011195440012a00001118544000d1000037710000613d000011165440012a00001115544000d10000376f0000613d000011135440012a00001112544000d10000376d0000613d000011105440012a0000110f544000d10000376b0000613d000037670000c13d0000110b05300198000010c1044000410000000004470049000000000705c0190000000005076019000000000556019f0000000006750049000000ff0550021200000000676800d900000000060960190000000006970049000000000565013f0000110a9670012b00000000086700490000106f070000410000106f6550012c000037a10000813d0000372c0000813d000010fc986000d1000010fb0880009c000010fa876000d10000371e0000813d0000371a0000813d000010f9986000d1000010f80880009c000010f7876000d10000370c0000813d000037080000813d000010f6986000d1000010f50880009c000010f4876000d1000036fa0000813d0000372f0000413d000010c10780009c000010f3956000d10000007f0680027000000000584500a90000000007760019000010f20880009c00000000985800d90000000008600049000010f1865000d10000007f05500270000000280300003900001126030000410000112503000041000035e00000a13d000035cd0000013d000035dc0000613d0000106f080000410000106f0850009c0000106f06000041000035cd0000c13d000010af0670009c00000000653700a9000036d20000613d000000000757004b0000008306e002700000000005d500190000000005b5001900000000059500190000000006c6001900000082055002700000008106600270000000010600002900000000655a00a9000010e5055000990000106d0630009c00000000060000020000000206600069000000000668004b00000000f8fe00d9000010ed06500099000036b70000413d000010c10680009c000000000e600049000010ecede0012a00000000d6df00a90000007f0f800270000010eb0d500041000010eadbb0012a000010e9d9f0012a000010e89cd0012a00000000989800a900000000cee800a900000000cbb800a900000000cfc800a90000007f08f00270000000008f9a00a900000000fa9a00a9000010e70e50009900000000edda00a9000010e60d500099000010e40c500099000010e30b50009900000000ba9a00a9000036970000013d00000000baa900a9000000000a000019000036920000013d000036950000213d000010e20bc0009c00000000b6ba00a90000007f0ac00270000000008c9a00a90000007f09800270000010e10b50009900000000079700490000008009900270000000000bbc004b00000000dca900d900000000099800490000008009900210000010e00b500099000000000bb9004b000000000bb0004900000000cba800d9000010c10a50009900000000a89900a90000368f0000613d000010d509500042000010d5085000470000000508800270000200000006001d000010df9550012a000010de07700041000000030880008a000036710000813d000010dd0950009c000000040880008a000010dc8550012a000010db07700041000036660000813d000010da0850009c000036610000013d000010d98550012a000010d807700041000036610000813d000010d70850009c000010d68550412a0000007f05504210000010d507704041000010d40850009c000010d38550012a000010d207700041000036570000813d000036200000413d000010cd8550012a000010cc077000410000361e0000813d000010ca8550012a0000361b0000813d000010c4070000410000379a0000013d000000ff0120021200000000155100d900000000010460190000000001410049000000000223013f0000106f4330012c00000000050460190000000005410049000010c14210012b000000000246004b000000000602c019000000000506004b0000000002066019000000000225019f000000000562004900000000565700d900000000050660190000000005610049000000000225013f0000106f6220012c000000000706601900000000076100490000106f6530012c0000106f0100004100000000132400a90000377e0000813d000010c104000041000036570000013d000036540000413d000010d08550012a000010cf07700041000036520000813d0000364d0000413d0000000007080019000036490000413d000010c89550012a000010c707000041000010c608000041000036450000813d000010c50750009c0000000005070019000036e90000813d000010c10650009c00000000654800a9000010c10550009c000010f0678000d10000007f085002700000368c0000613d000010ef043001980000000003300049000038180000c13d000036030000213d0000106d0430009c000036260000613d000036270000c13d000000000404004b000000000406c0190000106f0550009c0000106f06004041000010ee0630009c0000106f040020410000106f0440009c0000106f054001670000106f04300197000000000304c0190000000004036019000000000445019f0000000005340049000000ff0440021200000000537300d900000000030660190000106f03600099000000000434013f0000106f6460012c00000000070460190000106f074000990000106f4340012c000000000338004b000000000806c019000000000708004b0000000006086019000000000786004900000000789700d900000000070a60190000106f07a00099000000000667013f0000106fa750012c00000000090760190000106f097000990000106f7670012c000010ee653000d1000010ee07000041000036130000813d000010c30750009c000036d50000013d000035de0000a13d0000106d0330009c000035c40000c13d000010c10750009c000037fd0000613d000037fd0000213d000037fa0000813d000010c20750009c000035b70000213d000000000506c0190000000006056019000000000756004900000000759500d900000000050860190000000005850049000000000676013f0000106f8660012c000000000908601900000000098500490000106f8710012c0000007f062002100000106f6720012c0000106d0520009c0000106d0510009c000035a50000013d0000106f8720012c0000007f061002100000106f6710012c0000106d0550009c000000000512019f0000358e0000813d000035750000c13d000000000602004b000000000601004b0004000000000002000035520000c13d000035560000613d000035580000013d000035430000c13d000035470000613d000035640000013d000035580000c13d000035340000c13d000035380000613d000000000324004b0000000c0420002900000005542000fa0000350f0000613d000000050400006b00000005423000b9000035100000a13d000035100000013d000035060000813d000c00000000001d000035000000c13d000035000000013d000c0000303400e10000000c764000fa000034f50000613d0000000c0600006b0000000c645000b9000034ff0000a13d000035000000413d000000050110006c00000005321000b90000000c0220006c0000000c241000b9000034f70000613d0000354a0000613d000034cb0000613d000034b80000c13d000034bc0000613d000b0000000a001d000034cf0000013d0000349f0000c13d0000348d0000613d000034860000613d0000346d0000613d00000000312500a9000034660000613d0000353b0000613d0000343f0000613d0000342c0000c13d000034300000613d000034450000613d0000351e0000213d0000351e0000a13d0000001f0230008c0000352c0000613d000033f40000613d000033e10000c13d000033e50000613d000400000005001d00090000000b001d000033f80000013d000033c80000c13d0000000001020436000035260000813d000010c00110009c0000000101008029000000010210006c000033a10000613d000033740000c13d000033780000613d000033650000c13d000033690000613d000033860000013d0000337a0000c13d000033560000c13d0000335a0000613d0000001d03000039000010bf0300004100000060014002100000332e0000613d0000331c0000c13d000033200000613d0000330d0000c13d000033110000613d000032fe0000c13d000033020000613d0000002a03000039000010bd03000041000010bc030000410000000403400039000a00000004001d000033340000c13d00000000010a00190000000a06000029000010be04000041000032e20000613d000032b50000c13d0000106d0240009c0000329f0000613d0000333d0000613d0000000400900443000032920000c13d000032cc0000613d00000000040b0433000000600b000039000032340000c13d00000fd70110019700000fd70010019d0000006001100270000000010220018f0000006003300210000032790000013d000000000353019f00000000033401cf000000000434022f0000010003300089000000000535022f00000000053501cf000000000501043300000003033002100000000701100029000000000414034f000032790000613d0000324e0000c13d000000000604034f0000000005170019000032520000613d00000005011002720000000204000367000700000004001d00000000041b04360000001f0310018f0000104e0530009c00000001040040390000000004b3004b00000000033b00190000003f033000390000001f03100039000032780000613d0000000001000031000032610000c13d000000040490008c0000000003040433000010bb0300004100000000002a0435000010ba0240009c000000800a400039000010500240009c0000004402000039000010b9020000410000002001400039000032140000013d0000336c0000613d0000004005300210000032100000613d000010b8010000410000000000900435000032140000a13d000033140000613d000031bc0000613d000031a90000c13d000031ad0000613d000000040b000029000031c10000013d0000318f0000c13d000000040190008c00000fd90910019700000000030004100000335d0000613d0000316c0000613d000031590000c13d0000315d0000613d000031700000013d000031400000c13d000031800000013d000031350000c13d000800080010002d0008104d30300132000800000006001d000030a10000613d000900000002001d0000304d0000013d0000304c0000613d000030570000613d000033050000613d0000300c0000613d00002ff90000c13d00002ffd0000613d000032f60000613d000030100000013d00002fc70000c13d0000334e0000613d00002f870000613d00002f740000c13d00002f780000613d000800000005001d00002f8b0000013d00002f5b0000c13d00002f9c0000013d00002f500000c13d000032c40000613d000a00000000000200002f020000c13d00000024012000390000004401200039000000640120003900002efb0000613d0000002004200039000000000014041b00002ee80000813d000000000513004b000000000304041a000000fb0400003900002ecd0000613d000000650200003900002eb00000613d00002e9e0000c13d00002ea20000613d00002e8e0000213d00002e8e0000a13d00002e900000c13d00002e900000213d00002e960000613d00002e780000613d00002e650000c13d00002e690000613d000100000005001d00020000000a001d00002e7c0000013d00002e4b0000c13d00002e400000c13d00020000000000020000013c0200003900002e120000c13d000000000112001900002e120000613d000010af0320009c00002de50000c13d00002de90000613d00002dd50000c13d00002dd90000613d00002dc60000c13d00002dca0000613d00002be00000413d0000000b0110006b000b000b0010002d00002d1c0000013d000000060320006a00002d1b0000613d00002d260000613d00002da30000413d00002dcd0000613d00002cdb0000613d00002cc80000c13d00002ccc0000613d00002dbe0000613d00002cdf0000013d00002c970000c13d00002da10000213d00002daa0000c13d00002ddd0000613d00002c570000613d00002c440000c13d00002c480000613d0000000b09000029000b00000009001d00002c5b0000013d00002c2c0000c13d00002c6c0000013d00002c210000c13d00002db60000613d00002db00000a13d00090fd90010019b00002da00000613d00002bca0000013d000000010500002900002bb00000613d00002bc50000813d00002bc50000213d00002bd00000613d000010af0310009c00002bc80000c13d000010b70400004100002b3d0000c13d00002b3d0000613d00002b150000613d00002b4c0000613d0000012e0100c0390000012f0100603900002a6b0000413d0000000602300069000000050300002900002b4c0000413d000000060120006b000000030100002900002b520000a13d00002af60000613d00002b5e0000613d0000000004420436000000010400c039000000ff0310019000002b580000813d000010b60320009c000029af0000013d00002a3d0000c13d000000040120002900002a3d0000413d00002a370000a13d00002a340000813d000000030130006c000029b40000013d00050fd90010019b00002a340000613d0000299e0000613d0000298c0000c13d000029900000613d00000000012100490000297e0000413d0000004002b000390000297c0000a13d000029760000c13d000029760000213d000029840000613d0000295e0000613d0000294c0000c13d000029500000613d00010000000b001d000029620000013d000029330000c13d0000000403b0003900000fd90130019700000000001b043500001090010000410000002401b000390000004405b00039000029120000c13d0000000501200029000029120000413d00050000000000020000287d0000c13d000028810000613d000028830000013d0000286d0000c13d000028710000613d0000288f0000013d000028730000c13d0000285e0000c13d000028620000613d00000007023000290007104d30300132000700000006001d000027eb0000613d000027990000013d000027980000613d000027a30000613d000028650000613d000027580000613d000027450000c13d000027490000613d000028560000613d0000275c0000013d000027130000c13d0000283f0000213d000028470000c13d000028750000613d000026d30000613d000026c00000c13d000026c40000613d000026d70000013d000026a70000c13d000026e80000013d0000269c0000c13d0000284e0000613d000026340000613d000026220000c13d000026260000613d000300000004001d00000000010800190000006402400039000010b501000041000000000200041000000024014000390000006002000039000026020000613d000025fa0000c13d000025fa0000a13d000025fc0000c13d000025fc0000213d00000001080000290000261a0000613d000025de0000613d000025cb0000c13d000025cf0000613d000000400440021000000000040a401900000fd70400004100000fd704a0009c0000006401100039000010b1011001970000001f01100039000100000008001d000025e40000013d000025ab0000c13d000000000003043500000000034100190000259a0000413d000000000615004b000000200550003900000000075300190000000006450019000025a10000613d000000000501004b0000006404a000390000000031080434000000000b1a0436000010b40100004100000040030000390000002401a000390000000001210019000010b1022001970000000002130019000025780000413d000000000532004b00000020022000390000000006060433000000000624001900000000051200190000257f0000613d000000000132043600000000430104340000255b0000c13d0000255f0000613d0000254d0000613d0000253a0000c13d0000253e0000613d000025610000013d0000252a0000c13d0000252e0000613d000025000000013d000024ff0000613d000024e10000c13d000025140000413d000025320000613d000024be0000613d000024ab0000c13d000024af0000613d000025220000613d000024c20000013d000024790000c13d0000250b0000213d0000250e0000c13d000025530000613d000024390000613d000024260000c13d0000242a0000613d0000243d0000013d0000240d0000c13d0000244e0000013d000024020000c13d0000251a0000613d0007000000000002000023af0000c13d000023b30000613d000023b50000013d0000239f0000c13d000023a30000613d000023910000c13d00000000322100d9000023870000613d000023890000413d000023970000613d0000235e0000613d0000234b0000c13d0000234f0000613d000023620000013d000023310000c13d000023890000213d000023890000a13d000023a70000613d0000230f0000613d000022fc0000c13d000023000000613d000023140000013d000022e10000c13d000023240000013d000022d60000c13d000022a00000c13d00000000433100d90000229f0000613d00000000413200a900000140011000390000012003100039000001200220003900000100041000390000010003200039000000e004100039000000e003200039000000c003200039000000a004100039000000a00320003900000080041000390000008003200039000000600410003900000000430204340000000f0600002900001073040000410000002001200039000009ab0000013d00000fd70420009c000010b2012001970000000d0100006b000022620000c13d0000002003100039000022590000813d000000000542004b00000001044003670000012404000039000010b001100197000000000454019f0000001105000029000021d50000c13d000021d90000613d00001d770000013d000011d40000c13d000021c60000c13d000021ca0000613d000021b70000c13d000021bb0000613d000021a80000c13d000021ac0000613d000021960000c13d0000219a0000613d000021870000c13d0000218b0000613d000021780000c13d0000217c0000613d000021690000c13d0000216d0000613d0000215a0000c13d0000215e0000613d0000214b0000c13d0000214f0000613d0000213c0000c13d000021400000613d0000212d0000c13d000021310000613d0000211e0000c13d000021220000613d0000210f0000c13d000021130000613d000021000000c13d000021040000613d000020f10000c13d000020f50000613d000020e20000c13d000020e60000613d000020d30000c13d000020d70000613d000020c40000c13d000020c80000613d000020b50000c13d000020b90000613d000020a60000c13d000020aa0000613d000020970000c13d0000209b0000613d000020880000c13d0000208c0000613d000020790000c13d0000207d0000613d0000206a0000c13d0000206e0000613d0000205b0000c13d0000205f0000613d0000204c0000c13d000020500000613d0000203d0000c13d000020410000613d0000202e0000c13d000020320000613d0000201f0000c13d000020230000613d000020100000c13d000020140000613d000020010000c13d000020050000613d000000250300003900001085030000410000108403000041000021dc0000c13d000000110200006b00000c240000613d000010720200004100001aee0000013d000001600500043d000000c00070043f000000000117004b0000000007610019000000e00060043f000000000601001900000080044002700000106403400197000001000100043d000000000401041a00001fb90000613d00001fab0000213d00001fa10000c13d00001fa50000613d00001f920000c13d00001f960000613d000010880200004100001f800000c13d00001f840000613d0000109d0200004100001089020000410000002e030000390000107b030000410000107a03000041000000000100001f000000050110027000001075011001c700001074010000410000002404200039000022410000a13d0000013d030000390000013c030000390000012e02000039000010af0430009c000010520220004100000001032000390000104e0320009c0000000f022001af00001fd00000c13d00000fd90110019800000003013000390000000101300039000000020130003900001eca0000c13d00001ece0000613d00001ebb0000c13d00001ebf0000613d00000001022061bf00001f440000613d000000000334019f000000010440c1bf0000000102002039000000110220006b00001e760000c13d00001e7a0000613d00001e7d0000613d00001e7d0000c13d000000010440a1bf000000000403001900000bec0000013d000d00010000003d00000be80000613d0000000b0100006b00001f3a0000c13d000000000201001f00000005022002700000000101006039000000010110008c000000ff0110018f00001f370000c13d000000000100041000001fb30000013d00001fa80000c13d000001200100043d000000130120002900001e6e0000613d000000130660002900001e150000613d00001e020000c13d000000130800002900001e060000613d000000100a000029000000000104401900000fd70140009c00001de40000c13d00001de80000613d0000109b02000041000010760200004100001ed10000c13d000000100120002900001ddc0000613d000000100660002900001db70000613d00001da40000c13d000000100800002900001da80000613d000000000203401900001d850000c13d00001d890000613d00001d650000c13d00001d690000613d00000af60000013d00001b1e0000413d0000000d0130006c000000a00110003900000005013002100000000f0300002900000020032000390000105a0420009c000000000243004b0000001303400029000020080000613d00001d270000613d00001d140000c13d00001d180000613d00001d2b0000013d00001cfc0000c13d00001d3b0000013d00001cf10000c13d0013104d30300132001300000006001d00001cac0000613d00001c5a0000013d00001c590000613d00001c640000613d00001f990000613d00001c190000613d00001c060000c13d00001c0a0000613d00001f8a0000613d00001c1d0000013d00001bd50000c13d00001ff90000613d00001b950000613d00001b820000c13d00001b860000613d00001b990000013d00001b6a0000c13d00001baa0000013d00001b5f0000c13d000f00000003001d00110fd90020019b3f552b660000040f000010700100004100001b070000c13d00001b0b0000613d3f5522720000040f000000a00020043f3f55381e0000040f000000e00600043d000000c00700043d000001600050043f000000000502043300000000040304330000104d2320012a3f55338c0000040f3f5529180000040f3f5522980000040f000000110110002900001d7d0000613d000000110660002900001aac0000613d00001a990000c13d000000110800002900001a9d0000613d00000040014002100000106c0000013d000001200000c13d000000140130006c000000800220003900000fd90430009c00000fd90540009c0000000004050433000000000447001900001a660000413d000000000976004b00000020066000390000000000a90435000000000a0a0433000000000a860019000000000946001900001a6d0000613d000000000487001900000000007304350000104e0940009c0000000004340019000010b1049001970000003f09900039000010b1099001970000001f097000390000104e0970009c0000000087070434000000000808004b000000000809c0190000106f0ab0009c0000106f080040410000000008a8004b000000000ba8013f0000106f0a6001970000106f088001970000106f090080410000001f0870003900000000072700190000104e0870009c0000000057020434000000a0031000390000106e0310009c000000a00330008c00000000032600490000000002520019000000000653001900000000050600190000104e0520009c00000000020604330000106d0230009c0000104e0510009c0000000006090019000010b1021001970000001f01300039000000000449001900001a220000613d00001a0f0000c13d000000050540021000001a130000613d00001d5d0000613d000010a6040000410000130c0000c13d00000012012000290000196f0000613d0000195f0000213d000019670000613d0000218e0000613d000019440000613d000019310000c13d000019350000613d000f00000009001d000019480000013d000019190000c13d000021cd0000613d000018fa0000613d000018e70000c13d000018eb0000613d000f0000000a001d000018fe0000013d000018cf0000c13d0000190e0000013d000018c40000c13d0000000f0120002900000007542000fa000018900000613d000000070400006b00000007423000b9000018910000a13d000018910000013d000018870000813d000f00000000001d000018810000c13d000018810000013d000f0000303400e10000000f764000fa000018760000413d0000000f645000b9000018800000a13d000018810000413d000000070110006c00000007321000b90000000f0220006c0000000f241000b9000018780000613d0000217f0000613d0000184b0000613d000018380000c13d0000183c0000613d0000184f0000013d000018200000c13d0000180e0000613d000018070000613d000017ee0000613d000017e70000613d000021700000613d000017c20000613d000017af0000c13d000017b30000613d000017c80000613d000021610000613d000017780000613d000017650000c13d000017690000613d0000177c0000013d0000174d0000c13d000021520000613d0000172a0000613d000021430000613d000016f60000613d000021340000613d000016b60000613d000016a30000c13d000016a70000613d000016bc0000613d000f104d40400132000016810000613d000021250000613d0000166d0000613d0000165a0000c13d0000165e0000613d000000120b000029000f00000007001d00120000000b001d000016740000613d000021160000613d0000162b0000613d000016180000c13d0000161c0000613d000f00000006001d000016310000613d000021070000613d000015e70000613d000015d40000c13d000015d80000613d000f00000005001d000015eb0000013d000015bc0000c13d001100000003001d0000001201200069000020f80000613d000015800000613d0000156e0000c13d000015720000613d000015840000013d000015560000c13d00000012023000290012104d30300132001200000006001d000014c50000613d001100000004001d000014730000013d000014720000613d0000147d0000613d000020e90000613d000014320000613d0000141f0000c13d000014230000613d000020da0000613d000b004000300218000014360000013d000013ee0000c13d000021be0000613d000013ae0000613d0000139b0000c13d0000139f0000613d001100000005001d000013b20000013d000013830000c13d000013c30000013d000013780000c13d000019c10000813d000000080120006c000013140000013d000019c10000613d0000219d0000613d000012cd0000013d000400000000001d000000020100006b0000120c0000013d000012ab0000613d00000101022001bf0000120c0000c13d0000108f0400004100000100022001bf000010b202200197000012600000c13d000012600000613d000000000302043b0000000102200367000012110000013d000010f30000813d000000120210002900001aff0000613d0000001206600029000011fc0000613d000011e90000c13d0000001208000029000011ed0000613d0000004001500210000011ce0000c13d000011d20000613d00001a080000013d0000000201000367000019f50000c13d0000106c0100004100000f810000013d000011a80000a13d0000105a0510009c00001b1c0000813d000000000134004b0000002004400039000000a00540003900000020051000390000004005100039000000400050043f000010510440009c00000f400000613d00001e510000a13d00001e510000613d000000000035043500000020054000390000ff00031001900000004003400039000000130230006a000010a30240009c000011330000c13d000011370000613d3f552dfd0000040f0000109f04000041000000000701041a00001ab60000013d000000000141001900001a850000c13d000000040330008c00000004024001bf000000000224043600000011040000290000000002150019000011d60000c13d00000000022504360000001205000029000001c00200043d000001c002100039000011c60000613d000001c006600039000010db0000613d000010c80000c13d000001e00890008c0000000009890436000010cc0000613d000001c00900003900001049011001c7000000000123204900001dbb0000013d00001d8c0000c13d000000040220008c0000000001120436000010710100004100001b0e0000c13d000011b80000c13d000010ae011001c7000000000414019f000000510100003900001061011001c7000000600220021000000000021200490000102b0000413d000000000635004b000000010550003900000000026204360000000046040434000000a0040000390000113a0000813d000000800200043d000000e00110018f0000112b0000613d00000080066000390000100a0000613d00000ff70000c13d000000000a87004b0000000007a70436000000009a09043c000000000901034f00000080088000390000000508600210000000800700003900000ffb0000613d000010a2011001c70000107a010000410000107b010000410000002e01000039000010a00200004100001b160000813d000000140120006c000010ab04000041000000000501041a000010980100004100001097010000410000002901000039000010200000a13d000010b104100197000000410160008a00000f750000413d000000000714004b000000000556043600000fd9055001970000105203000041000000a0050000390000106804000041000010a201000041000010ad010000413f552a430000040f0000108b010000410000001a0440008a001900200000003d001a00000001001d00000f290000013d00000dc90000013d00000f090000013d000000100320006a00000f080000613d00000dc90000613d00001ec20000613d00000ec80000613d00000eb50000c13d00000eb90000613d00001eb30000613d000c004000300218000d00000003001d00000ecc0000013d00000e840000c13d00001f780000613d00000e440000613d00000e310000c13d00000e350000613d0000001409000029001400000009001d00000e480000013d00000e190000c13d00000e590000013d00000e0e0000c13d000011280000813d00000dcd0000013d000011280000613d00000014011001af000000800110021000001066040000410000008006200270000010640520019700001f880000813d000000000237004b00001f880000613d000000000207004b00001065010000410000001c01000039000010640110009c001410640020019b00001e190000013d00001deb0000c13d0000000002230436000000400300043d000001600020043f000001400020043f00000000020304330000001301008029000000130210006c00000084010000390000001001100069000000100210006b000000a40230008c000010a901000041000010a801000041000012c40000c13d00000cf60000613d000100240020003d0000105e010000413f5528950000040f00000000020100190000001e0440008a001d00000000001d001e00000001001d00000d870000013d000000220440008a002100600000003d002200000001001d000011040000c13d0000109e010000410000004402100370000000640230008c3f552eb60000040f00000f870000c13d000000000212004b0000002b030000390000108703000041000010860300004100001fd30000c13d0000000e033001af00000142020000390000013f0200003900000010033001af0000014102000039000000000002041b00000014033001af000000440220037000000013044001af000000000034041b000001360400003900000012033001af000000800330021000001f870000813d000000000445004b00001f870000613d0000106405500198000000000505043b00000064052003700000106404300197000000000303043b000000840320037000000001020003670000000e0200006b000000130200006b000000140200006b000000100200006b000d00000000001d00000101011001bf0000107c011001970000001b0110008a000bff00001001940000001c0110008a0000010401100370000000e402100370000000c402100370000000a4021003700000008402100370001210640020019b000001440230008c00000f4f0000013d3f552ecf0000040f0000108c01000041000000240130008c0000100e0000013d00000fe50000c13d000000840030043f000000800040043f00000c7d0000013d000000180440008a001700800000003d001800000001001d000000240440008a002300e00000003d002400000001001d000010df0000013d000010b80000c13d000001c40010043f000001c00010043f000010310000013d00000aff0000413d000000000534004b00000060022000390000004006200039000000400550003900000fd907700197000000000662043600000000760504340000000005080433000000200880003900000080080000390000000002210436000011a50000c13d000000000505004b000000800050043f0000000d050000290000104f041001970000003f01300039000000050310021000000fd90120009c0000108a01000041000000ff01200190000000e00030043f000000c00040043f000000a00050043f000000000505041a000000010510003900000002041000390000000303100039000000270300003900000fdf0300004100000fde0300004100000fe40100004100000120001004430000000801000039000001000070044300000320003004430000030000100443000002e000400443000002c000100443000002a000500443000002800010044300000260002004430000024000100443000002200010044300000200006004430000006006000039000001e000800443000001c0006004430000004006000039000001a0006004430000018000700443000000200700003900000160007004430000014000000443000000800700043d000000a00600043d000000c00800043d000000e00100043d000001000200043d000001200500043d000001600300043d000000ff01000039000000ff019001bf00000a7f0000613d000000ff0aa0008c000000ff0a90018f00000a9b0000c13d0000ff000a900190000000000900041a000001200050043f000001600030043f000001000020043f000000c00080043f000000800070043f000000a00060043f000000020800003900000fdd020000410000105d04000041000000000262019f000000000115004b00000fd90510019700000fd90160009c000000000601043b00000fee0220009c00000f440000613d00000fed0420009c0000101e0120009c00000f2e0000613d0000101d0420009c000010030120009c00000f1b0000613d000010020120009c3f5522a60000040f000010330220009c00000f140000613d000010320420009c00001062010000410000104d0000c13d000000020110008c0000103a0000613d000000010210008c00000ff70120009c00000d8b0000613d00000ff60420009c0000106401100197000010270120009c00000d820000613d000010260120009c0000107801000041000000c00020043f000000a00030043f00000002021000390000100e0220009c00000cfa0000613d0000100d0420009c000010a4011001c7000000020100003900000002011001bf0000107c01200197000000000114019f000001430300003900000fd90000c13d0000fffe032001900000103e0220009c00000cd60000613d0000103d0420009c00000ff10220009c00000cbd0000613d00000ff00420009c000010210220009c00000cb80000613d000010200420009c000000fb01000039000010080120009c00000cb30000613d000010070120009c00000fb20000c13d000010380120009c00000cae0000613d000010370120009c3f5539890000040f00000ffc0220009c00000c960000613d00000ffb0420009c0000006503000039000000000335004b0000102c0120009c00000c860000613d0000102b0120009c000010210000013d00000f720000c13d000010130120009c00000c810000613d000010120120009c000010430120009c00000c730000613d000010420120009c00000fda0200004100000a540000c13d000000000807004b00000001044001bf00000f5f0000c13d000000ff05500190000010b0045001970000106701000041000010050120009c00000c6e0000613d000010040120009c00000a160000213d000010010120009c000008780000413d000000120110036000000fd90250009c000000000502043b000000110210036000000001010003670000001101300360001100100020002d00001f750000213d000000120430036000000001030003670012000e0020002d0000000f0100006b00001dd30000c13d0000109a010000410000000e01100029000e00240020003d00000010022000290000104e0440009c000000000441034f000010350220009c00000c3f0000613d000010340420009c00000a070000213d000010310420009c00000ff90120009c00000c3a0000613d00000ff80120009c000009e00000213d00000ff50420009c000001c00000013d000002350000413d001300130010002d000007db0000613d000007cb0000213d000007d30000613d000020cb0000613d000007b00000613d0000079d0000c13d000007a10000613d000007b40000013d000007850000c13d000021af0000613d000007660000613d000007530000c13d000007570000613d000e0000000a001d0000076a0000013d0000073b0000c13d0000077a0000013d000007300000c13d0000000e0120002900000008542000fa000006fc0000613d000000080400006b00000008423000b9000006fd0000a13d000006fd0000013d000006f30000813d000e00000000001d000006ed0000c13d000006ed0000013d000e0000303400e10000000e764000fa000006e20000413d0000000e645000b9000006ec0000a13d000006ed0000413d000000080110006c00000008321000b90000000e0220006c0000000e241000b9000006e40000613d000020bc0000613d000006b70000613d000006a40000c13d000006a80000613d000006bb0000013d0000068c0000c13d0000067a0000613d000006730000613d0000065a0000613d000006530000613d000020ad0000613d0000062e0000613d0000061b0000c13d0000061f0000613d000006340000613d0000209e0000613d000005e40000613d000005d10000c13d000005d50000613d000005e80000013d000005b90000c13d0000208f0000613d000005960000613d000020800000613d000005620000613d000020710000613d000005220000613d0000050f0000c13d000005130000613d000005280000613d000e104d40400132000004ed0000613d000020620000613d000004d90000613d000004c60000c13d000004ca0000613d000000130b000029000e00000007001d00130000000b001d000004e00000613d0000000f04000029000020530000613d000004970000613d000004840000c13d000004880000613d000e00000006001d0000049d0000613d000020440000613d000004530000613d000004400000c13d000004440000613d000004570000013d000004280000c13d001200000003001d0000001301200069000020350000613d000003ec0000613d000003da0000c13d000003de0000613d000003f00000013d000003c20000c13d0000000f05000029000003710000013d0000000d0320006a000003700000613d0000037b0000613d000020260000613d000003300000613d0000031d0000c13d000003210000613d000020170000613d000d00000009001d000003340000013d000002ec0000c13d000021a00000613d000002ac0000613d000002990000c13d0000029d0000613d000002b00000013d000002810000c13d000002c10000013d000002760000c13d000001c00000613d000002170000613d0000000202000029000001c50000013d000200000000001d000012080000c13d000000140100006b0000108d010000410000001501000039000000000402043b000010290220009c00000c2e0000613d000010280420009c000009d30000213d000010250420009c000010100120009c00000baf0000613d0000100f0420009c000009ad0000213d0000100c0420009c00000f930000813d0000017e0000413d000000140110006b000010aa01000041000010400220009c00000ba30000613d0000103f0420009c0000098a0000213d0000103c0420009c000010940000c13d00000ff30220009c00000b9e0000613d00000ff20420009c000009770000213d00000fef0420009c000010230120009c00000b8b0000613d000010220120009c000009640000213d0000101f0420009c0000107702000041000010670000c13d000000000103004b0000106a01000041000000840230008c0000100a0220009c00000b770000613d000010090420009c0000095b0000213d000010060420009c000008bf0000213d000010000420009c00000f180000013d0000103a0220009c00000b570000613d000010390420009c000009400000213d000010360420009c000008390000213d000010300420009c000000800110027000000ffe0120009c00000b4c0000613d00000ffd0120009c000009260000213d00000ffa0420009c0000082e0000213d00000ff40420009c000000200440008a001f00a00000003d002000000001001d0000102e0120009c00000b470000613d0000102d0120009c000009060000213d0000102a0120009c0000018c0000213d000010240420009c000010150120009c00000b420000613d000010140120009c000008f50000213d000010110120009c000001810000213d0000100b0420009c000000f60000213d00000fff0420009c000010840100004100001085010000410000002501000039000010530000c13d0000003302000039000010450220009c00000b370000613d000010440420009c000008ec0000213d000010410420009c0000015d0000213d0000103b0420009c000000df0000213d0000102f0420009c000000160440008a001500c00000003d001600000001001d00000fec0120009c00000b100000613d00000feb0420009c00000adc0000613d00000fea0420009c00000a280000a13d00000fe90420009c0000012e0000a13d00000fe80420009c000000ce0000a13d00000fe70420009c000000ac0000a13d00000fe60420009c00000a550000013d000000010800003900000fdc0700004100000a4c0000c13d000000000707004b000008e70000613d000000000806004b000001c00700043d000001e00300043d000002000500043d000002200400043d000000000336004b000000000306004b000002400600043d000001a00200043d000001800100043d000000e00130008c0000018004400039000000530000613d000000410000c13d000000000865004b000000000585043600000180064000390000018005000039000000450000613d000001800220003900000fd802200197000000f20000013d0000101c0220009c00000ad00000613d0000101b0420009c00000aaf0000613d0000101a0420009c00000a1f0000a13d000010190420009c000001230000a13d000010180420009c000000bb0000a13d000010170420009c000000850000a13d000010160420009c0000006c0000213d00000fe50420009c000000e002200270000000330000c13d000100000001035500020000003103550024000000000002026f0f7b0018001b001a0f7a0f7900010f78048d01ac01ed002501ec0f770f760f750f740f730f720f710f700f6f0f6e0f6d0f6c0f6b0f6a0f690f680011011500250069005700110180007b010a00d3001600a70007000b017f000900f401090064003c0f67006900570011048c0f660f6501ac048b048a01eb0f640f630f62000d04890f610f600f5f04880f5e01ea04870f5d0486048504840007048304820481030700f30f5c00250f5b008c00160f5a048000160f590f58008b026e0f5700110f560f550f540f530f520f510f500f4f0f4e0f4d0f4c0f4b0f4a0f490f480f470f460f450f440f430f420f410f400f3f001100560023001100310f3e0f3d017e017d017c0f3c03060f3b0f3a0f390f380f370f360f350f340f33001100b2002500690057001100a70007008c00160f32008f00a6047f0305030400c10f3101e9008601e8026d0f3001e70f2f01e60f2e0303030200130f2d0f2c0f2b0f2a0f290f280f270f260f250011005600230011013201310f240f230f220f210f200f1f0f1e001100560023001100310f1d0f1c017e017d017c0f1b03060f1a0f190f180f170f160f150f14001100560023001101ab000c0f13008601aa00870f120f110f100f0f0f0e0f0d0f0c001100b2002500690057001100a70007008c0016000b00c0000900f401090f0b0f0a0f090f080f070f060f050f0400110f03002500690057001100e6007b010a00d300160180007b013000d300160301007b0157047e0007015601a90029047d00860f020108047c026c0081012f03000f010f0000340eff00e50efe0efd0efc0efb0efa0011005600230011047b01310ef90ef80ef70ef60ef5001100b2002500690057001100a70007008c0016000b012e000900040006000200030008000a00050001001500070036047a0ef4003b00300031002c01a900420004000600020003003a003900050001005104790ef30ef20ef10ef00eef0011011500250069005700110180007b013000a7000700bf00e40029047800860eee01080081012f02ff000c0eed0eec02fe000c04770eeb0034047600e50eea0ee90ee80ee70ee600110056002300110475012d0ee50ee40ee30ee20ee100110115002500690057001100e60ee001e50024026b0474026a00110180007b02690016026802670266026501ea000701560264001604730155017b02fd00e3001600e400290edf00860ede01080081012f0edd0edc047202630edb0eda0ed9010701e4047102fc01e3017b02fd008a017a000700bf008900160037000b00c0000900040006000200030008000a000500010015000700360262047002610179004102fe000c02fb01a802fa02f9015401e2008f026000d20095046f02f8008f00d102f701e1000c00230ed80132000c000b017f000900040006000200030008000a00050001001500070064003c000900040006000200030008000a0005000100150007003601e00179004100340099000600020033007f004700320085005500db007a012c02f601df004600840015007e017a000701de008900160106000c01dd00230ed700240106000c00d101a7025f01dc000c002a00bf000b0040000900040006000200030008000a0005000100150007025e00da000c007d025d003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50ed6003b00300031002c00be00420004000600020003003a00390005000100510007008a0ed500a400bd0114000400500ed400350020001200100ed300bc003e00bb0083003f00020003007c004a025c046e0005025b025a0018001b001a002b0012001000770ed20078008e0076007500940ed100740ed000210073008d007200710070006f0028006e006d006c006b00680027001900010ecf00260093010500670024004f0082002e0001009700290020002500b1008a0089001600f2000c00d000ba002a00cf002c000400060002000300b000af00050001005100070023001500a4015301db007e002a0178008a0065000400a300ae0ece01da002e010400b901a6007e006500350020001200100ecd046d02f500bc003e00bb046c003f00020003025900380ecc00460018001b00b8001a001900010ecb025801520113002e00ad00b900a2007e006600040006000200030259003800a3000502f40018001b001a002b00120010007702570eca0078008e0076007500940ec900740ec800210073008d007200710070006f0028006e006d006c006b00680027001900010ec700260049012b00e2002e00290020002500b100cf007e000b00a1000900040006000200030008000a00050001001500070036011200a0010300a00ec6046b007e000b00a1000900040006000200030008000a00050001001500070112010202f300b7000c00c100f10ec50ec4015101110150004800f00ec3002402f3007900ac012a00ef008b00b600ab004800410037000b0040000900040006000200030008000a00050001001500070079000c008a0088000900040006000200030008000a000500010015000701d9003c000900040006000200030008000a0005000100150007007900800041012900360256000c02f200d2009202f10ec2046a0469009f04680467002a046600a2000400a600500ec10035014f011000100ec000ce003e00cd012800d900020003012701770465000502f00018001b001a01d801100010007700210ebf0464000d0096000f000e00170ebe00740ebd0073014e007200710070006f0028006e006d006c006b00680027001900010ebc00260255010100670024004f0082002e000100970029014f002501a5046300e1013000cf00a50103003b00300031002c00e400420004000600020003003a0039000500010051025400a40253011401d701d9002f00a30ebb01a402ef0eba0004006400500eb900350020001200100eb800bc003e00bb0083003f00020003007c0038025c02ee000502ed025a0018001b001a002b0012001000770eb70078008e0076007500940eb600740eb500210073008d007200710070006f0028006e006d006c006b00680027001900010eb400260049046202520024004f0251002e0001009700e000d800250250024f024e0461014d006400ae0eb30176009e01750033014c014b014a0098004a04650eb2000501d602f00018001b001a002b0012001000770eb1007801a30076007501490eb000740eaf00210073014e007200710070006f0028006e006d006c006b00680027001900010eae0026004902ec0460002e02eb00d80025045f01d5045e045d0ead02ea014d006400ae0eac024d02e9009e02e80033014c014b014a009800380eab0eaa000501d60ea90018001b001a002b0012001000770ea80078045c0076007501490ea700740ea600210073045b007200710070006f0028006e006d006c006b00680027001900010ea500260049045a0459024c002e010400d8002501d4045802e70ea40457026a004801d3008f02e6045602e50ea3024b00a602e40ea201a2009e01a1003300ee01d2024a0098004a025c024d000501a0025a0018001b001a002b0012001000770ea10078008e0076007500940ea000740e9f00210073008d007200710070006f0028006e006d006c006b00680027001900010e9e00260049012b00e2002e00290020002500b1008a008900160174000c00d000ba002a0148002c000400060002000300b000af000500010051000700230015012602e300f301470080002f0004014600500e9d00ee003e017302e20083003f00020003007c0038004602490018001b00b8001a001900010e9c0172002e01450174000c00d000ba002a0171002c000400060002000300b000af000500010051000700230015012602e102e0014801470064002f00040113005002e20e9b00ee003e01730083003f00020003007c0038004602490018001b00b8001a001900010e9a0172002e007e002902df002e00800248002902470125009902460170009904550144009902450143009901290036009202440100000400a600500e9900350020001200100e9800ce003e00cd012800d9000200030127004a02de019f0005016f02430018001b001a002b0012001000770e97007801a30076007501490e9600740e9500210073014e007200710070006f0028006e006d006c006b00680027001900010e9400260049024204540024004f0453002e00010097010400d8002501a5024100160240016e023f04520178023e014d023d00ae01d10e9301a2009e01a10033014c014b014a00980038023c02dd000501d0023b0018001b001a002b0012001000770e920078008e0076007500940e9100740e9000210073008d007200710070006f0028006e006d006c006b00680027001900010e8f00260049012b00e2002e00290020002500b101710037000b0040000900040006000200030008000a000500010015000700aa003604510450023a0e8e044f009500480142016d01240e8d014100950048012301cf00660037000b0040000900040006000200030008000a0005000100150007003604510450023a0e8c044f009500480142016d01240e8b01410095004801230140006600a40239011401d70064002f000400ff00500e8a00350020001200100e8900bc003e00bb0083003f00020003007c0038023c019f0005044e023b0018001b001a002b0012001000770e880078008e0076007500940e8700740e8600210073008d007200710070006f0028006e006d006c006b00680027001900010e8500260093010500670024004f0082002e0001009700290020002500b100c10e840e8302380e8200480e8101ce02370e8000480236044d01cd02350e7f02340e7e0e7d02dc02db0e7c0e7b023300480e7a0e79012200e10023002d00240e78002d00240e77044c00b501cc0e7600ed0e75023200240e740e730e720e710e700231004800f00e6f013f008b00b600ab0048010f00a202f3025800a200fe002f003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50e6e003b00300031002c00be00420004000600020003003a003900050001005100a400070e6d009200bd0100000400500e6c00350020001200100e6b00ce003e00cd0083003f00020003007c004a0e6a01cb000502f402ed0018001b001a002b0012001000770e69007801a30076007501490e6800740e6700210073014e007200710070006f0028006e006d006c006b00680027001900010e66002600490242044b002d00ec024c002e00eb0097010400200025009d008c00160230044a019e016c022f0e6500350020001200100e6401a2009e01a10033016b00ea019d0098004a02da01cb000501a001d60018001b001a002b0012001000770e630078008e0076007500940e6200740e6100210073008d007200710070006f0028006e006d006c006b00680027001900010e6000260093010500670024004f0082002e000100970029002000250250022e0016019c02d9019c04490e5f022d044804470446044504440443022c04420e5e008004410440016a0e5d011101690048007e002f01ab000c02d802d700fd022b0064003c019b019a008a00040006000200030008000a000500010015000701d9003c000900040006000200030008000a000500010015000700aa008000410037000b0040000900040006000200030008000a000500010015000700b7000c0e5c0477002d00ec00eb00480037000b0040000900040006000200030008000a000500010015000700b70080004100fc0107043f0e5b0e5a0e590e580e570e560e55001100560023001102d601310e540e530e520e510e5000110115002500690057001100e6007b0269001602680267026602650e4f022a04740e4e001604730064043e0e4d030500160180007b02690016026802670266026501ea000701de026400160e4c0229017b0e4b00e3001600e4002901e800860e4a01080081012f006402d50e490e480263043d019900300004000600020003016801670005000100510064043e0e470e460e45022a000702e202d40e440e430e420007008c0016000b012e000900040006000200030008000a0005000100150007008000410e410e400e3f0e3e00160e3d000700140066012100320120007f004700320085005500db007a012c02d300460084001500640107010a02d50e3c02d20e3b0e3a0e390e380e37001100560023001100e40029043c00860e3601080081012f02d10034043b043a0e350e340e330e3201ca002f000600020033007f004700320085005500db007a00d7043902d00e310e3000340e2f00e50e2e0e2d0e2c00110056002300110129012d0e2b0e2a0e29001100560023001102cf01c90086003c022802270e2802ce04380e270e260e250e24001100560023001101c8003602cd047f0e2303040e2202cc02cb01ca022600410004000600020003013e007a019802ca00d600460084001502d20e210e200e1f00110115002500690057001100e6007b043700d300160166000700bf008900160436008a02c9007e00640e1e01c70e1d0e1c0e1b00110056002300110197000b012e000900040006000200030008000a00050001001500070036047a0e1a0034043500e50e190e180e1700110056002300110e1601310e150e140e13001100b2002500690057001100a7000700bf00890016043402d10037043301c70e120e110e10001100b2002500690057001100a70007008c0016000b02c8000900f40109012d0e0f0e0e0e0d001100b2002500690057001100a70007008c001604320e0c0e0b0e0a02cc02cb0e0904310e080e0702250e06008600040006000200030e05007a00d7043002d00e040e030e0200110115002500690057001100e6007b048000160166000700bf00890016003c0088000900f401090064003c000900f401090e01008f016500d2000c00860e000dff0dfe00870dfd0dfc0dfb001100560023001101ab000c0dfa008601aa00870df90df80df70011005600230011003b00300031002c00f400420004000600020003003a003900050001005100070df60df50df40df30df2003000040006000200030168016700050001005104790df10df00def001100b2002500690057001100a70007008c00160dee01c70ded0dec0deb001100560023001100f2012d0dea0de90de8001100560023001101c8012d0de70de60de5001100b2002500690057001100a70de40de3001601c8000c0de201970de103040224003602260de000410004000600020003013e007a01980ddf00460084001502d200340dde002f000600020033004a00130ddd0ddc0ddb0dda042f0dd90dd80dd7042e0dd60dd50dd40dd30dd20dd10dd002250dcf00140066012100320120007f004700320085005500db007a00d704300046008400150dce042d0dcd0dcc0dcb0dca0dc90dc80dc70dc60dc50dc40dc30dc20dc10dc00dbf0dbe0dbd00810dbc0dbb02ce0dba0db900e40db80db701a90db60db50db40db30db20db10087003401640db0004e010e0daf004e010d0dae004e0163002f011f0162004e0006000200330223001300b2002500690057001100a70007008c0016000b0040000900f40109011f008f0dad00d20dac016e0dab0daa000c00860da90da80da70da6002d022202c70da5008700b2002500690057001100a70007008c001602c9002d008700b2002500690057001100a701ec0da400160106000c01480264002e01430da30da20da1042c002e042b00290da00d9f0d9e0d9d02280d9c042a004e02c6016a0429013d0d9b0d9a0d990d9804280d9704270d9604260d9501cd0d9400540d9304250d920d910d900115002500690057001100e6007b010a00d3001601660007008a00890016042400290423042204210420041f041e041d041c041b041a02530d8f007e0d8e0004006400500d8d02c501c602c40d8c00560023001100310d8b0d8a017e017d017c0d89030600560023001102fe01310056002300110419012d00560023001100310d880d87017e017d017c0d860d8500b2002500690057001100a7000700bf00890016012900360418000c02c300d204170d8402210d8301e7003701e6000400a600500d820035014f011000100d810115002500690057001100e6007b010a00d3001601660007008a00890016043400370080043301c70d80002500560023001100e40029047800860d7f01080081012f0416017a00070d7e002d00870056002300110224012d00b2002500690057001100a70007008c0016000b00a10d7d0d7c002500690057001100e6007b010a00d300160180007b013000d300160301007b0d7b02c200160d7a007b02c200160d79007b019600d300160d78007b019500d300160d77007b02c100d300160d760007025e0089001604150d750414041301480d74041204150d7304140143007d041201430d720d710d7002250d6f02200d6e02200d6d02200d6c02200d6b0d6a0d690d680d670d660d650d640d630d620d610d600d5f0d5e02c302cc02cb0d5d01ca0d5c007b02f2015401d3011e01940d5b013c04110d5a0d59011e01940d58013c0d57011e01940410013c0d56011e01940d55013c01c50d54003401640d53004e010e0d52004e010d0d51021f0056002300110224000c016c01970d500d4f0d4e002d008700560023001102ff01310d4d002500690057001100e6007b010a00d300160d4c007b01300166000700cf01a90029047d00860d4b0108047c026c0081012f0037000b0040000900040006000200030008000a00050001001501ec021e000c007d0d4a003401c400e5005600230011021d013100560023001100310d490d48017e017d017c0d4701eb02c002bf0d46005600230011040f012d00560023001100310d450d44017e017d017c0d4301eb02c002bf008601aa00870115002500690057001100e6007b043700d30016016600070d4200890016043600bf013002be003700800d41002d00870056002300110418013100560023001101e101310056002300110256012d00b2002500690057001100a70007008c0016000b00c0000900f40109000c040e0024026b040d01c5002d022201080d40008700b2002500690057001100e6007b02690016026802670266026501ea000701c3026400160d3f01e3017b040c00e30016021d000c00230d3e0132000c00230d3d0d3c00860d3b00130d3a002500690057001100e6007b010a00d300160180007b013000d300160301007b0157047e00070156042400290423042204210420041f041e041d041c041b041a0037000b0040000900040006000200030008000a000500010015000700b7000c021c0088000900040006000200030008000a00050001001500070080003c000900040006000200030008000a000500010015000700aa000c0d3901030d38026c0d37017a0007008a003b00300031002c00e400420004000600020003003a003900050001005100070d360d3502c701610112040b040a040902bd0d340d3302c600df0d32040800df0407021b00e104060037040502300d3102bc0d300195019e016c022f0d2f02c501c602c40d2e0056002300110174000c002a008601aa00870115002500690057001100e6007b0d2d02c2001601660007008a0d2c001600e400290d2b00860d2a01080081012f003404040d290d28010f0d270d260403008f00fb003f00020033019e016b00ea019d009800db0d250d24007a02bb0d23004600840015007e0d220d21040300cc0106000c01de00230d2000240d1f00a3010702d50d1e0106000c00d101a7015701dc000c002a00bf000b0040000900040006000200030008000a0005000100150007015600da000c007d025d003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50d1d003b00300031002c00be00420004000600020003003a0039000500010051000700bf0d1c00a400bd0114000400500d1b00350020001200100d1a00bc003e00bb0083003f00020003007c004a0d190402000502f00d180018001b001a002b0012001000770d170078008e0076007500940d1600740d1500210073008d007200710070006f0028006e006d006c006b00680027001900010d1400260093010500670024004f0082002e0001009700290020002500b100bf0089001600f2000c00d000ba002a008a002c000400060002000300b000af00050001005100070023001500a4015301db0037002a017800bf00650004008000ae0d1301da002e010400b901a60037006500350020001200100d1202ee0d1100bc003e00bb0d10003f000200030401003802ba00460018001b00b8001a001900010d0f02b9015202b8002e00ad00b900a2003700660004000600020003040100380080000502b70018001b001a002b00120010007701a00d0e0078008e0076007500940d0d00740d0c00210073008d007200710070006f0028006e006d006c006b00680027001900010d0b00260049012b00e2002e00290020002500b1008a0037000b00a1000900040006000200030008000a00050001001500070036010f00a0010300a00d0a01950037000b00a1000900040006000200030008000a0005000100150007010f0102015500b7000c00c100f10d090d08015101110150004800f00d0700240155007900ac012a00ef008b00b600ab004800410d060056002300110400000c007d0d0500560023001100310d040d03017e017d017c0d0201eb02c002bf0023002d0222008601aa008700b2002500690057001100a7000700bf0089001600e40029043c00860d0101080081012f00370d00002d008700b2002500690057001100a70007008c0016000b012e000900f40109000c008601aa008701e9008601e8026d01e70cff01e60cfe001301ca002f000600020033007f004700320085005500db007a00d70cfd004600840015002d00870cfc0cfb013d03ff043a0cfa0cf9021a04250cf80cf70cf60cf5042c0cf4004d000b00d5004c004b001301e9008601e8026d0cf301e70cf201e60cf103030302001302d603fe047b0cf000340080002f000600020033007f004700320085005500db007a02bb0cef0404004600840015007e02f800cc003701e200cc002d0087010a0199003000040006000200030168016700050001005101ec01300cee0103003b00300031002c01a900420004000600020003003a0039000500010051010f03fd000700a50ced00340cec00e501e9008601e8026d0ceb01e70cea01e60ce9030303020013003f000200030ce800050018001b001a01d801100010006300620ce70ce60ce50ce40ce30ce20ce10ce00cdf00530cde00610060005f0cdd005e005d005c0028005b005a0059005800540027001900010cdc00260cdb021b0029014f002503fc0cda008a015700a50cd9004d000b009c004c004b0013042b0029002f03fb042a004e03fa016a04290cd801600cd704280cd60cd50cd40cd30cd2004700320cd1003f0002003300550087019900300004000600020003016801670005000100510007001400660121003201200cd00087004d000b0ccf004c004b001303f9011e03f80cce03f702b6040d010800040006000200030ccd007a00d703f60046008401c201c10419000c002a01690ccc007e002a01de000b0040000900040006000200030008000a000500010015001401950007017100da025e000c0148007d0ccb0cca01930cc90125021e01d9002f000400640cc80cc702c501c602c40cc6010a019900300004000600020003016801670005000100510007008a003b00300031002c01a900420004000600020003003a0039000500010051010f03fd025400a0002d0cc501c7003f000200030cc400050cc30018001b001a002b00120010006300620cc2000d04890cc10cc00cbf00530cbe00610060005f0cbd005e005d005c0028005b005a0059005800540027001900010cbc002600490cbb015701ac03f500250cba0195024e0cb90cb80196024b006400500cb70cb6019601ac00a300df015701d50cb50cb402c10cb3010f004e007f03000cb20cb10cb000290caf0037019602c9015503fe00aa021c0cae003403f4010f004e00a3002f000600020033007f00470032008500550008007a02bb0cad01df00460084001500fd016100cc007e019300cc0cac002d00870014001f001e00210cab0045000d001d000f000e00170caa001c003d00fa003b00300031002c02ce00420004000600020003003a0039000500010051000701560037000b012e000900040006000200030008000a0005000100150007000c021c00c0000900040006000200030008000a00050001001501260ca9002e01120ca800070ca700ad000c0ca6008b026e0ca504020ca4007d008b026e009f0ca303f30ca20037000b012e000900040006000200030008000a0005000100150007013b00340099000600020033007f004700320085005500db007a012c02d301df004600840015007e00e100230ca1003703f2002d00870ca0002e013d03f10c9f0c9e03f00c9d03f000990c9c00650c9b0c9a0c9900340c980c970c96040f003600a40c9501a601d700fb000400a600500c940c9300350c920014001f001e0c9100440043000d001d000f000e00170c90001c003d002100fa0c8f00ee01d2024a0098004a00050018001b001a002b001200100063006203ef0c8e000d0c8d000f000e00e90c8c00530c8b006100600c8a005f005e005d005c0028005b005a0059005800540027001900010c89002600490c88019601ac00d80c8701c104720263043d0c8600640107010a047102fc0037017b02fd00cf017a0007008c0016000b00c0000900040006000200030008000a00050001001500a30c850c840007000c040e02bc0c8301c50c8203ee0016021900c0000900040006000200030008000a000501c000010015000700360c810c800041026002b502fb01a802fa01540218008f019201a802b402f9015401e2008f00d102f70004000600020003013e007a012c0c7f004600840c7e01c103ee0016021900c0000900040006000200030008000a000501c000010015000700360262047002610c7d0041026002b502fb01a802fa015401e2008f00d102f702d6000c0218008f00a5046f01e1000c00230c7c0132000c000b017f000900040006000200030008000a0005010f0001001500070219000900040006000200030008000a000501c0000100150007003601e00179004100340217002f000600020033007f004700320085005500db007a012c02f600460084001500fd017a0007008c001603ed0c7b0c7a02630c790c78015f0107015e03ec02fc03eb017b040c017a0007008a00890016007e000b00c0000900040006000200030008000a0005000100150007000c007d0c770132000c000b017f000900040006000200030008000a00050001001500070080003c000900040006000200030008000a0005000100150007000c007d03ea0106000c010c00230c7600240c75000700aa00a30041019301070c740c730106000c00d101a7019501dc000c002a00bf000b0040000900040006000200030008000a000500010015000700da000c007d03e9007e000b00c0000900040006000200030008000a0005000100150007000c007d03e90037000b0040000900040006000200030008000a000500010015000701de00da000c007d025d003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50c72003b00300031002c00be00420004000600020003003a0039000500010051000700cf0c7100a400bd0114000400500c7000350020001200100c6f00bc003e00bb0083003f00020003007c004a02b30c6e000503ef02b20018001b001a002b0012001000770c6d0078008e0076007500940c6c00740c6b00210073008d007200710070006f0028006e006d006c006b00680027001900010c6a00260093010500670024004f0082002e0001009700290020002500b100cf0089001600f2000c00d000ba002a0156002c000400060002000300b000af00050001005100070023001500a4015301db00fd002a017800cf00650004016100ae0c6901da002e010400b901a600fd006500350020001200100c6801cb03e800bc003e00bb0c67003f0002000303e7003802da00460018001b00b8001a001900010c6603e601520146002e00ad00b900a200fd0066000400060002000303e700380161000501d60018001b001a002b00120010007702430c650078008e0076007500940c6400740c6300210073008d007200710070006f0028006e006d006c006b00680027001900010c6200260049012b00e2002e00290020002500b1015600fd000b00a1000900040006000200030008000a0005000100150007003601bf00a0010300a00c6103e500fd000b00a1000900040006000200030008000a000500010015000701bf0102022900b7000c00c100f10c6003e4015101110150004800f00c5f00240229007900ac012a00ef008b00b600ab004800410037000b0088000900040006000200030008000a00050001001500070080003c000900040006000200030008000a00050001001500140216002e0007019100ad00ac01be016500d20c5e009f01bd0079000c015700660037000b0040000900040006000200030008000a00050001001500a300df00070079000c013f010301bf00b50215021400d10c5d021300e300480037000b0088000900040006000200030008000a0c5c000501120c5b0001001500070080003c000900040006000200030008000a000500010015000700ac0c5a00ef008b00b600ab004800410037000b0040000900040006000200030008000a00050001001500070079000c00cf0088000900040006000200030008000a00050001001500070080003c000900040006000200030008000a0005000100150007007900a300410037000b0040000900040006000200030008000a0005000100150007025e00da000c007d03e3007e000b00c0000900040006000200030008000a0005000100150007000c007d03e3012900360256000c02f200d2009202f101c0046a0469009f04680467002a046600a2000400a600500c590035014f011000100c5800ce003e00cd012800d9000200030127017703e20005025b0018001b001a01d801100010007700210c570464000d0096000f000e00170c5600740c550073014e007200710070006f0028006e006d006c006b00680027001900010c5400260255010100670024004f0082002e000100970029014f002501a5046300e10157015600a50103003b00300031002c00e400420004000600020003003a0039000500010051025400a40253011401d70080002f01610c5301a402ef0c520004006400500c5100350020001200100c5000bc003e00bb0083003f00020003007c003802b30c4f000502b102b20018001b001a002b0012001000770c4e0078008e0076007500940c4d00740c4c00210073008d007200710070006f0028006e006d006c006b00680027001900010c4b00260049046202520024004f0251002e0001009700e000d800250250025f024e0461014d006400ae0c4a0176009e01750033014c014b014a0098004a03e20c49000502b0025b0018001b001a002b0012001000770c48007801a30076007501490c4700740c4600210073014e007200710070006f0028006e006d006c006b00680027001900010c450026004902ec0460002e02eb00d80025045f01d5045e045d024902ea014d006400ae0c44024d02e9009e02e80033014c014b014a009800380c430c42000502b00c410018001b001a002b0012001000770c400078045c0076007501490c3f00740c3e00210073045b007200710070006f0028006e006d006c006b00680027001900010c3d00260049045a0459024c002e010400d8002501d4045802e70c3c0457026a004801d3008f02e6045602e50c3b024b00a602e40c3a01a2009e01a1003300ee01d2024a0098004a02b3024d000501a002b20018001b001a002b0012001000770c390078008e0076007500940c3800740c3700210073008d007200710070006f0028006e006d006c006b00680027001900010c3600260049012b00e2002e00290020002500b100cf008900160174000c00d000ba002a0148002c000400060002000300b000af000500010051000700230015012602e300f3014700a3002f0004014600500c3500ee003e017302af0083003f00020003007c0038004602ae0018001b00b8001a001900010c340172002e01450174000c00d000ba002a0171002c000400060002000300b000af000500010051000700230015012602e102e0014801470064002f00040113005002af0c3300ee003e01730083003f00020003007c0038004602ae0018001b00b8001a001900010c320172002e00fd002902df002e00a30248002902470125009902460170009902ad02ac02450143009901290036009202440100000400a6005003e10c3100350020001200100c3000ce003e00cd012800d9000200030127004a02de019f0005016f02430018001b001a002b0012001000770c2f007801a30076007501490c2e00740c2d00210073014e007200710070006f0028006e006d006c006b00680027001900010c2c00260049024204540024004f0453002e00010097010400d8002501a5024100160240016e023f04520178023e014d023d00ae01d10c2b01a2009e01a10033014c014b014a00980038023c02dd000501d0023b0018001b001a002b0012001000770c2a0078008e0076007500940c2900740c2800210073008d007200710070006f0028006e006d006c006b00680027001900010c2700260049012b00e2002e00290020002500b101710037000b0040000900040006000200030008000a000500010015000700aa003603e003df023a0c2603de009500480142016d01240c25014100950048012301cf00660037000b0040000900040006000200030008000a0005000100150007003603e003df023a0c2403de009500480142016d01240c2301410095004801230140006600a40239011401d70064002f000400ff00500c2200350020001200100c2100bc003e00bb0083003f00020003007c0038023c019f0005044e023b0018001b001a002b0012001000770c200078008e0076007500940c1f00740c1e00210073008d007200710070006f0028006e006d006c006b00680027001900010c1d00260093010500670024004f0082002e0001009700290020002500b100c10c1c0c1b02380c1a00480c1901ce02370c1800480236044d01cd02350c1702340c160c1502dc02db0c140c13023300480c120c11012200e10023002d00240c10002d00240c0f044c00b501cc0c0e00fc0c0d023200240c0c0c0b0c0a0c090c080231004800f00c07013f008b00b600ab0048011200a20229025800a200fe002f003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50c06003b00300031002c00be00420004000600020003003a003900050001005100a400070c05009200bd0100000400500c0400350020001200100c0300ce003e00cd0083003f00020003007c004a0c0201cb000502f402b10018001b001a002b0012001000770c01007801a30076007501490c0000740bff00210073014e007200710070006f0028006e006d006c006b00680027001900010bfe002600490242044b002d00ec024c002e00eb0097010400200025009d008c00160230044a019e016c022f0bfd00350020001200100bfc01a2009e01a10033016b00ea019d0098004a0bfb01cb000501a002b00018001b001a002b0012001000770bfa0078008e0076007500940bf900740bf800210073008d007200710070006f0028006e006d006c006b00680027001900010bf700260093010500670024004f0082002e000100970029002000250250022e0016019c02d9019c04490bf6022d044804470446044504440443022c04420bf500a304410440016a0bf401110169004800fd002f01ab000c02d802d70155022b02b802ab02c1008f01960064003c019b019a00cf00040006000200030008000a00050001001500070080003c000900040006000200030008000a000500010015000700aa000c01bf01a4010302aa0bf300670024004f0001004801d900cc0037000b0088000900040006000200030008000a00050001001500070080003c000900040006000200030008000a000500010bf201c1021d000c00c101a803dd02a900cc0132000c000b017f000900040006000200030008000a00050001001500070080003c000900040006000200030008000a0005000100150007003601e0017900410004000600020003013e007a012c0bf101c00046008403ea01c100bc02ba003e00bb012800d9000200030127003800050018001b00b8001a001900010bf002b7048b048a0bef0bee008d0078008e0076007503dc0bed04880bec01eb01ea0beb04870486048504840007048304820481030700f30bea0be90be8010500670024004f0be7002e0001009700290be6001600d800250be50be400160be30be20be10be003db00160bdf00250bde002e0bdd00ad0bdc0bdb00160bda0bd9001703da0bd80bd70bd60bd50bd403d90bd30bd20bd10bd000110bcf0bce002e0bcd0bcc0bcb0bca0bc90bc8002e01450bc70bc603d8001603d703d60bc500d60bc40bc30bc20bc10bc00bbf0bbe0bbd02ac03d50bbc0bbb001602a802a700b50bba001603d4009f03d303d203f103d1021b0bb900df002f0bb80bb70bb60bb500470032008500a90038006400050018001b001a002b001200100063006202b10bb4000d0bb3000f000e00e90bb200530bb1006100600bb0005f005e005d005c0028005b005a0059005800540027001900010baf002600490bae002900200025015503d000fd0bad0064003c019b019a00cf00f401090080003c000900f4010900aa000c042f0037000b0040000900f4010900b7000c026c007e0bac0bab00a30baa02bc02c70193040b040a040902bd0ba9042e02c60ba80ba7040800df0407021b00e104060ba60ba50037008002b90ba40ba30086003400bf048d0ba2030002a60006000201bc01bb00ea021200a900870014001f001e00210ba10045000d001d000f000e00170ba0001c003d00fa0b9f01930066012100320120004a001301970b9e019703ed002d00870b9d008b0106000c00e301a70b9c03cf000c002a00bf000b0040000900040006000200030008000a0005000100150007021c00da000c007d025d003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50b9b003b00300031002c00be00420004000600020003003a00390005000100510007008a0b9a00a400bd0114000400500b9900350020001200100b9800bc003e00bb0083003f00020003007c004a025c046e0005025b025a0018001b001a002b0012001000770b970078008e0076007500940b9600740b9500210073008d007200710070006f0028006e006d006c006b00680027001900010b9400260093010500670024004f0082002e0001009700290020002500b1008a0089001600f2000c00d000ba002a00cf002c000400060002000300b000af00050001005100070023001500a4015301db007e002a0178008a0065000400a300ae0b9301da002e010400b901a6007e006500350020001200100b92046d02f500bc003e00bb046c003f000200030259003802da00460018001b00b8001a001900010b9103e601520113002e00ad00b900a2007e006600040006000200030259003800a3000501d60018001b001a002b00120010007702570b900078008e0076007500940b8f00740b8e00210073008d007200710070006f0028006e006d006c006b00680027001900010b8d00260049012b00e2002e00290020002500b100cf007e000b00a1000900040006000200030008000a00050001001500070036011200a0010300a00b8c03e5007e000b00a1000900040006000200030008000a00050001001500070112010203ce00b7000c00c100f10b8b03e4015101110150004800f00b8a002403ce007900ac012a00ef008b00b600ab004800410037000b0088000900040006000200030008000a00050001001500070161003c000900040006000200030008000a00050001001500140216002e0007019100ad00ac01be016500d202af009f01bd0079000c013000660037000b0040000900040006000200030008000a000500010015008000df00070079000c013f0103011200b50215021400d10b89021300e300480037000b0088000900040006000200030008000a0b880005010f0b870001001500070161003c000900040006000200030008000a0005000100150007000c00cf003b00300031002c008100420004000600020003003a00390005000100510007002a006400a50b86003b00300031002c00be00420004000600020003003a003900050001005100070b8500a400bd0114000400500b8400350020001200100b8300bc003e00bb0083003f00020003007c004a02ba02ee000502ed02b70018001b001a002b0012001000770b820078008e0076007500940b8100740b8000210073008d007200710070006f0028006e006d006c006b00680027001900010b7f00260093010500670024004f0082002e0001009700290020002500b1008c001602ae0b7e0b7d0024004f0001004800140b7c002e03d3014502ad009f002a0b7b00a20037006603cd0b7a00e301a70b790b78002f03cd00e301a7021a0b770b7600340b750014001f001e00210b740045000d001d000f000e00170b73001c003d00cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130014001f001e0b7200440043000d001d000f000e00170b71001c003d006a02b901bb015d0b700091003f0002000300a90038006400050018001b001a002b001200100063006202570b6f000d0b6e000f000e00e90b6d00530b6c006100600b6b005f005e005d005c0028005b005a0059005800540027001900010b6a002600930b6900670024004f02a5002e00010097002903f50025019300df0192008b026e00ef001100570b680b6700e500340b6600e5004d000b0211004c004b00130014001f001e0b6500440043000d001d000f000e00170b64001c003d006a02490b63009e0b620033016b00ea019d0098004a00050018001b001a002b00120010006300620b610b60000d0b5f000f000e00e90b5e00530b5d006100600b5c005f005e005d005c0028005b005a0059005800540027001900010b5b002600930b5a00670024004f02a5002e00010097002901c60025007e03d0022e0016019c02d90b5903cc0b5800d70b5703cb00300b56002c000400060002000300b000af000500010051000700230b5501430b540b53002d0b5201130b510b500b4f0b4e0b4d03ca03c90b4c03c80b4b03f30b4a0b4903c70b4803c60b470037000b012e000900040006000200030008000a0005000100150007013b00340099000600020033007f03c50014001f001e00210b460045000d001d000f000e00170b45001c003d00fa0b4400240b4303c604380b420b4100ab0b4000230b3f008401c2003703f20037000b012e000900040006000200030008000a0005000100150007008a000c002301c2019900300004000600020003016801670005000100510007008000cc00140066012100320120007f03c50014001f001e0b3e00440043000d001d000f000e00170b3d001c003d006a0014001f001e0b3c00440043000d001d000f000e00170b3b001c003d006a02a40b3a013b015504310b3900a300410b38013b03ca03c903c802b800cc007e0405002a008a000b02c8000900040006000200030008000a0005000100150007000c0b370b36007e000b02c8000900040006000200030008000a0005000100150007003602260b350041010600360b34002e0b330102000b0b32011e01940410013c0411011e0b3101a8021a013c0b30008f02f900d2012a00ef008b00b600ab00480b2f01540b2e0154001403c400d2000c01cc0b2d0b2c00f30b2b0066021e00fb0121003201200b2a0013013a0b290b28003401640b27004e010e0b26004e010d0b25021f0037000b012e0009019900300004000600020003016801670005000100510007008a00040006000200030008000a0005000100150007008000410034002f000600020033007f004700320085005500db007a012c02d301df02d000e800340b2400e500340b2300e50014001f001e00210b220045000d001d000f000e00170b21001c003d00fa00340b2000e50014001f001e00210b1f0045000d001d000f000e00170b1e001c003d00fa0014001f001e00210b1d0045000d001d000f000e00170b1c001c003d00fa03c300d7022d03c202a303c103c003bf022c03be0b1b03bd03bc0b1a03bb00e3004802bd01ab0b190b180b170b16022b0b150b1403fc0b130b12002d00ec00eb00480b110b10042d003700a301bf0b0f00340b0e00e50224003602260041019703ba01c8003603b903b80102000402cd000600020003013e007a019802ca004600840015041301c50b0d00340b0c0b0b01640b0a004e010e0b09004e010d0b08021f0014001f001e00210b070045000d001d000f000e00170b06001c003d00fa0014001f001e00210b050045000d001d000f000e00170b04001c003d00fa0014001f001e0b0300440043000d001d000f000e00170b02001c003d006a0014001f001e0b0100440043000d001d000f000e00170b00001c003d006a0014001f001e0aff00440043000d001d000f000e00170afe001c003d006a0014001f001e0afd00440043000d001d000f000e00170afc001c003d006a0014001f001e0afb00440043000d001d000f000e00170afa001c003d006a0014001f001e0af900440043000d001d000f000e00170af8001c003d006a0014001f001e0af700440043000d001d000f000e00170af6001c003d006a0014001f001e0af500440043000d001d000f000e00170af4001c003d006a0014001f001e0af300440043000d001d000f000e00170af2001c003d006a0014001f001e0af100440043000d001d000f000e00170af0001c003d006a0014001f001e0aef00440043000d001d000f000e00170aee001c003d006a0014001f001e0aed00440043000d001d000f000e00170aec001c003d006a0014001f001e0aeb00440043000d001d000f000e00170aea001c003d006a0014001f001e0ae900440043000d001d000f000e00170ae8001c003d006a0014001f001e0ae700440043000d001d000f000e00170ae6001c003d006a0014001f001e0ae500440043000d001d000f000e00170ae4001c003d006a0014001f001e0ae300440043000d001d000f000e00170ae2001c003d006a0014001f001e0ae100440043000d001d000f000e00170ae0001c003d006a0014001f001e0adf00440043000d001d000f000e00170ade001c003d006a0014001f001e0add00440043000d001d000f000e00170adc001c003d006a0014001f001e0adb00440043000d001d000f000e00170ada001c003d006a0014001f001e0ad900440043000d001d000f000e00170ad8001c003d006a0014001f001e0ad700440043000d001d000f000e00170ad6001c003d006a0014001f001e0ad500440043000d001d000f000e00170ad4001c003d006a0014001f001e0ad300440043000d001d000f000e00170ad2001c003d006a0014001f001e0ad100440043000d001d000f000e00170ad0001c003d006a003403b700e50014001f001e00210acf0045000d001d000f000e00170ace001c003d00fa0014001f001e00210acd0045000d001d000f000e00170acc001c003d00fa0014001f001e0acb00440043000d001d000f000e00170aca001c0ac90ac80014001f001e0ac700440043000d001d000f000e00170ac6001c003d006a03f9011e03f80ac50ac403f703f403b602b6002f000600020033007f00470032008500550008007a00d703f600460084001503b501c90ac300cc003403c403b40ac20ac1022a0ac00abf01ca0abe02a8002f000600020033007f00470032008500550008007a00d703b3004600840015003403b5008f02620abd01e00179043b015402d1002f000600020033007f004700320085005500db007a00d704390046008400150abc01c204320abb0225003400d700fb000600020033007f0aba00320085005500db007a0ab90ab8011200fb01550066012100320120007f00470032008500550008007a01980ab701df0ab60046008401c2002d0013016403b2004e010e03b1004e010d03b0021f010e03af004e010d03ae004e0163002f011f0162004e000600020033017700130ab503d503d202a802a700b503d4009f019100b50ab4009f0ab300b50ab2009f0ab100b50ab0009f0aaf00b503d7009f0aae00b50aad009f0aac00b50aab009f0aaa00df0aa902a20aa8005200180aa7016a0aa60aa500950aa40052004d000b009c004c004b0013026f019000f2000c01c3003b00300031002c008100420004000600020003003a0039000502a1022102a003ad0001029f0007002a01690aa3003b00300031002c00be00420004000600020003003a00390139000503ac0001029f009200070aa2011d00bd03ab000401ed0aa100350020001200100aa00139029e015d029d009100d90002000300a9004a00f103aa018f000503a9018e0018001b001a002b00120010006300620a9f000d015c000f000e00e90a9e00530a9d00610060011c005f005e005d005c0028005b005a0059005800540027001900010a9c03ac00260049018d0210002d00ec01ba03a800eb03a700e0020f0a9b01b9008c0a9a03a6029c002a029b0066000403a50a9900350020001200100a98029a015d02990091003f0002000300a90038029803a403a30005018e01d00018001b001a002b00120010006300620a97000d0096000f000e009b0a9600530a9500610060009a005f005e005d005c0028005b005a0059005800540027001900010a9400260093010100670024004f008203a8000103a7002900200a93009d0190003b00300031002c03a20004000600020003003a003900050001029f01ec03a103a001920a920a91039f0a90005200e8002d0013004d000b00d5004c004b0013004d000b009c004c004b00130014001f001e0a8f00440043000d001d000f000e00170a8e001c039e00210a8d0014001f001e00210a8c0045000d001d000f000e00170a8b001c039e00cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130a8a002a00f9000b0040000900040006000200030008000a00050001020e0007014400da000c007d0a89003b00300031002c008100420004000600020003003a00390005000102970007002a00fc00a50a88003b00300031002c00be00420004000600020003003a0039000500010297000700f90a87009200bd0100000400500a8600350020001200100a8500ce003e00cd0083003f00020003007c004a039d019f00050296039c0018001b001a002b00120010006300620a84000d0096000f000e009b0a8300530a8200610060009a005f005e005d005c0028005b005a0059005800540027001900010a8100260093010100670024004f0082020d00010a8000290020039b009d00f900890a7f00f2000c00d000ba002a011b002c000400060002000300b000af00050001029700070023020e00920153029500de002a01b800f90065000400ff00ae0a7e0294020d00e000b9029300de006500350020001200100a7d0139020c00ce003e00cd020b003f0002000301380038029200460018001b00b8001a001900010a7c02910152011a020d00ad00b900a200de006600040006000200030138003800ff0005020a0018001b001a002b0012001000630062018e0a7b000d0096000f000e009b0a7a00530a7900610060009a005f005e005d005c0028005b005a0059005800540027001900010a7800260049018c00e2020d00290020039b009d011b00de000b00a1000900040006000200030008000a00050001020e00070036015b00a00a7700a00a760052015e00de000b00a1000900040006000200030008000a00050001020e0007015b010200fe00b7000c00c100f10a750290015101110150039a00f00a74002400fe007900ac012a00ef008b00b600ab039a00410052002d001300e8004d000b00d5004c004b0013004d000b009c004c004b0013003401c4002f000600020033004a00130014001f001e0a7300440043000d001d000f000e00170a72001c039900210a710014001f001e0a7000440043000d001d000f000e00170a6f001c0a6e002100cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100a900130014001f001e00210a6d0045000d001d000f000e00170a6c001c039900cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130a6b0a6a03980a6900240a680a670a6600680a650a640a630a620245048c0a610a600052026f03970475003600920a5f0a5e00fb0a5d0a5c02090396028f02f10a5b00f30a5a00a60a590a5801600a570a56042704260a550a540a530a520a51019e00ae0a5000350020001200100a4f0a4e0a4d0a4c0a4b00d9000201bc0a4a0a490a480a47007c016b00ea019d009803a403aa0005018e01d00018001b001a002b00120010006300620a46000d0096000f000e009b0a4500530a4400610060009a005f005e005d005c0028005b005a00590058005400270019000103960a430a4200260049039502d4002d00ec03940a4100eb0a400145020f0a3f009d00c10024026b00670a3e00230a3d0052002d0013004d000b00d5004c004b001303930a3c002f0a3b0a3a002f0a3900f30147028f0a380a370a36039202a102a60006000201bb00ea01bc021200a900130014001f001e00210a350045000d001d000f000e00170a34001c0a3300cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130391010c0390010b000b0040000900040006000200030008000a0005000100d4000700da000c007d038f00f8002a010c000b00c0000900040006000200030008000a0005000100d40007000c007d038f00f7000b0040000900040006000200030008000a0005000100d40007014400da000c007d0a32003b00300031002c008100420004000600020003003a003900050001028e0007002a013700a50a31003b00300031002c00be00420004000600020003003a003900050001028e000700f90a300052009200bd0100000400500a2f00350020001200100a2e00ce003e00cd0083003f00020003007c004a039d019f00050296039c0018001b001a002b00120010006300620a2d000d0096000f000e009b0a2c00530a2b00610060009a005f005e005d005c0028005b005a0059005800540027001900010a2a00260093010100670024004f008201b700010a2900290020038e009d00f900890a2800f2000c00d000ba002a011b002c000400060002000300b000af00050001028e0007002300d400920153029500de002a01b800f90065000400ff00ae0a27029401b700e000b9029300de006500350020001200100a260139020c00ce003e00cd020b003f0002000301380038029200460018001b00b8001a001900010a2502910152011a01b700ad00b900a200de006600040006000200030138003800ff0005020a0018001b001a002b0012001000630062018e0a24000d0096000f000e009b0a2300530a2200610060009a005f005e005d005c0028005b005a0059005800540027001900010a2100260049018c00e201b700290020038e009d011b00de000b00a1000900040006000200030008000a0005000100d400070036015b00a0038d00a00a20015e00de000b00a1000900040006000200030008000a0005000100d40007015b010200fe00b7000c00c100f10a1f0290015101110150020800f00a1e002400fe007900ac012a00ef008b00b600ab0208004100f7000b0088000900040006000200030008000a0005000100d4000700ed003c000900040006000200030008000a0005000100d40014021601b70007019100ad00ac01be016500d2028d009f01bd0079000c025f006600f7000b0040000900040006000200030008000a0005000100d400fc00df00070079000c013f038d015b00b50215021400d10a1d021300e3020800f7000b0088000900040006000200030008000a0a1c000502070a1b000100d4000700ed003c000900040006000200030008000a0005000100d4000700ac0a1a00ef008b00b600ab0208004100f7000b0040000900040006000200030008000a0005000100d400070079000c010b0088000900040006000200030008000a0005000100d4000700ed003c000900040006000200030008000a0005000100d400070079013700410052002d0013004d000b009c004c004b0013004d000b00d5004c004b001300e8003401c4002f000600020033004a00130014001f001e0a1900440043000d001d000f000e00170a18001c0a170a160014001f001e0a1500440043000d001d000f000e00170a14001c038c00210a130014001f001e00210a120045000d001d000f000e00170a11001c038c00cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130a10014401e4039001dd000b0040000900040006000200030008000a00050001018b0007028c00da000c007d038b00fe002a0190000b00c0000900040006000200030008000a00050001018b0007000c007d038b01e3015a028b020602ab038a008f01e4015f003c019b019a014400040006000200030008000a00050001018b0007011a003c000900040006000200030008000a00050001018b000700aa000c028a01a40a0f02aa0a0e00670024004f00010a0d020600cc03eb000b0088000900040006000200030008000a00050001018b0007011a003c000900040006000200030008000a00050001018b000700aa015a00410052002d0013004d000b009c004c004b0013028901d3008f02c300d20389016e002a011d0a0c00650a0b03880a0a0a090a080a0700a2000400a600500a060035014f011000100a0501b6003e01b5012800d900020003012701770a04000502050018001b001a01d8011000100063006200610a030387038603850384038303820a0200530a010060011c005f005e005d005c0028005b005a0059005800540027001900010a0000260255038100670024004f008209ff000109fe0029038009fd01b909fc00df013f09fb09fa0052004d000b00d5004c004b0013002d0013004d000b009c004c004b00130014001f001e002109f90045000d001d000f000e001709f8001c09f700cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100550013037f011b02cf01c90190002309f6018a09f5008b09f40207021a09f302cf09f201c900e309f1003c037e03cf000c016c024f018a02be00f8000b0040000900040006000200030008000a000500010189000701dd00da000c007d037d00fe000b00c0000900040006000200030008000a0005000101890007000c007d037d00f800ff028b015f02ab038a008f01e400ed003c019b019a01dd00040006000200030008000a0005000101890007015a003c000900040006000200030008000a000500010189000700aa000c028a01a409f002aa09ef00670024004f000109ee020600cc00f8000b0088000900040006000200030008000a0005000101890007015a003c000900040006000200030008000a000500010189000700aa015f004109ed0052002d0013004d000b0211004c004b0013004d000b009c004c004b0013037f0190002a00f9000b00c0000900040006000200030008000a0005000100dd001409ec09eb000702a700ad000c09ea013d09e909e801c5002d022200f3039809e7037c03b401e4005709e6037b002402b500d109e50219015e01dc000c016c024f09e402be00f8000b0040000900040006000200030008000a0005000100dd000700b7000c011b0088000900040006000200030008000a0005000100dd000700fc003c000900040006000200030008000a0005000100dd000700aa0036037a09e309e200f8000b0040000900040006000200030008000a0005000100dd09e109e0000700b700410088000900040006000200030008000a0005000100dd000700fc003c000900040006000200030008000a0005000100dd000700aa013b00f8000b0088000900040006000200030008000a0005000100dd000700fc003c000900040006000200030008000a0005000100dd00070079013b015f010703ec037c09df037900e1002309de09dd0036019209dc02b4004100de000b00c0000900040006000200030008000a0005000100dd000700360261004101e10036019209db02b40041021d000c010c002309da0132000c000b017f000900040006000200030008000a0005000100dd000700fc003c000900040006000200030008000a0005000100dd0007000c007d09d900f803dd02a900cc0004000600020003013e007a012c09d803780046008400dd0052002d0013004d000b009c004c004b0013004d000b0211004c004b0013004d000b00d5004c004b0013003403b7002f000600020033004a00130289002a028c000b00c0000900040006000200030008000a00050001020400070036026209d7026101790041021801c909d609d50165013c01e2008f026000d2009509d402f8008f00d109d301e1000c002309d20132000c000b017f000900040006000200030008000a00050001020400070206003c000900040006000200030008000a0005000102040007003601e00179004100340099000600020033007f004700320085005500db007a012c02f609d10046008402040052002d00130034047609d000340435002f000600020033004a0013004d000b009c004c004b0013037701440106000c01dd002309cf00fe09ce00240106000c00d109cd025f01dc000c002a0171000b0040000900040006000200030008000a0005000100f60007010c00da000c007d09cc003b00300031002c008100420004000600020003003a00390005000102880007002a011300a509cb003b00300031002c00be00420004000600020003003a00390005000102880007012509ca00a400bd01140004005009c9003500200012001009c800bc003e00bb0083003f00020003007c004a09c702030005020209c60018001b001a002b00120010007709c50078008e00760075009409c4007409c300210073008d007200710070006f0028006e006d006c006b006800270019000109c200260093010500670024004f00820201000109c100290020037600b10125008909c000f2000c00d000ba002a0170002c000400060002000300b000af0005000102880007002300f600a4015301db0188002a0178012500650004014000ae09bf01da0201010400b901a601880065003500200012001009be0139020c00bc003e00bb020b003f0002000301380038037500460018001b00b8001a0019000109bd015b0152011a020100ad00b900a20188006600040006000200030138003801400005016f0018001b001a002b001200100077037409bc0078008e00760075009409bb007409ba00210073008d007200710070006f0028006e006d006c006b006800270019000109b900260049012b00e2020100290020037600b101700188000b00a1000900040006000200030008000a0005000100f600070036028700a009b800a009b701d10188000b00a1000900040006000200030008000a0005000100f600070287010200f800b7000c00c100f109b609b5015101110150028600f009b4002400f8007900ac012a00ef008b00b600ab02860041013a000b0040000900040006000200030008000a0005000100f600070079000c01250088000900040006000200030008000a0005000100f600070137003c000900040006000200030008000a0005000100f60007007901cf0041013a015a028b0113003c019b019a012500040006000200030008000a0005000100f600070137003c000900040006000200030008000a0005000100f6000700aa01cf0041013a000b0040000900040006000200030008000a0005000100f6000700b7000c09b309b2002d00ec00eb0286013a000b0040000900040006000200030008000a0005000100f6000700b701cf004100fc0107043f09b10052002d0013004d000b009c004c004b001300e8004d000b00d5004c004b0013004d000b0211004c004b0013003401c4002f000600020033004a00130014001f001e002109b00045000d001d000f000e001709af001c028503730014001f001e09ae00440043000d001d000f000e001709ad001c0285002103730014001f001e002109ac0045000d001d000f000e001709ab001c028500cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130132003609aa09a90107004102ff000c0218008f09a800670024004f000109a709a600cc02a900cc0052004d000b009c004c004b001309a501c3003b00300031002c008100420004000600020003003a00390005028a0221000103720007002a016909a4003b00300031002c00be00420004000600020003003a003900050001037200070052009200bd0100000401ed09a3003500200012001009a2029a015d0299009100d90002000300a9004a00f109a109a00005020503740018001b001a002b0012001000630062099f000d0096000f000e009b099e0053099d00610060009a005f005e005d005c0028005b005a005900580054002700190001099c00260093010100670024004f0082099b0001099a0029020f0999009d008c0998005200e8002d0013004d000b00d5004c004b00130014001f001e002109970045000d001d000f000e00170996001c099500cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100a900130994011e0194013c03ba01c8003603b903b80102000402cd000600020003013e007a019802ca0046008409930052002d00130014099209910990098f098e098d00f3004e012100320120007f00470032008500550008007a00d703b300460084098c0052098b03b200fb098a03b100fb098903b000fb01e90066021e016200fb01210032012002230013002d00130400000c007d098800520034010e03af004e010d03ae004e0163002f011f0162004e00060002003301770013098701d1002a0170000b0040000900040006000200030008000a0005000100a80007014400da000c007d0986003b00300031002c008100f900420004000600020003003a00390005000101590007002a014000a50985003b00300031002c00be00420004000600020003003a00390005000101590007010b0984009200bd01000004005009830035002000120010098200ce003e00cd0083003f00020003007c004a028409810005020001ff0018001b001a002b00120010006300620980000d0096000f000e009b097f0053097e00610060009a005f005e005d005c0028005b005a005900580054002700190001097d00260093010100670024004f008200e7000101fe0029002001b4009d010b0089028300f2000c00d000ba002a010c002c000400060002000300b000af0005000101590007002300a800920153029500f7002a01b8010b0065000400ed00ae097c029400e700e000b9029300f700650035002000120010097b0139020c00ce003e00cd020b003f0002000301380038029200460018001b00b8001a00190001097a02910152011a00e700ad00b900a200f7006600040006000200030138003800ed0005020a0018001b001a002b0012001000630062018e0979000d0096000f000e009b09780053097700610060009a005f005e005d005c0028005b005a005900580054002700190001097600260049018c00e200e70029002001b4009d010c00f7000b00a1000900040006000200030008000a0005000100a80007003601b300a0037100a00975015e00f7000b00a1000900040006000200030008000a0005000100a8000701b3010200fe00b7000c00c100f10974029001510111015001fd00f00973002400fe007900ac012a00ef008b00b600ab01fd00410122000b0088000900040006000200030008000a0005000100a8000700ff00a60972003c000900040006000200030008000a0005000100a80014021600e70007019100ad00ac01be016500d2028d009f01bd0079000c024f00660122000b0040000900040006000200030008000a0005000100a800ed00df00070079000c013f0371015b00b50215021400d10971021300e301fd0122000b0088000900040006000200030008000a0970000501b3096f000100a800070137003c000900040006000200030008000a0005000100a80007000c096e0370002d00ec00eb01fd0122000b0040000900040006000200030008000a0005000100a800070079000c011b0088000900040006000200030008000a0005000100a800070137003c000900040006000200030008000a0005000100a80007007900ff00410122000b0088000900040006000200030008000a0005000100a800070137003c000900040006000200030008000a0005000100a80007013b003b00300031002c008100420004000600020003003a00390005000101590007002a014000a5096d003b00300031002c00be00420004000600020003003a003900050001015900920007096c011d00bd01fc00040050096b0035002000120010096a01b6003e01b50083003f00020003007c004a036f036e0005028202960018001b001a002b00120010006300620969000d015c000f000e00e909680053096700610060011c005f005e005d005c0028005b005a005900580054002700190001096600260049018d0210002d00ec01ba00e700eb01fe00e0002001b401b9008c028301d5029c029b0965004e007f0964096303750962003500200012001009610176009e0175003300470032008500550038036d036c036b0005096002820018001b001a002b0012001000630062095f000d0096000f000e009b095e0053095d00610060009a005f005e005d005c0028005b005a005900580054002700190001016f095c00260049039502d4002d00ec039400e700eb01fe0145002001b4009d0370095b095a00a1000900040006000200030008000a0005000100a80007013b00f2000c00d000ba002a0144002c000400060002000300b000af00050001015900070023016f00a80126095900f30147028f0004015a0050095800ee003e01730957003f000200030307003803e10046036a016f0018001b00b8001a001900010956017200e701450955039300ed002f09540953002f03690368004e09520367095100e7095000e0094f00e703fa01ac0228094e03fb094d004e094c007f094b094a021709490227094802a500e70947036609460366011d09450944013d0943094200e703c701fe00ad09410940093f093e093d017b093c0365093b093a0076007503dc093903640938093709360935093409330932022a09310930092f092e00fb092d00d900020033016b00ea092c009800470032008500a9036d036c00460282016f092b0019092a0929092802270927092609250057092401e50923036f03cb00300922000400060002000300b000af00050001015900070023018a0921036301e50920091f028301c601b400de00e100c10024026b0067091e0023091d003400ed002f000600020033007f004700320085005500db007a0198091c0187091b0046008400a800f80052002d0013004d000b00d5004c004b001300e8004d000b009c004c004b0013003401c4002f000600020033004a0013091a01e5091901260918016303670917022802a203690392028702a60006000201bb00ea01bc021200a90013003401640916004e010e0915004e010d0914004e0163002f011f0162004e000600020033022300130014001f001e002109130045000d001d000f000e00170912001c01fb02810014001f001e002109110045000d001d000f000e00170910001c01fb02810014001f001e0021090f0045000d001d000f000e0017090e001c090d00cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100a90013020701bb00ea021200ee01d2090c00a900130034010e090b004e010d090a004e0163002f011f0162004e000600020033017700130014001f001e002109090045000d001d000f000e00170908001c090709060014001f001e002109050045000d001d000f000e00170904001c01fb02810014001f001e002109030045000d001d000f000e00170902001c01fb00cb00ca00c900c800c700c6000700c500c400c300c2006500b4004700320091005500130289028c003b00300031002c00e400420004000600020003003a00390005000109010007090008ff005200e80377028d03e8037a01250034017008fe08fd0140024800290247010c0099024600f9009904550190009908fc01c3009901290036011d024401fc000400a6005008fb003500200012001008fa01b6003e01b5012800d9000200030127004a08f908f80005020a01fa0018001b001a002b001200100063006208f7000d015c000f000e00e908f6005308f500610060011c005f005e005d005c0028005b005a00590058005400270019000108f400260049018d02520024004f025102800001036200e008f308f201d4024108f10240016e023f036101b8023e014d023d00ae015e08f00176009e01750033014c014b014a009800380284018f0005020501ff0018001b001a002b001200100063006208ef000d0096000f000e009b08ee005308ed00610060009a005f005e005d005c0028005b005a00590058005400270019000108ec00260049018c00820280002900200360009d010b018a002a011b000b0040000900040006000200030008000a00050001035f000700aa003601f901f8018708eb01f700950119014208ea012408e9014100950119012300ed0066018a000b0040000900040006000200030008000a00050001035f0007003601f901f8018708e801f7009501190142016d012408e7014100950119012300fc0066023900920100020900ff002f0004015f005008e6003500200012001008e500ce003e00cd0083003f00020003007c003808e401b2000501fa02570018001b001a002b001200100063006208e3000d0096000f000e009b08e2005308e100610060009a005f005e005d005c0028005b005a00590058005400270019000108e000260093010100670024004f0082028000010362002900200360009d00c108df08de023808dd011908dc01ce023708db01190236037801cd023508da023408d908d808d708d608d50233011908d408d300de00e10023002d002408d2002d002408d101b300b501cc08d0015a08cf0232002408ce08cd08cc08cb08ca0231011900f008c908c8008b00b600ab01190122038802a402a0009f02a102a20052002d0013004d000b009c004c004b0013004d000b00d5004c004b00130014001f001e002108c70045000d001d000f000e001708c6001c08c508c40014001f001e002108c30045000d001d000f000e001708c2001c035e08c10014001f001e002108c00045000d001d000f000e001708bf001c035e00cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100a9001308be016008bd035d08bc035d035c08bb0052035b0052035c08ba08b908b80186035a08b70359027f08b6035803570356035503540353035203510350034f034e034d009008b508b408b3018608b20186035a08b10359027f08b0035803570356035503540353035203510350034f034e034d009008af08ae08ad08ac08ab08aa08a908a8034c08a7034b08a6005308a5034a034908a408a308a2034908a1005308a0089f089e034803470346089d00d6089c089b089a089903480347034603db0186089808970896089508940893089208910890088f034c088e034b088d088c088b03ff088a009003450186034403430889088808870886088508840883088208810880087f087e0364087d087c087b087a013d0879087800d60877087608750874013d0873016a087208710870016a086f086e086d086c02a3086b086a086900d60160034208680867086600d6086503410864086308620861013608600340085f085e033f085d033e085c085b0136085a033d08590858085700d10856085508540853085208510850084f084e084d084c033c084b084a08490848084708460090084508440843084208410840083f083e083d083c083b03d90340083a01360839033f0838083701360836033e0835033d083408330136083208310830082f082e082d082c082b0136082a082908280827082601360825033b0824033a08230822033b0821033a08200136081f081e081d081c081b081a081908180817081608150090081408130812081108100090080f080e080d080c080b080a080908080807080600d60160034100d6080503da018f08040803018f08020801080007ff033907fe07fd07fc033907fb07fa07f90338033707f80338033707f707f607f507f407f307f207f107f007ef07ee07ed07ec07eb07ea07e90090034a07e807e707e6018607e507e407e307e207e107e001b107df07de07dd07dc018507db07da07d907d807d707d607d507d407d307d200d6034507d10034016407d0004e010e07cf004e010d07ce004e0163002f011f0162004e0006000200330223001307cd07cc07cb07ca07c9009007c807c707c607c5011807c407c301b0013507c20184011707c10134013307c000900118027e027d07bf027c027b07be018401b0013507bd0184011707bc0134013307bb00900118027e027d07ba027c027b07b9018401b0013507b80184011707b70134013307b600900118027e027d07b5027c027b07b4018401b0013507b300d6018500d6018500d6018500d6018500d6018507b207b107b0027f07af07ae07ad07ac07ab07aa07a907a807a703d607a607a507a407a307a2033607a107a0079f0335079e079d079c0334079b079a07990333079807970796033207950794079303310792079107900330078f078e078d078c0336078b0335078a03340789033307880332078703310786033007850784078307820781078000d1077f077e077d077c077b077a0779077807770776033c077507740773012407720771009001e503430770076f076e076d076c076b076a0769076807670055076607650764035b0052011707630134013307620090011801f601f5076101f4034201f30760009001b101f20135075f075e0117075d0134075c0133075b0090011801f601f5075a01f4075901f30758009001b101f20135075707560117075501340754013307530090011801f601f5075201f4075101f30750009001b101f20135074f074e0117074d0134074c0133074b0090011801f601f5074a01f4074901f30748009001b101f2013507470746004d000b0745004c004b001300340744074300340742002f011f03b60006000200330038001301170741013407400133073f0090011801b00117073e004d000b009c004c004b00130034073d002f011f004e073c03910397073b032f02dd073a036b036e01d1037e00f2000c010b003b00300031002c008100420004000600020003003a00390739000501b3022102e503ad0001027a0007002a01690738003b00300031002c00be00420004000600020003003a003901b2000501870001027a009200070737011d00bd03ab000401ed07360035002000120010073501b2029e015d029d009100d90002000300a9004a00f1032e018f000503a902000018001b001a002b00120010006300620734000d015c000f000e00e907330053073200610060011c005f005e005d005c0028005b005a0059005800540027001900010731018700260049018d0210002d00ec01ba032d00eb032c00e0020f073001b9008c072f03a6029c002a029b0066000403a5072e0035002000120010072d029a015d02990091003f0002000300a9003802980284072c0005020001ff0018001b001a002b0012001000630062072b000d0096000f000e009b072a0053072900610060009a005f005e005d005c0028005b005a005900580054002700190001072800260093010100670024004f0082032d0001032c002900200727009d010b003b00300031002c03a20004000600020003003a003900050001027a000701870726022703650725032b072403a1072301ce0722015803a003440721072000950158071f071e008b00b600ab0158019202a0032f071d071c071b013d008b002d0160071a032a002d00240052071907180717071601580715071403d801580713071207110710070f0160070e002d032a070d070c070b070a015807090708070707060305070507040703015807020052004d000b009c004c004b001300e8002d0013004d000b00d5004c004b00130014001f001e070100440043000d001d000f000e00170700001c0329002106ff0014001f001e002106fe0045000d001d000f000e001706fd001c032900cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100550013026f0279002a01c3000b0088000900040006000200030008000a0005000102780007011a00a6003c000900040006000200030008000a000500010278001406fc06fb0007019100ad00ac01be016500d2037b009f01bd0079000c0279006601e3000b0040000900040006000200030008000a000500010278011a00df0007007900ac00a006fa0379036306f906f8009506f706f6039f06f501230052002d0013004d000b009c004c004b0013004d000b00d5004c004b001306f40148012900ac0256000c0389016e011d06f303d1041706f2002a06f100f300a606f006ef002f000402b6005006ee0035014f0110001006ed01b6003e01b5012800d9000200030127017706ec000506eb0018001b001a01d80110001000630062006106ea03870386038503840383038206e9005306e80060011c005f005e005d005c0028005b005a00590058005400270019000106e700260255038100670024004f008200dc000101830029038006e601d406e500e106e4017000a506e3003b00300031002c00e400420004000600020003003a00390005000101af025400920253010002090113002f014006e201a402ef02f50004014600a60050046b06e1003500200012001006e000ce003e00cd0083003f00020003007c003806df01b2000501fa02020018001b001a002b001200100063006206de000d0096000f000e009b06dd005306dc00610060009a005f005e005d005c0028005b005a00590058005400270019000106db0026004902ec06da0024004f06d900dc0001018302eb00d8011601a5015e024e06d8007f0328032706d702e9009e02e800330047003200850055004a014606d601b2000501ff03260018001b001a002b001200100063006206d5000d015c000f000e00e906d4005306d300610060011c005f005e005d005c0028005b005a00590058005400270019000106d20026004906d106d000dc06cf00d8011606ce01d506cd06cc027702ea007f0328032706cb032506ca009e06c9003300470032008500550038014606c802030005020206c70018001b001a002b001200100063006206c6000d06c5000f000e00e906c4005306c30061006006c2005f005e005d005c0028005b005a00590058005400270019000106c10026004902dc06c001ba00dc00e000d8011606bf06be02e706bd06bc026a00f501d3008f02e606bb036a06ba024b00a602e406b90176009e0175003300ee01d2024a0098004a02de0325000501fa02430018001b001a002b001200100063006206b8000d0096000f000e009b06b7005306b600610060009a005f005e005d005c0028005b005a00590058005400270019000106b500260049018c00e200dc002900200116009d0171008901f10174000c00d000ba002a010b002c000400060002000300b000af0005000101af0007002301f0012602e300f301470113002f00040137005006b400ee003e017303240083003f00020003007c0038004602770018001b00b8001a0019000106b3017200dc01450174000c00d000ba002a010c002c000400060002000300b000af0005000101af0007002301f0012602e102e0010b01470146002f000400ed0050032406b200ee003e01730083003f00020003007c0038004602770018001b00b8001a0019000106b1017200dc013a002902df00dc011302480029024700f900990246011b009902ad02ac024500f7009901290036011d024401fc000400a6005003a306b0003500200012001006af01b6003e01b5012800d9000200030127004a032e0139000501d002000018001b001a002b001200100063006206ae000d015c000f000e00e906ad005306ac00610060011c005f005e005d005c0028005b005a00590058005400270019000106ab00260049018d02520024004f025100dc0001018300e000d8011601d4024101f10240016e023f036101b8023e014d023d00ae027906aa0176009e01750033014c014b014a009800380323018f0005020503220018001b001a002b001200100063006206a9000d0096000f000e009b06a8005306a700610060009a005f005e005d005c0028005b005a00590058005400270019000106a600260049018c008200dc002900200116009d010c0143000b0040000900040006000200030008000a0005000101f0000700aa003601f901f8032106a501f7009500f50142016d012406a40141009500f5012300fc00660143000b0040000900040006000200030008000a0005000101f00007003601f901f8032106a301f7009500f50142016d012406a20141009500f5012300ff006602390092010002090146002f0004011a005006a1003500200012001006a000ce003e00cd0083003f00020003007c0038032301390005069f03220018001b001a002b0012001000630062069e000d0096000f000e009b069d0053069c00610060009a005f005e005d005c0028005b005a005900580054002700190001069b00260093010100670024004f008200dc00010183002900200116009d00c1069a06990238069800f5069701ce0237069600f50236069501cd02350694023406930692032b02db06910690023300f5068f068e018a00e10023002d0024068d002d0024068c020700b501cc068b015f068a0232002406890688068706860685023100f500f00684013f008b00b600ab00f502a400a20122036800a201e3002f003b00300031002c008100420004000600020003003a00390005000101af0007002a025801690683003b00300031002c00be00420004000600020003003a00390005000101af009200070682011d00bd01fc000401ed068100350020001200100680029e015d029d067f00f1003f00020003007c004a067e020300050202067d0018001b001a002b0012001000630062067c000d015c000f000e00e9067b0053067a00610060011c005f005e005d005c0028005b005a005900580054002700190001067900260049018d0210002d00ec01ba00dc00eb018300e00020011601b9008c01f102300678019e016c022f0677003500200012001006760176009e01750033016b00ea019d0098004a067502030005032601a00018001b001a002b00120010006300620674000d0096000f000e009b06730053067200610060009a005f005e005d005c0028005b005a005900580054002700190001067100260093010100670024004f008200dc0001018300290020011601a5022e01f1019c0670013a00e103cc066f00d7066e03c300d7022d03c202a303c103c003bf022c03be066d03bd03bc066c03bb00e300f5013a002f01ab000c02d802d70188022b0052002d0013004d000b00d5004c004b0013004d000b009c004c004b001300e80014001f001e0021066b0045000d001d000f000e0017066a001c066906680014001f001e002106670045000d001d000f000e00170666001c066506640014001f001e002106630045000d001d000f000e00170662001c01ef02760014001f001e002106610045000d001d000f000e00170660001c01ef02760014001f001e0021065f0045000d001d000f000e0017065e001c01ef02760014001f001e0021065d0045000d001d000f000e0017065c001c018201ae0014001f001e0021065b0045000d001d000f000e0017065a001c018201ae0014001f001e002106590045000d001d000f000e00170658001c018201ae0014001f001e002106570045000d001d000f000e00170656001c018201ae0014001f001e002106550045000d001d000f000e00170654001c018201ae0014001f001e065300440043000d001d000f000e00170652001c01ef002100cb00ca00c900c800c700c6000700c500c400c300c2006500b400470032009100a900130014001f001e002106510045000d001d000f000e00170650001c018200cb00ca00c900c800c700c6000700c500c400c300c2006500b40047003200910055001300e80006000201bc007f0047003200850055013e000a00050001064f00070052002d0013064e00ba064d064c04160024064b064a064906480647010706460645064400ea00b4007f0047003200850055064302980005000106420007005200e80641021700520024005206400217005200240052063f0087001300000000000000000000000000000320000000000000063e0000032000220022063d00000000000000000000031f0000000000000000063c063b000000000000063a00000000000002750274027306390638000000000000000000000637000001ad0000031e0000063606350634063306320000063100000000000000000630000000000000062f000000000000062e000000000000062d000000000000062c000000000000062b000000000000062a0000000000000629000000000000062800000000000006270000000000000626000000000000062500000000000006240000000000000623000000000000062200000000000006210000000000000620000000000000061f000000000000061e000000000000061d000000000000061c000000000000061b000000000000061a0000000000000619000000000000061800000000000006170000000000000616000000000000061500000000000006140000000000000613000000000000061200000000000006110000000000000610000000000000060f000000000000060e000000000000060d000000000000060c000000000000060b000000000000060a000000000000060900000000000006080000000000000607000000000000060600000000000006050000000000000604000000000000060300000000000006020000000000000601000000000000060000000000000005ff00000000000005fe00000000000005fd00000000000005fc00000000000005fb00000000000005fa00000000000005f900000000000005f800000000000005f700000000000005f600000000000005f500000000000005f400000000000005f300000000000005f200000000000005f100000000000005f000000000000005ef00000000000005ee00000000000005ed00000000000005ec00000000000005eb00000000000005ea00000000000005e900000000000005e800000000000005e700000000000005e600000000000005e500000000000005e400000000000005e300000000000005e200000000000005e100000000000005e000000000000005df00000000000005de00000000000005dd00000000000005dc00000000000005db00000000000005da00000000000005d900000000000005d800000000000005d700000000000005d600000000000005d500000000000005d400000000000005d300000000000005d200000000000005d100000000000005d005cf05ce05cd05cc00000000031d000005cb0000000000000000000005ca000005c900000000000005c800000000000000000000031c000000000000000005c70000000000000022027200220022027100000000000005c600000000000005c505c405c305c205c101ad000005c0000001ee0000031b000005bf00000000000005be05bd05bc05bb01ee0000031c000005ba00000000000005b900000000000000000000000005b8002205b70000000001ad00000000000005b605b505b405b300000000031a000005b205b105b005af01ee0000031f000000000000031e000005ae05ad05ac05ab05aa000000000000000000000022002205a905a805a705a605a505a405a305a205a105a000000000059f059e059d059c059b059a059905980597059605950319059405930000000005920000000000000272002200220022000000000000059101810000000000000590000000000000058f000000000000058e000000000000058d058c058b058a058900000000000000000000031b000005880000000000000587000000000000000000000586000005850000000000000584058300000000027502740273058200220022002205810580057f057e057d057c057b057a0579057800000000000005770576057505740573057205710570056f056e0000000000000000056d0000056c000000000000056b056a05690568056705660000000002750274027305650564000000000000056300000000000000000000056200000561056000000000055f055e03180317055d055c055b0000055a0559055805570556055505540553055200000000000005510000000000000550000000000000054f000000000000054e000000000000054d000000000000000000000000054c054b054a054905480547054600000000000000000545000005440543054205410540000000000000053f053e053d053c053b000000000000053a0539053803190537053605350534053300000000000005320000000000000000000005310000000000000000053001ad0000031d0000052f000000000000052e052d052c052b052a000000000000052900000000000000000000052800000527031805260317052505240523052205210000000000000520051f051e051d01ad0000031a0000002200220022002200220022002203160022002200220271002200220022051c051b000000000000051a00000000000005190000000000000000000000000518051705160515051405130000000000000512000000000000000000000000051103150510050f050e050d050c000000000315050b050a0509050805070506050505040503050205010000000000000500000000000181000000000000018100b300000000000004ff002203140000000000000000031304fe002204fd00000000002204fc0000000000000000031304fb00000000027004fa00000000027004f900000000031204f80022031100000000000000000312018100000000031000b30022030f00000000000000000310000000000000030e00b3002200220000000000000000030e000000000000030d00b3002200220181000000000000030d000000000000030c00b30022002204f7000000000000030c000000000000030b00b30022002204f6000000000000030b000000000000030a04f50022002204f4000000000000030a04f3000000b301810000000000b304f204f10000000002720022000000b304f004ef000000b304ee04ed000000b304ec04eb000000b304ea04e9000000b304e804e70000030900000000000004e600000000000004e5000000000022030f04e404e3000004e200000000000000b304e104e000220271030800000000000004df002200000000000004de00220022002204dd00000000000004dc00000000000004db00220022002204da00000000000004d900000000000004d800220022002204d700000000000004d600000000000004d500220022002204d400000000000004d300000000000004d200220022002204d100000000000004d000000000000004cf00220022002204ce000000000022031600000000000004cd00000000000004cc00220022002204cb00000000002204ca00000000000004c900000000000004c80000000000220314000000000022031100000000000004c7000004c60000000000000000027004c5000004c404c304c2000004c1000000000000000004c004bf000004be04bd04bc000004bb000000000000000004ba04b9000004b804b704b6000004b5000000000000000004b404b30000030904b204b1000000b3000000000000000004b004af000000b304ae04ad0000000004ac04ab0000000004aa04a90000000004a800000000000004a704a60000000004a504a40000000004a300000000000004a204a100000000030800000000000004a0049f00000000049e049d049c000000000000049b000000000000049a0499049804970496000000000000049500000000000000220022002204940022002200220493000000000000049201ee000000000000000000000000000004910490048f048e000000000000", + "logIndex": 3, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x0000000000000000000000000000000000008004", + "topics": [ + "0xc94722ff13eacf53547c4741dab5228353a05938ffcdd5d4a2d533ae0e618287", + "0x0100112f458a1d44d61665108faf50dd95486b3464f222264c23bcfcf306b041", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 5, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0100112f458a1d44d61665108faf50dd95486b3464f222264c23bcfcf306b041", + "0x00000000000000000000000042639e7691189f8b87ee0e1d209af763855156c4" + ], + "data": "0x", + "logIndex": 6, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + }, + { + "transactionIndex": 0, + "blockNumber": 3549330, + "transactionHash": "0x8c21aa2e467bcfd525776d4ad13d856d5f32705e133ceb2156610408e45b4f50", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x0000000000000000000000000000000000000000000000000046942527f7d4c0", + "logIndex": 7, + "blockHash": "0x9a45fcf2e0eee6cf02f798026536c412eac7e80d8aa89a1e6b034b053505ad3c" + } + ], + "blockNumber": 3549330, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000", + 0, + 600, + "1000000000000000000000", + "100000000000000000000000", + true + ], + "numDeployments": 1, + "solcInputHash": "a07e32c825b2843ec874f32e153cc512", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_wrappedNativeToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_nativeMarket\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_blocksPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_stakingPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumStakedXVS\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maximumXVSCap\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_timeBased\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AssetAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"ExpTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IneligibleToClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAlphaArguments\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBlocksPerYear\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidComptroller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFixedPoint\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"d\",\"type\":\"uint256\"}],\"name\":\"InvalidFraction\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTimeBasedConfiguration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVToken\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"LnNonRealResult\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"x\",\"type\":\"int256\"}],\"name\":\"LnTooLarge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MarketNotSupported\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"loopsLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredLoops\",\"type\":\"uint256\"}],\"name\":\"MaxLoopsLimitExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoScoreUpdatesRequired\",\"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\":[],\"name\":\"UserHasNoPrimeToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WaitMoreTime\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"oldNumerator\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"oldDenominator\",\"type\":\"uint128\"},{\"indexed\":true,\"internalType\":\"uint128\",\"name\":\"newNumerator\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newDenominator\",\"type\":\"uint128\"}],\"name\":\"AlphaUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InterestClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"supplyMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowMultiplier\",\"type\":\"uint256\"}],\"name\":\"MarketAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMaxLoopsLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newmaxLoopsLimit\",\"type\":\"uint256\"}],\"name\":\"MaxLoopsLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isIrrevocable\",\"type\":\"bool\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldIrrevocableLimit\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldRevocableLimit\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newIrrevocableLimit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newRevocableLimit\",\"type\":\"uint256\"}],\"name\":\"MintLimitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldSupplyMultiplier\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldBorrowMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSupplyMultiplier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBorrowMultiplier\",\"type\":\"uint256\"}],\"name\":\"MultiplierUpdated\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"StakedAtUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"TokenUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"UserScoreUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAXIMUM_XVS_CAP\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_STAKED_XVS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_MARKET\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STAKING_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WRAPPED_NATIVE_TOKEN\",\"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\":\"vToken\",\"type\":\"address\"}],\"name\":\"accrueInterest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"}],\"name\":\"accrueInterestAndUpdateScore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"comptroller\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"supplyMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowMultiplier\",\"type\":\"uint256\"}],\"name\":\"addMarket\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"alphaDenominator\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"alphaNumerator\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blocksOrSecondsPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"calculateAPR\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"supplyAPR\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowAPR\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"xvsBalanceForScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"capital\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cappedSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cappedBorrow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplyCapUSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowCapUSD\",\"type\":\"uint256\"}],\"internalType\":\"struct IPrime.APRInfo\",\"name\":\"aprInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"claimInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"claimInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"claimTimeRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"borrow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"xvsStaked\",\"type\":\"uint256\"}],\"name\":\"estimateAPR\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"supplyAPR\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowAPR\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"xvsBalanceForScore\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"capital\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cappedSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cappedBorrow\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"supplyCapUSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowCapUSD\",\"type\":\"uint256\"}],\"internalType\":\"struct IPrime.APRInfo\",\"name\":\"aprInfo\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllMarkets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumberOrTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getInterestAccrued\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getPendingRewards\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PrimeStorageV1.PendingReward[]\",\"name\":\"pendingRewards\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"vToken\",\"type\":\"address\"}],\"name\":\"incomeDistributionYearly\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"xvsVault_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"xvsVaultRewardToken_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"xvsVaultPoolId_\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"alphaNumerator_\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"alphaDenominator_\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"primeLiquidityProvider_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracle_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"loopsLimit_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"poolRegistry_\",\"type\":\"address\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"interests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"accrued\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"score\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardIndex\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"irrevocableLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isScoreUpdated\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isTimeBased\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"isUserPrimeHolder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"isIrrevocable\",\"type\":\"bool\"},{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"issue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"markets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"supplyMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sumOfMembersScore\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxLoopsLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextScoreUpdateRoundId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contract ResilientOracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingScoreUpdates\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"primeLiquidityProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"revocableLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"name\":\"setAccessControlManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_irrevocableLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_revocableLimit\",\"type\":\"uint256\"}],\"name\":\"setLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"loopsLimit\",\"type\":\"uint256\"}],\"name\":\"setMaxLoopsLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"timestamps\",\"type\":\"uint256[]\"}],\"name\":\"setStakedAt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"stakedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"togglePause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isIrrevocable\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalIrrevocable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalRevocable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalScoreUpdatesRequired\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"unreleasedPLPIncome\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_alphaNumerator\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_alphaDenominator\",\"type\":\"uint128\"}],\"name\":\"updateAlpha\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"supplyMultiplier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrowMultiplier\",\"type\":\"uint256\"}],\"name\":\"updateMultipliers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"}],\"name\":\"updateScores\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"vTokenForAsset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"xvsUpdated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xvsVault\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xvsVaultPoolId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"xvsVaultRewardToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"custom:security-contact\":\"https://github.com/VenusProtocol/venus-protocol\",\"events\":{\"Initialized(uint8)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"accrueInterest(address)\":{\"custom:error\":\"Throw MarketNotSupported if market is not supported\",\"params\":{\"vToken\":\"the market for which to distribute the income\"}},\"accrueInterestAndUpdateScore(address,address)\":{\"params\":{\"market\":\"the market for which to accrue interest and update score\",\"user\":\"the account address for which to accrue interest and update score\"}},\"addMarket(address,address,uint256,uint256)\":{\"custom:access\":\"Controlled by ACM\",\"custom:error\":\"Throw MarketAlreadyExists if market already existsThrow InvalidVToken if market is not valid\",\"custom:event\":\"Emits MarketAdded event\",\"params\":{\"borrowMultiplier\":\"the multiplier for borrow cap. It should be converted to 1e18\",\"comptroller\":\"address of the comptroller\",\"market\":\"address of the market vToken\",\"supplyMultiplier\":\"the multiplier for supply cap. It should be converted to 1e18\"}},\"burn(address)\":{\"custom:access\":\"Controlled by ACM\",\"params\":{\"user\":\"the account address for which the prime token will be burned\"}},\"calculateAPR(address,address)\":{\"params\":{\"market\":\"the market for which to fetch the APR\",\"user\":\"the account for which to get the APR\"},\"returns\":{\"aprInfo\":\"APR information for the user for the given market\"}},\"claimInterest(address)\":{\"params\":{\"vToken\":\"the market for which claim the accrued interest\"},\"returns\":{\"_0\":\"amount the amount of tokens transferred to the msg.sender\"}},\"claimInterest(address,address)\":{\"params\":{\"user\":\"the user for which to claim the accrued interest\",\"vToken\":\"the market for which claim the accrued interest\"},\"returns\":{\"_0\":\"amount the amount of tokens transferred to the user\"}},\"claimTimeRemaining(address)\":{\"params\":{\"user\":\"the account address for which we are checking the remaining time\"},\"returns\":{\"_0\":\"timeRemaining the number of seconds the user needs to wait to claim prime token\"}},\"comptroller()\":{\"returns\":{\"_0\":\"the core pool comptroller address\"}},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"estimateAPR(address,address,uint256,uint256,uint256)\":{\"params\":{\"market\":\"the market for which to fetch the APR\",\"user\":\"the account for which to get the APR\"},\"returns\":{\"aprInfo\":\"APR information for the user for the given market\"}},\"getAllMarkets()\":{\"returns\":{\"_0\":\"an array of addresses representing all available markets\"}},\"getBlockNumberOrTimestamp()\":{\"details\":\"Function to simply retrieve block number or block timestamp\",\"returns\":{\"_0\":\"Current block number or block timestamp\"}},\"getInterestAccrued(address,address)\":{\"params\":{\"user\":\"the account for which to get the accrued interest\",\"vToken\":\"the market for which to fetch the accrued interest\"},\"returns\":{\"_0\":\"interestAccrued the number of underlying tokens accrued by the user since the last accrual\"}},\"getPendingRewards(address)\":{\"params\":{\"user\":\"the account for which to get the accrued interests\"},\"returns\":{\"pendingRewards\":\"the number of underlying tokens accrued by the user for all markets\"}},\"incomeDistributionYearly(address)\":{\"params\":{\"vToken\":\"the market for which to fetch the total income that's going to distributed in a year\"},\"returns\":{\"amount\":\"the total income\"}},\"initialize(address,address,uint256,uint128,uint128,address,address,address,address,uint256)\":{\"custom:error\":\"Throw InvalidAddress if any of the address is invalid\",\"params\":{\"accessControlManager_\":\"Address of AccessControlManager\",\"alphaDenominator_\":\"denominator of alpha. If alpha is 0.5 then denominator is 2. alpha is alphaNumerator_/alphaDenominator_. So, 0 < alpha < 1\",\"alphaNumerator_\":\"numerator of alpha. If alpha is 0.5 then numerator is 1. alphaDenominator_ must be greater than alphaNumerator_, alphaDenominator_ cannot be zero and alphaNumerator_ cannot be zero\",\"comptroller_\":\"Address of core pool comptroller\",\"loopsLimit_\":\"Maximum number of loops allowed in a single transaction\",\"oracle_\":\"Address of Oracle\",\"primeLiquidityProvider_\":\"Address of PrimeLiquidityProvider\",\"xvsVaultPoolId_\":\"Pool id of XVSVault\",\"xvsVaultRewardToken_\":\"Address of XVSVault reward token\",\"xvsVault_\":\"Address of XVSVault\"}},\"initializeV2(address)\":{\"params\":{\"poolRegistry_\":\"Address of IL pool registry\"}},\"isUserPrimeHolder(address)\":{\"returns\":{\"_0\":\"isPrimeHolder true if user is a prime holder\"}},\"issue(bool,address[])\":{\"custom:access\":\"Controlled by ACM\",\"params\":{\"isIrrevocable\":\"are the tokens being issued\",\"users\":\"list of address to issue tokens to\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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\"}},\"setLimit(uint256,uint256)\":{\"custom:access\":\"Controlled by ACM\",\"custom:error\":\"Throw InvalidLimit if any of the limit is less than total tokens minted\",\"custom:event\":\"Emits MintLimitsUpdated event\",\"params\":{\"_irrevocableLimit\":\"total number of irrevocable tokens that can be minted\",\"_revocableLimit\":\"total number of revocable tokens that can be minted\"}},\"setMaxLoopsLimit(uint256)\":{\"custom:access\":\"Controlled by ACM\",\"custom:event\":\"Emits MaxLoopsLimitUpdated event on success\",\"params\":{\"loopsLimit\":\"Number of loops limit\"}},\"setStakedAt(address[],uint256[])\":{\"custom:access\":\"Controlled by ACM\",\"custom:error\":\"Throw InvalidLength if users and timestamps length are not equal\",\"custom:event\":\"Emits StakedAtUpdated event for each user\",\"params\":{\"timestamps\":\"new staked at timestamp for the users\",\"users\":\"accounts for which we need to update staked at timestamp\"}},\"togglePause()\":{\"custom:access\":\"Controlled by ACM\"},\"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.\"},\"updateAlpha(uint128,uint128)\":{\"custom:access\":\"Controlled by ACM\",\"custom:event\":\"Emits AlphaUpdated event\",\"params\":{\"_alphaDenominator\":\"denominator of alpha. If alpha is 0.5 then denominator is 2\",\"_alphaNumerator\":\"numerator of alpha. If alpha is 0.5 then numerator is 1\"}},\"updateMultipliers(address,uint256,uint256)\":{\"custom:access\":\"Controlled by ACM\",\"custom:error\":\"Throw MarketNotSupported if market is not supported\",\"custom:event\":\"Emits MultiplierUpdated event\",\"params\":{\"borrowMultiplier\":\"new borrow multiplier for the market, scaled by 1e18\",\"market\":\"address of the market vToken\",\"supplyMultiplier\":\"new supply multiplier for the market, scaled by 1e18\"}},\"updateScores(address[])\":{\"custom:error\":\"Throw NoScoreUpdatesRequired if no score updates are requiredThrow UserHasNoPrimeToken if user has no prime token\",\"custom:event\":\"Emits UserScoreUpdated event\",\"params\":{\"users\":\"accounts for which we need to update score\"}},\"xvsUpdated(address)\":{\"params\":{\"user\":\"the account address whose balance was updated\"}}},\"stateVariables\":{\"MAXIMUM_XVS_CAP\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"MINIMUM_STAKED_XVS\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"NATIVE_MARKET\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"STAKING_PERIOD\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"},\"WRAPPED_NATIVE_TOKEN\":{\"custom:oz-upgrades-unsafe-allow\":\"state-variable-immutable\"}},\"title\":\"Prime\",\"version\":1},\"userdoc\":{\"errors\":{\"AssetAlreadyExists()\":[{\"notice\":\"Error thrown when asset already exists\"}],\"ExpTooLarge(int256)\":[{\"notice\":\"Thrown when exp is given too large of an argument\"}],\"IneligibleToClaim()\":[{\"notice\":\"Error thrown when user is not eligible to claim prime token\"}],\"InvalidAddress()\":[{\"notice\":\"Error thrown when invalid address is passed\"}],\"InvalidAlphaArguments()\":[{\"notice\":\"Error thrown when invalid alpha arguments are passed\"}],\"InvalidBlocksPerYear()\":[{\"notice\":\"Thrown when blocks per year is invalid\"}],\"InvalidComptroller()\":[{\"notice\":\"Error thrown when invalid comptroller is passed\"}],\"InvalidLength()\":[{\"notice\":\"Error thrown when invalid length is passed\"}],\"InvalidLimit()\":[{\"notice\":\"Error thrown when mint limit is reached\"}],\"InvalidTimeBasedConfiguration()\":[{\"notice\":\"Thrown when time based but blocks per year is provided\"}],\"InvalidTimestamp()\":[{\"notice\":\"Error thrown when timestamp is invalid\"}],\"InvalidVToken()\":[{\"notice\":\"Error thrown when invalid vToken is passed\"}],\"LnNonRealResult(int256)\":[{\"notice\":\"Thrown when the natural log would have returned a number outside of \\u211d\"}],\"LnTooLarge(int256)\":[{\"notice\":\"Thrown when the natural log function is given too large of an argument\"}],\"MarketAlreadyExists()\":[{\"notice\":\"Error thrown when market already exists\"}],\"MarketNotSupported()\":[{\"notice\":\"Error thrown when market is not supported\"}],\"MaxLoopsLimitExceeded(uint256,uint256)\":[{\"notice\":\"Thrown an error on maxLoopsLimit exceeds for any loop\"}],\"NoScoreUpdatesRequired()\":[{\"notice\":\"Error thrown when no score updates are required\"}],\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}],\"UserHasNoPrimeToken()\":[{\"notice\":\"Error thrown when user has no prime token\"}],\"WaitMoreTime()\":[{\"notice\":\"Error thrown when user needs to wait more time to claim prime token\"}]},\"events\":{\"AlphaUpdated(uint128,uint128,uint128,uint128)\":{\"notice\":\"Emitted when alpha is updated\"},\"Burn(address)\":{\"notice\":\"Emitted when prime token is burned\"},\"InterestClaimed(address,address,uint256)\":{\"notice\":\"Emitted when interest is claimed\"},\"MarketAdded(address,address,uint256,uint256)\":{\"notice\":\"Emitted when a market is added to prime program\"},\"MaxLoopsLimitUpdated(uint256,uint256)\":{\"notice\":\"Emitted when max loops limit is set\"},\"Mint(address,bool)\":{\"notice\":\"Emitted when prime token is minted\"},\"MintLimitsUpdated(uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when mint limits are updated\"},\"MultiplierUpdated(address,uint256,uint256,uint256,uint256)\":{\"notice\":\"Emitted when multiplier is updated\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control manager contract address is changed\"},\"StakedAtUpdated(address,uint256)\":{\"notice\":\"Emitted when stakedAt is updated\"},\"TokenUpgraded(address)\":{\"notice\":\"Emitted when revocable token is upgraded to irrevocable token\"},\"UserScoreUpdated(address)\":{\"notice\":\"Emitted when user score is updated\"}},\"kind\":\"user\",\"methods\":{\"MAXIMUM_XVS_CAP()\":{\"notice\":\"maximum XVS taken in account when calculating user score\"},\"MINIMUM_STAKED_XVS()\":{\"notice\":\"minimum amount of XVS user needs to stake to become a prime member\"},\"NATIVE_MARKET()\":{\"notice\":\"address of native market contract\"},\"STAKING_PERIOD()\":{\"notice\":\"number of days user need to stake to claim prime token\"},\"WRAPPED_NATIVE_TOKEN()\":{\"notice\":\"address of wrapped native token contract\"},\"accessControlManager()\":{\"notice\":\"Returns the address of the access control manager contract\"},\"accrueInterest(address)\":{\"notice\":\"Distributes income from market since last distribution\"},\"accrueInterestAndUpdateScore(address,address)\":{\"notice\":\"accrues interes and updates score for an user for a specific market\"},\"addMarket(address,address,uint256,uint256)\":{\"notice\":\"Add a market to prime program\"},\"alphaDenominator()\":{\"notice\":\"denominator of alpha. Ex: if alpha is 0.5 then this will be 2\"},\"alphaNumerator()\":{\"notice\":\"numerator of alpha. Ex: if alpha is 0.5 then this will be 1\"},\"blocksOrSecondsPerYear()\":{\"notice\":\"Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored\"},\"burn(address)\":{\"notice\":\"For burning any prime token\"},\"calculateAPR(address,address)\":{\"notice\":\"Returns supply and borrow APR for user for a given market\"},\"claim()\":{\"notice\":\"For claiming prime token when staking period is completed\"},\"claimInterest(address)\":{\"notice\":\"For user to claim boosted yield\"},\"claimInterest(address,address)\":{\"notice\":\"For user to claim boosted yield\"},\"claimTimeRemaining(address)\":{\"notice\":\"fetch the numbers of seconds remaining for staking period to complete\"},\"comptroller()\":{\"notice\":\"Retrieves the core pool comptroller address\"},\"estimateAPR(address,address,uint256,uint256,uint256)\":{\"notice\":\"Returns supply and borrow APR for estimated supply, borrow and XVS staked\"},\"getAllMarkets()\":{\"notice\":\"Retrieves an array of all available markets\"},\"getInterestAccrued(address,address)\":{\"notice\":\"Returns boosted interest accrued for a user\"},\"getPendingRewards(address)\":{\"notice\":\"Returns boosted pending interest accrued for a user for all markets\"},\"incomeDistributionYearly(address)\":{\"notice\":\"the total income that's going to be distributed in a year to prime token holders\"},\"initialize(address,address,uint256,uint128,uint128,address,address,address,address,uint256)\":{\"notice\":\"Prime initializer\"},\"initializeV2(address)\":{\"notice\":\"Prime initializer V2 for initializing pool registry\"},\"interests(address,address)\":{\"notice\":\"vToken to user to user index\"},\"irrevocableLimit()\":{\"notice\":\"Indicates maximum irrevocable tokens that can be minted\"},\"isScoreUpdated(uint256,address)\":{\"notice\":\"mapping to check if a account's score was updated in the round\"},\"isTimeBased()\":{\"notice\":\"Acknowledges if a contract is time based or not\"},\"isUserPrimeHolder(address)\":{\"notice\":\"Returns if user is a prime holder\"},\"issue(bool,address[])\":{\"notice\":\"Directly issue prime tokens to users\"},\"markets(address)\":{\"notice\":\"vToken to market configuration\"},\"nextScoreUpdateRoundId()\":{\"notice\":\"unique id for next round\"},\"oracle()\":{\"notice\":\"The address of ResilientOracle contract\"},\"pendingScoreUpdates()\":{\"notice\":\"total number of accounts whose score is yet to be updated\"},\"poolRegistry()\":{\"notice\":\"The address of PoolRegistry contract\"},\"primeLiquidityProvider()\":{\"notice\":\"The address of PLP contract\"},\"revocableLimit()\":{\"notice\":\"Indicates maximum revocable tokens that can be minted\"},\"setAccessControlManager(address)\":{\"notice\":\"Sets the address of AccessControlManager\"},\"setLimit(uint256,uint256)\":{\"notice\":\"Set limits for total tokens that can be minted\"},\"setMaxLoopsLimit(uint256)\":{\"notice\":\"Set the limit for the loops can iterate to avoid the DOS\"},\"setStakedAt(address[],uint256[])\":{\"notice\":\"Update staked at timestamp for multiple users\"},\"stakedAt(address)\":{\"notice\":\"Tracks when prime token eligible users started staking for claiming prime token\"},\"togglePause()\":{\"notice\":\"To pause or unpause claiming of interest\"},\"tokens(address)\":{\"notice\":\"Mapping to get prime token's metadata\"},\"totalIrrevocable()\":{\"notice\":\"Tracks total irrevocable tokens minted\"},\"totalRevocable()\":{\"notice\":\"Tracks total revocable tokens minted\"},\"totalScoreUpdatesRequired()\":{\"notice\":\"total number of accounts whose score needs to be updated\"},\"unreleasedPLPIncome(address)\":{\"notice\":\"unreleased income from PLP that's already distributed to prime holders\"},\"updateAlpha(uint128,uint128)\":{\"notice\":\"Update value of alpha\"},\"updateMultipliers(address,uint256,uint256)\":{\"notice\":\"Update multipliers for a market\"},\"updateScores(address[])\":{\"notice\":\"Update total score of multiple users and market\"},\"vTokenForAsset(address)\":{\"notice\":\"mapping used to find if an asset is part of prime markets\"},\"xvsUpdated(address)\":{\"notice\":\"Executed by XVSVault whenever user's XVSVault balance changes\"},\"xvsVault()\":{\"notice\":\"address of XVS vault\"},\"xvsVaultPoolId()\":{\"notice\":\"address of XVS vault pool id\"},\"xvsVaultRewardToken()\":{\"notice\":\"address of XVS vault reward token\"}},\"notice\":\"Prime Token is used to provide extra rewards to the users who have staked a minimum of `MINIMUM_STAKED_XVS` XVS in the XVSVault for `STAKING_PERIOD` days\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/Prime/Prime.sol\":\"Prime\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\":{\"keccak256\":\"0x84efb8889801b0ac817324aff6acc691d07bbee816b671817132911d287a8c63\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ec6df2255fadc251ea905043c47bf55170ee6cb5d7ca8b5c8ed54c84eac9d09e\",\"dweb:/ipfs/QmaokWfuL59uarki5yoDGbPzh4cErzEfnAzfmesTNJNXE9\"]},\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://99c8cb3cd19a44bbfb6612605affb7d8b06cee1f6aa9362a37a8672b4f7eeaf8\",\"dweb:/ipfs/QmasyxFDBUp7k5KFgfDWEzM8PYSKEq7GVznzMJ1VxVRF4B\"]},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f103ee2e4aecd37aac6ceefe670709cdd7613dee25fa2d4d9feaf7fc0aaa155e\",\"dweb:/ipfs/QmRiNZLoJk5k3HPMYGPGjZFd2ke1ZxjhJZkM45Ec9GH9hv\"]},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9c7d1f5e15633ab912b74c2f57e24559e66b03232300d4b27ff0f25bc452ecad\",\"dweb:/ipfs/QmYTJkc1cntYkKQ1Tu11nBcJLakiy93Tjytc4XHELo4GmR\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"keccak256\":\"0x0e1f0f5f62f67a881cd1a9597acbc0a5e4071f3c2c10449a183b922ae7272e3f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c25f742ff154998d19a669e2508c3597b363e123ce9144cd0fcf6521229f401f\",\"dweb:/ipfs/QmQXRuFzStEWqeEPbhQU6cAg9PaSowxJVo4PDKyRod7dco\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\":{\"keccak256\":\"0x605434219ebbe4653f703640f06969faa5a1d78f0bfef878e5ddbb1ca369ceeb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4c9c634f99dd02d73ce7498b03a6305e251c05eeebb71457306561c1fab0fa7d\",\"dweb:/ipfs/QmbYRBbZHy8YoaQKXdPryiL3CSS7uUaRfRYi1TUj9cTqJQ\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol\":{\"keccak256\":\"0xd60f939a3ca0199014d079b4dd66aa757954334947d81eb5c1d35d7a83061ab3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ce6e5ae4633559c2aad156be884a96f7a9beb8dd31b1b630a6de55972e3af622\",\"dweb:/ipfs/QmQasz4sQoexkrvB7wCQAY6NbMoCtPS7AqomymRoJGYz85\"]},\"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\":{\"keccak256\":\"0x23b997be73d3dd46885262704f0f8cfc7273fdadfe303d37969a9561373972b5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d03ebe5406134f0c4a017dee625ff615031194493bd1e88504e5c8fae55bc166\",\"dweb:/ipfs/QmUZV5bMbgk2PAkV3coouSeSainHN2jhqaQDJaA7hQRyu2\"]},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://310136ad60820af4177a11a61d77a3686faf5fca4942b600e08fc940db38396b\",\"dweb:/ipfs/QmbCzMNSTL7Zi7M4UCSqBrkHtp4jjxUnGbkneCZKdR1qeq\"]},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6520943ea55fdf5f0bafb39ed909f64de17051bc954ff3e88c9e5621412c79c\",\"dweb:/ipfs/QmWZ4rAKTQbNG2HxGs46AcTXShsVytKeLs7CUCdCSv5N7a\"]},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"keccak256\":\"0xcef50f95b43b038aa40aed25b62fc45906c681a5c1d504a4fdcf3bc6330a8d4b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ef883699a00970d5469e502514e2854704cd53d7a49825078aa807a2f056315c\",\"dweb:/ipfs/QmRjpN9oxgw6zHCVjfWNB9MzaYpNPPgqu7Rrwqwabmhpis\"]},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bb2c137c343ef0c4c7ce7b18c1d108afdc9d315a04e48307288d2d05adcbde3a\",\"dweb:/ipfs/QmUxhrAQM3MM3FF5j7AtcXLXguWCJBHJ14BRdVtuoQc8Fh\"]},\"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\":{\"keccak256\":\"0x0dcf283925f4dddc23ca0ee71d2cb96a9dd6e4cf08061b69fde1697ea39dc514\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://38db65a77297d8df3345797277a624d81706bde2e9ede230a140e8ca2a027040\",\"dweb:/ipfs/QmWKcmtyyvi3dhAJHkdAKGNrsKcMxKQ6c82ArtDqe8tncG\"]},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://8120bda3990193388d0cc5f551510ef1eab685387a58a88ab607b5149e51acde\",\"dweb:/ipfs/QmNSX9ai6GbN4wQukM29rFkcWDFhqStUTtKe6XtreTvRcN\"]},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://a0de4c46c1bb912ebf9eed630e210d17e2952b8076fcfd429672c7e6271ed665\",\"dweb:/ipfs/QmVuqSWTJSxpudZSJMpRC7pmw9iEjyZnnhm3n9RvmKXxTg\"]},\"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\":{\"keccak256\":\"0x4c25e30635485d162177effa384eee51768b0141a567a0da16ff6ad673274166\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://5d71ed301eb76292bce7b3500482452c397b766507222d00f3982b65520d156b\",\"dweb:/ipfs/QmcF3yPyr6hWQUA6wfEi6Hq1TEUtbxFP9MAcYQy4D2tFHC\"]},\"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\":{\"keccak256\":\"0x57a2bbb9b8e02b1c0a5c0e305fef1328a22db56c3d4b148c362010a6e767243c\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://01c6af010cbff93563f2175d48702f5d901beb59b0e3315ed2a5583dfa53ee21\",\"dweb:/ipfs/QmY7sfvoQ1kEQtLhPdSA3bQdV4u3hT563RSvuCtgSrQUmx\"]},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"keccak256\":\"0x14de93ead464da249af31bea0e3bcfb62ec693bea3475fb4d90f055ac81dc5eb\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://6134b92b2bc5bad1c6e088d0d092736eede6dfe2cf7dadc573f1396a9d690274\",\"dweb:/ipfs/QmXwKV4SY7CdCaCaDqXudcLxVLB4vUfbwMiH9kH6HhWpiy\"]},\"contracts/Tokens/Prime/Interfaces/IPoolRegistry.sol\":{\"keccak256\":\"0x3977ed49a7eaccbdbd674cfbabff12e59e2476301810aad30a4e991c63b8e9ee\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://d013dc75ccfeaa525d3bf4940a01727142e62db4424998ff188ee8c4184e8299\",\"dweb:/ipfs/QmQYpr8pzxy67TrJurbeY7YVeTdVWKZEn8geuSp29L9sGd\"]},\"contracts/Tokens/Prime/Interfaces/IPrime.sol\":{\"keccak256\":\"0xd112f60183416ad796093b4a83a80ddc1b8b655965f02ae55ca82e2a0c68f97d\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://95b5d2eee4e994e248c66b95c1c23954e6aa81cce147b68705d0e9657de3871d\",\"dweb:/ipfs/Qmdf8sMZCm8f2j3rh2Jx7xzxqt1T5gyLKfMEeG6KtV4Fo7\"]},\"contracts/Tokens/Prime/Interfaces/IPrimeLiquidityProvider.sol\":{\"keccak256\":\"0x4dca0341931008bcd81de18e627c2d0cd4f9d0be67db4d8f0d678d11ba0d330f\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://0f22bd137fd0e20237ab3a4f072c53fa0d891f089a99ab4a9b814ce69e653910\",\"dweb:/ipfs/QmPFT7qpMmtJCSUX6fJR9mQo4pDZFaFKjS1grZLdG1gPnd\"]},\"contracts/Tokens/Prime/Interfaces/IVToken.sol\":{\"keccak256\":\"0x63da84a1600e383a030e17b1a696bc168f6887e9f5ef6a986b5d6c1ec98a92ed\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://f1bd8c62642d4dc61b94bef34e13d4e55303d04a6c8166063409d16b1ed7b815\",\"dweb:/ipfs/QmYnKd13EpxKwqdgDnX6KdTxcPrk5PzcnmTLQSd7XJT1Z9\"]},\"contracts/Tokens/Prime/Interfaces/IXVSVault.sol\":{\"keccak256\":\"0x576bb0e8c21891de2803251244133f948673bce5c8146aa53157f414889c476d\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://1d315651f7a580dcd440bb934478e630d1ee88673edd273656efdf66f3e18c9d\",\"dweb:/ipfs/QmcvDAP4EdUGBMB2vAbTZKYK33acjmBK6HSTHtchgzKwqa\"]},\"contracts/Tokens/Prime/Interfaces/InterfaceComptroller.sol\":{\"keccak256\":\"0xb3b6f9b8079d6b8ee93174fd2f96db394012f4f7d307cb389825a60cdb1dc3da\",\"license\":\"GPL-3.0-or-later\",\"urls\":[\"bzz-raw://74b1aa3c50e145f799ff68e79255664327492d8692dab1f1e62f8d8a1d48be5e\",\"dweb:/ipfs/QmVh9MeSda2eYMiJttaY367o7P89KpUTZW4hd9q32uGDvC\"]},\"contracts/Tokens/Prime/Prime.sol\":{\"keccak256\":\"0xa0f8eb4edd3cba1ea9b35c3bd368c8694ff9c6ac0ce71501fdc5d8fb4902f1de\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://081a7d84f8166f604c273572589b2a127298a14a0e6a993f824b2e08c896d79d\",\"dweb:/ipfs/QmZDCg1HJUVdrfEPY6CU9GXuqF9tySEBwrdq23FuCrabdZ\"]},\"contracts/Tokens/Prime/PrimeStorage.sol\":{\"keccak256\":\"0x5285c875114db2ea2be0b81b65722d5761806217022db733323c4e03365a95e7\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://f7381f89c82fcbacdb5f8d66dd944d09e102c23ad243d96cb46b480621bfb62c\",\"dweb:/ipfs/QmNgyd8zgXHB6akfj78MUrgLDvzjKn8d8u3KE3fhb2pPJh\"]},\"contracts/Tokens/Prime/libs/FixedMath.sol\":{\"keccak256\":\"0x9079477d98acfc1a1dab1279230eb33d5cc6898e17c3b61aec912de0ba4fee8a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5debdb0e698726f2be4b0c0cfbca4d075982256f6f083418d9444d2453187924\",\"dweb:/ipfs/QmZaikQFFPv22Gk347K4dDvZnnMG4KqNcanYMGwj28dbkF\"]},\"contracts/Tokens/Prime/libs/FixedMath0x.sol\":{\"keccak256\":\"0xda0304ab7a6b5953a0fed087ba324eeaacbf826a412c5492cb0e445dc03a88a3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://678f7c0d743dd37d14f99f3ef590e2a5b200d51b79df4d47520446afb02334ba\",\"dweb:/ipfs/QmSGKc4d7VLA6jNK9iqAknUpumkbNWj9WR6V5RnbM9FCwT\"]},\"contracts/Tokens/Prime/libs/Scores.sol\":{\"keccak256\":\"0xa02a36d836711c975f20b8e67fc134d986881f5fd9f835be285ed8021ffc10ca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e249a43eb4f7fca9b472342ebe70cf083d6096ae266487966ad49224307bf49e\",\"dweb:/ipfs/QmWbf64WGHQUgAsWKgCokAS4VmVdCAQkwbnJHBf2gce3Ej\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x000300000000000200240000000000020000000003010019000000600330027000000fd703300197000200000031035500010000000103550000000102200190000000330000c13d0000008002000039000000400020043f000000040230008c000022570000413d000000000201043b000000e00220027000000fe50420009c0000006c0000213d000010160420009c000000850000a13d000010170420009c000000bb0000a13d000010180420009c000001230000a13d000010190420009c00000a1f0000a13d0000101a0420009c00000aaf0000613d0000101b0420009c00000ad00000613d0000101c0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000002402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000000401100370000000000101043b00000000001004350000013a01000039000000200010043f00000040010000393f553f1c0000040f00000014020000290000000000200435000000f20000013d0000000002000416000000000202004b000022570000c13d0000001f0230003900000fd8022001970000018002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000450000613d00000180050000390000018006400039000000000701034f000000007807043c0000000005850436000000000865004b000000410000c13d000000000502004b000000530000613d000000000141034f00000003022002100000018004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000e00130008c000022570000413d000001800100043d00000fd90210009c000022570000213d000001a00200043d00000fd90320009c000022570000213d000002400600043d000000000306004b0000000003000019000000010300c039000000000336004b000022570000c13d000002200400043d000002000500043d000001e00300043d000001c00700043d000000000806004b000008e70000613d000000000707004b00000a4c0000c13d00000fdc07000041000000010800003900000a550000013d00000fe60420009c000000ac0000a13d00000fe70420009c000000ce0000a13d00000fe80420009c0000012e0000a13d00000fe90420009c00000a280000a13d00000fea0420009c00000adc0000613d00000feb0420009c00000b100000613d00000fec0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000000001000412001600000001001d001500c00000003d000080050100003900000044030000390000000004000415000000160440008a00000c900000013d0000102f0420009c000000df0000213d0000103b0420009c0000015d0000213d000010410420009c000008ec0000213d000010440420009c00000b370000613d000010450220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d0000003302000039000000000202041a00000fd9022001970000000003000411000000000232004b00000f560000c13d000000000201004b000010530000c13d00000fe001000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f0000108501000041000000c40010043f0000108401000041000000e40010043f000010990100004100003f570001043000000fff0420009c000000f60000213d0000100b0420009c000001810000213d000010110120009c000008f50000213d000010140120009c00000b420000613d000010150120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013b0100003900000f520000013d000010240420009c0000018c0000213d0000102a0120009c000009060000213d0000102d0120009c00000b470000613d0000102e0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000000001000412002000000001001d001f00a00000003d000080050100003900000044030000390000000004000415000000200440008a00000c900000013d00000ff40420009c0000082e0000213d00000ffa0420009c000009260000213d00000ffd0120009c00000b4c0000613d00000ffe0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013601000039000000000101041a0000008001100270000000800010043f000010470100004100003f560001042e000010300420009c000008390000213d000010360420009c000009400000213d000010390420009c00000b570000613d0000103a0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f00000040010000393f553f1c0000040f00000f180000013d000010000420009c000008bf0000213d000010060420009c0000095b0000213d000010090420009c00000b770000613d0000100a0220009c000022570000c13d000000840230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001200000002001d0000004401100370000000000101043b001100000001001d000000e001000039000000400010043f0000002a01000039000000800010043f0000106a01000041000000a00010043f0000106b01000041000000c00010043f00000080010000393f5525850000040f0000001403000029000000000103004b000010670000c13d000000400100043d000010770200004100000a4e0000013d0000101f0420009c000009640000213d000010220120009c00000b8b0000613d000010230120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001310100003900000f520000013d00000fef0420009c000009770000213d00000ff20420009c00000b9e0000613d00000ff30220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000000102004b000010940000c13d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000010450000013d0000103c0420009c0000098a0000213d0000103f0420009c00000ba30000613d000010400220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000002402100370000000000202043b001300000002001d0000000401100370000000000101043b001400000001001d000000c001000039000000400010043f0000001901000039000000800010043f000010aa01000041000000a00010043f00000080010000393f5525850000040f0000012e01000039000000000101041a000000140110006b0000017e0000413d0000012f01000039000000000101041a000000130110006b00000f930000813d000000400100043d000010ac0200004100000a4e0000013d0000100c0420009c000009ad0000213d0000100f0420009c00000baf0000613d000010100120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000970100003900000d860000013d000010250420009c000009d30000213d000010280420009c00000c2e0000613d000010290220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000402043b000000000204004b0000000002000019000000010200c039001400000004001d000000000224004b000022570000c13d0000002402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b001100000001001d0000104e0110009c000022570000213d001000240020003d000000110100002900000005011002100000001001100029000000000131004b000022570000213d000000c001000039000000400010043f0000001501000039000000800010043f0000108d01000041000000a00010043f00000080010000393f5525850000040f000000140100006b000012080000c13d000000110100006b00000f700000613d000200000000001d000001c50000013d00000002020000290000000102200039000200000002001d000000110120006c00000f700000813d000000020100002900000005011002100000001001100029001300000001001d0000000101100367000000000101043b001400000001001d00000fd90110009c000022570000213d000000140100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000ff03200190000009580000c13d0000107c0220019700000001022001bf000000000021041b0000012f01000039000000000101041a000010af0210009c0000101a0000613d00000001021000390000012f03000039000000000023041b0000013102000039000000000202041a0000012e03000039000000000303041a000000000223004b0000017e0000213d0000013002000039000000000202041a000000000121004b0000017e0000813d0000013c01000039000000000101041a000000000101004b000002170000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000014020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000000101100367000000000101043b000f00000001001d00000fd90110009c000022570000213d0000013501000039000000000101041a000400000001001d000000000101004b000001c00000613d00000000020000190000013501000039000000000101041a000000000121004b00001dd60000a13d000700000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000e00000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000002760000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d000002c10000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c000002810000c13d0000000003000031000000200130008c00000020040000390000000004034019000002b00000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001300000009001d001200000005001d3f553f500000040f000000120a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000029d0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000002990000c13d0000001f06400190000002ac0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021a00000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001200000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000130100002900000fd9011001970000000405900039001300000001001d000000000015043500000000010004140000001202000029000000040420008c000002ec0000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000130100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000003340000013d000c00000005001d000b00000003001d00000fd70390009c00000fd7030000410000000003094019000a00400030021800000fd70310009c00000fd701008041000000c0011002100000000a011001af0000104c011001c7000d00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020170000613d0000000d030000290000104e0130009c0000000c0200002900000f810000213d000000400030043f0000105901000041000000000013043500000013010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000a011001af0000104c011001c700000012020000293f553f500000040f0000000d090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000b0a000029000003210000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000031d0000c13d0000001f06400190000003300000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020260000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001203000029000000000123004b0000101a0000413d000000000123004b0000037b0000613d000d00000002001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001203000029000000000031041b0000000e010000290000000301100039000000000101041a000000000201004b0000000002030019000003700000613d0000000d0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d9000003710000013d00000000020000190000000e010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000201100039000000000101041a001300000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000002011000390000001302000029000000000021041b0000013701000039000000000201041a0000013801000039000000000101041a0000013903000039000000000303041a000000400a00043d0000004404a000390000000f0500002900000000005404350000002404a000390000000000340435000010900300004100000000003a043500000fd9011001970000000403a000390000000000130435000000000100041400000fd902200197000000040320008c000003c20000c13d0000000003000031000000600130008c00000060040000390000000004034019000003f00000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700130000000a001d3f553f500000040f000000130a0000290000000003010019000000600330027000000fd703300197000000600430008c0000006004000039000000000403401900000005054002720000000505500210000003de0000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b000003da0000c13d0000001f06400190000003ec0000613d000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020350000613d0000001f01400039000000e00210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000600130008c000022570000413d00000000020a04330000004001a000390000000001010433001300000002001d001200000001001d000000000112004b0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000301043b000000400900043d0000104801000041000000000519043600000004019000390000000f02000029000000000021043500000012020000290000001301200069000000000213004b0000000003018019001200000003001d00000000010004140000001402000029000000040320008c000004280000c13d0000000003000031000000200130008c00000020040000390000000004034019000004570000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7001300000009001d000e00000005001d3f553f500000040f0000000e0a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004440000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000004400000c13d0000001f06400190000004530000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020440000613d0000001f01400039000000600110018f000000000a91001900000000021a004b000000000200001900000001020040390000104e04a0009c00000f810000213d000000010220019000000f810000c13d0000004000a0043f000000200230008c000022570000413d0000000002090433000800000002001d0000104a0200004100000000062a043600000000050004140000001402000029000000040420008c0000049d0000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f00000fdb011001c700130000000a001d000e00000006001d3f553f500000040f0000000e09000029000000130a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004880000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000004840000c13d0000001f06400190000004970000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020530000613d0000001f01400039000000600110018f000000000ba100190000104e02b0009c00000f810000213d0000004000b0043f000000200230008c000022570000413d00000000060a04330000104b0200004100000000072b04360000000402b000390000000f04000029000000000042043500000000050004140000001402000029000000040420008c000004e00000613d000d00000006001d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700130000000b001d000e00000007001d3f553f500000040f0000000e09000029000000130b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004ca0000613d000000000601034f00000000070b0019000000006806043c0000000007870436000000000897004b000004c60000c13d0000001f06400190000004d90000613d0000000505500210000000000751034f00000000055b00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020620000613d0000001f01400039000000600110018f0000000d060000290000000009b100190000104e0290009c00000f810000213d000000400090043f000000200230008c000022570000413d00000000020b043300090000406200ad000000000406004b000004ed0000613d00000009546000f9000000000224004b0000101a0000c13d0000013702000039000000000202041a000010910400004100000000064904360000000904000029000e104d40400132000000000400041400000fd902200197000000040520008c000005280000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7001300000009001d000d00000006001d3f553f500000040f0000000d0a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000005130000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000050f0000c13d0000001f06400190000005220000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020710000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000d00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d0000109201000041000000000014043500000004014000390000001302000029000000000021043500000000010004140000000d02000029000000040320008c000005620000613d00000fd70340009c00000fd7030000410000000003044019001300000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000013040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020800000613d0000104e0140009c00000f810000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000c00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d00001093010000410000000001140436000d00000001001d00000004014000390000001402000029000000000021043500000000010004140000000c02000029000000040320008c001300000004001d000005960000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000013040000290000000003010019000000600330027000000fd70030019d00000fd703300197000200000001035500000001022001900000208f0000613d0000104e0140009c00000f810000213d0000001301000029000000400010043f0000106e0110009c00000f810000213d0000001302000029000000a001200039000000400010043f0000008001200039000b00000001001d00000000000104350000006001200039000a00000001001d00000000000104350000004001200039000500000001001d000000000001043500000000000204350000000d0100002900000000000104350000013701000039000000000201041a000000400a00043d000010910100004100000000051a0436000000000100041400000fd902200197000000040320008c000005b90000c13d0000000003000031000000200130008c00000020040000390000000004034019000005e80000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c7000c0000000a001d000600000005001d3f553f500000040f00000006090000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000005d50000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000005d10000c13d0000001f06400190000005e40000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000209e0000613d0000001f01400039000000600110018f0000000009a10019000000000219004b000000000200001900000001020040390000104e0490009c00000f810000213d000000010220019000000f810000c13d000000400090043f000000200230008c000022570000413d00000000020a043300000fd90420009c000022570000213d0000014204000039000000000404041a0000109405000041000000000659043600000004059000390000000000250435000000000500041400000fd902400197000000040420008c000600000002001d000006340000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c7000c00000009001d000300000006001d3f553f500000040f000000030a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000061f0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000061b0000c13d0000001f064001900000062e0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020ad0000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433000c00000001001d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000201041a00000012312000b9000000120300006b0000000c05000029000006530000613d00000012431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000065a0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000b020000290000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a00000012312000b9000000120300006b0000000c05000029000006730000613d00000012431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000067a0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000a020000290000000000120435000000400900043d0000109501000041000000000519043600000004019000390000001402000029000000000021043500000000010004140000000602000029000000040320008c0000068c0000c13d0000000003000031000000200130008c00000020040000390000000004034019000006bb0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000c00000009001d000600000005001d3f553f500000040f000000060a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000006a80000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000006a40000c13d0000001f06400190000006b70000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020bc0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433000000000201004b000006e40000613d0000000e241000b900000000321400d90000000e0220006c0000101a0000c13d00000008321000b900000000311200d90000104d5340012a000000080110006c0000101a0000c13d0000104d5120012a0000000a050000290000000005050433000000000653004b000006ed0000413d000010960440009c000006ec0000a13d0000000e645000b900000009060000290000104d0660009c000006e20000413d0000000e764000fa000000000556004b0000101a0000c13d000e0000303400e1000006ed0000013d0000000a010000290000000001010433000000000101004b00000000010000190000000002000019000006ed0000c13d00000000010000190000000002000019000e00000000001d0000000b030000290000000003030433000000000431004b000006f30000813d0000000802000029000006fd0000013d000010960220009c0000000002000019000006fd0000a13d00000008423000b9000000080400006b000006fc0000613d00000008542000fa000000000334004b0000101a0000c13d00000000121200d90000000e01200029000000000321004b0000000003000019000000010300403900000001033001900000101a0000c13d000000130300002900000000001304350000000e010000290000000d03000029000000000013043500000005010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000007300000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000400900043d000000000101043b0000077a0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c0000073b0000c13d0000000003000031000000200130008c000000200400003900000000040340190000076a0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000e0000000a001d000d00000005001d3f553f500000040f0000000d090000290000000e0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000007570000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000007530000c13d0000001f06400190000007660000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021af0000613d0000001f01400039000000600110018f0000000009a10019000000000119004b000000000100001900000001010040390000104e0290009c00000f810000213d000000010110019000000f810000c13d000000400090043f000000200130008c000022570000413d00000000010a043300000fd90210009c000022570000213d00001079020000410000000005290436000000000300041400000fd902100197000000040120008c000007850000c13d0000000003000031000000200130008c00000020040000390000000004034019000007b40000013d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000e00000009001d000d00000005001d3f553f500000040f0000000d0a0000290000000e090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000007a10000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000079d0000c13d0000001f06400190000007b00000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020cb0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000002090433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000000120120008c0000000101000039000007d30000613d00000012022000890000000a03000039000000010420019000000000543300a9000000010300603900000000311300a9000000010320008c00000001022002700000000003040019000007cb0000213d0000001302000029000000000302043300000000423100a9000000000403004b000007db0000613d00000000433200d9000000000113004b0000101a0000c13d000000130100002900000000002104350000013601000039000000000101041a0000106403100197000000800410027000000012010000293f55356a0000040f000000140200002900000000002004350000013402000039000000200020043f001300000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000001011000390000001302000029000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000301100039000000000101041a001300130010002d000000130110006b0000000001000019000000010100403900000001011001900000101a0000c13d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000003011000390000001302000029000000000021041b00000007020000290000000102200039000000040120006c000002350000413d000001c00000013d00000ff50420009c000009e00000213d00000ff80120009c00000c3a0000613d00000ff90120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001300100003900000f520000013d000010310420009c00000a070000213d000010340420009c00000c3f0000613d000010350220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000441034f000000000404043b001400000004001d0000104e0440009c000022570000213d001000240020003d000000140200002900000005022002100000001002200029000000000232004b000022570000213d0000002402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b000f00000001001d0000104e0110009c000022570000213d000e00240020003d0000000f0100002900000005011002100000000e01100029000000000131004b000022570000213d000000c001000039000000400010043f0000002001000039000000800010043f0000109a01000041000000a00010043f00000080010000393f5525850000040f00000014020000290000000f0120006c00001dd30000c13d0000000f0100006b00000f700000613d001400000000001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000140200002900000005022002100012000e0020002d00000001030003670000001204300360000000000404043b000000000101043b001300000004001d000000000114004b00001f750000213d001100100020002d0000001101300360000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001302000029000000000021041b00000001010003670000001102100360000000000502043b00000fd90250009c000022570000213d0000001201100360000000000101043b000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c040000413f553f4b0000040f0000000101200190000022570000613d00000014020000290000000102200039001400000002001d0000000f0120006c000008780000413d00000f700000013d000010010120009c00000a160000213d000010040120009c00000c6e0000613d000010050120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000c001000039000000400010043f0000000d01000039000000800010043f0000106701000041000000a00010043f00000080010000393f5525850000040f0000000002000411000000400100043d000000c903000039000000000503041a000010b004500197000000ff0550019000000f5f0000c13d00000001044001bf000000000043041b000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000103000039000010690400004100000f6d0000013d000000000807004b00000a540000c13d000000400100043d00000fda0200004100000a4e0000013d000010420120009c00000c730000613d000010430120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001370100003900000d860000013d000010120120009c00000c810000613d000010130120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013502000039000000000102041a000000800010043f00000000002004350000002002000039000000000301004b00000f720000c13d000000a0010000390000000004020019000010210000013d0000102b0120009c00000c860000613d0000102c0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000003301000039000000000201041a00000fd9052001970000000003000411000000000335004b00000f560000c13d0000006503000039000000000403041a0000105b04400197000000000043041b0000105b02200197000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d0400004100000000060000193f553f4b0000040f0000000101200190000022570000613d00000f700000013d00000ffb0420009c00000c960000613d00000ffc0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b000000000302001900000fd90220009c000022570000213d0000002401100370000000000101043b001400000001001d00000fd90110009c000022570000213d0000000001030019001300000001001d3f5523c70000040f000000130100002900000014020000293f5539890000040f000010460000013d000010370120009c00000cae0000613d000010380120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000000100041100000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000000102004b00000fb20000c13d000000400100043d000010a10200004100000a4e0000013d000010070120009c00000cb30000613d000010080120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000fb0100003900000f520000013d000010200420009c00000cb80000613d000010210220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d3f552efd0000040f000000000200041100000014010000293f552f130000040f000010460000013d00000ff00420009c00000cbd0000613d00000ff10220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013e01000039000000200010043f00000040010000393f553f1c0000040f00000d860000013d0000103d0420009c00000cd60000613d0000103e0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d000000000200041a0000fffe0320019000000fd90000c13d0000014303000039000000000403041a0000105b04400197000000000114019f000000000013041b0000107c0120019700000002011001bf000000000010041b0000000201000039000000800010043f000000000100041400000fd70210009c00000fd701008041000000c001100210000010a4011001c70000800d02000039000000010300003900000fe30400004100000f6d0000013d0000100d0420009c00000cfa0000613d0000100e0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b00000fd90320009c000022570000213d0000002401100370000000000101043b001400000001001d00000fd90110009c000022570000213d00000000002004350000013401000039000000200010043f00000040010000393f553f1c0000040f00000014020000290000000000200435000000200010043f00000040010000393f553f1c0000040f0000000202100039000000000202041a0000000103100039000000000303041a000000000101041a000000800010043f000000a00030043f000000c00020043f000010780100004100003f560001042e000010260120009c00000d820000613d000010270120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013601000039000000000101041a0000106401100197000000800010043f000010470100004100003f560001042e00000ff60420009c00000d8b0000613d00000ff70120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000010460100004100000000001004390000000001000412000000040010044300000040010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000010210008c0000103a0000613d000000020110008c0000104d0000c13d00001062010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000010450000013d000010320420009c00000f140000613d000010330220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d3f5522a60000040f000010460000013d000010020120009c00000f1b0000613d000010030120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001410100003900000d860000013d0000101d0420009c00000f2e0000613d0000101e0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000330100003900000d860000013d00000fed0420009c00000f440000613d00000fee0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000601043b00000fd90160009c000022570000213d0000003301000039000000000101041a00000fd9051001970000000001000411000000000115004b00000f560000c13d0000006501000039000000000201041a0000105b02200197000000000262019f000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000105d040000413f553f4b0000040f0000000101200190000022570000613d00000f700000013d000000400100043d00000fdd02000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f57000104300000000208000039000000a00060043f000000800070043f000000c00080043f000000e00010043f000001000020043f000001600030043f000001200050043f000001400040043f000000000900041a0000ff000a90019000000a9b0000c13d000000ff0a90018f000000ff0aa0008c00000a7f0000613d000000ff019001bf000000000010041b000000ff01000039000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900000fe3040000413f553f4b0000040f0000000101200190000022570000613d000001600300043d000001400400043d000001200500043d000001000200043d000000e00100043d000000c00800043d000000a00600043d000000800700043d0000014000000443000001600070044300000020070000390000018000700443000001a0006004430000004006000039000001c000600443000001e000800443000000600600003900000200006004430000022000100443000000800100003900000240001004430000026000200443000000a0010000390000028000100443000002a000500443000000c001000039000002c000100443000002e000400443000000e0010000390000030000100443000003200030044300000100007004430000000801000039000001200010044300000fe40100004100003f560001042e000000400100043d000000640210003900000fde030000410000000000320435000000440210003900000fdf03000041000000000032043500000024021000390000002703000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f5700010430000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013301000039000000200010043f00000040010000393f553f1c0000040f0000000402100039000000000202041a0000000303100039000000000303041a0000000204100039000000000404041a0000000105100039000000000505041a000000000101041a000000800010043f000000a00050043f000000c00040043f000000e00030043f000000ff012001900000000001000019000000010100c039000001000010043f0000108a0100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d3f5523c70000040f000000000100001900003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000201043b00000fd90120009c000022570000213d0000013501000039000000000101041a000d00000001001d0000104e0110009c00000f810000213d0000000d0100002900000005031002100000003f013000390000104f04100197000010500140009c00000f810000213d0000008001400039000000400010043f0000000d05000029000000800050043f000000000505004b000011a50000c13d00000020020000390000000002210436000000800300043d00000000003204350000004002100039000000000403004b000010310000613d0000000004000019000000800800003900000020088000390000000005080433000000007605043400000fd9066001970000000006620436000000000707043300000fd9077001970000000000760435000000400550003900000000050504330000004006200039000000000056043500000060022000390000000104400039000000000534004b00000aff0000413d000010310000013d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002401100370000000000101043b001300000001001d00000fd90110009c000022570000213d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f000000e00000043f000001000000043f000001200000043f000001400000043f000001600000043f000001800000043f000001a00000043f0000104801000041000001c00010043f0000001301000029000001c40010043f00000000010004140000001402000029000000040320008c000010b80000c13d0000000004000031000000200140008c0000002004008039000010df0000013d0000000001000416000000000101004b000022570000c13d0000000001000412002400000001001d002300e00000003d000080050100003900000044030000390000000004000415000000240440008a00000c900000013d0000000001000416000000000101004b000022570000c13d0000012f0100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000013f0100003900000d860000013d0000000001000416000000000101004b000022570000c13d0000000001000412001800000001001d001700800000003d000080050100003900000044030000390000000004000415000000180440008a00000c7d0000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d0000013701000039000000000201041a0000013901000039000000000101041a0000013803000039000000000303041a0000109004000041000000800040043f00000fd903300197000000840030043f000000a40010043f0000001401000029000000c40010043f000000000100041400000fd902200197000000040320008c00000fe50000c13d0000000003000031000000600130008c000000600400003900000000040340190000100e0000013d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002401100370000000000101043b001300000001001d00000fd90110009c000022570000213d3f552efd0000040f000000140100002900000013020000293f552f130000040f000010460000013d000000240130008c000022570000413d0000000001000416000000000101004b000022570000c13d000000c001000039000000400010043f0000001901000039000000800010043f0000108c01000041000000a00010043f00000080010000393f5525850000040f00000004010000390000000101100367000000000101043b3f552ecf0000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d000000650100003900000d860000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d0000000000100435000001400100003900000f4f0000013d000001440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001210640020019b000010640220009c000022570000213d0000008402100370000000000202043b000010640220009c000022570000213d000000a402100370000000000202043b001100000002001d00000fd90220009c000022570000213d000000c402100370000000000202043b001000000002001d00000fd90220009c000022570000213d000000e402100370000000000202043b000f00000002001d00000fd90220009c000022570000213d0000010401100370000000000101043b000e00000001001d00000fd90110009c000022570000213d00000000010004150000001c0110008a000c000500100218000000000100041a000d00000001001d000bff000010019400001e310000c13d00000000010004150000001b0110008a000c0005001002180000000d01000029000000ff0110019000001e310000c13d0000000d010000290000107c0110019700000101011001bf000d00000000001d000000000010041b000000100200006b00001f720000613d000000140200006b00001f720000613d000000130200006b00001f720000613d0000000e0200006b00001f720000613d00000001020003670000008403200370000000000303043b00001064043001970000006405200370000000000505043b000010640550019800001f870000613d000000000445004b00001f870000813d000000800330021000000012033001af0000013604000039000000000034041b0000013803000039000000000403041a0000105b0440019700000013044001af000000000043041b0000004402200370000000000202043b0000013903000039000000000023041b0000013702000039000000000302041a0000105b0330019700000014033001af000000000032041b0000013b02000039000000000002041b0000014102000039000000000302041a0000105b0330019700000010033001af000000000032041b0000013f02000039000000000302041a0000105b033001970000000f033001af000000000032041b0000014202000039000000000302041a0000105b033001970000000e033001af000000000032041b0000ff000110019000001fd30000c13d000000400100043d00000064021000390000108603000041000000000032043500000044021000390000108703000041000000000032043500000024021000390000002b0300003900000aa40000013d0000000001000416000000000101004b000022570000c13d0000006501000039000000000101041a00000fd9021001970000000001000411000000000212004b00000f870000c13d3f552eb60000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d0000012e0100003900000f520000013d000000640230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000004402100370000000000202043b001300000002001d0000002401100370000000000101043b001200000001001d000000e001000039000000400010043f0000002a01000039000000800010043f0000109e01000041000000a00010043f0000106b01000041000000c00010043f00000080010000393f5525850000040f000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000201043b0000000401200039000000000101041a000000ff01100190000011040000c13d000000400100043d000010a50200004100000a4e0000013d0000000001000416000000000101004b000022570000c13d0000013d0100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000000001000412002200000001001d002100600000003d000080050100003900000044030000390000000004000415000000220440008a000000050440021000001046020000413f553f2d0000040f00000d870000013d0000000001000416000000000101004b000022570000c13d000001430100003900000d860000013d0000000001000416000000000101004b000022570000c13d0000000001000412001e00000001001d001d00000000001d0000800501000039000000440300003900000000040004150000001e0440008a000000050440021000001046020000413f553f2d0000040f000000800010043f000010470100004100003f560001042e000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b000000000302001900000fd90220009c000022570000213d0000002401100370000000000101043b000000000201001900000fd90110009c000022570000213d0000000001030019001400000001001d001300000002001d3f55263a0000040f000000140100002900000013020000293f5528950000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d000001390100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000013c0100003900000f520000013d0000000001000416000000000101004b000022570000c13d000001380100003900000d860000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f00000040010000393f553f1c0000040f000000000101041a000000ff021001900000000002000019000000010200c039000000800020043f0000ff00011001900000000001000019000000010100c039000000a00010043f0000105e0100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b000200000001001d0000104e0110009c000022570000213d000100240020003d000000020100002900000005011002100000000101100029000000000131004b000022570000213d0000013d01000039000000000101041a000000000101004b00000cf60000613d0000013b01000039000000000101041a000000000101004b000012c40000c13d000010a801000041000000800010043f000010a90100004100003f5700010430000000a40230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001200000002001d0000004401100370000000000101043b001100000001001d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f000000e00000043f000001000000043f000001200000043f000001400000043f000001600000043f000001800000043f000001a00000043f000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000301100039000000000101041a001000000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000101041a000000100210006b0000101a0000413d0000001001100069000000c00010043f00000084010000390000000101100367000000000101043b001300000001001d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000130210006c0000001301008029000001000010043f0000001102000029000000120300002900000014040000293f5533a20000040f0000000032010434000001200020043f0000000002030433000001400020043f00000040021000390000000002020433000001600020043f00000060021000390000000002020433000001800020043f00000080011000390000000001010433000001a00010043f00000014010000293f552e180000040f0000107902000041000000400300043d001300000003001d0000000002230436001000000002001d000000000300041400000fd902100197000000040120008c00001deb0000c13d0000000004000031000000200140008c000000200400803900001e190000013d0000000001000416000000000101004b000022570000c13d0000014201000039000000000101041a00000fd901100197000000800010043f000010470100004100003f560001042e000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001410640020019b000010640220009c000022570000213d0000002401100370000000000101043b001300000001001d000010640110009c000022570000213d000000c001000039000000400010043f0000001c01000039000000800010043f0000106501000041000000a00010043f00000080010000393f5525850000040f000000400100043d0000001407000029000000000207004b00001f880000613d0000001303000029000000000237004b00001f880000813d0000013602000039000000000202041a000000000031043500000fd70310009c00000fd7010080410000004001100210000000000300041400000fd70430009c00000fd703008041000000c003300210000000000113019f00000fe2011001c7000010640520019700000080062002700000800d02000039000000040300003900001066040000413f553f4b0000040f0000000101200190000022570000613d0000001301000029000000800110021000000014011001af0000013602000039000000000012041b0000013501000039000000000101041a000f00000001001d000000000101004b000011280000613d000000000200001900000dcd0000013d000000120200002900000001022000390000000f0120006c000011280000813d0000013501000039000000000101041a000000000121004b00001dd60000a13d001200000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001100000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00000e0e0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001400000001001d00000e590000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00000e190000c13d0000000003000031000000200130008c0000002004000039000000000403401900000e480000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001400000009001d001300000005001d3f553f500000040f000000130a00002900000014090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200000e350000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000e310000c13d0000001f0640019000000e440000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001f780000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001400000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001300000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000140100002900000fd9011001970000000405900039001400000001001d000000000015043500000000010004140000001302000029000000040420008c00000e840000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000140100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900000ecc0000013d000e00000005001d000d00000003001d00000fd70390009c00000fd7030000410000000003094019000c00400030021800000fd70310009c00000fd701008041000000c0011002100000000c011001af0000104c011001c7001000000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001eb30000613d00000010030000290000104e0130009c0000000e0200002900000f810000213d000000400030043f0000105901000041000000000013043500000014010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000c011001af0000104c011001c700000013020000293f553f500000040f00000010090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000d0a00002900000eb90000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000eb50000c13d0000001f0640019000000ec80000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001ec20000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d000000140100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001303000029000000000123004b0000101a0000413d000000000123004b00000dc90000613d001000000002001d000000140100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001303000029000000000031041b00000011010000290000000301100039000000000101041a000000000201004b000000000203001900000f080000613d000000100320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d900000f090000013d000000000200001900000011010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b00000dc90000013d0000000001000416000000000101004b000022570000c13d000000c901000039000000000101041a000000ff0110019000000f290000013d0000000001000416000000000101004b000022570000c13d0000000001000412001a00000001001d001900200000003d0000800501000039000000440300003900000000040004150000001a0440008a000000050440021000001046020000413f553f2d0000040f000000000101004b0000000001000019000000010100c039000000800010043f000010470100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d000000c001000039000000400010043f0000000d01000039000000800010043f0000108b01000041000000a00010043f00000080010000393f5525850000040f00000014010000293f552a430000040f000000000100001900003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f00000040010000393f553f1c0000040f000000000101041a000000800010043f000010470100004100003f560001042e00000fe001000041000000800010043f0000002001000039000000840010043f000000a40010043f000010ad01000041000000c40010043f000010a20100004100003f5700010430000000000043041b000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900001068040000413f553f4b0000040f0000000101200190000022570000613d000000000100001900003f560001042e000000a005000039000010520300004100000000040000190000000006050019000000000503041a00000fd905500197000000000556043600000001033000390000000104400039000000000714004b00000f750000413d000000410160008a000010b104100197000010500140009c000010200000a13d000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f570001043000000fe001000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f0000109701000041000000c40010043f0000109801000041000000e40010043f000010990100004100003f57000104300000013001000039000000000601041a0000013101000039000000000501041a000000400100043d0000001302000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000403000039000010ab0400004100000014070000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000013002000039000000000012041b00000014010000290000013102000039000000000012041b000000000100001900003f560001042e001400000002001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000201043b001300000002001d000000140120006c0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d0000001303000029000000140230006a000000000101043b000000000112004b00001b160000813d000000400100043d000010a00200004100000a4e0000013d00000fe001000041000000800010043f0000002001000039000000840010043f0000002e01000039000000a40010043f0000107b01000041000000c40010043f0000107a01000041000000e40010043f000010990100004100003f570001043000000fd70310009c00000fd701008041000000c001100210000010a2011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f000000050640027200000ffb0000613d000000800700003900000005086002100000008008800039000000000901034f000000009a09043c0000000007a70436000000000a87004b00000ff70000c13d000000000705004b0000100a0000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000112b0000613d0000001f01400039000000e00110018f0000008001100039000000400010043f000000600130008c000022570000413d000000c00100043d000000800200043d001300000001001d001200000002001d000000000112004b0000113a0000813d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300000008001400039000000400010043f0000000000210435000000a002400039000000800300043d0000000000320435000000c002400039000000000403004b000010310000613d000000a0040000390000000005000019000000004604043400000fd90660019700000000026204360000000105500039000000000635004b0000102b0000413d000000000212004900000fd70320009c00000fd702008041000000600220021000000fd70310009c00000fd7010080410000004001100210000000000112019f00003f560001042e0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000400200043d000000000012043500000fd70120009c00000fd702008041000000400120021000001061011001c700003f560001042e000010630100004100000000001004350000005101000039000000040010043f0000104c0100004100003f57000104300000009702000039000000000302041a0000105b04300197000000000414019f000000000042041b00000fd902300197000000800020043f000000a00010043f000000000100041400000fd70210009c00000fd701008041000000c001100210000010ae011001c70000800d0200003900000001030000390000107e040000413f553f4b0000040f000000010120019000000f700000c13d000022570000013d0000013f01000039000000000101041a00000fd901100197000000000113004b000011b80000c13d000000130100002900000fd901100197000f00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d001000000002001d000000000101043b000c00000001001d0000000401100039000e00000001001d000000000101041a000d00000001001d000000ff0110019000001b0e0000c13d000010710100004100000010020000290000000001120436000b00000001001d00000004012000390000000f02000029000000000021043500000000010004140000001402000029000000040220008c00001d8c0000c13d0000000004000031000000200140008c000000200400803900001dbb0000013d001400000002001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d0000001303000029000000140230006a000000000301043b000000000123004b00000000010000190000000001232049000010460000013d00000fd70310009c00000fd701008041000000c00110021000001049011001c73f553f500000040f000001c0090000390000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000010cc0000613d000000000701034f000000007807043c0000000009890436000001e00890008c000010c80000c13d000000000705004b000010db0000613d0000000506600210000000000761034f0000000305500210000001c006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000011c60000613d0000001f01400039000000600110018f000001c002100039001200000002001d000000400020043f000000200240008c000022570000413d000001c00200043d001000000002001d0000104a0200004100000012050000290000000002250436001100000002001d00000000040004140000001402000029000000040320008c000011d60000c13d0000000002150019001100000002001d000000400020043f00000012020000290000000002020433001200000002001d0000104b0200004100000011040000290000000002240436000f00000002001d00000004024001bf0000001303000029000000000032043500000000020004140000001403000029000000040330008c00001a850000c13d0000000001410019000000400010043f00001ab60000013d0000001401000029001100000002001d3f5523c70000040f0000001101000029000000000601041a0000000101100039001000000001001d000000000701041a000000400100043d0000002002100039000000130300002900000000003204350000001202000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d0200003900000004030000390000109f0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000012010000290000001102000029000000000012041b00000013010000290000001002000029000000000012041b3f552dfd0000040f000000000100001900003f560001042e000000400200043d0000001f0430018f00000005053002720000000505500210000011370000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000011330000c13d000000000604004b00001d770000613d00001d6b0000013d0000104601000041000000000010043900000000010004120000000400100443000000a0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001100000001001d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a001000000001001d0000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400400043d000010a30240009c00000f810000213d0000001203000029000000130230006a000000000101043b0000004003400039000000400030043f000000000101041a0000ff00031001900000000003000019000000010300c0390000002005400039001300000005001d0000000000350435000000ff011001900000000003000019000000010300c039000000000034043500001e510000613d000000110420006b00001e510000a13d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000001041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000000001010433000000000101004b00000f400000613d00000014010000293f5529a40000040f000000000100001900003f560001042e000010510440009c00000f810000213d00000000040000190000006005100039000000400050043f00000040051000390000000000050435000000200510003900000000000504350000000000010435000000a00540003900000000001504350000002004400039000000000134004b00001b1c0000813d000000400100043d0000105a0510009c000011a80000a13d00000f810000013d0000014301000039000000000201041a000000400900043d0000106c01000041000000000019043500000004019000390000000000310435000000000100041400000fd902200197000000040320008c000019f50000c13d0000000201000367000000000300003100001a080000013d000000400200043d0000001f0430018f0000000505300272000011d20000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000011ce0000c13d000000000604004b00001d770000613d000000050550021000001d6b0000013d000000400150021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000110a000029000011ed0000613d000000000701034f0000001208000029000000007907043c00000000089804360000000009a8004b000011e90000c13d000000000705004b000011fc0000613d0000000506600210000000000761034f00000012066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001aff0000613d0000001f01400039000000600110018f0000001202100029001100000002001d000000400020043f000000200230008c000010f30000813d000022570000013d000000110100006b00000f700000613d001400000000001d000012110000013d00000014020000290000000102200039001400000002001d000000110120006c00000f700000813d000000140100002900000005011002100000001001100029001200000001001d0000000101100367000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000012020000290000000102200367000000000302043b000000000101043b000000000101041a000000ff02100190001300000003001d000012600000613d0000ff0001100190000012600000c13d00000fd90130009c000022570000213d00000000003004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000010b20220019700000100022001bf000000000021041b0000012e03000039000000000103041a000010af0210009c0000101a0000613d0000000102100039000000000023041b0000012f02000039000000000202041a000000000302004b0000101a0000613d000000010220008a0000012f03000039000000000023041b0000013102000039000000000202041a000000000121004b0000017e0000813d000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000002030000390000108f040000413f553f4b0000040f00000001012001900000120c0000c13d000022570000013d00000fd90130009c000022570000213d00000000003004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000000ff03200190000009580000c13d0000107c0220019700000101022001bf000000000021041b0000012e03000039000000000103041a000010af0210009c0000101a0000613d0000000102100039000000000023041b0000013102000039000000000202041a000000000121004b0000017e0000813d0000013001000039000000000101041a0000012f02000039000000000202041a000000000112004b0000017e0000213d0000013c01000039000000000101041a000000000101004b000012ab0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013030000290000000102200190000022570000613d000000000101043b0000000000300435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d0000000102000039000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e040000413f553f4b0000040f0000000101200190000022570000613d00000012010000290000000101100367000000000101043b00000fd90210009c000022570000213d3f552bd60000040f0000120c0000013d000000020100006b00000f700000613d000400000000001d000012cd0000013d00000004020000290000000102200039000400000002001d000000020120006c00000f700000813d0000000401000029000000050110021000000001011000290000000101100367000000000101043b001300000001001d00000fd90110009c000022570000213d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff011001900000219d0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000012c80000c13d0000013501000039000000000101041a000800000001001d000000000101004b000019c10000613d0000000002000019000013140000013d000000000101043b00000001011000390000001202000029000000000021041b00000010020000290000000102200039000000080120006c000019c10000813d0000013501000039000000000101041a000000000121004b00001dd60000a13d001000000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000401100039000000000101041a000000ff01100190000015180000613d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000015180000613d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000f00000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000013780000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001200000001001d000013c30000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c000013830000c13d0000000003000031000000200130008c00000020040000390000000004034019000013b20000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001200000009001d001100000005001d3f553f500000040f000000110a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000139f0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000139b0000c13d0000001f06400190000013ae0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021be0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001100000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000120100002900000fd9011001970000000405900039001200000001001d000000000015043500000000010004140000001102000029000000040420008c000013ee0000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000120100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000014360000013d000d00000005001d000c00000003001d00000fd70390009c00000fd7030000410000000003094019000b00400030021800000fd70310009c00000fd701008041000000c0011002100000000b011001af0000104c011001c7000e00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020da0000613d0000000e030000290000104e0130009c0000000d0200002900000f810000213d000000400030043f0000105901000041000000000013043500000012010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000b011001af0000104c011001c700000011020000293f553f500000040f0000000e090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000c0a000029000014230000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000141f0000c13d0000001f06400190000014320000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020e90000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001100000001001d000000120100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001103000029000000000123004b0000101a0000413d000000000123004b0000147d0000613d000e00000002001d000000120100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001103000029000000000031041b0000000f010000290000000301100039000000000101041a000000000201004b0000000002030019000014720000613d0000000e0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d9000014730000013d00000000020000190000000f010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d0000105a0320009c00000f810000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a001100000004001d000000000034043500000040022000390000000201100039000000000101041a001200000002001d0000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000012020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b0000101a0000413d00000011030000290000000003030433000000000421004900000000564300a9000000000121004b000014c50000613d00000000214600d9000000000131004b0000101a0000c13d000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039001200000006001d3f553f500000040f00000012030000290012104d303001320000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000301041a0000001202300029000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000201100039000000000101041a001200000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000002011000390000001202000029000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000e00000001001d0000000401100039000000000101041a000000ff01100190000013100000613d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000013100000613d0000013701000039000000000201041a0000013801000039000000000101041a0000013903000039000000000303041a000000400a00043d0000004404a00039000000130500002900000000005404350000002404a000390000000000340435000010900300004100000000003a043500000fd9011001970000000403a000390000000000130435000000000100041400000fd902200197000000040320008c000015560000c13d0000000003000031000000600130008c00000060040000390000000004034019000015840000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700120000000a001d3f553f500000040f000000120a0000290000000003010019000000600330027000000fd703300197000000600430008c0000006004000039000000000403401900000005054002720000000505500210000015720000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b0000156e0000c13d0000001f06400190000015800000613d000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020f80000613d0000001f01400039000000e00210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000600130008c000022570000413d00000000020a04330000004001a000390000000001010433001200000002001d001100000001001d000000000112004b0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000301043b000000400900043d0000104801000041000000000519043600000004019000390000001302000029000000000021043500000011020000290000001201200069000000000213004b0000000003018019001100000003001d00000000010004140000001402000029000000040320008c000015bc0000c13d0000000003000031000000200130008c00000020040000390000000004034019000015eb0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7001200000009001d000f00000005001d3f553f500000040f0000000f0a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000015d80000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000015d40000c13d0000001f06400190000015e70000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021070000613d0000001f01400039000000600110018f000000000a91001900000000021a004b000000000200001900000001020040390000104e04a0009c00000f810000213d000000010220019000000f810000c13d0000004000a0043f000000200230008c000022570000413d0000000002090433000700000002001d0000104a0200004100000000062a043600000000050004140000001402000029000000040420008c000016310000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f00000fdb011001c700120000000a001d000f00000006001d3f553f500000040f0000000f09000029000000120a0000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000161c0000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000016180000c13d0000001f064001900000162b0000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021160000613d0000001f01400039000000600110018f000000000ba100190000104e02b0009c00000f810000213d0000004000b0043f000000200230008c000022570000413d00000000060a04330000104b0200004100000000072b04360000000402b000390000001304000029000000000042043500000000050004140000001402000029000000040420008c000016740000613d000d00000006001d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700120000000b001d000f00000007001d3f553f500000040f0000000f09000029000000120b0000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000165e0000613d000000000601034f00000000070b0019000000006806043c0000000007870436000000000897004b0000165a0000c13d0000001f064001900000166d0000613d0000000505500210000000000751034f00000000055b00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021250000613d0000001f01400039000000600110018f0000000d060000290000000009b100190000104e0290009c00000f810000213d000000400090043f000000200230008c000022570000413d00000000020b043300090000406200ad000000000406004b000016810000613d00000009546000f9000000000224004b0000101a0000c13d0000013702000039000000000202041a000010910400004100000000064904360000000904000029000f104d40400132000000000400041400000fd902200197000000040520008c000016bc0000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7001200000009001d000d00000006001d3f553f500000040f0000000d0a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000016a70000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000016a30000c13d0000001f06400190000016b60000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021340000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d00000fd90110009c000022570000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000d00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d0000109201000041000000000014043500000004014000390000001202000029000000000021043500000000010004140000000d02000029000000040320008c000016f60000613d00000fd70340009c00000fd7030000410000000003044019001200000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000012040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000021430000613d0000104e0140009c00000f810000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000c00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d00001093010000410000000001140436000d00000001001d00000004014000390000001402000029000000000021043500000000010004140000000c02000029000000040320008c001200000004001d0000172a0000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000012040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000021520000613d0000104e0140009c00000f810000213d0000001201000029000000400010043f0000106e0110009c00000f810000213d0000001202000029000000a001200039000000400010043f0000008001200039000b00000001001d00000000000104350000006001200039000a00000001001d00000000000104350000004004200039000000000004043500000000000204350000000d0100002900000000000104350000013701000039000000000201041a000000400a00043d000010910100004100000000051a0436000000000100041400000fd902200197000000040320008c000500000004001d0000174d0000c13d0000000003000031000000200130008c000000200400003900000000040340190000177c0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c7000c0000000a001d000600000005001d3f553f500000040f00000006090000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000017690000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000017650000c13d0000001f06400190000017780000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021610000613d0000001f01400039000000600110018f0000000009a10019000000000219004b000000000200001900000001020040390000104e0490009c00000f810000213d000000010220019000000f810000c13d000000400090043f000000200230008c000022570000413d00000000020a043300000fd90420009c000022570000213d0000014204000039000000000404041a0000109405000041000000000659043600000004059000390000000000250435000000000500041400000fd902400197000000040420008c000600000002001d000017c80000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c7000c00000009001d000300000006001d3f553f500000040f000000030a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000017b30000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000017af0000c13d0000001f06400190000017c20000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021700000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433000c00000001001d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000201041a00000011312000b9000000110300006b0000000c05000029000017e70000613d00000011431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b000017ee0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000b020000290000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a00000011312000b9000000110300006b0000000c05000029000018070000613d00000011431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000180e0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000a020000290000000000120435000000400900043d0000109501000041000000000519043600000004019000390000001402000029000000000021043500000000010004140000000602000029000000040320008c000018200000c13d0000000003000031000000200130008c000000200400003900000000040340190000184f0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000c00000009001d000600000005001d3f553f500000040f000000060a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000183c0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000018380000c13d0000001f064001900000184b0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000217f0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433000000000201004b000018780000613d0000000f241000b900000000321400d90000000f0220006c0000101a0000c13d00000007321000b900000000311200d90000104d5340012a000000070110006c0000101a0000c13d0000104d5120012a0000000a050000290000000005050433000000000653004b000018810000413d000010960440009c000018800000a13d0000000f645000b900000009060000290000104d0660009c000018760000413d0000000f764000fa000000000556004b0000101a0000c13d000f0000303400e1000018810000013d0000000a010000290000000001010433000000000101004b00000000010000190000000002000019000018810000c13d00000000010000190000000002000019000f00000000001d0000000b030000290000000003030433000000000431004b000018870000813d0000000702000029000018910000013d000010960220009c0000000002000019000018910000a13d00000007423000b9000000070400006b000018900000613d00000007542000fa000000000334004b0000101a0000c13d00000000121200d90000000f01200029000000000321004b0000000003000019000000010300403900000001033001900000101a0000c13d000000120300002900000000001304350000000f010000290000000d03000029000000000013043500000005010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000018c40000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000400900043d000000000101043b0000190e0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c000018cf0000c13d0000000003000031000000200130008c00000020040000390000000004034019000018fe0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000f0000000a001d000d00000005001d3f553f500000040f0000000d090000290000000f0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000018eb0000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000018e70000c13d0000001f06400190000018fa0000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021cd0000613d0000001f01400039000000600110018f0000000009a10019000000000119004b000000000100001900000001010040390000104e0290009c00000f810000213d000000010110019000000f810000c13d000000400090043f000000200130008c000022570000413d00000000010a043300000fd90210009c000022570000213d00001079020000410000000005290436000000000300041400000fd902100197000000040120008c000019190000c13d0000000003000031000000200130008c00000020040000390000000004034019000019480000013d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000f00000009001d000d00000005001d3f553f500000040f0000000d0a0000290000000f090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000019350000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000019310000c13d0000001f06400190000019440000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000218e0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000002090433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000000120120008c0000000101000039000019670000613d00000012022000890000000a03000039000000010420019000000000543300a9000000010300603900000000311300a9000000010320008c000000010220027000000000030400190000195f0000213d0000001202000029000000000302043300000000423100a9000000000403004b0000196f0000613d00000000433200d9000000000113004b0000101a0000c13d000000120100002900000000002104350000013601000039000000000101041a0000106403100197000000800410027000000011010000293f55356a0000040f0000000e020000290000000302200039000f00000002001d000000000202041a001100000002001d000000140200002900000000002004350000013402000039000000200020043f001200000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000101041a0000001103000029000000000213004b0000101a0000413d00000000021300490000001201200029000000000221004b0000000002000019000000010200403900000001022001900000101a0000c13d0000000f02000029000000000012041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000130c0000c13d000022570000013d0000013d01000039000000000101041a000000000201004b0000101a0000613d000000010110008a0000013d02000039000000000012041b0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d020000390000000203000039000010a60400004100000013050000293f553f4b0000040f0000000101200190000012c80000c13d000022570000013d00000fd70390009c001000000009001d00000fd7030000410000000003094019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f0000104c011001c73f553f500000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001d5d0000613d00000010090000290000001f0230018f000000050430027200001a130000613d00000005054002100000000005590019000000000601034f0000000007090019000000006806043c0000000007870436000000000857004b00001a0f0000c13d000000000502004b00001a220000613d0000000504400210000000000141034f00000000044900190000000302200210000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f00000000001404350000001f01300039000010b10210019700000000060900190000000001920019000000000221004b000000000200001900000001020040390000104e0510009c00000f810000213d000000010220019000000f810000c13d000000400010043f0000106d0230009c000022570000213d000000200230008c000022570000413d00000000020604330000104e0520009c000022570000213d00000000050600190000000006530019000000000252001900000000032600490000106d0530009c000022570000213d000000a00330008c000022570000413d0000106e0310009c00000f810000213d000000a003100039000000400030043f00000000570204340000104e0870009c000022570000213d00000000072700190000001f08700039000000000968004b00000000090000190000106f090080410000106f088001970000106f0a600197000000000ba8013f0000000008a8004b00000000080000190000106f080040410000106f0ab0009c000000000809c019000000000808004b000022570000c13d00000000870704340000104e0970009c00000f810000213d0000001f09700039000010b1099001970000003f09900039000010b10490019700000000043400190000104e0940009c00000f810000213d000000400040043f00000000007304350000000004870019000000000464004b000022570000213d000000c004100039000000000607004b00001a6d0000613d00000000060000190000000009460019000000000a860019000000000a0a04330000000000a904350000002006600039000000000976004b00001a660000413d000000000447001900000000000404350000000003310436000000000405043300000fd90540009c000022570000213d00000000004304350000004003200039000000000303043300000fd90430009c000022570000213d0000004004100039000000000034043500000060042000390000000004040433000000600510003900000000004504350000008001100039000000800220003900000000020204330000000000210435000000140130006c000001200000c13d0000106c0000013d000000400140021000000fd70320009c00000fd702008041000000c002200210000000000121019f0000104c011001c700000014020000293f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000000f0a00002900001a9d0000613d000000000701034f0000001108000029000000007907043c00000000089804360000000009a8004b00001a990000c13d000000000705004b00001aac0000613d0000000506600210000000000761034f00000011066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001d7d0000613d0000001f01400039000000600110018f0000001101100029000000400010043f000000200130008c000022570000413d0000001101000029000000000201043300000012010000293f5522980000040f000000140200002900000000002004350000013402000039000000200020043f001200000001001d00000040010000393f553f1c0000040f00000013020000290000000000200435000000200010043f00000040010000393f553f1c0000040f0000000101100039000000000101041a000000e00010043f000000140100002900000000001004350000013301000039000000200010043f00000040010000393f553f1c0000040f0000000301100039000000000101041a000000c00010043f00000013010000293f5529180000040f3f55338c0000040f00000012020000290000104d2320012a001300000003001d000001000010043f000000100200002900000014040000293f5533a20000040f0000000032010434000001200020043f0000000004030433000001400040043f00000040021000390000000005020433000001600050043f00000060021000390000000002020433000001800020043f00000080011000390000000001010433000001a00010043f000000c00700043d000000e00600043d0000001401000029000000130200002900000010030000293f55381e0000040f000000a00020043f000000800010043f000000400100043d001400000001001d00000080020000393f5522720000040f0000001403000029000000000131004900000fd70210009c00000fd701008041000000600110021000000fd70230009c00000fd7030080410000004002300210000000000121019f00003f560001042e000000400200043d0000001f0430018f0000000505300272000000050550021000001b0b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001b070000c13d000000000604004b00001d770000613d00001d6b0000013d00001070010000410000001002000029000000000012043500000fd70120009c00000fd702008041000000400120021000000fdb011001c700003f570001043000000000010004113f552b660000040f00000000010004113f552bd60000040f000000000100001900003f560001042e00110fd90020019b00000000030000190000013501000039000000000101041a000000000131004b00001dd60000a13d000f00000003001d0000105201300041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001000000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00001b5f0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d00001baa0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00001b6a0000c13d0000000003000031000000200130008c0000002004000039000000000403401900001b990000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001300000009001d001200000005001d3f553f500000040f000000120a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200001b860000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001b820000c13d0000001f0640019000001b950000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001ff90000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001200000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000130100002900000fd9011001970000000405900039001300000001001d000000000015043500000000010004140000001202000029000000040420008c00001bd50000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000130100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900001c1d0000013d000c00000005001d000b00000003001d00000fd70390009c00000fd7030000410000000003094019000a00400030021800000fd70310009c00000fd701008041000000c0011002100000000a011001af0000104c011001c7000e00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001f8a0000613d0000000e030000290000104e0130009c0000000c0200002900000f810000213d000000400030043f0000105901000041000000000013043500000013010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000a011001af0000104c011001c700000012020000293f553f500000040f0000000e090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000b0a00002900001c0a0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001c060000c13d0000001f0640019000001c190000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001f990000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001203000029000000000123004b0000101a0000413d000000000123004b00001c640000613d000e00000002001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001203000029000000000031041b00000010010000290000000301100039000000000101041a000000000201004b000000000203001900001c590000613d0000000e0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d900001c5a0000013d000000000200001900000010010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d0000105a0320009c00000f810000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a001200000004001d000000000034043500000040022000390000000201100039000000000101041a001300000002001d0000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000013020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b0000101a0000413d00000012030000290000000003030433000000000421004900000000564300a9000000000121004b00001cac0000613d00000000214600d9000000000131004b0000101a0000c13d000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039001300000006001d3f553f500000040f00000013030000290013104d303001320000000102200190000022570000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a001200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00001cf10000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00001d3b0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00001cfc0000c13d0000000003000031000000200130008c0000002004000039000000000403401900001d2b0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001000000009001d000e00000005001d3f553f500000040f0000000e0a00002900000010090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200001d180000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001d140000c13d0000001f0640019000001d270000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020080000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d000000000109043300000fd90210009c000022570000213d00000012040000290000001303400029000000000243004b0000000002000019000000010200403900000001022001900000101a0000c13d000000400200043d0000105a0420009c00000f810000213d0000006004200039000000400040043f0000004004200039000000000034043500000fd9011001970000002003200039000000000013043500000014010000290000000000120435000000800100043d0000000f03000029000000000131004b00001dd60000a13d0000000501300210000000a0011000390000000000210435000000800100043d000000000131004b00001dd60000a13d00000001033000390000000d0130006c00001b1e0000413d000000400100043d00000af60000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001d690000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001d650000c13d000000000604004b00001d770000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000000400200043d0000001f0430018f000000050530027200001d890000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001d850000c13d000000000604004b00001d770000613d000011d40000013d000000100300002900000fd70230009c00000fd7020000410000000002034019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c700000014020000293f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000000b0a00002900001da80000613d000000000701034f0000001008000029000000007907043c00000000089804360000000009a8004b00001da40000c13d000000000705004b00001db70000613d0000000506600210000000000761034f00000010066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001ddc0000613d0000001f01400039000000600210018f0000001001200029000000000221004b000000000200001900000001020040390000104e0310009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200240008c000022570000413d00000010020000290000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000022570000c13d000000000202004b00001ed10000c13d000010760200004100000a4e0000013d000000400100043d0000109b0200004100000a4e0000013d000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f000000050530027200001de80000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001de40000c13d000000000604004b00001d770000613d000011d40000013d000000130400002900000fd70140009c00000fd7010000410000000001044019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000100a00002900001e060000613d000000000701034f0000001308000029000000007907043c00000000089804360000000009a8004b00001e020000c13d000000000705004b00001e150000613d0000000506600210000000000761034f00000013066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001e6e0000613d0000001f01400039000000600210018f0000001301200029000000000221004b000000000200001900000001020040390000104e0310009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200140008c000022570000413d00000013010000290000000002010433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000001200100043d000000120320008c00001fa80000c13d000000010300003900001fb30000013d0000105601000041000000000010043900000000010004100000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b00001f370000c13d0000000d01000029000000ff0110018f000000010110008c000000000100001900000001010060390000000c020000290000000502200270000000000201001f00001f3a0000c13d0000000b0100006b00000be80000613d000001000100008a0000000d0110017f000d00010000003d00000001011001bf00000bec0000013d000000110420006b0000000004030019000000010440a1bf000000010440019000001e7d0000c13d000000100400006b00001e7d0000613d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000001041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400001f670000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001e7a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001e760000c13d000000000604004b00001d770000613d00001d6b0000013d000000110220006b00000000020000190000000102002039000000100400006b0000000004020019000000010440c1bf000000000334019f000000010330019000001f440000613d000000000101004b00000001022061bf000000010120019000000f700000c13d00000014010000293f5529a40000040f000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001300000001001d000000000101041a000000000101004b00000f700000c13d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b0000001302000029000000000012041b000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400001f670000013d000000400200043d0000001f0430018f000000050530027200001ebf0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001ebb0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f000000050530027200001ece0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001eca0000c13d000000000604004b00001d770000613d000011d40000013d0000000c030000290000000201300039000000000001041b0000001101000029000000000013041b00000001013000390000001202000029000000000021041b0000000301300039000000000001041b000001000100008a0000000d0110017f00000001011001bf0000000e02000029000000000012041b00000013010000293f552e180000040f00000fd901100197001300000001001d00000000001004350000013e01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a00000fd90110019800001fd00000c13d000000130100002900000000001004350000013e01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000105b022001970000000f022001af000000000021041b0000013501000039000000000201041a0000104e0320009c00000f810000213d0000000103200039000000000031041b00000000001004350000105202200041000000000302041a0000105b033001970000000f033001af000000000032041b0000013b02000039000000000302041a000010af0430009c0000101a0000613d0000000103300039000000000032041b0000012e02000039000000000202041a0000012f03000039000000000303041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d0000013c03000039000000000023041b0000013d03000039000000000023041b000000400200043d000000fb03000039000000000303041a000000000101041a000000000431004b000022410000a13d00000024042000390000000000140435000010740100004100000000001204350000000401200039000000000031043500000fd70120009c00000fd702008041000000400120021000001075011001c700003f57000104300000000c010000290000000501100270000000000100001f000000400100043d00000064021000390000107a03000041000000000032043500000044021000390000107b03000041000000000032043500000024021000390000002e0300003900000aa40000013d000000140100002900000000001004350000013201000039000000200010043f0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001302000029000000000021041b000000400100043d000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c04000041000000140500002900000f6d0000013d000000000001042f000000400100043d000010890200004100000a4e0000013d000000400100043d0000109d0200004100000a4e0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001f840000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001f800000c13d000000000604004b00001d770000613d00001d6b0000013d000000400100043d000010880200004100000a4e0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001f960000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001f920000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001fa50000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001fa10000c13d000000000604004b00001d770000613d00001d6b0000013d0000000a0400003900000001030000390000001202200089000000010520019000000000654400a9000000010400603900000000433400a9000000010420008c0000000102200270000000000405001900001fab0000213d00000000421300a9000000000401004b00001fb90000613d00000000411200d9000000000131004b0000101a0000c13d000001200020043f0000013601000039000000000401041a000001000100043d000010640340019700000080044002703f55356a0000040f0000000006010019000000e00060043f000000c00100043d0000000007610019000000000117004b0000000001000019000000010100403900000001011001900000101a0000c13d000000c00070043f000001600500043d000001400400043d00000014010000290000001202000029000000110300002900001aee0000013d000000400100043d000010720200004100000a4e0000013d0000006501000039000000000201041a0000105b02200197000000000021041b000000000100041100000fd9061001970000003301000039000000000201041a0000105b03200197000000000363019f000000000031041b000000000100041400000fd90520019700000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d040000413f553f4b0000040f0000000101200190000022570000613d000000000100041a0000ff000110019000000c240000613d000000400100043d000000110200006b000021dc0000c13d0000006402100039000010840300004100000000003204350000004402100039000010850300004100000000003204350000002402100039000000250300003900000aa40000013d000000400200043d0000001f0430018f00000005053002720000000505500210000020050000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020010000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000020140000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020100000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000020230000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000201f0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020320000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000202e0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020410000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000203d0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020500000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000204c0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000205f0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000205b0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000206e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000206a0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000207d0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020790000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000208c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020880000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000209b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020970000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020aa0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020a60000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020b90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020b50000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020c80000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020c40000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020d70000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020d30000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020e60000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020e20000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020f50000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020f10000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021040000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021000000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021130000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000210f0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021220000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000211e0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021310000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000212d0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021400000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000213c0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000214f0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000214b0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000215e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000215a0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000216d0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021690000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000217c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021780000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000218b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021870000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000219a0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021960000c13d000000000604004b00001d770000613d000011d40000013d000000400100043d000010a70200004100000a4e0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000021ac0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021a80000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000021bb0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021b70000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000021ca0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021c60000c13d000000000604004b000011d40000c13d00001d770000013d000000400200043d0000001f0430018f0000000505300272000021d90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021d50000c13d000000000604004b00001d770000613d000011d40000013d0000009702000039000000000302041a0000105b043001970000001105000029000000000454019f000000000042041b0000002002100039000000000052043500000fd902300197000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d0200003900000001030000390000107e040000413f553f4b0000040f0000000101200190000022570000613d000000c902000039000000000102041a000010b001100197000000000012041b000000400100043d000000fb03000039000000000203041a00000124040000390000000104400367000000000404043b000000000542004b000022590000813d000000000043041b00000020031000390000000000430435000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d02000039000000010300003900001081040000413f553f4b0000040f0000000101200190000022570000613d000000400100043d000000c902000039000000000202041a000000ff03200190000022620000c13d000010b00220019700000001022001bf000000c903000039000000000023041b0000000002000411000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900001069040000413f553f4b0000040f0000000101200190000022570000613d0000000d0100006b00000f700000c13d000000000200041a000010b201200197000000000010041b000000400100043d0000000103000039000000000031043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70420009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000009ab0000013d0000002001200039000000120300002900000000003104350000001101000029000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d020000390000000303000039000010730400004100000014050000290000000f060000293f553f4b0000040f000000010120019000000f700000c13d000000000100001900003f570001043000000064021000390000107f0300004100000000003204350000004402100039000010800300004100000000003204350000002402100039000000220300003900000aa40000013d00000044021000390000108203000041000000000032043500000024021000390000001003000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f57000104300000000043020434000000000331043600000000040404330000000000430435000000400320003900000000030304330000004004100039000000000034043500000060032000390000000003030433000000600410003900000000003404350000008003200039000000000303043300000080041000390000000000340435000000a0032000390000000003030433000000a0041000390000000000340435000000c0032000390000000003030433000000c0041000390000000000340435000000e0032000390000000003030433000000e0041000390000000000340435000001000320003900000000030304330000010004100039000000000034043500000120022000390000000002020433000001200310003900000000002304350000014001100039000000000001042d000000000301001900000000413200a9000000000403004b0000229f0000613d00000000433100d9000000000223004b000022a00000c13d000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300003000000000002000300000001001d0000014101000039000000000101041a000200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000030300002900000fd903300197000000020400002900000fd9054001970000000102200190000023880000613d000000000101043b00000fd901100197000000000113004b000022d60000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000300000005001d3f553f500000040f00000003050000290000000102200190000023880000613d000000400a00043d000000000101043b000023240000013d000000400b00043d000010550100004100000000061b04360000000001000414000000040230008c000022e10000c13d0000000003000031000000200130008c00000020040000390000000004034019000023140000013d000300000005001d00000fd702b0009c00000fd70200004100000000020b4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900020000000b001d000100000006001d3f553f500000040f000000010a000029000000020b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000023000000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000022fc0000c13d000000000705004b0000230f0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000023a70000613d00000003050000290000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c0000238b0000213d00000001011001900000238b0000c13d0000004000a0043f0000001f0130008c000023890000a13d00000000010b043300000fd90210009c000023890000213d000010b30200004100000000042a043600000fd9011001970000000402a0003900000000001204350000000001000414000000040250008c000023310000c13d0000000003000031000000200130008c00000020040000390000000004034019000023620000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c7000000000205001900030000000a001d000200000004001d3f553f500000040f000000020b000029000000030a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000234f0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b0000234b0000c13d000000000705004b0000235e0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000023970000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c0000238b0000213d00000001022001900000238b0000c13d000000400010043f000000200130008c000023890000413d00000000010a0433000300000001001d00001046010000410000000000100439000000000100041200000004001004430000002400000443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000023880000613d000000000201043b000000030400002900000000314200a9000000000302004b000023870000613d00000000322100d9000000000242004b000023910000c13d000000000001042d000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000023a30000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000239f0000c13d000000000604004b000023c10000613d0000000505500210000023b50000013d000000400200043d0000001f0430018f00000005053002720000000505500210000023b30000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000023af0000c13d000000000604004b000023c10000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000700000000000200000fd901100197000700000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff011001900000251a0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000250d0000613d000000000101043b00000fd9011001970000000702000029000000000112004b000024020000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000250d0000613d000000000101043b000700000001001d0000244e0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c0000240d0000c13d0000000003000031000000200130008c000000200400003900000000040340190000243d0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700070000000a001d000600000005001d3f553f500000040f000000060b000029000000070a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000242a0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000024260000c13d000000000705004b000024390000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000025530000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c0000250e0000213d00000001022001900000250e0000c13d000000400010043f000000200130008c0000250b0000413d00000000010a0433000700000001001d00000fd90110009c0000250b0000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000600000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f00000001022001900000250d0000613d000000000101043b000000000101004b0000250b0000613d000000400a00043d000010580100004100000000031a0436000000070100002900000fd9011001970000000405a00039000700000001001d000000000015043500000000010004140000000602000029000000040420008c000024790000c13d0000104e01a0009c0000250e0000213d0000004000a0043f000010590100004100000000001a0435000000070100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000024c20000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000025220000613d00000004030000290000104e0130009c00000003020000290000250e0000213d000000400030043f0000105901000041000000000013043500000007010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000006020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b000029000024af0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000024ab0000c13d000000000705004b000024be0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000025320000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c0000250e0000213d000000400010043f000000200130008c0000250b0000413d00000000010a0433000600000001001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b000000000201041a0000000603000029000000000123004b000025140000413d000000000123004b000024e10000c13d000000000001042d000400000002001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b0000000603000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b0000000002030019000024ff0000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000025140000c13d00000000121200d9000025000000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000025140000c13d000000000021041b000000000001042d000000000100001900003f5700010430000000000001042f000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f00000005053002720000252e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000252a0000c13d000000000604004b0000256d0000613d0000000505500210000025610000013d000000400200043d0000001f0430018f00000005053002720000253e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000253a0000c13d000000000604004b0000254d0000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000400200043d0000001f0430018f000000050530027200000005055002100000255f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000255b0000c13d000000000604004b0000256d0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f570001043000000000430104340000000001320436000000000203004b0000257f0000613d000000000200001900000000051200190000000006240019000000000606043300000000006504350000002002200039000000000532004b000025780000413d000000000213001900000000000204350000001f02300039000010b1022001970000000001210019000000000001042d000300000000000200000000080100190000009701000039000000000201041a000000400a00043d0000002401a0003900000040030000390000000000310435000010b401000041000000000b1a04360000000401a00039000000000900041100000000009104350000004404a00039000000003108043400000000001404350000006404a0003900000fd902200197000000000501004b000025a10000613d000000000500001900000000064500190000000007530019000000000707043300000000007604350000002005500039000000000615004b0000259a0000413d000000000341001900000000000304350000000003000414000000040420008c000025ab0000c13d0000000003000031000000200130008c00000020040000390000000004034019000025e40000013d000100000008001d0000001f01100039000010b101100197000000640110003900000fd70410009c00000fd701008041000000600110021000000fd704a0009c00000fd70400004100000000040a40190000004004400210000000000141019f00000fd70430009c00000fd703008041000000c003300210000000000113019f00030000000a001d00020000000b001d3f553f500000040f000000020b000029000000030a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000025cf0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000025cb0000c13d000000000705004b000025de0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000000000090004110000261a0000613d00000001080000290000001f01400039000000600110018f0000000004a10019000000000114004b000000000100001900000001010040390000104e0240009c000025fc0000213d0000000101100190000025fc0000c13d000000400040043f0000001f0130008c000025fa0000a13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b000025fa0000c13d000000000101004b000026020000613d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000440140003900000060020000390000000000210435000000240140003900000000020004100000000000210435000010b50100004100000000001404350000000401400039000000000091043500000064024000390000000001080019000300000004001d3f5525730000040f0000000303000029000000000131004900000fd70210009c00000fd70100804100000fd70230009c00000fd70300804100000060011002100000004002300210000000000121019f00003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000026260000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000026220000c13d000000000604004b000026340000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300009000000000002000800000001001d00000fd901200197000900000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000401100039000000000101041a000000ff011001900000269b0000613d000000080100002900000fd901100197000800000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000101041a000000ff011001900000269b0000613d000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff011001900000284e0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000284d0000613d000000000101043b00000fd9011001970000000902000029000000000112004b0000269c0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000284d0000613d000000000101043b000700000001001d000026e80000013d000000000001042d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c000026a70000c13d0000000003000031000000200130008c00000020040000390000000004034019000026d70000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700070000000a001d000600000005001d3f553f500000040f000000060b000029000000070a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000026c40000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000026c00000c13d000000000705004b000026d30000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000028750000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000028470000213d0000000102200190000028470000c13d000000400010043f000000200130008c0000283f0000413d00000000010a0433000700000001001d00000fd90110009c0000283f0000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000600000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f00000001022001900000284d0000613d000000000101043b000000000101004b0000283f0000613d000000400a00043d000010580100004100000000031a0436000000070100002900000fd9011001970000000405a00039000700000001001d000000000015043500000000010004140000000602000029000000040420008c000027130000c13d0000104e01a0009c000028470000213d0000004000a0043f000010590100004100000000001a0435000000070100002900000000001504350000000003000031000000200130008c000000200400003900000000040340190000275c0000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000028560000613d00000004030000290000104e0130009c0000000302000029000028470000213d000000400030043f0000105901000041000000000013043500000007010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000006020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b000029000027490000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000027450000c13d000000000705004b000027580000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000028650000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c000028470000213d000000400010043f000000200130008c0000283f0000413d00000000010a0433000600000001001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000201041a0000000603000029000000000123004b000028410000413d000000000123004b000027a30000613d000400000002001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000603000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b0000000002030019000027980000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000028410000c13d00000000121200d9000027990000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000028410000c13d000000000021041b000000090100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000400200043d0000105a0320009c000028470000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000600000004001d000000000034043500000040022000390000000201100039000000000101041a000700000002001d0000000000120435000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d00000007020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b000028410000413d00000006030000290000000003030433000000000421004900000000564300a9000000000121004b000027eb0000613d00000000214600d9000000000131004b000028410000c13d000000090100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039000700000006001d3f553f500000040f00000007030000290007104d3030013200000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000301041a0000000702300029000000000332004b000000000300001900000001030040390000000103300190000028410000c13d000000000021041b000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000201100039000000000101041a000900000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000002011000390000000902000029000000000021041b000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f0000000505300272000028620000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000285e0000c13d000000000604004b000028730000c13d0000288f0000013d000000400200043d0000001f0430018f0000000505300272000028710000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000286d0000c13d000000000604004b0000288f0000613d0000000505500210000028830000013d000000400200043d0000001f0430018f00000005053002720000000505500210000028810000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000287d0000c13d000000000604004b0000288f0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300005000000000002000500000001001d000200000002001d00000fd901200197000400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b000100000001001d0000000401100039000000000101041a000000ff011001900000290f0000613d000000050100002900000fd901100197000300000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b000000000101041a000000ff011001900000290f0000613d000000020100002900000005020000293f5539e50000040f00000001020000290000000302200039000100000002001d000000000202041a000200000002001d000000040200002900000000002004350000013402000039000000200020043f000500000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000003020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b0000000101100039000000000101041a0000000203000029000000000213004b000029120000413d00000000021300490000000501200029000000000221004b000000000200001900000001020040390000000102200190000029120000c13d0000000102000029000000000012041b000000040100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000003020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000001011000390000000502000029000000000021041b000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f570001043000010000000000020000013702000039000000000202041a0000013803000039000000000303041a0000013904000039000000000404041a00000fd901100197000000400b00043d0000004405b0003900000000001504350000002401b000390000000000410435000010900100004100000000001b043500000fd9013001970000000403b000390000000000130435000000000100041400000fd902200197000000040320008c000029330000c13d0000000003000031000000600130008c00000060040000390000000004034019000029620000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700010000000b001d3f553f500000040f000000010b0000290000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f00000005064002720000000506600210000029500000613d00000000076b0019000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000a79004b0000294c0000c13d000000000705004b0000295e0000613d000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000029840000613d0000001f01400039000000e00210018f0000000001b20019000000000221004b000000000200001900000001020040390000104e0410009c000029760000213d0000000102200190000029760000c13d000000400010043f0000005f0130008c0000297c0000a13d00000000010b04330000004002b000390000000002020433000000000321004b0000297e0000413d0000000001210049000000000001042d000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000029900000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000298c0000c13d000000000604004b0000299e0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300008000000000002000600000001001d0000013502000039000000000102041a000300000001001d000000000101004b00002a340000613d000000060100002900050fd90010019b0000000003000019000029b40000013d00000007030000290000000103300039000000030130006c000001350200003900002a340000813d000000000102041a000000000131004b00002a370000a13d0000000000200435000700000003001d0000105201300041000000000101041a00000fd902100197000800000002001d00000006010000293f55263a0000040f000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b000400000001001d0000000401100039000000000101041a000000ff01100190000029af0000613d000000050100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b000000000101041a000000ff01100190000029af0000613d000000080100002900000006020000293f5539e50000040f00000004020000290000000302200039000100000002001d000000000202041a000200000002001d000000080200002900000000002004350000013402000039000000200020043f000400000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000005020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b0000000101100039000000000101041a0000000203000029000000000213004b00002a3d0000413d00000000021300490000000401200029000000000221004b00000000020000190000000102004039000000010220019000002a3d0000c13d0000000102000029000000000012041b000000080100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000005020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000001011000390000000402000029000000000021041b000029af0000013d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300008000000000002000300000001001d00000fd901100197000700000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000400200043d000010b60320009c00002b580000813d000000000101043b0000004003200039000000400030043f000000000101041a000000ff031001900000000004000019000000010400c03900000000044204360000ff00011001900000000001000019000000010100c0390000000000140435000000000203004b00002b5e0000613d0000013503000039000000000203041a000200000002001d000000000202004b00002af60000613d000100000004001d0000000002000019000000000103041a000000000121004b00002b520000a13d0000000000300435000400000002001d0000105201200041000000000101041a00000fd902100197000800000002001d00000003010000293f55263a0000040f000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000301100039000000000101041a000600000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000101100039000000000201041a000500000002001d000000060120006b00002b4c0000413d000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d00000005030000290000000602300069000000000101043b0000000301100039000000000021041b0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000101100039000000000001041b000000080100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000201100039000000000001041b00000004020000290000000102200039000000020120006c000001350300003900002a6b0000413d00000001010000290000000001010433000000000101004b0000012f010060390000012e0100c039000000000201041a000000000302004b00002b4c0000613d000000010220008a000000000021041b000000070100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b000000000201041a0000107c02200197000000000021041b0000013c01000039000000000201041a000000000302004b00002b150000613d000000010220008a000000000021041b0000013d01000039000000000101041a000800000001001d000000000101004b00002b3d0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b000000000101041a000000ff0110019000002b3d0000c13d0000000801000029000000010110008a0000013d02000039000000000012041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d020000390000000203000039000010b70400004100000007050000293f553f4b0000040f000000010120019000002b4a0000613d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a702000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000100000000000200000fd901100197000100000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b000000000201041a000000ff0320019000002bc80000c13d0000107c0220019700000001022001bf000000000021041b0000012f02000039000000000102041a000010af0310009c00002bd00000613d0000000103100039000000000032041b0000013102000039000000000202041a0000012e03000039000000000303041a000000000223004b00002bc50000213d0000013002000039000000000202041a000000000121004b00002bc50000813d0000013c01000039000000000101041a000000000101004b00002bb00000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b00000001020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e0400004100000001050000293f553f4b0000040f000000010120019000002bc30000613d000000000001042d000000000100001900003f5700010430000000400100043d000010ac0200004100002bca0000013d000000400100043d000010a102000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000c000000000002000500000001001d0000013501000039000000000101041a000400000001001d000000000101004b00002da00000613d000000050100002900090fd90010019b00000000020000190000013501000039000000000101041a000000000121004b00002db00000a13d000700000002001d0000105201200041000000000101041a00000fd901100197000c00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b000800000001001d0000000401100039000000000101041a000000ff0110019000002db60000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002da90000613d000000000101043b00000fd9011001970000000c02000029000000000112004b00002c210000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002da90000613d000000000101043b000b00000001001d00002c6c0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00002c2c0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002c5b0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000b00000009001d000a00000005001d3f553f500000040f0000000a0a0000290000000b090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200002c480000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00002c440000c13d0000001f0640019000002c570000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000002ddd0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00002daa0000213d000000010220019000002daa0000c13d000000400010043f000000200130008c00002da10000413d0000000001090433000b00000001001d00000fd90110009c00002da10000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000a00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000002da90000613d000000000101043b000000000101004b00002da10000613d000000400900043d000010580100004100000000031904360000000b0100002900000fd9011001970000000405900039000b00000001001d000000000015043500000000010004140000000a02000029000000040420008c00002c970000c13d0000104e0190009c00002daa0000213d000000400090043f000010590100004100000000001904350000000b0100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900002cdf0000013d000300000005001d000200000003001d00000fd70390009c00000fd7030000410000000003094019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c7000600000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000002dbe0000613d00000006030000290000104e0130009c000000030200002900002daa0000213d000000400030043f000010590100004100000000001304350000000b010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c70000000a020000293f553f500000040f00000006090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000000020a00002900002ccc0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00002cc80000c13d0000001f0640019000002cdb0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000002dcd0000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00002daa0000213d000000400010043f000000200130008c00002da10000413d0000000001090433000a00000001001d0000000b0100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b000000000201041a0000000a03000029000000000123004b00002da30000413d000000000123004b00002d260000613d000600000002001d0000000b0100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000a03000029000000000031041b00000008010000290000000301100039000000000101041a000000000201004b000000000203001900002d1b0000613d000000060320006a0000104d423000d100000000433200d90000104d0330009c00002da30000c13d00000000121200d900002d1c0000013d000000000200001900000008010000290000000201100039000000000301041a0000000002230019000000000332004b00000000030000190000000103004039000000010330019000002da30000c13d000000000021041b0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000201100039000000000101041a000b00000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000002011000390000000b02000029000000000021041b0000000c0100002900000005020000293f5539e50000040f0000000c0200002900000000002004350000013402000039000000200020043f000b00000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000001011000390000000b02000029000000000021041b0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000301100039000000000101041a000b000b0010002d0000000b0110006b00000000010000190000000101004039000000010110019000002da30000c13d0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000003011000390000000b02000029000000000021041b00000007020000290000000102200039000000040120006c00002be00000413d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000002dca0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002dc60000c13d000000000604004b00002df70000613d00002deb0000013d000000400200043d0000001f0430018f000000050530027200002dd90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002dd50000c13d000000000604004b00002df70000613d000000050550021000002deb0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000002de90000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002de50000c13d000000000604004b00002df70000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300000013b01000039000000000201041a000010af0320009c00002e120000613d0000000102200039000000000021041b0000012e01000039000000000101041a0000012f02000039000000000202041a0000000001120019000000000221004b00000000020000190000000102004039000000010220019000002e120000c13d0000013c02000039000000000012041b0000013d02000039000000000012041b000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300002000000000002000200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000020300002900000fd903300197000000010220019000002e8d0000613d000000000101043b00000fd901100197000000000113004b00002e400000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002e8d0000613d000000000101043b000000000001042d000000400a00043d000010550100004100000000051a04360000000001000414000000040230008c00002e4b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002e7c0000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900020000000a001d000100000005001d3f553f500000040f000000010b000029000000020a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200002e690000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002e650000c13d000000000705004b00002e780000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000002e960000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00002e900000213d000000010220019000002e900000c13d000000400010043f0000001f0130008c00002e8e0000a13d00000000010a043300000fd90210009c00002e8e0000213d000000000001042d000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000002ea20000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002e9e0000c13d000000000604004b00002eb00000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f57000104300000006502000039000000000302041a0000105b03300197000000000032041b00000fd9061001970000003301000039000000000201041a0000105b03200197000000000363019f000000000031041b000000000100041400000fd90520019700000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d040000413f553f4b0000040f000000010120019000002ecd0000613d000000000001042d000000000100001900003f5700010430000000400200043d000000fb04000039000000000304041a000000000513004b00002ee80000813d000000000014041b00000020042000390000000000140435000000000032043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d02000039000000010300003900001081040000413f553f4b0000040f000000010120019000002efb0000613d000000000001042d00000064012000390000107f03000041000000000031043500000044012000390000108003000041000000000031043500000024012000390000002203000039000000000031043500000fe001000041000000000012043500000004012000390000002003000039000000000031043500000fd70120009c00000fd702008041000000400120021000000fe1011001c700003f5700010430000000000100001900003f5700010430000000c901000039000000000101041a000000ff0110019000002f020000c13d000000000001042d000000400100043d00000044021000390000108203000041000000000032043500000024021000390000001003000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f5700010430000a000000000002000600000002001d00000fd901100197000a00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff01100190000032c40000613d00001046010000410000000000100439000000000100041200000004001004430000008001000039000700000001001d0000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b00000fd9011001970000000a02000029000000000112004b00002f500000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000900000001001d00002f9c0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c00002f5b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002f8b0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700090000000a001d000800000005001d3f553f500000040f000000080b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200002f780000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002f740000c13d000000000705004b00002f870000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000334e0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000032b70000213d0000000102200190000032b70000c13d000000400010043f000000200130008c000032b50000413d00000000010a0433000900000001001d00000fd90110009c000032b50000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000800000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b000032b50000613d000000400a00043d000010580100004100000000031a0436000000090100002900000fd9011001970000000405a00039000900000001001d000000000015043500000000010004140000000802000029000000040420008c00002fc70000c13d0000104e01a0009c000032b70000213d0000004000a0043f000010590100004100000000001a0435000000090100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000030100000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000032f60000613d00000004030000290000104e0130009c0000000302000029000032b70000213d000000400030043f0000105901000041000000000013043500000009010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000008020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b00002900002ffd0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002ff90000c13d000000000705004b0000300c0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000033050000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c000032b70000213d000000400010043f000000200130008c000032b50000413d00000000010a0433000800000001001d000000090100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000201041a0000000803000029000000000123004b000032be0000413d000000000123004b000030570000613d000400000002001d000000090100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b0000000803000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b00000000020300190000304c0000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000032be0000c13d00000000121200d90000304d0000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000032be0000c13d000000000021041b0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000060200002900000fd902200197000900000002001d0000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000400200043d0000105a0320009c000032b70000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000600000004001d000000000034043500000040022000390000000201100039000000000101041a000800000002001d00000000001204350000000a0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d00000008020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b000032be0000413d00000006030000290000000003030433000000000421004900000000564300a9000000000121004b000030a10000613d00000000214600d9000000000131004b000032be0000c13d0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039000800000006001d3f553f500000040f00000008030000290008104d303001320000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000101041a000800080010002d000000080110006b000000000100001900000001010040390000000101100190000032be0000c13d0000000a0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b0000000201100039000000000101041a000600000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000002011000390000000602000029000000000021041b0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000001041b000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b00000fd9011001970000000a02000029000000000112004b000031350000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000400a00043d000000000101043b000031800000013d000000400b00043d000010550100004100000000051b04360000000001000414000000040320008c000031400000c13d0000000003000031000000200130008c00000020040000390000000004034019000031700000013d00000fd703b0009c00000fd70300004100000000030b4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700060000000b001d000500000005001d3f553f500000040f000000050a000029000000060b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000315d0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000031590000c13d000000000705004b0000316c0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000335d0000613d0000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c000032b70000213d0000000101100190000032b70000c13d0000004000a0043f000000200130008c000032b50000413d00000000010b043300000fd90210009c000032b50000213d0000104b0200004100000000042a04360000000402a0003900000000030004100000000000320435000000000200041400000fd909100197000000040190008c000600000009001d0000318f0000c13d0000000003000031000000200130008c00000020040000390000000004034019000031c10000013d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f0000104c011001c7000000000209001900050000000a001d000400000004001d3f553f500000040f000000040b000029000000050a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000031ad0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000031a90000c13d000000000705004b000031bc0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000000609000029000033140000613d0000001f01400039000000600110018f0000000004a10019000000000114004b000000000100001900000001010040390000104e0240009c000032b70000213d0000000101100190000032b70000c13d000000400040043f000000200130008c000032b50000413d00000000010a0433000000080110006b000032140000a13d00000000009004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000001041b0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000500000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b0000000609000029000032b50000613d000000400400043d000010b80100004100000000001404350000000401400039000000000091043500000000010004140000000502000029000000040320008c000032100000613d00000fd70340009c00000fd7030000410000000003044019000000400530021000000fd70310009c00000fd701008041000000c001100210000000000151019f0000104c011001c7000500000004001d3f553f4b0000040f000000050400002900000006090000290000000003010019000000600330027000000fd70030019d00000fd703300197000200000001035500000001022001900000336c0000613d0000104e0140009c000032b70000213d000000400040043f000032140000013d0000004401400039000000080200002900000000002104350000002001400039000010b902000041000000000021043500000024024000390000000903000029000000000032043500000044020000390000000000240435000010500240009c000032b70000213d000000800a4000390000004000a0043f000010ba0240009c000032b70000213d000000c002400039000000400020043f000000200200003900000000002a0435000000a002400039000010bb03000041000000000032043500000000030404330000000002000414000000040490008c000032610000c13d00000001020000390000000001000031000000000301004b000032780000613d0000104e0310009c000032b70000213d0000001f03100039000010b1033001970000003f03300039000010b103300197000000400b00043d00000000033b00190000000004b3004b000000000400001900000001040040390000104e0530009c000032b70000213d0000000104400190000032b70000c13d000000400030043f0000001f0310018f00000000041b0436000700000004001d000000020400036700000005011002720000000501100210000032520000613d00000007070000290000000005170019000000000604034f000000006806043c0000000007870436000000000857004b0000324e0000c13d000000000503004b000032790000613d000000000414034f00000007011000290000000303300210000000000501043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f0000000000310435000032790000013d00000fd70410009c00000fd701008041000000400110021000000fd70430009c00000fd7030080410000006003300210000000000113019f00000fd70320009c00000fd702008041000000c002200210000000000121019f000000000209001900050000000a001d3f553f4b0000040f000000050a0000290000000609000029000000010220018f0002000000010355000000600110027000000fd70010019d00000fd701100197000000000301004b000032340000c13d000000600b00003900000000040b0433000000000202004b000032cc0000613d000000000204004b000032920000c13d00060000000b001d000010560100004100000000001004390000000400900443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b00000006010000290000333d0000613d0000000004010433000000000204004b0000329f0000613d0000106d0240009c000032b50000213d000000200140008c000032b50000413d00000007010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000032b50000c13d000000000101004b000032e20000613d000000400100043d0000000802000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000303000039000010be0400004100000009050000290000000a060000293f553f4b0000040f0000000101200190000032b50000613d0000000801000029000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f570001043000000000010a0019000000000204004b000033340000c13d000000400400043d000a00000004001d00000fe002000041000000000024043500000004034000390000002002000039000000000023043500000024024000393f5525730000040f0000000a03000029000000000131004900000fd70210009c00000fd70100804100000fd70230009c00000fd70300804100000060011002100000004002300210000000000121019f00003f5700010430000000400100043d0000006402100039000010bc0300004100000000003204350000004402100039000010bd03000041000000000032043500000024021000390000002a03000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000033020000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000032fe0000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033110000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000330d0000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033200000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000331c0000c13d000000000604004b0000332e0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000070300002900000fd70230009c00000fd703008041000000400230021000000fd70340009c00000fd7040080410000006001400210000000000121019f00003f5700010430000000400100043d0000004402100039000010bf03000041000000000032043500000024021000390000001d03000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f5700010430000000400200043d0000001f0430018f000000050530027200000005055002100000335a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033560000c13d000000000604004b0000337a0000c13d000033860000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033690000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033650000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033780000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033740000c13d000000000604004b000033860000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300001000000000002000100000001001d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000033a10000613d000000000101043b000000010210006c0000000101008029000000000001042d000000000001042f000c000000000002000600000004001d000c00000003001d000500000002001d000b00000001001d000000400100043d000a00000001001d000010c00110009c000035260000813d0000000a02000029000000a001200039000000400010043f0000008001200039000800000001001d00000000000104350000006001200039000700000001001d00000000000104350000004001200039000300000001001d00000000000104350000000001020436000200000001001d00000000000104350000013701000039000000000201041a000000400b00043d000010910100004100000000051b0436000000000100041400000fd902200197000000040320008c000033c80000c13d0000000003000031000000200130008c00000020040000390000000004034019000033f80000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c700090000000b001d000400000005001d3f553f500000040f000000040a000029000000090b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000033e50000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000033e10000c13d000000000705004b000033f40000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000352c0000613d0000001f01400039000000600110018f000000000ab1001900000000021a004b000000000200001900000001020040390000104e04a0009c000035260000213d0000000102200190000035260000c13d0000004000a0043f0000001f0230008c0000351e0000a13d00000000020b043300000fd90420009c0000351e0000213d0000014204000039000000000404041a000010940500004100000000065a04360000000405a000390000000000250435000000000500041400000fd902400197000000040420008c000400000002001d000034450000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700090000000a001d000100000006001d3f553f500000040f000000010b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000034300000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b0000342c0000c13d000000000705004b0000343f0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000353b0000613d0000001f01400039000000600110018f0000000001a100190000104e0410009c000035260000213d000000400010043f000000200130008c0000351e0000413d00000000010a0433000900000001001d000000060100002900000fd901100197000600000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000351e0000613d000000000101043b0000000101100039000000000201041a0000000b312000b90000000b0300006b0000000905000029000034660000613d0000000b431000fa000000000223004b000035200000c13d0000104d1210012a00000000312500a9000000000305004b0000346d0000613d00000000435100d9000000000223004b000035200000c13d0000104d2110012a00000008020000290000000000120435000000060100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000351e0000613d000000000101043b000000000201041a0000000b312000b90000000b0300006b0000000905000029000034860000613d0000000b431000fa000000000223004b000035200000c13d0000104d1210012a00000000315200a9000000000305004b0000348d0000613d00000000435100d9000000000223004b000035200000c13d0000104d2110012a000000070200002900000000001204350000109501000041000000400a00043d00000000051a04360000000401a000390000000602000029000000000021043500000000010004140000000402000029000000040320008c0000349f0000c13d0000000003000031000000200130008c00000020040000390000000004034019000034cf0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000b0000000a001d000900000005001d3f553f500000040f000000090b0000290000000b0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000034bc0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000034b80000c13d000000000705004b000034cb0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000354a0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000035260000213d0000000102200190000035260000c13d000000400010043f000000200130008c0000351e0000413d00000000010a0433000000000201004b000034f70000613d0000000c241000b900000000321400d90000000c0220006c000035200000c13d00000005321000b900000000311200d90000104d5340012a000000050110006c000035200000c13d0000104d5120012a00000007050000290000000005050433000000000653004b000035000000413d000010960440009c000034ff0000a13d0000000c645000b90000000c0600006b000034f50000613d0000000c764000fa000000000556004b000035200000c13d000c0000303400e1000035000000013d00000007010000290000000001010433000000000101004b00000000010000190000000002000019000035000000c13d00000000010000190000000002000019000c00000000001d00000008030000290000000003030433000000000431004b000035060000813d0000000502000029000035100000013d000010960220009c0000000002000019000035100000a13d00000005423000b9000000050400006b0000350f0000613d00000005542000fa000000000334004b000035200000c13d00000000121200d90000000c04200029000000000324004b000000000300001900000001030040390000000103300190000035200000c13d0000000a0100002900000000004104350000000c030000290000000204000029000000000034043500000003030000290000000000230435000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000035380000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035340000c13d000000000604004b000035580000c13d000035640000013d000000400200043d0000001f0430018f00000005053002720000000505500210000035470000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035430000c13d000000000604004b000035640000613d000035580000013d000000400200043d0000001f0430018f00000005053002720000000505500210000035560000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035520000c13d000000000604004b000035640000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f570001043000040000000000020000000005000019000000000601004b000035730000613d000000000602004b000035730000613d000000000521004b000035750000c13d000000000001042d0000000001050019000000000001042d000000000521004b0000358e0000813d000000000512019f0000106d0550009c000036d50000213d0000106f050000410000106f6710012c000000000865004900000000080660190000007f061002100000106fa960012c000000000779013f0000000009a5004900000000090a601900000000898900d9000000ff077002120000000008970049000000000778019f0000000007096019000000000809004b000000000907c019000010c10790009c000038120000c13d0000106f8720012c000035a50000013d0000106d0510009c000036d50000213d0000106d0520009c000036d50000213d0000106f050000410000106f6720012c000000000865004900000000080660190000007f062002100000106fa960012c000000000779013f0000000009a5004900000000090a601900000000898900d9000000ff077002120000000008970049000000000778019f0000000007096019000000000809004b000000000907c019000010c10790009c000038120000c13d0000106f8710012c000000000985004900000000090860190000106f8660012c000000000676013f0000000005850049000000000508601900000000759500d9000000ff066002120000000007560049000000000667019f0000000006056019000000000705004b000000000506c01900000000060004150000106d0750009c000035b70000213d000010c20750009c000037fa0000813d0000106d0750009c000037fd0000213d000000000705004b000037fd0000613d000010c10750009c000035c40000c13d0000000005000415000000000556004900000000050000020000106d0330009c0000000006000019000035de0000a13d000036d50000013d000010c30750009c000036130000813d0000000005000415000000000556004900000000050000020000106d0530009c000036d50000213d000010ee07000041000010ee653000d10000106f7670012c0000106f0970009900000000090760190000106fa750012c000000000667013f0000106f07a0009900000000070a601900000000789700d9000000ff066002120000000007860049000000000667019f0000000006086019000000000708004b000000000806c0190000000006050019000000000338004b000038120000c13d0000106d0340009c000036d50000213d000000000304004b000037f40000613d0000106f4340012c0000106f0740009900000000070460190000106f6460012c000000000434013f0000106f03600099000000000306601900000000537300d9000000ff044002120000000005340049000000000445019f0000000004036019000000000503004b000000000304c0190000106f043001970000106f054001670000106f0440009c00000000040000190000106f04002041000010ee0630009c00000000060000190000106f060040410000106f0550009c000000000406c019000000000404004b0000000004000019000036270000c13d000000000403004b000036260000613d0000106d0430009c000036030000213d000000000403004b000038180000c13d0000000003300049000010ef043001980000368c0000613d00000000654400a90000007f08500270000010f0678000d1000010c10550009c00000000060000190000000005000019000037300000413d00000000654800a9000010c10650009c000036e90000813d00000000060000190000000005070019000037300000013d000010c50750009c000036450000813d000010c608000041000010c7070000410000007f05500210000010c89550012a000010c90950009c000036490000413d0000000007080019000010cb0850009c0000364d0000413d000010ce0850009c000036520000813d000010cf077000410000007f05500210000010d08550012a000010d10850009c000036540000413d000036570000013d000010c104000041000000000121004b0000377e0000813d00000000132400a90000106f010000410000106f6530012c000000000761004900000000070660190000106f6220012c000000000225013f0000000005610049000000000506601900000000565700d9000000ff022002120000000005620049000000000225019f0000000002066019000000000506004b000000000602c019000000000246004b000038120000c13d000010c14210012b000000000541004900000000050460190000106f4330012c000000000223013f0000000001410049000000000104601900000000155100d9000000ff012002120000379a0000013d000010c4070000410000000008000019000010c90950009c0000361b0000813d0000007f05500210000010ca8550012a000010cb0850009c0000361e0000813d000010cc077000410000007f05500210000010cd8550012a000010ce0850009c000036200000413d000010d10850009c000036570000813d000010d2077000410000007f05500210000010d38550012a000010d40850009c000010d5077040410000007f05504210000010d68550412a000010d70850009c000036610000813d000010d8077000410000007f05500210000010d98550012a000036610000013d000010da0850009c000036660000813d000010db077000410000007f05500210000010dc8550012a0000000008000415000000040880008a0000000508800210000010dd0950009c000036710000813d0000000008000415000000030880008a0000000508800210000010de077000410000007f05500210000010df9550012a000200000006001d0000000508800270000010d508500047000010d5095000420000368f0000613d00000000a89900a9000010c10a50009900000000cba800d9000000000bb00049000000000bb9004b000038120000c13d000010e00b5000990000008009900210000000000998004900000000dca900d9000000000bbc004b000038120000c13d00000080099002700000000007970049000010e10b5000990000007f09800270000000008c9a00a90000007f0ac0027000000000b6ba00a9000010e20bc0009c000036950000213d000036920000013d00000000060000190000000005000019000037300000013d0000000006000019000000000a0000190000000009000019000100000006001d00000000baa900a9000036970000013d000100000006001d00000000ba9a00a9000010e30b500099000010e40c500099000010e60d5000990000007f0aa0027000000000edda00a9000010e70e50009900000000fa9a00a90000007f0aa00270000000008f9a00a90000007f08f0027000000000cfc800a900000000c89800a90000007f0880027000000000cbb800a900000000c89800a90000007f0880027000000000cee800a900000000989800a9000010e89cd0012a000010e9d9f0012a000010eadbb0012a000010eb0d5000410000007f0f80027000000000d6df00a9000010ecede0012a000000000e600049000010c10680009c000036b70000413d000010ed0650009900000000f8fe00d9000000000668004b000038120000c13d0000000006000415000000020660006900000000060000020000106d0630009c000036d50000213d000010e50550009900000000655a00a90000000106000029000000810660027000000082055002700000000006c60019000000000556001900000000059500190000000005b500190000000005d500190000008306e002700000000005650019000000000757004b000036d20000613d00000000653700a9000010af0670009c000035cd0000c13d0000106f060000410000106f0850009c0000106f08000041000035dc0000613d000035cd0000013d00000000060000190000106d0340009c000035e00000a13d000000400100043d00000064021000390000112503000041000000000032043500000044021000390000112603000041000000000032043500000024021000390000002803000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f57000104300000007f05500270000010f1865000d1000000000860004900000000985800d9000010f20880009c000038120000c13d000000000776001900000000584500a90000007f06800270000010f3956000d10000000005570019000010c10780009c0000372f0000413d00000000764600a9000010c10760009c000036fa0000813d0000372f0000013d0000007f06600270000010f4876000d1000000000870004900000000986800d9000010f50880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010f6986000d10000000005850019000010c10770009c000037080000813d0000372f0000013d00000000764600a9000010c10760009c0000370c0000813d0000372f0000013d0000007f06600270000010f7876000d1000000000870004900000000986800d9000010f80880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010f9986000d10000000005850019000010c10770009c0000371a0000813d0000372f0000013d00000000764600a9000010c10760009c0000371e0000813d0000372f0000013d0000007f06600270000010fa876000d1000000000870004900000000986800d9000010fb0880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010fc986000d10000000005850019000010c10770009c0000372c0000813d0000372f0000013d00000000764600a9000010c10760009c000037a10000813d00000000060000190000000005650019000000000600001900000000056500190000000006000019000000000565001900000000060000190000000005650019000000000600001900000000056500190000106f6550012c0000106f07000041000000000867004900000000080660190000110a9670012b000000000565013f0000000006970049000000000609601900000000676800d9000000ff055002120000000006750049000000000556019f0000000005076019000000000607004b000000000705c0190000000004470049000010c1044000410000110b05300198000037670000c13d0000110e053001980000376b0000613d0000110f544000d1000011105440012a00001111053001980000376d0000613d00001112544000d1000011135440012a00001114053001980000376f0000613d00001115544000d1000011165440012a0000111705300198000037710000613d00001118544000d1000011195440012a000010c105300198000037730000613d0000111a544000d10000111b5440012a0000111c05300198000037750000613d0000111d544000d10000111e5440012a0000111f05300198000037770000c13d000037790000013d0000110c544000d10000110d5440012a0000110e053001980000374e0000c13d0000111105300198000037520000c13d0000111405300198000037560000c13d00001117053001980000375a0000c13d000010c1053001980000375e0000c13d0000111c05300198000037620000c13d0000111f05300198000037790000613d000010df544000d1000011205440012a0000112103300198000011224340c0d1000011233430c12a000000000121004b000036290000413d0000106f1520012c0000106f0610009900000000060160190000007f012002100000106f7210012c000000000252013f0000106f03700099000000000307601900000000356300d9000000ff022002120000000003520049000000000223019f0000000002056019000000000305004b000000000502c019000010c10250009c000038120000c13d000000000204004b000037f40000613d0000106f3240012c0000106f0530009900000000050360190000106f3110012c000000000121013f0000106f02300099000000000203601900000000255200d9000000ff011002120000000002510049000000000112019f0000000001056019000000000205004b000000000501c0190000000001050019000000000001042d0000007f06600270000010fd876000d1000000000870004900000000986800d9000010fe0880009c000038120000c13d000000000557001900000000684600a90000007f07800270000010ff967000d1000010c10880009c000037300000413d00000000987600d9000010ff0880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037b50000813d000037310000013d0000007f0660027000001100876000d10000000008700049000011010880019700000000986800d9000011020880009c000038120000c13d000000000557001900000000684600a90000007f0780027000001103967000d1000010c10880009c000037320000413d00000000987600d9000011030880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037ca0000813d000037330000013d0000007f0660027000001104876000d10000000008700049000011050880019700000000986800d9000011060880009c000038120000c13d000000000557001900000000684600a90000007f0780027000001107967000d1000010c10880009c000037340000413d00000000987600d9000011070880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037df0000813d000037350000013d0000007f0660027000001129876000d10000000008700049000011080880019700000000986800d900001ab80880008c000038120000c13d000000000557001900000000684600a90000007f078002700000017c967000c9000010c10880009c000037360000413d00000000987600d90000017c0880008c000038120000c13d000000000556001900000000764700a9000010c10760009c000038070000813d000037370000013d000010630100004100000000001004350000001201000039000000040010043f0000104c0100004100003f5700010430000000400100043d0000112802000041000037ff0000013d000000400100043d000011270200004100000000002104350000000402100039000000000052043500000fd70210009c00000fd70100804100000040011002100000104c011001c700003f57000104300000007f066002700000112a876000d10000000008700049000011090880019700000000986800d9000000140880008c000038120000c13d000000000557001900000000764600a90000007f06600270000037380000013d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d0000112402000041000000000021043500000004021000390000000000320435000038020000013d00090000000000020000000008010019000000000107004b000039250000613d000300000006001d000200000007001d000400000004001d000500000005001d000600000002001d000700000003001d0000014101000039000000000101041a000900000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000800000008001d3f553f500000040f000000080300002900000fd903300197000000090400002900000fd9054001970000000102200190000039500000613d000000000101043b00000fd901100197000000000113004b000038570000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000900000005001d3f553f500000040f00000009050000290000000102200190000039500000613d000000400a00043d000000000101043b000038a50000013d000000400b00043d000010550100004100000000061b04360000000001000414000000040230008c000038620000c13d0000000003000031000000200130008c00000020040000390000000004034019000038950000013d000900000005001d00000fd702b0009c00000fd70200004100000000020b4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900080000000b001d000100000006001d3f553f500000040f000000010a000029000000080b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000038810000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b0000387d0000c13d000000000705004b000038900000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000039690000613d00000009050000290000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c000039530000213d0000000101100190000039530000c13d0000004000a0043f0000001f0130008c000039510000a13d00000000010b043300000fd90210009c000039510000213d000010b30200004100000000042a043600000fd9011001970000000402a0003900000000001204350000000001000414000000040250008c000038b20000c13d0000000003000031000000200130008c00000020040000390000000004034019000038e30000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c7000000000205001900090000000a001d000800000004001d3f553f500000040f000000080b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000038d00000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000038cc0000c13d000000000705004b000038df0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000039590000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000039530000213d0000000102200190000039530000c13d000000400010043f000000200130008c000039510000413d00000000010a0433000900000001001d00001046010000410000000000100439000000000100041200000004001004430000002400000443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000039500000613d000000000101043b000000090500002900000000325100a9000000000301004b000000070700002900000006080000290000000506000029000000040900002900000003040000290000390d0000613d00000000311200d9000000000151004b0000394a0000c13d00000000314200a9000000000304004b000039130000613d00000000434100d9000000000223004b0000394a0000c13d0000000002960019000000000362004b0000000003000019000000010300403900000001033001900000394a0000c13d000000000302004b0000000204000029000039250000613d000000000341004b000039280000813d000000000108004b00000000040000190000000003000019000000000100001900000000050000190000393f0000c13d000039400000013d00000000010000190000000002000019000000000001042d00000000144100d900000000319400a900000000534100d9000000000393004b0000394a0000c13d00000000536400a900000000544300d9000000000464004b0000394a0000c13d00000000542300d9000000000508004b000039380000613d000000000512004b0000393a0000a13d00000000050000190000393f0000013d0000000001000019000039400000013d00000000512100d900002710651000c900000000611500d9000027100110008c0000394a0000c13d00000000518500d9000000000507004b000039260000613d00002710654000c9000000000232004b000039480000213d00000000324500d9000027100220008c0000394a0000c13d00000000327500d9000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000039650000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000039610000c13d000000000604004b000039830000613d0000000505500210000039770000013d000000400200043d0000001f0430018f00000005053002720000000505500210000039750000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000039710000c13d000000000604004b000039830000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300003000000000002000300000002001d00000fd901100197000200000001001d00000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d000000000101043b000000030200002900000fd9022001970000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d000000400200043d0000112b0320009c000039df0000813d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000100000004001d000000000034043500000040022000390000000201100039000000000101041a000300000002001d0000000000120435000000020100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d00000003020000290000000002020433000000000101043b0000000201100039000000000301041a000000000123004b000039d90000413d00000001010000290000000004010433000000000523004900000000615400a9000000000223004b000039d50000613d00000000325100d9000000000242004b000039d90000c13d0000104d2110012a000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000d000000000002000d00000001001d0000013701000039000000000301041a0000013801000039000000000101041a0000013904000039000000000404041a000000400b00043d0000002405b000390000000000450435000010900400004100000000004b043500000fd9011001970000000404b00039000000000014043500000fd9022001970000004401b00039000c00000002001d0000000000210435000000000100041400000fd902300197000000040320008c00003a020000c13d0000000003000031000000600130008c0000006004000039000000000403401900003a310000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c7000b0000000b001d3f553f500000040f0000000b0b0000290000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f0000000506400272000000050660021000003a1f0000613d00000000076b0019000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000a79004b00003a1b0000c13d000000000705004b00003a2d0000613d000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e440000613d0000001f01400039000000e00210018f0000000001b20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f0000005f0130008c00003e350000a13d00000000020b04330000004001b000390000000001010433000b00000002001d000a00000001001d000000000112004b00003e3d0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000000301043b000000400a00043d000010480100004100000000051a04360000000401a000390000000c0200002900000000002104350000000a020000290000000b01200069000000000213004b0000000003018019000b00000003001d00000000010004140000000d0200002900000fd902200197000000040320008c000d00000002001d00003a6b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900003a9b0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000a0000000a001d000900000005001d3f553f500000040f000000090b0000290000000a0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003a880000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003a840000c13d000000000705004b00003a970000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e530000613d0000001f01400039000000600110018f000000000ba1001900000000021b004b000000000200001900000001020040390000104e04b0009c00003e370000213d000000010220019000003e370000c13d0000004000b0043f000000200230008c00003e350000413d00000000020a0433000400000002001d0000104a0200004100000000052b043600000000020004140000000d04000029000000040440008c00003ae30000613d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f00000fdb011001c70000000d02000029000a0000000b001d000900000005001d3f553f500000040f000000090a0000290000000a0b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003ace0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003aca0000c13d000000000705004b00003add0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e620000613d0000001f01400039000000600110018f000000000cb100190000104e02c0009c00003e370000213d0000004000c0043f000000200230008c00003e350000413d00000000060b04330000104b0200004100000000052c04360000000402c000390000000c04000029000000000042043500000000020004140000000d04000029000000040440008c00003b280000613d000900000006001d00000fd701c0009c00000fd70100004100000000010c4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f0000104c011001c70000000d02000029000c0000000c001d000a00000005001d3f553f500000040f0000000a0a0000290000000c0c0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003b120000613d000000000701034f00000000080c0019000000007907043c00000000089804360000000009a8004b00003b0e0000c13d000000000705004b00003b210000613d0000000506600210000000000761034f00000000066c00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e710000613d0000001f01400039000000600110018f0000000906000029000000000ac100190000104e02a0009c00003e370000213d0000004000a0043f000000200230008c00003e350000413d00000000020c043300050000402600ad000000000406004b00003b350000613d00000005546000f9000000000224004b00003e3d0000c13d0000013702000039000000000202041a000010910400004100000000064a04360000000504000029000a104d40400132000000000400041400000fd902200197000000040520008c00003b710000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7000c0000000a001d000900000006001d3f553f500000040f000000090b0000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003b5c0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003b580000c13d000000000705004b00003b6b0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e800000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c00003e370000213d000000400010043f000000200130008c00003e350000413d00000000010a0433000c00000001001d00000fd90110009c00003e350000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000900000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000003e430000613d000000000101043b000000000101004b00003e350000613d000000400400043d0000109201000041000000000014043500000004014000390000000c02000029000000000021043500000000010004140000000902000029000000040320008c00003bab0000613d00000fd70340009c00000fd7030000410000000003044019000c00000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f0000000c040000290000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000003e8f0000613d0000104e0140009c00003e370000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000800000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000003e430000613d000000000101043b000000000101004b00003e350000613d000000400400043d00001093010000410000000001140436000900000001001d00000004014000390000000d02000029000000000021043500000000010004140000000802000029000000040320008c000c00000004001d00003bdf0000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f0000000c040000290000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000003e9e0000613d0000104e0140009c00003e370000213d0000000c01000029000000400010043f0000106e0110009c00003e370000213d0000000c02000029000000a001200039000000400010043f0000008001200039000700000001001d00000000000104350000006001200039000600000001001d0000000000010435000000400420003900000000000404350000000000020435000000090100002900000000000104350000013701000039000000000201041a000000400b00043d000010910100004100000000051b0436000000000100041400000fd902200197000000040320008c000200000004001d00003c020000c13d0000000003000031000000200130008c0000002004000039000000000403401900003c320000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c700080000000b001d000300000005001d3f553f500000040f000000030a000029000000080b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003c1f0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003c1b0000c13d000000000705004b00003c2e0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ead0000613d0000001f01400039000000600110018f000000000ab1001900000000021a004b000000000200001900000001020040390000104e04a0009c00003e370000213d000000010220019000003e370000c13d0000004000a0043f000000200230008c00003e350000413d00000000020b043300000fd90420009c00003e350000213d0000014204000039000000000404041a000010940500004100000000065a04360000000405a000390000000000250435000000000500041400000fd902400197000000040420008c000300000002001d00003c7f0000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700080000000a001d000100000006001d3f553f500000040f000000010b000029000000080a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003c6a0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003c660000c13d000000000705004b00003c790000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ebc0000613d0000001f01400039000000600110018f0000000001a100190000104e0410009c00003e370000213d000000400010043f000000200130008c00003e350000413d00000000010a0433000800000001001d0000000d0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000003e350000613d000000000101043b0000000101100039000000000201041a0000000b312000b90000000b0300006b000000080500002900003c9e0000613d0000000b431000fa000000000223004b00003e3d0000c13d0000104d1210012a00000000315200a9000000000305004b00003ca50000613d00000000435100d9000000000223004b00003e3d0000c13d0000104d2110012a000000070200002900000000001204350000000d0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000003e350000613d000000000101043b000000000201041a0000000b312000b90000000b0300006b000000080500002900003cbe0000613d0000000b431000fa000000000223004b00003e3d0000c13d0000104d1210012a00000000315200a9000000000305004b00003cc50000613d00000000435100d9000000000223004b00003e3d0000c13d0000104d2110012a000000060200002900000000001204350000109501000041000000400a00043d00000000051a04360000000401a000390000000d02000029000000000021043500000000010004140000000302000029000000040320008c00003cd70000c13d0000000003000031000000200130008c0000002004000039000000000403401900003d070000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c700080000000a001d000300000005001d3f553f500000040f000000030b000029000000080a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003cf40000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003cf00000c13d000000000705004b00003d030000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ecb0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f000000200130008c00003e350000413d00000000010a0433000000000201004b00003d300000613d0000000a241000b900000000321400d90000000a0220006c00003e3d0000c13d00000004321000b900000000311200d90000104d5340012a000000040110006c00003e3d0000c13d0000104d5120012a00000006050000290000000005050433000000000653004b00003d390000413d000010960440009c00003d380000a13d0000000a645000b900000005060000290000104d0660009c00003d2e0000413d0000000a764000fa000000000556004b00003e3d0000c13d000a0000303400e100003d390000013d00000006010000290000000001010433000000000101004b0000000001000019000000000200001900003d390000c13d00000000010000190000000002000019000a00000000001d00000007030000290000000003030433000000000431004b00003d3f0000813d000000040200002900003d490000013d000010960220009c000000000200001900003d490000a13d00000004423000b9000000040400006b00003d480000613d00000004542000fa000000000334004b00003e3d0000c13d00000000121200d90000000a01200029000000000321004b00000000030000190000000103004039000000010330019000003e3d0000c13d0000000c0300002900000000001304350000000a010000290000000903000029000000000013043500000002010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000000101043b00000fd9011001970000000d03000029000000000113004b00003d7c0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000400a00043d000000000101043b00003dc80000013d000000400b00043d000010550100004100000000051b04360000000001000414000000040230008c00003d870000c13d0000000003000031000000200130008c0000002004000039000000000403401900003db80000013d00000fd702b0009c00000fd70200004100000000020b40190000004004200210000000000203001900000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000d0000000b001d000a00000005001d3f553f500000040f0000000a0a0000290000000d0b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003da50000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003da10000c13d000000000705004b00003db40000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003efb0000613d0000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c00003e370000213d000000010110019000003e370000c13d0000004000a0043f000000200130008c00003e350000413d00000000010b043300000fd90210009c00003e350000213d000010790200004100000000052a0436000000000300041400000fd902100197000000040120008c00003dd30000c13d0000000003000031000000200130008c0000002004000039000000000403401900003e030000013d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000d0000000a001d000a00000005001d3f553f500000040f0000000a0b0000290000000d0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003df00000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003dec0000c13d000000000705004b00003dff0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003eda0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f000000200130008c00003e350000413d00000000020a0433000000ff0120008c00003e350000213d000000120120008c00003e3d0000213d0000000c010000290000000001010433000000120320008c00003e1b0000c13d000000010300003900003e260000013d0000000a0400003900000001030000390000001202200089000000010520019000000000654400a9000000010400603900000000433400a9000000010420008c0000000102200270000000000405001900003e1e0000213d00000000421300a9000000000401004b00003e2c0000613d00000000411200d9000000000131004b00003e3d0000c13d0000000c0100002900000000002104350000013601000039000000000101041a000010640310019700000080041002700000000b010000293f55356a0000040f000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000400200043d0000001f0430018f0000000505300272000000050550021000003e500000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e4c0000c13d000000000604004b00003f090000c13d00003f150000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e5f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e5b0000c13d000000000604004b00003ee90000c13d00003ef50000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e6e0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e6a0000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e7d0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e790000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e8c0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e880000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e9b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e970000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003eaa0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ea60000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003eb90000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003eb50000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003ec80000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ec40000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003ed70000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ed30000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f000000050530027200003ee60000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ee20000c13d000000000604004b00003ef50000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000003f070000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003f030000c13d000000000604004b00003f150000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000000000001042f00000fd70210009c00000fd7010080410000006001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f0000105c011001c700008010020000393f553f500000040f000000010220019000003f2b0000613d000000000101043b000000000001042d000000000100001900003f570001043000000000050100190000000000200439000000050130008c00003f3b0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000631004b00003f330000413d00000fd70130009c00000fd7030080410000006001300210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f0000112c011001c700000000020500193f553f500000040f000000010220019000003f4a0000613d000000000101043b000000000001042d000000000001042f00003f4e002104210000000102000039000000000001042d0000000002000019000000000001042d00003f53002104230000000102000039000000000001042d0000000002000019000000000001042d00003f550000043200003f560001042e00003f5700010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09c8f7ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380ae0fcab300000000000000000000000000000000000000000000000000000000616c697a696e6700000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e69746908c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000002000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024980000000200000000000000000000000000000240000001000000000000000000000000000000000000000000000000000000000000000000000000009f6506cd00000000000000000000000000000000000000000000000000000000cdaa21b600000000000000000000000000000000000000000000000000000000e30c397700000000000000000000000000000000000000000000000000000000ef36bbdd00000000000000000000000000000000000000000000000000000000f6ed201600000000000000000000000000000000000000000000000000000000f6ed201700000000000000000000000000000000000000000000000000000000fa6d5f1800000000000000000000000000000000000000000000000000000000fe1006ad00000000000000000000000000000000000000000000000000000000ef36bbde00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000e486033800000000000000000000000000000000000000000000000000000000e486033900000000000000000000000000000000000000000000000000000000ee6b13fc00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000e4676f3700000000000000000000000000000000000000000000000000000000d88b9d2d00000000000000000000000000000000000000000000000000000000e18f882100000000000000000000000000000000000000000000000000000000e18f882200000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000d88b9d2e00000000000000000000000000000000000000000000000000000000da6ab4f800000000000000000000000000000000000000000000000000000000cf329d1500000000000000000000000000000000000000000000000000000000cf329d1600000000000000000000000000000000000000000000000000000000d65bd24100000000000000000000000000000000000000000000000000000000cdaa21b700000000000000000000000000000000000000000000000000000000ce85361300000000000000000000000000000000000000000000000000000000ba437c6700000000000000000000000000000000000000000000000000000000c3db3c3500000000000000000000000000000000000000000000000000000000c7ad089400000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000c86d1a7800000000000000000000000000000000000000000000000000000000c3db3c3600000000000000000000000000000000000000000000000000000000c4ae316800000000000000000000000000000000000000000000000000000000bd212c0d00000000000000000000000000000000000000000000000000000000bd212c0e00000000000000000000000000000000000000000000000000000000be26317e00000000000000000000000000000000000000000000000000000000ba437c6800000000000000000000000000000000000000000000000000000000bc5dc4c300000000000000000000000000000000000000000000000000000000b1a250f100000000000000000000000000000000000000000000000000000000b7f2d25700000000000000000000000000000000000000000000000000000000b7f2d25800000000000000000000000000000000000000000000000000000000b9eb69f600000000000000000000000000000000000000000000000000000000b1a250f200000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000afcff50e00000000000000000000000000000000000000000000000000000000afcff50f00000000000000000000000000000000000000000000000000000000b0772d0b000000000000000000000000000000000000000000000000000000009f6506ce00000000000000000000000000000000000000000000000000000000a15753dc000000000000000000000000000000000000000000000000000000005fe3b5660000000000000000000000000000000000000000000000000000000080d45a2c0000000000000000000000000000000000000000000000000000000089afcb43000000000000000000000000000000000000000000000000000000008e8f294a000000000000000000000000000000000000000000000000000000008e8f294b000000000000000000000000000000000000000000000000000000009198e515000000000000000000000000000000000000000000000000000000009565d3d20000000000000000000000000000000000000000000000000000000089afcb44000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000088bead720000000000000000000000000000000000000000000000000000000088bead730000000000000000000000000000000000000000000000000000000088d742c20000000000000000000000000000000000000000000000000000000080d45a2d00000000000000000000000000000000000000000000000000000000856c3aa40000000000000000000000000000000000000000000000000000000079ba5096000000000000000000000000000000000000000000000000000000007dc0d1cf000000000000000000000000000000000000000000000000000000007dc0d1d0000000000000000000000000000000000000000000000000000000007ef820700000000000000000000000000000000000000000000000000000000079ba5097000000000000000000000000000000000000000000000000000000007dafcd89000000000000000000000000000000000000000000000000000000006857249b000000000000000000000000000000000000000000000000000000006857249c00000000000000000000000000000000000000000000000000000000715018a6000000000000000000000000000000000000000000000000000000005fe3b567000000000000000000000000000000000000000000000000000000006426b4a70000000000000000000000000000000000000000000000000000000037f23cd20000000000000000000000000000000000000000000000000000000055d36c97000000000000000000000000000000000000000000000000000000005c975aba000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000005d536d300000000000000000000000000000000000000000000000000000000055d36c9800000000000000000000000000000000000000000000000000000000594a67ee00000000000000000000000000000000000000000000000000000000487b0dfa00000000000000000000000000000000000000000000000000000000487b0dfb000000000000000000000000000000000000000000000000000000004e71d92d0000000000000000000000000000000000000000000000000000000037f23cd30000000000000000000000000000000000000000000000000000000038f6a434000000000000000000000000000000000000000000000000000000001bffac880000000000000000000000000000000000000000000000000000000024e6baf10000000000000000000000000000000000000000000000000000000024e6baf20000000000000000000000000000000000000000000000000000000029b6eca9000000000000000000000000000000000000000000000000000000001bffac8900000000000000000000000000000000000000000000000000000000207add91000000000000000000000000000000000000000000000000000000001b3f8c5d000000000000000000000000000000000000000000000000000000001b3f8c5e000000000000000000000000000000000000000000000000000000001b9ce575000000000000000000000000000000000000000000000000000000000104db1b000000000000000000000000000000000000000000000000000000000e32cb86310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e000000000000000000000000000000000000002000000080000000000000000095dd9193000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000001c00000000000000000182df0f50000000000000000000000000000000000000000000000000000000070a082310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffff7f000000000000000000000000000000000000000000000000ffffffffffffff1fdf37d27e88e3bd0b85262482997e409a463f5be0ebb19232abf994dd8474090d020000000000000000000000000000000000004000000000000000000000000002000002000000000000000000000000000000440000000000000000000000006f307dc3000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000008aadf79900000000000000000000000000000000000000000000000000000000fa7781ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9fffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000038d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227000000000000000000000000000000000000000040000000800000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd14e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff757064617465416c7068612875696e743132382c75696e7431323829000000009122c3fdea272423a0586803b53902139919baf05be731f04724ef8f363d378d746f67676c6550617573652829000000000000000000000000000000000000005db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586164644d61726b657428616464726573732c616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000000007aee632d000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffff5f80000000000000000000000000000000000000000000000000000000000000000313b285000000000000000000000000000000000000000000000000000000008e8f294b00000000000000000000000000000000000000000000000000000000dc0d0aab000000000000000000000000000000000000000000000000000000001322eaea77217179bf4ef6084dc2f48c897e0d5a6b8365213804360e4d8ba9a2f257f636000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000f486040c0000000000000000000000000000000000000000000000000000000083aebebd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000800000000000000000313ce56700000000000000000000000000000000000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa06974000000000000000000000000000000000000000000000000000000000000436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696dc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa5061757361626c653a207061757365640000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000006472657373000000000000000000000000000000000000000000000000000000696e76616c696420616365737320636f6e74726f6c206d616e616765722061646e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069e07adb4000000000000000000000000000000000000000000000000000000000e6c4247b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000008000000000000000006275726e286164647265737329000000000000000000000000000000000000007365744d61784c6f6f70734c696d69742875696e743235362900000000000000697373756528626f6f6c2c616464726573735b5d290000000000000000000000dd032f28700d4e4b1719b8fa26918a7d68608b4e36def571ce5fe7a3ecd69f455272e69bcef8da96614ac4a5d1e95ca02c35ea627bf7ecf389ec88d8d78b86bb98e1b31b00000000000000000000000000000000000000000000000000000000358ae03600000000000000000000000000000000000000000000000000000000b62cad690000000000000000000000000000000000000000000000000000000096e85ced0000000000000000000000000000000000000000000000000000000041976e0900000000000000000000000000000000000000000000000000000000fc57d4df000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a763ffff4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000007365745374616b6564417428616464726573735b5d2c75696e743235365b5d29947d5a840000000000000000000000000000000000000000000000000000000009d2594e8892daceca055f74be758146a8b8b1167444d0b4ccb96e74168198ccb7d09497000000000000000000000000000000000000000000000000000000007570646174654d756c7469706c6965727328616464726573732c75696e74323591e78a55b6df3a0eac1c12a64572a8c0faced385bafba688817f5ce6daa33537beb98cab0000000000000000000000000000000000000000000000000000000000c4e3d1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf02000000000000000000000000000000000000200000008000000000000000007f97254800000000000000000000000000000000000000000000000000000000a699df4aa8f89fc1f5408fe78ae114651f18b25ed1601680e4c70c15177d8b1b75d724f60000000000000000000000000000000000000000000000000000000038d22ee80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000007365744c696d69742875696e743235362c75696e7432353629000000000000006c52f3e195bdc534883e903e0612c49261a466aacd492501870b0a0ac0b18355e55fb509000000000000000000000000000000000000000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720200000000000000000000000000000000000040000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffa666642b0000000000000000000000000000000000000000000000000000000018c5e8ab000000000000000000000000000000000000000000000000000000004a3fa29300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffc0e22de1457cb61fb61b60176bc4235a9abd19466126b46692bc14fc573f099249192e7a7b00000000000000000000000000000000000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff3f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206ec7edf5cfe443c04a10a60ff6084c847114348c55b257a01d62700326219adbba416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000000000000000000000000000000000000000000000000000ffffffffffffff60000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000010000000000000000000000000000000000000000000000000000000733048c5bfffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000000000000000001c8464f76164760000001fffffffffffffffffffffffffffffff000000000000000000000000000000000ffffffffffffffffffffffffffffffe80000000000000000000000000000000000000000000000000000000000000000000000000001c8464f7616476000000000000000000000000000000000000000000000f1aaddd7742e9000000000000100000000000000000000000000000000000000f1aaddd7742e9000000000000000000000000000000000000000000000000afe10820813d78000000000000001fffffffffffffffffffffffffffffffc0000000000000000000000000000000000000000000000000000000000000000000afe10820813d780000000000000000000000000000000000000000000000002582ab704279ec00000000000000001fffffffffffffffffffffffffffffffe000000000000000000000000000000000000000000000000000000000000000002582ab704279ec00000000000000000000000000000000000000000000000001152aaa3bf81cc000000000000000001ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000001152aaa3bf81cc000000000000000000000000000000000000000000000000002f16ac6c59de70000000000000000001ffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000002f16ac6c59de70000000000000000000000000000000000000000000000000004da2cbf1be5828000000000000000001ffffffffffffffffffffffffffffffffc0000000000000000000000000000000000000000000000000000000000000004da2cbf1be58280000000000000000000000000000000000000000000000000063afbe7ab2082c000000000000000001ffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000000000000000000063afbe7ab2082c0000000000000000000000000000000000000000000000000070f5a893b608861e1f58934f97aea57efffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000070f5a893b608861e1f58934f97aea57d0000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000012aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa000000000000000000000000000000007fffffffffffffffffffffffffffffff000000000000000000000000000000010ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b000000000000000000000000000000010e38e38e38e38e38e38e38e38e38e38e000000000000000000000000000000011249249249249249249249249249249200000000000000000000000000000001199999999999999999999999999999990000000000000000000000000000000109d89d89d89d89d89d89d89d89d89d89000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000fffffffffffffffffffffffffffffffef777777777777777777777777777777800000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000108888888888888888888888888888888ffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000010e1b3be415a0000fffffffffffffffffffffffffffffffffffffffffffffffffa5f6ec094e2000000000000000000000000000000000000000000000000000005a0913f6b1e00000000000000000000000000000000000000000000000000000168244fdac78000ffffffffffffffffffffffffffffffffffffffffffffffffffb7f8bcd43e8000000000000000000000000000000000000000000000000000004807432bc18000000000000000000000000000000000000000000000000000000c0135dca04000fffffffffffffffffffffffffffffffffffffffffffffffffffe48f84e3240000000000000000000000000000000000000000000000000000001b707b1cdc000000000000000000000000000000000000000000000000000000036e0f639b800fffffffffffffffffffffffffffffffffffffffffffffffffffff9e70116080000000000000000000000000000000000000000000000000000000618fee9f8000000000000000000000000000000000000000000000000000000009c197dcc00fffffffffffffffffffffffffffffffffffffffffffffffffffffff1cf231c000000000000000000000000000000000000000000000000000000000e30dce400000000000000000000000000000000000000000000000000000000012ebd1300ffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8b6610000000000000000000000000000000000ffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000017499f000000000000000000000000000000000000000000000000000000000001a9d480ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe39c8000000000000000000000000000000000ffffffffffffffffffffffffffffff8000000000000000000000000000000000000000000000000000000000001c6380000000000000000000000000000000000000000000000000000000000001c63800000000000000000000000000000000fffffffffffffffffffffffffffffff800000000000000000000000000000000fffffffffffffffffffffffffffffffc00000000000000000000000000000000000000000000000021c3677c82b40000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000f1aaddd7742e56d32fb9f997440000000000000000000000000043cbaf42a000812488fc5c220ad7b97bf6e99e000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000afe10820813d65dfe6a33c07f738f000000000000000000000000000005d27a9f51c31b7c2f8038212a057477999100000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000002582ab704279e8efd15e0265855c47a0000000000000000000000000000001b4c902e273a58678d6d3bfdb93db96d020000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001152aaa3bf81cb9fdb76eae12d02957100000000000000000000000000000003b1cc971a9bb5b9867477440d6d1577500000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002f16ac6c59de6f8d5d6f63c1482a7c86000000000000000000000000000000015bf0a8b1457695355fb8ac404e7a79e3000000000000000000000000000000004da2cbf1be5827f9eb3ad1aa9866ebb300000000000000000000000000000000d3094c70f034de4b96ff7d5b6f99fcd800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000063afbe7ab2082ba1a0ae5e4eb1b479dc00000000000000000000000000000000a45af1e1f40c333b3de1db4dd55f29a7000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000910b022db7ae67ce76b441c27035c6a1000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000783eafef1c0a8f3978c7f81824d62ebf0000000000000000000000000000000088415abbe9a76bead8d00cf112e4d4a81086170d000000000000000000000000000000000000000000000000000000006e20696e7432353600000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e2061c3b2a8f40000000000000000000000000000000000000000000000000000000079c4747a00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe548ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec000000000000000000000000000000000000000000000000ffffffffffffffa002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eb0ece0d1a8adb875ec0fd7d608c8b3bd3b0ecce166072856f8aee7eaa1e443b", + "deployedBytecode": "0x000300000000000200240000000000020000000003010019000000600330027000000fd703300197000200000031035500010000000103550000000102200190000000330000c13d0000008002000039000000400020043f000000040230008c000022570000413d000000000201043b000000e00220027000000fe50420009c0000006c0000213d000010160420009c000000850000a13d000010170420009c000000bb0000a13d000010180420009c000001230000a13d000010190420009c00000a1f0000a13d0000101a0420009c00000aaf0000613d0000101b0420009c00000ad00000613d0000101c0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000002402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000000401100370000000000101043b00000000001004350000013a01000039000000200010043f00000040010000393f553f1c0000040f00000014020000290000000000200435000000f20000013d0000000002000416000000000202004b000022570000c13d0000001f0230003900000fd8022001970000018002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000450000613d00000180050000390000018006400039000000000701034f000000007807043c0000000005850436000000000865004b000000410000c13d000000000502004b000000530000613d000000000141034f00000003022002100000018004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000e00130008c000022570000413d000001800100043d00000fd90210009c000022570000213d000001a00200043d00000fd90320009c000022570000213d000002400600043d000000000306004b0000000003000019000000010300c039000000000336004b000022570000c13d000002200400043d000002000500043d000001e00300043d000001c00700043d000000000806004b000008e70000613d000000000707004b00000a4c0000c13d00000fdc07000041000000010800003900000a550000013d00000fe60420009c000000ac0000a13d00000fe70420009c000000ce0000a13d00000fe80420009c0000012e0000a13d00000fe90420009c00000a280000a13d00000fea0420009c00000adc0000613d00000feb0420009c00000b100000613d00000fec0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000000001000412001600000001001d001500c00000003d000080050100003900000044030000390000000004000415000000160440008a00000c900000013d0000102f0420009c000000df0000213d0000103b0420009c0000015d0000213d000010410420009c000008ec0000213d000010440420009c00000b370000613d000010450220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d0000003302000039000000000202041a00000fd9022001970000000003000411000000000232004b00000f560000c13d000000000201004b000010530000c13d00000fe001000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f0000108501000041000000c40010043f0000108401000041000000e40010043f000010990100004100003f570001043000000fff0420009c000000f60000213d0000100b0420009c000001810000213d000010110120009c000008f50000213d000010140120009c00000b420000613d000010150120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013b0100003900000f520000013d000010240420009c0000018c0000213d0000102a0120009c000009060000213d0000102d0120009c00000b470000613d0000102e0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000000001000412002000000001001d001f00a00000003d000080050100003900000044030000390000000004000415000000200440008a00000c900000013d00000ff40420009c0000082e0000213d00000ffa0420009c000009260000213d00000ffd0120009c00000b4c0000613d00000ffe0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013601000039000000000101041a0000008001100270000000800010043f000010470100004100003f560001042e000010300420009c000008390000213d000010360420009c000009400000213d000010390420009c00000b570000613d0000103a0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f00000040010000393f553f1c0000040f00000f180000013d000010000420009c000008bf0000213d000010060420009c0000095b0000213d000010090420009c00000b770000613d0000100a0220009c000022570000c13d000000840230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001200000002001d0000004401100370000000000101043b001100000001001d000000e001000039000000400010043f0000002a01000039000000800010043f0000106a01000041000000a00010043f0000106b01000041000000c00010043f00000080010000393f5525850000040f0000001403000029000000000103004b000010670000c13d000000400100043d000010770200004100000a4e0000013d0000101f0420009c000009640000213d000010220120009c00000b8b0000613d000010230120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001310100003900000f520000013d00000fef0420009c000009770000213d00000ff20420009c00000b9e0000613d00000ff30220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000000102004b000010940000c13d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000010450000013d0000103c0420009c0000098a0000213d0000103f0420009c00000ba30000613d000010400220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000002402100370000000000202043b001300000002001d0000000401100370000000000101043b001400000001001d000000c001000039000000400010043f0000001901000039000000800010043f000010aa01000041000000a00010043f00000080010000393f5525850000040f0000012e01000039000000000101041a000000140110006b0000017e0000413d0000012f01000039000000000101041a000000130110006b00000f930000813d000000400100043d000010ac0200004100000a4e0000013d0000100c0420009c000009ad0000213d0000100f0420009c00000baf0000613d000010100120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000970100003900000d860000013d000010250420009c000009d30000213d000010280420009c00000c2e0000613d000010290220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000402043b000000000204004b0000000002000019000000010200c039001400000004001d000000000224004b000022570000c13d0000002402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b001100000001001d0000104e0110009c000022570000213d001000240020003d000000110100002900000005011002100000001001100029000000000131004b000022570000213d000000c001000039000000400010043f0000001501000039000000800010043f0000108d01000041000000a00010043f00000080010000393f5525850000040f000000140100006b000012080000c13d000000110100006b00000f700000613d000200000000001d000001c50000013d00000002020000290000000102200039000200000002001d000000110120006c00000f700000813d000000020100002900000005011002100000001001100029001300000001001d0000000101100367000000000101043b001400000001001d00000fd90110009c000022570000213d000000140100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000ff03200190000009580000c13d0000107c0220019700000001022001bf000000000021041b0000012f01000039000000000101041a000010af0210009c0000101a0000613d00000001021000390000012f03000039000000000023041b0000013102000039000000000202041a0000012e03000039000000000303041a000000000223004b0000017e0000213d0000013002000039000000000202041a000000000121004b0000017e0000813d0000013c01000039000000000101041a000000000101004b000002170000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000014020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000000101100367000000000101043b000f00000001001d00000fd90110009c000022570000213d0000013501000039000000000101041a000400000001001d000000000101004b000001c00000613d00000000020000190000013501000039000000000101041a000000000121004b00001dd60000a13d000700000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000e00000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000002760000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d000002c10000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c000002810000c13d0000000003000031000000200130008c00000020040000390000000004034019000002b00000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001300000009001d001200000005001d3f553f500000040f000000120a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000029d0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000002990000c13d0000001f06400190000002ac0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021a00000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001200000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000130100002900000fd9011001970000000405900039001300000001001d000000000015043500000000010004140000001202000029000000040420008c000002ec0000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000130100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000003340000013d000c00000005001d000b00000003001d00000fd70390009c00000fd7030000410000000003094019000a00400030021800000fd70310009c00000fd701008041000000c0011002100000000a011001af0000104c011001c7000d00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020170000613d0000000d030000290000104e0130009c0000000c0200002900000f810000213d000000400030043f0000105901000041000000000013043500000013010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000a011001af0000104c011001c700000012020000293f553f500000040f0000000d090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000b0a000029000003210000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000031d0000c13d0000001f06400190000003300000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020260000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001203000029000000000123004b0000101a0000413d000000000123004b0000037b0000613d000d00000002001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001203000029000000000031041b0000000e010000290000000301100039000000000101041a000000000201004b0000000002030019000003700000613d0000000d0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d9000003710000013d00000000020000190000000e010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000201100039000000000101041a001300000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000002011000390000001302000029000000000021041b0000013701000039000000000201041a0000013801000039000000000101041a0000013903000039000000000303041a000000400a00043d0000004404a000390000000f0500002900000000005404350000002404a000390000000000340435000010900300004100000000003a043500000fd9011001970000000403a000390000000000130435000000000100041400000fd902200197000000040320008c000003c20000c13d0000000003000031000000600130008c00000060040000390000000004034019000003f00000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700130000000a001d3f553f500000040f000000130a0000290000000003010019000000600330027000000fd703300197000000600430008c0000006004000039000000000403401900000005054002720000000505500210000003de0000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b000003da0000c13d0000001f06400190000003ec0000613d000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020350000613d0000001f01400039000000e00210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000600130008c000022570000413d00000000020a04330000004001a000390000000001010433001300000002001d001200000001001d000000000112004b0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000301043b000000400900043d0000104801000041000000000519043600000004019000390000000f02000029000000000021043500000012020000290000001301200069000000000213004b0000000003018019001200000003001d00000000010004140000001402000029000000040320008c000004280000c13d0000000003000031000000200130008c00000020040000390000000004034019000004570000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7001300000009001d000e00000005001d3f553f500000040f0000000e0a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004440000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000004400000c13d0000001f06400190000004530000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020440000613d0000001f01400039000000600110018f000000000a91001900000000021a004b000000000200001900000001020040390000104e04a0009c00000f810000213d000000010220019000000f810000c13d0000004000a0043f000000200230008c000022570000413d0000000002090433000800000002001d0000104a0200004100000000062a043600000000050004140000001402000029000000040420008c0000049d0000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f00000fdb011001c700130000000a001d000e00000006001d3f553f500000040f0000000e09000029000000130a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004880000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000004840000c13d0000001f06400190000004970000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020530000613d0000001f01400039000000600110018f000000000ba100190000104e02b0009c00000f810000213d0000004000b0043f000000200230008c000022570000413d00000000060a04330000104b0200004100000000072b04360000000402b000390000000f04000029000000000042043500000000050004140000001402000029000000040420008c000004e00000613d000d00000006001d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700130000000b001d000e00000007001d3f553f500000040f0000000e09000029000000130b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004ca0000613d000000000601034f00000000070b0019000000006806043c0000000007870436000000000897004b000004c60000c13d0000001f06400190000004d90000613d0000000505500210000000000751034f00000000055b00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020620000613d0000001f01400039000000600110018f0000000d060000290000000009b100190000104e0290009c00000f810000213d000000400090043f000000200230008c000022570000413d00000000020b043300090000406200ad000000000406004b000004ed0000613d00000009546000f9000000000224004b0000101a0000c13d0000013702000039000000000202041a000010910400004100000000064904360000000904000029000e104d40400132000000000400041400000fd902200197000000040520008c000005280000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7001300000009001d000d00000006001d3f553f500000040f0000000d0a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000005130000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000050f0000c13d0000001f06400190000005220000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020710000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000d00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d0000109201000041000000000014043500000004014000390000001302000029000000000021043500000000010004140000000d02000029000000040320008c000005620000613d00000fd70340009c00000fd7030000410000000003044019001300000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000013040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020800000613d0000104e0140009c00000f810000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000c00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d00001093010000410000000001140436000d00000001001d00000004014000390000001402000029000000000021043500000000010004140000000c02000029000000040320008c001300000004001d000005960000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000013040000290000000003010019000000600330027000000fd70030019d00000fd703300197000200000001035500000001022001900000208f0000613d0000104e0140009c00000f810000213d0000001301000029000000400010043f0000106e0110009c00000f810000213d0000001302000029000000a001200039000000400010043f0000008001200039000b00000001001d00000000000104350000006001200039000a00000001001d00000000000104350000004001200039000500000001001d000000000001043500000000000204350000000d0100002900000000000104350000013701000039000000000201041a000000400a00043d000010910100004100000000051a0436000000000100041400000fd902200197000000040320008c000005b90000c13d0000000003000031000000200130008c00000020040000390000000004034019000005e80000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c7000c0000000a001d000600000005001d3f553f500000040f00000006090000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000005d50000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000005d10000c13d0000001f06400190000005e40000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000209e0000613d0000001f01400039000000600110018f0000000009a10019000000000219004b000000000200001900000001020040390000104e0490009c00000f810000213d000000010220019000000f810000c13d000000400090043f000000200230008c000022570000413d00000000020a043300000fd90420009c000022570000213d0000014204000039000000000404041a0000109405000041000000000659043600000004059000390000000000250435000000000500041400000fd902400197000000040420008c000600000002001d000006340000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c7000c00000009001d000300000006001d3f553f500000040f000000030a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000061f0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000061b0000c13d0000001f064001900000062e0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020ad0000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433000c00000001001d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000201041a00000012312000b9000000120300006b0000000c05000029000006530000613d00000012431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000065a0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000b020000290000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a00000012312000b9000000120300006b0000000c05000029000006730000613d00000012431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000067a0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000a020000290000000000120435000000400900043d0000109501000041000000000519043600000004019000390000001402000029000000000021043500000000010004140000000602000029000000040320008c0000068c0000c13d0000000003000031000000200130008c00000020040000390000000004034019000006bb0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000c00000009001d000600000005001d3f553f500000040f000000060a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000006a80000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000006a40000c13d0000001f06400190000006b70000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020bc0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433000000000201004b000006e40000613d0000000e241000b900000000321400d90000000e0220006c0000101a0000c13d00000008321000b900000000311200d90000104d5340012a000000080110006c0000101a0000c13d0000104d5120012a0000000a050000290000000005050433000000000653004b000006ed0000413d000010960440009c000006ec0000a13d0000000e645000b900000009060000290000104d0660009c000006e20000413d0000000e764000fa000000000556004b0000101a0000c13d000e0000303400e1000006ed0000013d0000000a010000290000000001010433000000000101004b00000000010000190000000002000019000006ed0000c13d00000000010000190000000002000019000e00000000001d0000000b030000290000000003030433000000000431004b000006f30000813d0000000802000029000006fd0000013d000010960220009c0000000002000019000006fd0000a13d00000008423000b9000000080400006b000006fc0000613d00000008542000fa000000000334004b0000101a0000c13d00000000121200d90000000e01200029000000000321004b0000000003000019000000010300403900000001033001900000101a0000c13d000000130300002900000000001304350000000e010000290000000d03000029000000000013043500000005010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000007300000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000400900043d000000000101043b0000077a0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c0000073b0000c13d0000000003000031000000200130008c000000200400003900000000040340190000076a0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000e0000000a001d000d00000005001d3f553f500000040f0000000d090000290000000e0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000007570000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000007530000c13d0000001f06400190000007660000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021af0000613d0000001f01400039000000600110018f0000000009a10019000000000119004b000000000100001900000001010040390000104e0290009c00000f810000213d000000010110019000000f810000c13d000000400090043f000000200130008c000022570000413d00000000010a043300000fd90210009c000022570000213d00001079020000410000000005290436000000000300041400000fd902100197000000040120008c000007850000c13d0000000003000031000000200130008c00000020040000390000000004034019000007b40000013d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000e00000009001d000d00000005001d3f553f500000040f0000000d0a0000290000000e090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000007a10000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000079d0000c13d0000001f06400190000007b00000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020cb0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000002090433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000000120120008c0000000101000039000007d30000613d00000012022000890000000a03000039000000010420019000000000543300a9000000010300603900000000311300a9000000010320008c00000001022002700000000003040019000007cb0000213d0000001302000029000000000302043300000000423100a9000000000403004b000007db0000613d00000000433200d9000000000113004b0000101a0000c13d000000130100002900000000002104350000013601000039000000000101041a0000106403100197000000800410027000000012010000293f55356a0000040f000000140200002900000000002004350000013402000039000000200020043f001300000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000001011000390000001302000029000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000301100039000000000101041a001300130010002d000000130110006b0000000001000019000000010100403900000001011001900000101a0000c13d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000003011000390000001302000029000000000021041b00000007020000290000000102200039000000040120006c000002350000413d000001c00000013d00000ff50420009c000009e00000213d00000ff80120009c00000c3a0000613d00000ff90120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001300100003900000f520000013d000010310420009c00000a070000213d000010340420009c00000c3f0000613d000010350220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000441034f000000000404043b001400000004001d0000104e0440009c000022570000213d001000240020003d000000140200002900000005022002100000001002200029000000000232004b000022570000213d0000002402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b000f00000001001d0000104e0110009c000022570000213d000e00240020003d0000000f0100002900000005011002100000000e01100029000000000131004b000022570000213d000000c001000039000000400010043f0000002001000039000000800010043f0000109a01000041000000a00010043f00000080010000393f5525850000040f00000014020000290000000f0120006c00001dd30000c13d0000000f0100006b00000f700000613d001400000000001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000140200002900000005022002100012000e0020002d00000001030003670000001204300360000000000404043b000000000101043b001300000004001d000000000114004b00001f750000213d001100100020002d0000001101300360000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001302000029000000000021041b00000001010003670000001102100360000000000502043b00000fd90250009c000022570000213d0000001201100360000000000101043b000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c040000413f553f4b0000040f0000000101200190000022570000613d00000014020000290000000102200039001400000002001d0000000f0120006c000008780000413d00000f700000013d000010010120009c00000a160000213d000010040120009c00000c6e0000613d000010050120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000c001000039000000400010043f0000000d01000039000000800010043f0000106701000041000000a00010043f00000080010000393f5525850000040f0000000002000411000000400100043d000000c903000039000000000503041a000010b004500197000000ff0550019000000f5f0000c13d00000001044001bf000000000043041b000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000103000039000010690400004100000f6d0000013d000000000807004b00000a540000c13d000000400100043d00000fda0200004100000a4e0000013d000010420120009c00000c730000613d000010430120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001370100003900000d860000013d000010120120009c00000c810000613d000010130120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013502000039000000000102041a000000800010043f00000000002004350000002002000039000000000301004b00000f720000c13d000000a0010000390000000004020019000010210000013d0000102b0120009c00000c860000613d0000102c0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000003301000039000000000201041a00000fd9052001970000000003000411000000000335004b00000f560000c13d0000006503000039000000000403041a0000105b04400197000000000043041b0000105b02200197000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d0400004100000000060000193f553f4b0000040f0000000101200190000022570000613d00000f700000013d00000ffb0420009c00000c960000613d00000ffc0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b000000000302001900000fd90220009c000022570000213d0000002401100370000000000101043b001400000001001d00000fd90110009c000022570000213d0000000001030019001300000001001d3f5523c70000040f000000130100002900000014020000293f5539890000040f000010460000013d000010370120009c00000cae0000613d000010380120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000000100041100000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000000102004b00000fb20000c13d000000400100043d000010a10200004100000a4e0000013d000010070120009c00000cb30000613d000010080120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000fb0100003900000f520000013d000010200420009c00000cb80000613d000010210220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d3f552efd0000040f000000000200041100000014010000293f552f130000040f000010460000013d00000ff00420009c00000cbd0000613d00000ff10220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013e01000039000000200010043f00000040010000393f553f1c0000040f00000d860000013d0000103d0420009c00000cd60000613d0000103e0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d000000000200041a0000fffe0320019000000fd90000c13d0000014303000039000000000403041a0000105b04400197000000000114019f000000000013041b0000107c0120019700000002011001bf000000000010041b0000000201000039000000800010043f000000000100041400000fd70210009c00000fd701008041000000c001100210000010a4011001c70000800d02000039000000010300003900000fe30400004100000f6d0000013d0000100d0420009c00000cfa0000613d0000100e0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b00000fd90320009c000022570000213d0000002401100370000000000101043b001400000001001d00000fd90110009c000022570000213d00000000002004350000013401000039000000200010043f00000040010000393f553f1c0000040f00000014020000290000000000200435000000200010043f00000040010000393f553f1c0000040f0000000202100039000000000202041a0000000103100039000000000303041a000000000101041a000000800010043f000000a00030043f000000c00020043f000010780100004100003f560001042e000010260120009c00000d820000613d000010270120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013601000039000000000101041a0000106401100197000000800010043f000010470100004100003f560001042e00000ff60420009c00000d8b0000613d00000ff70120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000010460100004100000000001004390000000001000412000000040010044300000040010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000010210008c0000103a0000613d000000020110008c0000104d0000c13d00001062010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000010450000013d000010320420009c00000f140000613d000010330220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d3f5522a60000040f000010460000013d000010020120009c00000f1b0000613d000010030120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001410100003900000d860000013d0000101d0420009c00000f2e0000613d0000101e0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000330100003900000d860000013d00000fed0420009c00000f440000613d00000fee0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000601043b00000fd90160009c000022570000213d0000003301000039000000000101041a00000fd9051001970000000001000411000000000115004b00000f560000c13d0000006501000039000000000201041a0000105b02200197000000000262019f000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000105d040000413f553f4b0000040f0000000101200190000022570000613d00000f700000013d000000400100043d00000fdd02000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f57000104300000000208000039000000a00060043f000000800070043f000000c00080043f000000e00010043f000001000020043f000001600030043f000001200050043f000001400040043f000000000900041a0000ff000a90019000000a9b0000c13d000000ff0a90018f000000ff0aa0008c00000a7f0000613d000000ff019001bf000000000010041b000000ff01000039000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900000fe3040000413f553f4b0000040f0000000101200190000022570000613d000001600300043d000001400400043d000001200500043d000001000200043d000000e00100043d000000c00800043d000000a00600043d000000800700043d0000014000000443000001600070044300000020070000390000018000700443000001a0006004430000004006000039000001c000600443000001e000800443000000600600003900000200006004430000022000100443000000800100003900000240001004430000026000200443000000a0010000390000028000100443000002a000500443000000c001000039000002c000100443000002e000400443000000e0010000390000030000100443000003200030044300000100007004430000000801000039000001200010044300000fe40100004100003f560001042e000000400100043d000000640210003900000fde030000410000000000320435000000440210003900000fdf03000041000000000032043500000024021000390000002703000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f5700010430000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013301000039000000200010043f00000040010000393f553f1c0000040f0000000402100039000000000202041a0000000303100039000000000303041a0000000204100039000000000404041a0000000105100039000000000505041a000000000101041a000000800010043f000000a00050043f000000c00040043f000000e00030043f000000ff012001900000000001000019000000010100c039000001000010043f0000108a0100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d3f5523c70000040f000000000100001900003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000201043b00000fd90120009c000022570000213d0000013501000039000000000101041a000d00000001001d0000104e0110009c00000f810000213d0000000d0100002900000005031002100000003f013000390000104f04100197000010500140009c00000f810000213d0000008001400039000000400010043f0000000d05000029000000800050043f000000000505004b000011a50000c13d00000020020000390000000002210436000000800300043d00000000003204350000004002100039000000000403004b000010310000613d0000000004000019000000800800003900000020088000390000000005080433000000007605043400000fd9066001970000000006620436000000000707043300000fd9077001970000000000760435000000400550003900000000050504330000004006200039000000000056043500000060022000390000000104400039000000000534004b00000aff0000413d000010310000013d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002401100370000000000101043b001300000001001d00000fd90110009c000022570000213d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f000000e00000043f000001000000043f000001200000043f000001400000043f000001600000043f000001800000043f000001a00000043f0000104801000041000001c00010043f0000001301000029000001c40010043f00000000010004140000001402000029000000040320008c000010b80000c13d0000000004000031000000200140008c0000002004008039000010df0000013d0000000001000416000000000101004b000022570000c13d0000000001000412002400000001001d002300e00000003d000080050100003900000044030000390000000004000415000000240440008a00000c900000013d0000000001000416000000000101004b000022570000c13d0000012f0100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000013f0100003900000d860000013d0000000001000416000000000101004b000022570000c13d0000000001000412001800000001001d001700800000003d000080050100003900000044030000390000000004000415000000180440008a00000c7d0000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d0000013701000039000000000201041a0000013901000039000000000101041a0000013803000039000000000303041a0000109004000041000000800040043f00000fd903300197000000840030043f000000a40010043f0000001401000029000000c40010043f000000000100041400000fd902200197000000040320008c00000fe50000c13d0000000003000031000000600130008c000000600400003900000000040340190000100e0000013d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002401100370000000000101043b001300000001001d00000fd90110009c000022570000213d3f552efd0000040f000000140100002900000013020000293f552f130000040f000010460000013d000000240130008c000022570000413d0000000001000416000000000101004b000022570000c13d000000c001000039000000400010043f0000001901000039000000800010043f0000108c01000041000000a00010043f00000080010000393f5525850000040f00000004010000390000000101100367000000000101043b3f552ecf0000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d000000650100003900000d860000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d0000000000100435000001400100003900000f4f0000013d000001440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001210640020019b000010640220009c000022570000213d0000008402100370000000000202043b000010640220009c000022570000213d000000a402100370000000000202043b001100000002001d00000fd90220009c000022570000213d000000c402100370000000000202043b001000000002001d00000fd90220009c000022570000213d000000e402100370000000000202043b000f00000002001d00000fd90220009c000022570000213d0000010401100370000000000101043b000e00000001001d00000fd90110009c000022570000213d00000000010004150000001c0110008a000c000500100218000000000100041a000d00000001001d000bff000010019400001e310000c13d00000000010004150000001b0110008a000c0005001002180000000d01000029000000ff0110019000001e310000c13d0000000d010000290000107c0110019700000101011001bf000d00000000001d000000000010041b000000100200006b00001f720000613d000000140200006b00001f720000613d000000130200006b00001f720000613d0000000e0200006b00001f720000613d00000001020003670000008403200370000000000303043b00001064043001970000006405200370000000000505043b000010640550019800001f870000613d000000000445004b00001f870000813d000000800330021000000012033001af0000013604000039000000000034041b0000013803000039000000000403041a0000105b0440019700000013044001af000000000043041b0000004402200370000000000202043b0000013903000039000000000023041b0000013702000039000000000302041a0000105b0330019700000014033001af000000000032041b0000013b02000039000000000002041b0000014102000039000000000302041a0000105b0330019700000010033001af000000000032041b0000013f02000039000000000302041a0000105b033001970000000f033001af000000000032041b0000014202000039000000000302041a0000105b033001970000000e033001af000000000032041b0000ff000110019000001fd30000c13d000000400100043d00000064021000390000108603000041000000000032043500000044021000390000108703000041000000000032043500000024021000390000002b0300003900000aa40000013d0000000001000416000000000101004b000022570000c13d0000006501000039000000000101041a00000fd9021001970000000001000411000000000212004b00000f870000c13d3f552eb60000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d0000012e0100003900000f520000013d000000640230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000004402100370000000000202043b001300000002001d0000002401100370000000000101043b001200000001001d000000e001000039000000400010043f0000002a01000039000000800010043f0000109e01000041000000a00010043f0000106b01000041000000c00010043f00000080010000393f5525850000040f000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000201043b0000000401200039000000000101041a000000ff01100190000011040000c13d000000400100043d000010a50200004100000a4e0000013d0000000001000416000000000101004b000022570000c13d0000013d0100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000000001000412002200000001001d002100600000003d000080050100003900000044030000390000000004000415000000220440008a000000050440021000001046020000413f553f2d0000040f00000d870000013d0000000001000416000000000101004b000022570000c13d000001430100003900000d860000013d0000000001000416000000000101004b000022570000c13d0000000001000412001e00000001001d001d00000000001d0000800501000039000000440300003900000000040004150000001e0440008a000000050440021000001046020000413f553f2d0000040f000000800010043f000010470100004100003f560001042e000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b000000000302001900000fd90220009c000022570000213d0000002401100370000000000101043b000000000201001900000fd90110009c000022570000213d0000000001030019001400000001001d001300000002001d3f55263a0000040f000000140100002900000013020000293f5528950000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d000001390100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000013c0100003900000f520000013d0000000001000416000000000101004b000022570000c13d000001380100003900000d860000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f00000040010000393f553f1c0000040f000000000101041a000000ff021001900000000002000019000000010200c039000000800020043f0000ff00011001900000000001000019000000010100c039000000a00010043f0000105e0100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b000200000001001d0000104e0110009c000022570000213d000100240020003d000000020100002900000005011002100000000101100029000000000131004b000022570000213d0000013d01000039000000000101041a000000000101004b00000cf60000613d0000013b01000039000000000101041a000000000101004b000012c40000c13d000010a801000041000000800010043f000010a90100004100003f5700010430000000a40230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001200000002001d0000004401100370000000000101043b001100000001001d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f000000e00000043f000001000000043f000001200000043f000001400000043f000001600000043f000001800000043f000001a00000043f000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000301100039000000000101041a001000000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000101041a000000100210006b0000101a0000413d0000001001100069000000c00010043f00000084010000390000000101100367000000000101043b001300000001001d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000130210006c0000001301008029000001000010043f0000001102000029000000120300002900000014040000293f5533a20000040f0000000032010434000001200020043f0000000002030433000001400020043f00000040021000390000000002020433000001600020043f00000060021000390000000002020433000001800020043f00000080011000390000000001010433000001a00010043f00000014010000293f552e180000040f0000107902000041000000400300043d001300000003001d0000000002230436001000000002001d000000000300041400000fd902100197000000040120008c00001deb0000c13d0000000004000031000000200140008c000000200400803900001e190000013d0000000001000416000000000101004b000022570000c13d0000014201000039000000000101041a00000fd901100197000000800010043f000010470100004100003f560001042e000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001410640020019b000010640220009c000022570000213d0000002401100370000000000101043b001300000001001d000010640110009c000022570000213d000000c001000039000000400010043f0000001c01000039000000800010043f0000106501000041000000a00010043f00000080010000393f5525850000040f000000400100043d0000001407000029000000000207004b00001f880000613d0000001303000029000000000237004b00001f880000813d0000013602000039000000000202041a000000000031043500000fd70310009c00000fd7010080410000004001100210000000000300041400000fd70430009c00000fd703008041000000c003300210000000000113019f00000fe2011001c7000010640520019700000080062002700000800d02000039000000040300003900001066040000413f553f4b0000040f0000000101200190000022570000613d0000001301000029000000800110021000000014011001af0000013602000039000000000012041b0000013501000039000000000101041a000f00000001001d000000000101004b000011280000613d000000000200001900000dcd0000013d000000120200002900000001022000390000000f0120006c000011280000813d0000013501000039000000000101041a000000000121004b00001dd60000a13d001200000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001100000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00000e0e0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001400000001001d00000e590000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00000e190000c13d0000000003000031000000200130008c0000002004000039000000000403401900000e480000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001400000009001d001300000005001d3f553f500000040f000000130a00002900000014090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200000e350000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000e310000c13d0000001f0640019000000e440000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001f780000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001400000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001300000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000140100002900000fd9011001970000000405900039001400000001001d000000000015043500000000010004140000001302000029000000040420008c00000e840000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000140100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900000ecc0000013d000e00000005001d000d00000003001d00000fd70390009c00000fd7030000410000000003094019000c00400030021800000fd70310009c00000fd701008041000000c0011002100000000c011001af0000104c011001c7001000000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001eb30000613d00000010030000290000104e0130009c0000000e0200002900000f810000213d000000400030043f0000105901000041000000000013043500000014010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000c011001af0000104c011001c700000013020000293f553f500000040f00000010090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000d0a00002900000eb90000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000eb50000c13d0000001f0640019000000ec80000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001ec20000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d000000140100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001303000029000000000123004b0000101a0000413d000000000123004b00000dc90000613d001000000002001d000000140100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001303000029000000000031041b00000011010000290000000301100039000000000101041a000000000201004b000000000203001900000f080000613d000000100320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d900000f090000013d000000000200001900000011010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b00000dc90000013d0000000001000416000000000101004b000022570000c13d000000c901000039000000000101041a000000ff0110019000000f290000013d0000000001000416000000000101004b000022570000c13d0000000001000412001a00000001001d001900200000003d0000800501000039000000440300003900000000040004150000001a0440008a000000050440021000001046020000413f553f2d0000040f000000000101004b0000000001000019000000010100c039000000800010043f000010470100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d000000c001000039000000400010043f0000000d01000039000000800010043f0000108b01000041000000a00010043f00000080010000393f5525850000040f00000014010000293f552a430000040f000000000100001900003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f00000040010000393f553f1c0000040f000000000101041a000000800010043f000010470100004100003f560001042e00000fe001000041000000800010043f0000002001000039000000840010043f000000a40010043f000010ad01000041000000c40010043f000010a20100004100003f5700010430000000000043041b000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900001068040000413f553f4b0000040f0000000101200190000022570000613d000000000100001900003f560001042e000000a005000039000010520300004100000000040000190000000006050019000000000503041a00000fd905500197000000000556043600000001033000390000000104400039000000000714004b00000f750000413d000000410160008a000010b104100197000010500140009c000010200000a13d000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f570001043000000fe001000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f0000109701000041000000c40010043f0000109801000041000000e40010043f000010990100004100003f57000104300000013001000039000000000601041a0000013101000039000000000501041a000000400100043d0000001302000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000403000039000010ab0400004100000014070000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000013002000039000000000012041b00000014010000290000013102000039000000000012041b000000000100001900003f560001042e001400000002001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000201043b001300000002001d000000140120006c0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d0000001303000029000000140230006a000000000101043b000000000112004b00001b160000813d000000400100043d000010a00200004100000a4e0000013d00000fe001000041000000800010043f0000002001000039000000840010043f0000002e01000039000000a40010043f0000107b01000041000000c40010043f0000107a01000041000000e40010043f000010990100004100003f570001043000000fd70310009c00000fd701008041000000c001100210000010a2011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f000000050640027200000ffb0000613d000000800700003900000005086002100000008008800039000000000901034f000000009a09043c0000000007a70436000000000a87004b00000ff70000c13d000000000705004b0000100a0000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000112b0000613d0000001f01400039000000e00110018f0000008001100039000000400010043f000000600130008c000022570000413d000000c00100043d000000800200043d001300000001001d001200000002001d000000000112004b0000113a0000813d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300000008001400039000000400010043f0000000000210435000000a002400039000000800300043d0000000000320435000000c002400039000000000403004b000010310000613d000000a0040000390000000005000019000000004604043400000fd90660019700000000026204360000000105500039000000000635004b0000102b0000413d000000000212004900000fd70320009c00000fd702008041000000600220021000000fd70310009c00000fd7010080410000004001100210000000000112019f00003f560001042e0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000400200043d000000000012043500000fd70120009c00000fd702008041000000400120021000001061011001c700003f560001042e000010630100004100000000001004350000005101000039000000040010043f0000104c0100004100003f57000104300000009702000039000000000302041a0000105b04300197000000000414019f000000000042041b00000fd902300197000000800020043f000000a00010043f000000000100041400000fd70210009c00000fd701008041000000c001100210000010ae011001c70000800d0200003900000001030000390000107e040000413f553f4b0000040f000000010120019000000f700000c13d000022570000013d0000013f01000039000000000101041a00000fd901100197000000000113004b000011b80000c13d000000130100002900000fd901100197000f00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d001000000002001d000000000101043b000c00000001001d0000000401100039000e00000001001d000000000101041a000d00000001001d000000ff0110019000001b0e0000c13d000010710100004100000010020000290000000001120436000b00000001001d00000004012000390000000f02000029000000000021043500000000010004140000001402000029000000040220008c00001d8c0000c13d0000000004000031000000200140008c000000200400803900001dbb0000013d001400000002001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d0000001303000029000000140230006a000000000301043b000000000123004b00000000010000190000000001232049000010460000013d00000fd70310009c00000fd701008041000000c00110021000001049011001c73f553f500000040f000001c0090000390000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000010cc0000613d000000000701034f000000007807043c0000000009890436000001e00890008c000010c80000c13d000000000705004b000010db0000613d0000000506600210000000000761034f0000000305500210000001c006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000011c60000613d0000001f01400039000000600110018f000001c002100039001200000002001d000000400020043f000000200240008c000022570000413d000001c00200043d001000000002001d0000104a0200004100000012050000290000000002250436001100000002001d00000000040004140000001402000029000000040320008c000011d60000c13d0000000002150019001100000002001d000000400020043f00000012020000290000000002020433001200000002001d0000104b0200004100000011040000290000000002240436000f00000002001d00000004024001bf0000001303000029000000000032043500000000020004140000001403000029000000040330008c00001a850000c13d0000000001410019000000400010043f00001ab60000013d0000001401000029001100000002001d3f5523c70000040f0000001101000029000000000601041a0000000101100039001000000001001d000000000701041a000000400100043d0000002002100039000000130300002900000000003204350000001202000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d0200003900000004030000390000109f0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000012010000290000001102000029000000000012041b00000013010000290000001002000029000000000012041b3f552dfd0000040f000000000100001900003f560001042e000000400200043d0000001f0430018f00000005053002720000000505500210000011370000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000011330000c13d000000000604004b00001d770000613d00001d6b0000013d0000104601000041000000000010043900000000010004120000000400100443000000a0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001100000001001d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a001000000001001d0000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400400043d000010a30240009c00000f810000213d0000001203000029000000130230006a000000000101043b0000004003400039000000400030043f000000000101041a0000ff00031001900000000003000019000000010300c0390000002005400039001300000005001d0000000000350435000000ff011001900000000003000019000000010300c039000000000034043500001e510000613d000000110420006b00001e510000a13d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000001041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000000001010433000000000101004b00000f400000613d00000014010000293f5529a40000040f000000000100001900003f560001042e000010510440009c00000f810000213d00000000040000190000006005100039000000400050043f00000040051000390000000000050435000000200510003900000000000504350000000000010435000000a00540003900000000001504350000002004400039000000000134004b00001b1c0000813d000000400100043d0000105a0510009c000011a80000a13d00000f810000013d0000014301000039000000000201041a000000400900043d0000106c01000041000000000019043500000004019000390000000000310435000000000100041400000fd902200197000000040320008c000019f50000c13d0000000201000367000000000300003100001a080000013d000000400200043d0000001f0430018f0000000505300272000011d20000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000011ce0000c13d000000000604004b00001d770000613d000000050550021000001d6b0000013d000000400150021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000110a000029000011ed0000613d000000000701034f0000001208000029000000007907043c00000000089804360000000009a8004b000011e90000c13d000000000705004b000011fc0000613d0000000506600210000000000761034f00000012066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001aff0000613d0000001f01400039000000600110018f0000001202100029001100000002001d000000400020043f000000200230008c000010f30000813d000022570000013d000000110100006b00000f700000613d001400000000001d000012110000013d00000014020000290000000102200039001400000002001d000000110120006c00000f700000813d000000140100002900000005011002100000001001100029001200000001001d0000000101100367000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000012020000290000000102200367000000000302043b000000000101043b000000000101041a000000ff02100190001300000003001d000012600000613d0000ff0001100190000012600000c13d00000fd90130009c000022570000213d00000000003004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000010b20220019700000100022001bf000000000021041b0000012e03000039000000000103041a000010af0210009c0000101a0000613d0000000102100039000000000023041b0000012f02000039000000000202041a000000000302004b0000101a0000613d000000010220008a0000012f03000039000000000023041b0000013102000039000000000202041a000000000121004b0000017e0000813d000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000002030000390000108f040000413f553f4b0000040f00000001012001900000120c0000c13d000022570000013d00000fd90130009c000022570000213d00000000003004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000000ff03200190000009580000c13d0000107c0220019700000101022001bf000000000021041b0000012e03000039000000000103041a000010af0210009c0000101a0000613d0000000102100039000000000023041b0000013102000039000000000202041a000000000121004b0000017e0000813d0000013001000039000000000101041a0000012f02000039000000000202041a000000000112004b0000017e0000213d0000013c01000039000000000101041a000000000101004b000012ab0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013030000290000000102200190000022570000613d000000000101043b0000000000300435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d0000000102000039000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e040000413f553f4b0000040f0000000101200190000022570000613d00000012010000290000000101100367000000000101043b00000fd90210009c000022570000213d3f552bd60000040f0000120c0000013d000000020100006b00000f700000613d000400000000001d000012cd0000013d00000004020000290000000102200039000400000002001d000000020120006c00000f700000813d0000000401000029000000050110021000000001011000290000000101100367000000000101043b001300000001001d00000fd90110009c000022570000213d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff011001900000219d0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000012c80000c13d0000013501000039000000000101041a000800000001001d000000000101004b000019c10000613d0000000002000019000013140000013d000000000101043b00000001011000390000001202000029000000000021041b00000010020000290000000102200039000000080120006c000019c10000813d0000013501000039000000000101041a000000000121004b00001dd60000a13d001000000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000401100039000000000101041a000000ff01100190000015180000613d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000015180000613d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000f00000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000013780000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001200000001001d000013c30000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c000013830000c13d0000000003000031000000200130008c00000020040000390000000004034019000013b20000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001200000009001d001100000005001d3f553f500000040f000000110a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000139f0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000139b0000c13d0000001f06400190000013ae0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021be0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001100000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000120100002900000fd9011001970000000405900039001200000001001d000000000015043500000000010004140000001102000029000000040420008c000013ee0000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000120100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000014360000013d000d00000005001d000c00000003001d00000fd70390009c00000fd7030000410000000003094019000b00400030021800000fd70310009c00000fd701008041000000c0011002100000000b011001af0000104c011001c7000e00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020da0000613d0000000e030000290000104e0130009c0000000d0200002900000f810000213d000000400030043f0000105901000041000000000013043500000012010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000b011001af0000104c011001c700000011020000293f553f500000040f0000000e090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000c0a000029000014230000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000141f0000c13d0000001f06400190000014320000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020e90000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001100000001001d000000120100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001103000029000000000123004b0000101a0000413d000000000123004b0000147d0000613d000e00000002001d000000120100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001103000029000000000031041b0000000f010000290000000301100039000000000101041a000000000201004b0000000002030019000014720000613d0000000e0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d9000014730000013d00000000020000190000000f010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d0000105a0320009c00000f810000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a001100000004001d000000000034043500000040022000390000000201100039000000000101041a001200000002001d0000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000012020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b0000101a0000413d00000011030000290000000003030433000000000421004900000000564300a9000000000121004b000014c50000613d00000000214600d9000000000131004b0000101a0000c13d000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039001200000006001d3f553f500000040f00000012030000290012104d303001320000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000301041a0000001202300029000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000201100039000000000101041a001200000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000002011000390000001202000029000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000e00000001001d0000000401100039000000000101041a000000ff01100190000013100000613d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000013100000613d0000013701000039000000000201041a0000013801000039000000000101041a0000013903000039000000000303041a000000400a00043d0000004404a00039000000130500002900000000005404350000002404a000390000000000340435000010900300004100000000003a043500000fd9011001970000000403a000390000000000130435000000000100041400000fd902200197000000040320008c000015560000c13d0000000003000031000000600130008c00000060040000390000000004034019000015840000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700120000000a001d3f553f500000040f000000120a0000290000000003010019000000600330027000000fd703300197000000600430008c0000006004000039000000000403401900000005054002720000000505500210000015720000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b0000156e0000c13d0000001f06400190000015800000613d000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020f80000613d0000001f01400039000000e00210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000600130008c000022570000413d00000000020a04330000004001a000390000000001010433001200000002001d001100000001001d000000000112004b0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000301043b000000400900043d0000104801000041000000000519043600000004019000390000001302000029000000000021043500000011020000290000001201200069000000000213004b0000000003018019001100000003001d00000000010004140000001402000029000000040320008c000015bc0000c13d0000000003000031000000200130008c00000020040000390000000004034019000015eb0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7001200000009001d000f00000005001d3f553f500000040f0000000f0a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000015d80000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000015d40000c13d0000001f06400190000015e70000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021070000613d0000001f01400039000000600110018f000000000a91001900000000021a004b000000000200001900000001020040390000104e04a0009c00000f810000213d000000010220019000000f810000c13d0000004000a0043f000000200230008c000022570000413d0000000002090433000700000002001d0000104a0200004100000000062a043600000000050004140000001402000029000000040420008c000016310000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f00000fdb011001c700120000000a001d000f00000006001d3f553f500000040f0000000f09000029000000120a0000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000161c0000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000016180000c13d0000001f064001900000162b0000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021160000613d0000001f01400039000000600110018f000000000ba100190000104e02b0009c00000f810000213d0000004000b0043f000000200230008c000022570000413d00000000060a04330000104b0200004100000000072b04360000000402b000390000001304000029000000000042043500000000050004140000001402000029000000040420008c000016740000613d000d00000006001d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700120000000b001d000f00000007001d3f553f500000040f0000000f09000029000000120b0000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000165e0000613d000000000601034f00000000070b0019000000006806043c0000000007870436000000000897004b0000165a0000c13d0000001f064001900000166d0000613d0000000505500210000000000751034f00000000055b00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021250000613d0000001f01400039000000600110018f0000000d060000290000000009b100190000104e0290009c00000f810000213d000000400090043f000000200230008c000022570000413d00000000020b043300090000406200ad000000000406004b000016810000613d00000009546000f9000000000224004b0000101a0000c13d0000013702000039000000000202041a000010910400004100000000064904360000000904000029000f104d40400132000000000400041400000fd902200197000000040520008c000016bc0000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7001200000009001d000d00000006001d3f553f500000040f0000000d0a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000016a70000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000016a30000c13d0000001f06400190000016b60000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021340000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d00000fd90110009c000022570000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000d00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d0000109201000041000000000014043500000004014000390000001202000029000000000021043500000000010004140000000d02000029000000040320008c000016f60000613d00000fd70340009c00000fd7030000410000000003044019001200000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000012040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000021430000613d0000104e0140009c00000f810000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000c00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d00001093010000410000000001140436000d00000001001d00000004014000390000001402000029000000000021043500000000010004140000000c02000029000000040320008c001200000004001d0000172a0000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000012040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000021520000613d0000104e0140009c00000f810000213d0000001201000029000000400010043f0000106e0110009c00000f810000213d0000001202000029000000a001200039000000400010043f0000008001200039000b00000001001d00000000000104350000006001200039000a00000001001d00000000000104350000004004200039000000000004043500000000000204350000000d0100002900000000000104350000013701000039000000000201041a000000400a00043d000010910100004100000000051a0436000000000100041400000fd902200197000000040320008c000500000004001d0000174d0000c13d0000000003000031000000200130008c000000200400003900000000040340190000177c0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c7000c0000000a001d000600000005001d3f553f500000040f00000006090000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000017690000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000017650000c13d0000001f06400190000017780000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021610000613d0000001f01400039000000600110018f0000000009a10019000000000219004b000000000200001900000001020040390000104e0490009c00000f810000213d000000010220019000000f810000c13d000000400090043f000000200230008c000022570000413d00000000020a043300000fd90420009c000022570000213d0000014204000039000000000404041a0000109405000041000000000659043600000004059000390000000000250435000000000500041400000fd902400197000000040420008c000600000002001d000017c80000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c7000c00000009001d000300000006001d3f553f500000040f000000030a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000017b30000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000017af0000c13d0000001f06400190000017c20000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021700000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433000c00000001001d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000201041a00000011312000b9000000110300006b0000000c05000029000017e70000613d00000011431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b000017ee0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000b020000290000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a00000011312000b9000000110300006b0000000c05000029000018070000613d00000011431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000180e0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000a020000290000000000120435000000400900043d0000109501000041000000000519043600000004019000390000001402000029000000000021043500000000010004140000000602000029000000040320008c000018200000c13d0000000003000031000000200130008c000000200400003900000000040340190000184f0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000c00000009001d000600000005001d3f553f500000040f000000060a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000183c0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000018380000c13d0000001f064001900000184b0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000217f0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433000000000201004b000018780000613d0000000f241000b900000000321400d90000000f0220006c0000101a0000c13d00000007321000b900000000311200d90000104d5340012a000000070110006c0000101a0000c13d0000104d5120012a0000000a050000290000000005050433000000000653004b000018810000413d000010960440009c000018800000a13d0000000f645000b900000009060000290000104d0660009c000018760000413d0000000f764000fa000000000556004b0000101a0000c13d000f0000303400e1000018810000013d0000000a010000290000000001010433000000000101004b00000000010000190000000002000019000018810000c13d00000000010000190000000002000019000f00000000001d0000000b030000290000000003030433000000000431004b000018870000813d0000000702000029000018910000013d000010960220009c0000000002000019000018910000a13d00000007423000b9000000070400006b000018900000613d00000007542000fa000000000334004b0000101a0000c13d00000000121200d90000000f01200029000000000321004b0000000003000019000000010300403900000001033001900000101a0000c13d000000120300002900000000001304350000000f010000290000000d03000029000000000013043500000005010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000018c40000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000400900043d000000000101043b0000190e0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c000018cf0000c13d0000000003000031000000200130008c00000020040000390000000004034019000018fe0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000f0000000a001d000d00000005001d3f553f500000040f0000000d090000290000000f0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000018eb0000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000018e70000c13d0000001f06400190000018fa0000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021cd0000613d0000001f01400039000000600110018f0000000009a10019000000000119004b000000000100001900000001010040390000104e0290009c00000f810000213d000000010110019000000f810000c13d000000400090043f000000200130008c000022570000413d00000000010a043300000fd90210009c000022570000213d00001079020000410000000005290436000000000300041400000fd902100197000000040120008c000019190000c13d0000000003000031000000200130008c00000020040000390000000004034019000019480000013d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000f00000009001d000d00000005001d3f553f500000040f0000000d0a0000290000000f090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000019350000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000019310000c13d0000001f06400190000019440000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000218e0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000002090433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000000120120008c0000000101000039000019670000613d00000012022000890000000a03000039000000010420019000000000543300a9000000010300603900000000311300a9000000010320008c000000010220027000000000030400190000195f0000213d0000001202000029000000000302043300000000423100a9000000000403004b0000196f0000613d00000000433200d9000000000113004b0000101a0000c13d000000120100002900000000002104350000013601000039000000000101041a0000106403100197000000800410027000000011010000293f55356a0000040f0000000e020000290000000302200039000f00000002001d000000000202041a001100000002001d000000140200002900000000002004350000013402000039000000200020043f001200000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000101041a0000001103000029000000000213004b0000101a0000413d00000000021300490000001201200029000000000221004b0000000002000019000000010200403900000001022001900000101a0000c13d0000000f02000029000000000012041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000130c0000c13d000022570000013d0000013d01000039000000000101041a000000000201004b0000101a0000613d000000010110008a0000013d02000039000000000012041b0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d020000390000000203000039000010a60400004100000013050000293f553f4b0000040f0000000101200190000012c80000c13d000022570000013d00000fd70390009c001000000009001d00000fd7030000410000000003094019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f0000104c011001c73f553f500000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001d5d0000613d00000010090000290000001f0230018f000000050430027200001a130000613d00000005054002100000000005590019000000000601034f0000000007090019000000006806043c0000000007870436000000000857004b00001a0f0000c13d000000000502004b00001a220000613d0000000504400210000000000141034f00000000044900190000000302200210000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f00000000001404350000001f01300039000010b10210019700000000060900190000000001920019000000000221004b000000000200001900000001020040390000104e0510009c00000f810000213d000000010220019000000f810000c13d000000400010043f0000106d0230009c000022570000213d000000200230008c000022570000413d00000000020604330000104e0520009c000022570000213d00000000050600190000000006530019000000000252001900000000032600490000106d0530009c000022570000213d000000a00330008c000022570000413d0000106e0310009c00000f810000213d000000a003100039000000400030043f00000000570204340000104e0870009c000022570000213d00000000072700190000001f08700039000000000968004b00000000090000190000106f090080410000106f088001970000106f0a600197000000000ba8013f0000000008a8004b00000000080000190000106f080040410000106f0ab0009c000000000809c019000000000808004b000022570000c13d00000000870704340000104e0970009c00000f810000213d0000001f09700039000010b1099001970000003f09900039000010b10490019700000000043400190000104e0940009c00000f810000213d000000400040043f00000000007304350000000004870019000000000464004b000022570000213d000000c004100039000000000607004b00001a6d0000613d00000000060000190000000009460019000000000a860019000000000a0a04330000000000a904350000002006600039000000000976004b00001a660000413d000000000447001900000000000404350000000003310436000000000405043300000fd90540009c000022570000213d00000000004304350000004003200039000000000303043300000fd90430009c000022570000213d0000004004100039000000000034043500000060042000390000000004040433000000600510003900000000004504350000008001100039000000800220003900000000020204330000000000210435000000140130006c000001200000c13d0000106c0000013d000000400140021000000fd70320009c00000fd702008041000000c002200210000000000121019f0000104c011001c700000014020000293f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000000f0a00002900001a9d0000613d000000000701034f0000001108000029000000007907043c00000000089804360000000009a8004b00001a990000c13d000000000705004b00001aac0000613d0000000506600210000000000761034f00000011066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001d7d0000613d0000001f01400039000000600110018f0000001101100029000000400010043f000000200130008c000022570000413d0000001101000029000000000201043300000012010000293f5522980000040f000000140200002900000000002004350000013402000039000000200020043f001200000001001d00000040010000393f553f1c0000040f00000013020000290000000000200435000000200010043f00000040010000393f553f1c0000040f0000000101100039000000000101041a000000e00010043f000000140100002900000000001004350000013301000039000000200010043f00000040010000393f553f1c0000040f0000000301100039000000000101041a000000c00010043f00000013010000293f5529180000040f3f55338c0000040f00000012020000290000104d2320012a001300000003001d000001000010043f000000100200002900000014040000293f5533a20000040f0000000032010434000001200020043f0000000004030433000001400040043f00000040021000390000000005020433000001600050043f00000060021000390000000002020433000001800020043f00000080011000390000000001010433000001a00010043f000000c00700043d000000e00600043d0000001401000029000000130200002900000010030000293f55381e0000040f000000a00020043f000000800010043f000000400100043d001400000001001d00000080020000393f5522720000040f0000001403000029000000000131004900000fd70210009c00000fd701008041000000600110021000000fd70230009c00000fd7030080410000004002300210000000000121019f00003f560001042e000000400200043d0000001f0430018f0000000505300272000000050550021000001b0b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001b070000c13d000000000604004b00001d770000613d00001d6b0000013d00001070010000410000001002000029000000000012043500000fd70120009c00000fd702008041000000400120021000000fdb011001c700003f570001043000000000010004113f552b660000040f00000000010004113f552bd60000040f000000000100001900003f560001042e00110fd90020019b00000000030000190000013501000039000000000101041a000000000131004b00001dd60000a13d000f00000003001d0000105201300041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001000000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00001b5f0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d00001baa0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00001b6a0000c13d0000000003000031000000200130008c0000002004000039000000000403401900001b990000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001300000009001d001200000005001d3f553f500000040f000000120a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200001b860000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001b820000c13d0000001f0640019000001b950000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001ff90000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001200000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000130100002900000fd9011001970000000405900039001300000001001d000000000015043500000000010004140000001202000029000000040420008c00001bd50000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000130100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900001c1d0000013d000c00000005001d000b00000003001d00000fd70390009c00000fd7030000410000000003094019000a00400030021800000fd70310009c00000fd701008041000000c0011002100000000a011001af0000104c011001c7000e00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001f8a0000613d0000000e030000290000104e0130009c0000000c0200002900000f810000213d000000400030043f0000105901000041000000000013043500000013010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000a011001af0000104c011001c700000012020000293f553f500000040f0000000e090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000b0a00002900001c0a0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001c060000c13d0000001f0640019000001c190000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001f990000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001203000029000000000123004b0000101a0000413d000000000123004b00001c640000613d000e00000002001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001203000029000000000031041b00000010010000290000000301100039000000000101041a000000000201004b000000000203001900001c590000613d0000000e0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d900001c5a0000013d000000000200001900000010010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d0000105a0320009c00000f810000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a001200000004001d000000000034043500000040022000390000000201100039000000000101041a001300000002001d0000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000013020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b0000101a0000413d00000012030000290000000003030433000000000421004900000000564300a9000000000121004b00001cac0000613d00000000214600d9000000000131004b0000101a0000c13d000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039001300000006001d3f553f500000040f00000013030000290013104d303001320000000102200190000022570000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a001200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00001cf10000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00001d3b0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00001cfc0000c13d0000000003000031000000200130008c0000002004000039000000000403401900001d2b0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001000000009001d000e00000005001d3f553f500000040f0000000e0a00002900000010090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200001d180000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001d140000c13d0000001f0640019000001d270000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020080000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d000000000109043300000fd90210009c000022570000213d00000012040000290000001303400029000000000243004b0000000002000019000000010200403900000001022001900000101a0000c13d000000400200043d0000105a0420009c00000f810000213d0000006004200039000000400040043f0000004004200039000000000034043500000fd9011001970000002003200039000000000013043500000014010000290000000000120435000000800100043d0000000f03000029000000000131004b00001dd60000a13d0000000501300210000000a0011000390000000000210435000000800100043d000000000131004b00001dd60000a13d00000001033000390000000d0130006c00001b1e0000413d000000400100043d00000af60000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001d690000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001d650000c13d000000000604004b00001d770000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000000400200043d0000001f0430018f000000050530027200001d890000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001d850000c13d000000000604004b00001d770000613d000011d40000013d000000100300002900000fd70230009c00000fd7020000410000000002034019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c700000014020000293f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000000b0a00002900001da80000613d000000000701034f0000001008000029000000007907043c00000000089804360000000009a8004b00001da40000c13d000000000705004b00001db70000613d0000000506600210000000000761034f00000010066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001ddc0000613d0000001f01400039000000600210018f0000001001200029000000000221004b000000000200001900000001020040390000104e0310009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200240008c000022570000413d00000010020000290000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000022570000c13d000000000202004b00001ed10000c13d000010760200004100000a4e0000013d000000400100043d0000109b0200004100000a4e0000013d000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f000000050530027200001de80000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001de40000c13d000000000604004b00001d770000613d000011d40000013d000000130400002900000fd70140009c00000fd7010000410000000001044019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000100a00002900001e060000613d000000000701034f0000001308000029000000007907043c00000000089804360000000009a8004b00001e020000c13d000000000705004b00001e150000613d0000000506600210000000000761034f00000013066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001e6e0000613d0000001f01400039000000600210018f0000001301200029000000000221004b000000000200001900000001020040390000104e0310009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200140008c000022570000413d00000013010000290000000002010433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000001200100043d000000120320008c00001fa80000c13d000000010300003900001fb30000013d0000105601000041000000000010043900000000010004100000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b00001f370000c13d0000000d01000029000000ff0110018f000000010110008c000000000100001900000001010060390000000c020000290000000502200270000000000201001f00001f3a0000c13d0000000b0100006b00000be80000613d000001000100008a0000000d0110017f000d00010000003d00000001011001bf00000bec0000013d000000110420006b0000000004030019000000010440a1bf000000010440019000001e7d0000c13d000000100400006b00001e7d0000613d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000001041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400001f670000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001e7a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001e760000c13d000000000604004b00001d770000613d00001d6b0000013d000000110220006b00000000020000190000000102002039000000100400006b0000000004020019000000010440c1bf000000000334019f000000010330019000001f440000613d000000000101004b00000001022061bf000000010120019000000f700000c13d00000014010000293f5529a40000040f000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001300000001001d000000000101041a000000000101004b00000f700000c13d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b0000001302000029000000000012041b000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400001f670000013d000000400200043d0000001f0430018f000000050530027200001ebf0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001ebb0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f000000050530027200001ece0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001eca0000c13d000000000604004b00001d770000613d000011d40000013d0000000c030000290000000201300039000000000001041b0000001101000029000000000013041b00000001013000390000001202000029000000000021041b0000000301300039000000000001041b000001000100008a0000000d0110017f00000001011001bf0000000e02000029000000000012041b00000013010000293f552e180000040f00000fd901100197001300000001001d00000000001004350000013e01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a00000fd90110019800001fd00000c13d000000130100002900000000001004350000013e01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000105b022001970000000f022001af000000000021041b0000013501000039000000000201041a0000104e0320009c00000f810000213d0000000103200039000000000031041b00000000001004350000105202200041000000000302041a0000105b033001970000000f033001af000000000032041b0000013b02000039000000000302041a000010af0430009c0000101a0000613d0000000103300039000000000032041b0000012e02000039000000000202041a0000012f03000039000000000303041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d0000013c03000039000000000023041b0000013d03000039000000000023041b000000400200043d000000fb03000039000000000303041a000000000101041a000000000431004b000022410000a13d00000024042000390000000000140435000010740100004100000000001204350000000401200039000000000031043500000fd70120009c00000fd702008041000000400120021000001075011001c700003f57000104300000000c010000290000000501100270000000000100001f000000400100043d00000064021000390000107a03000041000000000032043500000044021000390000107b03000041000000000032043500000024021000390000002e0300003900000aa40000013d000000140100002900000000001004350000013201000039000000200010043f0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001302000029000000000021041b000000400100043d000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c04000041000000140500002900000f6d0000013d000000000001042f000000400100043d000010890200004100000a4e0000013d000000400100043d0000109d0200004100000a4e0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001f840000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001f800000c13d000000000604004b00001d770000613d00001d6b0000013d000000400100043d000010880200004100000a4e0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001f960000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001f920000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001fa50000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001fa10000c13d000000000604004b00001d770000613d00001d6b0000013d0000000a0400003900000001030000390000001202200089000000010520019000000000654400a9000000010400603900000000433400a9000000010420008c0000000102200270000000000405001900001fab0000213d00000000421300a9000000000401004b00001fb90000613d00000000411200d9000000000131004b0000101a0000c13d000001200020043f0000013601000039000000000401041a000001000100043d000010640340019700000080044002703f55356a0000040f0000000006010019000000e00060043f000000c00100043d0000000007610019000000000117004b0000000001000019000000010100403900000001011001900000101a0000c13d000000c00070043f000001600500043d000001400400043d00000014010000290000001202000029000000110300002900001aee0000013d000000400100043d000010720200004100000a4e0000013d0000006501000039000000000201041a0000105b02200197000000000021041b000000000100041100000fd9061001970000003301000039000000000201041a0000105b03200197000000000363019f000000000031041b000000000100041400000fd90520019700000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d040000413f553f4b0000040f0000000101200190000022570000613d000000000100041a0000ff000110019000000c240000613d000000400100043d000000110200006b000021dc0000c13d0000006402100039000010840300004100000000003204350000004402100039000010850300004100000000003204350000002402100039000000250300003900000aa40000013d000000400200043d0000001f0430018f00000005053002720000000505500210000020050000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020010000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000020140000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020100000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000020230000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000201f0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020320000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000202e0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020410000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000203d0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020500000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000204c0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000205f0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000205b0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000206e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000206a0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000207d0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020790000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000208c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020880000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000209b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020970000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020aa0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020a60000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020b90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020b50000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020c80000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020c40000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020d70000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020d30000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020e60000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020e20000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020f50000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020f10000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021040000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021000000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021130000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000210f0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021220000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000211e0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021310000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000212d0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021400000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000213c0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000214f0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000214b0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000215e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000215a0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000216d0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021690000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000217c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021780000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000218b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021870000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000219a0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021960000c13d000000000604004b00001d770000613d000011d40000013d000000400100043d000010a70200004100000a4e0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000021ac0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021a80000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000021bb0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021b70000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000021ca0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021c60000c13d000000000604004b000011d40000c13d00001d770000013d000000400200043d0000001f0430018f0000000505300272000021d90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021d50000c13d000000000604004b00001d770000613d000011d40000013d0000009702000039000000000302041a0000105b043001970000001105000029000000000454019f000000000042041b0000002002100039000000000052043500000fd902300197000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d0200003900000001030000390000107e040000413f553f4b0000040f0000000101200190000022570000613d000000c902000039000000000102041a000010b001100197000000000012041b000000400100043d000000fb03000039000000000203041a00000124040000390000000104400367000000000404043b000000000542004b000022590000813d000000000043041b00000020031000390000000000430435000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d02000039000000010300003900001081040000413f553f4b0000040f0000000101200190000022570000613d000000400100043d000000c902000039000000000202041a000000ff03200190000022620000c13d000010b00220019700000001022001bf000000c903000039000000000023041b0000000002000411000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900001069040000413f553f4b0000040f0000000101200190000022570000613d0000000d0100006b00000f700000c13d000000000200041a000010b201200197000000000010041b000000400100043d0000000103000039000000000031043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70420009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000009ab0000013d0000002001200039000000120300002900000000003104350000001101000029000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d020000390000000303000039000010730400004100000014050000290000000f060000293f553f4b0000040f000000010120019000000f700000c13d000000000100001900003f570001043000000064021000390000107f0300004100000000003204350000004402100039000010800300004100000000003204350000002402100039000000220300003900000aa40000013d00000044021000390000108203000041000000000032043500000024021000390000001003000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f57000104300000000043020434000000000331043600000000040404330000000000430435000000400320003900000000030304330000004004100039000000000034043500000060032000390000000003030433000000600410003900000000003404350000008003200039000000000303043300000080041000390000000000340435000000a0032000390000000003030433000000a0041000390000000000340435000000c0032000390000000003030433000000c0041000390000000000340435000000e0032000390000000003030433000000e0041000390000000000340435000001000320003900000000030304330000010004100039000000000034043500000120022000390000000002020433000001200310003900000000002304350000014001100039000000000001042d000000000301001900000000413200a9000000000403004b0000229f0000613d00000000433100d9000000000223004b000022a00000c13d000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300003000000000002000300000001001d0000014101000039000000000101041a000200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000030300002900000fd903300197000000020400002900000fd9054001970000000102200190000023880000613d000000000101043b00000fd901100197000000000113004b000022d60000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000300000005001d3f553f500000040f00000003050000290000000102200190000023880000613d000000400a00043d000000000101043b000023240000013d000000400b00043d000010550100004100000000061b04360000000001000414000000040230008c000022e10000c13d0000000003000031000000200130008c00000020040000390000000004034019000023140000013d000300000005001d00000fd702b0009c00000fd70200004100000000020b4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900020000000b001d000100000006001d3f553f500000040f000000010a000029000000020b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000023000000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000022fc0000c13d000000000705004b0000230f0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000023a70000613d00000003050000290000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c0000238b0000213d00000001011001900000238b0000c13d0000004000a0043f0000001f0130008c000023890000a13d00000000010b043300000fd90210009c000023890000213d000010b30200004100000000042a043600000fd9011001970000000402a0003900000000001204350000000001000414000000040250008c000023310000c13d0000000003000031000000200130008c00000020040000390000000004034019000023620000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c7000000000205001900030000000a001d000200000004001d3f553f500000040f000000020b000029000000030a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000234f0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b0000234b0000c13d000000000705004b0000235e0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000023970000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c0000238b0000213d00000001022001900000238b0000c13d000000400010043f000000200130008c000023890000413d00000000010a0433000300000001001d00001046010000410000000000100439000000000100041200000004001004430000002400000443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000023880000613d000000000201043b000000030400002900000000314200a9000000000302004b000023870000613d00000000322100d9000000000242004b000023910000c13d000000000001042d000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000023a30000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000239f0000c13d000000000604004b000023c10000613d0000000505500210000023b50000013d000000400200043d0000001f0430018f00000005053002720000000505500210000023b30000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000023af0000c13d000000000604004b000023c10000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000700000000000200000fd901100197000700000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff011001900000251a0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000250d0000613d000000000101043b00000fd9011001970000000702000029000000000112004b000024020000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000250d0000613d000000000101043b000700000001001d0000244e0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c0000240d0000c13d0000000003000031000000200130008c000000200400003900000000040340190000243d0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700070000000a001d000600000005001d3f553f500000040f000000060b000029000000070a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000242a0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000024260000c13d000000000705004b000024390000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000025530000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c0000250e0000213d00000001022001900000250e0000c13d000000400010043f000000200130008c0000250b0000413d00000000010a0433000700000001001d00000fd90110009c0000250b0000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000600000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f00000001022001900000250d0000613d000000000101043b000000000101004b0000250b0000613d000000400a00043d000010580100004100000000031a0436000000070100002900000fd9011001970000000405a00039000700000001001d000000000015043500000000010004140000000602000029000000040420008c000024790000c13d0000104e01a0009c0000250e0000213d0000004000a0043f000010590100004100000000001a0435000000070100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000024c20000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000025220000613d00000004030000290000104e0130009c00000003020000290000250e0000213d000000400030043f0000105901000041000000000013043500000007010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000006020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b000029000024af0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000024ab0000c13d000000000705004b000024be0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000025320000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c0000250e0000213d000000400010043f000000200130008c0000250b0000413d00000000010a0433000600000001001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b000000000201041a0000000603000029000000000123004b000025140000413d000000000123004b000024e10000c13d000000000001042d000400000002001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b0000000603000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b0000000002030019000024ff0000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000025140000c13d00000000121200d9000025000000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000025140000c13d000000000021041b000000000001042d000000000100001900003f5700010430000000000001042f000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f00000005053002720000252e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000252a0000c13d000000000604004b0000256d0000613d0000000505500210000025610000013d000000400200043d0000001f0430018f00000005053002720000253e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000253a0000c13d000000000604004b0000254d0000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000400200043d0000001f0430018f000000050530027200000005055002100000255f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000255b0000c13d000000000604004b0000256d0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f570001043000000000430104340000000001320436000000000203004b0000257f0000613d000000000200001900000000051200190000000006240019000000000606043300000000006504350000002002200039000000000532004b000025780000413d000000000213001900000000000204350000001f02300039000010b1022001970000000001210019000000000001042d000300000000000200000000080100190000009701000039000000000201041a000000400a00043d0000002401a0003900000040030000390000000000310435000010b401000041000000000b1a04360000000401a00039000000000900041100000000009104350000004404a00039000000003108043400000000001404350000006404a0003900000fd902200197000000000501004b000025a10000613d000000000500001900000000064500190000000007530019000000000707043300000000007604350000002005500039000000000615004b0000259a0000413d000000000341001900000000000304350000000003000414000000040420008c000025ab0000c13d0000000003000031000000200130008c00000020040000390000000004034019000025e40000013d000100000008001d0000001f01100039000010b101100197000000640110003900000fd70410009c00000fd701008041000000600110021000000fd704a0009c00000fd70400004100000000040a40190000004004400210000000000141019f00000fd70430009c00000fd703008041000000c003300210000000000113019f00030000000a001d00020000000b001d3f553f500000040f000000020b000029000000030a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000025cf0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000025cb0000c13d000000000705004b000025de0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000000000090004110000261a0000613d00000001080000290000001f01400039000000600110018f0000000004a10019000000000114004b000000000100001900000001010040390000104e0240009c000025fc0000213d0000000101100190000025fc0000c13d000000400040043f0000001f0130008c000025fa0000a13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b000025fa0000c13d000000000101004b000026020000613d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000440140003900000060020000390000000000210435000000240140003900000000020004100000000000210435000010b50100004100000000001404350000000401400039000000000091043500000064024000390000000001080019000300000004001d3f5525730000040f0000000303000029000000000131004900000fd70210009c00000fd70100804100000fd70230009c00000fd70300804100000060011002100000004002300210000000000121019f00003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000026260000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000026220000c13d000000000604004b000026340000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300009000000000002000800000001001d00000fd901200197000900000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000401100039000000000101041a000000ff011001900000269b0000613d000000080100002900000fd901100197000800000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000101041a000000ff011001900000269b0000613d000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff011001900000284e0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000284d0000613d000000000101043b00000fd9011001970000000902000029000000000112004b0000269c0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000284d0000613d000000000101043b000700000001001d000026e80000013d000000000001042d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c000026a70000c13d0000000003000031000000200130008c00000020040000390000000004034019000026d70000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700070000000a001d000600000005001d3f553f500000040f000000060b000029000000070a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000026c40000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000026c00000c13d000000000705004b000026d30000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000028750000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000028470000213d0000000102200190000028470000c13d000000400010043f000000200130008c0000283f0000413d00000000010a0433000700000001001d00000fd90110009c0000283f0000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000600000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f00000001022001900000284d0000613d000000000101043b000000000101004b0000283f0000613d000000400a00043d000010580100004100000000031a0436000000070100002900000fd9011001970000000405a00039000700000001001d000000000015043500000000010004140000000602000029000000040420008c000027130000c13d0000104e01a0009c000028470000213d0000004000a0043f000010590100004100000000001a0435000000070100002900000000001504350000000003000031000000200130008c000000200400003900000000040340190000275c0000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000028560000613d00000004030000290000104e0130009c0000000302000029000028470000213d000000400030043f0000105901000041000000000013043500000007010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000006020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b000029000027490000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000027450000c13d000000000705004b000027580000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000028650000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c000028470000213d000000400010043f000000200130008c0000283f0000413d00000000010a0433000600000001001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000201041a0000000603000029000000000123004b000028410000413d000000000123004b000027a30000613d000400000002001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000603000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b0000000002030019000027980000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000028410000c13d00000000121200d9000027990000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000028410000c13d000000000021041b000000090100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000400200043d0000105a0320009c000028470000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000600000004001d000000000034043500000040022000390000000201100039000000000101041a000700000002001d0000000000120435000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d00000007020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b000028410000413d00000006030000290000000003030433000000000421004900000000564300a9000000000121004b000027eb0000613d00000000214600d9000000000131004b000028410000c13d000000090100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039000700000006001d3f553f500000040f00000007030000290007104d3030013200000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000301041a0000000702300029000000000332004b000000000300001900000001030040390000000103300190000028410000c13d000000000021041b000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000201100039000000000101041a000900000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000002011000390000000902000029000000000021041b000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f0000000505300272000028620000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000285e0000c13d000000000604004b000028730000c13d0000288f0000013d000000400200043d0000001f0430018f0000000505300272000028710000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000286d0000c13d000000000604004b0000288f0000613d0000000505500210000028830000013d000000400200043d0000001f0430018f00000005053002720000000505500210000028810000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000287d0000c13d000000000604004b0000288f0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300005000000000002000500000001001d000200000002001d00000fd901200197000400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b000100000001001d0000000401100039000000000101041a000000ff011001900000290f0000613d000000050100002900000fd901100197000300000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b000000000101041a000000ff011001900000290f0000613d000000020100002900000005020000293f5539e50000040f00000001020000290000000302200039000100000002001d000000000202041a000200000002001d000000040200002900000000002004350000013402000039000000200020043f000500000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000003020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b0000000101100039000000000101041a0000000203000029000000000213004b000029120000413d00000000021300490000000501200029000000000221004b000000000200001900000001020040390000000102200190000029120000c13d0000000102000029000000000012041b000000040100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000003020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000001011000390000000502000029000000000021041b000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f570001043000010000000000020000013702000039000000000202041a0000013803000039000000000303041a0000013904000039000000000404041a00000fd901100197000000400b00043d0000004405b0003900000000001504350000002401b000390000000000410435000010900100004100000000001b043500000fd9013001970000000403b000390000000000130435000000000100041400000fd902200197000000040320008c000029330000c13d0000000003000031000000600130008c00000060040000390000000004034019000029620000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700010000000b001d3f553f500000040f000000010b0000290000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f00000005064002720000000506600210000029500000613d00000000076b0019000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000a79004b0000294c0000c13d000000000705004b0000295e0000613d000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000029840000613d0000001f01400039000000e00210018f0000000001b20019000000000221004b000000000200001900000001020040390000104e0410009c000029760000213d0000000102200190000029760000c13d000000400010043f0000005f0130008c0000297c0000a13d00000000010b04330000004002b000390000000002020433000000000321004b0000297e0000413d0000000001210049000000000001042d000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000029900000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000298c0000c13d000000000604004b0000299e0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300008000000000002000600000001001d0000013502000039000000000102041a000300000001001d000000000101004b00002a340000613d000000060100002900050fd90010019b0000000003000019000029b40000013d00000007030000290000000103300039000000030130006c000001350200003900002a340000813d000000000102041a000000000131004b00002a370000a13d0000000000200435000700000003001d0000105201300041000000000101041a00000fd902100197000800000002001d00000006010000293f55263a0000040f000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b000400000001001d0000000401100039000000000101041a000000ff01100190000029af0000613d000000050100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b000000000101041a000000ff01100190000029af0000613d000000080100002900000006020000293f5539e50000040f00000004020000290000000302200039000100000002001d000000000202041a000200000002001d000000080200002900000000002004350000013402000039000000200020043f000400000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000005020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b0000000101100039000000000101041a0000000203000029000000000213004b00002a3d0000413d00000000021300490000000401200029000000000221004b00000000020000190000000102004039000000010220019000002a3d0000c13d0000000102000029000000000012041b000000080100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000005020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000001011000390000000402000029000000000021041b000029af0000013d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300008000000000002000300000001001d00000fd901100197000700000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000400200043d000010b60320009c00002b580000813d000000000101043b0000004003200039000000400030043f000000000101041a000000ff031001900000000004000019000000010400c03900000000044204360000ff00011001900000000001000019000000010100c0390000000000140435000000000203004b00002b5e0000613d0000013503000039000000000203041a000200000002001d000000000202004b00002af60000613d000100000004001d0000000002000019000000000103041a000000000121004b00002b520000a13d0000000000300435000400000002001d0000105201200041000000000101041a00000fd902100197000800000002001d00000003010000293f55263a0000040f000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000301100039000000000101041a000600000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000101100039000000000201041a000500000002001d000000060120006b00002b4c0000413d000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d00000005030000290000000602300069000000000101043b0000000301100039000000000021041b0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000101100039000000000001041b000000080100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000201100039000000000001041b00000004020000290000000102200039000000020120006c000001350300003900002a6b0000413d00000001010000290000000001010433000000000101004b0000012f010060390000012e0100c039000000000201041a000000000302004b00002b4c0000613d000000010220008a000000000021041b000000070100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b000000000201041a0000107c02200197000000000021041b0000013c01000039000000000201041a000000000302004b00002b150000613d000000010220008a000000000021041b0000013d01000039000000000101041a000800000001001d000000000101004b00002b3d0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b000000000101041a000000ff0110019000002b3d0000c13d0000000801000029000000010110008a0000013d02000039000000000012041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d020000390000000203000039000010b70400004100000007050000293f553f4b0000040f000000010120019000002b4a0000613d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a702000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000100000000000200000fd901100197000100000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b000000000201041a000000ff0320019000002bc80000c13d0000107c0220019700000001022001bf000000000021041b0000012f02000039000000000102041a000010af0310009c00002bd00000613d0000000103100039000000000032041b0000013102000039000000000202041a0000012e03000039000000000303041a000000000223004b00002bc50000213d0000013002000039000000000202041a000000000121004b00002bc50000813d0000013c01000039000000000101041a000000000101004b00002bb00000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b00000001020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e0400004100000001050000293f553f4b0000040f000000010120019000002bc30000613d000000000001042d000000000100001900003f5700010430000000400100043d000010ac0200004100002bca0000013d000000400100043d000010a102000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000c000000000002000500000001001d0000013501000039000000000101041a000400000001001d000000000101004b00002da00000613d000000050100002900090fd90010019b00000000020000190000013501000039000000000101041a000000000121004b00002db00000a13d000700000002001d0000105201200041000000000101041a00000fd901100197000c00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b000800000001001d0000000401100039000000000101041a000000ff0110019000002db60000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002da90000613d000000000101043b00000fd9011001970000000c02000029000000000112004b00002c210000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002da90000613d000000000101043b000b00000001001d00002c6c0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00002c2c0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002c5b0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000b00000009001d000a00000005001d3f553f500000040f0000000a0a0000290000000b090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200002c480000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00002c440000c13d0000001f0640019000002c570000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000002ddd0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00002daa0000213d000000010220019000002daa0000c13d000000400010043f000000200130008c00002da10000413d0000000001090433000b00000001001d00000fd90110009c00002da10000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000a00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000002da90000613d000000000101043b000000000101004b00002da10000613d000000400900043d000010580100004100000000031904360000000b0100002900000fd9011001970000000405900039000b00000001001d000000000015043500000000010004140000000a02000029000000040420008c00002c970000c13d0000104e0190009c00002daa0000213d000000400090043f000010590100004100000000001904350000000b0100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900002cdf0000013d000300000005001d000200000003001d00000fd70390009c00000fd7030000410000000003094019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c7000600000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000002dbe0000613d00000006030000290000104e0130009c000000030200002900002daa0000213d000000400030043f000010590100004100000000001304350000000b010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c70000000a020000293f553f500000040f00000006090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000000020a00002900002ccc0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00002cc80000c13d0000001f0640019000002cdb0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000002dcd0000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00002daa0000213d000000400010043f000000200130008c00002da10000413d0000000001090433000a00000001001d0000000b0100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b000000000201041a0000000a03000029000000000123004b00002da30000413d000000000123004b00002d260000613d000600000002001d0000000b0100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000a03000029000000000031041b00000008010000290000000301100039000000000101041a000000000201004b000000000203001900002d1b0000613d000000060320006a0000104d423000d100000000433200d90000104d0330009c00002da30000c13d00000000121200d900002d1c0000013d000000000200001900000008010000290000000201100039000000000301041a0000000002230019000000000332004b00000000030000190000000103004039000000010330019000002da30000c13d000000000021041b0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000201100039000000000101041a000b00000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000002011000390000000b02000029000000000021041b0000000c0100002900000005020000293f5539e50000040f0000000c0200002900000000002004350000013402000039000000200020043f000b00000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000001011000390000000b02000029000000000021041b0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000301100039000000000101041a000b000b0010002d0000000b0110006b00000000010000190000000101004039000000010110019000002da30000c13d0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000003011000390000000b02000029000000000021041b00000007020000290000000102200039000000040120006c00002be00000413d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000002dca0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002dc60000c13d000000000604004b00002df70000613d00002deb0000013d000000400200043d0000001f0430018f000000050530027200002dd90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002dd50000c13d000000000604004b00002df70000613d000000050550021000002deb0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000002de90000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002de50000c13d000000000604004b00002df70000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300000013b01000039000000000201041a000010af0320009c00002e120000613d0000000102200039000000000021041b0000012e01000039000000000101041a0000012f02000039000000000202041a0000000001120019000000000221004b00000000020000190000000102004039000000010220019000002e120000c13d0000013c02000039000000000012041b0000013d02000039000000000012041b000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300002000000000002000200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000020300002900000fd903300197000000010220019000002e8d0000613d000000000101043b00000fd901100197000000000113004b00002e400000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002e8d0000613d000000000101043b000000000001042d000000400a00043d000010550100004100000000051a04360000000001000414000000040230008c00002e4b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002e7c0000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900020000000a001d000100000005001d3f553f500000040f000000010b000029000000020a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200002e690000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002e650000c13d000000000705004b00002e780000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000002e960000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00002e900000213d000000010220019000002e900000c13d000000400010043f0000001f0130008c00002e8e0000a13d00000000010a043300000fd90210009c00002e8e0000213d000000000001042d000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000002ea20000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002e9e0000c13d000000000604004b00002eb00000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f57000104300000006502000039000000000302041a0000105b03300197000000000032041b00000fd9061001970000003301000039000000000201041a0000105b03200197000000000363019f000000000031041b000000000100041400000fd90520019700000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d040000413f553f4b0000040f000000010120019000002ecd0000613d000000000001042d000000000100001900003f5700010430000000400200043d000000fb04000039000000000304041a000000000513004b00002ee80000813d000000000014041b00000020042000390000000000140435000000000032043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d02000039000000010300003900001081040000413f553f4b0000040f000000010120019000002efb0000613d000000000001042d00000064012000390000107f03000041000000000031043500000044012000390000108003000041000000000031043500000024012000390000002203000039000000000031043500000fe001000041000000000012043500000004012000390000002003000039000000000031043500000fd70120009c00000fd702008041000000400120021000000fe1011001c700003f5700010430000000000100001900003f5700010430000000c901000039000000000101041a000000ff0110019000002f020000c13d000000000001042d000000400100043d00000044021000390000108203000041000000000032043500000024021000390000001003000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f5700010430000a000000000002000600000002001d00000fd901100197000a00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff01100190000032c40000613d00001046010000410000000000100439000000000100041200000004001004430000008001000039000700000001001d0000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b00000fd9011001970000000a02000029000000000112004b00002f500000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000900000001001d00002f9c0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c00002f5b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002f8b0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700090000000a001d000800000005001d3f553f500000040f000000080b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200002f780000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002f740000c13d000000000705004b00002f870000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000334e0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000032b70000213d0000000102200190000032b70000c13d000000400010043f000000200130008c000032b50000413d00000000010a0433000900000001001d00000fd90110009c000032b50000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000800000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b000032b50000613d000000400a00043d000010580100004100000000031a0436000000090100002900000fd9011001970000000405a00039000900000001001d000000000015043500000000010004140000000802000029000000040420008c00002fc70000c13d0000104e01a0009c000032b70000213d0000004000a0043f000010590100004100000000001a0435000000090100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000030100000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000032f60000613d00000004030000290000104e0130009c0000000302000029000032b70000213d000000400030043f0000105901000041000000000013043500000009010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000008020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b00002900002ffd0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002ff90000c13d000000000705004b0000300c0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000033050000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c000032b70000213d000000400010043f000000200130008c000032b50000413d00000000010a0433000800000001001d000000090100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000201041a0000000803000029000000000123004b000032be0000413d000000000123004b000030570000613d000400000002001d000000090100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b0000000803000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b00000000020300190000304c0000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000032be0000c13d00000000121200d90000304d0000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000032be0000c13d000000000021041b0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000060200002900000fd902200197000900000002001d0000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000400200043d0000105a0320009c000032b70000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000600000004001d000000000034043500000040022000390000000201100039000000000101041a000800000002001d00000000001204350000000a0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d00000008020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b000032be0000413d00000006030000290000000003030433000000000421004900000000564300a9000000000121004b000030a10000613d00000000214600d9000000000131004b000032be0000c13d0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039000800000006001d3f553f500000040f00000008030000290008104d303001320000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000101041a000800080010002d000000080110006b000000000100001900000001010040390000000101100190000032be0000c13d0000000a0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b0000000201100039000000000101041a000600000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000002011000390000000602000029000000000021041b0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000001041b000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b00000fd9011001970000000a02000029000000000112004b000031350000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000400a00043d000000000101043b000031800000013d000000400b00043d000010550100004100000000051b04360000000001000414000000040320008c000031400000c13d0000000003000031000000200130008c00000020040000390000000004034019000031700000013d00000fd703b0009c00000fd70300004100000000030b4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700060000000b001d000500000005001d3f553f500000040f000000050a000029000000060b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000315d0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000031590000c13d000000000705004b0000316c0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000335d0000613d0000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c000032b70000213d0000000101100190000032b70000c13d0000004000a0043f000000200130008c000032b50000413d00000000010b043300000fd90210009c000032b50000213d0000104b0200004100000000042a04360000000402a0003900000000030004100000000000320435000000000200041400000fd909100197000000040190008c000600000009001d0000318f0000c13d0000000003000031000000200130008c00000020040000390000000004034019000031c10000013d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f0000104c011001c7000000000209001900050000000a001d000400000004001d3f553f500000040f000000040b000029000000050a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000031ad0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000031a90000c13d000000000705004b000031bc0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000000609000029000033140000613d0000001f01400039000000600110018f0000000004a10019000000000114004b000000000100001900000001010040390000104e0240009c000032b70000213d0000000101100190000032b70000c13d000000400040043f000000200130008c000032b50000413d00000000010a0433000000080110006b000032140000a13d00000000009004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000001041b0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000500000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b0000000609000029000032b50000613d000000400400043d000010b80100004100000000001404350000000401400039000000000091043500000000010004140000000502000029000000040320008c000032100000613d00000fd70340009c00000fd7030000410000000003044019000000400530021000000fd70310009c00000fd701008041000000c001100210000000000151019f0000104c011001c7000500000004001d3f553f4b0000040f000000050400002900000006090000290000000003010019000000600330027000000fd70030019d00000fd703300197000200000001035500000001022001900000336c0000613d0000104e0140009c000032b70000213d000000400040043f000032140000013d0000004401400039000000080200002900000000002104350000002001400039000010b902000041000000000021043500000024024000390000000903000029000000000032043500000044020000390000000000240435000010500240009c000032b70000213d000000800a4000390000004000a0043f000010ba0240009c000032b70000213d000000c002400039000000400020043f000000200200003900000000002a0435000000a002400039000010bb03000041000000000032043500000000030404330000000002000414000000040490008c000032610000c13d00000001020000390000000001000031000000000301004b000032780000613d0000104e0310009c000032b70000213d0000001f03100039000010b1033001970000003f03300039000010b103300197000000400b00043d00000000033b00190000000004b3004b000000000400001900000001040040390000104e0530009c000032b70000213d0000000104400190000032b70000c13d000000400030043f0000001f0310018f00000000041b0436000700000004001d000000020400036700000005011002720000000501100210000032520000613d00000007070000290000000005170019000000000604034f000000006806043c0000000007870436000000000857004b0000324e0000c13d000000000503004b000032790000613d000000000414034f00000007011000290000000303300210000000000501043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f0000000000310435000032790000013d00000fd70410009c00000fd701008041000000400110021000000fd70430009c00000fd7030080410000006003300210000000000113019f00000fd70320009c00000fd702008041000000c002200210000000000121019f000000000209001900050000000a001d3f553f4b0000040f000000050a0000290000000609000029000000010220018f0002000000010355000000600110027000000fd70010019d00000fd701100197000000000301004b000032340000c13d000000600b00003900000000040b0433000000000202004b000032cc0000613d000000000204004b000032920000c13d00060000000b001d000010560100004100000000001004390000000400900443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b00000006010000290000333d0000613d0000000004010433000000000204004b0000329f0000613d0000106d0240009c000032b50000213d000000200140008c000032b50000413d00000007010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000032b50000c13d000000000101004b000032e20000613d000000400100043d0000000802000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000303000039000010be0400004100000009050000290000000a060000293f553f4b0000040f0000000101200190000032b50000613d0000000801000029000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f570001043000000000010a0019000000000204004b000033340000c13d000000400400043d000a00000004001d00000fe002000041000000000024043500000004034000390000002002000039000000000023043500000024024000393f5525730000040f0000000a03000029000000000131004900000fd70210009c00000fd70100804100000fd70230009c00000fd70300804100000060011002100000004002300210000000000121019f00003f5700010430000000400100043d0000006402100039000010bc0300004100000000003204350000004402100039000010bd03000041000000000032043500000024021000390000002a03000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000033020000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000032fe0000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033110000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000330d0000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033200000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000331c0000c13d000000000604004b0000332e0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000070300002900000fd70230009c00000fd703008041000000400230021000000fd70340009c00000fd7040080410000006001400210000000000121019f00003f5700010430000000400100043d0000004402100039000010bf03000041000000000032043500000024021000390000001d03000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f5700010430000000400200043d0000001f0430018f000000050530027200000005055002100000335a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033560000c13d000000000604004b0000337a0000c13d000033860000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033690000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033650000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033780000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033740000c13d000000000604004b000033860000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300001000000000002000100000001001d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000033a10000613d000000000101043b000000010210006c0000000101008029000000000001042d000000000001042f000c000000000002000600000004001d000c00000003001d000500000002001d000b00000001001d000000400100043d000a00000001001d000010c00110009c000035260000813d0000000a02000029000000a001200039000000400010043f0000008001200039000800000001001d00000000000104350000006001200039000700000001001d00000000000104350000004001200039000300000001001d00000000000104350000000001020436000200000001001d00000000000104350000013701000039000000000201041a000000400b00043d000010910100004100000000051b0436000000000100041400000fd902200197000000040320008c000033c80000c13d0000000003000031000000200130008c00000020040000390000000004034019000033f80000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c700090000000b001d000400000005001d3f553f500000040f000000040a000029000000090b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000033e50000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000033e10000c13d000000000705004b000033f40000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000352c0000613d0000001f01400039000000600110018f000000000ab1001900000000021a004b000000000200001900000001020040390000104e04a0009c000035260000213d0000000102200190000035260000c13d0000004000a0043f0000001f0230008c0000351e0000a13d00000000020b043300000fd90420009c0000351e0000213d0000014204000039000000000404041a000010940500004100000000065a04360000000405a000390000000000250435000000000500041400000fd902400197000000040420008c000400000002001d000034450000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700090000000a001d000100000006001d3f553f500000040f000000010b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000034300000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b0000342c0000c13d000000000705004b0000343f0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000353b0000613d0000001f01400039000000600110018f0000000001a100190000104e0410009c000035260000213d000000400010043f000000200130008c0000351e0000413d00000000010a0433000900000001001d000000060100002900000fd901100197000600000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000351e0000613d000000000101043b0000000101100039000000000201041a0000000b312000b90000000b0300006b0000000905000029000034660000613d0000000b431000fa000000000223004b000035200000c13d0000104d1210012a00000000312500a9000000000305004b0000346d0000613d00000000435100d9000000000223004b000035200000c13d0000104d2110012a00000008020000290000000000120435000000060100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000351e0000613d000000000101043b000000000201041a0000000b312000b90000000b0300006b0000000905000029000034860000613d0000000b431000fa000000000223004b000035200000c13d0000104d1210012a00000000315200a9000000000305004b0000348d0000613d00000000435100d9000000000223004b000035200000c13d0000104d2110012a000000070200002900000000001204350000109501000041000000400a00043d00000000051a04360000000401a000390000000602000029000000000021043500000000010004140000000402000029000000040320008c0000349f0000c13d0000000003000031000000200130008c00000020040000390000000004034019000034cf0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000b0000000a001d000900000005001d3f553f500000040f000000090b0000290000000b0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000034bc0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000034b80000c13d000000000705004b000034cb0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000354a0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000035260000213d0000000102200190000035260000c13d000000400010043f000000200130008c0000351e0000413d00000000010a0433000000000201004b000034f70000613d0000000c241000b900000000321400d90000000c0220006c000035200000c13d00000005321000b900000000311200d90000104d5340012a000000050110006c000035200000c13d0000104d5120012a00000007050000290000000005050433000000000653004b000035000000413d000010960440009c000034ff0000a13d0000000c645000b90000000c0600006b000034f50000613d0000000c764000fa000000000556004b000035200000c13d000c0000303400e1000035000000013d00000007010000290000000001010433000000000101004b00000000010000190000000002000019000035000000c13d00000000010000190000000002000019000c00000000001d00000008030000290000000003030433000000000431004b000035060000813d0000000502000029000035100000013d000010960220009c0000000002000019000035100000a13d00000005423000b9000000050400006b0000350f0000613d00000005542000fa000000000334004b000035200000c13d00000000121200d90000000c04200029000000000324004b000000000300001900000001030040390000000103300190000035200000c13d0000000a0100002900000000004104350000000c030000290000000204000029000000000034043500000003030000290000000000230435000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000035380000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035340000c13d000000000604004b000035580000c13d000035640000013d000000400200043d0000001f0430018f00000005053002720000000505500210000035470000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035430000c13d000000000604004b000035640000613d000035580000013d000000400200043d0000001f0430018f00000005053002720000000505500210000035560000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035520000c13d000000000604004b000035640000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f570001043000040000000000020000000005000019000000000601004b000035730000613d000000000602004b000035730000613d000000000521004b000035750000c13d000000000001042d0000000001050019000000000001042d000000000521004b0000358e0000813d000000000512019f0000106d0550009c000036d50000213d0000106f050000410000106f6710012c000000000865004900000000080660190000007f061002100000106fa960012c000000000779013f0000000009a5004900000000090a601900000000898900d9000000ff077002120000000008970049000000000778019f0000000007096019000000000809004b000000000907c019000010c10790009c000038120000c13d0000106f8720012c000035a50000013d0000106d0510009c000036d50000213d0000106d0520009c000036d50000213d0000106f050000410000106f6720012c000000000865004900000000080660190000007f062002100000106fa960012c000000000779013f0000000009a5004900000000090a601900000000898900d9000000ff077002120000000008970049000000000778019f0000000007096019000000000809004b000000000907c019000010c10790009c000038120000c13d0000106f8710012c000000000985004900000000090860190000106f8660012c000000000676013f0000000005850049000000000508601900000000759500d9000000ff066002120000000007560049000000000667019f0000000006056019000000000705004b000000000506c01900000000060004150000106d0750009c000035b70000213d000010c20750009c000037fa0000813d0000106d0750009c000037fd0000213d000000000705004b000037fd0000613d000010c10750009c000035c40000c13d0000000005000415000000000556004900000000050000020000106d0330009c0000000006000019000035de0000a13d000036d50000013d000010c30750009c000036130000813d0000000005000415000000000556004900000000050000020000106d0530009c000036d50000213d000010ee07000041000010ee653000d10000106f7670012c0000106f0970009900000000090760190000106fa750012c000000000667013f0000106f07a0009900000000070a601900000000789700d9000000ff066002120000000007860049000000000667019f0000000006086019000000000708004b000000000806c0190000000006050019000000000338004b000038120000c13d0000106d0340009c000036d50000213d000000000304004b000037f40000613d0000106f4340012c0000106f0740009900000000070460190000106f6460012c000000000434013f0000106f03600099000000000306601900000000537300d9000000ff044002120000000005340049000000000445019f0000000004036019000000000503004b000000000304c0190000106f043001970000106f054001670000106f0440009c00000000040000190000106f04002041000010ee0630009c00000000060000190000106f060040410000106f0550009c000000000406c019000000000404004b0000000004000019000036270000c13d000000000403004b000036260000613d0000106d0430009c000036030000213d000000000403004b000038180000c13d0000000003300049000010ef043001980000368c0000613d00000000654400a90000007f08500270000010f0678000d1000010c10550009c00000000060000190000000005000019000037300000413d00000000654800a9000010c10650009c000036e90000813d00000000060000190000000005070019000037300000013d000010c50750009c000036450000813d000010c608000041000010c7070000410000007f05500210000010c89550012a000010c90950009c000036490000413d0000000007080019000010cb0850009c0000364d0000413d000010ce0850009c000036520000813d000010cf077000410000007f05500210000010d08550012a000010d10850009c000036540000413d000036570000013d000010c104000041000000000121004b0000377e0000813d00000000132400a90000106f010000410000106f6530012c000000000761004900000000070660190000106f6220012c000000000225013f0000000005610049000000000506601900000000565700d9000000ff022002120000000005620049000000000225019f0000000002066019000000000506004b000000000602c019000000000246004b000038120000c13d000010c14210012b000000000541004900000000050460190000106f4330012c000000000223013f0000000001410049000000000104601900000000155100d9000000ff012002120000379a0000013d000010c4070000410000000008000019000010c90950009c0000361b0000813d0000007f05500210000010ca8550012a000010cb0850009c0000361e0000813d000010cc077000410000007f05500210000010cd8550012a000010ce0850009c000036200000413d000010d10850009c000036570000813d000010d2077000410000007f05500210000010d38550012a000010d40850009c000010d5077040410000007f05504210000010d68550412a000010d70850009c000036610000813d000010d8077000410000007f05500210000010d98550012a000036610000013d000010da0850009c000036660000813d000010db077000410000007f05500210000010dc8550012a0000000008000415000000040880008a0000000508800210000010dd0950009c000036710000813d0000000008000415000000030880008a0000000508800210000010de077000410000007f05500210000010df9550012a000200000006001d0000000508800270000010d508500047000010d5095000420000368f0000613d00000000a89900a9000010c10a50009900000000cba800d9000000000bb00049000000000bb9004b000038120000c13d000010e00b5000990000008009900210000000000998004900000000dca900d9000000000bbc004b000038120000c13d00000080099002700000000007970049000010e10b5000990000007f09800270000000008c9a00a90000007f0ac0027000000000b6ba00a9000010e20bc0009c000036950000213d000036920000013d00000000060000190000000005000019000037300000013d0000000006000019000000000a0000190000000009000019000100000006001d00000000baa900a9000036970000013d000100000006001d00000000ba9a00a9000010e30b500099000010e40c500099000010e60d5000990000007f0aa0027000000000edda00a9000010e70e50009900000000fa9a00a90000007f0aa00270000000008f9a00a90000007f08f0027000000000cfc800a900000000c89800a90000007f0880027000000000cbb800a900000000c89800a90000007f0880027000000000cee800a900000000989800a9000010e89cd0012a000010e9d9f0012a000010eadbb0012a000010eb0d5000410000007f0f80027000000000d6df00a9000010ecede0012a000000000e600049000010c10680009c000036b70000413d000010ed0650009900000000f8fe00d9000000000668004b000038120000c13d0000000006000415000000020660006900000000060000020000106d0630009c000036d50000213d000010e50550009900000000655a00a90000000106000029000000810660027000000082055002700000000006c60019000000000556001900000000059500190000000005b500190000000005d500190000008306e002700000000005650019000000000757004b000036d20000613d00000000653700a9000010af0670009c000035cd0000c13d0000106f060000410000106f0850009c0000106f08000041000035dc0000613d000035cd0000013d00000000060000190000106d0340009c000035e00000a13d000000400100043d00000064021000390000112503000041000000000032043500000044021000390000112603000041000000000032043500000024021000390000002803000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f57000104300000007f05500270000010f1865000d1000000000860004900000000985800d9000010f20880009c000038120000c13d000000000776001900000000584500a90000007f06800270000010f3956000d10000000005570019000010c10780009c0000372f0000413d00000000764600a9000010c10760009c000036fa0000813d0000372f0000013d0000007f06600270000010f4876000d1000000000870004900000000986800d9000010f50880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010f6986000d10000000005850019000010c10770009c000037080000813d0000372f0000013d00000000764600a9000010c10760009c0000370c0000813d0000372f0000013d0000007f06600270000010f7876000d1000000000870004900000000986800d9000010f80880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010f9986000d10000000005850019000010c10770009c0000371a0000813d0000372f0000013d00000000764600a9000010c10760009c0000371e0000813d0000372f0000013d0000007f06600270000010fa876000d1000000000870004900000000986800d9000010fb0880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010fc986000d10000000005850019000010c10770009c0000372c0000813d0000372f0000013d00000000764600a9000010c10760009c000037a10000813d00000000060000190000000005650019000000000600001900000000056500190000000006000019000000000565001900000000060000190000000005650019000000000600001900000000056500190000106f6550012c0000106f07000041000000000867004900000000080660190000110a9670012b000000000565013f0000000006970049000000000609601900000000676800d9000000ff055002120000000006750049000000000556019f0000000005076019000000000607004b000000000705c0190000000004470049000010c1044000410000110b05300198000037670000c13d0000110e053001980000376b0000613d0000110f544000d1000011105440012a00001111053001980000376d0000613d00001112544000d1000011135440012a00001114053001980000376f0000613d00001115544000d1000011165440012a0000111705300198000037710000613d00001118544000d1000011195440012a000010c105300198000037730000613d0000111a544000d10000111b5440012a0000111c05300198000037750000613d0000111d544000d10000111e5440012a0000111f05300198000037770000c13d000037790000013d0000110c544000d10000110d5440012a0000110e053001980000374e0000c13d0000111105300198000037520000c13d0000111405300198000037560000c13d00001117053001980000375a0000c13d000010c1053001980000375e0000c13d0000111c05300198000037620000c13d0000111f05300198000037790000613d000010df544000d1000011205440012a0000112103300198000011224340c0d1000011233430c12a000000000121004b000036290000413d0000106f1520012c0000106f0610009900000000060160190000007f012002100000106f7210012c000000000252013f0000106f03700099000000000307601900000000356300d9000000ff022002120000000003520049000000000223019f0000000002056019000000000305004b000000000502c019000010c10250009c000038120000c13d000000000204004b000037f40000613d0000106f3240012c0000106f0530009900000000050360190000106f3110012c000000000121013f0000106f02300099000000000203601900000000255200d9000000ff011002120000000002510049000000000112019f0000000001056019000000000205004b000000000501c0190000000001050019000000000001042d0000007f06600270000010fd876000d1000000000870004900000000986800d9000010fe0880009c000038120000c13d000000000557001900000000684600a90000007f07800270000010ff967000d1000010c10880009c000037300000413d00000000987600d9000010ff0880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037b50000813d000037310000013d0000007f0660027000001100876000d10000000008700049000011010880019700000000986800d9000011020880009c000038120000c13d000000000557001900000000684600a90000007f0780027000001103967000d1000010c10880009c000037320000413d00000000987600d9000011030880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037ca0000813d000037330000013d0000007f0660027000001104876000d10000000008700049000011050880019700000000986800d9000011060880009c000038120000c13d000000000557001900000000684600a90000007f0780027000001107967000d1000010c10880009c000037340000413d00000000987600d9000011070880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037df0000813d000037350000013d0000007f0660027000001129876000d10000000008700049000011080880019700000000986800d900001ab80880008c000038120000c13d000000000557001900000000684600a90000007f078002700000017c967000c9000010c10880009c000037360000413d00000000987600d90000017c0880008c000038120000c13d000000000556001900000000764700a9000010c10760009c000038070000813d000037370000013d000010630100004100000000001004350000001201000039000000040010043f0000104c0100004100003f5700010430000000400100043d0000112802000041000037ff0000013d000000400100043d000011270200004100000000002104350000000402100039000000000052043500000fd70210009c00000fd70100804100000040011002100000104c011001c700003f57000104300000007f066002700000112a876000d10000000008700049000011090880019700000000986800d9000000140880008c000038120000c13d000000000557001900000000764600a90000007f06600270000037380000013d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d0000112402000041000000000021043500000004021000390000000000320435000038020000013d00090000000000020000000008010019000000000107004b000039250000613d000300000006001d000200000007001d000400000004001d000500000005001d000600000002001d000700000003001d0000014101000039000000000101041a000900000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000800000008001d3f553f500000040f000000080300002900000fd903300197000000090400002900000fd9054001970000000102200190000039500000613d000000000101043b00000fd901100197000000000113004b000038570000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000900000005001d3f553f500000040f00000009050000290000000102200190000039500000613d000000400a00043d000000000101043b000038a50000013d000000400b00043d000010550100004100000000061b04360000000001000414000000040230008c000038620000c13d0000000003000031000000200130008c00000020040000390000000004034019000038950000013d000900000005001d00000fd702b0009c00000fd70200004100000000020b4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900080000000b001d000100000006001d3f553f500000040f000000010a000029000000080b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000038810000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b0000387d0000c13d000000000705004b000038900000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000039690000613d00000009050000290000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c000039530000213d0000000101100190000039530000c13d0000004000a0043f0000001f0130008c000039510000a13d00000000010b043300000fd90210009c000039510000213d000010b30200004100000000042a043600000fd9011001970000000402a0003900000000001204350000000001000414000000040250008c000038b20000c13d0000000003000031000000200130008c00000020040000390000000004034019000038e30000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c7000000000205001900090000000a001d000800000004001d3f553f500000040f000000080b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000038d00000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000038cc0000c13d000000000705004b000038df0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000039590000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000039530000213d0000000102200190000039530000c13d000000400010043f000000200130008c000039510000413d00000000010a0433000900000001001d00001046010000410000000000100439000000000100041200000004001004430000002400000443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000039500000613d000000000101043b000000090500002900000000325100a9000000000301004b000000070700002900000006080000290000000506000029000000040900002900000003040000290000390d0000613d00000000311200d9000000000151004b0000394a0000c13d00000000314200a9000000000304004b000039130000613d00000000434100d9000000000223004b0000394a0000c13d0000000002960019000000000362004b0000000003000019000000010300403900000001033001900000394a0000c13d000000000302004b0000000204000029000039250000613d000000000341004b000039280000813d000000000108004b00000000040000190000000003000019000000000100001900000000050000190000393f0000c13d000039400000013d00000000010000190000000002000019000000000001042d00000000144100d900000000319400a900000000534100d9000000000393004b0000394a0000c13d00000000536400a900000000544300d9000000000464004b0000394a0000c13d00000000542300d9000000000508004b000039380000613d000000000512004b0000393a0000a13d00000000050000190000393f0000013d0000000001000019000039400000013d00000000512100d900002710651000c900000000611500d9000027100110008c0000394a0000c13d00000000518500d9000000000507004b000039260000613d00002710654000c9000000000232004b000039480000213d00000000324500d9000027100220008c0000394a0000c13d00000000327500d9000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000039650000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000039610000c13d000000000604004b000039830000613d0000000505500210000039770000013d000000400200043d0000001f0430018f00000005053002720000000505500210000039750000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000039710000c13d000000000604004b000039830000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300003000000000002000300000002001d00000fd901100197000200000001001d00000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d000000000101043b000000030200002900000fd9022001970000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d000000400200043d0000112b0320009c000039df0000813d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000100000004001d000000000034043500000040022000390000000201100039000000000101041a000300000002001d0000000000120435000000020100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d00000003020000290000000002020433000000000101043b0000000201100039000000000301041a000000000123004b000039d90000413d00000001010000290000000004010433000000000523004900000000615400a9000000000223004b000039d50000613d00000000325100d9000000000242004b000039d90000c13d0000104d2110012a000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000d000000000002000d00000001001d0000013701000039000000000301041a0000013801000039000000000101041a0000013904000039000000000404041a000000400b00043d0000002405b000390000000000450435000010900400004100000000004b043500000fd9011001970000000404b00039000000000014043500000fd9022001970000004401b00039000c00000002001d0000000000210435000000000100041400000fd902300197000000040320008c00003a020000c13d0000000003000031000000600130008c0000006004000039000000000403401900003a310000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c7000b0000000b001d3f553f500000040f0000000b0b0000290000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f0000000506400272000000050660021000003a1f0000613d00000000076b0019000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000a79004b00003a1b0000c13d000000000705004b00003a2d0000613d000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e440000613d0000001f01400039000000e00210018f0000000001b20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f0000005f0130008c00003e350000a13d00000000020b04330000004001b000390000000001010433000b00000002001d000a00000001001d000000000112004b00003e3d0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000000301043b000000400a00043d000010480100004100000000051a04360000000401a000390000000c0200002900000000002104350000000a020000290000000b01200069000000000213004b0000000003018019000b00000003001d00000000010004140000000d0200002900000fd902200197000000040320008c000d00000002001d00003a6b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900003a9b0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000a0000000a001d000900000005001d3f553f500000040f000000090b0000290000000a0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003a880000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003a840000c13d000000000705004b00003a970000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e530000613d0000001f01400039000000600110018f000000000ba1001900000000021b004b000000000200001900000001020040390000104e04b0009c00003e370000213d000000010220019000003e370000c13d0000004000b0043f000000200230008c00003e350000413d00000000020a0433000400000002001d0000104a0200004100000000052b043600000000020004140000000d04000029000000040440008c00003ae30000613d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f00000fdb011001c70000000d02000029000a0000000b001d000900000005001d3f553f500000040f000000090a0000290000000a0b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003ace0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003aca0000c13d000000000705004b00003add0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e620000613d0000001f01400039000000600110018f000000000cb100190000104e02c0009c00003e370000213d0000004000c0043f000000200230008c00003e350000413d00000000060b04330000104b0200004100000000052c04360000000402c000390000000c04000029000000000042043500000000020004140000000d04000029000000040440008c00003b280000613d000900000006001d00000fd701c0009c00000fd70100004100000000010c4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f0000104c011001c70000000d02000029000c0000000c001d000a00000005001d3f553f500000040f0000000a0a0000290000000c0c0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003b120000613d000000000701034f00000000080c0019000000007907043c00000000089804360000000009a8004b00003b0e0000c13d000000000705004b00003b210000613d0000000506600210000000000761034f00000000066c00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e710000613d0000001f01400039000000600110018f0000000906000029000000000ac100190000104e02a0009c00003e370000213d0000004000a0043f000000200230008c00003e350000413d00000000020c043300050000402600ad000000000406004b00003b350000613d00000005546000f9000000000224004b00003e3d0000c13d0000013702000039000000000202041a000010910400004100000000064a04360000000504000029000a104d40400132000000000400041400000fd902200197000000040520008c00003b710000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7000c0000000a001d000900000006001d3f553f500000040f000000090b0000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003b5c0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003b580000c13d000000000705004b00003b6b0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e800000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c00003e370000213d000000400010043f000000200130008c00003e350000413d00000000010a0433000c00000001001d00000fd90110009c00003e350000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000900000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000003e430000613d000000000101043b000000000101004b00003e350000613d000000400400043d0000109201000041000000000014043500000004014000390000000c02000029000000000021043500000000010004140000000902000029000000040320008c00003bab0000613d00000fd70340009c00000fd7030000410000000003044019000c00000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f0000000c040000290000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000003e8f0000613d0000104e0140009c00003e370000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000800000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000003e430000613d000000000101043b000000000101004b00003e350000613d000000400400043d00001093010000410000000001140436000900000001001d00000004014000390000000d02000029000000000021043500000000010004140000000802000029000000040320008c000c00000004001d00003bdf0000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f0000000c040000290000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000003e9e0000613d0000104e0140009c00003e370000213d0000000c01000029000000400010043f0000106e0110009c00003e370000213d0000000c02000029000000a001200039000000400010043f0000008001200039000700000001001d00000000000104350000006001200039000600000001001d0000000000010435000000400420003900000000000404350000000000020435000000090100002900000000000104350000013701000039000000000201041a000000400b00043d000010910100004100000000051b0436000000000100041400000fd902200197000000040320008c000200000004001d00003c020000c13d0000000003000031000000200130008c0000002004000039000000000403401900003c320000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c700080000000b001d000300000005001d3f553f500000040f000000030a000029000000080b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003c1f0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003c1b0000c13d000000000705004b00003c2e0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ead0000613d0000001f01400039000000600110018f000000000ab1001900000000021a004b000000000200001900000001020040390000104e04a0009c00003e370000213d000000010220019000003e370000c13d0000004000a0043f000000200230008c00003e350000413d00000000020b043300000fd90420009c00003e350000213d0000014204000039000000000404041a000010940500004100000000065a04360000000405a000390000000000250435000000000500041400000fd902400197000000040420008c000300000002001d00003c7f0000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700080000000a001d000100000006001d3f553f500000040f000000010b000029000000080a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003c6a0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003c660000c13d000000000705004b00003c790000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ebc0000613d0000001f01400039000000600110018f0000000001a100190000104e0410009c00003e370000213d000000400010043f000000200130008c00003e350000413d00000000010a0433000800000001001d0000000d0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000003e350000613d000000000101043b0000000101100039000000000201041a0000000b312000b90000000b0300006b000000080500002900003c9e0000613d0000000b431000fa000000000223004b00003e3d0000c13d0000104d1210012a00000000315200a9000000000305004b00003ca50000613d00000000435100d9000000000223004b00003e3d0000c13d0000104d2110012a000000070200002900000000001204350000000d0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000003e350000613d000000000101043b000000000201041a0000000b312000b90000000b0300006b000000080500002900003cbe0000613d0000000b431000fa000000000223004b00003e3d0000c13d0000104d1210012a00000000315200a9000000000305004b00003cc50000613d00000000435100d9000000000223004b00003e3d0000c13d0000104d2110012a000000060200002900000000001204350000109501000041000000400a00043d00000000051a04360000000401a000390000000d02000029000000000021043500000000010004140000000302000029000000040320008c00003cd70000c13d0000000003000031000000200130008c0000002004000039000000000403401900003d070000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c700080000000a001d000300000005001d3f553f500000040f000000030b000029000000080a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003cf40000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003cf00000c13d000000000705004b00003d030000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ecb0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f000000200130008c00003e350000413d00000000010a0433000000000201004b00003d300000613d0000000a241000b900000000321400d90000000a0220006c00003e3d0000c13d00000004321000b900000000311200d90000104d5340012a000000040110006c00003e3d0000c13d0000104d5120012a00000006050000290000000005050433000000000653004b00003d390000413d000010960440009c00003d380000a13d0000000a645000b900000005060000290000104d0660009c00003d2e0000413d0000000a764000fa000000000556004b00003e3d0000c13d000a0000303400e100003d390000013d00000006010000290000000001010433000000000101004b0000000001000019000000000200001900003d390000c13d00000000010000190000000002000019000a00000000001d00000007030000290000000003030433000000000431004b00003d3f0000813d000000040200002900003d490000013d000010960220009c000000000200001900003d490000a13d00000004423000b9000000040400006b00003d480000613d00000004542000fa000000000334004b00003e3d0000c13d00000000121200d90000000a01200029000000000321004b00000000030000190000000103004039000000010330019000003e3d0000c13d0000000c0300002900000000001304350000000a010000290000000903000029000000000013043500000002010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000000101043b00000fd9011001970000000d03000029000000000113004b00003d7c0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000400a00043d000000000101043b00003dc80000013d000000400b00043d000010550100004100000000051b04360000000001000414000000040230008c00003d870000c13d0000000003000031000000200130008c0000002004000039000000000403401900003db80000013d00000fd702b0009c00000fd70200004100000000020b40190000004004200210000000000203001900000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000d0000000b001d000a00000005001d3f553f500000040f0000000a0a0000290000000d0b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003da50000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003da10000c13d000000000705004b00003db40000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003efb0000613d0000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c00003e370000213d000000010110019000003e370000c13d0000004000a0043f000000200130008c00003e350000413d00000000010b043300000fd90210009c00003e350000213d000010790200004100000000052a0436000000000300041400000fd902100197000000040120008c00003dd30000c13d0000000003000031000000200130008c0000002004000039000000000403401900003e030000013d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000d0000000a001d000a00000005001d3f553f500000040f0000000a0b0000290000000d0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003df00000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003dec0000c13d000000000705004b00003dff0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003eda0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f000000200130008c00003e350000413d00000000020a0433000000ff0120008c00003e350000213d000000120120008c00003e3d0000213d0000000c010000290000000001010433000000120320008c00003e1b0000c13d000000010300003900003e260000013d0000000a0400003900000001030000390000001202200089000000010520019000000000654400a9000000010400603900000000433400a9000000010420008c0000000102200270000000000405001900003e1e0000213d00000000421300a9000000000401004b00003e2c0000613d00000000411200d9000000000131004b00003e3d0000c13d0000000c0100002900000000002104350000013601000039000000000101041a000010640310019700000080041002700000000b010000293f55356a0000040f000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000400200043d0000001f0430018f0000000505300272000000050550021000003e500000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e4c0000c13d000000000604004b00003f090000c13d00003f150000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e5f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e5b0000c13d000000000604004b00003ee90000c13d00003ef50000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e6e0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e6a0000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e7d0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e790000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e8c0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e880000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e9b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e970000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003eaa0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ea60000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003eb90000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003eb50000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003ec80000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ec40000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003ed70000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ed30000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f000000050530027200003ee60000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ee20000c13d000000000604004b00003ef50000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000003f070000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003f030000c13d000000000604004b00003f150000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000000000001042f00000fd70210009c00000fd7010080410000006001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f0000105c011001c700008010020000393f553f500000040f000000010220019000003f2b0000613d000000000101043b000000000001042d000000000100001900003f570001043000000000050100190000000000200439000000050130008c00003f3b0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000631004b00003f330000413d00000fd70130009c00000fd7030080410000006001300210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f0000112c011001c700000000020500193f553f500000040f000000010220019000003f4a0000613d000000000101043b000000000001042d000000000001042f00003f4e002104210000000102000039000000000001042d0000000002000019000000000001042d00003f53002104230000000102000039000000000001042d0000000002000019000000000001042d00003f550000043200003f560001042e00003f5700010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09c8f7ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380ae0fcab300000000000000000000000000000000000000000000000000000000616c697a696e6700000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e69746908c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000002000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024980000000200000000000000000000000000000240000001000000000000000000000000000000000000000000000000000000000000000000000000009f6506cd00000000000000000000000000000000000000000000000000000000cdaa21b600000000000000000000000000000000000000000000000000000000e30c397700000000000000000000000000000000000000000000000000000000ef36bbdd00000000000000000000000000000000000000000000000000000000f6ed201600000000000000000000000000000000000000000000000000000000f6ed201700000000000000000000000000000000000000000000000000000000fa6d5f1800000000000000000000000000000000000000000000000000000000fe1006ad00000000000000000000000000000000000000000000000000000000ef36bbde00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000e486033800000000000000000000000000000000000000000000000000000000e486033900000000000000000000000000000000000000000000000000000000ee6b13fc00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000e4676f3700000000000000000000000000000000000000000000000000000000d88b9d2d00000000000000000000000000000000000000000000000000000000e18f882100000000000000000000000000000000000000000000000000000000e18f882200000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000d88b9d2e00000000000000000000000000000000000000000000000000000000da6ab4f800000000000000000000000000000000000000000000000000000000cf329d1500000000000000000000000000000000000000000000000000000000cf329d1600000000000000000000000000000000000000000000000000000000d65bd24100000000000000000000000000000000000000000000000000000000cdaa21b700000000000000000000000000000000000000000000000000000000ce85361300000000000000000000000000000000000000000000000000000000ba437c6700000000000000000000000000000000000000000000000000000000c3db3c3500000000000000000000000000000000000000000000000000000000c7ad089400000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000c86d1a7800000000000000000000000000000000000000000000000000000000c3db3c3600000000000000000000000000000000000000000000000000000000c4ae316800000000000000000000000000000000000000000000000000000000bd212c0d00000000000000000000000000000000000000000000000000000000bd212c0e00000000000000000000000000000000000000000000000000000000be26317e00000000000000000000000000000000000000000000000000000000ba437c6800000000000000000000000000000000000000000000000000000000bc5dc4c300000000000000000000000000000000000000000000000000000000b1a250f100000000000000000000000000000000000000000000000000000000b7f2d25700000000000000000000000000000000000000000000000000000000b7f2d25800000000000000000000000000000000000000000000000000000000b9eb69f600000000000000000000000000000000000000000000000000000000b1a250f200000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000afcff50e00000000000000000000000000000000000000000000000000000000afcff50f00000000000000000000000000000000000000000000000000000000b0772d0b000000000000000000000000000000000000000000000000000000009f6506ce00000000000000000000000000000000000000000000000000000000a15753dc000000000000000000000000000000000000000000000000000000005fe3b5660000000000000000000000000000000000000000000000000000000080d45a2c0000000000000000000000000000000000000000000000000000000089afcb43000000000000000000000000000000000000000000000000000000008e8f294a000000000000000000000000000000000000000000000000000000008e8f294b000000000000000000000000000000000000000000000000000000009198e515000000000000000000000000000000000000000000000000000000009565d3d20000000000000000000000000000000000000000000000000000000089afcb44000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000088bead720000000000000000000000000000000000000000000000000000000088bead730000000000000000000000000000000000000000000000000000000088d742c20000000000000000000000000000000000000000000000000000000080d45a2d00000000000000000000000000000000000000000000000000000000856c3aa40000000000000000000000000000000000000000000000000000000079ba5096000000000000000000000000000000000000000000000000000000007dc0d1cf000000000000000000000000000000000000000000000000000000007dc0d1d0000000000000000000000000000000000000000000000000000000007ef820700000000000000000000000000000000000000000000000000000000079ba5097000000000000000000000000000000000000000000000000000000007dafcd89000000000000000000000000000000000000000000000000000000006857249b000000000000000000000000000000000000000000000000000000006857249c00000000000000000000000000000000000000000000000000000000715018a6000000000000000000000000000000000000000000000000000000005fe3b567000000000000000000000000000000000000000000000000000000006426b4a70000000000000000000000000000000000000000000000000000000037f23cd20000000000000000000000000000000000000000000000000000000055d36c97000000000000000000000000000000000000000000000000000000005c975aba000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000005d536d300000000000000000000000000000000000000000000000000000000055d36c9800000000000000000000000000000000000000000000000000000000594a67ee00000000000000000000000000000000000000000000000000000000487b0dfa00000000000000000000000000000000000000000000000000000000487b0dfb000000000000000000000000000000000000000000000000000000004e71d92d0000000000000000000000000000000000000000000000000000000037f23cd30000000000000000000000000000000000000000000000000000000038f6a434000000000000000000000000000000000000000000000000000000001bffac880000000000000000000000000000000000000000000000000000000024e6baf10000000000000000000000000000000000000000000000000000000024e6baf20000000000000000000000000000000000000000000000000000000029b6eca9000000000000000000000000000000000000000000000000000000001bffac8900000000000000000000000000000000000000000000000000000000207add91000000000000000000000000000000000000000000000000000000001b3f8c5d000000000000000000000000000000000000000000000000000000001b3f8c5e000000000000000000000000000000000000000000000000000000001b9ce575000000000000000000000000000000000000000000000000000000000104db1b000000000000000000000000000000000000000000000000000000000e32cb86310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e000000000000000000000000000000000000002000000080000000000000000095dd9193000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000001c00000000000000000182df0f50000000000000000000000000000000000000000000000000000000070a082310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffff7f000000000000000000000000000000000000000000000000ffffffffffffff1fdf37d27e88e3bd0b85262482997e409a463f5be0ebb19232abf994dd8474090d020000000000000000000000000000000000004000000000000000000000000002000002000000000000000000000000000000440000000000000000000000006f307dc3000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000008aadf79900000000000000000000000000000000000000000000000000000000fa7781ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9fffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000038d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227000000000000000000000000000000000000000040000000800000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd14e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff757064617465416c7068612875696e743132382c75696e7431323829000000009122c3fdea272423a0586803b53902139919baf05be731f04724ef8f363d378d746f67676c6550617573652829000000000000000000000000000000000000005db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586164644d61726b657428616464726573732c616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000000007aee632d000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffff5f80000000000000000000000000000000000000000000000000000000000000000313b285000000000000000000000000000000000000000000000000000000008e8f294b00000000000000000000000000000000000000000000000000000000dc0d0aab000000000000000000000000000000000000000000000000000000001322eaea77217179bf4ef6084dc2f48c897e0d5a6b8365213804360e4d8ba9a2f257f636000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000f486040c0000000000000000000000000000000000000000000000000000000083aebebd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000800000000000000000313ce56700000000000000000000000000000000000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa06974000000000000000000000000000000000000000000000000000000000000436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696dc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa5061757361626c653a207061757365640000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000006472657373000000000000000000000000000000000000000000000000000000696e76616c696420616365737320636f6e74726f6c206d616e616765722061646e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069e07adb4000000000000000000000000000000000000000000000000000000000e6c4247b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000008000000000000000006275726e286164647265737329000000000000000000000000000000000000007365744d61784c6f6f70734c696d69742875696e743235362900000000000000697373756528626f6f6c2c616464726573735b5d290000000000000000000000dd032f28700d4e4b1719b8fa26918a7d68608b4e36def571ce5fe7a3ecd69f455272e69bcef8da96614ac4a5d1e95ca02c35ea627bf7ecf389ec88d8d78b86bb98e1b31b00000000000000000000000000000000000000000000000000000000358ae03600000000000000000000000000000000000000000000000000000000b62cad690000000000000000000000000000000000000000000000000000000096e85ced0000000000000000000000000000000000000000000000000000000041976e0900000000000000000000000000000000000000000000000000000000fc57d4df000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a763ffff4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000007365745374616b6564417428616464726573735b5d2c75696e743235365b5d29947d5a840000000000000000000000000000000000000000000000000000000009d2594e8892daceca055f74be758146a8b8b1167444d0b4ccb96e74168198ccb7d09497000000000000000000000000000000000000000000000000000000007570646174654d756c7469706c6965727328616464726573732c75696e74323591e78a55b6df3a0eac1c12a64572a8c0faced385bafba688817f5ce6daa33537beb98cab0000000000000000000000000000000000000000000000000000000000c4e3d1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf02000000000000000000000000000000000000200000008000000000000000007f97254800000000000000000000000000000000000000000000000000000000a699df4aa8f89fc1f5408fe78ae114651f18b25ed1601680e4c70c15177d8b1b75d724f60000000000000000000000000000000000000000000000000000000038d22ee80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000007365744c696d69742875696e743235362c75696e7432353629000000000000006c52f3e195bdc534883e903e0612c49261a466aacd492501870b0a0ac0b18355e55fb509000000000000000000000000000000000000000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720200000000000000000000000000000000000040000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffa666642b0000000000000000000000000000000000000000000000000000000018c5e8ab000000000000000000000000000000000000000000000000000000004a3fa29300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffc0e22de1457cb61fb61b60176bc4235a9abd19466126b46692bc14fc573f099249192e7a7b00000000000000000000000000000000000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff3f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206ec7edf5cfe443c04a10a60ff6084c847114348c55b257a01d62700326219adbba416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000000000000000000000000000000000000000000000000000ffffffffffffff60000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000010000000000000000000000000000000000000000000000000000000733048c5bfffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000000000000000001c8464f76164760000001fffffffffffffffffffffffffffffff000000000000000000000000000000000ffffffffffffffffffffffffffffffe80000000000000000000000000000000000000000000000000000000000000000000000000001c8464f7616476000000000000000000000000000000000000000000000f1aaddd7742e9000000000000100000000000000000000000000000000000000f1aaddd7742e9000000000000000000000000000000000000000000000000afe10820813d78000000000000001fffffffffffffffffffffffffffffffc0000000000000000000000000000000000000000000000000000000000000000000afe10820813d780000000000000000000000000000000000000000000000002582ab704279ec00000000000000001fffffffffffffffffffffffffffffffe000000000000000000000000000000000000000000000000000000000000000002582ab704279ec00000000000000000000000000000000000000000000000001152aaa3bf81cc000000000000000001ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000001152aaa3bf81cc000000000000000000000000000000000000000000000000002f16ac6c59de70000000000000000001ffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000002f16ac6c59de70000000000000000000000000000000000000000000000000004da2cbf1be5828000000000000000001ffffffffffffffffffffffffffffffffc0000000000000000000000000000000000000000000000000000000000000004da2cbf1be58280000000000000000000000000000000000000000000000000063afbe7ab2082c000000000000000001ffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000000000000000000063afbe7ab2082c0000000000000000000000000000000000000000000000000070f5a893b608861e1f58934f97aea57efffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000070f5a893b608861e1f58934f97aea57d0000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000012aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa000000000000000000000000000000007fffffffffffffffffffffffffffffff000000000000000000000000000000010ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b000000000000000000000000000000010e38e38e38e38e38e38e38e38e38e38e000000000000000000000000000000011249249249249249249249249249249200000000000000000000000000000001199999999999999999999999999999990000000000000000000000000000000109d89d89d89d89d89d89d89d89d89d89000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000fffffffffffffffffffffffffffffffef777777777777777777777777777777800000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000108888888888888888888888888888888ffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000010e1b3be415a0000fffffffffffffffffffffffffffffffffffffffffffffffffa5f6ec094e2000000000000000000000000000000000000000000000000000005a0913f6b1e00000000000000000000000000000000000000000000000000000168244fdac78000ffffffffffffffffffffffffffffffffffffffffffffffffffb7f8bcd43e8000000000000000000000000000000000000000000000000000004807432bc18000000000000000000000000000000000000000000000000000000c0135dca04000fffffffffffffffffffffffffffffffffffffffffffffffffffe48f84e3240000000000000000000000000000000000000000000000000000001b707b1cdc000000000000000000000000000000000000000000000000000000036e0f639b800fffffffffffffffffffffffffffffffffffffffffffffffffffff9e70116080000000000000000000000000000000000000000000000000000000618fee9f8000000000000000000000000000000000000000000000000000000009c197dcc00fffffffffffffffffffffffffffffffffffffffffffffffffffffff1cf231c000000000000000000000000000000000000000000000000000000000e30dce400000000000000000000000000000000000000000000000000000000012ebd1300ffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8b6610000000000000000000000000000000000ffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000017499f000000000000000000000000000000000000000000000000000000000001a9d480ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe39c8000000000000000000000000000000000ffffffffffffffffffffffffffffff8000000000000000000000000000000000000000000000000000000000001c6380000000000000000000000000000000000000000000000000000000000001c63800000000000000000000000000000000fffffffffffffffffffffffffffffff800000000000000000000000000000000fffffffffffffffffffffffffffffffc00000000000000000000000000000000000000000000000021c3677c82b40000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000f1aaddd7742e56d32fb9f997440000000000000000000000000043cbaf42a000812488fc5c220ad7b97bf6e99e000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000afe10820813d65dfe6a33c07f738f000000000000000000000000000005d27a9f51c31b7c2f8038212a057477999100000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000002582ab704279e8efd15e0265855c47a0000000000000000000000000000001b4c902e273a58678d6d3bfdb93db96d020000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001152aaa3bf81cb9fdb76eae12d02957100000000000000000000000000000003b1cc971a9bb5b9867477440d6d1577500000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002f16ac6c59de6f8d5d6f63c1482a7c86000000000000000000000000000000015bf0a8b1457695355fb8ac404e7a79e3000000000000000000000000000000004da2cbf1be5827f9eb3ad1aa9866ebb300000000000000000000000000000000d3094c70f034de4b96ff7d5b6f99fcd800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000063afbe7ab2082ba1a0ae5e4eb1b479dc00000000000000000000000000000000a45af1e1f40c333b3de1db4dd55f29a7000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000910b022db7ae67ce76b441c27035c6a1000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000783eafef1c0a8f3978c7f81824d62ebf0000000000000000000000000000000088415abbe9a76bead8d00cf112e4d4a81086170d000000000000000000000000000000000000000000000000000000006e20696e7432353600000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e2061c3b2a8f40000000000000000000000000000000000000000000000000000000079c4747a00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe548ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec000000000000000000000000000000000000000000000000ffffffffffffffa002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eb0ece0d1a8adb875ec0fd7d608c8b3bd3b0ecce166072856f8aee7eaa1e443b", + "devdoc": { + "author": "Venus", + "custom:security-contact": "https://github.com/VenusProtocol/venus-protocol", + "events": { + "Initialized(uint8)": { + "details": "Triggered when the contract has been initialized or reinitialized." + }, + "Paused(address)": { + "details": "Emitted when the pause is triggered by `account`." + }, + "Unpaused(address)": { + "details": "Emitted when the pause is lifted by `account`." + } + }, + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "accrueInterest(address)": { + "custom:error": "Throw MarketNotSupported if market is not supported", + "params": { + "vToken": "the market for which to distribute the income" + } + }, + "accrueInterestAndUpdateScore(address,address)": { + "params": { + "market": "the market for which to accrue interest and update score", + "user": "the account address for which to accrue interest and update score" + } + }, + "addMarket(address,address,uint256,uint256)": { + "custom:access": "Controlled by ACM", + "custom:error": "Throw MarketAlreadyExists if market already existsThrow InvalidVToken if market is not valid", + "custom:event": "Emits MarketAdded event", + "params": { + "borrowMultiplier": "the multiplier for borrow cap. It should be converted to 1e18", + "comptroller": "address of the comptroller", + "market": "address of the market vToken", + "supplyMultiplier": "the multiplier for supply cap. It should be converted to 1e18" + } + }, + "burn(address)": { + "custom:access": "Controlled by ACM", + "params": { + "user": "the account address for which the prime token will be burned" + } + }, + "calculateAPR(address,address)": { + "params": { + "market": "the market for which to fetch the APR", + "user": "the account for which to get the APR" + }, + "returns": { + "aprInfo": "APR information for the user for the given market" + } + }, + "claimInterest(address)": { + "params": { + "vToken": "the market for which claim the accrued interest" + }, + "returns": { + "_0": "amount the amount of tokens transferred to the msg.sender" + } + }, + "claimInterest(address,address)": { + "params": { + "user": "the user for which to claim the accrued interest", + "vToken": "the market for which claim the accrued interest" + }, + "returns": { + "_0": "amount the amount of tokens transferred to the user" + } + }, + "claimTimeRemaining(address)": { + "params": { + "user": "the account address for which we are checking the remaining time" + }, + "returns": { + "_0": "timeRemaining the number of seconds the user needs to wait to claim prime token" + } + }, + "comptroller()": { + "returns": { + "_0": "the core pool comptroller address" + } + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "estimateAPR(address,address,uint256,uint256,uint256)": { + "params": { + "market": "the market for which to fetch the APR", + "user": "the account for which to get the APR" + }, + "returns": { + "aprInfo": "APR information for the user for the given market" + } + }, + "getAllMarkets()": { + "returns": { + "_0": "an array of addresses representing all available markets" + } + }, + "getBlockNumberOrTimestamp()": { + "details": "Function to simply retrieve block number or block timestamp", + "returns": { + "_0": "Current block number or block timestamp" + } + }, + "getInterestAccrued(address,address)": { + "params": { + "user": "the account for which to get the accrued interest", + "vToken": "the market for which to fetch the accrued interest" + }, + "returns": { + "_0": "interestAccrued the number of underlying tokens accrued by the user since the last accrual" + } + }, + "getPendingRewards(address)": { + "params": { + "user": "the account for which to get the accrued interests" + }, + "returns": { + "pendingRewards": "the number of underlying tokens accrued by the user for all markets" + } + }, + "incomeDistributionYearly(address)": { + "params": { + "vToken": "the market for which to fetch the total income that's going to distributed in a year" + }, + "returns": { + "amount": "the total income" + } + }, + "initialize(address,address,uint256,uint128,uint128,address,address,address,address,uint256)": { + "custom:error": "Throw InvalidAddress if any of the address is invalid", + "params": { + "accessControlManager_": "Address of AccessControlManager", + "alphaDenominator_": "denominator of alpha. If alpha is 0.5 then denominator is 2. alpha is alphaNumerator_/alphaDenominator_. So, 0 < alpha < 1", + "alphaNumerator_": "numerator of alpha. If alpha is 0.5 then numerator is 1. alphaDenominator_ must be greater than alphaNumerator_, alphaDenominator_ cannot be zero and alphaNumerator_ cannot be zero", + "comptroller_": "Address of core pool comptroller", + "loopsLimit_": "Maximum number of loops allowed in a single transaction", + "oracle_": "Address of Oracle", + "primeLiquidityProvider_": "Address of PrimeLiquidityProvider", + "xvsVaultPoolId_": "Pool id of XVSVault", + "xvsVaultRewardToken_": "Address of XVSVault reward token", + "xvsVault_": "Address of XVSVault" + } + }, + "initializeV2(address)": { + "params": { + "poolRegistry_": "Address of IL pool registry" + } + }, + "isUserPrimeHolder(address)": { + "returns": { + "_0": "isPrimeHolder true if user is a prime holder" + } + }, + "issue(bool,address[])": { + "custom:access": "Controlled by ACM", + "params": { + "isIrrevocable": "are the tokens being issued", + "users": "list of address to issue tokens to" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "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" + } + }, + "setLimit(uint256,uint256)": { + "custom:access": "Controlled by ACM", + "custom:error": "Throw InvalidLimit if any of the limit is less than total tokens minted", + "custom:event": "Emits MintLimitsUpdated event", + "params": { + "_irrevocableLimit": "total number of irrevocable tokens that can be minted", + "_revocableLimit": "total number of revocable tokens that can be minted" + } + }, + "setMaxLoopsLimit(uint256)": { + "custom:access": "Controlled by ACM", + "custom:event": "Emits MaxLoopsLimitUpdated event on success", + "params": { + "loopsLimit": "Number of loops limit" + } + }, + "setStakedAt(address[],uint256[])": { + "custom:access": "Controlled by ACM", + "custom:error": "Throw InvalidLength if users and timestamps length are not equal", + "custom:event": "Emits StakedAtUpdated event for each user", + "params": { + "timestamps": "new staked at timestamp for the users", + "users": "accounts for which we need to update staked at timestamp" + } + }, + "togglePause()": { + "custom:access": "Controlled by ACM" + }, + "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." + }, + "updateAlpha(uint128,uint128)": { + "custom:access": "Controlled by ACM", + "custom:event": "Emits AlphaUpdated event", + "params": { + "_alphaDenominator": "denominator of alpha. If alpha is 0.5 then denominator is 2", + "_alphaNumerator": "numerator of alpha. If alpha is 0.5 then numerator is 1" + } + }, + "updateMultipliers(address,uint256,uint256)": { + "custom:access": "Controlled by ACM", + "custom:error": "Throw MarketNotSupported if market is not supported", + "custom:event": "Emits MultiplierUpdated event", + "params": { + "borrowMultiplier": "new borrow multiplier for the market, scaled by 1e18", + "market": "address of the market vToken", + "supplyMultiplier": "new supply multiplier for the market, scaled by 1e18" + } + }, + "updateScores(address[])": { + "custom:error": "Throw NoScoreUpdatesRequired if no score updates are requiredThrow UserHasNoPrimeToken if user has no prime token", + "custom:event": "Emits UserScoreUpdated event", + "params": { + "users": "accounts for which we need to update score" + } + }, + "xvsUpdated(address)": { + "params": { + "user": "the account address whose balance was updated" + } + } + }, + "stateVariables": { + "MAXIMUM_XVS_CAP": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + }, + "MINIMUM_STAKED_XVS": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + }, + "NATIVE_MARKET": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + }, + "STAKING_PERIOD": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + }, + "WRAPPED_NATIVE_TOKEN": { + "custom:oz-upgrades-unsafe-allow": "state-variable-immutable" + } + }, + "title": "Prime", + "version": 1 + }, + "userdoc": { + "errors": { + "AssetAlreadyExists()": [ + { + "notice": "Error thrown when asset already exists" + } + ], + "ExpTooLarge(int256)": [ + { + "notice": "Thrown when exp is given too large of an argument" + } + ], + "IneligibleToClaim()": [ + { + "notice": "Error thrown when user is not eligible to claim prime token" + } + ], + "InvalidAddress()": [ + { + "notice": "Error thrown when invalid address is passed" + } + ], + "InvalidAlphaArguments()": [ + { + "notice": "Error thrown when invalid alpha arguments are passed" + } + ], + "InvalidBlocksPerYear()": [ + { + "notice": "Thrown when blocks per year is invalid" + } + ], + "InvalidComptroller()": [ + { + "notice": "Error thrown when invalid comptroller is passed" + } + ], + "InvalidLength()": [ + { + "notice": "Error thrown when invalid length is passed" + } + ], + "InvalidLimit()": [ + { + "notice": "Error thrown when mint limit is reached" + } + ], + "InvalidTimeBasedConfiguration()": [ + { + "notice": "Thrown when time based but blocks per year is provided" + } + ], + "InvalidTimestamp()": [ + { + "notice": "Error thrown when timestamp is invalid" + } + ], + "InvalidVToken()": [ + { + "notice": "Error thrown when invalid vToken is passed" + } + ], + "LnNonRealResult(int256)": [ + { + "notice": "Thrown when the natural log would have returned a number outside of ℝ" + } + ], + "LnTooLarge(int256)": [ + { + "notice": "Thrown when the natural log function is given too large of an argument" + } + ], + "MarketAlreadyExists()": [ + { + "notice": "Error thrown when market already exists" + } + ], + "MarketNotSupported()": [ + { + "notice": "Error thrown when market is not supported" + } + ], + "MaxLoopsLimitExceeded(uint256,uint256)": [ + { + "notice": "Thrown an error on maxLoopsLimit exceeds for any loop" + } + ], + "NoScoreUpdatesRequired()": [ + { + "notice": "Error thrown when no score updates are required" + } + ], + "Unauthorized(address,address,string)": [ + { + "notice": "Thrown when the action is prohibited by AccessControlManager" + } + ], + "UserHasNoPrimeToken()": [ + { + "notice": "Error thrown when user has no prime token" + } + ], + "WaitMoreTime()": [ + { + "notice": "Error thrown when user needs to wait more time to claim prime token" + } + ] + }, + "events": { + "AlphaUpdated(uint128,uint128,uint128,uint128)": { + "notice": "Emitted when alpha is updated" + }, + "Burn(address)": { + "notice": "Emitted when prime token is burned" + }, + "InterestClaimed(address,address,uint256)": { + "notice": "Emitted when interest is claimed" + }, + "MarketAdded(address,address,uint256,uint256)": { + "notice": "Emitted when a market is added to prime program" + }, + "MaxLoopsLimitUpdated(uint256,uint256)": { + "notice": "Emitted when max loops limit is set" + }, + "Mint(address,bool)": { + "notice": "Emitted when prime token is minted" + }, + "MintLimitsUpdated(uint256,uint256,uint256,uint256)": { + "notice": "Emitted when mint limits are updated" + }, + "MultiplierUpdated(address,uint256,uint256,uint256,uint256)": { + "notice": "Emitted when multiplier is updated" + }, + "NewAccessControlManager(address,address)": { + "notice": "Emitted when access control manager contract address is changed" + }, + "StakedAtUpdated(address,uint256)": { + "notice": "Emitted when stakedAt is updated" + }, + "TokenUpgraded(address)": { + "notice": "Emitted when revocable token is upgraded to irrevocable token" + }, + "UserScoreUpdated(address)": { + "notice": "Emitted when user score is updated" + } + }, + "kind": "user", + "methods": { + "MAXIMUM_XVS_CAP()": { + "notice": "maximum XVS taken in account when calculating user score" + }, + "MINIMUM_STAKED_XVS()": { + "notice": "minimum amount of XVS user needs to stake to become a prime member" + }, + "NATIVE_MARKET()": { + "notice": "address of native market contract" + }, + "STAKING_PERIOD()": { + "notice": "number of days user need to stake to claim prime token" + }, + "WRAPPED_NATIVE_TOKEN()": { + "notice": "address of wrapped native token contract" + }, + "accessControlManager()": { + "notice": "Returns the address of the access control manager contract" + }, + "accrueInterest(address)": { + "notice": "Distributes income from market since last distribution" + }, + "accrueInterestAndUpdateScore(address,address)": { + "notice": "accrues interes and updates score for an user for a specific market" + }, + "addMarket(address,address,uint256,uint256)": { + "notice": "Add a market to prime program" + }, + "alphaDenominator()": { + "notice": "denominator of alpha. Ex: if alpha is 0.5 then this will be 2" + }, + "alphaNumerator()": { + "notice": "numerator of alpha. Ex: if alpha is 0.5 then this will be 1" + }, + "blocksOrSecondsPerYear()": { + "notice": "Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored" + }, + "burn(address)": { + "notice": "For burning any prime token" + }, + "calculateAPR(address,address)": { + "notice": "Returns supply and borrow APR for user for a given market" + }, + "claim()": { + "notice": "For claiming prime token when staking period is completed" + }, + "claimInterest(address)": { + "notice": "For user to claim boosted yield" + }, + "claimInterest(address,address)": { + "notice": "For user to claim boosted yield" + }, + "claimTimeRemaining(address)": { + "notice": "fetch the numbers of seconds remaining for staking period to complete" + }, + "comptroller()": { + "notice": "Retrieves the core pool comptroller address" + }, + "estimateAPR(address,address,uint256,uint256,uint256)": { + "notice": "Returns supply and borrow APR for estimated supply, borrow and XVS staked" + }, + "getAllMarkets()": { + "notice": "Retrieves an array of all available markets" + }, + "getInterestAccrued(address,address)": { + "notice": "Returns boosted interest accrued for a user" + }, + "getPendingRewards(address)": { + "notice": "Returns boosted pending interest accrued for a user for all markets" + }, + "incomeDistributionYearly(address)": { + "notice": "the total income that's going to be distributed in a year to prime token holders" + }, + "initialize(address,address,uint256,uint128,uint128,address,address,address,address,uint256)": { + "notice": "Prime initializer" + }, + "initializeV2(address)": { + "notice": "Prime initializer V2 for initializing pool registry" + }, + "interests(address,address)": { + "notice": "vToken to user to user index" + }, + "irrevocableLimit()": { + "notice": "Indicates maximum irrevocable tokens that can be minted" + }, + "isScoreUpdated(uint256,address)": { + "notice": "mapping to check if a account's score was updated in the round" + }, + "isTimeBased()": { + "notice": "Acknowledges if a contract is time based or not" + }, + "isUserPrimeHolder(address)": { + "notice": "Returns if user is a prime holder" + }, + "issue(bool,address[])": { + "notice": "Directly issue prime tokens to users" + }, + "markets(address)": { + "notice": "vToken to market configuration" + }, + "nextScoreUpdateRoundId()": { + "notice": "unique id for next round" + }, + "oracle()": { + "notice": "The address of ResilientOracle contract" + }, + "pendingScoreUpdates()": { + "notice": "total number of accounts whose score is yet to be updated" + }, + "poolRegistry()": { + "notice": "The address of PoolRegistry contract" + }, + "primeLiquidityProvider()": { + "notice": "The address of PLP contract" + }, + "revocableLimit()": { + "notice": "Indicates maximum revocable tokens that can be minted" + }, + "setAccessControlManager(address)": { + "notice": "Sets the address of AccessControlManager" + }, + "setLimit(uint256,uint256)": { + "notice": "Set limits for total tokens that can be minted" + }, + "setMaxLoopsLimit(uint256)": { + "notice": "Set the limit for the loops can iterate to avoid the DOS" + }, + "setStakedAt(address[],uint256[])": { + "notice": "Update staked at timestamp for multiple users" + }, + "stakedAt(address)": { + "notice": "Tracks when prime token eligible users started staking for claiming prime token" + }, + "togglePause()": { + "notice": "To pause or unpause claiming of interest" + }, + "tokens(address)": { + "notice": "Mapping to get prime token's metadata" + }, + "totalIrrevocable()": { + "notice": "Tracks total irrevocable tokens minted" + }, + "totalRevocable()": { + "notice": "Tracks total revocable tokens minted" + }, + "totalScoreUpdatesRequired()": { + "notice": "total number of accounts whose score needs to be updated" + }, + "unreleasedPLPIncome(address)": { + "notice": "unreleased income from PLP that's already distributed to prime holders" + }, + "updateAlpha(uint128,uint128)": { + "notice": "Update value of alpha" + }, + "updateMultipliers(address,uint256,uint256)": { + "notice": "Update multipliers for a market" + }, + "updateScores(address[])": { + "notice": "Update total score of multiple users and market" + }, + "vTokenForAsset(address)": { + "notice": "mapping used to find if an asset is part of prime markets" + }, + "xvsUpdated(address)": { + "notice": "Executed by XVSVault whenever user's XVSVault balance changes" + }, + "xvsVault()": { + "notice": "address of XVS vault" + }, + "xvsVaultPoolId()": { + "notice": "address of XVS vault pool id" + }, + "xvsVaultRewardToken()": { + "notice": "address of XVS vault reward token" + } + }, + "notice": "Prime Token is used to provide extra rewards to the users who have staked a minimum of `MINIMUM_STAKED_XVS` XVS in the XVSVault for `STAKING_PERIOD` days", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 244, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 247, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1503, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 116, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address" + }, + { + "astId": 236, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 25, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_pendingOwner", + "offset": 0, + "slot": "101", + "type": "t_address" + }, + { + "astId": 104, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 5991, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_accessControlManager", + "offset": 0, + "slot": "151", + "type": "t_contract(IAccessControlManagerV8)6176" + }, + { + "astId": 5996, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 427, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool" + }, + { + "astId": 532, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 6233, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "maxLoopsLimit", + "offset": 0, + "slot": "251", + "type": "t_uint256" + }, + { + "astId": 6238, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 22279, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "tokens", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_address,t_struct(Token)22240_storage)" + }, + { + "astId": 22282, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "totalIrrevocable", + "offset": 0, + "slot": "302", + "type": "t_uint256" + }, + { + "astId": 22285, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "totalRevocable", + "offset": 0, + "slot": "303", + "type": "t_uint256" + }, + { + "astId": 22288, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "revocableLimit", + "offset": 0, + "slot": "304", + "type": "t_uint256" + }, + { + "astId": 22291, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "irrevocableLimit", + "offset": 0, + "slot": "305", + "type": "t_uint256" + }, + { + "astId": 22296, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "stakedAt", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 22302, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "markets", + "offset": 0, + "slot": "307", + "type": "t_mapping(t_address,t_struct(Market)22251_storage)" + }, + { + "astId": 22310, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "interests", + "offset": 0, + "slot": "308", + "type": "t_mapping(t_address,t_mapping(t_address,t_struct(Interest)22258_storage))" + }, + { + "astId": 22314, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "_allMarkets", + "offset": 0, + "slot": "309", + "type": "t_array(t_address)dyn_storage" + }, + { + "astId": 22317, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "alphaNumerator", + "offset": 0, + "slot": "310", + "type": "t_uint128" + }, + { + "astId": 22320, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "alphaDenominator", + "offset": 16, + "slot": "310", + "type": "t_uint128" + }, + { + "astId": 22323, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "xvsVault", + "offset": 0, + "slot": "311", + "type": "t_address" + }, + { + "astId": 22326, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "xvsVaultRewardToken", + "offset": 0, + "slot": "312", + "type": "t_address" + }, + { + "astId": 22329, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "xvsVaultPoolId", + "offset": 0, + "slot": "313", + "type": "t_uint256" + }, + { + "astId": 22336, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "isScoreUpdated", + "offset": 0, + "slot": "314", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_bool))" + }, + { + "astId": 22339, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "nextScoreUpdateRoundId", + "offset": 0, + "slot": "315", + "type": "t_uint256" + }, + { + "astId": 22342, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "totalScoreUpdatesRequired", + "offset": 0, + "slot": "316", + "type": "t_uint256" + }, + { + "astId": 22345, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "pendingScoreUpdates", + "offset": 0, + "slot": "317", + "type": "t_uint256" + }, + { + "astId": 22350, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "vTokenForAsset", + "offset": 0, + "slot": "318", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 22353, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "corePoolComptroller", + "offset": 0, + "slot": "319", + "type": "t_address" + }, + { + "astId": 22358, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "unreleasedPLPIncome", + "offset": 0, + "slot": "320", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 22361, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "primeLiquidityProvider", + "offset": 0, + "slot": "321", + "type": "t_address" + }, + { + "astId": 22365, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "oracle", + "offset": 0, + "slot": "322", + "type": "t_contract(ResilientOracleInterface)6206" + }, + { + "astId": 22368, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "poolRegistry", + "offset": 0, + "slot": "323", + "type": "t_address" + }, + { + "astId": 22373, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "324", + "type": "t_array(t_uint256)26_storage" + }, + { + "astId": 6319, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "__gap", + "offset": 0, + "slot": "350", + "type": "t_array(t_uint256)48_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "base": "t_address", + "encoding": "dynamic_array", + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)26_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[26]", + "numberOfBytes": "832" + }, + "t_array(t_uint256)48_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IAccessControlManagerV8)6176": { + "encoding": "inplace", + "label": "contract IAccessControlManagerV8", + "numberOfBytes": "20" + }, + "t_contract(ResilientOracleInterface)6206": { + "encoding": "inplace", + "label": "contract ResilientOracleInterface", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_struct(Interest)22258_storage))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => struct PrimeStorageV1.Interest))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_struct(Interest)22258_storage)" + }, + "t_mapping(t_address,t_struct(Interest)22258_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PrimeStorageV1.Interest)", + "numberOfBytes": "32", + "value": "t_struct(Interest)22258_storage" + }, + "t_mapping(t_address,t_struct(Market)22251_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PrimeStorageV1.Market)", + "numberOfBytes": "32", + "value": "t_struct(Market)22251_storage" + }, + "t_mapping(t_address,t_struct(Token)22240_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PrimeStorageV1.Token)", + "numberOfBytes": "32", + "value": "t_struct(Token)22240_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_struct(Interest)22258_storage": { + "encoding": "inplace", + "label": "struct PrimeStorageV1.Interest", + "members": [ + { + "astId": 22253, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "accrued", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 22255, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "score", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 22257, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "rewardIndex", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "numberOfBytes": "96" + }, + "t_struct(Market)22251_storage": { + "encoding": "inplace", + "label": "struct PrimeStorageV1.Market", + "members": [ + { + "astId": 22242, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "supplyMultiplier", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 22244, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "borrowMultiplier", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 22246, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "rewardIndex", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 22248, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "sumOfMembersScore", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 22250, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "exists", + "offset": 0, + "slot": "4", + "type": "t_bool" + } + ], + "numberOfBytes": "160" + }, + "t_struct(Token)22240_storage": { + "encoding": "inplace", + "label": "struct PrimeStorageV1.Token", + "members": [ + { + "astId": 22237, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "exists", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 22239, + "contract": "contracts/Tokens/Prime/Prime.sol:Prime", + "label": "isIrrevocable", + "offset": 1, + "slot": "0", + "type": "t_bool" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + }, + "factoryDeps": [ + "0x000300000000000200240000000000020000000003010019000000600330027000000fd703300197000200000031035500010000000103550000000102200190000000330000c13d0000008002000039000000400020043f000000040230008c000022570000413d000000000201043b000000e00220027000000fe50420009c0000006c0000213d000010160420009c000000850000a13d000010170420009c000000bb0000a13d000010180420009c000001230000a13d000010190420009c00000a1f0000a13d0000101a0420009c00000aaf0000613d0000101b0420009c00000ad00000613d0000101c0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000002402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000000401100370000000000101043b00000000001004350000013a01000039000000200010043f00000040010000393f553f1c0000040f00000014020000290000000000200435000000f20000013d0000000002000416000000000202004b000022570000c13d0000001f0230003900000fd8022001970000018002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000450000613d00000180050000390000018006400039000000000701034f000000007807043c0000000005850436000000000865004b000000410000c13d000000000502004b000000530000613d000000000141034f00000003022002100000018004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000e00130008c000022570000413d000001800100043d00000fd90210009c000022570000213d000001a00200043d00000fd90320009c000022570000213d000002400600043d000000000306004b0000000003000019000000010300c039000000000336004b000022570000c13d000002200400043d000002000500043d000001e00300043d000001c00700043d000000000806004b000008e70000613d000000000707004b00000a4c0000c13d00000fdc07000041000000010800003900000a550000013d00000fe60420009c000000ac0000a13d00000fe70420009c000000ce0000a13d00000fe80420009c0000012e0000a13d00000fe90420009c00000a280000a13d00000fea0420009c00000adc0000613d00000feb0420009c00000b100000613d00000fec0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000000001000412001600000001001d001500c00000003d000080050100003900000044030000390000000004000415000000160440008a00000c900000013d0000102f0420009c000000df0000213d0000103b0420009c0000015d0000213d000010410420009c000008ec0000213d000010440420009c00000b370000613d000010450220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d0000003302000039000000000202041a00000fd9022001970000000003000411000000000232004b00000f560000c13d000000000201004b000010530000c13d00000fe001000041000000800010043f0000002001000039000000840010043f0000002501000039000000a40010043f0000108501000041000000c40010043f0000108401000041000000e40010043f000010990100004100003f570001043000000fff0420009c000000f60000213d0000100b0420009c000001810000213d000010110120009c000008f50000213d000010140120009c00000b420000613d000010150120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013b0100003900000f520000013d000010240420009c0000018c0000213d0000102a0120009c000009060000213d0000102d0120009c00000b470000613d0000102e0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000000001000412002000000001001d001f00a00000003d000080050100003900000044030000390000000004000415000000200440008a00000c900000013d00000ff40420009c0000082e0000213d00000ffa0420009c000009260000213d00000ffd0120009c00000b4c0000613d00000ffe0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013601000039000000000101041a0000008001100270000000800010043f000010470100004100003f560001042e000010300420009c000008390000213d000010360420009c000009400000213d000010390420009c00000b570000613d0000103a0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f00000040010000393f553f1c0000040f00000f180000013d000010000420009c000008bf0000213d000010060420009c0000095b0000213d000010090420009c00000b770000613d0000100a0220009c000022570000c13d000000840230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001200000002001d0000004401100370000000000101043b001100000001001d000000e001000039000000400010043f0000002a01000039000000800010043f0000106a01000041000000a00010043f0000106b01000041000000c00010043f00000080010000393f5525850000040f0000001403000029000000000103004b000010670000c13d000000400100043d000010770200004100000a4e0000013d0000101f0420009c000009640000213d000010220120009c00000b8b0000613d000010230120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001310100003900000f520000013d00000fef0420009c000009770000213d00000ff20420009c00000b9e0000613d00000ff30220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000000102004b000010940000c13d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000010450000013d0000103c0420009c0000098a0000213d0000103f0420009c00000ba30000613d000010400220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000002402100370000000000202043b001300000002001d0000000401100370000000000101043b001400000001001d000000c001000039000000400010043f0000001901000039000000800010043f000010aa01000041000000a00010043f00000080010000393f5525850000040f0000012e01000039000000000101041a000000140110006b0000017e0000413d0000012f01000039000000000101041a000000130110006b00000f930000813d000000400100043d000010ac0200004100000a4e0000013d0000100c0420009c000009ad0000213d0000100f0420009c00000baf0000613d000010100120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000970100003900000d860000013d000010250420009c000009d30000213d000010280420009c00000c2e0000613d000010290220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000402043b000000000204004b0000000002000019000000010200c039001400000004001d000000000224004b000022570000c13d0000002402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b001100000001001d0000104e0110009c000022570000213d001000240020003d000000110100002900000005011002100000001001100029000000000131004b000022570000213d000000c001000039000000400010043f0000001501000039000000800010043f0000108d01000041000000a00010043f00000080010000393f5525850000040f000000140100006b000012080000c13d000000110100006b00000f700000613d000200000000001d000001c50000013d00000002020000290000000102200039000200000002001d000000110120006c00000f700000813d000000020100002900000005011002100000001001100029001300000001001d0000000101100367000000000101043b001400000001001d00000fd90110009c000022570000213d000000140100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000ff03200190000009580000c13d0000107c0220019700000001022001bf000000000021041b0000012f01000039000000000101041a000010af0210009c0000101a0000613d00000001021000390000012f03000039000000000023041b0000013102000039000000000202041a0000012e03000039000000000303041a000000000223004b0000017e0000213d0000013002000039000000000202041a000000000121004b0000017e0000813d0000013c01000039000000000101041a000000000101004b000002170000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000014020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000000101100367000000000101043b000f00000001001d00000fd90110009c000022570000213d0000013501000039000000000101041a000400000001001d000000000101004b000001c00000613d00000000020000190000013501000039000000000101041a000000000121004b00001dd60000a13d000700000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000e00000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000002760000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d000002c10000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c000002810000c13d0000000003000031000000200130008c00000020040000390000000004034019000002b00000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001300000009001d001200000005001d3f553f500000040f000000120a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000029d0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000002990000c13d0000001f06400190000002ac0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021a00000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001200000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000130100002900000fd9011001970000000405900039001300000001001d000000000015043500000000010004140000001202000029000000040420008c000002ec0000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000130100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000003340000013d000c00000005001d000b00000003001d00000fd70390009c00000fd7030000410000000003094019000a00400030021800000fd70310009c00000fd701008041000000c0011002100000000a011001af0000104c011001c7000d00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020170000613d0000000d030000290000104e0130009c0000000c0200002900000f810000213d000000400030043f0000105901000041000000000013043500000013010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000a011001af0000104c011001c700000012020000293f553f500000040f0000000d090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000b0a000029000003210000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000031d0000c13d0000001f06400190000003300000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020260000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001203000029000000000123004b0000101a0000413d000000000123004b0000037b0000613d000d00000002001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001203000029000000000031041b0000000e010000290000000301100039000000000101041a000000000201004b0000000002030019000003700000613d0000000d0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d9000003710000013d00000000020000190000000e010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000201100039000000000101041a001300000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000002011000390000001302000029000000000021041b0000013701000039000000000201041a0000013801000039000000000101041a0000013903000039000000000303041a000000400a00043d0000004404a000390000000f0500002900000000005404350000002404a000390000000000340435000010900300004100000000003a043500000fd9011001970000000403a000390000000000130435000000000100041400000fd902200197000000040320008c000003c20000c13d0000000003000031000000600130008c00000060040000390000000004034019000003f00000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700130000000a001d3f553f500000040f000000130a0000290000000003010019000000600330027000000fd703300197000000600430008c0000006004000039000000000403401900000005054002720000000505500210000003de0000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b000003da0000c13d0000001f06400190000003ec0000613d000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020350000613d0000001f01400039000000e00210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000600130008c000022570000413d00000000020a04330000004001a000390000000001010433001300000002001d001200000001001d000000000112004b0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000301043b000000400900043d0000104801000041000000000519043600000004019000390000000f02000029000000000021043500000012020000290000001301200069000000000213004b0000000003018019001200000003001d00000000010004140000001402000029000000040320008c000004280000c13d0000000003000031000000200130008c00000020040000390000000004034019000004570000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7001300000009001d000e00000005001d3f553f500000040f0000000e0a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004440000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000004400000c13d0000001f06400190000004530000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020440000613d0000001f01400039000000600110018f000000000a91001900000000021a004b000000000200001900000001020040390000104e04a0009c00000f810000213d000000010220019000000f810000c13d0000004000a0043f000000200230008c000022570000413d0000000002090433000800000002001d0000104a0200004100000000062a043600000000050004140000001402000029000000040420008c0000049d0000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f00000fdb011001c700130000000a001d000e00000006001d3f553f500000040f0000000e09000029000000130a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004880000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000004840000c13d0000001f06400190000004970000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020530000613d0000001f01400039000000600110018f000000000ba100190000104e02b0009c00000f810000213d0000004000b0043f000000200230008c000022570000413d00000000060a04330000104b0200004100000000072b04360000000402b000390000000f04000029000000000042043500000000050004140000001402000029000000040420008c000004e00000613d000d00000006001d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700130000000b001d000e00000007001d3f553f500000040f0000000e09000029000000130b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000004ca0000613d000000000601034f00000000070b0019000000006806043c0000000007870436000000000897004b000004c60000c13d0000001f06400190000004d90000613d0000000505500210000000000751034f00000000055b00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020620000613d0000001f01400039000000600110018f0000000d060000290000000009b100190000104e0290009c00000f810000213d000000400090043f000000200230008c000022570000413d00000000020b043300090000406200ad000000000406004b000004ed0000613d00000009546000f9000000000224004b0000101a0000c13d0000013702000039000000000202041a000010910400004100000000064904360000000904000029000e104d40400132000000000400041400000fd902200197000000040520008c000005280000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7001300000009001d000d00000006001d3f553f500000040f0000000d0a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000005130000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000050f0000c13d0000001f06400190000005220000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020710000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000d00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d0000109201000041000000000014043500000004014000390000001302000029000000000021043500000000010004140000000d02000029000000040320008c000005620000613d00000fd70340009c00000fd7030000410000000003044019001300000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000013040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020800000613d0000104e0140009c00000f810000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000c00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d00001093010000410000000001140436000d00000001001d00000004014000390000001402000029000000000021043500000000010004140000000c02000029000000040320008c001300000004001d000005960000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000013040000290000000003010019000000600330027000000fd70030019d00000fd703300197000200000001035500000001022001900000208f0000613d0000104e0140009c00000f810000213d0000001301000029000000400010043f0000106e0110009c00000f810000213d0000001302000029000000a001200039000000400010043f0000008001200039000b00000001001d00000000000104350000006001200039000a00000001001d00000000000104350000004001200039000500000001001d000000000001043500000000000204350000000d0100002900000000000104350000013701000039000000000201041a000000400a00043d000010910100004100000000051a0436000000000100041400000fd902200197000000040320008c000005b90000c13d0000000003000031000000200130008c00000020040000390000000004034019000005e80000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c7000c0000000a001d000600000005001d3f553f500000040f00000006090000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000005d50000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000005d10000c13d0000001f06400190000005e40000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000209e0000613d0000001f01400039000000600110018f0000000009a10019000000000219004b000000000200001900000001020040390000104e0490009c00000f810000213d000000010220019000000f810000c13d000000400090043f000000200230008c000022570000413d00000000020a043300000fd90420009c000022570000213d0000014204000039000000000404041a0000109405000041000000000659043600000004059000390000000000250435000000000500041400000fd902400197000000040420008c000600000002001d000006340000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c7000c00000009001d000300000006001d3f553f500000040f000000030a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000061f0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000061b0000c13d0000001f064001900000062e0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020ad0000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433000c00000001001d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000201041a00000012312000b9000000120300006b0000000c05000029000006530000613d00000012431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000065a0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000b020000290000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a00000012312000b9000000120300006b0000000c05000029000006730000613d00000012431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000067a0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000a020000290000000000120435000000400900043d0000109501000041000000000519043600000004019000390000001402000029000000000021043500000000010004140000000602000029000000040320008c0000068c0000c13d0000000003000031000000200130008c00000020040000390000000004034019000006bb0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000c00000009001d000600000005001d3f553f500000040f000000060a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000006a80000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000006a40000c13d0000001f06400190000006b70000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020bc0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433000000000201004b000006e40000613d0000000e241000b900000000321400d90000000e0220006c0000101a0000c13d00000008321000b900000000311200d90000104d5340012a000000080110006c0000101a0000c13d0000104d5120012a0000000a050000290000000005050433000000000653004b000006ed0000413d000010960440009c000006ec0000a13d0000000e645000b900000009060000290000104d0660009c000006e20000413d0000000e764000fa000000000556004b0000101a0000c13d000e0000303400e1000006ed0000013d0000000a010000290000000001010433000000000101004b00000000010000190000000002000019000006ed0000c13d00000000010000190000000002000019000e00000000001d0000000b030000290000000003030433000000000431004b000006f30000813d0000000802000029000006fd0000013d000010960220009c0000000002000019000006fd0000a13d00000008423000b9000000080400006b000006fc0000613d00000008542000fa000000000334004b0000101a0000c13d00000000121200d90000000e01200029000000000321004b0000000003000019000000010300403900000001033001900000101a0000c13d000000130300002900000000001304350000000e010000290000000d03000029000000000013043500000005010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000007300000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000400900043d000000000101043b0000077a0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c0000073b0000c13d0000000003000031000000200130008c000000200400003900000000040340190000076a0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000e0000000a001d000d00000005001d3f553f500000040f0000000d090000290000000e0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000007570000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000007530000c13d0000001f06400190000007660000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021af0000613d0000001f01400039000000600110018f0000000009a10019000000000119004b000000000100001900000001010040390000104e0290009c00000f810000213d000000010110019000000f810000c13d000000400090043f000000200130008c000022570000413d00000000010a043300000fd90210009c000022570000213d00001079020000410000000005290436000000000300041400000fd902100197000000040120008c000007850000c13d0000000003000031000000200130008c00000020040000390000000004034019000007b40000013d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000e00000009001d000d00000005001d3f553f500000040f0000000d0a0000290000000e090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000007a10000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000079d0000c13d0000001f06400190000007b00000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020cb0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000002090433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000000120120008c0000000101000039000007d30000613d00000012022000890000000a03000039000000010420019000000000543300a9000000010300603900000000311300a9000000010320008c00000001022002700000000003040019000007cb0000213d0000001302000029000000000302043300000000423100a9000000000403004b000007db0000613d00000000433200d9000000000113004b0000101a0000c13d000000130100002900000000002104350000013601000039000000000101041a0000106403100197000000800410027000000012010000293f55356a0000040f000000140200002900000000002004350000013402000039000000200020043f001300000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000f020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000001011000390000001302000029000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000301100039000000000101041a001300130010002d000000130110006b0000000001000019000000010100403900000001011001900000101a0000c13d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000003011000390000001302000029000000000021041b00000007020000290000000102200039000000040120006c000002350000413d000001c00000013d00000ff50420009c000009e00000213d00000ff80120009c00000c3a0000613d00000ff90120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001300100003900000f520000013d000010310420009c00000a070000213d000010340420009c00000c3f0000613d000010350220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000441034f000000000404043b001400000004001d0000104e0440009c000022570000213d001000240020003d000000140200002900000005022002100000001002200029000000000232004b000022570000213d0000002402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b000f00000001001d0000104e0110009c000022570000213d000e00240020003d0000000f0100002900000005011002100000000e01100029000000000131004b000022570000213d000000c001000039000000400010043f0000002001000039000000800010043f0000109a01000041000000a00010043f00000080010000393f5525850000040f00000014020000290000000f0120006c00001dd30000c13d0000000f0100006b00000f700000613d001400000000001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000140200002900000005022002100012000e0020002d00000001030003670000001204300360000000000404043b000000000101043b001300000004001d000000000114004b00001f750000213d001100100020002d0000001101300360000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001302000029000000000021041b00000001010003670000001102100360000000000502043b00000fd90250009c000022570000213d0000001201100360000000000101043b000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c040000413f553f4b0000040f0000000101200190000022570000613d00000014020000290000000102200039001400000002001d0000000f0120006c000008780000413d00000f700000013d000010010120009c00000a160000213d000010040120009c00000c6e0000613d000010050120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000c001000039000000400010043f0000000d01000039000000800010043f0000106701000041000000a00010043f00000080010000393f5525850000040f0000000002000411000000400100043d000000c903000039000000000503041a000010b004500197000000ff0550019000000f5f0000c13d00000001044001bf000000000043041b000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000103000039000010690400004100000f6d0000013d000000000807004b00000a540000c13d000000400100043d00000fda0200004100000a4e0000013d000010420120009c00000c730000613d000010430120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001370100003900000d860000013d000010120120009c00000c810000613d000010130120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013502000039000000000102041a000000800010043f00000000002004350000002002000039000000000301004b00000f720000c13d000000a0010000390000000004020019000010210000013d0000102b0120009c00000c860000613d0000102c0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000003301000039000000000201041a00000fd9052001970000000003000411000000000335004b00000f560000c13d0000006503000039000000000403041a0000105b04400197000000000043041b0000105b02200197000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d0400004100000000060000193f553f4b0000040f0000000101200190000022570000613d00000f700000013d00000ffb0420009c00000c960000613d00000ffc0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b000000000302001900000fd90220009c000022570000213d0000002401100370000000000101043b001400000001001d00000fd90110009c000022570000213d0000000001030019001300000001001d3f5523c70000040f000000130100002900000014020000293f5539890000040f000010460000013d000010370120009c00000cae0000613d000010380120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000000100041100000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000000000102004b00000fb20000c13d000000400100043d000010a10200004100000a4e0000013d000010070120009c00000cb30000613d000010080120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000fb0100003900000f520000013d000010200420009c00000cb80000613d000010210220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d3f552efd0000040f000000000200041100000014010000293f552f130000040f000010460000013d00000ff00420009c00000cbd0000613d00000ff10220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013e01000039000000200010043f00000040010000393f553f1c0000040f00000d860000013d0000103d0420009c00000cd60000613d0000103e0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d000000000200041a0000fffe0320019000000fd90000c13d0000014303000039000000000403041a0000105b04400197000000000114019f000000000013041b0000107c0120019700000002011001bf000000000010041b0000000201000039000000800010043f000000000100041400000fd70210009c00000fd701008041000000c001100210000010a4011001c70000800d02000039000000010300003900000fe30400004100000f6d0000013d0000100d0420009c00000cfa0000613d0000100e0220009c000022570000c13d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b00000fd90320009c000022570000213d0000002401100370000000000101043b001400000001001d00000fd90110009c000022570000213d00000000002004350000013401000039000000200010043f00000040010000393f553f1c0000040f00000014020000290000000000200435000000200010043f00000040010000393f553f1c0000040f0000000202100039000000000202041a0000000103100039000000000303041a000000000101041a000000800010043f000000a00030043f000000c00020043f000010780100004100003f560001042e000010260120009c00000d820000613d000010270120009c000022570000c13d0000000001000416000000000101004b000022570000c13d0000013601000039000000000101041a0000106401100197000000800010043f000010470100004100003f560001042e00000ff60420009c00000d8b0000613d00000ff70120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000010460100004100000000001004390000000001000412000000040010044300000040010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000010210008c0000103a0000613d000000020110008c0000104d0000c13d00001062010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000010450000013d000010320420009c00000f140000613d000010330220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d3f5522a60000040f000010460000013d000010020120009c00000f1b0000613d000010030120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000001410100003900000d860000013d0000101d0420009c00000f2e0000613d0000101e0120009c000022570000c13d0000000001000416000000000101004b000022570000c13d000000330100003900000d860000013d00000fed0420009c00000f440000613d00000fee0220009c000022570000c13d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000601043b00000fd90160009c000022570000213d0000003301000039000000000101041a00000fd9051001970000000001000411000000000115004b00000f560000c13d0000006501000039000000000201041a0000105b02200197000000000262019f000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000105d040000413f553f4b0000040f0000000101200190000022570000613d00000f700000013d000000400100043d00000fdd02000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f57000104300000000208000039000000a00060043f000000800070043f000000c00080043f000000e00010043f000001000020043f000001600030043f000001200050043f000001400040043f000000000900041a0000ff000a90019000000a9b0000c13d000000ff0a90018f000000ff0aa0008c00000a7f0000613d000000ff019001bf000000000010041b000000ff01000039000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900000fe3040000413f553f4b0000040f0000000101200190000022570000613d000001600300043d000001400400043d000001200500043d000001000200043d000000e00100043d000000c00800043d000000a00600043d000000800700043d0000014000000443000001600070044300000020070000390000018000700443000001a0006004430000004006000039000001c000600443000001e000800443000000600600003900000200006004430000022000100443000000800100003900000240001004430000026000200443000000a0010000390000028000100443000002a000500443000000c001000039000002c000100443000002e000400443000000e0010000390000030000100443000003200030044300000100007004430000000801000039000001200010044300000fe40100004100003f560001042e000000400100043d000000640210003900000fde030000410000000000320435000000440210003900000fdf03000041000000000032043500000024021000390000002703000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f5700010430000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013301000039000000200010043f00000040010000393f553f1c0000040f0000000402100039000000000202041a0000000303100039000000000303041a0000000204100039000000000404041a0000000105100039000000000505041a000000000101041a000000800010043f000000a00050043f000000c00040043f000000e00030043f000000ff012001900000000001000019000000010100c039000001000010043f0000108a0100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d3f5523c70000040f000000000100001900003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000201043b00000fd90120009c000022570000213d0000013501000039000000000101041a000d00000001001d0000104e0110009c00000f810000213d0000000d0100002900000005031002100000003f013000390000104f04100197000010500140009c00000f810000213d0000008001400039000000400010043f0000000d05000029000000800050043f000000000505004b000011a50000c13d00000020020000390000000002210436000000800300043d00000000003204350000004002100039000000000403004b000010310000613d0000000004000019000000800800003900000020088000390000000005080433000000007605043400000fd9066001970000000006620436000000000707043300000fd9077001970000000000760435000000400550003900000000050504330000004006200039000000000056043500000060022000390000000104400039000000000534004b00000aff0000413d000010310000013d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002401100370000000000101043b001300000001001d00000fd90110009c000022570000213d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f000000e00000043f000001000000043f000001200000043f000001400000043f000001600000043f000001800000043f000001a00000043f0000104801000041000001c00010043f0000001301000029000001c40010043f00000000010004140000001402000029000000040320008c000010b80000c13d0000000004000031000000200140008c0000002004008039000010df0000013d0000000001000416000000000101004b000022570000c13d0000000001000412002400000001001d002300e00000003d000080050100003900000044030000390000000004000415000000240440008a00000c900000013d0000000001000416000000000101004b000022570000c13d0000012f0100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000013f0100003900000d860000013d0000000001000416000000000101004b000022570000c13d0000000001000412001800000001001d001700800000003d000080050100003900000044030000390000000004000415000000180440008a00000c7d0000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d0000013701000039000000000201041a0000013901000039000000000101041a0000013803000039000000000303041a0000109004000041000000800040043f00000fd903300197000000840030043f000000a40010043f0000001401000029000000c40010043f000000000100041400000fd902200197000000040320008c00000fe50000c13d0000000003000031000000600130008c000000600400003900000000040340190000100e0000013d000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002401100370000000000101043b001300000001001d00000fd90110009c000022570000213d3f552efd0000040f000000140100002900000013020000293f552f130000040f000010460000013d000000240130008c000022570000413d0000000001000416000000000101004b000022570000c13d000000c001000039000000400010043f0000001901000039000000800010043f0000108c01000041000000a00010043f00000080010000393f5525850000040f00000004010000390000000101100367000000000101043b3f552ecf0000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d000000650100003900000d860000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d0000000000100435000001400100003900000f4f0000013d000001440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001210640020019b000010640220009c000022570000213d0000008402100370000000000202043b000010640220009c000022570000213d000000a402100370000000000202043b001100000002001d00000fd90220009c000022570000213d000000c402100370000000000202043b001000000002001d00000fd90220009c000022570000213d000000e402100370000000000202043b000f00000002001d00000fd90220009c000022570000213d0000010401100370000000000101043b000e00000001001d00000fd90110009c000022570000213d00000000010004150000001c0110008a000c000500100218000000000100041a000d00000001001d000bff000010019400001e310000c13d00000000010004150000001b0110008a000c0005001002180000000d01000029000000ff0110019000001e310000c13d0000000d010000290000107c0110019700000101011001bf000d00000000001d000000000010041b000000100200006b00001f720000613d000000140200006b00001f720000613d000000130200006b00001f720000613d0000000e0200006b00001f720000613d00000001020003670000008403200370000000000303043b00001064043001970000006405200370000000000505043b000010640550019800001f870000613d000000000445004b00001f870000813d000000800330021000000012033001af0000013604000039000000000034041b0000013803000039000000000403041a0000105b0440019700000013044001af000000000043041b0000004402200370000000000202043b0000013903000039000000000023041b0000013702000039000000000302041a0000105b0330019700000014033001af000000000032041b0000013b02000039000000000002041b0000014102000039000000000302041a0000105b0330019700000010033001af000000000032041b0000013f02000039000000000302041a0000105b033001970000000f033001af000000000032041b0000014202000039000000000302041a0000105b033001970000000e033001af000000000032041b0000ff000110019000001fd30000c13d000000400100043d00000064021000390000108603000041000000000032043500000044021000390000108703000041000000000032043500000024021000390000002b0300003900000aa40000013d0000000001000416000000000101004b000022570000c13d0000006501000039000000000101041a00000fd9021001970000000001000411000000000212004b00000f870000c13d3f552eb60000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d0000012e0100003900000f520000013d000000640230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000004402100370000000000202043b001300000002001d0000002401100370000000000101043b001200000001001d000000e001000039000000400010043f0000002a01000039000000800010043f0000109e01000041000000a00010043f0000106b01000041000000c00010043f00000080010000393f5525850000040f000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000201043b0000000401200039000000000101041a000000ff01100190000011040000c13d000000400100043d000010a50200004100000a4e0000013d0000000001000416000000000101004b000022570000c13d0000013d0100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000000001000412002200000001001d002100600000003d000080050100003900000044030000390000000004000415000000220440008a000000050440021000001046020000413f553f2d0000040f00000d870000013d0000000001000416000000000101004b000022570000c13d000001430100003900000d860000013d0000000001000416000000000101004b000022570000c13d0000000001000412001e00000001001d001d00000000001d0000800501000039000000440300003900000000040004150000001e0440008a000000050440021000001046020000413f553f2d0000040f000000800010043f000010470100004100003f560001042e000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b000000000302001900000fd90220009c000022570000213d0000002401100370000000000101043b000000000201001900000fd90110009c000022570000213d0000000001030019001400000001001d001300000002001d3f55263a0000040f000000140100002900000013020000293f5528950000040f000000000100001900003f560001042e0000000001000416000000000101004b000022570000c13d000001390100003900000f520000013d0000000001000416000000000101004b000022570000c13d0000013c0100003900000f520000013d0000000001000416000000000101004b000022570000c13d000001380100003900000d860000013d000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f00000040010000393f553f1c0000040f000000000101041a000000ff021001900000000002000019000000010200c039000000800020043f0000ff00011001900000000001000019000000010100c039000000a00010043f0000105e0100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b0000104e0420009c000022570000213d0000002304200039000000000434004b000022570000813d0000000404200039000000000141034f000000000101043b000200000001001d0000104e0110009c000022570000213d000100240020003d000000020100002900000005011002100000000101100029000000000131004b000022570000213d0000013d01000039000000000101041a000000000101004b00000cf60000613d0000013b01000039000000000101041a000000000101004b000012c40000c13d000010a801000041000000800010043f000010a90100004100003f5700010430000000a40230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001400000002001d00000fd90220009c000022570000213d0000002402100370000000000202043b001300000002001d00000fd90220009c000022570000213d0000006402100370000000000202043b001200000002001d0000004401100370000000000101043b001100000001001d000001c001000039000000400010043f000000800000043f000000a00000043f000000c00000043f000000e00000043f000001000000043f000001200000043f000001400000043f000001600000043f000001800000043f000001a00000043f000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000301100039000000000101041a001000000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000101041a000000100210006b0000101a0000413d0000001001100069000000c00010043f00000084010000390000000101100367000000000101043b001300000001001d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000130210006c0000001301008029000001000010043f0000001102000029000000120300002900000014040000293f5533a20000040f0000000032010434000001200020043f0000000002030433000001400020043f00000040021000390000000002020433000001600020043f00000060021000390000000002020433000001800020043f00000080011000390000000001010433000001a00010043f00000014010000293f552e180000040f0000107902000041000000400300043d001300000003001d0000000002230436001000000002001d000000000300041400000fd902100197000000040120008c00001deb0000c13d0000000004000031000000200140008c000000200400803900001e190000013d0000000001000416000000000101004b000022570000c13d0000014201000039000000000101041a00000fd901100197000000800010043f000010470100004100003f560001042e000000440230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000402100370000000000202043b001410640020019b000010640220009c000022570000213d0000002401100370000000000101043b001300000001001d000010640110009c000022570000213d000000c001000039000000400010043f0000001c01000039000000800010043f0000106501000041000000a00010043f00000080010000393f5525850000040f000000400100043d0000001407000029000000000207004b00001f880000613d0000001303000029000000000237004b00001f880000813d0000013602000039000000000202041a000000000031043500000fd70310009c00000fd7010080410000004001100210000000000300041400000fd70430009c00000fd703008041000000c003300210000000000113019f00000fe2011001c7000010640520019700000080062002700000800d02000039000000040300003900001066040000413f553f4b0000040f0000000101200190000022570000613d0000001301000029000000800110021000000014011001af0000013602000039000000000012041b0000013501000039000000000101041a000f00000001001d000000000101004b000011280000613d000000000200001900000dcd0000013d000000120200002900000001022000390000000f0120006c000011280000813d0000013501000039000000000101041a000000000121004b00001dd60000a13d001200000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001100000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00000e0e0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001400000001001d00000e590000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00000e190000c13d0000000003000031000000200130008c0000002004000039000000000403401900000e480000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001400000009001d001300000005001d3f553f500000040f000000130a00002900000014090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200000e350000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000e310000c13d0000001f0640019000000e440000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001f780000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001400000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001300000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000140100002900000fd9011001970000000405900039001400000001001d000000000015043500000000010004140000001302000029000000040420008c00000e840000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000140100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900000ecc0000013d000e00000005001d000d00000003001d00000fd70390009c00000fd7030000410000000003094019000c00400030021800000fd70310009c00000fd701008041000000c0011002100000000c011001af0000104c011001c7001000000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001eb30000613d00000010030000290000104e0130009c0000000e0200002900000f810000213d000000400030043f0000105901000041000000000013043500000014010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000c011001af0000104c011001c700000013020000293f553f500000040f00000010090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000d0a00002900000eb90000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00000eb50000c13d0000001f0640019000000ec80000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001ec20000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d000000140100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001303000029000000000123004b0000101a0000413d000000000123004b00000dc90000613d001000000002001d000000140100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001303000029000000000031041b00000011010000290000000301100039000000000101041a000000000201004b000000000203001900000f080000613d000000100320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d900000f090000013d000000000200001900000011010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b00000dc90000013d0000000001000416000000000101004b000022570000c13d000000c901000039000000000101041a000000ff0110019000000f290000013d0000000001000416000000000101004b000022570000c13d0000000001000412001a00000001001d001900200000003d0000800501000039000000440300003900000000040004150000001a0440008a000000050440021000001046020000413f553f2d0000040f000000000101004b0000000001000019000000010100c039000000800010043f000010470100004100003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b001400000001001d00000fd90110009c000022570000213d000000c001000039000000400010043f0000000d01000039000000800010043f0000108b01000041000000a00010043f00000080010000393f5525850000040f00000014010000293f552a430000040f000000000100001900003f560001042e000000240230008c000022570000413d0000000002000416000000000202004b000022570000c13d0000000401100370000000000101043b00000fd90210009c000022570000213d00000000001004350000013201000039000000200010043f00000040010000393f553f1c0000040f000000000101041a000000800010043f000010470100004100003f560001042e00000fe001000041000000800010043f0000002001000039000000840010043f000000a40010043f000010ad01000041000000c40010043f000010a20100004100003f5700010430000000000043041b000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900001068040000413f553f4b0000040f0000000101200190000022570000613d000000000100001900003f560001042e000000a005000039000010520300004100000000040000190000000006050019000000000503041a00000fd905500197000000000556043600000001033000390000000104400039000000000714004b00000f750000413d000000410160008a000010b104100197000010500140009c000010200000a13d000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f570001043000000fe001000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f0000109701000041000000c40010043f0000109801000041000000e40010043f000010990100004100003f57000104300000013001000039000000000601041a0000013101000039000000000501041a000000400100043d0000001302000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000403000039000010ab0400004100000014070000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000013002000039000000000012041b00000014010000290000013102000039000000000012041b000000000100001900003f560001042e001400000002001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000201043b001300000002001d000000140120006c0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d0000001303000029000000140230006a000000000101043b000000000112004b00001b160000813d000000400100043d000010a00200004100000a4e0000013d00000fe001000041000000800010043f0000002001000039000000840010043f0000002e01000039000000a40010043f0000107b01000041000000c40010043f0000107a01000041000000e40010043f000010990100004100003f570001043000000fd70310009c00000fd701008041000000c001100210000010a2011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f000000050640027200000ffb0000613d000000800700003900000005086002100000008008800039000000000901034f000000009a09043c0000000007a70436000000000a87004b00000ff70000c13d000000000705004b0000100a0000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000112b0000613d0000001f01400039000000e00110018f0000008001100039000000400010043f000000600130008c000022570000413d000000c00100043d000000800200043d001300000001001d001200000002001d000000000112004b0000113a0000813d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300000008001400039000000400010043f0000000000210435000000a002400039000000800300043d0000000000320435000000c002400039000000000403004b000010310000613d000000a0040000390000000005000019000000004604043400000fd90660019700000000026204360000000105500039000000000635004b0000102b0000413d000000000212004900000fd70320009c00000fd702008041000000600220021000000fd70310009c00000fd7010080410000004001100210000000000112019f00003f560001042e0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000400200043d000000000012043500000fd70120009c00000fd702008041000000400120021000001061011001c700003f560001042e000010630100004100000000001004350000005101000039000000040010043f0000104c0100004100003f57000104300000009702000039000000000302041a0000105b04300197000000000414019f000000000042041b00000fd902300197000000800020043f000000a00010043f000000000100041400000fd70210009c00000fd701008041000000c001100210000010ae011001c70000800d0200003900000001030000390000107e040000413f553f4b0000040f000000010120019000000f700000c13d000022570000013d0000013f01000039000000000101041a00000fd901100197000000000113004b000011b80000c13d000000130100002900000fd901100197000f00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d001000000002001d000000000101043b000c00000001001d0000000401100039000e00000001001d000000000101041a000d00000001001d000000ff0110019000001b0e0000c13d000010710100004100000010020000290000000001120436000b00000001001d00000004012000390000000f02000029000000000021043500000000010004140000001402000029000000040220008c00001d8c0000c13d0000000004000031000000200140008c000000200400803900001dbb0000013d001400000002001d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d0000104601000041000000000010043900000000010004120000000400100443000000e0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d0000001303000029000000140230006a000000000301043b000000000123004b00000000010000190000000001232049000010460000013d00000fd70310009c00000fd701008041000000c00110021000001049011001c73f553f500000040f000001c0090000390000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000010cc0000613d000000000701034f000000007807043c0000000009890436000001e00890008c000010c80000c13d000000000705004b000010db0000613d0000000506600210000000000761034f0000000305500210000001c006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000011c60000613d0000001f01400039000000600110018f000001c002100039001200000002001d000000400020043f000000200240008c000022570000413d000001c00200043d001000000002001d0000104a0200004100000012050000290000000002250436001100000002001d00000000040004140000001402000029000000040320008c000011d60000c13d0000000002150019001100000002001d000000400020043f00000012020000290000000002020433001200000002001d0000104b0200004100000011040000290000000002240436000f00000002001d00000004024001bf0000001303000029000000000032043500000000020004140000001403000029000000040330008c00001a850000c13d0000000001410019000000400010043f00001ab60000013d0000001401000029001100000002001d3f5523c70000040f0000001101000029000000000601041a0000000101100039001000000001001d000000000701041a000000400100043d0000002002100039000000130300002900000000003204350000001202000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d0200003900000004030000390000109f0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000012010000290000001102000029000000000012041b00000013010000290000001002000029000000000012041b3f552dfd0000040f000000000100001900003f560001042e000000400200043d0000001f0430018f00000005053002720000000505500210000011370000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000011330000c13d000000000604004b00001d770000613d00001d6b0000013d0000104601000041000000000010043900000000010004120000000400100443000000a0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001100000001001d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a001000000001001d0000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400400043d000010a30240009c00000f810000213d0000001203000029000000130230006a000000000101043b0000004003400039000000400030043f000000000101041a0000ff00031001900000000003000019000000010300c0390000002005400039001300000005001d0000000000350435000000ff011001900000000003000019000000010300c039000000000034043500001e510000613d000000110420006b00001e510000a13d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000001041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c0400004100000014050000293f553f4b0000040f0000000101200190000022570000613d00000013010000290000000001010433000000000101004b00000f400000613d00000014010000293f5529a40000040f000000000100001900003f560001042e000010510440009c00000f810000213d00000000040000190000006005100039000000400050043f00000040051000390000000000050435000000200510003900000000000504350000000000010435000000a00540003900000000001504350000002004400039000000000134004b00001b1c0000813d000000400100043d0000105a0510009c000011a80000a13d00000f810000013d0000014301000039000000000201041a000000400900043d0000106c01000041000000000019043500000004019000390000000000310435000000000100041400000fd902200197000000040320008c000019f50000c13d0000000201000367000000000300003100001a080000013d000000400200043d0000001f0430018f0000000505300272000011d20000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000011ce0000c13d000000000604004b00001d770000613d000000050550021000001d6b0000013d000000400150021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000110a000029000011ed0000613d000000000701034f0000001208000029000000007907043c00000000089804360000000009a8004b000011e90000c13d000000000705004b000011fc0000613d0000000506600210000000000761034f00000012066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001aff0000613d0000001f01400039000000600110018f0000001202100029001100000002001d000000400020043f000000200230008c000010f30000813d000022570000013d000000110100006b00000f700000613d001400000000001d000012110000013d00000014020000290000000102200039001400000002001d000000110120006c00000f700000813d000000140100002900000005011002100000001001100029001200000001001d0000000101100367000000000101043b00000fd90210009c000022570000213d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000012020000290000000102200367000000000302043b000000000101043b000000000101041a000000ff02100190001300000003001d000012600000613d0000ff0001100190000012600000c13d00000fd90130009c000022570000213d00000000003004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000010b20220019700000100022001bf000000000021041b0000012e03000039000000000103041a000010af0210009c0000101a0000613d0000000102100039000000000023041b0000012f02000039000000000202041a000000000302004b0000101a0000613d000000010220008a0000012f03000039000000000023041b0000013102000039000000000202041a000000000121004b0000017e0000813d000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000002030000390000108f040000413f553f4b0000040f00000001012001900000120c0000c13d000022570000013d00000fd90130009c000022570000213d00000000003004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000000ff03200190000009580000c13d0000107c0220019700000101022001bf000000000021041b0000012e03000039000000000103041a000010af0210009c0000101a0000613d0000000102100039000000000023041b0000013102000039000000000202041a000000000121004b0000017e0000813d0000013001000039000000000101041a0000012f02000039000000000202041a000000000112004b0000017e0000213d0000013c01000039000000000101041a000000000101004b000012ab0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013030000290000000102200190000022570000613d000000000101043b0000000000300435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000013050000290000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d0000000102000039000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e040000413f553f4b0000040f0000000101200190000022570000613d00000012010000290000000101100367000000000101043b00000fd90210009c000022570000213d3f552bd60000040f0000120c0000013d000000020100006b00000f700000613d000400000000001d000012cd0000013d00000004020000290000000102200039000400000002001d000000020120006c00000f700000813d0000000401000029000000050110021000000001011000290000000101100367000000000101043b001300000001001d00000fd90110009c000022570000213d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff011001900000219d0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000012c80000c13d0000013501000039000000000101041a000800000001001d000000000101004b000019c10000613d0000000002000019000013140000013d000000000101043b00000001011000390000001202000029000000000021041b00000010020000290000000102200039000000080120006c000019c10000813d0000013501000039000000000101041a000000000121004b00001dd60000a13d001000000002001d0000105201200041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000401100039000000000101041a000000ff01100190000015180000613d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000015180000613d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000f00000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000013780000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001200000001001d000013c30000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c000013830000c13d0000000003000031000000200130008c00000020040000390000000004034019000013b20000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001200000009001d001100000005001d3f553f500000040f000000110a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000139f0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000139b0000c13d0000001f06400190000013ae0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021be0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001100000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000120100002900000fd9011001970000000405900039001200000001001d000000000015043500000000010004140000001102000029000000040420008c000013ee0000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000120100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000014360000013d000d00000005001d000c00000003001d00000fd70390009c00000fd7030000410000000003094019000b00400030021800000fd70310009c00000fd701008041000000c0011002100000000b011001af0000104c011001c7000e00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000020da0000613d0000000e030000290000104e0130009c0000000d0200002900000f810000213d000000400030043f0000105901000041000000000013043500000012010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000b011001af0000104c011001c700000011020000293f553f500000040f0000000e090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000c0a000029000014230000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b0000141f0000c13d0000001f06400190000014320000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020e90000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001100000001001d000000120100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001103000029000000000123004b0000101a0000413d000000000123004b0000147d0000613d000e00000002001d000000120100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001103000029000000000031041b0000000f010000290000000301100039000000000101041a000000000201004b0000000002030019000014720000613d0000000e0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d9000014730000013d00000000020000190000000f010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d0000105a0320009c00000f810000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a001100000004001d000000000034043500000040022000390000000201100039000000000101041a001200000002001d0000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000012020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b0000101a0000413d00000011030000290000000003030433000000000421004900000000564300a9000000000121004b000014c50000613d00000000214600d9000000000131004b0000101a0000c13d000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039001200000006001d3f553f500000040f00000012030000290012104d303001320000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000301041a0000001202300029000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000201100039000000000101041a001200000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000002011000390000001202000029000000000021041b000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000e00000001001d0000000401100039000000000101041a000000ff01100190000013100000613d000000130100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a000000ff01100190000013100000613d0000013701000039000000000201041a0000013801000039000000000101041a0000013903000039000000000303041a000000400a00043d0000004404a00039000000130500002900000000005404350000002404a000390000000000340435000010900300004100000000003a043500000fd9011001970000000403a000390000000000130435000000000100041400000fd902200197000000040320008c000015560000c13d0000000003000031000000600130008c00000060040000390000000004034019000015840000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700120000000a001d3f553f500000040f000000120a0000290000000003010019000000600330027000000fd703300197000000600430008c0000006004000039000000000403401900000005054002720000000505500210000015720000613d00000000065a0019000000000701034f00000000080a0019000000007907043c0000000008980436000000000968004b0000156e0000c13d0000001f06400190000015800000613d000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020f80000613d0000001f01400039000000e00210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000600130008c000022570000413d00000000020a04330000004001a000390000000001010433001200000002001d001100000001001d000000000112004b0000101a0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000301043b000000400900043d0000104801000041000000000519043600000004019000390000001302000029000000000021043500000011020000290000001201200069000000000213004b0000000003018019001100000003001d00000000010004140000001402000029000000040320008c000015bc0000c13d0000000003000031000000200130008c00000020040000390000000004034019000015eb0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7001200000009001d000f00000005001d3f553f500000040f0000000f0a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000015d80000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000015d40000c13d0000001f06400190000015e70000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021070000613d0000001f01400039000000600110018f000000000a91001900000000021a004b000000000200001900000001020040390000104e04a0009c00000f810000213d000000010220019000000f810000c13d0000004000a0043f000000200230008c000022570000413d0000000002090433000700000002001d0000104a0200004100000000062a043600000000050004140000001402000029000000040420008c000016310000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f00000fdb011001c700120000000a001d000f00000006001d3f553f500000040f0000000f09000029000000120a0000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000161c0000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000016180000c13d0000001f064001900000162b0000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021160000613d0000001f01400039000000600110018f000000000ba100190000104e02b0009c00000f810000213d0000004000b0043f000000200230008c000022570000413d00000000060a04330000104b0200004100000000072b04360000000402b000390000001304000029000000000042043500000000050004140000001402000029000000040420008c000016740000613d000d00000006001d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700120000000b001d000f00000007001d3f553f500000040f0000000f09000029000000120b0000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000165e0000613d000000000601034f00000000070b0019000000006806043c0000000007870436000000000897004b0000165a0000c13d0000001f064001900000166d0000613d0000000505500210000000000751034f00000000055b00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021250000613d0000001f01400039000000600110018f0000000d060000290000000009b100190000104e0290009c00000f810000213d000000400090043f000000200230008c000022570000413d00000000020b043300090000406200ad000000000406004b000016810000613d00000009546000f9000000000224004b0000101a0000c13d0000013702000039000000000202041a000010910400004100000000064904360000000904000029000f104d40400132000000000400041400000fd902200197000000040520008c000016bc0000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7001200000009001d000d00000006001d3f553f500000040f0000000d0a00002900000012090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000016a70000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000016a30000c13d0000001f06400190000016b60000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021340000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d00000fd90110009c000022570000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000d00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d0000109201000041000000000014043500000004014000390000001202000029000000000021043500000000010004140000000d02000029000000040320008c000016f60000613d00000fd70340009c00000fd7030000410000000003044019001200000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000012040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000021430000613d0000104e0140009c00000f810000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000c00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400400043d00001093010000410000000001140436000d00000001001d00000004014000390000001402000029000000000021043500000000010004140000000c02000029000000040320008c001200000004001d0000172a0000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f00000012040000290000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000021520000613d0000104e0140009c00000f810000213d0000001201000029000000400010043f0000106e0110009c00000f810000213d0000001202000029000000a001200039000000400010043f0000008001200039000b00000001001d00000000000104350000006001200039000a00000001001d00000000000104350000004004200039000000000004043500000000000204350000000d0100002900000000000104350000013701000039000000000201041a000000400a00043d000010910100004100000000051a0436000000000100041400000fd902200197000000040320008c000500000004001d0000174d0000c13d0000000003000031000000200130008c000000200400003900000000040340190000177c0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c7000c0000000a001d000600000005001d3f553f500000040f00000006090000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000017690000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000017650000c13d0000001f06400190000017780000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021610000613d0000001f01400039000000600110018f0000000009a10019000000000219004b000000000200001900000001020040390000104e0490009c00000f810000213d000000010220019000000f810000c13d000000400090043f000000200230008c000022570000413d00000000020a043300000fd90420009c000022570000213d0000014204000039000000000404041a0000109405000041000000000659043600000004059000390000000000250435000000000500041400000fd902400197000000040420008c000600000002001d000017c80000613d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c7000c00000009001d000300000006001d3f553f500000040f000000030a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000017b30000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000017af0000c13d0000001f06400190000017c20000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021700000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433000c00000001001d000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000201041a00000011312000b9000000110300006b0000000c05000029000017e70000613d00000011431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b000017ee0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000b020000290000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a00000011312000b9000000110300006b0000000c05000029000018070000613d00000011431000fa000000000223004b0000101a0000c13d0000104d1210012a00000000315200a9000000000305004b0000180e0000613d00000000435100d9000000000223004b0000101a0000c13d0000104d2110012a0000000a020000290000000000120435000000400900043d0000109501000041000000000519043600000004019000390000001402000029000000000021043500000000010004140000000602000029000000040320008c000018200000c13d0000000003000031000000200130008c000000200400003900000000040340190000184f0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000c00000009001d000600000005001d3f553f500000040f000000060a0000290000000c090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000183c0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000018380000c13d0000001f064001900000184b0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000217f0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433000000000201004b000018780000613d0000000f241000b900000000321400d90000000f0220006c0000101a0000c13d00000007321000b900000000311200d90000104d5340012a000000070110006c0000101a0000c13d0000104d5120012a0000000a050000290000000005050433000000000653004b000018810000413d000010960440009c000018800000a13d0000000f645000b900000009060000290000104d0660009c000018760000413d0000000f764000fa000000000556004b0000101a0000c13d000f0000303400e1000018810000013d0000000a010000290000000001010433000000000101004b00000000010000190000000002000019000018810000c13d00000000010000190000000002000019000f00000000001d0000000b030000290000000003030433000000000431004b000018870000813d0000000702000029000018910000013d000010960220009c0000000002000019000018910000a13d00000007423000b9000000070400006b000018900000613d00000007542000fa000000000334004b0000101a0000c13d00000000121200d90000000f01200029000000000321004b0000000003000019000000010300403900000001033001900000101a0000c13d000000120300002900000000001304350000000f010000290000000d03000029000000000013043500000005010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b000018c40000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000400900043d000000000101043b0000190e0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c000018cf0000c13d0000000003000031000000200130008c00000020040000390000000004034019000018fe0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000f0000000a001d000d00000005001d3f553f500000040f0000000d090000290000000f0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000018eb0000613d000000000601034f00000000070a0019000000006806043c0000000007870436000000000897004b000018e70000c13d0000001f06400190000018fa0000613d0000000505500210000000000751034f00000000055a00190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000021cd0000613d0000001f01400039000000600110018f0000000009a10019000000000119004b000000000100001900000001010040390000104e0290009c00000f810000213d000000010110019000000f810000c13d000000400090043f000000200130008c000022570000413d00000000010a043300000fd90210009c000022570000213d00001079020000410000000005290436000000000300041400000fd902100197000000040120008c000019190000c13d0000000003000031000000200130008c00000020040000390000000004034019000019480000013d00000fd70190009c00000fd7010000410000000001094019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000f00000009001d000d00000005001d3f553f500000040f0000000d0a0000290000000f090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000019350000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b000019310000c13d0000001f06400190000019440000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f000200000001035500000001022001900000218e0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000002090433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000000120120008c0000000101000039000019670000613d00000012022000890000000a03000039000000010420019000000000543300a9000000010300603900000000311300a9000000010320008c000000010220027000000000030400190000195f0000213d0000001202000029000000000302043300000000423100a9000000000403004b0000196f0000613d00000000433200d9000000000113004b0000101a0000c13d000000120100002900000000002104350000013601000039000000000101041a0000106403100197000000800410027000000011010000293f55356a0000040f0000000e020000290000000302200039000f00000002001d000000000202041a001100000002001d000000140200002900000000002004350000013402000039000000200020043f001200000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000000101100039000000000101041a0000001103000029000000000213004b0000101a0000413d00000000021300490000001201200029000000000221004b0000000002000019000000010200403900000001022001900000101a0000c13d0000000f02000029000000000012041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000130c0000c13d000022570000013d0000013d01000039000000000101041a000000000201004b0000101a0000613d000000010110008a0000013d02000039000000000012041b0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000013020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d020000390000000203000039000010a60400004100000013050000293f553f4b0000040f0000000101200190000012c80000c13d000022570000013d00000fd70390009c001000000009001d00000fd7030000410000000003094019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f0000104c011001c73f553f500000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001d5d0000613d00000010090000290000001f0230018f000000050430027200001a130000613d00000005054002100000000005590019000000000601034f0000000007090019000000006806043c0000000007870436000000000857004b00001a0f0000c13d000000000502004b00001a220000613d0000000504400210000000000141034f00000000044900190000000302200210000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f00000000001404350000001f01300039000010b10210019700000000060900190000000001920019000000000221004b000000000200001900000001020040390000104e0510009c00000f810000213d000000010220019000000f810000c13d000000400010043f0000106d0230009c000022570000213d000000200230008c000022570000413d00000000020604330000104e0520009c000022570000213d00000000050600190000000006530019000000000252001900000000032600490000106d0530009c000022570000213d000000a00330008c000022570000413d0000106e0310009c00000f810000213d000000a003100039000000400030043f00000000570204340000104e0870009c000022570000213d00000000072700190000001f08700039000000000968004b00000000090000190000106f090080410000106f088001970000106f0a600197000000000ba8013f0000000008a8004b00000000080000190000106f080040410000106f0ab0009c000000000809c019000000000808004b000022570000c13d00000000870704340000104e0970009c00000f810000213d0000001f09700039000010b1099001970000003f09900039000010b10490019700000000043400190000104e0940009c00000f810000213d000000400040043f00000000007304350000000004870019000000000464004b000022570000213d000000c004100039000000000607004b00001a6d0000613d00000000060000190000000009460019000000000a860019000000000a0a04330000000000a904350000002006600039000000000976004b00001a660000413d000000000447001900000000000404350000000003310436000000000405043300000fd90540009c000022570000213d00000000004304350000004003200039000000000303043300000fd90430009c000022570000213d0000004004100039000000000034043500000060042000390000000004040433000000600510003900000000004504350000008001100039000000800220003900000000020204330000000000210435000000140130006c000001200000c13d0000106c0000013d000000400140021000000fd70320009c00000fd702008041000000c002200210000000000121019f0000104c011001c700000014020000293f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000000f0a00002900001a9d0000613d000000000701034f0000001108000029000000007907043c00000000089804360000000009a8004b00001a990000c13d000000000705004b00001aac0000613d0000000506600210000000000761034f00000011066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001d7d0000613d0000001f01400039000000600110018f0000001101100029000000400010043f000000200130008c000022570000413d0000001101000029000000000201043300000012010000293f5522980000040f000000140200002900000000002004350000013402000039000000200020043f001200000001001d00000040010000393f553f1c0000040f00000013020000290000000000200435000000200010043f00000040010000393f553f1c0000040f0000000101100039000000000101041a000000e00010043f000000140100002900000000001004350000013301000039000000200010043f00000040010000393f553f1c0000040f0000000301100039000000000101041a000000c00010043f00000013010000293f5529180000040f3f55338c0000040f00000012020000290000104d2320012a001300000003001d000001000010043f000000100200002900000014040000293f5533a20000040f0000000032010434000001200020043f0000000004030433000001400040043f00000040021000390000000005020433000001600050043f00000060021000390000000002020433000001800020043f00000080011000390000000001010433000001a00010043f000000c00700043d000000e00600043d0000001401000029000000130200002900000010030000293f55381e0000040f000000a00020043f000000800010043f000000400100043d001400000001001d00000080020000393f5522720000040f0000001403000029000000000131004900000fd70210009c00000fd701008041000000600110021000000fd70230009c00000fd7030080410000004002300210000000000121019f00003f560001042e000000400200043d0000001f0430018f0000000505300272000000050550021000001b0b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001b070000c13d000000000604004b00001d770000613d00001d6b0000013d00001070010000410000001002000029000000000012043500000fd70120009c00000fd702008041000000400120021000000fdb011001c700003f570001043000000000010004113f552b660000040f00000000010004113f552bd60000040f000000000100001900003f560001042e00110fd90020019b00000000030000190000013501000039000000000101041a000000000131004b00001dd60000a13d000f00000003001d0000105201300041000000000101041a00000fd901100197001400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001000000001001d0000000401100039000000000101041a000000ff0110019000000c6b0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00001b5f0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d00001baa0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00001b6a0000c13d0000000003000031000000200130008c0000002004000039000000000403401900001b990000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001300000009001d001200000005001d3f553f500000040f000000120a00002900000013090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200001b860000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001b820000c13d0000001f0640019000001b950000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001ff90000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d0000000001090433001300000001001d00000fd90110009c000022570000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197001200000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b000022570000613d000000400900043d00001058010000410000000003190436000000130100002900000fd9011001970000000405900039001300000001001d000000000015043500000000010004140000001202000029000000040420008c00001bd50000c13d0000104e0190009c00000f810000213d000000400090043f00001059010000410000000000190435000000130100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900001c1d0000013d000c00000005001d000b00000003001d00000fd70390009c00000fd7030000410000000003094019000a00400030021800000fd70310009c00000fd701008041000000c0011002100000000a011001af0000104c011001c7000e00000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000001f8a0000613d0000000e030000290000104e0130009c0000000c0200002900000f810000213d000000400030043f0000105901000041000000000013043500000013010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c0011002100000000a011001af0000104c011001c700000012020000293f553f500000040f0000000e090000290000000003010019000000600330027000000fd703300197000000200430008c0000002004000039000000000403401900000005054002720000000b0a00002900001c0a0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001c060000c13d0000001f0640019000001c190000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000001f990000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00000f810000213d000000400010043f000000200130008c000022570000413d0000000001090433001200000001001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000001203000029000000000123004b0000101a0000413d000000000123004b00001c640000613d000e00000002001d000000130100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001203000029000000000031041b00000010010000290000000301100039000000000101041a000000000201004b000000000203001900001c590000613d0000000e0320006a0000104d423000d100000000433200d90000104d0330009c0000101a0000c13d00000000121200d900001c5a0000013d000000000200001900000010010000290000000201100039000000000301041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d000000000021041b000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000400200043d0000105a0320009c00000f810000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a001200000004001d000000000034043500000040022000390000000201100039000000000101041a001300000002001d0000000000120435000000140100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d00000013020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b0000101a0000413d00000012030000290000000003030433000000000421004900000000564300a9000000000121004b00001cac0000613d00000000214600d9000000000131004b0000101a0000c13d000000140100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039001300000006001d3f553f500000040f00000013030000290013104d303001320000000102200190000022570000613d000000000101043b00000011020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a001200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00000fd9011001970000001402000029000000000112004b00001cf10000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000001f710000613d000000000101043b00001d3b0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00001cfc0000c13d0000000003000031000000200130008c0000002004000039000000000403401900001d2b0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7001000000009001d000e00000005001d3f553f500000040f0000000e0a00002900000010090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200001d180000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00001d140000c13d0000001f0640019000001d270000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00020000000103550000000102200190000020080000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200130008c000022570000413d000000000109043300000fd90210009c000022570000213d00000012040000290000001303400029000000000243004b0000000002000019000000010200403900000001022001900000101a0000c13d000000400200043d0000105a0420009c00000f810000213d0000006004200039000000400040043f0000004004200039000000000034043500000fd9011001970000002003200039000000000013043500000014010000290000000000120435000000800100043d0000000f03000029000000000131004b00001dd60000a13d0000000501300210000000a0011000390000000000210435000000800100043d000000000131004b00001dd60000a13d00000001033000390000000d0130006c00001b1e0000413d000000400100043d00000af60000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001d690000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001d650000c13d000000000604004b00001d770000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000000400200043d0000001f0430018f000000050530027200001d890000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001d850000c13d000000000604004b00001d770000613d000011d40000013d000000100300002900000fd70230009c00000fd7020000410000000002034019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c700000014020000293f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000000b0a00002900001da80000613d000000000701034f0000001008000029000000007907043c00000000089804360000000009a8004b00001da40000c13d000000000705004b00001db70000613d0000000506600210000000000761034f00000010066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001ddc0000613d0000001f01400039000000600210018f0000001001200029000000000221004b000000000200001900000001020040390000104e0310009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200240008c000022570000413d00000010020000290000000002020433000000000302004b0000000003000019000000010300c039000000000332004b000022570000c13d000000000202004b00001ed10000c13d000010760200004100000a4e0000013d000000400100043d0000109b0200004100000a4e0000013d000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f000000050530027200001de80000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001de40000c13d000000000604004b00001d770000613d000011d40000013d000000130400002900000fd70140009c00000fd7010000410000000001044019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c73f553f500000040f0000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000100a00002900001e060000613d000000000701034f0000001308000029000000007907043c00000000089804360000000009a8004b00001e020000c13d000000000705004b00001e150000613d0000000506600210000000000761034f00000013066000290000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000001e6e0000613d0000001f01400039000000600210018f0000001301200029000000000221004b000000000200001900000001020040390000104e0310009c00000f810000213d000000010220019000000f810000c13d000000400010043f000000200140008c000022570000413d00000013010000290000000002010433000000ff0120008c000022570000213d000000120120008c0000101a0000213d000001200100043d000000120320008c00001fa80000c13d000000010300003900001fb30000013d0000105601000041000000000010043900000000010004100000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000001f710000613d000000000101043b000000000101004b00001f370000c13d0000000d01000029000000ff0110018f000000010110008c000000000100001900000001010060390000000c020000290000000502200270000000000201001f00001f3a0000c13d0000000b0100006b00000be80000613d000001000100008a0000000d0110017f000d00010000003d00000001011001bf00000bec0000013d000000110420006b0000000004030019000000010440a1bf000000010440019000001e7d0000c13d000000100400006b00001e7d0000613d000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000001041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400001f670000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001e7a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001e760000c13d000000000604004b00001d770000613d00001d6b0000013d000000110220006b00000000020000190000000102002039000000100400006b0000000004020019000000010440c1bf000000000334019f000000010330019000001f440000613d000000000101004b00000001022061bf000000010120019000000f700000c13d00000014010000293f5529a40000040f000000140100002900000000001004350000013201000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b001300000001001d000000000101041a000000000101004b00000f700000c13d0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b0000001302000029000000000012041b000000400200043d000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400001f670000013d000000400200043d0000001f0430018f000000050530027200001ebf0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001ebb0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f000000050530027200001ece0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001eca0000c13d000000000604004b00001d770000613d000011d40000013d0000000c030000290000000201300039000000000001041b0000001101000029000000000013041b00000001013000390000001202000029000000000021041b0000000301300039000000000001041b000001000100008a0000000d0110017f00000001011001bf0000000e02000029000000000012041b00000013010000293f552e180000040f00000fd901100197001300000001001d00000000001004350000013e01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000101041a00000fd90110019800001fd00000c13d000000130100002900000000001004350000013e01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b000000000201041a0000105b022001970000000f022001af000000000021041b0000013501000039000000000201041a0000104e0320009c00000f810000213d0000000103200039000000000031041b00000000001004350000105202200041000000000302041a0000105b033001970000000f033001af000000000032041b0000013b02000039000000000302041a000010af0430009c0000101a0000613d0000000103300039000000000032041b0000012e02000039000000000202041a0000012f03000039000000000303041a0000000002230019000000000332004b0000000003000019000000010300403900000001033001900000101a0000c13d0000013c03000039000000000023041b0000013d03000039000000000023041b000000400200043d000000fb03000039000000000303041a000000000101041a000000000431004b000022410000a13d00000024042000390000000000140435000010740100004100000000001204350000000401200039000000000031043500000fd70120009c00000fd702008041000000400120021000001075011001c700003f57000104300000000c010000290000000501100270000000000100001f000000400100043d00000064021000390000107a03000041000000000032043500000044021000390000107b03000041000000000032043500000024021000390000002e0300003900000aa40000013d000000140100002900000000001004350000013201000039000000200010043f0000105f010000410000000000100439000000000100041400000fd70210009c00000fd701008041000000c00110021000001060011001c70000800b020000393f553f500000040f000000010220019000001f710000613d000000000101043b001300000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000022570000613d000000000101043b0000001302000029000000000021041b000000400100043d000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000109c04000041000000140500002900000f6d0000013d000000000001042f000000400100043d000010890200004100000a4e0000013d000000400100043d0000109d0200004100000a4e0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001f840000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001f800000c13d000000000604004b00001d770000613d00001d6b0000013d000000400100043d000010880200004100000a4e0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001f960000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001f920000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000001fa50000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00001fa10000c13d000000000604004b00001d770000613d00001d6b0000013d0000000a0400003900000001030000390000001202200089000000010520019000000000654400a9000000010400603900000000433400a9000000010420008c0000000102200270000000000405001900001fab0000213d00000000421300a9000000000401004b00001fb90000613d00000000411200d9000000000131004b0000101a0000c13d000001200020043f0000013601000039000000000401041a000001000100043d000010640340019700000080044002703f55356a0000040f0000000006010019000000e00060043f000000c00100043d0000000007610019000000000117004b0000000001000019000000010100403900000001011001900000101a0000c13d000000c00070043f000001600500043d000001400400043d00000014010000290000001202000029000000110300002900001aee0000013d000000400100043d000010720200004100000a4e0000013d0000006501000039000000000201041a0000105b02200197000000000021041b000000000100041100000fd9061001970000003301000039000000000201041a0000105b03200197000000000363019f000000000031041b000000000100041400000fd90520019700000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d040000413f553f4b0000040f0000000101200190000022570000613d000000000100041a0000ff000110019000000c240000613d000000400100043d000000110200006b000021dc0000c13d0000006402100039000010840300004100000000003204350000004402100039000010850300004100000000003204350000002402100039000000250300003900000aa40000013d000000400200043d0000001f0430018f00000005053002720000000505500210000020050000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020010000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000020140000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020100000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000020230000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000201f0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020320000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000202e0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020410000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000203d0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020500000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000204c0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000205f0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000205b0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000206e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000206a0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000207d0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020790000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000208c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020880000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000209b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020970000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020aa0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020a60000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020b90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020b50000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020c80000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020c40000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020d70000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020d30000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020e60000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020e20000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000020f50000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000020f10000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021040000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021000000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021130000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000210f0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021220000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000211e0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021310000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000212d0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f0000000505300272000021400000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000213c0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000214f0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000214b0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000215e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000215a0000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000216d0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021690000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000217c0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021780000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000218b0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021870000c13d000000000604004b00001d770000613d000011d40000013d000000400200043d0000001f0430018f00000005053002720000219a0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021960000c13d000000000604004b00001d770000613d000011d40000013d000000400100043d000010a70200004100000a4e0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000021ac0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021a80000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000021bb0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021b70000c13d000000000604004b00001d770000613d00001d6b0000013d000000400200043d0000001f0430018f0000000505300272000021ca0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021c60000c13d000000000604004b000011d40000c13d00001d770000013d000000400200043d0000001f0430018f0000000505300272000021d90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000021d50000c13d000000000604004b00001d770000613d000011d40000013d0000009702000039000000000302041a0000105b043001970000001105000029000000000454019f000000000042041b0000002002100039000000000052043500000fd902300197000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d0200003900000001030000390000107e040000413f553f4b0000040f0000000101200190000022570000613d000000c902000039000000000102041a000010b001100197000000000012041b000000400100043d000000fb03000039000000000203041a00000124040000390000000104400367000000000404043b000000000542004b000022590000813d000000000043041b00000020031000390000000000430435000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d02000039000000010300003900001081040000413f553f4b0000040f0000000101200190000022570000613d000000400100043d000000c902000039000000000202041a000000ff03200190000022620000c13d000010b00220019700000001022001bf000000c903000039000000000023041b0000000002000411000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000000010300003900001069040000413f553f4b0000040f0000000101200190000022570000613d0000000d0100006b00000f700000c13d000000000200041a000010b201200197000000000010041b000000400100043d0000000103000039000000000031043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70420009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d02000039000009ab0000013d0000002001200039000000120300002900000000003104350000001101000029000000000012043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d020000390000000303000039000010730400004100000014050000290000000f060000293f553f4b0000040f000000010120019000000f700000c13d000000000100001900003f570001043000000064021000390000107f0300004100000000003204350000004402100039000010800300004100000000003204350000002402100039000000220300003900000aa40000013d00000044021000390000108203000041000000000032043500000024021000390000001003000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f57000104300000000043020434000000000331043600000000040404330000000000430435000000400320003900000000030304330000004004100039000000000034043500000060032000390000000003030433000000600410003900000000003404350000008003200039000000000303043300000080041000390000000000340435000000a0032000390000000003030433000000a0041000390000000000340435000000c0032000390000000003030433000000c0041000390000000000340435000000e0032000390000000003030433000000e0041000390000000000340435000001000320003900000000030304330000010004100039000000000034043500000120022000390000000002020433000001200310003900000000002304350000014001100039000000000001042d000000000301001900000000413200a9000000000403004b0000229f0000613d00000000433100d9000000000223004b000022a00000c13d000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300003000000000002000300000001001d0000014101000039000000000101041a000200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000030300002900000fd903300197000000020400002900000fd9054001970000000102200190000023880000613d000000000101043b00000fd901100197000000000113004b000022d60000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000300000005001d3f553f500000040f00000003050000290000000102200190000023880000613d000000400a00043d000000000101043b000023240000013d000000400b00043d000010550100004100000000061b04360000000001000414000000040230008c000022e10000c13d0000000003000031000000200130008c00000020040000390000000004034019000023140000013d000300000005001d00000fd702b0009c00000fd70200004100000000020b4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900020000000b001d000100000006001d3f553f500000040f000000010a000029000000020b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000023000000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000022fc0000c13d000000000705004b0000230f0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000023a70000613d00000003050000290000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c0000238b0000213d00000001011001900000238b0000c13d0000004000a0043f0000001f0130008c000023890000a13d00000000010b043300000fd90210009c000023890000213d000010b30200004100000000042a043600000fd9011001970000000402a0003900000000001204350000000001000414000000040250008c000023310000c13d0000000003000031000000200130008c00000020040000390000000004034019000023620000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c7000000000205001900030000000a001d000200000004001d3f553f500000040f000000020b000029000000030a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000234f0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b0000234b0000c13d000000000705004b0000235e0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000023970000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c0000238b0000213d00000001022001900000238b0000c13d000000400010043f000000200130008c000023890000413d00000000010a0433000300000001001d00001046010000410000000000100439000000000100041200000004001004430000002400000443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000023880000613d000000000201043b000000030400002900000000314200a9000000000302004b000023870000613d00000000322100d9000000000242004b000023910000c13d000000000001042d000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000023a30000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000239f0000c13d000000000604004b000023c10000613d0000000505500210000023b50000013d000000400200043d0000001f0430018f00000005053002720000000505500210000023b30000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000023af0000c13d000000000604004b000023c10000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000700000000000200000fd901100197000700000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff011001900000251a0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000250d0000613d000000000101043b00000fd9011001970000000702000029000000000112004b000024020000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000250d0000613d000000000101043b000700000001001d0000244e0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c0000240d0000c13d0000000003000031000000200130008c000000200400003900000000040340190000243d0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700070000000a001d000600000005001d3f553f500000040f000000060b000029000000070a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000242a0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000024260000c13d000000000705004b000024390000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000025530000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c0000250e0000213d00000001022001900000250e0000c13d000000400010043f000000200130008c0000250b0000413d00000000010a0433000700000001001d00000fd90110009c0000250b0000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000600000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f00000001022001900000250d0000613d000000000101043b000000000101004b0000250b0000613d000000400a00043d000010580100004100000000031a0436000000070100002900000fd9011001970000000405a00039000700000001001d000000000015043500000000010004140000000602000029000000040420008c000024790000c13d0000104e01a0009c0000250e0000213d0000004000a0043f000010590100004100000000001a0435000000070100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000024c20000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000025220000613d00000004030000290000104e0130009c00000003020000290000250e0000213d000000400030043f0000105901000041000000000013043500000007010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000006020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b000029000024af0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000024ab0000c13d000000000705004b000024be0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000025320000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c0000250e0000213d000000400010043f000000200130008c0000250b0000413d00000000010a0433000600000001001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b000000000201041a0000000603000029000000000123004b000025140000413d000000000123004b000024e10000c13d000000000001042d000400000002001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000250b0000613d000000000101043b0000000603000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b0000000002030019000024ff0000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000025140000c13d00000000121200d9000025000000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000025140000c13d000000000021041b000000000001042d000000000100001900003f5700010430000000000001042f000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f00000005053002720000252e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000252a0000c13d000000000604004b0000256d0000613d0000000505500210000025610000013d000000400200043d0000001f0430018f00000005053002720000253e0000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000253a0000c13d000000000604004b0000254d0000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000400200043d0000001f0430018f000000050530027200000005055002100000255f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000255b0000c13d000000000604004b0000256d0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f570001043000000000430104340000000001320436000000000203004b0000257f0000613d000000000200001900000000051200190000000006240019000000000606043300000000006504350000002002200039000000000532004b000025780000413d000000000213001900000000000204350000001f02300039000010b1022001970000000001210019000000000001042d000300000000000200000000080100190000009701000039000000000201041a000000400a00043d0000002401a0003900000040030000390000000000310435000010b401000041000000000b1a04360000000401a00039000000000900041100000000009104350000004404a00039000000003108043400000000001404350000006404a0003900000fd902200197000000000501004b000025a10000613d000000000500001900000000064500190000000007530019000000000707043300000000007604350000002005500039000000000615004b0000259a0000413d000000000341001900000000000304350000000003000414000000040420008c000025ab0000c13d0000000003000031000000200130008c00000020040000390000000004034019000025e40000013d000100000008001d0000001f01100039000010b101100197000000640110003900000fd70410009c00000fd701008041000000600110021000000fd704a0009c00000fd70400004100000000040a40190000004004400210000000000141019f00000fd70430009c00000fd703008041000000c003300210000000000113019f00030000000a001d00020000000b001d3f553f500000040f000000020b000029000000030a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000025cf0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000025cb0000c13d000000000705004b000025de0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000000000090004110000261a0000613d00000001080000290000001f01400039000000600110018f0000000004a10019000000000114004b000000000100001900000001010040390000104e0240009c000025fc0000213d0000000101100190000025fc0000c13d000000400040043f0000001f0130008c000025fa0000a13d00000000010a0433000000000201004b0000000002000019000000010200c039000000000221004b000025fa0000c13d000000000101004b000026020000613d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000440140003900000060020000390000000000210435000000240140003900000000020004100000000000210435000010b50100004100000000001404350000000401400039000000000091043500000064024000390000000001080019000300000004001d3f5525730000040f0000000303000029000000000131004900000fd70210009c00000fd70100804100000fd70230009c00000fd70300804100000060011002100000004002300210000000000121019f00003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000026260000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000026220000c13d000000000604004b000026340000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300009000000000002000800000001001d00000fd901200197000900000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000401100039000000000101041a000000ff011001900000269b0000613d000000080100002900000fd901100197000800000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000101041a000000ff011001900000269b0000613d000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff011001900000284e0000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000284d0000613d000000000101043b00000fd9011001970000000902000029000000000112004b0000269c0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f00000001022001900000284d0000613d000000000101043b000700000001001d000026e80000013d000000000001042d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c000026a70000c13d0000000003000031000000200130008c00000020040000390000000004034019000026d70000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700070000000a001d000600000005001d3f553f500000040f000000060b000029000000070a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000026c40000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000026c00000c13d000000000705004b000026d30000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000028750000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000028470000213d0000000102200190000028470000c13d000000400010043f000000200130008c0000283f0000413d00000000010a0433000700000001001d00000fd90110009c0000283f0000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000600000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f00000001022001900000284d0000613d000000000101043b000000000101004b0000283f0000613d000000400a00043d000010580100004100000000031a0436000000070100002900000fd9011001970000000405a00039000700000001001d000000000015043500000000010004140000000602000029000000040420008c000027130000c13d0000104e01a0009c000028470000213d0000004000a0043f000010590100004100000000001a0435000000070100002900000000001504350000000003000031000000200130008c000000200400003900000000040340190000275c0000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000028560000613d00000004030000290000104e0130009c0000000302000029000028470000213d000000400030043f0000105901000041000000000013043500000007010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000006020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b000029000027490000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000027450000c13d000000000705004b000027580000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000028650000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c000028470000213d000000400010043f000000200130008c0000283f0000413d00000000010a0433000600000001001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000201041a0000000603000029000000000123004b000028410000413d000000000123004b000027a30000613d000400000002001d000000070100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000603000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b0000000002030019000027980000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000028410000c13d00000000121200d9000027990000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000028410000c13d000000000021041b000000090100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000400200043d0000105a0320009c000028470000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000600000004001d000000000034043500000040022000390000000201100039000000000101041a000700000002001d0000000000120435000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d00000007020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b000028410000413d00000006030000290000000003030433000000000421004900000000564300a9000000000121004b000027eb0000613d00000000214600d9000000000131004b000028410000c13d000000090100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039000700000006001d3f553f500000040f00000007030000290007104d3030013200000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b000000000301041a0000000702300029000000000332004b000000000300001900000001030040390000000103300190000028410000c13d000000000021041b000000090100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b0000000201100039000000000101041a000900000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000008020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000283f0000613d000000000101043b00000002011000390000000902000029000000000021041b000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f0000000505300272000028620000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000285e0000c13d000000000604004b000028730000c13d0000288f0000013d000000400200043d0000001f0430018f0000000505300272000028710000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000286d0000c13d000000000604004b0000288f0000613d0000000505500210000028830000013d000000400200043d0000001f0430018f00000005053002720000000505500210000028810000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000287d0000c13d000000000604004b0000288f0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300005000000000002000500000001001d000200000002001d00000fd901200197000400000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b000100000001001d0000000401100039000000000101041a000000ff011001900000290f0000613d000000050100002900000fd901100197000300000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b000000000101041a000000ff011001900000290f0000613d000000020100002900000005020000293f5539e50000040f00000001020000290000000302200039000100000002001d000000000202041a000200000002001d000000040200002900000000002004350000013402000039000000200020043f000500000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000003020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b0000000101100039000000000101041a0000000203000029000000000213004b000029120000413d00000000021300490000000501200029000000000221004b000000000200001900000001020040390000000102200190000029120000c13d0000000102000029000000000012041b000000040100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000003020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000029100000613d000000000101043b00000001011000390000000502000029000000000021041b000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f570001043000010000000000020000013702000039000000000202041a0000013803000039000000000303041a0000013904000039000000000404041a00000fd901100197000000400b00043d0000004405b0003900000000001504350000002401b000390000000000410435000010900100004100000000001b043500000fd9013001970000000403b000390000000000130435000000000100041400000fd902200197000000040320008c000029330000c13d0000000003000031000000600130008c00000060040000390000000004034019000029620000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c700010000000b001d3f553f500000040f000000010b0000290000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f00000005064002720000000506600210000029500000613d00000000076b0019000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000a79004b0000294c0000c13d000000000705004b0000295e0000613d000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000029840000613d0000001f01400039000000e00210018f0000000001b20019000000000221004b000000000200001900000001020040390000104e0410009c000029760000213d0000000102200190000029760000c13d000000400010043f0000005f0130008c0000297c0000a13d00000000010b04330000004002b000390000000002020433000000000321004b0000297e0000413d0000000001210049000000000001042d000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000029900000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000298c0000c13d000000000604004b0000299e0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300008000000000002000600000001001d0000013502000039000000000102041a000300000001001d000000000101004b00002a340000613d000000060100002900050fd90010019b0000000003000019000029b40000013d00000007030000290000000103300039000000030130006c000001350200003900002a340000813d000000000102041a000000000131004b00002a370000a13d0000000000200435000700000003001d0000105201300041000000000101041a00000fd902100197000800000002001d00000006010000293f55263a0000040f000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b000400000001001d0000000401100039000000000101041a000000ff01100190000029af0000613d000000050100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b000000000101041a000000ff01100190000029af0000613d000000080100002900000006020000293f5539e50000040f00000004020000290000000302200039000100000002001d000000000202041a000200000002001d000000080200002900000000002004350000013402000039000000200020043f000400000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000005020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b0000000101100039000000000101041a0000000203000029000000000213004b00002a3d0000413d00000000021300490000000401200029000000000221004b00000000020000190000000102004039000000010220019000002a3d0000c13d0000000102000029000000000012041b000000080100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000005020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002a350000613d000000000101043b00000001011000390000000402000029000000000021041b000029af0000013d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300008000000000002000300000001001d00000fd901100197000700000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000400200043d000010b60320009c00002b580000813d000000000101043b0000004003200039000000400030043f000000000101041a000000ff031001900000000004000019000000010400c03900000000044204360000ff00011001900000000001000019000000010100c0390000000000140435000000000203004b00002b5e0000613d0000013503000039000000000203041a000200000002001d000000000202004b00002af60000613d000100000004001d0000000002000019000000000103041a000000000121004b00002b520000a13d0000000000300435000400000002001d0000105201200041000000000101041a00000fd902100197000800000002001d00000003010000293f55263a0000040f000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000301100039000000000101041a000600000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000101100039000000000201041a000500000002001d000000060120006b00002b4c0000413d000000080100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d00000005030000290000000602300069000000000101043b0000000301100039000000000021041b0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000101100039000000000001041b000000080100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b0000000201100039000000000001041b00000004020000290000000102200039000000020120006c000001350300003900002a6b0000413d00000001010000290000000001010433000000000101004b0000012f010060390000012e0100c039000000000201041a000000000302004b00002b4c0000613d000000010220008a000000000021041b000000070100002900000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b000000000201041a0000107c02200197000000000021041b0000013c01000039000000000201041a000000000302004b00002b150000613d000000010220008a000000000021041b0000013d01000039000000000101041a000800000001001d000000000101004b00002b3d0000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b00000007020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002b4a0000613d000000000101043b000000000101041a000000ff0110019000002b3d0000c13d0000000801000029000000010110008a0000013d02000039000000000012041b000000000100041400000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d020000390000000203000039000010b70400004100000007050000293f553f4b0000040f000000010120019000002b4a0000613d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a702000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000100000000000200000fd901100197000100000001001d00000000001004350000012d01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b000000000201041a000000ff0320019000002bc80000c13d0000107c0220019700000001022001bf000000000021041b0000012f02000039000000000102041a000010af0310009c00002bd00000613d0000000103100039000000000032041b0000013102000039000000000202041a0000012e03000039000000000303041a000000000223004b00002bc50000213d0000013002000039000000000202041a000000000121004b00002bc50000813d0000013c01000039000000000101041a000000000101004b00002bb00000613d0000013b01000039000000000101041a00000000001004350000013a01000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b00000001020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002bc30000613d000000000101043b000000000201041a000010b00220019700000001022001bf000000000021041b000000400100043d000000000001043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d0200003900000002030000390000108e0400004100000001050000293f553f4b0000040f000000010120019000002bc30000613d000000000001042d000000000100001900003f5700010430000000400100043d000010ac0200004100002bca0000013d000000400100043d000010a102000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000c000000000002000500000001001d0000013501000039000000000101041a000400000001001d000000000101004b00002da00000613d000000050100002900090fd90010019b00000000020000190000013501000039000000000101041a000000000121004b00002db00000a13d000700000002001d0000105201200041000000000101041a00000fd901100197000c00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b000800000001001d0000000401100039000000000101041a000000ff0110019000002db60000613d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002da90000613d000000000101043b00000fd9011001970000000c02000029000000000112004b00002c210000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002da90000613d000000000101043b000b00000001001d00002c6c0000013d000000400900043d000010550100004100000000051904360000000001000414000000040320008c00002c2c0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002c5b0000013d00000fd70390009c00000fd7030000410000000003094019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000b00000009001d000a00000005001d3f553f500000040f0000000a0a0000290000000b090000290000000003010019000000600330027000000fd703300197000000200430008c00000020040000390000000004034019000000050540027200002c480000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00002c440000c13d0000001f0640019000002c570000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000002ddd0000613d0000001f01400039000000600210018f0000000001920019000000000221004b000000000200001900000001020040390000104e0410009c00002daa0000213d000000010220019000002daa0000c13d000000400010043f000000200130008c00002da10000413d0000000001090433000b00000001001d00000fd90110009c00002da10000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000a00000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000002da90000613d000000000101043b000000000101004b00002da10000613d000000400900043d000010580100004100000000031904360000000b0100002900000fd9011001970000000405900039000b00000001001d000000000015043500000000010004140000000a02000029000000040420008c00002c970000c13d0000104e0190009c00002daa0000213d000000400090043f000010590100004100000000001904350000000b0100002900000000001504350000000003000031000000200130008c0000002004000039000000000403401900002cdf0000013d000300000005001d000200000003001d00000fd70390009c00000fd7030000410000000003094019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c7000600000009001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000002dbe0000613d00000006030000290000104e0130009c000000030200002900002daa0000213d000000400030043f000010590100004100000000001304350000000b010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c70000000a020000293f553f500000040f00000006090000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000000505400272000000020a00002900002ccc0000613d000000000601034f0000000007090019000000006806043c00000000078704360000000008a7004b00002cc80000c13d0000001f0640019000002cdb0000613d0000000505500210000000000751034f00000000055900190000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0002000000010355000000010220019000002dcd0000613d0000001f01400039000000600110018f00000000019100190000104e0210009c00002daa0000213d000000400010043f000000200130008c00002da10000413d0000000001090433000a00000001001d0000000b0100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b000000000201041a0000000a03000029000000000123004b00002da30000413d000000000123004b00002d260000613d000600000002001d0000000b0100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000a03000029000000000031041b00000008010000290000000301100039000000000101041a000000000201004b000000000203001900002d1b0000613d000000060320006a0000104d423000d100000000433200d90000104d0330009c00002da30000c13d00000000121200d900002d1c0000013d000000000200001900000008010000290000000201100039000000000301041a0000000002230019000000000332004b00000000030000190000000103004039000000010330019000002da30000c13d000000000021041b0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000201100039000000000101041a000b00000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000002011000390000000b02000029000000000021041b0000000c0100002900000005020000293f5539e50000040f0000000c0200002900000000002004350000013402000039000000200020043f000b00000001001d000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000001011000390000000b02000029000000000021041b0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b0000000301100039000000000101041a000b000b0010002d0000000b0110006b00000000010000190000000101004039000000010110019000002da30000c13d0000000c0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000002da10000613d000000000101043b00000003011000390000000b02000029000000000021041b00000007020000290000000102200039000000040120006c00002be00000413d000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000003201000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000002dca0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002dc60000c13d000000000604004b00002df70000613d00002deb0000013d000000400200043d0000001f0430018f000000050530027200002dd90000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002dd50000c13d000000000604004b00002df70000613d000000050550021000002deb0000013d000000400200043d0000001f0430018f0000000505300272000000050550021000002de90000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002de50000c13d000000000604004b00002df70000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300000013b01000039000000000201041a000010af0320009c00002e120000613d0000000102200039000000000021041b0000012e01000039000000000101041a0000012f02000039000000000202041a0000000001120019000000000221004b00000000020000190000000102004039000000010220019000002e120000c13d0000013c02000039000000000012041b0000013d02000039000000000012041b000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f57000104300002000000000002000200000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000020300002900000fd903300197000000010220019000002e8d0000613d000000000101043b00000fd901100197000000000113004b00002e400000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000002e8d0000613d000000000101043b000000000001042d000000400a00043d000010550100004100000000051a04360000000001000414000000040230008c00002e4b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002e7c0000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900020000000a001d000100000005001d3f553f500000040f000000010b000029000000020a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200002e690000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002e650000c13d000000000705004b00002e780000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000002e960000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00002e900000213d000000010220019000002e900000c13d000000400010043f0000001f0130008c00002e8e0000a13d00000000010a043300000fd90210009c00002e8e0000213d000000000001042d000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000002ea20000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00002e9e0000c13d000000000604004b00002eb00000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f57000104300000006502000039000000000302041a0000105b03300197000000000032041b00000fd9061001970000003301000039000000000201041a0000105b03200197000000000363019f000000000031041b000000000100041400000fd90520019700000fd70210009c00000fd701008041000000c0011002100000105c011001c70000800d0200003900000003030000390000107d040000413f553f4b0000040f000000010120019000002ecd0000613d000000000001042d000000000100001900003f5700010430000000400200043d000000fb04000039000000000304041a000000000513004b00002ee80000813d000000000014041b00000020042000390000000000140435000000000032043500000fd70120009c00000fd7020080410000004001200210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00001053011001c70000800d02000039000000010300003900001081040000413f553f4b0000040f000000010120019000002efb0000613d000000000001042d00000064012000390000107f03000041000000000031043500000044012000390000108003000041000000000031043500000024012000390000002203000039000000000031043500000fe001000041000000000012043500000004012000390000002003000039000000000031043500000fd70120009c00000fd702008041000000400120021000000fe1011001c700003f5700010430000000000100001900003f5700010430000000c901000039000000000101041a000000ff0110019000002f020000c13d000000000001042d000000400100043d00000044021000390000108203000041000000000032043500000024021000390000001003000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f5700010430000a000000000002000600000002001d00000fd901100197000a00000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000500000001001d0000000401100039000000000101041a000000ff01100190000032c40000613d00001046010000410000000000100439000000000100041200000004001004430000008001000039000700000001001d0000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b00000fd9011001970000000a02000029000000000112004b00002f500000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000900000001001d00002f9c0000013d000000400a00043d000010550100004100000000051a04360000000001000414000000040320008c00002f5b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900002f8b0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700090000000a001d000800000005001d3f553f500000040f000000080b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200002f780000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002f740000c13d000000000705004b00002f870000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000334e0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000032b70000213d0000000102200190000032b70000c13d000000400010043f000000200130008c000032b50000413d00000000010a0433000900000001001d00000fd90110009c000032b50000213d0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000800000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b000032b50000613d000000400a00043d000010580100004100000000031a0436000000090100002900000fd9011001970000000405a00039000900000001001d000000000015043500000000010004140000000802000029000000040420008c00002fc70000c13d0000104e01a0009c000032b70000213d0000004000a0043f000010590100004100000000001a0435000000090100002900000000001504350000000003000031000000200130008c00000020040000390000000004034019000030100000013d000300000005001d000200000003001d00000fd703a0009c00000fd70300004100000000030a4019000100400030021800000fd70310009c00000fd701008041000000c00110021000000001011001af0000104c011001c700040000000a001d3f553f4b0000040f0000000003010019000000600330027000000fd70030019d00000fd70330019700020000000103550000000102200190000032f60000613d00000004030000290000104e0130009c0000000302000029000032b70000213d000000400030043f0000105901000041000000000013043500000009010000290000000000120435000000000100041400000fd70210009c00000fd701008041000000c00110021000000001011001af0000104c011001c700000008020000293f553f500000040f000000040a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000000020b00002900002ffd0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00002ff90000c13d000000000705004b0000300c0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000033050000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c000032b70000213d000000400010043f000000200130008c000032b50000413d00000000010a0433000800000001001d000000090100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000201041a0000000803000029000000000123004b000032be0000413d000000000123004b000030570000613d000400000002001d000000090100002900000000001004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b0000000803000029000000000031041b00000005010000290000000301100039000000000101041a000000000201004b00000000020300190000304c0000613d000000040320006a0000104d423000d100000000433200d90000104d0330009c000032be0000c13d00000000121200d90000304d0000013d000000000200001900000005010000290000000201100039000000000301041a0000000002230019000000000332004b000000000300001900000001030040390000000103300190000032be0000c13d000000000021041b0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000060200002900000fd902200197000900000002001d0000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000400200043d0000105a0320009c000032b70000213d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000600000004001d000000000034043500000040022000390000000201100039000000000101041a000800000002001d00000000001204350000000a0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d00000008020000290000000002020433000000000101043b0000000201100039000000000101041a000000000321004b000032be0000413d00000006030000290000000003030433000000000421004900000000564300a9000000000121004b000030a10000613d00000000214600d9000000000131004b000032be0000c13d0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c70000801002000039000800000006001d3f553f500000040f00000008030000290008104d303001320000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000101041a000800080010002d000000080110006b000000000100001900000001010040390000000101100190000032be0000c13d0000000a0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b0000000201100039000000000101041a000600000001001d0000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000002011000390000000602000029000000000021041b0000000a0100002900000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b00000009020000290000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000001041b000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b00000fd9011001970000000a02000029000000000112004b000031350000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000032bd0000613d000000400a00043d000000000101043b000031800000013d000000400b00043d000010550100004100000000051b04360000000001000414000000040320008c000031400000c13d0000000003000031000000200130008c00000020040000390000000004034019000031700000013d00000fd703b0009c00000fd70300004100000000030b4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c700060000000b001d000500000005001d3f553f500000040f000000050a000029000000060b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000315d0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000031590000c13d000000000705004b0000316c0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000335d0000613d0000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c000032b70000213d0000000101100190000032b70000c13d0000004000a0043f000000200130008c000032b50000413d00000000010b043300000fd90210009c000032b50000213d0000104b0200004100000000042a04360000000402a0003900000000030004100000000000320435000000000200041400000fd909100197000000040190008c000600000009001d0000318f0000c13d0000000003000031000000200130008c00000020040000390000000004034019000031c10000013d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f0000104c011001c7000000000209001900050000000a001d000400000004001d3f553f500000040f000000040b000029000000050a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000031ad0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000031a90000c13d000000000705004b000031bc0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000000609000029000033140000613d0000001f01400039000000600110018f0000000004a10019000000000114004b000000000100001900000001010040390000104e0240009c000032b70000213d0000000101100190000032b70000c13d000000400040043f000000200130008c000032b50000413d00000000010a0433000000080110006b000032140000a13d00000000009004350000014001000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000032b50000613d000000000101043b000000000001041b0000014101000039000000000101041a0000105602000041000000000020043900000fd901100197000500000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b0000000609000029000032b50000613d000000400400043d000010b80100004100000000001404350000000401400039000000000091043500000000010004140000000502000029000000040320008c000032100000613d00000fd70340009c00000fd7030000410000000003044019000000400530021000000fd70310009c00000fd701008041000000c001100210000000000151019f0000104c011001c7000500000004001d3f553f4b0000040f000000050400002900000006090000290000000003010019000000600330027000000fd70030019d00000fd703300197000200000001035500000001022001900000336c0000613d0000104e0140009c000032b70000213d000000400040043f000032140000013d0000004401400039000000080200002900000000002104350000002001400039000010b902000041000000000021043500000024024000390000000903000029000000000032043500000044020000390000000000240435000010500240009c000032b70000213d000000800a4000390000004000a0043f000010ba0240009c000032b70000213d000000c002400039000000400020043f000000200200003900000000002a0435000000a002400039000010bb03000041000000000032043500000000030404330000000002000414000000040490008c000032610000c13d00000001020000390000000001000031000000000301004b000032780000613d0000104e0310009c000032b70000213d0000001f03100039000010b1033001970000003f03300039000010b103300197000000400b00043d00000000033b00190000000004b3004b000000000400001900000001040040390000104e0530009c000032b70000213d0000000104400190000032b70000c13d000000400030043f0000001f0310018f00000000041b0436000700000004001d000000020400036700000005011002720000000501100210000032520000613d00000007070000290000000005170019000000000604034f000000006806043c0000000007870436000000000857004b0000324e0000c13d000000000503004b000032790000613d000000000414034f00000007011000290000000303300210000000000501043300000000053501cf000000000535022f000000000404043b0000010003300089000000000434022f00000000033401cf000000000353019f0000000000310435000032790000013d00000fd70410009c00000fd701008041000000400110021000000fd70430009c00000fd7030080410000006003300210000000000113019f00000fd70320009c00000fd702008041000000c002200210000000000121019f000000000209001900050000000a001d3f553f4b0000040f000000050a0000290000000609000029000000010220018f0002000000010355000000600110027000000fd70010019d00000fd701100197000000000301004b000032340000c13d000000600b00003900000000040b0433000000000202004b000032cc0000613d000000000204004b000032920000c13d00060000000b001d000010560100004100000000001004390000000400900443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f0000000102200190000032bd0000613d000000000101043b000000000101004b00000006010000290000333d0000613d0000000004010433000000000204004b0000329f0000613d0000106d0240009c000032b50000213d000000200140008c000032b50000413d00000007010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000032b50000c13d000000000101004b000032e20000613d000000400100043d0000000802000029000000000021043500000fd70210009c00000fd7010080410000004001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f00000fe2011001c70000800d020000390000000303000039000010be0400004100000009050000290000000a060000293f553f4b0000040f0000000101200190000032b50000613d0000000801000029000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d000010a502000041000000000021043500000fd70210009c00000fd701008041000000400110021000000fdb011001c700003f570001043000000000010a0019000000000204004b000033340000c13d000000400400043d000a00000004001d00000fe002000041000000000024043500000004034000390000002002000039000000000023043500000024024000393f5525730000040f0000000a03000029000000000131004900000fd70210009c00000fd70100804100000fd70230009c00000fd70300804100000060011002100000004002300210000000000121019f00003f5700010430000000400100043d0000006402100039000010bc0300004100000000003204350000004402100039000010bd03000041000000000032043500000024021000390000002a03000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000033020000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000032fe0000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033110000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000330d0000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033200000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b0000331c0000c13d000000000604004b0000332e0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000070300002900000fd70230009c00000fd703008041000000400230021000000fd70340009c00000fd7040080410000006001400210000000000121019f00003f5700010430000000400100043d0000004402100039000010bf03000041000000000032043500000024021000390000001d03000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000001083011001c700003f5700010430000000400200043d0000001f0430018f000000050530027200000005055002100000335a0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033560000c13d000000000604004b0000337a0000c13d000033860000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033690000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033650000c13d000000000604004b000033860000613d0000337a0000013d000000400200043d0000001f0430018f00000005053002720000000505500210000033780000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000033740000c13d000000000604004b000033860000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300001000000000002000100000001001d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000033a10000613d000000000101043b000000010210006c0000000101008029000000000001042d000000000001042f000c000000000002000600000004001d000c00000003001d000500000002001d000b00000001001d000000400100043d000a00000001001d000010c00110009c000035260000813d0000000a02000029000000a001200039000000400010043f0000008001200039000800000001001d00000000000104350000006001200039000700000001001d00000000000104350000004001200039000300000001001d00000000000104350000000001020436000200000001001d00000000000104350000013701000039000000000201041a000000400b00043d000010910100004100000000051b0436000000000100041400000fd902200197000000040320008c000033c80000c13d0000000003000031000000200130008c00000020040000390000000004034019000033f80000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c700090000000b001d000400000005001d3f553f500000040f000000040a000029000000090b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000033e50000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b000033e10000c13d000000000705004b000033f40000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000352c0000613d0000001f01400039000000600110018f000000000ab1001900000000021a004b000000000200001900000001020040390000104e04a0009c000035260000213d0000000102200190000035260000c13d0000004000a0043f0000001f0230008c0000351e0000a13d00000000020b043300000fd90420009c0000351e0000213d0000014204000039000000000404041a000010940500004100000000065a04360000000405a000390000000000250435000000000500041400000fd902400197000000040420008c000400000002001d000034450000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700090000000a001d000100000006001d3f553f500000040f000000010b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000034300000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b0000342c0000c13d000000000705004b0000343f0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000353b0000613d0000001f01400039000000600110018f0000000001a100190000104e0410009c000035260000213d000000400010043f000000200130008c0000351e0000413d00000000010a0433000900000001001d000000060100002900000fd901100197000600000001001d00000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000351e0000613d000000000101043b0000000101100039000000000201041a0000000b312000b90000000b0300006b0000000905000029000034660000613d0000000b431000fa000000000223004b000035200000c13d0000104d1210012a00000000312500a9000000000305004b0000346d0000613d00000000435100d9000000000223004b000035200000c13d0000104d2110012a00000008020000290000000000120435000000060100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f00000001022001900000351e0000613d000000000101043b000000000201041a0000000b312000b90000000b0300006b0000000905000029000034860000613d0000000b431000fa000000000223004b000035200000c13d0000104d1210012a00000000315200a9000000000305004b0000348d0000613d00000000435100d9000000000223004b000035200000c13d0000104d2110012a000000070200002900000000001204350000109501000041000000400a00043d00000000051a04360000000401a000390000000602000029000000000021043500000000010004140000000402000029000000040320008c0000349f0000c13d0000000003000031000000200130008c00000020040000390000000004034019000034cf0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000b0000000a001d000900000005001d3f553f500000040f000000090b0000290000000b0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000034bc0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000034b80000c13d000000000705004b000034cb0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f000200000001035500000001022001900000354a0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000035260000213d0000000102200190000035260000c13d000000400010043f000000200130008c0000351e0000413d00000000010a0433000000000201004b000034f70000613d0000000c241000b900000000321400d90000000c0220006c000035200000c13d00000005321000b900000000311200d90000104d5340012a000000050110006c000035200000c13d0000104d5120012a00000007050000290000000005050433000000000653004b000035000000413d000010960440009c000034ff0000a13d0000000c645000b90000000c0600006b000034f50000613d0000000c764000fa000000000556004b000035200000c13d000c0000303400e1000035000000013d00000007010000290000000001010433000000000101004b00000000010000190000000002000019000035000000c13d00000000010000190000000002000019000c00000000001d00000008030000290000000003030433000000000431004b000035060000813d0000000502000029000035100000013d000010960220009c0000000002000019000035100000a13d00000005423000b9000000050400006b0000350f0000613d00000005542000fa000000000334004b000035200000c13d00000000121200d90000000c04200029000000000324004b000000000300001900000001030040390000000103300190000035200000c13d0000000a0100002900000000004104350000000c030000290000000204000029000000000034043500000003030000290000000000230435000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f00000005053002720000000505500210000035380000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035340000c13d000000000604004b000035580000c13d000035640000013d000000400200043d0000001f0430018f00000005053002720000000505500210000035470000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035430000c13d000000000604004b000035640000613d000035580000013d000000400200043d0000001f0430018f00000005053002720000000505500210000035560000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000035520000c13d000000000604004b000035640000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f570001043000040000000000020000000005000019000000000601004b000035730000613d000000000602004b000035730000613d000000000521004b000035750000c13d000000000001042d0000000001050019000000000001042d000000000521004b0000358e0000813d000000000512019f0000106d0550009c000036d50000213d0000106f050000410000106f6710012c000000000865004900000000080660190000007f061002100000106fa960012c000000000779013f0000000009a5004900000000090a601900000000898900d9000000ff077002120000000008970049000000000778019f0000000007096019000000000809004b000000000907c019000010c10790009c000038120000c13d0000106f8720012c000035a50000013d0000106d0510009c000036d50000213d0000106d0520009c000036d50000213d0000106f050000410000106f6720012c000000000865004900000000080660190000007f062002100000106fa960012c000000000779013f0000000009a5004900000000090a601900000000898900d9000000ff077002120000000008970049000000000778019f0000000007096019000000000809004b000000000907c019000010c10790009c000038120000c13d0000106f8710012c000000000985004900000000090860190000106f8660012c000000000676013f0000000005850049000000000508601900000000759500d9000000ff066002120000000007560049000000000667019f0000000006056019000000000705004b000000000506c01900000000060004150000106d0750009c000035b70000213d000010c20750009c000037fa0000813d0000106d0750009c000037fd0000213d000000000705004b000037fd0000613d000010c10750009c000035c40000c13d0000000005000415000000000556004900000000050000020000106d0330009c0000000006000019000035de0000a13d000036d50000013d000010c30750009c000036130000813d0000000005000415000000000556004900000000050000020000106d0530009c000036d50000213d000010ee07000041000010ee653000d10000106f7670012c0000106f0970009900000000090760190000106fa750012c000000000667013f0000106f07a0009900000000070a601900000000789700d9000000ff066002120000000007860049000000000667019f0000000006086019000000000708004b000000000806c0190000000006050019000000000338004b000038120000c13d0000106d0340009c000036d50000213d000000000304004b000037f40000613d0000106f4340012c0000106f0740009900000000070460190000106f6460012c000000000434013f0000106f03600099000000000306601900000000537300d9000000ff044002120000000005340049000000000445019f0000000004036019000000000503004b000000000304c0190000106f043001970000106f054001670000106f0440009c00000000040000190000106f04002041000010ee0630009c00000000060000190000106f060040410000106f0550009c000000000406c019000000000404004b0000000004000019000036270000c13d000000000403004b000036260000613d0000106d0430009c000036030000213d000000000403004b000038180000c13d0000000003300049000010ef043001980000368c0000613d00000000654400a90000007f08500270000010f0678000d1000010c10550009c00000000060000190000000005000019000037300000413d00000000654800a9000010c10650009c000036e90000813d00000000060000190000000005070019000037300000013d000010c50750009c000036450000813d000010c608000041000010c7070000410000007f05500210000010c89550012a000010c90950009c000036490000413d0000000007080019000010cb0850009c0000364d0000413d000010ce0850009c000036520000813d000010cf077000410000007f05500210000010d08550012a000010d10850009c000036540000413d000036570000013d000010c104000041000000000121004b0000377e0000813d00000000132400a90000106f010000410000106f6530012c000000000761004900000000070660190000106f6220012c000000000225013f0000000005610049000000000506601900000000565700d9000000ff022002120000000005620049000000000225019f0000000002066019000000000506004b000000000602c019000000000246004b000038120000c13d000010c14210012b000000000541004900000000050460190000106f4330012c000000000223013f0000000001410049000000000104601900000000155100d9000000ff012002120000379a0000013d000010c4070000410000000008000019000010c90950009c0000361b0000813d0000007f05500210000010ca8550012a000010cb0850009c0000361e0000813d000010cc077000410000007f05500210000010cd8550012a000010ce0850009c000036200000413d000010d10850009c000036570000813d000010d2077000410000007f05500210000010d38550012a000010d40850009c000010d5077040410000007f05504210000010d68550412a000010d70850009c000036610000813d000010d8077000410000007f05500210000010d98550012a000036610000013d000010da0850009c000036660000813d000010db077000410000007f05500210000010dc8550012a0000000008000415000000040880008a0000000508800210000010dd0950009c000036710000813d0000000008000415000000030880008a0000000508800210000010de077000410000007f05500210000010df9550012a000200000006001d0000000508800270000010d508500047000010d5095000420000368f0000613d00000000a89900a9000010c10a50009900000000cba800d9000000000bb00049000000000bb9004b000038120000c13d000010e00b5000990000008009900210000000000998004900000000dca900d9000000000bbc004b000038120000c13d00000080099002700000000007970049000010e10b5000990000007f09800270000000008c9a00a90000007f0ac0027000000000b6ba00a9000010e20bc0009c000036950000213d000036920000013d00000000060000190000000005000019000037300000013d0000000006000019000000000a0000190000000009000019000100000006001d00000000baa900a9000036970000013d000100000006001d00000000ba9a00a9000010e30b500099000010e40c500099000010e60d5000990000007f0aa0027000000000edda00a9000010e70e50009900000000fa9a00a90000007f0aa00270000000008f9a00a90000007f08f0027000000000cfc800a900000000c89800a90000007f0880027000000000cbb800a900000000c89800a90000007f0880027000000000cee800a900000000989800a9000010e89cd0012a000010e9d9f0012a000010eadbb0012a000010eb0d5000410000007f0f80027000000000d6df00a9000010ecede0012a000000000e600049000010c10680009c000036b70000413d000010ed0650009900000000f8fe00d9000000000668004b000038120000c13d0000000006000415000000020660006900000000060000020000106d0630009c000036d50000213d000010e50550009900000000655a00a90000000106000029000000810660027000000082055002700000000006c60019000000000556001900000000059500190000000005b500190000000005d500190000008306e002700000000005650019000000000757004b000036d20000613d00000000653700a9000010af0670009c000035cd0000c13d0000106f060000410000106f0850009c0000106f08000041000035dc0000613d000035cd0000013d00000000060000190000106d0340009c000035e00000a13d000000400100043d00000064021000390000112503000041000000000032043500000044021000390000112603000041000000000032043500000024021000390000002803000039000000000032043500000fe002000041000000000021043500000004021000390000002003000039000000000032043500000fd70210009c00000fd701008041000000400110021000000fe1011001c700003f57000104300000007f05500270000010f1865000d1000000000860004900000000985800d9000010f20880009c000038120000c13d000000000776001900000000584500a90000007f06800270000010f3956000d10000000005570019000010c10780009c0000372f0000413d00000000764600a9000010c10760009c000036fa0000813d0000372f0000013d0000007f06600270000010f4876000d1000000000870004900000000986800d9000010f50880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010f6986000d10000000005850019000010c10770009c000037080000813d0000372f0000013d00000000764600a9000010c10760009c0000370c0000813d0000372f0000013d0000007f06600270000010f7876000d1000000000870004900000000986800d9000010f80880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010f9986000d10000000005850019000010c10770009c0000371a0000813d0000372f0000013d00000000764600a9000010c10760009c0000371e0000813d0000372f0000013d0000007f06600270000010fa876000d1000000000870004900000000986800d9000010fb0880009c000038120000c13d000000000557001900000000674600a90000007f06700270000010fc986000d10000000005850019000010c10770009c0000372c0000813d0000372f0000013d00000000764600a9000010c10760009c000037a10000813d00000000060000190000000005650019000000000600001900000000056500190000000006000019000000000565001900000000060000190000000005650019000000000600001900000000056500190000106f6550012c0000106f07000041000000000867004900000000080660190000110a9670012b000000000565013f0000000006970049000000000609601900000000676800d9000000ff055002120000000006750049000000000556019f0000000005076019000000000607004b000000000705c0190000000004470049000010c1044000410000110b05300198000037670000c13d0000110e053001980000376b0000613d0000110f544000d1000011105440012a00001111053001980000376d0000613d00001112544000d1000011135440012a00001114053001980000376f0000613d00001115544000d1000011165440012a0000111705300198000037710000613d00001118544000d1000011195440012a000010c105300198000037730000613d0000111a544000d10000111b5440012a0000111c05300198000037750000613d0000111d544000d10000111e5440012a0000111f05300198000037770000c13d000037790000013d0000110c544000d10000110d5440012a0000110e053001980000374e0000c13d0000111105300198000037520000c13d0000111405300198000037560000c13d00001117053001980000375a0000c13d000010c1053001980000375e0000c13d0000111c05300198000037620000c13d0000111f05300198000037790000613d000010df544000d1000011205440012a0000112103300198000011224340c0d1000011233430c12a000000000121004b000036290000413d0000106f1520012c0000106f0610009900000000060160190000007f012002100000106f7210012c000000000252013f0000106f03700099000000000307601900000000356300d9000000ff022002120000000003520049000000000223019f0000000002056019000000000305004b000000000502c019000010c10250009c000038120000c13d000000000204004b000037f40000613d0000106f3240012c0000106f0530009900000000050360190000106f3110012c000000000121013f0000106f02300099000000000203601900000000255200d9000000ff011002120000000002510049000000000112019f0000000001056019000000000205004b000000000501c0190000000001050019000000000001042d0000007f06600270000010fd876000d1000000000870004900000000986800d9000010fe0880009c000038120000c13d000000000557001900000000684600a90000007f07800270000010ff967000d1000010c10880009c000037300000413d00000000987600d9000010ff0880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037b50000813d000037310000013d0000007f0660027000001100876000d10000000008700049000011010880019700000000986800d9000011020880009c000038120000c13d000000000557001900000000684600a90000007f0780027000001103967000d1000010c10880009c000037320000413d00000000987600d9000011030880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037ca0000813d000037330000013d0000007f0660027000001104876000d10000000008700049000011050880019700000000986800d9000011060880009c000038120000c13d000000000557001900000000684600a90000007f0780027000001107967000d1000010c10880009c000037340000413d00000000987600d9000011070880009c000038120000c13d000000000556001900000000764700a9000010c10760009c000037df0000813d000037350000013d0000007f0660027000001129876000d10000000008700049000011080880019700000000986800d900001ab80880008c000038120000c13d000000000557001900000000684600a90000007f078002700000017c967000c9000010c10880009c000037360000413d00000000987600d90000017c0880008c000038120000c13d000000000556001900000000764700a9000010c10760009c000038070000813d000037370000013d000010630100004100000000001004350000001201000039000000040010043f0000104c0100004100003f5700010430000000400100043d0000112802000041000037ff0000013d000000400100043d000011270200004100000000002104350000000402100039000000000052043500000fd70210009c00000fd70100804100000040011002100000104c011001c700003f57000104300000007f066002700000112a876000d10000000008700049000011090880019700000000986800d9000000140880008c000038120000c13d000000000557001900000000764600a90000007f06600270000037380000013d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000400100043d0000112402000041000000000021043500000004021000390000000000320435000038020000013d00090000000000020000000008010019000000000107004b000039250000613d000300000006001d000200000007001d000400000004001d000500000005001d000600000002001d000700000003001d0000014101000039000000000101041a000900000001001d000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000800000008001d3f553f500000040f000000080300002900000fd903300197000000090400002900000fd9054001970000000102200190000039500000613d000000000101043b00000fd901100197000000000113004b000038570000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c70000800502000039000900000005001d3f553f500000040f00000009050000290000000102200190000039500000613d000000400a00043d000000000101043b000038a50000013d000000400b00043d000010550100004100000000061b04360000000001000414000000040230008c000038620000c13d0000000003000031000000200130008c00000020040000390000000004034019000038950000013d000900000005001d00000fd702b0009c00000fd70200004100000000020b4019000000400220021000000fd70410009c00000fd701008041000000c001100210000000000121019f00000fdb011001c7000000000203001900080000000b001d000100000006001d3f553f500000040f000000010a000029000000080b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000038810000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b0000387d0000c13d000000000705004b000038900000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000039690000613d00000009050000290000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c000039530000213d0000000101100190000039530000c13d0000004000a0043f0000001f0130008c000039510000a13d00000000010b043300000fd90210009c000039510000213d000010b30200004100000000042a043600000fd9011001970000000402a0003900000000001204350000000001000414000000040250008c000038b20000c13d0000000003000031000000200130008c00000020040000390000000004034019000038e30000013d00000fd702a0009c00000fd70200004100000000020a4019000000400220021000000fd70310009c00000fd701008041000000c001100210000000000121019f0000104c011001c7000000000205001900090000000a001d000800000004001d3f553f500000040f000000080b000029000000090a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f0000000506400272000038d00000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b000038cc0000c13d000000000705004b000038df0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00020000000103550000000102200190000039590000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c000039530000213d0000000102200190000039530000c13d000000400010043f000000200130008c000039510000413d00000000010a0433000900000001001d00001046010000410000000000100439000000000100041200000004001004430000002400000443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f0000000102200190000039500000613d000000000101043b000000090500002900000000325100a9000000000301004b000000070700002900000006080000290000000506000029000000040900002900000003040000290000390d0000613d00000000311200d9000000000151004b0000394a0000c13d00000000314200a9000000000304004b000039130000613d00000000434100d9000000000223004b0000394a0000c13d0000000002960019000000000362004b0000000003000019000000010300403900000001033001900000394a0000c13d000000000302004b0000000204000029000039250000613d000000000341004b000039280000813d000000000108004b00000000040000190000000003000019000000000100001900000000050000190000393f0000c13d000039400000013d00000000010000190000000002000019000000000001042d00000000144100d900000000319400a900000000534100d9000000000393004b0000394a0000c13d00000000536400a900000000544300d9000000000464004b0000394a0000c13d00000000542300d9000000000508004b000039380000613d000000000512004b0000393a0000a13d00000000050000190000393f0000013d0000000001000019000039400000013d00000000512100d900002710651000c900000000611500d9000027100110008c0000394a0000c13d00000000518500d9000000000507004b000039260000613d00002710654000c9000000000232004b000039480000213d00000000324500d9000027100220008c0000394a0000c13d00000000327500d9000000000001042d000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000000400200043d0000001f0430018f0000000505300272000039650000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000039610000c13d000000000604004b000039830000613d0000000505500210000039770000013d000000400200043d0000001f0430018f00000005053002720000000505500210000039750000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000039710000c13d000000000604004b000039830000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f57000104300003000000000002000300000002001d00000fd901100197000200000001001d00000000001004350000013401000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d000000000101043b000000030200002900000fd9022001970000000000200435000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d000000400200043d0000112b0320009c000039df0000813d000000000101043b0000006003200039000000400030043f000000000301041a00000000043204360000000103100039000000000303041a000100000004001d000000000034043500000040022000390000000201100039000000000101041a000300000002001d0000000000120435000000020100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f0000000102200190000039d70000613d00000003020000290000000002020433000000000101043b0000000201100039000000000301041a000000000123004b000039d90000413d00000001010000290000000004010433000000000523004900000000615400a9000000000223004b000039d50000613d00000000325100d9000000000242004b000039d90000c13d0000104d2110012a000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000d000000000002000d00000001001d0000013701000039000000000301041a0000013801000039000000000101041a0000013904000039000000000404041a000000400b00043d0000002405b000390000000000450435000010900400004100000000004b043500000fd9011001970000000404b00039000000000014043500000fd9022001970000004401b00039000c00000002001d0000000000210435000000000100041400000fd902300197000000040320008c00003a020000c13d0000000003000031000000600130008c0000006004000039000000000403401900003a310000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00001083011001c7000b0000000b001d3f553f500000040f0000000b0b0000290000000003010019000000600330027000000fd703300197000000600430008c000000600400003900000000040340190000001f0540018f0000000506400272000000050660021000003a1f0000613d00000000076b0019000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000a79004b00003a1b0000c13d000000000705004b00003a2d0000613d000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e440000613d0000001f01400039000000e00210018f0000000001b20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f0000005f0130008c00003e350000a13d00000000020b04330000004001b000390000000001010433000b00000002001d000a00000001001d000000000112004b00003e3d0000413d0000104601000041000000000010043900000000010004120000000400100443000000c0010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000000301043b000000400a00043d000010480100004100000000051a04360000000401a000390000000c0200002900000000002104350000000a020000290000000b01200069000000000213004b0000000003018019000b00000003001d00000000010004140000000d0200002900000fd902200197000000040320008c000d00000002001d00003a6b0000c13d0000000003000031000000200130008c0000002004000039000000000403401900003a9b0000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c7000a0000000a001d000900000005001d3f553f500000040f000000090b0000290000000a0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003a880000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003a840000c13d000000000705004b00003a970000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e530000613d0000001f01400039000000600110018f000000000ba1001900000000021b004b000000000200001900000001020040390000104e04b0009c00003e370000213d000000010220019000003e370000c13d0000004000b0043f000000200230008c00003e350000413d00000000020a0433000400000002001d0000104a0200004100000000052b043600000000020004140000000d04000029000000040440008c00003ae30000613d00000fd701b0009c00000fd70100004100000000010b4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f00000fdb011001c70000000d02000029000a0000000b001d000900000005001d3f553f500000040f000000090a0000290000000a0b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003ace0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003aca0000c13d000000000705004b00003add0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e620000613d0000001f01400039000000600110018f000000000cb100190000104e02c0009c00003e370000213d0000004000c0043f000000200230008c00003e350000413d00000000060b04330000104b0200004100000000052c04360000000402c000390000000c04000029000000000042043500000000020004140000000d04000029000000040440008c00003b280000613d000900000006001d00000fd701c0009c00000fd70100004100000000010c4019000000400110021000000fd70320009c00000fd702008041000000c002200210000000000112019f0000104c011001c70000000d02000029000c0000000c001d000a00000005001d3f553f500000040f0000000a0a0000290000000c0c0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003b120000613d000000000701034f00000000080c0019000000007907043c00000000089804360000000009a8004b00003b0e0000c13d000000000705004b00003b210000613d0000000506600210000000000761034f00000000066c00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e710000613d0000001f01400039000000600110018f0000000906000029000000000ac100190000104e02a0009c00003e370000213d0000004000a0043f000000200230008c00003e350000413d00000000020c043300050000402600ad000000000406004b00003b350000613d00000005546000f9000000000224004b00003e3d0000c13d0000013702000039000000000202041a000010910400004100000000064a04360000000504000029000a104d40400132000000000400041400000fd902200197000000040520008c00003b710000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70340009c00000fd704008041000000c003400210000000000113019f00000fdb011001c7000c0000000a001d000900000006001d3f553f500000040f000000090b0000290000000c0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003b5c0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003b580000c13d000000000705004b00003b6b0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003e800000613d0000001f01400039000000600110018f0000000001a100190000104e0210009c00003e370000213d000000400010043f000000200130008c00003e350000413d00000000010a0433000c00000001001d00000fd90110009c00003e350000213d0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000900000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000003e430000613d000000000101043b000000000101004b00003e350000613d000000400400043d0000109201000041000000000014043500000004014000390000000c02000029000000000021043500000000010004140000000902000029000000040320008c00003bab0000613d00000fd70340009c00000fd7030000410000000003044019000c00000004001d000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f0000000c040000290000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000003e8f0000613d0000104e0140009c00003e370000213d000000400040043f0000014201000039000000000101041a0000105602000041000000000020043900000fd901100197000800000001001d0000000400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001057011001c700008002020000393f553f500000040f000000010220019000003e430000613d000000000101043b000000000101004b00003e350000613d000000400400043d00001093010000410000000001140436000900000001001d00000004014000390000000d02000029000000000021043500000000010004140000000802000029000000040320008c000c00000004001d00003bdf0000613d00000fd70340009c00000fd7030000410000000003044019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c73f553f4b0000040f0000000c040000290000000003010019000000600330027000000fd70030019d00000fd7033001970002000000010355000000010220019000003e9e0000613d0000104e0140009c00003e370000213d0000000c01000029000000400010043f0000106e0110009c00003e370000213d0000000c02000029000000a001200039000000400010043f0000008001200039000700000001001d00000000000104350000006001200039000600000001001d0000000000010435000000400420003900000000000404350000000000020435000000090100002900000000000104350000013701000039000000000201041a000000400b00043d000010910100004100000000051b0436000000000100041400000fd902200197000000040320008c000200000004001d00003c020000c13d0000000003000031000000200130008c0000002004000039000000000403401900003c320000013d00000fd703b0009c00000fd70300004100000000030b4019000000400330021000000fd70410009c00000fd701008041000000c001100210000000000131019f00000fdb011001c700080000000b001d000300000005001d3f553f500000040f000000030a000029000000080b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003c1f0000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003c1b0000c13d000000000705004b00003c2e0000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ead0000613d0000001f01400039000000600110018f000000000ab1001900000000021a004b000000000200001900000001020040390000104e04a0009c00003e370000213d000000010220019000003e370000c13d0000004000a0043f000000200230008c00003e350000413d00000000020b043300000fd90420009c00003e350000213d0000014204000039000000000404041a000010940500004100000000065a04360000000405a000390000000000250435000000000500041400000fd902400197000000040420008c000300000002001d00003c7f0000613d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70350009c00000fd705008041000000c003500210000000000113019f0000104c011001c700080000000a001d000100000006001d3f553f500000040f000000010b000029000000080a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003c6a0000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003c660000c13d000000000705004b00003c790000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ebc0000613d0000001f01400039000000600110018f0000000001a100190000104e0410009c00003e370000213d000000400010043f000000200130008c00003e350000413d00000000010a0433000800000001001d0000000d0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000003e350000613d000000000101043b0000000101100039000000000201041a0000000b312000b90000000b0300006b000000080500002900003c9e0000613d0000000b431000fa000000000223004b00003e3d0000c13d0000104d1210012a00000000315200a9000000000305004b00003ca50000613d00000000435100d9000000000223004b00003e3d0000c13d0000104d2110012a000000070200002900000000001204350000000d0100002900000000001004350000013301000039000000200010043f000000000100041400000fd70210009c00000fd701008041000000c00110021000001053011001c700008010020000393f553f500000040f000000010220019000003e350000613d000000000101043b000000000201041a0000000b312000b90000000b0300006b000000080500002900003cbe0000613d0000000b431000fa000000000223004b00003e3d0000c13d0000104d1210012a00000000315200a9000000000305004b00003cc50000613d00000000435100d9000000000223004b00003e3d0000c13d0000104d2110012a000000060200002900000000001204350000109501000041000000400a00043d00000000051a04360000000401a000390000000d02000029000000000021043500000000010004140000000302000029000000040320008c00003cd70000c13d0000000003000031000000200130008c0000002004000039000000000403401900003d070000013d00000fd703a0009c00000fd70300004100000000030a4019000000400430021000000fd70310009c00000fd701008041000000c001100210000000000141019f0000104c011001c700080000000a001d000300000005001d3f553f500000040f000000030b000029000000080a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003cf40000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003cf00000c13d000000000705004b00003d030000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003ecb0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f000000200130008c00003e350000413d00000000010a0433000000000201004b00003d300000613d0000000a241000b900000000321400d90000000a0220006c00003e3d0000c13d00000004321000b900000000311200d90000104d5340012a000000040110006c00003e3d0000c13d0000104d5120012a00000006050000290000000005050433000000000653004b00003d390000413d000010960440009c00003d380000a13d0000000a645000b900000005060000290000104d0660009c00003d2e0000413d0000000a764000fa000000000556004b00003e3d0000c13d000a0000303400e100003d390000013d00000006010000290000000001010433000000000101004b0000000001000019000000000200001900003d390000c13d00000000010000190000000002000019000a00000000001d00000007030000290000000003030433000000000431004b00003d3f0000813d000000040200002900003d490000013d000010960220009c000000000200001900003d490000a13d00000004423000b9000000040400006b00003d480000613d00000004542000fa000000000334004b00003e3d0000c13d00000000121200d90000000a01200029000000000321004b00000000030000190000000103004039000000010330019000003e3d0000c13d0000000c0300002900000000001304350000000a010000290000000903000029000000000013043500000002010000290000000000210435000010460100004100000000001004390000000001000412000000040010044300000080010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000000101043b00000fd9011001970000000d03000029000000000113004b00003d7c0000c13d000010460100004100000000001004390000000001000412000000040010044300000060010000390000002400100443000000000100041400000fd70210009c00000fd701008041000000c00110021000001054011001c700008005020000393f553f500000040f000000010220019000003e430000613d000000400a00043d000000000101043b00003dc80000013d000000400b00043d000010550100004100000000051b04360000000001000414000000040230008c00003d870000c13d0000000003000031000000200130008c0000002004000039000000000403401900003db80000013d00000fd702b0009c00000fd70200004100000000020b40190000004004200210000000000203001900000fd70310009c00000fd701008041000000c001100210000000000141019f00000fdb011001c7000d0000000b001d000a00000005001d3f553f500000040f0000000a0a0000290000000d0b0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003da50000613d000000000701034f00000000080b0019000000007907043c00000000089804360000000009a8004b00003da10000c13d000000000705004b00003db40000613d0000000506600210000000000761034f00000000066b00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003efb0000613d0000001f01400039000000600110018f000000000ab1001900000000011a004b000000000100001900000001010040390000104e02a0009c00003e370000213d000000010110019000003e370000c13d0000004000a0043f000000200130008c00003e350000413d00000000010b043300000fd90210009c00003e350000213d000010790200004100000000052a0436000000000300041400000fd902100197000000040120008c00003dd30000c13d0000000003000031000000200130008c0000002004000039000000000403401900003e030000013d00000fd701a0009c00000fd70100004100000000010a4019000000400110021000000fd70430009c00000fd703008041000000c003300210000000000113019f00000fdb011001c7000d0000000a001d000a00000005001d3f553f500000040f0000000a0b0000290000000d0a0000290000000003010019000000600330027000000fd703300197000000200430008c000000200400003900000000040340190000001f0540018f000000050640027200003df00000613d000000000701034f00000000080a0019000000007907043c00000000089804360000000009b8004b00003dec0000c13d000000000705004b00003dff0000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f0002000000010355000000010220019000003eda0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b000000000200001900000001020040390000104e0410009c00003e370000213d000000010220019000003e370000c13d000000400010043f000000200130008c00003e350000413d00000000020a0433000000ff0120008c00003e350000213d000000120120008c00003e3d0000213d0000000c010000290000000001010433000000120320008c00003e1b0000c13d000000010300003900003e260000013d0000000a0400003900000001030000390000001202200089000000010520019000000000654400a9000000010400603900000000433400a9000000010420008c0000000102200270000000000405001900003e1e0000213d00000000421300a9000000000401004b00003e2c0000613d00000000411200d9000000000131004b00003e3d0000c13d0000000c0100002900000000002104350000013601000039000000000101041a000010640310019700000080041002700000000b010000293f55356a0000040f000000000001042d000000000100001900003f5700010430000010630100004100000000001004350000004101000039000000040010043f0000104c0100004100003f5700010430000010630100004100000000001004350000001101000039000000040010043f0000104c0100004100003f5700010430000000000001042f000000400200043d0000001f0430018f0000000505300272000000050550021000003e500000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e4c0000c13d000000000604004b00003f090000c13d00003f150000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e5f0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e5b0000c13d000000000604004b00003ee90000c13d00003ef50000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e6e0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e6a0000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e7d0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e790000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e8c0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e880000c13d000000000604004b00003ef50000613d00003ee90000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003e9b0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003e970000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003eaa0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ea60000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003eb90000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003eb50000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003ec80000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ec40000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f0000000505300272000000050550021000003ed70000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ed30000c13d000000000604004b00003f150000613d00003f090000013d000000400200043d0000001f0430018f000000050530027200003ee60000613d00000005065002100000000006620019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003ee20000c13d000000000604004b00003ef50000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000121019f00003f5700010430000000400200043d0000001f0430018f0000000505300272000000050550021000003f070000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b00003f030000c13d000000000604004b00003f150000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000600130021000000fd70320009c00000fd7020080410000004002200210000000000112019f00003f5700010430000000000001042f00000fd70210009c00000fd7010080410000006001100210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f0000105c011001c700008010020000393f553f500000040f000000010220019000003f2b0000613d000000000101043b000000000001042d000000000100001900003f570001043000000000050100190000000000200439000000050130008c00003f3b0000413d000000040100003900000000020000190000000506200210000000000664001900000005066002700000000006060031000000000161043a0000000102200039000000000631004b00003f330000413d00000fd70130009c00000fd7030080410000006001300210000000000200041400000fd70320009c00000fd702008041000000c002200210000000000112019f0000112c011001c700000000020500193f553f500000040f000000010220019000003f4a0000613d000000000101043b000000000001042d000000000001042f00003f4e002104210000000102000039000000000001042d0000000002000019000000000001042d00003f53002104230000000102000039000000000001042d0000000002000019000000000001042d00003f550000043200003f560001042e00003f5700010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff09c8f7ec0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000001e13380ae0fcab300000000000000000000000000000000000000000000000000000000616c697a696e6700000000000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320696e69746908c379a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000000000000000000000002000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024980000000200000000000000000000000000000240000001000000000000000000000000000000000000000000000000000000000000000000000000009f6506cd00000000000000000000000000000000000000000000000000000000cdaa21b600000000000000000000000000000000000000000000000000000000e30c397700000000000000000000000000000000000000000000000000000000ef36bbdd00000000000000000000000000000000000000000000000000000000f6ed201600000000000000000000000000000000000000000000000000000000f6ed201700000000000000000000000000000000000000000000000000000000fa6d5f1800000000000000000000000000000000000000000000000000000000fe1006ad00000000000000000000000000000000000000000000000000000000ef36bbde00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000e486033800000000000000000000000000000000000000000000000000000000e486033900000000000000000000000000000000000000000000000000000000ee6b13fc00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000e4676f3700000000000000000000000000000000000000000000000000000000d88b9d2d00000000000000000000000000000000000000000000000000000000e18f882100000000000000000000000000000000000000000000000000000000e18f882200000000000000000000000000000000000000000000000000000000e1d146fb00000000000000000000000000000000000000000000000000000000d88b9d2e00000000000000000000000000000000000000000000000000000000da6ab4f800000000000000000000000000000000000000000000000000000000cf329d1500000000000000000000000000000000000000000000000000000000cf329d1600000000000000000000000000000000000000000000000000000000d65bd24100000000000000000000000000000000000000000000000000000000cdaa21b700000000000000000000000000000000000000000000000000000000ce85361300000000000000000000000000000000000000000000000000000000ba437c6700000000000000000000000000000000000000000000000000000000c3db3c3500000000000000000000000000000000000000000000000000000000c7ad089400000000000000000000000000000000000000000000000000000000c7ad089500000000000000000000000000000000000000000000000000000000c86d1a7800000000000000000000000000000000000000000000000000000000c3db3c3600000000000000000000000000000000000000000000000000000000c4ae316800000000000000000000000000000000000000000000000000000000bd212c0d00000000000000000000000000000000000000000000000000000000bd212c0e00000000000000000000000000000000000000000000000000000000be26317e00000000000000000000000000000000000000000000000000000000ba437c6800000000000000000000000000000000000000000000000000000000bc5dc4c300000000000000000000000000000000000000000000000000000000b1a250f100000000000000000000000000000000000000000000000000000000b7f2d25700000000000000000000000000000000000000000000000000000000b7f2d25800000000000000000000000000000000000000000000000000000000b9eb69f600000000000000000000000000000000000000000000000000000000b1a250f200000000000000000000000000000000000000000000000000000000b4a0bdf300000000000000000000000000000000000000000000000000000000afcff50e00000000000000000000000000000000000000000000000000000000afcff50f00000000000000000000000000000000000000000000000000000000b0772d0b000000000000000000000000000000000000000000000000000000009f6506ce00000000000000000000000000000000000000000000000000000000a15753dc000000000000000000000000000000000000000000000000000000005fe3b5660000000000000000000000000000000000000000000000000000000080d45a2c0000000000000000000000000000000000000000000000000000000089afcb43000000000000000000000000000000000000000000000000000000008e8f294a000000000000000000000000000000000000000000000000000000008e8f294b000000000000000000000000000000000000000000000000000000009198e515000000000000000000000000000000000000000000000000000000009565d3d20000000000000000000000000000000000000000000000000000000089afcb44000000000000000000000000000000000000000000000000000000008da5cb5b0000000000000000000000000000000000000000000000000000000088bead720000000000000000000000000000000000000000000000000000000088bead730000000000000000000000000000000000000000000000000000000088d742c20000000000000000000000000000000000000000000000000000000080d45a2d00000000000000000000000000000000000000000000000000000000856c3aa40000000000000000000000000000000000000000000000000000000079ba5096000000000000000000000000000000000000000000000000000000007dc0d1cf000000000000000000000000000000000000000000000000000000007dc0d1d0000000000000000000000000000000000000000000000000000000007ef820700000000000000000000000000000000000000000000000000000000079ba5097000000000000000000000000000000000000000000000000000000007dafcd89000000000000000000000000000000000000000000000000000000006857249b000000000000000000000000000000000000000000000000000000006857249c00000000000000000000000000000000000000000000000000000000715018a6000000000000000000000000000000000000000000000000000000005fe3b567000000000000000000000000000000000000000000000000000000006426b4a70000000000000000000000000000000000000000000000000000000037f23cd20000000000000000000000000000000000000000000000000000000055d36c97000000000000000000000000000000000000000000000000000000005c975aba000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000005d536d300000000000000000000000000000000000000000000000000000000055d36c9800000000000000000000000000000000000000000000000000000000594a67ee00000000000000000000000000000000000000000000000000000000487b0dfa00000000000000000000000000000000000000000000000000000000487b0dfb000000000000000000000000000000000000000000000000000000004e71d92d0000000000000000000000000000000000000000000000000000000037f23cd30000000000000000000000000000000000000000000000000000000038f6a434000000000000000000000000000000000000000000000000000000001bffac880000000000000000000000000000000000000000000000000000000024e6baf10000000000000000000000000000000000000000000000000000000024e6baf20000000000000000000000000000000000000000000000000000000029b6eca9000000000000000000000000000000000000000000000000000000001bffac8900000000000000000000000000000000000000000000000000000000207add91000000000000000000000000000000000000000000000000000000001b3f8c5d000000000000000000000000000000000000000000000000000000001b3f8c5e000000000000000000000000000000000000000000000000000000001b9ce575000000000000000000000000000000000000000000000000000000000104db1b000000000000000000000000000000000000000000000000000000000e32cb86310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e000000000000000000000000000000000000002000000080000000000000000095dd9193000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000001c00000000000000000182df0f50000000000000000000000000000000000000000000000000000000070a082310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffff7f000000000000000000000000000000000000000000000000ffffffffffffff1fdf37d27e88e3bd0b85262482997e409a463f5be0ebb19232abf994dd8474090d020000000000000000000000000000000000004000000000000000000000000002000002000000000000000000000000000000440000000000000000000000006f307dc3000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000008aadf79900000000000000000000000000000000000000000000000000000000fa7781ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff9fffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000038d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227000000000000000000000000000000000000000040000000800000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d955391320200000200000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000042cbb15ccdc3cad6266b0e7a08c0454b23bf29dc2df74b6f3c209e9336465bd14e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff757064617465416c7068612875696e743132382c75696e7431323829000000009122c3fdea272423a0586803b53902139919baf05be731f04724ef8f363d378d746f67676c6550617573652829000000000000000000000000000000000000005db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586164644d61726b657428616464726573732c616464726573732c75696e743235362c75696e7432353629000000000000000000000000000000000000000000007aee632d000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffff5f80000000000000000000000000000000000000000000000000000000000000000313b285000000000000000000000000000000000000000000000000000000008e8f294b00000000000000000000000000000000000000000000000000000000dc0d0aab000000000000000000000000000000000000000000000000000000001322eaea77217179bf4ef6084dc2f48c897e0d5a6b8365213804360e4d8ba9a2f257f636000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000f486040c0000000000000000000000000000000000000000000000000000000083aebebd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000800000000000000000313ce56700000000000000000000000000000000000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c726561ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e066fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa06974000000000000000000000000000000000000000000000000000000000000436f6d7074726f6c6c65723a20496e76616c6964206d61784c6f6f70734c696dc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa5061757361626c653a207061757365640000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000006472657373000000000000000000000000000000000000000000000000000000696e76616c696420616365737320636f6e74726f6c206d616e616765722061646e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069e07adb4000000000000000000000000000000000000000000000000000000000e6c4247b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000008000000000000000006275726e286164647265737329000000000000000000000000000000000000007365744d61784c6f6f70734c696d69742875696e743235362900000000000000697373756528626f6f6c2c616464726573735b5d290000000000000000000000dd032f28700d4e4b1719b8fa26918a7d68608b4e36def571ce5fe7a3ecd69f455272e69bcef8da96614ac4a5d1e95ca02c35ea627bf7ecf389ec88d8d78b86bb98e1b31b00000000000000000000000000000000000000000000000000000000358ae03600000000000000000000000000000000000000000000000000000000b62cad690000000000000000000000000000000000000000000000000000000096e85ced0000000000000000000000000000000000000000000000000000000041976e0900000000000000000000000000000000000000000000000000000000fc57d4df000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a763ffff4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000840000008000000000000000007365745374616b6564417428616464726573735b5d2c75696e743235365b5d29947d5a840000000000000000000000000000000000000000000000000000000009d2594e8892daceca055f74be758146a8b8b1167444d0b4ccb96e74168198ccb7d09497000000000000000000000000000000000000000000000000000000007570646174654d756c7469706c6965727328616464726573732c75696e74323591e78a55b6df3a0eac1c12a64572a8c0faced385bafba688817f5ce6daa33537beb98cab0000000000000000000000000000000000000000000000000000000000c4e3d1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf02000000000000000000000000000000000000200000008000000000000000007f97254800000000000000000000000000000000000000000000000000000000a699df4aa8f89fc1f5408fe78ae114651f18b25ed1601680e4c70c15177d8b1b75d724f60000000000000000000000000000000000000000000000000000000038d22ee80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000007365744c696d69742875696e743235362c75696e7432353629000000000000006c52f3e195bdc534883e903e0612c49261a466aacd492501870b0a0ac0b18355e55fb509000000000000000000000000000000000000000000000000000000004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720200000000000000000000000000000000000040000000800000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffa666642b0000000000000000000000000000000000000000000000000000000018c5e8ab000000000000000000000000000000000000000000000000000000004a3fa29300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffc0e22de1457cb61fb61b60176bc4235a9abd19466126b46692bc14fc573f099249192e7a7b00000000000000000000000000000000000000000000000000000000a9059cbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff3f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206ec7edf5cfe443c04a10a60ff6084c847114348c55b257a01d62700326219adbba416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000000000000000000000000000000000000000000000000000ffffffffffffff60000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000010000000000000000000000000000000000000000000000000000000733048c5bfffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000000000000000001c8464f76164760000001fffffffffffffffffffffffffffffff000000000000000000000000000000000ffffffffffffffffffffffffffffffe80000000000000000000000000000000000000000000000000000000000000000000000000001c8464f7616476000000000000000000000000000000000000000000000f1aaddd7742e9000000000000100000000000000000000000000000000000000f1aaddd7742e9000000000000000000000000000000000000000000000000afe10820813d78000000000000001fffffffffffffffffffffffffffffffc0000000000000000000000000000000000000000000000000000000000000000000afe10820813d780000000000000000000000000000000000000000000000002582ab704279ec00000000000000001fffffffffffffffffffffffffffffffe000000000000000000000000000000000000000000000000000000000000000002582ab704279ec00000000000000000000000000000000000000000000000001152aaa3bf81cc000000000000000001ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000001152aaa3bf81cc000000000000000000000000000000000000000000000000002f16ac6c59de70000000000000000001ffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000002f16ac6c59de70000000000000000000000000000000000000000000000000004da2cbf1be5828000000000000000001ffffffffffffffffffffffffffffffffc0000000000000000000000000000000000000000000000000000000000000004da2cbf1be58280000000000000000000000000000000000000000000000000063afbe7ab2082c000000000000000001ffffffffffffffffffffffffffffffffe00000000000000000000000000000000000000000000000000000000000000063afbe7ab2082c0000000000000000000000000000000000000000000000000070f5a893b608861e1f58934f97aea57efffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000070f5a893b608861e1f58934f97aea57d0000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000012aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa000000000000000000000000000000007fffffffffffffffffffffffffffffff000000000000000000000000000000010ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b000000000000000000000000000000010e38e38e38e38e38e38e38e38e38e38e000000000000000000000000000000011249249249249249249249249249249200000000000000000000000000000001199999999999999999999999999999990000000000000000000000000000000109d89d89d89d89d89d89d89d89d89d89000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000fffffffffffffffffffffffffffffffef777777777777777777777777777777800000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000108888888888888888888888888888888ffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000fffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000010e1b3be415a0000fffffffffffffffffffffffffffffffffffffffffffffffffa5f6ec094e2000000000000000000000000000000000000000000000000000005a0913f6b1e00000000000000000000000000000000000000000000000000000168244fdac78000ffffffffffffffffffffffffffffffffffffffffffffffffffb7f8bcd43e8000000000000000000000000000000000000000000000000000004807432bc18000000000000000000000000000000000000000000000000000000c0135dca04000fffffffffffffffffffffffffffffffffffffffffffffffffffe48f84e3240000000000000000000000000000000000000000000000000000001b707b1cdc000000000000000000000000000000000000000000000000000000036e0f639b800fffffffffffffffffffffffffffffffffffffffffffffffffffff9e70116080000000000000000000000000000000000000000000000000000000618fee9f8000000000000000000000000000000000000000000000000000000009c197dcc00fffffffffffffffffffffffffffffffffffffffffffffffffffffff1cf231c000000000000000000000000000000000000000000000000000000000e30dce400000000000000000000000000000000000000000000000000000000012ebd1300ffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8b6610000000000000000000000000000000000ffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000017499f000000000000000000000000000000000000000000000000000000000001a9d480ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe39c8000000000000000000000000000000000ffffffffffffffffffffffffffffff8000000000000000000000000000000000000000000000000000000000001c6380000000000000000000000000000000000000000000000000000000000001c63800000000000000000000000000000000fffffffffffffffffffffffffffffff800000000000000000000000000000000fffffffffffffffffffffffffffffffc00000000000000000000000000000000000000000000000021c3677c82b40000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000f1aaddd7742e56d32fb9f997440000000000000000000000000043cbaf42a000812488fc5c220ad7b97bf6e99e000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000afe10820813d65dfe6a33c07f738f000000000000000000000000000005d27a9f51c31b7c2f8038212a057477999100000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000002582ab704279e8efd15e0265855c47a0000000000000000000000000000001b4c902e273a58678d6d3bfdb93db96d020000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001152aaa3bf81cb9fdb76eae12d02957100000000000000000000000000000003b1cc971a9bb5b9867477440d6d1577500000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002f16ac6c59de6f8d5d6f63c1482a7c86000000000000000000000000000000015bf0a8b1457695355fb8ac404e7a79e3000000000000000000000000000000004da2cbf1be5827f9eb3ad1aa9866ebb300000000000000000000000000000000d3094c70f034de4b96ff7d5b6f99fcd800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000063afbe7ab2082ba1a0ae5e4eb1b479dc00000000000000000000000000000000a45af1e1f40c333b3de1db4dd55f29a7000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000910b022db7ae67ce76b441c27035c6a1000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000783eafef1c0a8f3978c7f81824d62ebf0000000000000000000000000000000088415abbe9a76bead8d00cf112e4d4a81086170d000000000000000000000000000000000000000000000000000000006e20696e7432353600000000000000000000000000000000000000000000000053616665436173743a2076616c756520646f65736e27742066697420696e2061c3b2a8f40000000000000000000000000000000000000000000000000000000079c4747a00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe548ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec000000000000000000000000000000000000000000000000ffffffffffffffa002000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eb0ece0d1a8adb875ec0fd7d608c8b3bd3b0ecce166072856f8aee7eaa1e443b" + ] +} diff --git a/deployments/zksyncsepolia/Prime_Proxy.json b/deployments/zksyncsepolia/Prime_Proxy.json new file mode 100644 index 000000000..910f083a2 --- /dev/null +++ b/deployments/zksyncsepolia/Prime_Proxy.json @@ -0,0 +1,356 @@ +{ + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0xE8C6Cf867CF962d289305ECE9b139a4116674541", + "contractAddress": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "transactionIndex": 0, + "gasUsed": "33803737", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca", + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x000000000000000000000000000000000000000000000000000451d8792c3a2b", + "logIndex": 0, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x00000000000000000000000000000000000000000000000000006992cfa0e5eb", + "logIndex": 1, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000042639e7691189f8b87ee0e1d209af763855156c4" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa0"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd01", + "logIndex": 4, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0xc2d09fef144f7c8a86f71ea459f8fc17f675768eb1ae369cbd77fb31d467aafa"], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014", + "logIndex": 5, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258"], + "data": "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "logIndex": 6, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 7, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "topics": ["0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018e44f588a4dcf2f7145d35a5c226e129040b6d3", + "logIndex": 8, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541", + "0x010001afcc567b844d80e587a198ec7038e2f06ff403702a919819e3ef63c3a8", + "0x00000000000000000000000072b85930f7f8d00ace5ead10a315c17b8954fbcf" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + }, + { + "transactionIndex": 0, + "blockNumber": 3549333, + "transactionHash": "0xd4244bb351edbbb2d093358cc1a67aaf1075a20b9fc7240e1672773b0cf5eab3", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x000000000000000000000000e8c6cf867cf962d289305ece9b139a4116674541" + ], + "data": "0x0000000000000000000000000000000000000000000000000000e7aa04252600", + "logIndex": 10, + "blockHash": "0xbe5b44046a95071037ea304fbc13b1dcb4aec2645de28a4a26c4bec96d4608ca" + } + ], + "blockNumber": 3549333, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [ + "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "0xb1a250f2000000000000000000000000825f9ee3b2b1c159a5444a111a70607f3918564e0000000000000000000000003aecac43a2ebe5d8184e650403bf9f656f9d1cfa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d07f543d47c3a8997d6079958308e981ac14cd010000000000000000000000003407c349f80e4e9544c73ca1e9334ceea72665170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000748853b3be26c46b4562fd314dfb82708f395bdf0000000000000000000000000000000000000000000000000000000000000014" + ], + "numDeployments": 1, + "solcInputHash": "9555bbe1dbe04211a0576a409872928f", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"events\":{\"AdminChanged(address,address)\":{\"details\":\"Emitted when the admin account has changed.\"},\"BeaconUpgraded(address)\":{\"details\":\"Emitted when the beacon is upgraded.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":\"OptimizedTransparentUpgradeableProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bec47f69510a4ace724a15533969ce9479ea9dfef773b1da341c64e8f507cb9b\",\"dweb:/ipfs/QmSu6KnnhhcRAEtdqYncLKw6JEByiptoZR7paqQv2x5CVu\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\":{\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4f5abfc32db1d44fd3d38d902879eaeaad827781bb9f954d3ccb8639c55db3c0\",\"dweb:/ipfs/QmVSkxFgWphaUx6w9XdvgwJJuxABdpuVQEbABbRmzd3XFc\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9cbd3212cc9e1dbc383b66ef6b750d58c07c4d73d404c6ec55e4bfed25a8fb6f\",\"dweb:/ipfs/QmPN8XajdLkydiQv2146q1M7nGqYk67Z5SNSjbzFU9MiM5\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://60941294a981f6e3ee77c19e503b64c4114b4e7f3261cf489d6898fdd4916522\",\"dweb:/ipfs/QmQVmckpCRrtkCwyPG7ksVo59yjZdtpNerJDzw3hQVB62A\"]},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ada1e030c0231db8d143b44ce92b4d1158eedb087880cad6d8cc7bd7ebe7b354\",\"dweb:/ipfs/QmWZ2NHZweRpz1U9GF6R1h65ri76dnX7fNxLBeM2t5N5Ce\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0bc227c71372eb216b7965a91a09c843e9e9670369af0410d924cf4208a8dabe\",\"dweb:/ipfs/QmTR55ug3diUCsVedV8C6ShstCcbqSNPVEvmCpqc91pEDf\"]},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dbaba7fe0fe556cc5ed291e03d271fd27d395250141ecfb57a4b30d528958ff9\",\"dweb:/ipfs/QmWT653X2DyZo8nqEcmFe3yTkrCJv3ptbZLhbgLU3y6abe\"]},\"hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol\":{\"keccak256\":\"0xa30117644e27fa5b49e162aae2f62b36c1aca02f801b8c594d46e2024963a534\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c270574add213952363bf451bd512acab5fc48c5a06fc05ad75e99eb4b044b99\",\"dweb:/ipfs/QmNQyg2ZvM59Q6FFg1ukJah2xpg8kvDZnTLRVLtMGKuHL1\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "deployedBytecode": "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "events": { + "AdminChanged(address,address)": { + "details": "Emitted when the admin account has changed." + }, + "BeaconUpgraded(address)": { + "details": "Emitted when the beacon is upgraded." + }, + "Upgraded(address)": { + "details": "Emitted when the implementation is upgraded." + } + }, + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + }, + "factoryDeps": [ + "0x0004000000000002000600000000000200000000030100190000006004300270000001860340019700030000003103550002000000010355000001860040019d0000000102200190000000bc0000c13d0000008005000039000000400050043f000000040230008c000000fa0000413d000000000201043b000000e0022002700000019b0420009c0000013d0000213d0000019e0420009c000001880000613d0000019f0220009c0000015e0000c13d000000440230008c000002680000413d0000000402100370000000000602043b000001880260009c000002680000213d0000002402100370000000000202043b000001890420009c000002680000213d0000002304200039000000000434004b000002680000813d0000000407200039000000000171034f000000000401043b000001890140009c000002680000213d00000000014200190000002401100039000000000131004b000002680000213d000400000007001d000600000004001d000500000006001d000300000005001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d00000006090000290000001f01900039000001ad011001970000003f01100039000001ad01100197000000400400043d0000000001140019000000000241004b00000000020000190000000102004039000001890310009c000000f40000213d0000000102200190000000f40000c13d000000400010043f0000001f0190018f000200000004001d000000000894043600000004020000290000002002200039000000020220036700000005039002720000000503300210000000620000613d0000000004380019000000000502034f0000000006080019000000005705043c0000000006760436000000000746004b0000005e0000c13d000000000401004b000000700000613d000000000232034f00000000033800190000000301100210000000000403043300000000041401cf000000000414022f000000000202043b0000010001100089000000000212022f00000000011201cf000000000141019f0000000000130435000400000008001d000000000198001900000000000104350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000505000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d000000400100043d000600000001001d000001910110009c000000f40000213d00000006030000290000006001300039000000400010043f000000400130003900000192020000410000000000210435000000270100003900000000021304360000019301000041000100000002001d00000000001204350000018b010000410000000000100439000000050100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000201000029000000000201043300000000010004140000000503000029000000040330008c000004fb0000c13d000000010200003900000001030000310000050e0000013d0000001f023000390000018702200197000000a002200039000000400020043f0000001f0230018f00000005043002720000000504400210000000cb0000613d000000a005000039000000a006400039000000000701034f000000007807043c0000000005850436000000000865004b000000c70000c13d000000000502004b000000d90000613d000000000141034f0000000302200210000000a004400039000000000504043300000000052501cf000000000525022f000000000101043b0000010002200089000000000121022f00000000012101cf000000000151019f0000000000140435000000600130008c000002680000413d000000a00800043d000001880180009c000002680000213d000000c00700043d000001880170009c000002680000213d000000e00200043d000001890120009c000002680000213d0000001f01200039000000000431004b00000000040000190000018a040080410000018a01100197000000000501004b00000000050000190000018a050040410000018a0110009c000000000504c019000000000105004b000002680000c13d000000a0012000390000000001010433000001890410009c000002540000a13d000001a70100004100000000001004350000004101000039000000040010043f000001a8010000410000061300010430000000000103004b0000015e0000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a0000018802200197000000050410027200000005044002100000011e0000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b0000011a0000c13d000000000605004b0000012b0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000026a0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000013a0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000001360000c13d000000000504004b000002900000613d000002210000013d0000019c0120009c000001d40000613d0000019d0120009c0000015e0000c13d0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002960000c13d000000400100043d0000000000210435000001860210009c00000186010080410000004001100210000001a0011001c7000006120001042e000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001f40000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000240230008c000002680000413d0000000002000416000000000202004b000002680000c13d0000000401100370000000000201043b000001880120009c000002680000213d000600000002001d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b0000034b0000c13d000000400200043d000001a10120009c000000f40000213d0000002001200039000400000001001d000000400010043f000500000002001d00000000000204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000003370000613d0000018d01000041000000000201041a0000018e022001970000000605000029000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000101200190000002680000613d00000005010000290000000001010433000000000101004b000003f90000c13d0000000001000019000006120001042e0000000001000416000000000101004b000002680000c13d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000002d70000c13d0000018d01000041000000000101041a0000018801100197000000400200043d0000000000120435000001860120009c00000186020080410000004001200210000001a0011001c7000006120001042e000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002030000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000001ff0000c13d000000000605004b000002100000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c0000022d0000c13d000000030200036700000001030000310000001f0430018f000000050130027200000005011002100000021f0000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b0000021b0000c13d000000000504004b000002900000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000002900000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002440000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000002400000c13d000000000605004b000002510000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d0000001f04100039000001ad044001970000003f04400039000001ad04400197000000400900043d0000000004490019000000000594004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000a003300039000000400040043f0000000006190436000000c0022000390000000004210019000000000334004b000003180000a13d00000000010000190000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000002810000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b0000027d0000c13d000000000605004b0000028e0000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002940000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002b80000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002b40000c13d000000000605004b000002c50000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003840000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000002d40000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000002d00000c13d000000000504004b000002900000613d000002210000013d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f0000000102200190000004210000613d000000000101043b00000188011001970000000002000411000000000112004b000001710000613d000000020300036700000000010000310000001f0510018f0000018d02000041000000000202041a000001880220019700000005041002720000000504400210000002f90000613d000000000603034f0000000007000019000000006806043c0000000007870436000000000847004b000002f50000c13d000000000605004b000003060000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000343034f000000000303043b0000010005500089000000000353022f00000000035301cf000000000363019f00000000003404350000000003000414000000040420008c000003ac0000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000003150000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000003110000c13d000000000504004b000002210000c13d000002900000013d000500000009001d000400000007001d000000000301004b000003240000613d000000000300001900000000046300190000000005230019000000000505043300000000005404350000002003300039000000000413004b0000031d0000413d000300000006001d000000000116001900000000000104350000018b010000410000000000100439000600000008001d00000004008004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b0000034c0000c13d000000400100043d0000006402100039000001a50300004100000000003204350000004402100039000001a603000041000000000032043500000024021000390000002d03000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001a4011001c70000061300010430061105700000040f000000060100002900000188051001970000018d01000041000000000201041a0000018e02200197000000000252019f000000000021041b0000000001000414000001860210009c0000018601008041000000c0011002100000018f011001c70000800d0200003900000002030000390000019004000041061106020000040f0000000603000029000000010120019000000004020000290000000501000029000002680000613d0000000001010433000000000101004b000003d30000c13d000000800020043f0000019501000041000000000021041b0000018801200197000000400200043d000000200320003900000000001304350000000000020435000001860120009c000001860200804100000040012002100000000002000414000001860320009c0000018602008041000000c002200210000000000112019f00000196011001c70000800d0200003900000001030000390000019704000041061106020000040f0000000101200190000002680000613d000000800100043d0000014000000443000001600010044300000020010000390000010000100443000000010100003900000120001004430000019801000041000006120001042e000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d0000018603300197000000050430027200000005044002100000039b0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003970000c13d000000000605004b000003a80000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d00000060013002100000061300010430000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000003c30000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000003bf0000c13d000000000605004b000003d00000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000002900000c13d000002940000013d000000400400043d000001910140009c000000f40000213d0000006001400039000000400010043f0000004001400039000001920200004100000000002104350000002701000039000200000004001d00000000021404360000019301000041000100000002001d00000000001204350000018b01000041000000000010043900000004003004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004170000613d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004220000c13d00000001020000390000000104000031000004350000013d000000400300043d000001910130009c000000f40000213d0000006001300039000000400010043f0000004001300039000001920200004100000000002104350000002701000039000200000003001d00000000021304360000019301000041000300000002001d00000000001204350000018b010000410000000000100439000000060100002900000004001004430000000001000414000001860210009c0000018601008041000000c0011002100000018c011001c70000800202000039061106070000040f0000000102200190000004210000613d000000000101043b000000000101004b000004870000c13d000000400100043d0000006402100039000001a20300004100000000003204350000004402100039000001a303000041000000000032043500000024021000390000002603000039000003400000013d000000000001042f0000000304000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b0000045b0000c13d00000060010000390000008003000039000000000202004b0000000402000029000003640000c13d0000000001010433000000000201004b0000055b0000c13d000000400400043d000600000004001d0000019401000041000000000014043500000004014000390000002002000039000000000021043500000002010000290000000003010433000500000003001d0000002401400039000000000031043500000044024000390000000101000029061105630000040f00000005010000290000001f01100039000001ad011001970000004401100039000001860210009c00000186010080410000000603000029000001860230009c000001860300804100000060011002100000004002300210000000000121019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004780000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004740000c13d000000000705004b000004390000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004390000013d0000000501000029000000000201043300000000010004140000000603000029000000040330008c000004900000c13d00000001020000390000000104000031000004a30000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000006020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018604100197000000000104004b000004cf0000c13d00000060010000390000008003000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055b0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000002020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000307000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000004bb0000413d0000001f04200039000001ad04400197000000000232001900000000000204350000004402400039000001860320009c00000186020080410000006002200210000001860310009c00000186010080410000004001100210000000000112019f0000061300010430000001890140009c000000f40000213d0000001f01400039000001ad011001970000003f01100039000001ad03100197000000400100043d0000000003310019000000000513004b00000000050000190000000105004039000001890630009c000000f40000213d0000000105500190000000f40000c13d000000400030043f0000001f0540018f0000000003410436000000030600036700000005044002720000000504400210000004ec0000613d0000000007430019000000000806034f0000000009030019000000008a08043c0000000009a90436000000000a79004b000004e80000c13d000000000705004b000004a70000613d000000000646034f00000000044300190000000305500210000000000704043300000000075701cf000000000757022f000000000606043b0000010005500089000000000656022f00000000055601cf000000000575019f0000000000540435000004a70000013d0000000404000029000001860340009c00000186040080410000004003400210000001860420009c00000186020080410000006002200210000000000232019f000001860310009c0000018601008041000000c001100210000000000112019f00000005020000290611060c0000040f000000010220018f00030000000103550000006001100270000101860010019d0000018603100197000000000103004b0000052d0000c13d0000006001000039000000000202004b000001d20000c13d0000000001010433000000000201004b0000055a0000c13d000000400100043d0000019402000041000000000021043500000004021000390000002003000039000000000032043500000006020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b0000000107000029000004c20000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000005250000413d000004c20000013d000001890130009c000000f40000213d0000001f01300039000001ad011001970000003f01100039000001ad04100197000000400100043d0000000004410019000000000514004b00000000050000190000000105004039000001890640009c000000f40000213d0000000105500190000000f40000c13d000000400040043f0000001f0430018f0000000005310436000300000005001d0000000305000367000000050330027200000005033002100000054b0000613d00000003080000290000000006380019000000000705034f000000007907043c0000000008980436000000000968004b000005470000c13d000000000604004b000005110000613d000000000535034f00000003033000290000000304400210000000000603043300000000064601cf000000000646022f000000000505043b0000010004400089000000000545022f00000000044501cf000000000464019f0000000000430435000005110000013d0000000303000029000001860230009c00000186030080410000004002300210000001860310009c00000186010080410000006001100210000000000121019f0000061300010430000000000403004b0000056d0000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000534004b000005660000413d00000000012300190000000000010435000000000001042d000001990100004100000000001004390000000001000412000000040010044300000024000004430000000001000414000001860210009c0000018601008041000000c0011002100000019a011001c70000800502000039061106070000040f00000001022001900000059a0000613d000000000101043b00000188011001970000000002000411000000000112004b0000059b0000c13d000000400100043d0000008402100039000001a90300004100000000003204350000006402100039000001aa0300004100000000003204350000004402100039000001ab03000041000000000032043500000024021000390000004203000039000000000032043500000194020000410000000000210435000000040210003900000020030000390000000000320435000001860210009c00000186010080410000004001100210000001ac011001c70000061300010430000000000001042f000000020300036700000000010000310000001f0410018f0000018d02000041000000000202041a00000188022001970000000505100272000005aa0000613d0000000506500210000000000703034f0000000008000019000000007907043c0000000008980436000000000968004b000005a60000c13d000000000604004b000005b80000613d00000003044002100000000505500210000000000605043300000000064601cf000000000646022f000000000353034f000000000303043b0000010004400089000000000343022f00000000034301cf000000000363019f00000000003504350000000003000414000000040420008c000005d50000c13d000000030200036700000001030000310000001f0430018f00000005013002720000000501100210000005c70000613d000000000502034f0000000006000019000000005705043c0000000006760436000000000716004b000005c30000c13d000000000504004b000005fb0000613d0000000304400210000000000501043300000000054501cf000000000545022f000000000212034f000000000202043b0000010004400089000000000242022f00000000024201cf000000000252019f0000000000210435000005fb0000013d000001860410009c00000186010080410000006001100210000001860430009c0000018603008041000000c003300210000000000113019f0611060c0000040f0003000000010355000000000301001900000060033002700000001f0530018f000101860030019d000001860330019700000005043002720000000504400210000005ec0000613d000000000601034f0000000007000019000000006806043c0000000007870436000000000847004b000005e80000c13d000000000605004b000005f90000613d0000000305500210000000000604043300000000065601cf000000000656022f000000000141034f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000000101200190000005ff0000613d000001860130009c00000186030080410000006001300210000006120001042e00000060013002100000061300010430000000000001042f00000605002104210000000102000039000000000001042d0000000002000019000000000001042d0000060a002104230000000102000039000000000001042d0000000002000019000000000001042d0000060f002104250000000102000039000000000001042d0000000002000019000000000001042d0000061100000432000006120001042e0000061300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff80000000000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcffffffffffffffffffffffff00000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000bc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b000000000000000000000000000000000000000000000000ffffffffffffff9f206661696c656400000000000000000000000000000000000000000000000000416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c08c379a000000000000000000000000000000000000000000000000000000000b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610302000000000000000000000000000000000000400000000000000000000000007e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f0000000200000000000000000000000000000080000001000000000000000000310ab089e4439a4c15d089f94afb7896ff553aecb10793d0ab882de59d99a32e0200000200000000000000000000000000000044000000000000000000000000000000000000000000000000000000000000000000000000000000005c60da1a000000000000000000000000000000000000000000000000000000005c60da1b00000000000000000000000000000000000000000000000000000000f851a440000000000000000000000000000000000000000000000000000000003659cfe6000000000000000000000000000000000000000000000000000000004f1ef2860000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffdf6e74726163740000000000000000000000000000000000000000000000000000416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f00000000000000000000000000000000000000840000000000000000000000006f74206120636f6e747261637400000000000000000000000000000000000000455243313936373a206e657720696d706c656d656e746174696f6e206973206e4e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006574000000000000000000000000000000000000000000000000000000000000696e2063616e6e6f742066616c6c6261636b20746f2070726f787920746172675472616e73706172656e745570677261646561626c6550726f78793a2061646d00000000000000000000000000000000000000a4000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0e90d747b4c0a3377092a841a7eacdac9341f83512dcf5633b6c789f7e4af85d6" + ] +} diff --git a/deployments/zksyncsepolia/solcInputs/9555bbe1dbe04211a0576a409872928f.json b/deployments/zksyncsepolia/solcInputs/9555bbe1dbe04211a0576a409872928f.json new file mode 100644 index 000000000..c4aca8284 --- /dev/null +++ b/deployments/zksyncsepolia/solcInputs/9555bbe1dbe04211a0576a409872928f.json @@ -0,0 +1,91 @@ +{ + "language": "Solidity", + "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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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 private _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" + }, + "@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" + }, + "contracts/hardhat-dependency-compiler/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >0.0.0;\nimport '@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol';\n" + }, + "contracts/hardhat-dependency-compiler/hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >0.0.0;\nimport 'hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol';\n" + }, + "contracts/hardhat-dependency-compiler/hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity >0.0.0;\nimport 'hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol';\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.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 Ownable is Context {\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 constructor (address initialOwner) {\n _transferOwnership(initialOwner);\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 called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing 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" + }, + "hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view virtual returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(Address.isContract(IBeacon(newBeacon).implementation()), \"ERC1967: beacon implementation is not a contract\");\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n\n constructor (address initialOwner) Ownable(initialOwner) {}\n\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n TransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n */\n function changeAdmin(address newAdmin) external virtual ifAdmin {\n _changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 *\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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, \"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(\n address target,\n bytes memory data,\n uint256 value\n ) 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 require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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 Context {\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" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../openzeppelin/proxy/ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract OptimizedTransparentUpgradeableProxy is ERC1967Proxy {\n address internal immutable _ADMIN;\n\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n _ADMIN = admin_;\n\n // still store it to work with EIP-1967\n bytes32 slot = _ADMIN_SLOT;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n sstore(slot, admin_)\n }\n emit AdminChanged(address(0), admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n super._beforeFallback();\n }\n\n function _getAdmin() internal view virtual override returns (address) {\n return _ADMIN;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "mode": "3" + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": ["storageLayout", "abi", "evm.methodIdentifiers", "metadata", "devdoc", "userdoc"], + "": ["ast"] + } + }, + "detectMissingLibraries": false, + "forceEVMLA": false, + "enableEraVMExtensions": false, + "libraries": {} + } +} diff --git a/deployments/zksyncsepolia/solcInputs/a07e32c825b2843ec874f32e153cc512.json b/deployments/zksyncsepolia/solcInputs/a07e32c825b2843ec874f32e153cc512.json new file mode 100644 index 000000000..d4516b300 --- /dev/null +++ b/deployments/zksyncsepolia/solcInputs/a07e32c825b2843ec874f32e153cc512.json @@ -0,0 +1,280 @@ +{ + "language": "Solidity", + "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" + }, + "@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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n require(value <= type(uint248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n require(value <= type(uint240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n require(value <= type(uint232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.2._\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n require(value <= type(uint216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n require(value <= type(uint208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n require(value <= type(uint200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n require(value <= type(uint192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n require(value <= type(uint184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n require(value <= type(uint176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n require(value <= type(uint168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n require(value <= type(uint160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n require(value <= type(uint152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n require(value <= type(uint144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n require(value <= type(uint136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v2.5._\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n require(value <= type(uint120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n require(value <= type(uint112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n require(value <= type(uint104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.2._\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n require(value <= type(uint88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n require(value <= type(uint80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n require(value <= type(uint72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v2.5._\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n require(value <= type(uint56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n require(value <= type(uint48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n require(value <= type(uint40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v2.5._\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n require(value <= type(uint24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v2.5._\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v2.5._\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n *\n * _Available since v3.0._\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 248 bits\");\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 240 bits\");\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 232 bits\");\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.7._\n */\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 224 bits\");\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 216 bits\");\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 208 bits\");\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 200 bits\");\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 192 bits\");\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 184 bits\");\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 176 bits\");\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 168 bits\");\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 160 bits\");\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 152 bits\");\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 144 bits\");\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 136 bits\");\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 128 bits\");\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 120 bits\");\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 112 bits\");\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 104 bits\");\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.7._\n */\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 96 bits\");\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 88 bits\");\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 80 bits\");\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 72 bits\");\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 64 bits\");\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 56 bits\");\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 48 bits\");\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 40 bits\");\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 32 bits\");\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 24 bits\");\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 16 bits\");\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 8 bits\");\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n *\n * _Available since v3.0._\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "@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" + }, + "@openzeppelin/contracts/access/Ownable.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/Context.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 Ownable is Context {\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 constructor() {\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" + }, + "@openzeppelin/contracts/access/Ownable2Step.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 \"./Ownable.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 Ownable2Step is Ownable {\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" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.8.3._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the proxy with `beacon`.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity\n * constructor.\n *\n * Requirements:\n *\n * - `beacon` must be a contract with the interface {IBeacon}.\n */\n constructor(address beacon, bytes memory data) payable {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n\n /**\n * @dev Returns the current beacon address.\n */\n function _beacon() internal view virtual returns (address) {\n return _getBeacon();\n }\n\n /**\n * @dev Returns the current implementation address of the associated beacon.\n */\n function _implementation() internal view virtual override returns (address) {\n return IBeacon(_getBeacon()).implementation();\n }\n\n /**\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n *\n * Requirements:\n *\n * - `beacon` must be a contract.\n * - The implementation returned by `beacon` must be a contract.\n */\n function _setBeacon(address beacon, bytes memory data) internal virtual {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n _implementation = newImplementation;\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/IERC1967.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n function admin() external view returns (address);\n\n function implementation() external view returns (address);\n\n function changeAdmin(address) external;\n\n function upgradeTo(address) external;\n\n function upgradeToAndCall(address, bytes memory) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n *\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\n * implementation provides a function with the same selector.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\n */\n function _fallback() internal virtual override {\n if (msg.sender == _getAdmin()) {\n bytes memory ret;\n bytes4 selector = msg.sig;\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\n ret = _dispatchUpgradeTo();\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n ret = _dispatchUpgradeToAndCall();\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\n ret = _dispatchChangeAdmin();\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\n ret = _dispatchAdmin();\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\n ret = _dispatchImplementation();\n } else {\n revert(\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n }\n assembly {\n return(add(ret, 0x20), mload(ret))\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function _dispatchAdmin() private returns (bytes memory) {\n _requireZeroValue();\n\n address admin = _getAdmin();\n return abi.encode(admin);\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _dispatchImplementation() private returns (bytes memory) {\n _requireZeroValue();\n\n address implementation = _implementation();\n return abi.encode(implementation);\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _dispatchChangeAdmin() private returns (bytes memory) {\n _requireZeroValue();\n\n address newAdmin = abi.decode(msg.data[4:], (address));\n _changeAdmin(newAdmin);\n\n return \"\";\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n */\n function _dispatchUpgradeTo() private returns (bytes memory) {\n _requireZeroValue();\n\n address newImplementation = abi.decode(msg.data[4:], (address));\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n\n return \"\";\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n */\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n _upgradeToAndCall(newImplementation, data, true);\n\n return \"\";\n }\n\n /**\n * @dev Returns the current admin.\n *\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\n * emulate some proxy functions being non-payable while still allowing value to pass through.\n */\n function _requireZeroValue() private {\n require(msg.value == 0);\n }\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\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 ReentrancyGuard {\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 constructor() {\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" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.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 IERC20Permit {\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" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.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 IERC20 {\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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.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 \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.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 SafeERC20 {\n using Address 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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 IERC20Permit 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(IERC20 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(IERC20 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))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.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 Address {\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" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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 Context {\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" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" + }, + "@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 private _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" + }, + "@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" + }, + "@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" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n\n/// @dev The approximate number of seconds per year\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\n" + }, + "@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/**\n * @title MaxLoopsLimitHelper\n * @author Venus\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\n */\nabstract contract MaxLoopsLimitHelper {\n // Limit for the loops to avoid the DOS\n uint256 public maxLoopsLimit;\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 max loops limit is set\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\n\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param limit Limit for the max loops can execute at a time\n */\n function _setMaxLoopsLimit(uint256 limit) internal {\n require(limit > maxLoopsLimit, \"Comptroller: Invalid maxLoopsLimit\");\n\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\n maxLoopsLimit = limit;\n\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\n }\n\n /**\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\n * @param len Length of the loops iterate\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\n */\n function _ensureMaxLoops(uint256 len) internal view {\n if (len > maxLoopsLimit) {\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\n }\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SECONDS_PER_YEAR } from \"./constants.sol\";\n\nabstract contract TimeManagerV8 {\n /// @notice Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable blocksOrSecondsPerYear;\n\n /// @notice Acknowledges if a contract is time based or not\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n bool public immutable isTimeBased;\n\n /// @notice Stores the current block timestamp or block number depending on isTimeBased\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n function() view returns (uint256) private immutable _getCurrentSlot;\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[48] private __gap;\n\n /// @notice Thrown when blocks per year is invalid\n error InvalidBlocksPerYear();\n\n /// @notice Thrown when time based but blocks per year is provided\n error InvalidTimeBasedConfiguration();\n\n /**\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n * @custom:error InvalidBlocksPerYear is thrown if blocksPerYear entered is zero and timeBased is false\n * @custom:error InvalidTimeBasedConfiguration is thrown if blocksPerYear entered is non zero and timeBased is true\n * @custom:oz-upgrades-unsafe-allow constructor\n */\n constructor(bool timeBased_, uint256 blocksPerYear_) {\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert InvalidBlocksPerYear();\n }\n\n if (timeBased_ && blocksPerYear_ != 0) {\n revert InvalidTimeBasedConfiguration();\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view virtual returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "@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" + }, + "contracts/Admin/VBNBAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \"./VBNBAdminStorage.sol\";\n\n/**\n * @title VBNBAdmin\n * @author Venus\n * @notice This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\n */\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\n using SafeERC20Upgradeable for IWBNB;\n\n /// @notice address of vBNB\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n VTokenInterface public immutable vBNB;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IWBNB public immutable WBNB;\n\n /// @notice Emitted when PSR is updated\n event ProtocolShareReserveUpdated(\n IProtocolShareReserve indexed oldProtocolShareReserve,\n IProtocolShareReserve indexed newProtocolShareReserve\n );\n\n /// @notice Emitted reserves are reduced\n event ReservesReduced(uint256 reduceAmount);\n\n /// @param _vBNB Address of the vBNB contract\n /// @param _WBNB Address of the WBNB token\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\n require(address(_WBNB) != address(0), \"WBNB address invalid\");\n require(address(_vBNB) != address(0), \"vBNB address invalid\");\n\n vBNB = _vBNB;\n WBNB = _WBNB;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /// @notice Used to initialize non-immutable variables\n function initialize(\n IProtocolShareReserve _protocolShareReserve,\n address accessControlManager\n ) external initializer {\n require(address(_protocolShareReserve) != address(0), \"PSR address invalid\");\n protocolShareReserve = _protocolShareReserve;\n\n __ReentrancyGuard_init();\n __AccessControlled_init(accessControlManager);\n }\n\n /**\n * @notice PSR setter.\n * @param protocolShareReserve_ Address of the PSR contract\n * @custom:access Only owner (Governance)\n * @custom:event Emits ProtocolShareReserveUpdated event.\n */\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\n require(address(protocolShareReserve_) != address(0), \"PSR address invalid\");\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\n * @param reduceAmount amount of reserves to reduce\n * @custom:event Emits ReservesReduced event.\n */\n function reduceReserves(uint reduceAmount) external nonReentrant {\n require(vBNB._reduceReserves(reduceAmount) == 0, \"reduceReserves failed\");\n _wrapBNB();\n\n uint256 balance = WBNB.balanceOf(address(this));\n WBNB.safeTransfer(address(protocolShareReserve), balance);\n protocolShareReserve.updateAssetsState(\n vBNB.comptroller(),\n address(WBNB),\n IProtocolShareReserve.IncomeType.SPREAD\n );\n\n emit ReservesReduced(reduceAmount);\n }\n\n /**\n * @notice Wraps BNB into WBNB\n */\n function _wrapBNB() internal {\n uint256 bnbBalance = address(this).balance;\n WBNB.deposit{ value: bnbBalance }();\n }\n\n /**\n * @notice Invoked when BNB is sent to this contract\n * @custom:access Only vBNB is considered a valid sender\n */\n receive() external payable {\n require(msg.sender == address(vBNB), \"only vBNB can send BNB to this contract\");\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\n * @custom:access Only owner (Governance)\n */\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\n require(ok, \"call failed\");\n return res;\n }\n}\n" + }, + "contracts/Admin/VBNBAdminStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\ninterface VTokenInterface {\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function _acceptAdmin() external returns (uint);\n\n function comptroller() external returns (address);\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ncontract VBNBAdminStorage {\n /// @notice address of protocol share reserve contract\n IProtocolShareReserve public protocolShareReserve;\n\n /// @dev gap to prevent collision in inheritence\n uint256[49] private __gap;\n}\n" + }, + "contracts/DelegateBorrowers/MoveDebtDelegate.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { IVBep20, IComptroller } from \"../InterfacesV8.sol\";\n\ncontract MoveDebtDelegate is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n /// @dev VToken return value signalling about successful execution\n uint256 internal constant NO_ERROR = 0;\n\n /// @notice A wildcard indicating that repayment is allowed for _any_ user in the market\n address public constant ANY_USER = address(1);\n\n /// @notice User to borrow on behalf of\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable newBorrower;\n\n /// @notice Whether to allow borrowing from the corresponding vToken\n mapping(address => bool) public borrowAllowed;\n\n /// @notice Whether to allow repaying to the corresponding vToken on behalf of\n /// a certain user. Use ANY_USER to check if repayment is allowed for any user.\n mapping(address => mapping(address => bool)) public repaymentAllowed;\n\n /// @notice Emitted when vToken is allowed or denied to be borrowed from\n event BorrowAllowedSet(address indexed vTokenToBorrow, bool allowed);\n\n /// @notice Emitted when vToken is allowed or denied to be borrowed from\n event RepaymentAllowedSet(address indexed vTokenToRepay, address indexed originalBorrower, bool allowed);\n\n /// @notice Emitted if debt is swapped successfully\n event DebtMoved(\n address indexed originalBorrower,\n address indexed vTokenRepaid,\n uint256 repaidAmount,\n address newBorrower,\n address indexed vTokenBorrowed,\n uint256 borrowedAmount\n );\n\n /// @notice Emitted when the owner transfers tokens, accidentially sent to this contract,\n /// to their account\n event SweptTokens(address indexed token, uint256 amount);\n\n /// @notice Thrown if VTokens' comptrollers are not equal\n error ComptrollerMismatch();\n\n /// @notice Thrown if repayment fails with an error code\n error RepaymentFailed(uint256 errorCode);\n\n /// @notice Thrown if borrow fails with an error code\n error BorrowFailed(uint256 errorCode);\n\n /// @notice Thrown if borrowing from the corresponding vToken is not allowed\n error BorrowNotAllowed(address vToken);\n\n /// @notice Thrown if repaying the debts of the borrower to the corresponding vToken is not allowed\n error RepaymentNotAllowed(address vToken, address borrower);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param newBorrower_ User to borrow on behalf of\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address newBorrower_) {\n newBorrower = newBorrower_;\n _disableInitializers();\n }\n\n function initialize() external initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n }\n\n /**\n * @notice Repays originalBorrower's borrow in vTokenToRepay.underlying() and borrows\n * vTokenToBorrow.underlying() on behalf of newBorrower.\n *\n * @param originalBorrower The address of the borrower, whose debt to repay\n * @param vTokenToRepay VToken to repay to on behalf of originalBorrower\n * @param repayAmount The amount to repay in terms of vTokenToRepay.underlying()\n * @param vTokenToBorrow VToken to borrow from\n */\n function moveDebt(\n IVBep20 vTokenToRepay,\n address originalBorrower,\n uint256 repayAmount,\n IVBep20 vTokenToBorrow\n ) external nonReentrant {\n if (!borrowAllowed[address(vTokenToBorrow)]) {\n revert BorrowNotAllowed(address(vTokenToBorrow));\n }\n\n mapping(address => bool) storage repaymentAllowedFor = repaymentAllowed[address(vTokenToRepay)];\n if (!repaymentAllowedFor[ANY_USER] && !repaymentAllowedFor[originalBorrower]) {\n revert RepaymentNotAllowed(address(vTokenToRepay), originalBorrower);\n }\n\n uint256 actualRepaymentAmount = _repay(vTokenToRepay, originalBorrower, repayAmount);\n uint256 amountToBorrow = _convert(vTokenToRepay, vTokenToBorrow, actualRepaymentAmount);\n _borrow(vTokenToBorrow, amountToBorrow);\n emit DebtMoved(\n originalBorrower,\n address(vTokenToRepay),\n actualRepaymentAmount,\n newBorrower,\n address(vTokenToBorrow),\n amountToBorrow\n );\n }\n\n /**\n * @notice Allows or denies borrowing from the corresponding vToken\n * @param vTokenToBorrow VToken to borrow from\n * @param allow Whether to allow borrowing from the corresponding vToken\n */\n function setBorrowAllowed(address vTokenToBorrow, bool allow) external onlyOwner {\n ensureNonzeroAddress(vTokenToBorrow);\n if (borrowAllowed[vTokenToBorrow] != allow) {\n borrowAllowed[vTokenToBorrow] = allow;\n emit BorrowAllowedSet(vTokenToBorrow, allow);\n }\n }\n\n /**\n * @notice Allows or denies repaying the debts of originalBorrower to the corresponding vToken\n * @param vTokenToRepay VToken to repay to\n * @param originalBorrower The address of the borrower, whose debt to repay (or ANY_USER to allow\n * repayments for all users in the market, e.g. if the market is going to be deprecated soon)\n * @param allow Whether to allow repaying to the corresponding vToken on behalf of originalBorrower\n */\n function setRepaymentAllowed(address vTokenToRepay, address originalBorrower, bool allow) external onlyOwner {\n ensureNonzeroAddress(vTokenToRepay);\n ensureNonzeroAddress(originalBorrower);\n if (repaymentAllowed[vTokenToRepay][originalBorrower] != allow) {\n repaymentAllowed[vTokenToRepay][originalBorrower] = allow;\n emit RepaymentAllowedSet(vTokenToRepay, originalBorrower, allow);\n }\n }\n\n /**\n * @notice Transfers tokens, accidentially sent to this contract, to the owner\n * @param token ERC-20 token to sweep\n */\n function sweepTokens(IERC20Upgradeable token) external onlyOwner {\n uint256 amount = token.balanceOf(address(this));\n token.safeTransfer(owner(), amount);\n emit SweptTokens(address(token), amount);\n }\n\n /**\n * @dev Transfers the funds from the sender and repays a borrow in vToken on behalf of the borrower\n * @param vTokenToRepay VToken to repay to\n * @param borrower The address of the borrower, whose debt to repay\n * @param repayAmount The amount to repay in terms of underlying\n */\n function _repay(\n IVBep20 vTokenToRepay,\n address borrower,\n uint256 repayAmount\n ) internal returns (uint256 actualRepaymentAmount) {\n IERC20Upgradeable underlying = IERC20Upgradeable(vTokenToRepay.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n underlying.safeTransferFrom(msg.sender, address(this), repayAmount);\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 repayAmountMinusFee = balanceAfter - balanceBefore;\n\n uint256 borrowBalanceBefore = vTokenToRepay.borrowBalanceCurrent(borrower);\n approveOrRevert(underlying, address(vTokenToRepay), repayAmountMinusFee);\n uint256 err = vTokenToRepay.repayBorrowBehalf(borrower, repayAmountMinusFee);\n if (err != NO_ERROR) {\n revert RepaymentFailed(err);\n }\n approveOrRevert(underlying, address(vTokenToRepay), 0);\n uint256 borrowBalanceAfter = vTokenToRepay.borrowBalanceCurrent(borrower);\n return borrowBalanceBefore - borrowBalanceAfter;\n }\n\n /**\n * @dev Borrows in vToken on behalf of the borrower and transfers the funds to the sender\n * @param vTokenToBorrow VToken to borrow from\n * @param borrowAmount The amount to borrow in terms of underlying\n */\n function _borrow(IVBep20 vTokenToBorrow, uint256 borrowAmount) internal {\n IERC20Upgradeable underlying = IERC20Upgradeable(vTokenToBorrow.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n uint256 err = vTokenToBorrow.borrowBehalf(newBorrower, borrowAmount);\n if (err != NO_ERROR) {\n revert BorrowFailed(err);\n }\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 actualBorrowedAmount = balanceAfter - balanceBefore;\n underlying.safeTransfer(msg.sender, actualBorrowedAmount);\n }\n\n /**\n * @dev Converts the value expressed in convertFrom.underlying() to a value\n * in convertTo.underlying(), using the oracle price\n * @param convertFrom VToken to convert from\n * @param convertTo VToken to convert to\n * @param amount The amount in convertFrom.underlying()\n */\n function _convert(IVBep20 convertFrom, IVBep20 convertTo, uint256 amount) internal view returns (uint256) {\n IComptroller comptroller = convertFrom.comptroller();\n if (comptroller != convertTo.comptroller()) {\n revert ComptrollerMismatch();\n }\n ResilientOracleInterface oracle = comptroller.oracle();\n\n // Decimals are accounted for in the oracle contract\n uint256 scaledUsdValue = oracle.getUnderlyingPrice(address(convertFrom)) * amount; // the USD value here has 36 decimals\n return scaledUsdValue / oracle.getUnderlyingPrice(address(convertTo));\n }\n}\n" + }, + "contracts/DelegateBorrowers/SwapDebtDelegate.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { IVBep20, IComptroller } from \"../InterfacesV8.sol\";\n\ncontract SwapDebtDelegate is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n /// @dev VToken return value signalling about successful execution\n uint256 internal constant NO_ERROR = 0;\n\n /// @notice Emitted if debt is swapped successfully\n event DebtSwapped(\n address indexed borrower,\n address indexed vTokenRepaid,\n uint256 repaidAmount,\n address indexed vTokenBorrowed,\n uint256 borrowedAmount\n );\n\n /// @notice Emitted when the owner transfers tokens, accidentially sent to this contract,\n /// to their account\n event SweptTokens(address indexed token, uint256 amount);\n\n /// @notice Thrown if VTokens' comptrollers are not equal\n error ComptrollerMismatch();\n\n /// @notice Thrown if repayment fails with an error code\n error RepaymentFailed(uint256 errorCode);\n\n /// @notice Thrown if borrow fails with an error code\n error BorrowFailed(uint256 errorCode);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n function initialize() external initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n }\n\n /**\n * @notice Repays a borrow in repayTo.underlying() and borrows borrowFrom.underlying()\n * @param borrower The address of the borrower, whose debt to swap\n * @param repayTo VToken to repay the debt to\n * @param borrowFrom VToken to borrow from\n * @param repayAmount The amount to repay in terms of repayTo.underlying()\n */\n function swapDebt(\n address borrower,\n IVBep20 repayTo,\n IVBep20 borrowFrom,\n uint256 repayAmount\n ) external onlyOwner nonReentrant {\n uint256 actualRepaymentAmount = _repay(repayTo, borrower, repayAmount);\n uint256 amountToBorrow = _convert(repayTo, borrowFrom, actualRepaymentAmount);\n _borrow(borrowFrom, borrower, amountToBorrow);\n emit DebtSwapped(borrower, address(repayTo), actualRepaymentAmount, address(borrowFrom), amountToBorrow);\n }\n\n /**\n * @notice Transfers tokens, accidentially sent to this contract, to the owner\n * @param token ERC-20 token to sweep\n */\n function sweepTokens(IERC20Upgradeable token) external onlyOwner {\n uint256 amount = token.balanceOf(address(this));\n token.safeTransfer(owner(), amount);\n emit SweptTokens(address(token), amount);\n }\n\n /**\n * @dev Transfers the funds from the sender and repays a borrow in vToken on behalf of the borrower\n * @param vToken VToken to repay the debt to\n * @param borrower The address of the borrower, whose debt to repay\n * @param repayAmount The amount to repay in terms of underlying\n */\n function _repay(\n IVBep20 vToken,\n address borrower,\n uint256 repayAmount\n ) internal returns (uint256 actualRepaymentAmount) {\n IERC20Upgradeable underlying = IERC20Upgradeable(vToken.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n underlying.safeTransferFrom(msg.sender, address(this), repayAmount);\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 repayAmountMinusFee = balanceAfter - balanceBefore;\n\n underlying.safeApprove(address(vToken), 0);\n underlying.safeApprove(address(vToken), repayAmountMinusFee);\n uint256 borrowBalanceBefore = vToken.borrowBalanceCurrent(borrower);\n uint256 err = vToken.repayBorrowBehalf(borrower, repayAmountMinusFee);\n if (err != NO_ERROR) {\n revert RepaymentFailed(err);\n }\n uint256 borrowBalanceAfter = vToken.borrowBalanceCurrent(borrower);\n return borrowBalanceBefore - borrowBalanceAfter;\n }\n\n /**\n * @dev Borrows in vToken on behalf of the borrower and transfers the funds to the sender\n * @param vToken VToken to borrow from\n * @param borrower The address of the borrower, who will own the borrow\n * @param borrowAmount The amount to borrow in terms of underlying\n */\n function _borrow(IVBep20 vToken, address borrower, uint256 borrowAmount) internal {\n IERC20Upgradeable underlying = IERC20Upgradeable(vToken.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n uint256 err = vToken.borrowBehalf(borrower, borrowAmount);\n if (err != NO_ERROR) {\n revert BorrowFailed(err);\n }\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 actualBorrowedAmount = balanceAfter - balanceBefore;\n underlying.safeTransfer(msg.sender, actualBorrowedAmount);\n }\n\n /**\n * @dev Converts the value expressed in convertFrom.underlying() to a value\n * in convertTo.underlying(), using the oracle price\n * @param convertFrom VToken to convert from\n * @param convertTo VToken to convert to\n * @param amount The amount in convertFrom.underlying()\n */\n function _convert(IVBep20 convertFrom, IVBep20 convertTo, uint256 amount) internal view returns (uint256) {\n IComptroller comptroller = convertFrom.comptroller();\n if (comptroller != convertTo.comptroller()) {\n revert ComptrollerMismatch();\n }\n ResilientOracleInterface oracle = comptroller.oracle();\n\n // Decimals are accounted for in the oracle contract\n uint256 scaledUsdValue = oracle.getUnderlyingPrice(address(convertFrom)) * amount; // the USD value here has 36 decimals\n return scaledUsdValue / oracle.getUnderlyingPrice(address(convertTo));\n }\n}\n" + }, + "contracts/Governance/TokenRedeemer.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport { Ownable2Step } from \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { IVAIController, IVToken, IVBep20, IVBNB } from \"../InterfacesV8.sol\";\nimport { Currency, CurrencyLibrary } from \"../lib/Currency.sol\";\n\ncontract TokenRedeemer is ReentrancyGuard, Ownable2Step {\n using CurrencyLibrary for Currency;\n\n struct Repayment {\n address borrower;\n uint256 amount;\n }\n\n IVBNB public immutable VBNB;\n\n error AccrueInterestFailed(uint256 errCode);\n error RedeemFailed(uint256 errCode);\n error RepaymentFailed(uint256 errCode);\n error NativeTokenTransferFailed();\n\n constructor(address owner_, IVBNB vBNB) {\n ensureNonzeroAddress(owner_);\n VBNB = vBNB;\n _transferOwnership(owner_);\n }\n\n receive() external payable {}\n\n function redeemAndTransfer(IVToken vToken, address destination) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n uint256 err = vToken.redeem(vToken.balanceOf(address(this)));\n if (err != 0) {\n revert RedeemFailed(err);\n }\n underlying.transferAll(destination);\n }\n\n function redeemUnderlyingAndTransfer(\n IVToken vToken,\n address destination,\n uint256 amount,\n address receiver\n ) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n underlying.transferAll(receiver); // Just in case there were some underlying tokens on the contract\n uint256 err = vToken.redeemUnderlying(amount);\n if (err != 0) {\n revert RedeemFailed(err);\n }\n underlying.transferAll(destination);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function redeemUnderlyingAndRepayBorrowBehalf(\n IVToken vToken,\n address borrower,\n uint256 amount,\n address receiver\n ) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n\n uint256 err = vToken.redeemUnderlying(amount);\n if (err != 0) {\n revert RedeemFailed(err);\n }\n\n underlying.approve(address(vToken), amount);\n\n _repay(vToken, borrower, amount);\n\n underlying.approve(address(vToken), 0);\n\n underlying.transferAll(receiver);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function redeemAndBatchRepay(\n IVToken vToken,\n Repayment[] calldata requestedRepayments,\n address receiver\n ) external nonReentrant onlyOwner {\n _accrueInterest(vToken);\n\n (uint256 totalBorrowedAmount, Repayment[] memory repayments) = _getAmountsToRepay(vToken, requestedRepayments);\n _redeemUpTo(vToken, totalBorrowedAmount);\n\n Currency underlying = _underlying(vToken);\n uint256 balance = underlying.balanceOfSelf();\n underlying.approve(address(vToken), totalBorrowedAmount);\n uint256 repaymentsCount = repayments.length;\n // The code below assumes no fees on transfer\n if (balance >= totalBorrowedAmount) {\n // If we're doing a full repayment, we can optimize it by skipping the balance checks\n for (uint256 i = 0; i < repaymentsCount; ++i) {\n Repayment memory repayment = repayments[i];\n _repay(vToken, repayment.borrower, repayment.amount);\n }\n } else {\n // Otherwise, we have to check and update the balance on every iteration\n for (uint256 i = 0; i < repaymentsCount && balance != 0; ++i) {\n Repayment memory repayment = repayments[i];\n _repay(vToken, repayment.borrower, _min(repayment.amount, balance));\n balance = underlying.balanceOfSelf();\n }\n }\n underlying.approve(address(vToken), 0);\n\n underlying.transferAll(receiver);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function batchRepayVAI(\n IVAIController vaiController,\n Repayment[] calldata requestedRepayments,\n address receiver\n ) external nonReentrant onlyOwner {\n vaiController.accrueVAIInterest();\n Currency vai = Currency.wrap(vaiController.getVAIAddress());\n uint256 balance = vai.balanceOfSelf();\n vai.approve(address(vaiController), type(uint256).max);\n uint256 repaymentsCount = requestedRepayments.length;\n for (uint256 i = 0; i < repaymentsCount && balance != 0; ++i) {\n Repayment calldata requestedRepayment = requestedRepayments[i];\n uint256 repaymentCap = requestedRepayment.amount;\n uint256 debt = vaiController.getVAIRepayAmount(requestedRepayment.borrower);\n uint256 amount = _min(repaymentCap, debt);\n _repayVAI(vaiController, requestedRepayment.borrower, _min(amount, balance));\n balance = vai.balanceOfSelf();\n }\n vai.approve(address(vaiController), 0);\n vai.transferAll(receiver);\n }\n\n function sweepTokens(address token, address destination) external onlyOwner {\n Currency.wrap(token).transferAll(destination);\n }\n\n function _accrueInterest(IVToken vToken) internal {\n uint256 err = vToken.accrueInterest();\n if (err != 0) {\n revert AccrueInterestFailed(err);\n }\n }\n\n function _redeemUpTo(IVToken vToken, uint256 amount) internal {\n uint256 unredeemedUnderlying = vToken.balanceOfUnderlying(address(this));\n if (unredeemedUnderlying > 0) {\n uint256 err = vToken.redeemUnderlying(_min(amount, unredeemedUnderlying));\n if (err != 0) {\n revert RedeemFailed(err);\n }\n }\n }\n\n function _repay(IVToken vToken, address borrower, uint256 amount) internal {\n if (amount == 0) {\n return;\n }\n if (_isVBNB(vToken)) {\n IVBNB(address(vToken)).repayBorrowBehalf{ value: amount }(borrower);\n } else {\n uint256 err = IVBep20(address(vToken)).repayBorrowBehalf(borrower, amount);\n if (err != 0) {\n revert RepaymentFailed(err);\n }\n }\n }\n\n function _repayVAI(IVAIController vaiController, address borrower, uint256 amount) internal {\n if (amount == 0) {\n return;\n }\n (uint256 err, ) = vaiController.repayVAIBehalf(borrower, amount);\n if (err != 0) {\n revert RepaymentFailed(err);\n }\n }\n\n function _getAmountsToRepay(\n IVToken vToken,\n Repayment[] calldata requestedRepayments\n ) internal view returns (uint256, Repayment[] memory) {\n uint256 repaymentsCount = requestedRepayments.length;\n Repayment[] memory actualRepayments = new Repayment[](repaymentsCount);\n uint256 totalAmountToRepay = 0;\n for (uint256 i = 0; i < repaymentsCount; ++i) {\n Repayment calldata requestedRepayment = requestedRepayments[i];\n uint256 repaymentCap = requestedRepayment.amount;\n uint256 debt = vToken.borrowBalanceStored(requestedRepayment.borrower);\n uint256 amountToRepay = _min(repaymentCap, debt);\n totalAmountToRepay += amountToRepay;\n actualRepayments[i] = Repayment({ borrower: requestedRepayment.borrower, amount: amountToRepay });\n }\n return (totalAmountToRepay, actualRepayments);\n }\n\n function _underlying(IVToken vToken) internal view returns (Currency) {\n if (_isVBNB(vToken)) {\n return CurrencyLibrary.NATIVE;\n }\n return Currency.wrap(IVBep20(address(vToken)).underlying());\n }\n\n function _isVBNB(IVToken vToken) internal view returns (bool) {\n return address(vToken) == address(VBNB);\n }\n\n function _min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n}\n" + }, + "contracts/Governance/VTreasuryV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { Ownable2Step } from \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\n\n/**\n * @title VTreasuryV8\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasuryV8 is Ownable2Step, ReentrancyGuard {\n using SafeERC20 for IERC20;\n\n // WithdrawTreasuryToken Event\n event WithdrawTreasuryToken(address indexed tokenAddress, uint256 withdrawAmount, address indexed withdrawAddress);\n\n // WithdrawTreasuryNative Event\n event WithdrawTreasuryNative(uint256 withdrawAmount, address indexed withdrawAddress);\n\n /// @notice Thrown if the supplied address is a zero address where it is not allowed\n error ZeroAddressNotAllowed();\n\n /**\n * @notice To receive Native when msg.data is not empty\n */\n fallback() external payable {}\n\n /**\n * @notice To receive Native when msg.data is empty\n */\n receive() external payable {}\n\n /**\n * @notice Withdraw Treasury Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n * @custom:error ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.\n */\n function withdrawTreasuryToken(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner nonReentrant {\n ensureNonzeroAddress(tokenAddress);\n ensureNonzeroAddress(withdrawAddress);\n require(withdrawAmount > 0, \"withdrawAmount must not be zero\");\n\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IERC20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer Token to withdrawAddress\n IERC20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryToken(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury Native, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n * @custom:error ZeroAddressNotAllowed thrown when withdrawAddress is zero.\n */\n function withdrawTreasuryNative(\n uint256 withdrawAmount,\n address payable withdrawAddress\n ) external payable onlyOwner nonReentrant {\n ensureNonzeroAddress(withdrawAddress);\n require(withdrawAmount > 0, \"withdrawAmount must not be zero\");\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Native Balance\n uint256 nativeBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > nativeBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = nativeBalance;\n }\n // Transfer the native token to withdrawAddress\n (bool sent, ) = withdrawAddress.call{ value: actualWithdrawAmount }(\"\");\n require(sent, \"Call failed\");\n emit WithdrawTreasuryNative(actualWithdrawAmount, withdrawAddress);\n }\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\n function ensureNonzeroAddress(address address_) internal pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n }\n}\n" + }, + "contracts/InterfacesV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\ninterface IVToken is IERC20Upgradeable {\n function accrueInterest() external returns (uint256);\n\n function redeem(uint256 redeemTokens) external returns (uint256);\n\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\n\n function borrowBalanceCurrent(address borrower) external returns (uint256);\n\n function balanceOfUnderlying(address owner) external returns (uint256);\n\n function comptroller() external view returns (IComptroller);\n\n function borrowBalanceStored(address account) external view returns (uint256);\n}\n\ninterface IVBep20 is IVToken {\n function borrowBehalf(address borrower, uint256 borrowAmount) external returns (uint256);\n\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256);\n\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external returns (uint256);\n\n function underlying() external view returns (address);\n}\n\ninterface IVBNB is IVToken {\n function repayBorrowBehalf(address borrower) external payable;\n\n function liquidateBorrow(address borrower, IVToken vTokenCollateral) external payable;\n}\n\ninterface IVAIController {\n function accrueVAIInterest() external;\n\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external returns (uint256, uint256);\n\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\n\n function getVAIAddress() external view returns (address);\n\n function getVAIRepayAmount(address borrower) external view returns (uint256);\n}\n\ninterface IComptroller {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external;\n\n function liquidationIncentiveMantissa() external view returns (uint256);\n\n function vaiController() external view returns (IVAIController);\n\n function liquidatorContract() external view returns (address);\n\n function oracle() external view returns (ResilientOracleInterface);\n\n function actionPaused(address market, Action action) external view returns (bool);\n\n function markets(address) external view returns (bool, uint256, bool);\n\n function isForcedLiquidationEnabled(address) external view returns (bool);\n}\n\ninterface ILiquidator {\n function restrictLiquidation(address borrower) external;\n\n function unrestrictLiquidation(address borrower) external;\n\n function addToAllowlist(address borrower, address liquidator) external;\n\n function removeFromAllowlist(address borrower, address liquidator) external;\n\n function liquidateBorrow(\n address vToken,\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external payable;\n\n function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external;\n\n function treasuryPercentMantissa() external view returns (uint256);\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n" + }, + "contracts/lib/approveOrRevert.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\n\n/// @notice Thrown if a contract is unable to approve a transfer\nerror ApproveFailed();\n\n/// @notice Approves a transfer, ensuring that it is successful. This function supports non-compliant\n/// tokens like the ones that don't return a boolean value on success. Thus, such approve call supports\n/// three different kinds of tokens:\n/// * Compliant tokens that revert on failure\n/// * Compliant tokens that return false on failure\n/// * Non-compliant tokens that don't return a value\n/// @param token The contract address of the token which will be transferred\n/// @param spender The spender contract address\n/// @param amount The value of the transfer\nfunction approveOrRevert(IERC20Upgradeable token, address spender, uint256 amount) {\n bytes memory callData = abi.encodeCall(token.approve, (spender, amount));\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory result) = address(token).call(callData);\n\n if (!success || (result.length != 0 && !abi.decode(result, (bool)))) {\n revert ApproveFailed();\n }\n}\n" + }, + "contracts/lib/Currency.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n// This library is heavily inspired by Uniswap v4 Currency lib\n// (https://github.com/Uniswap/v4-core/blob/b230769238879e1d4f58ffa57a4696b0c390d188/src/types/Currency.sol)\n// Contrary to the implementation above, this library does not\n// use assembly to save gas. It rather relies on OpenZeppelin's\n// SafeERC20 to simplify the review and audits. This might change\n// in future if it's more heavily used by Venus contracts.\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ntype Currency is address;\n\nlibrary CurrencyLibrary {\n using CurrencyLibrary for Currency;\n\n /// @notice Thrown when a native transfer fails\n error NativeTransferFailed();\n\n Currency public constant NATIVE = Currency.wrap(0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB);\n\n /**\n * @dev If currency is a token, invokes SafeERC20.forceApprove to allow spender\n * to spend the amount of tokens on behalf of the current contract. Otherwise,\n * does nothing.\n * @param currency Currency\n * @param spender The account approved to spend the tokens\n * @param amount The approved amount\n */\n function approve(Currency currency, address spender, uint256 amount) internal {\n if (!currency.isNative()) {\n // I'd rather use approveOrRevert instead of forceApprove\n // once we migrate to OZ v5: force-approve does approve(0)\n // before approving the amount, and it's not always\n // desirable. The users will need to pay gas unnecessarily,\n // and using just approve() is safe as long as we revert on\n // errors (approveOrRevert handles that) and reset the approvals\n // after transfers (which is a best practice recommended by\n // auditors anyway).\n SafeERC20.forceApprove(IERC20(Currency.unwrap(currency)), spender, amount);\n }\n }\n\n /**\n * @dev Transfers an amount of currency to the receiver. If currency is a token,\n * uses SafeERC20.safeTransfer, otherwise transfers the native currency using\n * the recommended approach (`receiver.call{value: amount}(\"\")`).\n * @param currency Currency\n * @param receiver The account that would receive the tokens\n * @param amount The amount to transfer\n */\n function transfer(Currency currency, address receiver, uint256 amount) internal {\n if (currency.isNative()) {\n (bool success, ) = receiver.call{ value: amount }(\"\");\n if (!success) {\n revert NativeTransferFailed();\n }\n } else {\n SafeERC20.safeTransfer(IERC20(Currency.unwrap(currency)), receiver, amount);\n }\n }\n\n function transferAll(Currency currency, address receiver) internal {\n uint256 balance = currency.balanceOfSelf();\n if (balance > 0) {\n currency.transfer(receiver, balance);\n }\n }\n\n function balanceOfSelf(Currency currency) internal view returns (uint256) {\n if (currency.isNative()) {\n return address(this).balance;\n }\n return IERC20(Currency.unwrap(currency)).balanceOf(address(this));\n }\n\n function isNative(Currency currency) internal pure returns (bool) {\n return Currency.unwrap(currency) == Currency.unwrap(NATIVE);\n }\n}\n" + }, + "contracts/Liquidator/BUSDLiquidator.sol": { + "content": "// SPDX-License-Identifier: MIT\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 { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { MANTISSA_ONE } from \"@venusprotocol/solidity-utilities/contracts/constants.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { ILiquidator, IComptroller, IVToken, IVBep20, IVBNB, IVAIController } from \"../InterfacesV8.sol\";\n\n/**\n * @title BUSDLiquidator\n * @author Venus\n * @notice A custom contract for force-liquidating BUSD debts\n */\ncontract BUSDLiquidator is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n using SafeERC20Upgradeable for IVToken;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVBep20 public immutable vBUSD;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IComptroller public immutable comptroller;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable treasury;\n\n /// @notice The liquidator's share, scaled by 1e18 (e.g. 1.02 * 1e18 for 102% of the debt covered)\n uint256 public liquidatorShareMantissa;\n\n /// @notice Thrown if trying to set liquidator's share lower than 100% of the debt covered\n error LiquidatorShareTooLow(uint256 liquidatorShareMantissa_);\n\n /// @notice Thrown if trying to set liquidator's share larger than this contract can receive from a liquidation\n error LiquidatorShareTooHigh(uint256 maxLiquidatorShareMantissa, uint256 liquidatorShareMantissa_);\n\n /// @notice Emitted when the liquidator's share is set\n event NewLiquidatorShare(uint256 oldLiquidatorShareMantissa, uint256 newLiquidatorShareMantissa);\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param comptroller_ The address of the Comptroller contract\n /// @param vBUSD_ The address of the VBNB\n /// @param treasury_ The address of Venus treasury\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address vBUSD_, address treasury_) {\n ensureNonzeroAddress(vBUSD_);\n ensureNonzeroAddress(comptroller_);\n ensureNonzeroAddress(treasury_);\n vBUSD = IVBep20(vBUSD_);\n comptroller = IComptroller(comptroller_);\n treasury = treasury_;\n _disableInitializers();\n }\n\n /// @notice Initializer for the implementation contract.\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n /// @custom:error LiquidatorShareTooHigh is thrown if trying to set liquidator percent larger than the liquidation profit\n function initialize(uint256 liquidatorShareMantissa_) external virtual initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n _validateLiquidatorShareMantissa(liquidatorShareMantissa_);\n liquidatorShareMantissa = liquidatorShareMantissa_;\n }\n\n /// @notice Liquidate the entire BUSD debt of a borrower, seizing vTokenCollateral\n /// @param borrower The borrower whose debt should be liquidated\n /// @param vTokenCollateral The collateral to seize from the borrower\n function liquidateEntireBorrow(address borrower, IVToken vTokenCollateral) external nonReentrant {\n uint256 repayAmount = vBUSD.borrowBalanceCurrent(borrower);\n _unpauseAndLiquidate(borrower, repayAmount, vTokenCollateral);\n }\n\n /// @notice Liquidate a BUSD borrow, repaying the repayAmount of BUSD\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function liquidateBorrow(address borrower, uint256 repayAmount, IVToken vTokenCollateral) external nonReentrant {\n _unpauseAndLiquidate(borrower, repayAmount, vTokenCollateral);\n }\n\n /// @notice Allows Governance to set the liquidator's share\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n /// @custom:access Only Governance\n function setLiquidatorShare(uint256 liquidatorShareMantissa_) external onlyOwner {\n _validateLiquidatorShareMantissa(liquidatorShareMantissa_);\n uint256 oldLiquidatorShareMantissa = liquidatorShareMantissa;\n liquidatorShareMantissa = liquidatorShareMantissa_;\n emit NewLiquidatorShare(oldLiquidatorShareMantissa, liquidatorShareMantissa_);\n }\n\n /// @notice Allows to recover token accidentally sent to this contract by sending the entire balance to Governance\n /// @param token The address of the token to recover\n /// @custom:access Only Governance\n function sweepToken(IERC20Upgradeable token) external onlyOwner {\n token.safeTransfer(msg.sender, token.balanceOf(address(this)));\n }\n\n /// @dev Unpauses the liquidation on the BUSD market, liquidates the borrower's debt,\n /// and pauses the liquidations back\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function _unpauseAndLiquidate(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n address[] memory vTokens = new address[](1);\n vTokens[0] = address(vBUSD);\n IComptroller.Action[] memory actions = new IComptroller.Action[](1);\n actions[0] = IComptroller.Action.LIQUIDATE;\n\n comptroller._setActionsPaused(vTokens, actions, false);\n _liquidateBorrow(borrower, repayAmount, vTokenCollateral);\n comptroller._setActionsPaused(vTokens, actions, true);\n }\n\n /// @dev Performs the actual liquidation, transferring BUSD from the sender to this contract,\n /// repaying the debt, and transferring the seized collateral to the sender and the treasury\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function _liquidateBorrow(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n ILiquidator liquidatorContract = ILiquidator(comptroller.liquidatorContract());\n IERC20Upgradeable busd = IERC20Upgradeable(vBUSD.underlying());\n\n uint256 actualRepayAmount = _transferIn(busd, msg.sender, repayAmount);\n approveOrRevert(busd, address(liquidatorContract), actualRepayAmount);\n uint256 balanceBefore = vTokenCollateral.balanceOf(address(this));\n liquidatorContract.liquidateBorrow(address(vBUSD), borrower, actualRepayAmount, vTokenCollateral);\n uint256 receivedAmount = vTokenCollateral.balanceOf(address(this)) - balanceBefore;\n approveOrRevert(busd, address(liquidatorContract), 0);\n\n (uint256 liquidatorAmount, uint256 treasuryAmount) = _computeShares(receivedAmount);\n vTokenCollateral.safeTransfer(msg.sender, liquidatorAmount);\n vTokenCollateral.safeTransfer(treasury, treasuryAmount);\n }\n\n /// @dev Transfers tokens to this contract and returns the actual transfer amount\n /// @param token The token to transfer\n /// @param from The account to transfer from\n /// @param amount The amount to transfer\n /// @return The actual amount transferred\n function _transferIn(IERC20Upgradeable token, address from, uint256 amount) internal returns (uint256) {\n uint256 prevBalance = token.balanceOf(address(this));\n token.safeTransferFrom(from, address(this), amount);\n return token.balanceOf(address(this)) - prevBalance;\n }\n\n /// @dev Computes the liquidator's and treasury's shares of the received amount\n /// @param receivedAmount The amount received from the liquidation\n /// @return liquidatorAmount The liquidator's share\n /// @return treasuryAmount The treasury's share\n function _computeShares(\n uint256 receivedAmount\n ) internal view returns (uint256 liquidatorAmount, uint256 treasuryAmount) {\n uint256 denominator = _getDenominator();\n liquidatorAmount = (receivedAmount * liquidatorShareMantissa) / denominator;\n treasuryAmount = receivedAmount - liquidatorAmount;\n }\n\n /// @dev Returns (liquidation incentive - treasury percent), the value used as the denominator\n /// when calculating the liquidator's share\n /// @return The denominator for the seized amount used when calculating the liquidator's share\n function _getDenominator() internal view returns (uint256) {\n uint256 totalPercentageToDistribute = comptroller.liquidationIncentiveMantissa();\n uint256 regularTreasuryPercent = ILiquidator(comptroller.liquidatorContract()).treasuryPercentMantissa();\n uint256 denominator = totalPercentageToDistribute - regularTreasuryPercent;\n return denominator;\n }\n\n /// @dev Checks if the liquidator's share is more than 100% of the debt covered and less\n /// than (liquidation incentive - treasury percent)\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n function _validateLiquidatorShareMantissa(uint256 liquidatorShareMantissa_) internal view {\n uint256 maxLiquidatorShareMantissa = _getDenominator();\n if (liquidatorShareMantissa_ < MANTISSA_ONE) {\n revert LiquidatorShareTooLow(liquidatorShareMantissa_);\n }\n\n if (liquidatorShareMantissa_ > maxLiquidatorShareMantissa) {\n revert LiquidatorShareTooHigh(maxLiquidatorShareMantissa, liquidatorShareMantissa_);\n }\n }\n}\n" + }, + "contracts/Liquidator/Liquidator.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"./LiquidatorStorage.sol\";\nimport { IComptroller, IVToken, IVBep20, IVBNB, IVAIController, IProtocolShareReserve, IWBNB } from \"../InterfacesV8.sol\";\n\ncontract Liquidator is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable, LiquidatorStorage, AccessControlledV8 {\n /// @notice Address of vBNB contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVBNB public immutable vBnb;\n\n /// @notice Address of Venus Unitroller contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IComptroller public immutable comptroller;\n\n /// @notice Address of VAIUnitroller contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVAIController public immutable vaiController;\n\n /// @notice Address of wBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable wBNB;\n\n /// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\n uint256 internal constant MANTISSA_ONE = 1e18;\n\n /* Events */\n\n /// @notice Emitted when the percent of the seized amount that goes to treasury changes.\n event NewLiquidationTreasuryPercent(uint256 oldPercent, uint256 newPercent);\n\n /// @notice Emitted when a borrow is liquidated\n event LiquidateBorrowedTokens(\n address indexed liquidator,\n address indexed borrower,\n uint256 repayAmount,\n address vTokenBorrowed,\n address indexed vTokenCollateral,\n uint256 seizeTokensForTreasury,\n uint256 seizeTokensForLiquidator\n );\n\n /// @notice Emitted when the liquidation is restricted for a borrower\n event LiquidationRestricted(address indexed borrower);\n\n /// @notice Emitted when the liquidation restrictions are removed for a borrower\n event LiquidationRestrictionsDisabled(address indexed borrower);\n\n /// @notice Emitted when a liquidator is added to the allowedLiquidatorsByAccount mapping\n event AllowlistEntryAdded(address indexed borrower, address indexed liquidator);\n\n /// @notice Emitted when a liquidator is removed from the allowedLiquidatorsByAccount mapping\n event AllowlistEntryRemoved(address indexed borrower, address indexed liquidator);\n\n /// @notice Emitted when the amount of minLiquidatableVAI is updated\n event NewMinLiquidatableVAI(uint256 oldMinLiquidatableVAI, uint256 newMinLiquidatableVAI);\n\n /// @notice Emitted when the length of chunk gets updated\n event NewPendingRedeemChunkLength(uint256 oldPendingRedeemChunkLength, uint256 newPendingRedeemChunkLength);\n\n /// @notice Emitted when force liquidation is paused\n event ForceVAILiquidationPaused(address indexed sender);\n\n /// @notice Emitted when force liquidation is resumed\n event ForceVAILiquidationResumed(address indexed sender);\n\n /// @notice Emitted when new address of protocol share reserve is set\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserves);\n\n /// @notice Emitted when reserves are reduced from liquidator contract to protocol share reserves\n event ProtocolLiquidationIncentiveTransferred(address indexed sender, address indexed token, uint256 reducedAmount);\n\n /* Errors */\n\n /// @notice Thrown if the liquidation is restricted and the liquidator is not in the allowedLiquidatorsByAccount mapping\n error LiquidationNotAllowed(address borrower, address liquidator);\n\n /// @notice Thrown if VToken transfer fails after the liquidation\n error VTokenTransferFailed(address from, address to, uint256 amount);\n\n /// @notice Thrown if the liquidation is not successful (the error code is from TokenErrorReporter)\n error LiquidationFailed(uint256 errorCode);\n\n /// @notice Thrown if trying to restrict liquidations for an already restricted borrower\n error AlreadyRestricted(address borrower);\n\n /// @notice Thrown if trying to unrestrict liquidations for a borrower that is not restricted\n error NoRestrictionsExist(address borrower);\n\n /// @notice Thrown if the liquidator is already in the allowedLiquidatorsByAccount mapping\n error AlreadyAllowed(address borrower, address liquidator);\n\n /// @notice Thrown if trying to remove a liquidator that is not in the allowedLiquidatorsByAccount mapping\n error AllowlistEntryNotFound(address borrower, address liquidator);\n\n /// @notice Thrown if BNB amount sent with the transaction doesn't correspond to the\n /// intended BNB repayment\n error WrongTransactionAmount(uint256 expected, uint256 actual);\n\n /// @notice Thrown if trying to set treasury percent larger than the liquidation profit\n error TreasuryPercentTooHigh(uint256 maxTreasuryPercentMantissa, uint256 treasuryPercentMantissa_);\n\n /// @notice Thrown if trying to liquidate any token when VAI debt is too high\n error VAIDebtTooHigh(uint256 vaiDebt, uint256 minLiquidatableVAI);\n\n /// @notice Thrown when vToken is not listed\n error MarketNotListed(address vToken);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param comptroller_ The address of the Comptroller contract\n /// @param vBnb_ The address of the VBNB\n /// @param wBNB_ The address of wBNB\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address payable vBnb_, address wBNB_) {\n ensureNonzeroAddress(vBnb_);\n ensureNonzeroAddress(comptroller_);\n ensureNonzeroAddress(wBNB_);\n vBnb = IVBNB(vBnb_);\n wBNB = wBNB_;\n comptroller = IComptroller(comptroller_);\n vaiController = IVAIController(IComptroller(comptroller_).vaiController());\n _disableInitializers();\n }\n\n receive() external payable {}\n\n /// @notice Initializer for the implementation contract.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param accessControlManager_ address of access control manager\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function initialize(\n uint256 treasuryPercentMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) external virtual reinitializer(2) {\n __Liquidator_init(treasuryPercentMantissa_, accessControlManager_, protocolShareReserve_);\n }\n\n /// @dev Liquidator initializer for derived contracts.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param accessControlManager_ address of access control manager\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function __Liquidator_init(\n uint256 treasuryPercentMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) internal onlyInitializing {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n __Liquidator_init_unchained(treasuryPercentMantissa_, protocolShareReserve_);\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n /// @dev Liquidator initializer for derived contracts that doesn't call parent initializers.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function __Liquidator_init_unchained(\n uint256 treasuryPercentMantissa_,\n address protocolShareReserve_\n ) internal onlyInitializing {\n validateTreasuryPercentMantissa(treasuryPercentMantissa_);\n treasuryPercentMantissa = treasuryPercentMantissa_;\n _setProtocolShareReserve(protocolShareReserve_);\n }\n\n /// @notice An admin function to restrict liquidations to allowed addresses only.\n /// @dev Use {addTo,removeFrom}AllowList to configure the allowed addresses.\n /// @param borrower The address of the borrower\n function restrictLiquidation(address borrower) external {\n _checkAccessAllowed(\"restrictLiquidation(address)\");\n if (liquidationRestricted[borrower]) {\n revert AlreadyRestricted(borrower);\n }\n liquidationRestricted[borrower] = true;\n emit LiquidationRestricted(borrower);\n }\n\n /// @notice An admin function to remove restrictions for liquidations.\n /// @dev Does not impact the allowedLiquidatorsByAccount mapping for the borrower, just turns off the check.\n /// @param borrower The address of the borrower\n function unrestrictLiquidation(address borrower) external {\n _checkAccessAllowed(\"unrestrictLiquidation(address)\");\n if (!liquidationRestricted[borrower]) {\n revert NoRestrictionsExist(borrower);\n }\n liquidationRestricted[borrower] = false;\n emit LiquidationRestrictionsDisabled(borrower);\n }\n\n /// @notice An admin function to add the liquidator to the allowedLiquidatorsByAccount mapping for a certain\n /// borrower. If the liquidations are restricted, only liquidators from the\n /// allowedLiquidatorsByAccount mapping can participate in liquidating the positions of this borrower.\n /// @param borrower The address of the borrower\n /// @param borrower The address of the liquidator\n function addToAllowlist(address borrower, address liquidator) external {\n _checkAccessAllowed(\"addToAllowlist(address,address)\");\n if (allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert AlreadyAllowed(borrower, liquidator);\n }\n allowedLiquidatorsByAccount[borrower][liquidator] = true;\n emit AllowlistEntryAdded(borrower, liquidator);\n }\n\n /// @notice An admin function to remove the liquidator from the allowedLiquidatorsByAccount mapping of a certain\n /// borrower. If the liquidations are restricted, this liquidator will not be\n /// able to liquidate the positions of this borrower.\n /// @param borrower The address of the borrower\n /// @param borrower The address of the liquidator\n function removeFromAllowlist(address borrower, address liquidator) external {\n _checkAccessAllowed(\"removeFromAllowlist(address,address)\");\n if (!allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert AllowlistEntryNotFound(borrower, liquidator);\n }\n allowedLiquidatorsByAccount[borrower][liquidator] = false;\n emit AllowlistEntryRemoved(borrower, liquidator);\n }\n\n /// @notice Liquidates a borrow and splits the seized amount between protocol share reserve and\n /// liquidator. The liquidators should use this interface instead of calling\n /// vToken.liquidateBorrow(...) directly.\n /// @notice Checks force VAI liquidation first; vToken should be address of vaiController if vaiDebt is greater than threshold\n /// @notice For BNB borrows msg.value should be equal to repayAmount; otherwise msg.value\n /// should be zero.\n /// @param vToken Borrowed vToken\n /// @param borrower The address of the borrower\n /// @param repayAmount The amount to repay on behalf of the borrower\n /// @param vTokenCollateral The collateral to seize\n function liquidateBorrow(\n address vToken,\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external payable nonReentrant {\n ensureNonzeroAddress(borrower);\n checkRestrictions(borrower, msg.sender);\n (bool isListed, , ) = IComptroller(comptroller).markets(address(vTokenCollateral));\n if (!isListed) {\n revert MarketNotListed(address(vTokenCollateral));\n }\n\n _checkForceVAILiquidate(vToken, borrower);\n uint256 ourBalanceBefore = vTokenCollateral.balanceOf(address(this));\n if (vToken == address(vBnb)) {\n if (repayAmount != msg.value) {\n revert WrongTransactionAmount(repayAmount, msg.value);\n }\n vBnb.liquidateBorrow{ value: msg.value }(borrower, vTokenCollateral);\n } else {\n if (msg.value != 0) {\n revert WrongTransactionAmount(0, msg.value);\n }\n if (vToken == address(vaiController)) {\n _liquidateVAI(borrower, repayAmount, vTokenCollateral);\n } else {\n _liquidateBep20(IVBep20(vToken), borrower, repayAmount, vTokenCollateral);\n }\n }\n uint256 ourBalanceAfter = vTokenCollateral.balanceOf(address(this));\n uint256 seizedAmount = ourBalanceAfter - ourBalanceBefore;\n (uint256 ours, uint256 theirs) = _distributeLiquidationIncentive(vTokenCollateral, seizedAmount);\n _reduceReservesInternal();\n emit LiquidateBorrowedTokens(\n msg.sender,\n borrower,\n repayAmount,\n vToken,\n address(vTokenCollateral),\n ours,\n theirs\n );\n }\n\n /// @notice Sets the new percent of the seized amount that goes to treasury. Should\n /// be less than or equal to comptroller.liquidationIncentiveMantissa().sub(1e18).\n /// @param newTreasuryPercentMantissa New treasury percent (scaled by 10^18).\n function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external {\n _checkAccessAllowed(\"setTreasuryPercent(uint256)\");\n validateTreasuryPercentMantissa(newTreasuryPercentMantissa);\n emit NewLiquidationTreasuryPercent(treasuryPercentMantissa, newTreasuryPercentMantissa);\n treasuryPercentMantissa = newTreasuryPercentMantissa;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protocolShareReserve_ The address of the protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protocolShareReserve_) external onlyOwner {\n _setProtocolShareReserve(protocolShareReserve_);\n }\n\n /**\n * @notice Reduce the reserves of the pending accumulated reserves\n */\n function reduceReserves() external nonReentrant {\n _reduceReservesInternal();\n }\n\n function _reduceReservesInternal() internal {\n uint256 _pendingRedeemLength = pendingRedeem.length;\n uint256 range = _pendingRedeemLength >= pendingRedeemChunkLength\n ? pendingRedeemChunkLength\n : _pendingRedeemLength;\n for (uint256 index = range; index > 0; ) {\n address vToken = pendingRedeem[index - 1];\n uint256 vTokenBalance_ = IVToken(vToken).balanceOf(address(this));\n if (_redeemUnderlying(vToken, vTokenBalance_)) {\n if (vToken == address(vBnb)) {\n _reduceBnbReserves();\n } else {\n _reduceVTokenReserves(vToken);\n }\n pendingRedeem[index - 1] = pendingRedeem[pendingRedeem.length - 1];\n pendingRedeem.pop();\n }\n unchecked {\n index--;\n }\n }\n }\n\n /// @dev Transfers BEP20 tokens to self, then approves vToken to take these tokens.\n function _liquidateBep20(IVBep20 vToken, address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n (bool isListed, , ) = IComptroller(comptroller).markets(address(vToken));\n if (!isListed) {\n revert MarketNotListed(address(vToken));\n }\n\n IERC20Upgradeable borrowedToken = IERC20Upgradeable(vToken.underlying());\n uint256 actualRepayAmount = _transferBep20(borrowedToken, msg.sender, address(this), repayAmount);\n borrowedToken.safeApprove(address(vToken), 0);\n borrowedToken.safeApprove(address(vToken), actualRepayAmount);\n requireNoError(vToken.liquidateBorrow(borrower, actualRepayAmount, vTokenCollateral));\n }\n\n /// @dev Transfers BEP20 tokens to self, then approves VAI to take these tokens.\n function _liquidateVAI(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n IERC20Upgradeable vai = IERC20Upgradeable(vaiController.getVAIAddress());\n vai.safeTransferFrom(msg.sender, address(this), repayAmount);\n vai.safeApprove(address(vaiController), 0);\n vai.safeApprove(address(vaiController), repayAmount);\n\n (uint256 err, ) = vaiController.liquidateVAI(borrower, repayAmount, vTokenCollateral);\n requireNoError(err);\n }\n\n /// @dev Distribute seized collateral between liquidator and protocol share reserve\n function _distributeLiquidationIncentive(\n IVToken vTokenCollateral,\n uint256 seizedAmount\n ) internal returns (uint256 ours, uint256 theirs) {\n (ours, theirs) = _splitLiquidationIncentive(seizedAmount);\n if (!vTokenCollateral.transfer(msg.sender, theirs)) {\n revert VTokenTransferFailed(address(this), msg.sender, theirs);\n }\n\n if (ours > 0 && !_redeemUnderlying(address(vTokenCollateral), ours)) {\n // Check if asset is already present in pendingRedeem array\n uint256 index;\n for (index; index < pendingRedeem.length; ) {\n if (pendingRedeem[index] == address(vTokenCollateral)) {\n break;\n }\n unchecked {\n index++;\n }\n }\n if (index == pendingRedeem.length) {\n pendingRedeem.push(address(vTokenCollateral));\n }\n } else {\n if (address(vTokenCollateral) == address(vBnb)) {\n _reduceBnbReserves();\n } else {\n _reduceVTokenReserves(address(vTokenCollateral));\n }\n }\n }\n\n /// @dev Wraps BNB to wBNB and sends to protocol share reserve\n function _reduceBnbReserves() private {\n uint256 bnbBalance = address(this).balance;\n IWBNB(wBNB).deposit{ value: bnbBalance }();\n IERC20Upgradeable(wBNB).safeTransfer(protocolShareReserve, bnbBalance);\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\n address(comptroller),\n wBNB,\n IProtocolShareReserve.IncomeType.LIQUIDATION\n );\n emit ProtocolLiquidationIncentiveTransferred(msg.sender, wBNB, bnbBalance);\n }\n\n /// @dev Redeem seized collateral to underlying assets\n function _redeemUnderlying(address vToken, uint256 amount) private returns (bool) {\n try IVToken(address(vToken)).redeem(amount) returns (uint256 response) {\n if (response == 0) {\n return true;\n } else {\n return false;\n }\n } catch {\n return false;\n }\n }\n\n /// @dev Transfers seized collateral other than BNB to protocol share reserve\n function _reduceVTokenReserves(address vToken) private {\n address underlying = IVBep20(vToken).underlying();\n uint256 underlyingBalance = IERC20Upgradeable(underlying).balanceOf(address(this));\n IERC20Upgradeable(underlying).safeTransfer(protocolShareReserve, underlyingBalance);\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserve.IncomeType.LIQUIDATION\n );\n emit ProtocolLiquidationIncentiveTransferred(msg.sender, underlying, underlyingBalance);\n }\n\n /// @dev Transfers tokens and returns the actual transfer amount\n function _transferBep20(\n IERC20Upgradeable token,\n address from,\n address to,\n uint256 amount\n ) internal returns (uint256) {\n uint256 prevBalance = token.balanceOf(to);\n token.safeTransferFrom(from, to, amount);\n return token.balanceOf(to) - prevBalance;\n }\n\n /// @dev Computes the amounts that would go to treasury and to the liquidator.\n function _splitLiquidationIncentive(uint256 seizedAmount) internal view returns (uint256 ours, uint256 theirs) {\n uint256 totalIncentive = comptroller.liquidationIncentiveMantissa();\n ours = (seizedAmount * treasuryPercentMantissa) / totalIncentive;\n theirs = seizedAmount - ours;\n }\n\n function requireNoError(uint256 errCode) internal pure {\n if (errCode == uint256(0)) {\n return;\n }\n\n revert LiquidationFailed(errCode);\n }\n\n function checkRestrictions(address borrower, address liquidator) internal view {\n if (liquidationRestricted[borrower] && !allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert LiquidationNotAllowed(borrower, liquidator);\n }\n }\n\n function validateTreasuryPercentMantissa(uint256 treasuryPercentMantissa_) internal view {\n uint256 maxTreasuryPercentMantissa = comptroller.liquidationIncentiveMantissa() - MANTISSA_ONE;\n if (treasuryPercentMantissa_ > maxTreasuryPercentMantissa) {\n revert TreasuryPercentTooHigh(maxTreasuryPercentMantissa, treasuryPercentMantissa_);\n }\n }\n\n /// @dev Checks liquidation action in comptroller and vaiDebt with minLiquidatableVAI threshold\n function _checkForceVAILiquidate(address vToken_, address borrower_) private view {\n uint256 _vaiDebt = vaiController.getVAIRepayAmount(borrower_);\n bool _isVAILiquidationPaused = comptroller.actionPaused(address(vaiController), IComptroller.Action.LIQUIDATE);\n bool _isForcedLiquidationEnabled = comptroller.isForcedLiquidationEnabled(vToken_);\n if (\n _isForcedLiquidationEnabled ||\n _isVAILiquidationPaused ||\n !forceVAILiquidate ||\n _vaiDebt < minLiquidatableVAI ||\n vToken_ == address(vaiController)\n ) return;\n revert VAIDebtTooHigh(_vaiDebt, minLiquidatableVAI);\n }\n\n function _setProtocolShareReserve(address protocolShareReserve_) internal {\n ensureNonzeroAddress(protocolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Sets the threshold for minimum amount of vaiLiquidate\n * @param minLiquidatableVAI_ New address for the access control\n */\n function setMinLiquidatableVAI(uint256 minLiquidatableVAI_) external {\n _checkAccessAllowed(\"setMinLiquidatableVAI(uint256)\");\n emit NewMinLiquidatableVAI(minLiquidatableVAI, minLiquidatableVAI_);\n minLiquidatableVAI = minLiquidatableVAI_;\n }\n\n /**\n * @notice Length of the pendingRedeem array to be consider while redeeming in Liquidation transaction\n * @param newLength_ Length of the chunk\n */\n function setPendingRedeemChunkLength(uint256 newLength_) external {\n _checkAccessAllowed(\"setPendingRedeemChunkLength(uint256)\");\n require(newLength_ > 0, \"Invalid chunk size\");\n emit NewPendingRedeemChunkLength(pendingRedeemChunkLength, newLength_);\n pendingRedeemChunkLength = newLength_;\n }\n\n /**\n * @notice Pause Force Liquidation of VAI\n */\n function pauseForceVAILiquidate() external {\n _checkAccessAllowed(\"pauseForceVAILiquidate()\");\n require(forceVAILiquidate, \"Force Liquidation of VAI is already Paused\");\n forceVAILiquidate = false;\n emit ForceVAILiquidationPaused(msg.sender);\n }\n\n /**\n * @notice Resume Force Liquidation of VAI\n */\n function resumeForceVAILiquidate() external {\n _checkAccessAllowed(\"resumeForceVAILiquidate()\");\n require(!forceVAILiquidate, \"Force Liquidation of VAI is already resumed\");\n forceVAILiquidate = true;\n emit ForceVAILiquidationResumed(msg.sender);\n }\n\n function renounceOwnership() public override {}\n}\n" + }, + "contracts/Liquidator/LiquidatorStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\ncontract LiquidatorStorage {\n /* State */\n\n /// @notice Percent of seized amount that goes to treasury.\n uint256 public treasuryPercentMantissa;\n\n /// @notice Mapping of addresses allowed to liquidate an account if liquidationRestricted[borrower] == true\n mapping(address => mapping(address => bool)) public allowedLiquidatorsByAccount;\n\n /// @notice Whether the liquidations are restricted to enabled allowedLiquidatorsByAccount addresses only\n mapping(address => bool) public liquidationRestricted;\n\n /// @notice minimum amount of VAI liquidation threshold\n uint256 public minLiquidatableVAI;\n\n /// @notice check for liquidation of VAI\n bool public forceVAILiquidate;\n\n /// @notice assests whose redeem is pending to reduce reserves\n address[] public pendingRedeem;\n\n /// @notice protocol share reserve contract address\n address public protocolShareReserve;\n\n /// @dev Size of chunk to consider when redeeming underlying at the time of liquidation\n uint256 internal pendingRedeemChunkLength;\n\n /// @notice gap to prevent collision in inheritance\n uint256[49] private __gap;\n}\n" + }, + "contracts/PegStability/IVAI.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IVAI {\n function balanceOf(address usr) external returns (uint256);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function mint(address usr, uint wad) external;\n\n function burn(address usr, uint wad) external;\n}\n" + }, + "contracts/PegStability/PegStability.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { IVAI } from \"./IVAI.sol\";\n\n/**\n * @title Peg Stability Contract.\n * @notice Contract for swapping stable token for VAI token and vice versa to maintain the peg stability between them.\n * @author Venus Protocol\n */\ncontract PegStability is AccessControlledV8, ReentrancyGuardUpgradeable {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n // Helper enum for calculation of the fee.\n enum FeeDirection {\n IN,\n OUT\n }\n\n /// @notice The divisor used to convert fees to basis points.\n uint256 public constant BASIS_POINTS_DIVISOR = 10000;\n\n /// @notice The mantissa value representing 1 (used for calculations).\n uint256 public constant MANTISSA_ONE = 1e18;\n\n /// @notice The value representing one dollar in the stable token.\n /// @dev Our oracle is returning amount depending on the number of decimals of the stable token. (36 - asset_decimals) E.g. 8 decimal asset = 1e28.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable ONE_DOLLAR;\n\n /// @notice VAI token contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVAI public immutable VAI;\n\n /// @notice The address of the stable token contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable STABLE_TOKEN_ADDRESS;\n\n /// @notice The address of ResilientOracle contract wrapped in its interface.\n ResilientOracleInterface public oracle;\n\n /// @notice The address of the Venus Treasury contract.\n address public venusTreasury;\n\n /// @notice The incoming stableCoin fee. (Fee for swapStableForVAI).\n uint256 public feeIn;\n\n /// @notice The outgoing stableCoin fee. (Fee for swapVAIForStable).\n uint256 public feeOut;\n\n /// @notice The maximum amount of VAI that can be minted through this contract.\n uint256 public vaiMintCap;\n\n /// @notice The total amount of VAI minted through this contract.\n uint256 public vaiMinted;\n\n /// @notice A flag indicating whether the contract is currently paused or not.\n bool public isPaused;\n\n /// @notice Event emitted when contract is paused.\n event PSMPaused(address indexed admin);\n\n /// @notice Event emitted when the contract is resumed after pause.\n event PSMResumed(address indexed admin);\n\n /// @notice Event emitted when feeIn state var is modified.\n event FeeInChanged(uint256 oldFeeIn, uint256 newFeeIn);\n\n /// @notice Event emitted when feeOut state var is modified.\n event FeeOutChanged(uint256 oldFeeOut, uint256 newFeeOut);\n\n /// @notice Event emitted when vaiMintCap state var is modified.\n event VAIMintCapChanged(uint256 oldCap, uint256 newCap);\n\n /// @notice Event emitted when venusTreasury state var is modified.\n event VenusTreasuryChanged(address indexed oldTreasury, address indexed newTreasury);\n\n /// @notice Event emitted when oracle state var is modified.\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n\n /// @notice Event emitted when stable token is swapped for VAI.\n event StableForVAISwapped(uint256 stableIn, uint256 vaiOut, uint256 fee);\n\n /// @notice Event emitted when stable token is swapped for VAI.\n event VAIForStableSwapped(uint256 vaiBurnt, uint256 stableOut, uint256 vaiFee);\n\n /// @notice thrown when contract is in paused state\n error Paused();\n\n /// @notice thrown when attempted to pause an already paused contract\n error AlreadyPaused();\n\n /// @notice thrown when attempted to resume the contract if it is already resumed\n error NotPaused();\n\n /// @notice thrown when stable token has more than 18 decimals\n error TooManyDecimals();\n\n /// @notice thrown when fee is >= 100%\n error InvalidFee();\n\n /// @notice thrown when a zero address is passed as a function parameter\n error ZeroAddress();\n\n /// @notice thrown when a zero amount is passed as stable token amount parameter\n error ZeroAmount();\n\n /// @notice thrown when the user doesn't have enough VAI balance to provide for the amount of stable tokens he wishes to get\n error NotEnoughVAI();\n\n /// @notice thrown when the amount of VAI to be burnt exceeds the vaiMinted amount\n error VAIMintedUnderflow();\n\n /// @notice thrown when the VAI transfer to treasury fails\n error VAITransferFail();\n\n /// @notice thrown when VAI to be minted will go beyond the mintCap threshold\n error VAIMintCapReached();\n /// @notice thrown when fee calculation will result in rounding down to 0 due to stable token amount being a too small number\n error AmountTooSmall();\n\n /**\n * @dev Prevents functions to execute when contract is paused.\n */\n modifier isActive() {\n if (isPaused) revert Paused();\n _;\n }\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address stableTokenAddress_, address vaiAddress_) {\n _ensureNonzeroAddress(stableTokenAddress_);\n _ensureNonzeroAddress(vaiAddress_);\n\n uint256 decimals_ = IERC20MetadataUpgradeable(stableTokenAddress_).decimals();\n\n if (decimals_ > 18) {\n revert TooManyDecimals();\n }\n\n ONE_DOLLAR = 10 ** (36 - decimals_); // 1$ scaled to the decimals returned by our Oracle\n STABLE_TOKEN_ADDRESS = stableTokenAddress_;\n VAI = IVAI(vaiAddress_);\n _disableInitializers();\n }\n\n /**\n * @notice Initializes the contract via Proxy Contract with the required parameters.\n * @param accessControlManager_ The address of the AccessControlManager contract.\n * @param venusTreasury_ The address where fees will be sent.\n * @param oracleAddress_ The address of the ResilientOracle contract.\n * @param feeIn_ The percentage of fees to be applied to a stablecoin -> VAI swap.\n * @param feeOut_ The percentage of fees to be applied to a VAI -> stablecoin swap.\n * @param vaiMintCap_ The cap for the total amount of VAI that can be minted.\n */\n function initialize(\n address accessControlManager_,\n address venusTreasury_,\n address oracleAddress_,\n uint256 feeIn_,\n uint256 feeOut_,\n uint256 vaiMintCap_\n ) external initializer {\n _ensureNonzeroAddress(accessControlManager_);\n _ensureNonzeroAddress(venusTreasury_);\n _ensureNonzeroAddress(oracleAddress_);\n __AccessControlled_init(accessControlManager_);\n __ReentrancyGuard_init();\n\n if (feeIn_ >= BASIS_POINTS_DIVISOR || feeOut_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n\n feeIn = feeIn_;\n feeOut = feeOut_;\n vaiMintCap = vaiMintCap_;\n venusTreasury = venusTreasury_;\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /*** Swap Functions ***/\n\n /**\n * @notice Swaps VAI for a stable token.\n * @param receiver The address where the stablecoin will be sent.\n * @param stableTknAmount The amount of stable tokens to receive.\n * @return The amount of VAI received and burnt from the sender.\n */\n // @custom:event Emits VAIForStableSwapped event.\n function swapVAIForStable(\n address receiver,\n uint256 stableTknAmount\n ) external isActive nonReentrant returns (uint256) {\n _ensureNonzeroAddress(receiver);\n _ensureNonzeroAmount(stableTknAmount);\n\n // update oracle price and calculate USD value of the stable token amount scaled in 18 decimals\n oracle.updateAssetPrice(STABLE_TOKEN_ADDRESS);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.OUT);\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.OUT);\n\n if (VAI.balanceOf(msg.sender) < stableTknAmountUSD + fee) {\n revert NotEnoughVAI();\n }\n if (vaiMinted < stableTknAmountUSD) {\n revert VAIMintedUnderflow();\n }\n\n unchecked {\n vaiMinted -= stableTknAmountUSD;\n }\n\n if (fee != 0) {\n bool success = VAI.transferFrom(msg.sender, venusTreasury, fee);\n if (!success) {\n revert VAITransferFail();\n }\n }\n\n VAI.burn(msg.sender, stableTknAmountUSD);\n IERC20Upgradeable(STABLE_TOKEN_ADDRESS).safeTransfer(receiver, stableTknAmount);\n emit VAIForStableSwapped(stableTknAmountUSD, stableTknAmount, fee);\n return stableTknAmountUSD;\n }\n\n /**\n * @notice Swaps stable tokens for VAI with fees.\n * @dev This function adds support to fee-on-transfer tokens. The actualTransferAmt is calculated, by recording token balance state before and after the transfer.\n * @param receiver The address that will receive the VAI tokens.\n * @param stableTknAmount The amount of stable tokens to be swapped.\n * @return Amount of VAI minted to the sender.\n */\n // @custom:event Emits StableForVAISwapped event.\n function swapStableForVAI(\n address receiver,\n uint256 stableTknAmount\n ) external isActive nonReentrant returns (uint256) {\n _ensureNonzeroAddress(receiver);\n _ensureNonzeroAmount(stableTknAmount);\n // transfer IN, supporting fee-on-transfer tokens\n uint256 balanceBefore = IERC20Upgradeable(STABLE_TOKEN_ADDRESS).balanceOf(address(this));\n IERC20Upgradeable(STABLE_TOKEN_ADDRESS).safeTransferFrom(msg.sender, address(this), stableTknAmount);\n uint256 balanceAfter = IERC20Upgradeable(STABLE_TOKEN_ADDRESS).balanceOf(address(this));\n\n //calculate actual transfered amount (in case of fee-on-transfer tokens)\n uint256 actualTransferAmt = balanceAfter - balanceBefore;\n\n // update oracle price and calculate USD value of the stable token amount scaled in 18 decimals\n oracle.updateAssetPrice(STABLE_TOKEN_ADDRESS);\n uint256 actualTransferAmtInUSD = _previewTokenUSDAmount(actualTransferAmt, FeeDirection.IN);\n\n //calculate feeIn\n uint256 fee = _calculateFee(actualTransferAmtInUSD, FeeDirection.IN);\n uint256 vaiToMint = actualTransferAmtInUSD - fee;\n\n if (vaiMinted + actualTransferAmtInUSD > vaiMintCap) {\n revert VAIMintCapReached();\n }\n unchecked {\n vaiMinted += actualTransferAmtInUSD;\n }\n\n // mint VAI to receiver\n VAI.mint(receiver, vaiToMint);\n\n // mint VAI fee to venus treasury\n if (fee != 0) {\n VAI.mint(venusTreasury, fee);\n }\n\n emit StableForVAISwapped(actualTransferAmt, vaiToMint, fee);\n return vaiToMint;\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Pause the PSM contract.\n * @dev Reverts if the contract is already paused.\n */\n // @custom:event Emits PSMPaused event.\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n if (isPaused) {\n revert AlreadyPaused();\n }\n isPaused = true;\n emit PSMPaused(msg.sender);\n }\n\n /**\n * @notice Resume the PSM contract.\n * @dev Reverts if the contract is not paused.\n */\n // @custom:event Emits PSMResumed event.\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n if (!isPaused) {\n revert NotPaused();\n }\n isPaused = false;\n emit PSMResumed(msg.sender);\n }\n\n /**\n * @notice Set the fee percentage for incoming swaps.\n * @dev Reverts if the new fee percentage is invalid (greater than or equal to BASIS_POINTS_DIVISOR).\n * @param feeIn_ The new fee percentage for incoming swaps.\n */\n // @custom:event Emits FeeInChanged event.\n function setFeeIn(uint256 feeIn_) external {\n _checkAccessAllowed(\"setFeeIn(uint256)\");\n // feeIn = 10000 = 100%\n if (feeIn_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n uint256 oldFeeIn = feeIn;\n feeIn = feeIn_;\n emit FeeInChanged(oldFeeIn, feeIn_);\n }\n\n /**\n * @notice Set the fee percentage for outgoing swaps.\n * @dev Reverts if the new fee percentage is invalid (greater than or equal to BASIS_POINTS_DIVISOR).\n * @param feeOut_ The new fee percentage for outgoing swaps.\n */\n // @custom:event Emits FeeOutChanged event.\n function setFeeOut(uint256 feeOut_) external {\n _checkAccessAllowed(\"setFeeOut(uint256)\");\n // feeOut = 10000 = 100%\n if (feeOut_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n uint256 oldFeeOut = feeOut;\n feeOut = feeOut_;\n emit FeeOutChanged(oldFeeOut, feeOut_);\n }\n\n /**\n * @dev Set the maximum amount of VAI that can be minted through this contract.\n * @param vaiMintCap_ The new maximum amount of VAI that can be minted.\n */\n // @custom:event Emits VAIMintCapChanged event.\n function setVAIMintCap(uint256 vaiMintCap_) external {\n _checkAccessAllowed(\"setVAIMintCap(uint256)\");\n uint256 oldVAIMintCap = vaiMintCap;\n vaiMintCap = vaiMintCap_;\n emit VAIMintCapChanged(oldVAIMintCap, vaiMintCap_);\n }\n\n /**\n * @notice Set the address of the Venus Treasury contract.\n * @dev Reverts if the new address is zero.\n * @param venusTreasury_ The new address of the Venus Treasury contract.\n */\n // @custom:event Emits VenusTreasuryChanged event.\n function setVenusTreasury(address venusTreasury_) external {\n _checkAccessAllowed(\"setVenusTreasury(address)\");\n _ensureNonzeroAddress(venusTreasury_);\n address oldTreasuryAddress = venusTreasury;\n venusTreasury = venusTreasury_;\n emit VenusTreasuryChanged(oldTreasuryAddress, venusTreasury_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n */\n // @custom:event Emits OracleChanged event.\n function setOracle(address oracleAddress_) external {\n _checkAccessAllowed(\"setOracle(address)\");\n _ensureNonzeroAddress(oracleAddress_);\n address oldOracleAddress = address(oracle);\n oracle = ResilientOracleInterface(oracleAddress_);\n emit OracleChanged(oldOracleAddress, oracleAddress_);\n }\n\n /**\n * @dev Disabling renounceOwnership function.\n */\n function renounceOwnership() public override {}\n\n /*** Helper Functions ***/\n\n /**\n * @notice Calculates the amount of VAI that would be burnt from the user.\n * @dev This calculation might be off with a bit, if the price of the oracle for this asset is not updated in the block this function is invoked.\n * @param stableTknAmount The amount of stable tokens to be received after the swap.\n * @return The amount of VAI that would be taken from the user.\n */\n function previewSwapVAIForStable(uint256 stableTknAmount) external view returns (uint256) {\n _ensureNonzeroAmount(stableTknAmount);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.OUT);\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.OUT);\n\n if (vaiMinted < stableTknAmountUSD) {\n revert VAIMintedUnderflow();\n }\n\n return stableTknAmountUSD + fee;\n }\n\n /**\n * @notice Calculates the amount of VAI that would be sent to the receiver.\n * @dev This calculation might be off with a bit, if the price of the oracle for this asset is not updated in the block this function is invoked.\n * @param stableTknAmount The amount of stable tokens provided for the swap.\n * @return The amount of VAI that would be sent to the receiver.\n */\n function previewSwapStableForVAI(uint256 stableTknAmount) external view returns (uint256) {\n _ensureNonzeroAmount(stableTknAmount);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.IN);\n\n //calculate feeIn\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.IN);\n uint256 vaiToMint = stableTknAmountUSD - fee;\n\n if (vaiMinted + stableTknAmountUSD > vaiMintCap) {\n revert VAIMintCapReached();\n }\n\n return vaiToMint;\n }\n\n /**\n * @dev Calculates the USD value of the given amount of stable tokens depending on the swap direction.\n * @param amount The amount of stable tokens.\n * @param direction The direction of the swap.\n * @return The USD value of the given amount of stable tokens scaled by 1e18 taking into account the direction of the swap\n */\n function _previewTokenUSDAmount(uint256 amount, FeeDirection direction) internal view returns (uint256) {\n return (amount * _getPriceInUSD(direction)) / MANTISSA_ONE;\n }\n\n /**\n * @notice Get the price of stable token in USD.\n * @dev This function returns either min(1$,oraclePrice) or max(1$,oraclePrice) with a decimal scale (36 - asset_decimals). E.g. for 8 decimal token 1$ will be 1e28.\n * @param direction The direction of the swap: FeeDirection.IN or FeeDirection.OUT.\n * @return The price in USD, adjusted based on the selected direction.\n */\n function _getPriceInUSD(FeeDirection direction) internal view returns (uint256) {\n // get price with a scale = (36 - asset_decimals)\n uint256 price = oracle.getPrice(STABLE_TOKEN_ADDRESS);\n\n if (direction == FeeDirection.IN) {\n // MIN(1, price)\n return price < ONE_DOLLAR ? price : ONE_DOLLAR;\n } else {\n // MAX(1, price)\n return price > ONE_DOLLAR ? price : ONE_DOLLAR;\n }\n }\n\n /**\n * @notice Calculate the fee amount based on the input amount and fee percentage.\n * @dev Reverts if the fee percentage calculation results in rounding down to 0.\n * @param amount The input amount to calculate the fee from.\n * @param direction The direction of the fee: FeeDirection.IN or FeeDirection.OUT.\n * @return The fee amount.\n */\n function _calculateFee(uint256 amount, FeeDirection direction) internal view returns (uint256) {\n uint256 feePercent;\n if (direction == FeeDirection.IN) {\n feePercent = feeIn;\n } else {\n feePercent = feeOut;\n }\n if (feePercent == 0) {\n return 0;\n } else {\n // checking if the percent calculation will result in rounding down to 0\n if (amount * feePercent < BASIS_POINTS_DIVISOR) {\n revert AmountTooSmall();\n }\n return (amount * feePercent) / BASIS_POINTS_DIVISOR;\n }\n }\n\n /**\n * @notice Checks that the address is not the zero address.\n * @param someone The address to check.\n */\n function _ensureNonzeroAddress(address someone) private pure {\n if (someone == address(0)) revert ZeroAddress();\n }\n\n /**\n * @notice Checks that the amount passed as stable tokens is bigger than zero\n * @param amount The amount to validate\n */\n function _ensureNonzeroAmount(uint256 amount) private pure {\n if (amount == 0) revert ZeroAmount();\n }\n}\n" + }, + "contracts/Swap/interfaces/CustomErrors.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\n// **************\n// *** ERRORS ***\n// **************\n\n///@notice Error indicating that suplying to a given market failed.\nerror SupplyError(address supplier, address vToken, uint256 errorCode);\n\n///@notice Error indicating that repaying to given market failed.\nerror RepayError(address repayer, address vToken, uint256 errorCode);\n\n///@notice Error indicating wBNB address passed is not the expected one.\nerror WrongAddress(address expectedAdddress, address passedAddress);\n\n///@notice Error thrown when deadline for swap has expired\nerror SwapDeadlineExpire(uint256 deadline, uint256 timestemp);\n\n///@notice Error thrown where the input amount parameter for a token is 0\nerror InsufficientInputAmount();\n\n///@notice Error thrown when the amount out passed is 0\nerror InsufficientOutputAmount();\n\n///@notice Error thrown when the amount received from a trade is below the minimum\nerror OutputAmountBelowMinimum(uint256 amountOut, uint256 amountOutMin);\n\n///@notice Error thrown when the amount In is above the amount in maximum\nerror InputAmountAboveMaximum(uint256 amountIn, uint256 amountIntMax);\n\n///@notice Error thrown when amount is above the msg.value(amountMax)\nerror ExcessiveInputAmount(uint256 amount, uint256 amountMax);\n\n///@notice Error thrown when the given reserves are equal to 0\nerror InsufficientLiquidity();\n\n///@notice Error thrown if a zero address is passed\nerror ZeroAddress();\n\n///@notice Error thrown if two token addresses are identical\nerror IdenticalAddresses();\n\n///@notice Error thrown when the trade path[] parameter consists of only 1 token (i.e. path.length<2)\nerror InvalidPath();\n\n///@notice Error thrown when invalid vToken address is passed to swap router\nerror VTokenNotListed(address vToken);\n\n///@notice Error thrown when invalid underlying is passed as per given vToken\nerror VTokenUnderlyingInvalid(address underlying);\n\n///@notice Error thrown when swapamount is less than the amountOutmin\nerror SwapAmountLessThanAmountOutMin(uint256 swapAmount, uint256 amountOutMin);\n\n///@notice Error thrown when swapRouter's balance is less than sweep amount\nerror InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n///@notice Error thrown when safeApprove failed\nerror SafeApproveFailed();\n\n///@notice Error thrown when safeTransfer failed\nerror SafeTransferFailed();\n\n///@notice Error thrown when transferFrom failed\nerror SafeTransferFromFailed();\n\n///@notice Error thrown when safeTransferBNB failed\nerror SafeTransferBNBFailed();\n\n///@notice Error thrown when reentrant check fails\nerror ReentrantCheck();\n" + }, + "contracts/Swap/interfaces/InterfaceComptroller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface InterfaceComptroller {\n function markets(address) external view returns (bool);\n}\n" + }, + "contracts/Swap/interfaces/IPancakePair.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakePair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n\n function transfer(address to, uint value) external returns (bool);\n\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint);\n\n function price1CumulativeLast() external view returns (uint);\n\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n\n function burn(address to) external returns (uint amount0, uint amount1);\n\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/Swap/interfaces/IPancakeSwapV2Factory.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakeSwapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n\n function allPairs(uint) external view returns (address pair);\n\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}\n" + }, + "contracts/Swap/interfaces/IPancakeSwapV2Router.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakeSwapV2Router {\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForTokensAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256 swapAmount);\n\n function swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapExactBNBForTokensAtSupportingFee(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256 swapAmount);\n\n function swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForBNBAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256 swapAmount);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForTokensAndSupply(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactBNBForTokensAndSupply(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactBNBForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapTokensForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForBNBAndSupply(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForBNBAndSupplyAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForExactBNBAndSupply(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForFullTokenDebtAndRepay(\n address vTokenAddress,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForTokensAndRepay(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactBNBForTokensAndRepay(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactBNBForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapTokensForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForFullTokenDebtAndRepay(\n address vTokenAddress,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForBNBAndRepay(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForBNBAndRepayAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForExactBNBAndRepay(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForFullBNBDebtAndRepay(uint256 amountInMax, address[] calldata path, uint256 deadline) external;\n}\n" + }, + "contracts/Swap/interfaces/IVBNB.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IVBNB {\n function repayBorrowBehalf(address borrower) external payable;\n\n function mint() external payable;\n\n function balanceOf(address owner) external view returns (uint256);\n}\n" + }, + "contracts/Swap/interfaces/IVtoken.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IVToken {\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function underlying() external returns (address);\n}\n" + }, + "contracts/Swap/interfaces/IWBNB.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IWBNB {\n function deposit() external payable;\n\n function transfer(address to, uint value) external returns (bool);\n\n function withdraw(uint) external;\n\n function balanceOf(address owner) external view returns (uint256 balance);\n}\n" + }, + "contracts/Swap/IRouterHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IRouterHelper {\n function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\n}\n" + }, + "contracts/Swap/lib/PancakeLibrary.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"../interfaces/IPancakePair.sol\";\nimport \"../interfaces/CustomErrors.sol\";\n\nlibrary PancakeLibrary {\n /**\n * @notice Used to handle return values from pairs sorted in this order\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return token0 token1 Sorted token addresses\n **/\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\n if (tokenA == tokenB) {\n revert IdenticalAddresses();\n }\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n if (token0 == address(0)) {\n revert ZeroAddress();\n }\n }\n\n /**\n * @notice Calculates the CREATE2 address for a pair without making any external calls\n * @param factory Address of the pancake swap factory\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return pair Address for a pair\n **/\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\n (address token0, address token1) = sortTokens(tokenA, tokenB);\n pair = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(\n hex\"ff\",\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex\"00fb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5\" // init code hash\n )\n )\n )\n )\n );\n }\n\n /**\n * @notice Fetches and sorts the reserves for a pair\n * @param factory Address of the pancake swap factory\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return reserveA reserveB Reserves for the token A and token B\n **/\n function getReserves(\n address factory,\n address tokenA,\n address tokenB\n ) internal view returns (uint256 reserveA, uint256 reserveB) {\n (address token0, ) = sortTokens(tokenA, tokenB);\n address pairAddress = pairFor(factory, tokenA, tokenB);\n (uint256 reserve0, uint256 reserve1, ) = IPancakePair(pairAddress).getReserves();\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\n }\n\n /**\n * @notice Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n * @param amountA The amount of token A\n * @param reserveA The amount of reserves for token A before swap\n * @param reserveB The amount of reserves for token B before swap\n * @return amountB An equivalent amount of the token B\n **/\n function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) internal pure returns (uint256 amountB) {\n if (amountA == 0) {\n revert InsufficientInputAmount();\n } else if (reserveA == 0 || reserveB == 0) {\n revert InsufficientLiquidity();\n }\n amountB = (amountA * reserveB) / reserveA;\n }\n\n /**\n * @notice Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n * @param amountIn The amount of token A need to swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountOut The maximum output amount of the token B\n **/\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) internal pure returns (uint256 amountOut) {\n if (amountIn == 0) {\n revert InsufficientInputAmount();\n } else if (reserveIn == 0 || reserveOut == 0) {\n revert InsufficientLiquidity();\n }\n uint256 amountInWithFee = amountIn * 9975;\n uint256 numerator = amountInWithFee * reserveOut;\n uint256 denominator = (reserveIn * 10000) + amountInWithFee;\n amountOut = numerator / denominator;\n }\n\n /**\n * @notice Given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n * @param amountOut The amount of token B after swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountIn Required input amount of the token A\n **/\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) internal pure returns (uint256 amountIn) {\n if (amountOut == 0) {\n revert InsufficientOutputAmount();\n } else if (reserveIn == 0 || reserveOut == 0) {\n revert InsufficientLiquidity();\n }\n uint256 numerator = reserveIn * amountOut * 10000;\n uint256 denominator = (reserveOut - amountOut) * 9975;\n amountIn = (numerator / denominator) + 1;\n }\n\n /**\n * @notice Performs chained getAmountOut calculations on any number of pairs\n * @param factory Address of the pancake swap factory\n * @param amountIn The amount of tokens to swap.\n * @param path Array with addresses of the underlying assets to be swapped\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function getAmountsOut(\n address factory,\n uint256 amountIn,\n address[] memory path\n ) internal view returns (uint256[] memory amounts) {\n if (path.length <= 1) {\n revert InvalidPath();\n }\n amounts = new uint256[](path.length);\n amounts[0] = amountIn;\n for (uint256 i; i < path.length - 1; ) {\n (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]);\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\n unchecked {\n i += 1;\n }\n }\n }\n\n /**\n * @notice Performs chained getAmountIn calculations on any number of pairs\n * @param factory Address of the pancake swap factory\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function getAmountsIn(\n address factory,\n uint256 amountOut,\n address[] memory path\n ) internal view returns (uint256[] memory amounts) {\n if (path.length <= 1) {\n revert InvalidPath();\n }\n amounts = new uint256[](path.length);\n amounts[amounts.length - 1] = amountOut;\n for (uint256 i = path.length - 1; i > 0; ) {\n (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]);\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\n unchecked {\n i -= 1;\n }\n }\n }\n}\n" + }, + "contracts/Swap/lib/TransferHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"../interfaces/CustomErrors.sol\";\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n /**\n * @dev `value` as the allowance of `spender` over the caller's tokens.\n * @param token Address of the token\n * @param to Address of the spender\n * @param value Amount as allowance\n */\n function safeApprove(address token, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('approve(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeApproveFailed();\n }\n }\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 * @param token Address of the token\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransfer(address token, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeTransferFailed();\n }\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 * @param token Address of the token\n * @param from Address of the asset'sowner\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransferFrom(address token, address from, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeTransferFromFailed();\n }\n }\n\n /**\n * @dev Transfer `value` amount of `BNB` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransferBNB(address to, uint256 value) internal {\n (bool success, ) = to.call{ value: value }(new bytes(0));\n if (!success) {\n revert SafeTransferBNBFailed();\n }\n }\n}\n" + }, + "contracts/Swap/RouterHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport \"./lib/PancakeLibrary.sol\";\nimport \"./interfaces/IWBNB.sol\";\nimport \"./lib/TransferHelper.sol\";\n\nimport \"./interfaces/CustomErrors.sol\";\nimport \"./IRouterHelper.sol\";\n\nabstract contract RouterHelper is IRouterHelper {\n /// @notice Select the type of Token for which either a supporting fee would be deducted or not at the time of transfer.\n enum TypesOfTokens {\n NON_SUPPORTING_FEE,\n SUPPORTING_FEE\n }\n\n /// @notice Address of WBNB contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WBNB;\n\n /// @notice Address of pancake swap factory contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable factory;\n\n // **************\n // *** EVENTS ***\n // **************\n /// @notice This event is emitted whenever a successful swap (tokenA -> tokenB) occurs\n event SwapTokensForTokens(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (tokenA -> tokenB) occurs\n event SwapTokensForTokensAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @notice This event is emitted whenever a successful swap (BNB -> token) occurs\n event SwapBnbForTokens(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (BNB -> token) occurs\n event SwapBnbForTokensAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @notice This event is emitted whenever a successful swap (token -> BNB) occurs\n event SwapTokensForBnb(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (token -> BNB) occurs\n event SwapTokensForBnbAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address WBNB_, address factory_) {\n if (WBNB_ == address(0) || factory_ == address(0)) {\n revert ZeroAddress();\n }\n WBNB = WBNB_;\n factory = factory_;\n }\n\n /**\n * @notice Perform swap on the path(pairs)\n * @param amounts Araay of amounts of tokens after performing the swap\n * @param path Array with addresses of the underlying assets to be swapped\n * @param _to Recipient of the output tokens.\n */\n function _swap(uint256[] memory amounts, address[] memory path, address _to) internal virtual {\n for (uint256 i; i < path.length - 1; ) {\n (address input, address output) = (path[i], path[i + 1]);\n (address token0, ) = PancakeLibrary.sortTokens(input, output);\n uint256 amountOut = amounts[i + 1];\n (uint256 amount0Out, uint256 amount1Out) = input == token0\n ? (uint256(0), amountOut)\n : (amountOut, uint256(0));\n address to = i < path.length - 2 ? PancakeLibrary.pairFor(factory, output, path[i + 2]) : _to;\n IPancakePair(PancakeLibrary.pairFor(factory, input, output)).swap(amount0Out, amount1Out, to, new bytes(0));\n unchecked {\n i += 1;\n }\n }\n }\n\n // **** SWAP (supporting fee-on-transfer tokens) ****\n\n /**\n * @notice Perform swap on the path(pairs) for supporting fee\n * @dev requires the initial amount to have already been sent to the first pair\n * @param path Array with addresses of the underlying assets to be swapped\n * @param _to Recipient of the output tokens.\n */\n function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {\n for (uint256 i; i < path.length - 1; ) {\n (address input, address output) = (path[i], path[i + 1]);\n (address token0, ) = PancakeLibrary.sortTokens(input, output);\n IPancakePair pair = IPancakePair(PancakeLibrary.pairFor(factory, input, output));\n uint256 amountInput;\n uint256 amountOutput;\n {\n // scope to avoid stack too deep errors\n (uint256 reserve0, uint256 reserve1, ) = pair.getReserves();\n (uint256 reserveInput, uint256 reserveOutput) = input == token0\n ? (reserve0, reserve1)\n : (reserve1, reserve0);\n\n uint256 balance = IERC20(input).balanceOf(address(pair));\n amountInput = balance - reserveInput;\n amountOutput = PancakeLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);\n }\n (uint256 amount0Out, uint256 amount1Out) = input == token0\n ? (uint256(0), amountOutput)\n : (amountOutput, uint256(0));\n address to = i < path.length - 2 ? PancakeLibrary.pairFor(factory, output, path[i + 2]) : _to;\n pair.swap(amount0Out, amount1Out, to, new bytes(0));\n unchecked {\n i += 1;\n }\n }\n }\n\n /**\n * @notice Swap token A for token B\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n address pairAddress = PancakeLibrary.pairFor(factory, path[0], path[1]);\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, amountIn, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n TransferHelper.safeTransferFrom(path[0], msg.sender, pairAddress, amounts[0]);\n _swap(amounts, path, to);\n emit SwapTokensForTokens(msg.sender, path, amounts);\n } else {\n TransferHelper.safeTransferFrom(path[0], msg.sender, pairAddress, amountIn);\n _swapSupportingFeeOnTransferTokens(path, to);\n emit SwapTokensForTokensAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap exact BNB for token\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n address wBNBAddress = WBNB;\n if (path[0] != wBNBAddress) {\n revert WrongAddress(wBNBAddress, path[0]);\n }\n IWBNB(wBNBAddress).deposit{ value: msg.value }();\n TransferHelper.safeTransfer(wBNBAddress, PancakeLibrary.pairFor(factory, path[0], path[1]), msg.value);\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, msg.value, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n _swap(amounts, path, to);\n emit SwapBnbForTokens(msg.sender, path, amounts);\n } else {\n _swapSupportingFeeOnTransferTokens(path, to);\n emit SwapBnbForTokensAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap token A for BNB\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of BNB to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n if (path[path.length - 1] != WBNB) {\n revert WrongAddress(WBNB, path[path.length - 1]);\n }\n uint256 WBNBAmount;\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, amountIn, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, address(this));\n WBNBAmount = amounts[amounts.length - 1];\n } else {\n uint256 balanceBefore = IWBNB(WBNB).balanceOf(address(this));\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amountIn\n );\n _swapSupportingFeeOnTransferTokens(path, address(this));\n uint256 balanceAfter = IWBNB(WBNB).balanceOf(address(this));\n WBNBAmount = balanceAfter - balanceBefore;\n }\n IWBNB(WBNB).withdraw(WBNBAmount);\n if (to != address(this)) {\n TransferHelper.safeTransferBNB(to, WBNBAmount);\n }\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n emit SwapTokensForBnb(msg.sender, path, amounts);\n } else {\n emit SwapTokensForBnbAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap token A for exact amount of token B\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > amountInMax) {\n revert InputAmountAboveMaximum(amounts[0], amountInMax);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, to);\n emit SwapTokensForTokens(msg.sender, path, amounts);\n }\n\n /**\n * @notice Swap BNB for exact amount of token B\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n if (path[0] != WBNB) {\n revert WrongAddress(WBNB, path[0]);\n }\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > msg.value) {\n revert ExcessiveInputAmount(amounts[0], msg.value);\n }\n IWBNB(WBNB).deposit{ value: amounts[0] }();\n TransferHelper.safeTransfer(WBNB, PancakeLibrary.pairFor(factory, path[0], path[1]), amounts[0]);\n _swap(amounts, path, to);\n // refund dust BNB, if any\n if (msg.value > amounts[0]) TransferHelper.safeTransferBNB(msg.sender, msg.value - amounts[0]);\n emit SwapBnbForTokens(msg.sender, path, amounts);\n }\n\n /**\n * @notice Swap token A for exact BNB\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n if (path[path.length - 1] != WBNB) {\n revert WrongAddress(WBNB, path[path.length - 1]);\n }\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > amountInMax) {\n revert InputAmountAboveMaximum(amounts[amounts.length - 1], amountInMax);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, address(this));\n IWBNB(WBNB).withdraw(amounts[amounts.length - 1]);\n if (to != address(this)) {\n TransferHelper.safeTransferBNB(to, amounts[amounts.length - 1]);\n }\n emit SwapTokensForBnb(msg.sender, path, amounts);\n }\n\n // **** LIBRARY FUNCTIONS ****\n\n /**\n * @notice Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n * @param amountA The amount of token A\n * @param reserveA The amount of reserves for token A before swap\n * @param reserveB The amount of reserves for token B before swap\n * @return amountB An equivalent amount of the token B\n **/\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure virtual override returns (uint256 amountB) {\n return PancakeLibrary.quote(amountA, reserveA, reserveB);\n }\n\n /**\n * @notice Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n * @param amountIn The amount of token A need to swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountOut The maximum output amount of the token B\n **/\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure virtual override returns (uint256 amountOut) {\n return PancakeLibrary.getAmountOut(amountIn, reserveIn, reserveOut);\n }\n\n /**\n * @notice Given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n * @param amountOut The amount of token B after swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountIn Required input amount of the token A\n **/\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure virtual override returns (uint256 amountIn) {\n return PancakeLibrary.getAmountIn(amountOut, reserveIn, reserveOut);\n }\n\n /**\n * @notice performs chained getAmountOut calculations on any number of pairs.\n * @param amountIn The amount of tokens to swap.\n * @param path Array with addresses of the underlying assets to be swapped.\n */\n function getAmountsOut(\n uint256 amountIn,\n address[] memory path\n ) external view virtual override returns (uint256[] memory amounts) {\n return PancakeLibrary.getAmountsOut(factory, amountIn, path);\n }\n\n /**\n * @notice performs chained getAmountIn calculations on any number of pairs.\n * @param amountOut amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped.\n */\n function getAmountsIn(\n uint256 amountOut,\n address[] memory path\n ) external view virtual override returns (uint256[] memory amounts) {\n return PancakeLibrary.getAmountsIn(factory, amountOut, path);\n }\n}\n" + }, + "contracts/Swap/SwapRouter.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"./interfaces/IPancakeSwapV2Router.sol\";\nimport \"./interfaces/IVtoken.sol\";\nimport \"./RouterHelper.sol\";\nimport \"./interfaces/IVBNB.sol\";\nimport \"./interfaces/IVtoken.sol\";\nimport \"./interfaces/InterfaceComptroller.sol\";\n\n/**\n * @title Venus's Pancake Swap Integration Contract\n * @notice This contracts allows users to swap a token for another one and supply/repay with the latter.\n * @dev For all functions that do not swap native BNB, user must approve this contract with the amount, prior the calling the swap function.\n * @author 0xlucian\n */\n\ncontract SwapRouter is Ownable2Step, RouterHelper, IPancakeSwapV2Router {\n using SafeERC20 for IERC20;\n\n address public immutable comptrollerAddress;\n\n uint256 private constant _NOT_ENTERED = 1;\n\n uint256 private constant _ENTERED = 2;\n\n address public vBNBAddress;\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n uint256 internal _status;\n\n // ***************\n // ** MODIFIERS **\n // ***************\n modifier ensure(uint256 deadline) {\n if (deadline < block.timestamp) {\n revert SwapDeadlineExpire(deadline, block.timestamp);\n }\n _;\n }\n\n modifier ensurePath(address[] calldata path) {\n if (path.length < 2) {\n revert InvalidPath();\n }\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n if (_status == _ENTERED) {\n revert ReentrantCheck();\n }\n _status = _ENTERED;\n _;\n _status = _NOT_ENTERED;\n }\n\n /// @notice event emitted on sweep token success\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n\n /// @notice event emitted on vBNBAddress update\n event VBNBAddressUpdated(address indexed oldAddress, address indexed newAddress);\n\n // *********************\n // **** CONSTRUCTOR ****\n // *********************\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address WBNB_,\n address factory_,\n address _comptrollerAddress,\n address _vBNBAddress\n ) RouterHelper(WBNB_, factory_) {\n if (_comptrollerAddress == address(0) || _vBNBAddress == address(0)) {\n revert ZeroAddress();\n }\n comptrollerAddress = _comptrollerAddress;\n _status = _NOT_ENTERED;\n vBNBAddress = _vBNBAddress;\n }\n\n receive() external payable {\n assert(msg.sender == WBNB); // only accept BNB via fallback from the WBNB contract\n }\n\n // ****************************\n // **** EXTERNAL FUNCTIONS ****\n // ****************************\n\n /**\n * @notice Setter for the vBNB address.\n * @param _vBNBAddress Address of the BNB vToken to update.\n */\n function setVBNBAddress(address _vBNBAddress) external onlyOwner {\n if (_vBNBAddress == address(0)) {\n revert ZeroAddress();\n }\n\n _isVTokenListed(_vBNBAddress);\n\n address oldAddress = vBNBAddress;\n vBNBAddress = _vBNBAddress;\n\n emit VBNBAddressUpdated(oldAddress, vBNBAddress);\n }\n\n /**\n * @notice Swap token A for token B and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n */\n function swapExactTokensForTokensAndSupply(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap deflationary (a small amount of fee is deducted at the time of transfer of token) token A for token B and supply to a Venus market.\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n */\n function swapExactTokensForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another token and supply to a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactBNBForTokensAndSupply(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another deflationary token (a small amount of fee is deducted at the time of transfer of token) and supply to a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactBNBForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact tokens and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap Exact tokens for BNB and supply to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndSupply(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap Exact deflationary tokens (a small amount of fee is deducted at the time of transfer of tokens) for BNB and supply to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndSupplyAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and supply to a Venus market\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactBNBAndSupply(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap token A for token B and repay a borrow from a Venus market\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive (and repay)\n */\n function swapExactTokensForTokensAndRepay(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap deflationary token (a small amount of fee is deducted at the time of transfer of token) token A for token B and repay a borrow from a Venus market\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive (and repay)\n */\n function swapExactTokensForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another token and repay a borrow from a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered so the swap path tokens are listed first and last asset is the token we receive\n */\n function swapExactBNBForTokensAndRepay(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another deflationary token (a small amount of fee is deducted at the time of transfer of token) and repay a borrow from a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered so the swap path tokens are listed first and last asset is the token we receive\n */\n function swapExactBNBForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for full tokens debt and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForFullTokenDebtAndRepay(\n address vTokenAddress,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n uint256 amountOut = IVToken(vTokenAddress).borrowBalanceCurrent(msg.sender);\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForFullTokenDebtAndRepay(\n address vTokenAddress,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n uint256 amountOut = IVToken(vTokenAddress).borrowBalanceCurrent(msg.sender);\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap Exact tokens for BNB and repay to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndRepay(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap Exact deflationary tokens (a small amount of fee is deducted at the time of transfer of tokens) for BNB and repay to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndRepayAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and repay to a Venus market\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactBNBAndRepay(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and repay to a Venus market\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForFullBNBDebtAndRepay(\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n uint256 amountOut = IVToken(vBNBAddress).borrowBalanceCurrent(msg.sender);\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output tokens as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapExactTokensForTokens(amountIn, amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output tokens as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForTokensAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(to);\n _swapExactTokensForTokens(amountIn, amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, to);\n }\n\n /**\n * @notice Swaps an exact amount of BNB for as many output tokens as possible,\n * along the route determined by the path. The first element of path must be WBNB,\n * the last is the output token, and any intermediate elements represent\n * intermediate pairs to trade through (if, for example, a direct pair does not exist).\n * @dev amountIn is passed through the msg.value of the transaction\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n )\n external\n payable\n virtual\n override\n nonReentrant\n ensure(deadline)\n ensurePath(path)\n returns (uint256[] memory amounts)\n {\n amounts = _swapExactBNBForTokens(amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of ETH for as many output tokens as possible,\n * along the route determined by the path. The first element of path must be WBNB,\n * the last is the output token, and any intermediate elements represent\n * intermediate pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev amountIn is passed through the msg.value of the transaction\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactBNBForTokensAtSupportingFee(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(to);\n _swapExactBNBForTokens(amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, to);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output ETH as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapExactTokensForBNB(amountIn, amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output ETH as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForBNBAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n uint256 balanceBefore = to.balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = to.balance;\n swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n }\n\n /**\n * @notice Swaps an as many amount of input tokens for as exact amount of tokens as output,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapTokensForExactTokens(amountOut, amountInMax, path, to);\n }\n\n /**\n * @notice Swaps an as ETH as input tokens for as exact amount of tokens as output,\n * along the route determined by the path. The first element of path is the input WBNB,\n * the last is the output as token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n )\n external\n payable\n virtual\n override\n nonReentrant\n ensure(deadline)\n ensurePath(path)\n returns (uint256[] memory amounts)\n {\n amounts = _swapBNBForExactTokens(amountOut, path, to);\n }\n\n /**\n * @notice Swaps an as many amount of input tokens for as exact amount of ETH as output,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output as ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapTokensForExactBNB(amountOut, amountInMax, path, to);\n }\n\n /**\n * @notice A public function to sweep accidental BEP-20 transfers to this contract. Tokens are sent to the address `to`, provided in input\n * @param token The address of the ERC-20 token to sweep\n * @param to Recipient of the output tokens.\n * @param sweepAmount The ampunt of the tokens to sweep\n * @custom:access Only Governance\n */\n function sweepToken(IERC20 token, address to, uint256 sweepAmount) external onlyOwner nonReentrant {\n if (to == address(0)) {\n revert ZeroAddress();\n }\n uint256 balance = token.balanceOf(address(this));\n if (sweepAmount > balance) {\n revert InsufficientBalance(sweepAmount, balance);\n }\n token.safeTransfer(to, sweepAmount);\n\n emit SweepToken(address(token), to, sweepAmount);\n }\n\n /**\n * @notice Supply token to a Venus market\n * @param path The addresses of the underlying token\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param swapAmount The amount of tokens supply to Venus Market.\n */\n function _supply(address path, address vTokenAddress, uint256 swapAmount) internal {\n TransferHelper.safeApprove(path, vTokenAddress, 0);\n TransferHelper.safeApprove(path, vTokenAddress, swapAmount);\n uint256 response = IVToken(vTokenAddress).mintBehalf(msg.sender, swapAmount);\n if (response != 0) {\n revert SupplyError(msg.sender, vTokenAddress, response);\n }\n }\n\n /**\n * @notice Repay a borrow from Venus market\n * @param path The addresses of the underlying token\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param swapAmount The amount of tokens repay to Venus Market.\n */\n function _repay(address path, address vTokenAddress, uint256 swapAmount) internal {\n TransferHelper.safeApprove(path, vTokenAddress, 0);\n TransferHelper.safeApprove(path, vTokenAddress, swapAmount);\n uint256 response = IVToken(vTokenAddress).repayBorrowBehalf(msg.sender, swapAmount);\n if (response != 0) {\n revert RepayError(msg.sender, vTokenAddress, response);\n }\n }\n\n /**\n * @notice Check if the balance of to minus the balanceBefore is greater or equal to the amountOutMin.\n * @param asset The address of the underlying token\n * @param balanceBefore Balance before the swap.\n * @param amountOutMin Min amount out threshold.\n * @param to Recipient of the output tokens.\n */\n function _checkForAmountOut(\n address asset,\n uint256 balanceBefore,\n uint256 amountOutMin,\n address to\n ) internal view returns (uint256 swapAmount) {\n uint256 balanceAfter = IERC20(asset).balanceOf(to);\n swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n }\n\n /**\n * @notice Returns the difference between the balance of this and the balanceBefore\n * @param asset The address of the underlying token\n * @param balanceBefore Balance before the swap.\n */\n function _getSwapAmount(address asset, uint256 balanceBefore) internal view returns (uint256 swapAmount) {\n uint256 balanceAfter = IERC20(asset).balanceOf(address(this));\n swapAmount = balanceAfter - balanceBefore;\n }\n\n /**\n * @notice Check isVTokenListed and last address in the path should be vToken underlying.\n * @param vTokenAddress Address of the vToken.\n * @param underlying Address of the underlying asset.\n */\n function _ensureVTokenChecks(address vTokenAddress, address underlying) internal {\n _isVTokenListed(vTokenAddress);\n if (IVToken(vTokenAddress).underlying() != underlying) {\n revert VTokenUnderlyingInvalid(underlying);\n }\n }\n\n /**\n * @notice Check is vToken listed in the pool.\n * @param vToken Address of the vToken.\n */\n function _isVTokenListed(address vToken) internal view {\n bool isListed = InterfaceComptroller(comptrollerAddress).markets(vToken);\n if (!isListed) {\n revert VTokenNotListed(vToken);\n }\n }\n\n /**\n * @notice Mint vBNB tokens to the market then transfer them to user\n * @param swapAmount Swapped BNB amount\n */\n function _mintVBNBandTransfer(uint256 swapAmount) internal {\n uint256 vBNBBalanceBefore = IVBNB(vBNBAddress).balanceOf(address(this));\n IVBNB(vBNBAddress).mint{ value: swapAmount }();\n uint256 vBNBBalanceAfter = IVBNB(vBNBAddress).balanceOf(address(this));\n IERC20(vBNBAddress).safeTransfer(msg.sender, (vBNBBalanceAfter - vBNBBalanceBefore));\n }\n}\n" + }, + "contracts/test/AccessControlManagerMock.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\ncontract AccessControlManagerMock {\n address public owner;\n\n constructor(address _owner) {\n owner = _owner;\n }\n\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\n if (account == owner) {\n return true;\n }\n\n functionSig;\n\n return false;\n }\n}\n" + }, + "contracts/test/LiquidatorHarness.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Liquidator/Liquidator.sol\";\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\n\ncontract LiquidatorHarness is Liquidator {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address payable vBnb_, address wBnb_) Liquidator(comptroller_, vBnb_, wBnb_) {}\n\n function initialize(\n uint256 liquidationIncentiveMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) external override initializer {\n __Liquidator_init(liquidationIncentiveMantissa_, accessControlManager_, protocolShareReserve_);\n }\n\n event DistributeLiquidationIncentive(uint256 seizeTokensForTreasury, uint256 seizeTokensForLiquidator);\n\n /// @dev Splits the received vTokens between the liquidator and treasury.\n function distributeLiquidationIncentive(\n IVToken vTokenCollateral,\n uint256 siezedAmount\n ) public returns (uint256 ours, uint256 theirs) {\n (ours, theirs) = super._distributeLiquidationIncentive(vTokenCollateral, siezedAmount);\n emit DistributeLiquidationIncentive(ours, theirs);\n return (ours, theirs);\n }\n\n /// @dev Computes the amounts that would go to treasury and to the liquidator.\n function splitLiquidationIncentive(uint256 seizedAmount) public view returns (uint256 ours, uint256 theirs) {\n return super._splitLiquidationIncentive(seizedAmount);\n }\n}\n" + }, + "contracts/test/MockProtocolShareReserve.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\ninterface IIncomeDestination {\n function updateAssetsState(address comptroller, address asset) external;\n}\n\ninterface IVToken {\n function underlying() external view returns (address);\n}\n\ninterface IPrime is IIncomeDestination {\n function accrueInterest(address vToken) external;\n\n function vTokenForAsset(address asset) external view returns (address);\n\n function getAllMarkets() external view returns (address[] memory);\n}\n\ninterface IPoolRegistry {\n /// @notice Get VToken in the Pool for an Asset\n function getVTokenForAsset(address comptroller, address asset) external view returns (address);\n\n /// @notice Get the addresss of the Pools supported that include a market for the provided asset\n function getPoolsSupportedByAsset(address asset) external view returns (address[] memory);\n}\n\ninterface IMockProtocolShareReserve {\n /// @notice it represents the type of vToken income\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ninterface IComptroller {\n function isComptroller() external view returns (bool);\n\n function markets(address) external view returns (bool);\n\n function getAllMarkets() external view returns (address[] memory);\n}\n\nerror InvalidAddress();\nerror UnsupportedAsset();\nerror InvalidTotalPercentage();\nerror InvalidMaxLoopsLimit();\n\n/**\n * @title MaxLoopsLimitHelper\n * @author Venus\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\n */\nabstract contract MaxLoopsLimitHelper {\n // Limit for the loops to avoid the DOS\n uint256 public maxLoopsLimit;\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 max loops limit is set\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\n\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param limit Limit for the max loops can execute at a time\n */\n function _setMaxLoopsLimit(uint256 limit) internal {\n require(limit > maxLoopsLimit, \"Comptroller: Invalid maxLoopsLimit\");\n\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\n maxLoopsLimit = limit;\n\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\n }\n\n /**\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\n * @param len Length of the loops iterate\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\n */\n function _ensureMaxLoops(uint256 len) internal view {\n if (len > maxLoopsLimit) {\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\n }\n }\n}\n\ncontract MockProtocolShareReserve is\n AccessControlledV8,\n ReentrancyGuardUpgradeable,\n MaxLoopsLimitHelper,\n IMockProtocolShareReserve\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice protocol income is categorized into two schemas.\n /// The first schema is the default one\n /// The second schema is for spread income from prime markets in core protocol\n enum Schema {\n DEFAULT,\n SPREAD_PRIME_CORE\n }\n\n struct DistributionConfig {\n Schema schema;\n /// @dev percenatge is represented without any scale\n uint256 percentage;\n address destination;\n }\n\n /// @notice address of core pool comptroller contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable CORE_POOL_COMPTROLLER;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WBNB;\n\n /// @notice address of vBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable vBNB;\n\n /// @notice address of Prime contract\n address public prime;\n\n /// @notice address of pool registry contract\n address public poolRegistry;\n\n uint256 private constant MAX_PERCENT = 100;\n\n /// @notice comptroller => asset => schema => balance\n mapping(address => mapping(address => mapping(Schema => uint256))) public assetsReserves;\n\n /// @notice asset => balance\n mapping(address => uint256) public totalAssetReserve;\n\n /// @notice configuration for different income distribution targets\n DistributionConfig[] public distributionTargets;\n\n /// @notice Emitted when pool registry address is updated\n event PoolRegistryUpdated(address indexed oldPoolRegistry, address indexed newPoolRegistry);\n\n /// @notice Emitted when prime address is updated\n event PrimeUpdated(address indexed oldPrime, address indexed newPrime);\n\n /// @notice Event emitted after the updation of the assets reserves.\n event AssetsReservesUpdated(\n address indexed comptroller,\n address indexed asset,\n uint256 amount,\n IncomeType incomeType,\n Schema schema\n );\n\n /// @notice Event emitted when an asset is released to a target\n event AssetReleased(\n address indexed destination,\n address indexed asset,\n Schema schema,\n uint256 percent,\n uint256 amount\n );\n\n /// @notice Event emitted when asset reserves state is updated\n event ReservesUpdated(\n address indexed comptroller,\n address indexed asset,\n Schema schema,\n uint256 oldBalance,\n uint256 newBalance\n );\n\n /// @notice Event emitted when distribution configuration is updated\n event DistributionConfigUpdated(\n address indexed destination,\n uint256 oldPercentage,\n uint256 newPercentage,\n Schema schema\n );\n\n /// @notice Event emitted when distribution configuration is added\n event DistributionConfigAdded(address indexed destination, uint256 percentage, Schema schema);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address _corePoolComptroller, address _wbnb, address _vbnb) {\n if (_corePoolComptroller == address(0)) revert InvalidAddress();\n if (_wbnb == address(0)) revert InvalidAddress();\n if (_vbnb == address(0)) revert InvalidAddress();\n\n CORE_POOL_COMPTROLLER = _corePoolComptroller;\n WBNB = _wbnb;\n vBNB = _vbnb;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the deployer to owner.\n * @param _accessControlManager The address of ACM contract\n * @param _loopsLimit Limit for the loops in the contract to avoid DOS\n */\n function initialize(address _accessControlManager, uint256 _loopsLimit) external initializer {\n __AccessControlled_init(_accessControlManager);\n __ReentrancyGuard_init();\n _setMaxLoopsLimit(_loopsLimit);\n }\n\n /**\n * @dev Pool registry setter.\n * @param _poolRegistry Address of the pool registry\n * @custom:error ZeroAddressNotAllowed is thrown when pool registry address is zero\n */\n function setPoolRegistry(address _poolRegistry) external onlyOwner {\n if (_poolRegistry == address(0)) revert InvalidAddress();\n emit PoolRegistryUpdated(poolRegistry, _poolRegistry);\n poolRegistry = _poolRegistry;\n }\n\n /**\n * @dev Prime contract address setter.\n * @param _prime Address of the prime contract\n */\n function setPrime(address _prime) external onlyOwner {\n if (_prime == address(0)) revert InvalidAddress();\n emit PrimeUpdated(prime, _prime);\n prime = _prime;\n }\n\n /**\n * @dev Add or update destination targets based on destination address\n * @param configs configurations of the destinations.\n */\n function addOrUpdateDistributionConfigs(DistributionConfig[] memory configs) external nonReentrant {\n _checkAccessAllowed(\"addOrUpdateDistributionConfigs(DistributionConfig[])\");\n\n //we need to accrue and release funds to prime before updating the distribution configuration\n //because prime relies on getUnreleasedFunds and its return value may change after config update\n _accrueAndReleaseFundsToPrime();\n for (uint256 i = 0; i < configs.length; ) {\n DistributionConfig memory _config = configs[i];\n require(_config.destination != address(0), \"ProtocolShareReserve: Destination address invalid\");\n\n bool updated = false;\n for (uint256 j = 0; j < distributionTargets.length; ) {\n DistributionConfig storage config = distributionTargets[j];\n\n if (_config.schema == config.schema && config.destination == _config.destination) {\n emit DistributionConfigUpdated(\n _config.destination,\n config.percentage,\n _config.percentage,\n _config.schema\n );\n config.percentage = _config.percentage;\n updated = true;\n break;\n }\n\n unchecked {\n ++j;\n }\n }\n\n if (!updated) {\n distributionTargets.push(_config);\n emit DistributionConfigAdded(_config.destination, _config.percentage, _config.schema);\n }\n\n unchecked {\n ++i;\n }\n }\n\n _ensurePercentages();\n _ensureMaxLoops(distributionTargets.length);\n }\n\n /**\n * @dev Release funds\n * @param comptroller the comptroller address of the pool\n * @param assets assets to be released to distribution targets\n */\n function releaseFunds(address comptroller, address[] memory assets) external nonReentrant {\n _accruePrimeInterest();\n\n for (uint256 i = 0; i < assets.length; ) {\n _releaseFund(comptroller, assets[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Used to find out the amount of funds that's going to be released when release funds is called.\n * @param comptroller the comptroller address of the pool\n * @param schema the schema of the distribution target\n * @param destination the destination address of the distribution target\n * @param asset the asset address which will be released\n */\n function getUnreleasedFunds(\n address comptroller,\n Schema schema,\n address destination,\n address asset\n ) external view returns (uint256) {\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig storage _config = distributionTargets[i];\n if (_config.schema == schema && _config.destination == destination) {\n uint256 total = assetsReserves[comptroller][asset][schema];\n return (total * _config.percentage) / MAX_PERCENT;\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Returns the total number of distribution targets\n */\n function totalDistributions() external view returns (uint256) {\n return distributionTargets.length;\n }\n\n /**\n * @dev Update the reserve of the asset for the specific pool after transferring to the protocol share reserve.\n * @param comptroller Comptroller address (pool)\n * @param asset Asset address.\n * @param incomeType type of income\n */\n function updateAssetsState(\n address comptroller,\n address asset,\n IncomeType incomeType\n ) public override(IMockProtocolShareReserve) nonReentrant {\n if (!IComptroller(comptroller).isComptroller()) revert InvalidAddress();\n if (asset == address(0)) revert InvalidAddress();\n if (\n comptroller != CORE_POOL_COMPTROLLER &&\n IPoolRegistry(poolRegistry).getVTokenForAsset(comptroller, asset) == address(0)\n ) revert InvalidAddress();\n\n Schema schema = getSchema(comptroller, asset, incomeType);\n uint256 currentBalance = IERC20Upgradeable(asset).balanceOf(address(this));\n uint256 assetReserve = totalAssetReserve[asset];\n\n if (currentBalance > assetReserve) {\n uint256 balanceDifference;\n unchecked {\n balanceDifference = currentBalance - assetReserve;\n }\n\n assetsReserves[comptroller][asset][schema] += balanceDifference;\n totalAssetReserve[asset] += balanceDifference;\n emit AssetsReservesUpdated(comptroller, asset, balanceDifference, incomeType, schema);\n }\n }\n\n /**\n * @dev Fetches the list of prime markets and then accrues interest and\n * releases the funds to prime for each market\n */\n function _accrueAndReleaseFundsToPrime() internal {\n address[] memory markets = IPrime(prime).getAllMarkets();\n for (uint256 i = 0; i < markets.length; ) {\n address market = markets[i];\n IPrime(prime).accrueInterest(market);\n _releaseFund(CORE_POOL_COMPTROLLER, _getUnderlying(market));\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Fetches the list of prime markets and then accrues interest\n * to prime for each market\n */\n function _accruePrimeInterest() internal {\n // address[] memory markets = IPrime(prime).getAllMarkets();\n address[] memory markets = IPrime(prime).getAllMarkets();\n\n for (uint256 i = 0; i < markets.length; ) {\n address market = markets[i];\n IPrime(prime).accrueInterest(market);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev asset from a particular pool to be release to distribution targets\n * @param comptroller Comptroller address(pool)\n * @param asset Asset address.\n */\n function _releaseFund(address comptroller, address asset) internal {\n uint256 totalSchemas = uint256(type(Schema).max) + 1;\n uint256[] memory schemaBalances = new uint256[](totalSchemas);\n uint256 totalBalance;\n for (uint256 schemaValue; schemaValue < totalSchemas; ) {\n schemaBalances[schemaValue] = assetsReserves[comptroller][asset][Schema(schemaValue)];\n totalBalance += schemaBalances[schemaValue];\n\n unchecked {\n ++schemaValue;\n }\n }\n\n if (totalBalance == 0) {\n return;\n }\n\n uint256[] memory totalTransferAmounts = new uint256[](totalSchemas);\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig memory _config = distributionTargets[i];\n\n uint256 transferAmount = (schemaBalances[uint256(_config.schema)] * _config.percentage) / MAX_PERCENT;\n totalTransferAmounts[uint256(_config.schema)] += transferAmount;\n\n IERC20Upgradeable(asset).safeTransfer(_config.destination, transferAmount);\n IIncomeDestination(_config.destination).updateAssetsState(comptroller, asset);\n\n emit AssetReleased(_config.destination, asset, _config.schema, _config.percentage, transferAmount);\n\n unchecked {\n ++i;\n }\n }\n\n uint256[] memory newSchemaBalances = new uint256[](totalSchemas);\n for (uint256 schemaValue = 0; schemaValue < totalSchemas; ) {\n newSchemaBalances[schemaValue] = schemaBalances[schemaValue] - totalTransferAmounts[schemaValue];\n assetsReserves[comptroller][asset][Schema(schemaValue)] = newSchemaBalances[schemaValue];\n totalAssetReserve[asset] = totalAssetReserve[asset] - totalTransferAmounts[schemaValue];\n\n emit ReservesUpdated(\n comptroller,\n asset,\n Schema(schemaValue),\n schemaBalances[schemaValue],\n newSchemaBalances[schemaValue]\n );\n\n unchecked {\n ++schemaValue;\n }\n }\n }\n\n /**\n * @dev Returns the schema based on comptroller, asset and income type\n * @param comptroller Comptroller address(pool)\n * @param asset Asset address.\n * @param incomeType type of income\n * @return schema schema for distribution\n */\n function getSchema(\n address comptroller,\n address asset,\n IncomeType incomeType\n ) internal view returns (Schema schema) {\n schema = Schema.DEFAULT;\n address vToken = IPrime(prime).vTokenForAsset(asset);\n if (vToken != address(0) && comptroller == CORE_POOL_COMPTROLLER && incomeType == IncomeType.SPREAD) {\n schema = Schema.SPREAD_PRIME_CORE;\n }\n }\n\n function _ensurePercentages() internal view {\n uint256 totalSchemas = uint256(type(Schema).max) + 1;\n uint256[] memory totalPercentages = new uint256[](totalSchemas);\n\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig memory config = distributionTargets[i];\n totalPercentages[uint256(config.schema)] += config.percentage;\n\n unchecked {\n ++i;\n }\n }\n for (uint256 schemaValue = 0; schemaValue < totalSchemas; ) {\n if (totalPercentages[schemaValue] != MAX_PERCENT && totalPercentages[schemaValue] != 0)\n revert InvalidTotalPercentage();\n\n unchecked {\n ++schemaValue;\n }\n }\n }\n\n /**\n * @dev Returns the underlying asset address for the vToken\n * @param vToken vToken address\n * @return asset address of asset\n */\n function _getUnderlying(address vToken) internal view returns (address) {\n if (vToken == vBNB) {\n return WBNB;\n } else {\n return IVToken(vToken).underlying();\n }\n }\n}\n" + }, + "contracts/test/MockToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "contracts/test/PrimeScenario.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Tokens/Prime/Prime.sol\";\n\ncontract PrimeScenario is Prime {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address _wbnb,\n address _vbnb,\n uint256 _blocksPerYear,\n uint256 _stakingPeriod,\n uint256 _minimumStakedXVS,\n uint256 _maximumXVSCap,\n bool _timeBased\n ) Prime(_wbnb, _vbnb, _blocksPerYear, _stakingPeriod, _minimumStakedXVS, _maximumXVSCap, _timeBased) {}\n\n function calculateScore(uint256 xvs, uint256 capital) external view returns (uint256) {\n return Scores._calculateScore(xvs, capital, alphaNumerator, alphaDenominator);\n }\n\n function setPLP(address plp) external {\n primeLiquidityProvider = plp;\n }\n\n function mintForUser(address user) external {\n tokens[user] = Token(true, true);\n }\n\n function burnForUser(address user) external {\n tokens[user] = Token(false, false);\n }\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/InterfaceComptroller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface InterfaceComptroller {\n function markets(address) external view returns (bool);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPoolRegistry.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title PoolRegistryInterface\n * @author Venus\n * @notice Interface implemented by `PoolRegistry`.\n */\ninterface PoolRegistryInterface {\n /**\n * @notice Struct for a Venus interest rate pool.\n */\n struct VenusPool {\n string name;\n address creator;\n address comptroller;\n uint256 blockPosted;\n uint256 timestampPosted;\n }\n\n /// @notice Get a pool by comptroller address\n function getPoolByComptroller(address comptroller) external view returns (VenusPool memory);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { PrimeStorageV1 } from \"../PrimeStorage.sol\";\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n struct APRInfo {\n // supply APR of the user in BPS\n uint256 supplyAPR;\n // borrow APR of the user in BPS\n uint256 borrowAPR;\n // total score of the market\n uint256 totalScore;\n // score of the user\n uint256 userScore;\n // capped XVS balance of the user\n uint256 xvsBalanceForScore;\n // capital of the user\n uint256 capital;\n // capped supply of the user\n uint256 cappedSupply;\n // capped borrow of the user\n uint256 cappedBorrow;\n // capped supply of user in USD\n uint256 supplyCapUSD;\n // capped borrow of user in USD\n uint256 borrowCapUSD;\n }\n\n struct Capital {\n // capital of the user\n uint256 capital;\n // capped supply of the user\n uint256 cappedSupply;\n // capped borrow of the user\n uint256 cappedBorrow;\n // capped supply of user in USD\n uint256 supplyCapUSD;\n // capped borrow of user in USD\n uint256 borrowCapUSD;\n }\n\n /**\n * @notice Returns boosted pending interest accrued for a user for all markets\n * @param user the account for which to get the accrued interests\n * @return pendingRewards the number of underlying tokens accrued by the user for all markets\n */\n function getPendingRewards(address user) external returns (PrimeStorageV1.PendingReward[] memory pendingRewards);\n\n /**\n * @notice Update total score of multiple users and market\n * @param users accounts for which we need to update score\n */\n function updateScores(address[] memory users) external;\n\n /**\n * @notice Update value of alpha\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n */\n function updateAlpha(uint128 _alphaNumerator, uint128 _alphaDenominator) external;\n\n /**\n * @notice Update multipliers for a market\n * @param market address of the market vToken\n * @param supplyMultiplier new supply multiplier for the market, scaled by 1e18\n * @param borrowMultiplier new borrow multiplier for the market, scaled by 1e18\n */\n function updateMultipliers(address market, uint256 supplyMultiplier, uint256 borrowMultiplier) external;\n\n /**\n * @notice Add a market to prime program\n * @param comptroller address of the comptroller\n * @param market address of the market vToken\n * @param supplyMultiplier the multiplier for supply cap. It should be converted to 1e18\n * @param borrowMultiplier the multiplier for borrow cap. It should be converted to 1e18\n */\n function addMarket(\n address comptroller,\n address market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n ) external;\n\n /**\n * @notice Set limits for total tokens that can be minted\n * @param _irrevocableLimit total number of irrevocable tokens that can be minted\n * @param _revocableLimit total number of revocable tokens that can be minted\n */\n function setLimit(uint256 _irrevocableLimit, uint256 _revocableLimit) external;\n\n /**\n * @notice Directly issue prime tokens to users\n * @param isIrrevocable are the tokens being issued\n * @param users list of address to issue tokens to\n */\n function issue(bool isIrrevocable, address[] calldata users) external;\n\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice For claiming prime token when staking period is completed\n */\n function claim() external;\n\n /**\n * @notice For burning any prime token\n * @param user the account address for which the prime token will be burned\n */\n function burn(address user) external;\n\n /**\n * @notice To pause or unpause claiming of interest\n */\n function togglePause() external;\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken) external returns (uint256);\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @param user the user for which to claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken, address user) external returns (uint256);\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns boosted interest accrued for a user\n * @param vToken the market for which to fetch the accrued interest\n * @param user the account for which to get the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function getInterestAccrued(address vToken, address user) external returns (uint256);\n\n /**\n * @notice Retrieves an array of all available markets\n * @return an array of addresses representing all available markets\n */\n function getAllMarkets() external view returns (address[] memory);\n\n /**\n * @notice fetch the numbers of seconds remaining for staking period to complete\n * @param user the account address for which we are checking the remaining time\n * @return timeRemaining the number of seconds the user needs to wait to claim prime token\n */\n function claimTimeRemaining(address user) external view returns (uint256);\n\n /**\n * @notice Returns supply and borrow APR for user for a given market\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function calculateAPR(address market, address user) external view returns (APRInfo memory aprInfo);\n\n /**\n * @notice Returns supply and borrow APR for estimated supply, borrow and XVS staked\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @param borrow hypothetical borrow amount\n * @param supply hypothetical supply amount\n * @param xvsStaked hypothetical staked XVS amount\n * @return aprInfo APR information for the user for the given market\n */\n function estimateAPR(\n address market,\n address user,\n uint256 borrow,\n uint256 supply,\n uint256 xvsStaked\n ) external view returns (APRInfo memory aprInfo);\n\n /**\n * @notice the total income that's going to be distributed in a year to prime token holders\n * @param vToken the market for which to fetch the total income that's going to distributed in a year\n * @return amount the total income\n */\n function incomeDistributionYearly(address vToken) external view returns (uint256 amount);\n\n /**\n * @notice Returns if user is a prime holder\n * @return isPrimeHolder true if user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Number of loops limit\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external;\n\n /**\n * @notice Update staked at timestamp for multiple users\n * @param users accounts for which we need to update staked at timestamp\n * @param timestamps new staked at timestamp for the users\n */\n function setStakedAt(address[] calldata users, uint256[] calldata timestamps) external;\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPrimeLiquidityProvider.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\n/**\n * @title IPrimeLiquidityProvider\n * @author Venus\n * @notice Interface for PrimeLiquidityProvider\n */\ninterface IPrimeLiquidityProvider {\n /**\n * @notice Initialize the distribution of the token\n * @param tokens_ Array of addresses of the tokens to be intialized\n */\n function initializeTokens(address[] calldata tokens_) external;\n\n /**\n * @notice Pause fund transfer of tokens to Prime contract\n */\n function pauseFundsTransfer() external;\n\n /**\n * @notice Resume fund transfer of tokens to Prime contract\n */\n function resumeFundsTransfer() external;\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n */\n function setTokensDistributionSpeed(address[] calldata tokens_, uint256[] calldata distributionSpeeds_) external;\n\n /**\n * @notice Set max distribution speed for token (amount of maximum token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param maxDistributionSpeeds_ New distribution speeds for tokens\n */\n function setMaxTokensDistributionSpeed(\n address[] calldata tokens_,\n uint256[] calldata maxDistributionSpeeds_\n ) external;\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external;\n\n /**\n * @notice Claim all the token accrued till last block or second\n * @param token_ The token to release to the Prime contract\n */\n function releaseFunds(address token_) external;\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n */\n function sweepToken(IERC20Upgradeable token_, address to_, uint256 amount_) external;\n\n /**\n * @notice Accrue token by updating the distribution state\n * @param token_ Address of the token\n */\n function accrueTokens(address token_) external;\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Limit for the max loops can execute at a time\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external;\n\n /**\n * @notice Get rewards per block or second for token\n * @param token_ Address of the token\n * @return speed returns the per block or second reward\n */\n function getEffectiveDistributionSpeed(address token_) external view returns (uint256);\n\n /**\n * @notice Get the amount of tokens accrued\n * @param token_ Address of the token\n * @return Amount of tokens that are accrued\n */\n function tokenAmountAccrued(address token_) external view returns (uint256);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IVToken.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IVToken {\n function borrowBalanceStored(address account) external view returns (uint256);\n\n function exchangeRateStored() external view returns (uint256);\n\n function balanceOf(address account) external view returns (uint256);\n\n function underlying() external view returns (address);\n\n function totalBorrows() external view returns (uint256);\n\n function borrowRatePerBlock() external view returns (uint256);\n\n function reserveFactorMantissa() external view returns (uint256);\n\n function decimals() external view returns (uint8);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IXVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IXVSVault {\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals);\n\n function xvsAddress() external view returns (address);\n}\n" + }, + "contracts/Tokens/Prime/libs/FixedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable var-name-mixedcase\n\npragma solidity 0.8.25;\n\nimport { SafeCastUpgradeable } from \"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\";\nimport { FixedMath0x } from \"./FixedMath0x.sol\";\n\nusing SafeCastUpgradeable for uint256;\n\nerror InvalidFixedPoint();\n\n/**\n * @title FixedMath\n * @author Venus\n * @notice FixedMath library is used for complex mathematical operations\n */\nlibrary FixedMath {\n error InvalidFraction(uint256 n, uint256 d);\n\n /**\n * @notice Convert some uint256 fraction `n` numerator / `d` denominator to a fixed-point number `f`.\n * @param n numerator\n * @param d denominator\n * @return fixed-point number\n */\n function _toFixed(uint256 n, uint256 d) internal pure returns (int256) {\n if (d.toInt256() < n.toInt256()) revert InvalidFraction(n, d);\n\n return (n.toInt256() * FixedMath0x.FIXED_1) / int256(d.toInt256());\n }\n\n /**\n * @notice Divide some unsigned int `u` by a fixed point number `f`\n * @param u unsigned dividend\n * @param f fixed point divisor, in FIXED_1 units\n * @return unsigned int quotient\n */\n function _uintDiv(uint256 u, int256 f) internal pure returns (uint256) {\n if (f < 0) revert InvalidFixedPoint();\n // multiply `u` by FIXED_1 to cancel out the built-in FIXED_1 in f\n return uint256((u.toInt256() * FixedMath0x.FIXED_1) / f);\n }\n\n /**\n * @notice Multiply some unsigned int `u` by a fixed point number `f`\n * @param u unsigned multiplicand\n * @param f fixed point multiplier, in FIXED_1 units\n * @return unsigned int product\n */\n function _uintMul(uint256 u, int256 f) internal pure returns (uint256) {\n if (f < 0) revert InvalidFixedPoint();\n // divide the product by FIXED_1 to cancel out the built-in FIXED_1 in f\n return uint256((u.toInt256() * f) / FixedMath0x.FIXED_1);\n }\n\n /// @notice see FixedMath0x\n function _ln(int256 x) internal pure returns (int256) {\n return FixedMath0x._ln(x);\n }\n\n /// @notice see FixedMath0x\n function _exp(int256 x) internal pure returns (int256) {\n return FixedMath0x._exp(x);\n }\n}\n" + }, + "contracts/Tokens/Prime/libs/FixedMath0x.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable max-line-length\n\npragma solidity 0.8.25;\n\n// Below is code from 0x's LibFixedMath.sol. Changes:\n// - addition of 0.8-style errors\n// - removal of unused functions\n// - added comments for clarity\n// https://github.com/0xProject/exchange-v3/blob/aae46bef841bfd1cc31028f41793db4fe7197084/contracts/staking/contracts/src/libs/LibFixedMath.sol\n\n/*\n\n Copyright 2017 Bprotocol Foundation, 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n/// Thrown when the natural log function is given too large of an argument\nerror LnTooLarge(int256 x);\n/// Thrown when the natural log would have returned a number outside of ℝ\nerror LnNonRealResult(int256 x);\n/// Thrown when exp is given too large of an argument\nerror ExpTooLarge(int256 x);\n/// Thrown when an unsigned value is too large to be converted to a signed value\nerror UnsignedValueTooLarge(uint256 x);\n\n/**\n * @title FixedMath0x\n * @notice Signed, fixed-point, 127-bit precision math library\n */\nlibrary FixedMath0x {\n // Base for the fixed point numbers (this is our 1)\n int256 internal constant FIXED_1 = int256(0x0000000000000000000000000000000080000000000000000000000000000000);\n // Maximum ln argument (1)\n int256 private constant LN_MAX_VAL = FIXED_1;\n // Minimum ln argument. Notice this is related to EXP_MIN_VAL (e ^ -63.875)\n int256 private constant LN_MIN_VAL = int256(0x0000000000000000000000000000000000000000000000000000000733048c5a);\n // Maximum exp argument (0)\n int256 private constant EXP_MAX_VAL = 0;\n // Minimum exp argument. Notice this is related to LN_MIN_VAL (-63.875)\n int256 private constant EXP_MIN_VAL = -int256(0x0000000000000000000000000000001ff0000000000000000000000000000000);\n\n /// @dev Get the natural logarithm of a fixed-point number 0 < `x` <= LN_MAX_VAL\n function _ln(int256 x) internal pure returns (int256 r) {\n if (x > LN_MAX_VAL) {\n revert LnTooLarge(x);\n }\n if (x <= 0) {\n revert LnNonRealResult(x);\n }\n if (x == FIXED_1) {\n return 0;\n }\n if (x <= LN_MIN_VAL) {\n return EXP_MIN_VAL;\n }\n\n int256 y;\n int256 z;\n int256 w;\n\n // Rewrite the input as a quotient of negative natural exponents and a single residual q, such that 1 < q < 2\n // For example: log(0.3) = log(e^-1 * e^-0.25 * 1.0471028872385522)\n // = 1 - 0.25 - log(1 + 0.0471028872385522)\n // e ^ -32\n if (x <= int256(0x00000000000000000000000000000000000000000001c8464f76164760000000)) {\n r -= int256(0x0000000000000000000000000000001000000000000000000000000000000000); // - 32\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000000000001c8464f76164760000000); // / e ^ -32\n }\n // e ^ -16\n if (x <= int256(0x00000000000000000000000000000000000000f1aaddd7742e90000000000000)) {\n r -= int256(0x0000000000000000000000000000000800000000000000000000000000000000); // - 16\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000000f1aaddd7742e90000000000000); // / e ^ -16\n }\n // e ^ -8\n if (x <= int256(0x00000000000000000000000000000000000afe10820813d78000000000000000)) {\n r -= int256(0x0000000000000000000000000000000400000000000000000000000000000000); // - 8\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000afe10820813d78000000000000000); // / e ^ -8\n }\n // e ^ -4\n if (x <= int256(0x0000000000000000000000000000000002582ab704279ec00000000000000000)) {\n r -= int256(0x0000000000000000000000000000000200000000000000000000000000000000); // - 4\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000002582ab704279ec00000000000000000); // / e ^ -4\n }\n // e ^ -2\n if (x <= int256(0x000000000000000000000000000000001152aaa3bf81cc000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000100000000000000000000000000000000); // - 2\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000001152aaa3bf81cc000000000000000000); // / e ^ -2\n }\n // e ^ -1\n if (x <= int256(0x000000000000000000000000000000002f16ac6c59de70000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000080000000000000000000000000000000); // - 1\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000002f16ac6c59de70000000000000000000); // / e ^ -1\n }\n // e ^ -0.5\n if (x <= int256(0x000000000000000000000000000000004da2cbf1be5828000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000040000000000000000000000000000000); // - 0.5\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000004da2cbf1be5828000000000000000000); // / e ^ -0.5\n }\n // e ^ -0.25\n if (x <= int256(0x0000000000000000000000000000000063afbe7ab2082c000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000020000000000000000000000000000000); // - 0.25\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000063afbe7ab2082c000000000000000000); // / e ^ -0.25\n }\n // e ^ -0.125\n if (x <= int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d)) {\n r -= int256(0x0000000000000000000000000000000010000000000000000000000000000000); // - 0.125\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d); // / e ^ -0.125\n }\n // `x` is now our residual in the range of 1 <= x <= 2 (or close enough).\n\n // Add the taylor series for log(1 + z), where z = x - 1\n z = y = x - FIXED_1;\n w = (y * y) / FIXED_1;\n r += (z * (0x100000000000000000000000000000000 - y)) / 0x100000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^01 / 01 - y^02 / 02\n r += (z * (0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - y)) / 0x200000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^03 / 03 - y^04 / 04\n r += (z * (0x099999999999999999999999999999999 - y)) / 0x300000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^05 / 05 - y^06 / 06\n r += (z * (0x092492492492492492492492492492492 - y)) / 0x400000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^07 / 07 - y^08 / 08\n r += (z * (0x08e38e38e38e38e38e38e38e38e38e38e - y)) / 0x500000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^09 / 09 - y^10 / 10\n r += (z * (0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b - y)) / 0x600000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^11 / 11 - y^12 / 12\n r += (z * (0x089d89d89d89d89d89d89d89d89d89d89 - y)) / 0x700000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^13 / 13 - y^14 / 14\n r += (z * (0x088888888888888888888888888888888 - y)) / 0x800000000000000000000000000000000; // add y^15 / 15 - y^16 / 16\n }\n\n /// @dev Compute the natural exponent for a fixed-point number EXP_MIN_VAL <= `x` <= 1\n function _exp(int256 x) internal pure returns (int256 r) {\n if (x < EXP_MIN_VAL) {\n // Saturate to zero below EXP_MIN_VAL.\n return 0;\n }\n if (x == 0) {\n return FIXED_1;\n }\n if (x > EXP_MAX_VAL) {\n revert ExpTooLarge(x);\n }\n\n // Rewrite the input as a product of natural exponents and a\n // single residual q, where q is a number of small magnitude.\n // For example: e^-34.419 = e^(-32 - 2 - 0.25 - 0.125 - 0.044)\n // = e^-32 * e^-2 * e^-0.25 * e^-0.125 * e^-0.044\n // -> q = -0.044\n\n // Multiply with the taylor series for e^q\n int256 y;\n int256 z;\n // q = x % 0.125 (the residual)\n z = y = x % 0x0000000000000000000000000000000010000000000000000000000000000000;\n z = (z * y) / FIXED_1;\n r += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\n z = (z * y) / FIXED_1;\n r += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\n z = (z * y) / FIXED_1;\n r += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\n z = (z * y) / FIXED_1;\n r += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\n z = (z * y) / FIXED_1;\n r += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\n z = (z * y) / FIXED_1;\n r += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\n z = (z * y) / FIXED_1;\n r += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\n z = (z * y) / FIXED_1;\n r += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\n z = (z * y) / FIXED_1;\n r += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000000001c638; // add y^16 * (20! / 16!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000000000017c; // add y^18 * (20! / 18!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000000014; // add y^19 * (20! / 19!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000000001; // add y^20 * (20! / 20!)\n r = r / 0x21c3677c82b40000 + y + FIXED_1; // divide by 20! and then add y^1 / 1! + y^0 / 0!\n\n // Multiply with the non-residual terms.\n x = -x;\n // e ^ -32\n if ((x & int256(0x0000000000000000000000000000001000000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000000000f1aaddd7742e56d32fb9f99744)) /\n int256(0x0000000000000000000000000043cbaf42a000812488fc5c220ad7b97bf6e99e); // * e ^ -32\n }\n // e ^ -16\n if ((x & int256(0x0000000000000000000000000000000800000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000000afe10820813d65dfe6a33c07f738f)) /\n int256(0x000000000000000000000000000005d27a9f51c31b7c2f8038212a0574779991); // * e ^ -16\n }\n // e ^ -8\n if ((x & int256(0x0000000000000000000000000000000400000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000002582ab704279e8efd15e0265855c47a)) /\n int256(0x0000000000000000000000000000001b4c902e273a58678d6d3bfdb93db96d02); // * e ^ -8\n }\n // e ^ -4\n if ((x & int256(0x0000000000000000000000000000000200000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000001152aaa3bf81cb9fdb76eae12d029571)) /\n int256(0x00000000000000000000000000000003b1cc971a9bb5b9867477440d6d157750); // * e ^ -4\n }\n // e ^ -2\n if ((x & int256(0x0000000000000000000000000000000100000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000002f16ac6c59de6f8d5d6f63c1482a7c86)) /\n int256(0x000000000000000000000000000000015bf0a8b1457695355fb8ac404e7a79e3); // * e ^ -2\n }\n // e ^ -1\n if ((x & int256(0x0000000000000000000000000000000080000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000004da2cbf1be5827f9eb3ad1aa9866ebb3)) /\n int256(0x00000000000000000000000000000000d3094c70f034de4b96ff7d5b6f99fcd8); // * e ^ -1\n }\n // e ^ -0.5\n if ((x & int256(0x0000000000000000000000000000000040000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000063afbe7ab2082ba1a0ae5e4eb1b479dc)) /\n int256(0x00000000000000000000000000000000a45af1e1f40c333b3de1db4dd55f29a7); // * e ^ -0.5\n }\n // e ^ -0.25\n if ((x & int256(0x0000000000000000000000000000000020000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d)) /\n int256(0x00000000000000000000000000000000910b022db7ae67ce76b441c27035c6a1); // * e ^ -0.25\n }\n // e ^ -0.125\n if ((x & int256(0x0000000000000000000000000000000010000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000783eafef1c0a8f3978c7f81824d62ebf)) /\n int256(0x0000000000000000000000000000000088415abbe9a76bead8d00cf112e4d4a8); // * e ^ -0.125\n }\n }\n}\n" + }, + "contracts/Tokens/Prime/libs/Scores.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { SafeCastUpgradeable } from \"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\";\nimport { FixedMath } from \"./FixedMath.sol\";\n\nusing SafeCastUpgradeable for uint256;\n\n/**\n * @title Scores\n * @author Venus\n * @notice Scores library is used to calculate score of users\n */\nlibrary Scores {\n /**\n * @notice Calculate a membership score given some amount of `xvs` and `capital`, along\n * with some 𝝰 = `alphaNumerator` / `alphaDenominator`.\n * @param xvs amount of xvs (xvs, 1e18 decimal places)\n * @param capital amount of capital (1e18 decimal places)\n * @param alphaNumerator alpha param numerator\n * @param alphaDenominator alpha param denominator\n * @return membership score with 1e18 decimal places\n *\n * @dev 𝝰 must be in the range [0, 1]\n */\n function _calculateScore(\n uint256 xvs,\n uint256 capital,\n uint256 alphaNumerator,\n uint256 alphaDenominator\n ) internal pure returns (uint256) {\n // Score function is:\n // xvs^𝝰 * capital^(1-𝝰)\n // = capital * capital^(-𝝰) * xvs^𝝰\n // = capital * (xvs / capital)^𝝰\n // = capital * (e ^ (ln(xvs / capital))) ^ 𝝰\n // = capital * e ^ (𝝰 * ln(xvs / capital)) (1)\n // or\n // = capital / ( 1 / e ^ (𝝰 * ln(xvs / capital)))\n // = capital / (e ^ (𝝰 * ln(xvs / capital)) ^ -1)\n // = capital / e ^ (𝝰 * -1 * ln(xvs / capital))\n // = capital / e ^ (𝝰 * ln(capital / xvs)) (2)\n //\n // To avoid overflows, use (1) when xvs < capital and\n // use (2) when capital < xvs\n\n // If any side is 0, exit early\n if (xvs == 0 || capital == 0) return 0;\n\n // If both sides are equal, we have:\n // xvs^𝝰 * capital^(1-𝝰)\n // = xvs^𝝰 * xvs^(1-𝝰)\n // = xvs^(𝝰 + 1 - 𝝰) = xvs\n if (xvs == capital) return xvs;\n\n bool lessxvsThanCapital = xvs < capital;\n\n // (xvs / capital) or (capital / xvs), always in range (0, 1)\n int256 ratio = lessxvsThanCapital ? FixedMath._toFixed(xvs, capital) : FixedMath._toFixed(capital, xvs);\n\n // e ^ ( ln(ratio) * 𝝰 )\n int256 exponentiation = FixedMath._exp(\n (FixedMath._ln(ratio) * alphaNumerator.toInt256()) / alphaDenominator.toInt256()\n );\n\n if (lessxvsThanCapital) {\n // capital * e ^ (𝝰 * ln(xvs / capital))\n return FixedMath._uintMul(capital, exponentiation);\n }\n\n // capital / e ^ (𝝰 * ln(capital / xvs))\n return FixedMath._uintDiv(capital, exponentiation);\n }\n}\n" + }, + "contracts/Tokens/Prime/Prime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { PausableUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport { MaxLoopsLimitHelper } from \"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\";\nimport { TimeManagerV8 } from \"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\";\n\nimport { IERC20MetadataUpgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\n\nimport { PrimeStorageV1 } from \"./PrimeStorage.sol\";\nimport { Scores } from \"./libs/Scores.sol\";\n\nimport { IPrimeLiquidityProvider } from \"./Interfaces/IPrimeLiquidityProvider.sol\";\nimport { IPrime } from \"./Interfaces/IPrime.sol\";\nimport { IXVSVault } from \"./Interfaces/IXVSVault.sol\";\nimport { IVToken } from \"./Interfaces/IVToken.sol\";\nimport { InterfaceComptroller } from \"./Interfaces/InterfaceComptroller.sol\";\nimport { PoolRegistryInterface } from \"./Interfaces/IPoolRegistry.sol\";\n\n/**\n * @title Prime\n * @author Venus\n * @notice Prime Token is used to provide extra rewards to the users who have staked a minimum of `MINIMUM_STAKED_XVS` XVS in the XVSVault for `STAKING_PERIOD` days\n * @custom:security-contact https://github.com/VenusProtocol/venus-protocol\n */\ncontract Prime is IPrime, AccessControlledV8, PausableUpgradeable, MaxLoopsLimitHelper, PrimeStorageV1, TimeManagerV8 {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice address of wrapped native token contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WRAPPED_NATIVE_TOKEN;\n\n /// @notice address of native market contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable NATIVE_MARKET;\n\n /// @notice minimum amount of XVS user needs to stake to become a prime member\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable MINIMUM_STAKED_XVS;\n\n /// @notice maximum XVS taken in account when calculating user score\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable MAXIMUM_XVS_CAP;\n\n /// @notice number of days user need to stake to claim prime token\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable STAKING_PERIOD;\n\n /// @notice Emitted when prime token is minted\n event Mint(address indexed user, bool isIrrevocable);\n\n /// @notice Emitted when prime token is burned\n event Burn(address indexed user);\n\n /// @notice Emitted when a market is added to prime program\n event MarketAdded(\n address indexed comptroller,\n address indexed market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n );\n\n /// @notice Emitted when mint limits are updated\n event MintLimitsUpdated(\n uint256 indexed oldIrrevocableLimit,\n uint256 indexed oldRevocableLimit,\n uint256 indexed newIrrevocableLimit,\n uint256 newRevocableLimit\n );\n\n /// @notice Emitted when user score is updated\n event UserScoreUpdated(address indexed user);\n\n /// @notice Emitted when alpha is updated\n event AlphaUpdated(\n uint128 indexed oldNumerator,\n uint128 indexed oldDenominator,\n uint128 indexed newNumerator,\n uint128 newDenominator\n );\n\n /// @notice Emitted when multiplier is updated\n event MultiplierUpdated(\n address indexed market,\n uint256 indexed oldSupplyMultiplier,\n uint256 indexed oldBorrowMultiplier,\n uint256 newSupplyMultiplier,\n uint256 newBorrowMultiplier\n );\n\n /// @notice Emitted when interest is claimed\n event InterestClaimed(address indexed user, address indexed market, uint256 amount);\n\n /// @notice Emitted when revocable token is upgraded to irrevocable token\n event TokenUpgraded(address indexed user);\n\n /// @notice Emitted when stakedAt is updated\n event StakedAtUpdated(address indexed user, uint256 timestamp);\n\n /// @notice Error thrown when market is not supported\n error MarketNotSupported();\n\n /// @notice Error thrown when mint limit is reached\n error InvalidLimit();\n\n /// @notice Error thrown when user is not eligible to claim prime token\n error IneligibleToClaim();\n\n /// @notice Error thrown when user needs to wait more time to claim prime token\n error WaitMoreTime();\n\n /// @notice Error thrown when user has no prime token\n error UserHasNoPrimeToken();\n\n /// @notice Error thrown when no score updates are required\n error NoScoreUpdatesRequired();\n\n /// @notice Error thrown when market already exists\n error MarketAlreadyExists();\n\n /// @notice Error thrown when asset already exists\n error AssetAlreadyExists();\n\n /// @notice Error thrown when invalid address is passed\n error InvalidAddress();\n\n /// @notice Error thrown when invalid alpha arguments are passed\n error InvalidAlphaArguments();\n\n /// @notice Error thrown when invalid vToken is passed\n error InvalidVToken();\n\n /// @notice Error thrown when invalid length is passed\n error InvalidLength();\n\n /// @notice Error thrown when timestamp is invalid\n error InvalidTimestamp();\n\n /// @notice Error thrown when invalid comptroller is passed\n error InvalidComptroller();\n\n /**\n * @notice Prime constructor\n * @param _wrappedNativeToken Address of wrapped native token\n * @param _nativeMarket Address of native market\n * @param _blocksPerYear total blocks per year\n * @param _stakingPeriod total number of seconds for which user needs to stake to claim prime token\n * @param _minimumStakedXVS minimum amount of XVS user needs to stake to become a prime member (scaled by 1e18)\n * @param _maximumXVSCap maximum XVS taken in account when calculating user score (scaled by 1e18)\n * @param _timeBased A boolean indicating whether the contract is based on time or block.\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address _wrappedNativeToken,\n address _nativeMarket,\n uint256 _blocksPerYear,\n uint256 _stakingPeriod,\n uint256 _minimumStakedXVS,\n uint256 _maximumXVSCap,\n bool _timeBased\n ) TimeManagerV8(_timeBased, _blocksPerYear) {\n WRAPPED_NATIVE_TOKEN = _wrappedNativeToken;\n NATIVE_MARKET = _nativeMarket;\n STAKING_PERIOD = _stakingPeriod;\n MINIMUM_STAKED_XVS = _minimumStakedXVS;\n MAXIMUM_XVS_CAP = _maximumXVSCap;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /**\n * @notice Prime initializer\n * @param xvsVault_ Address of XVSVault\n * @param xvsVaultRewardToken_ Address of XVSVault reward token\n * @param xvsVaultPoolId_ Pool id of XVSVault\n * @param alphaNumerator_ numerator of alpha. If alpha is 0.5 then numerator is 1.\n alphaDenominator_ must be greater than alphaNumerator_, alphaDenominator_ cannot be zero and alphaNumerator_ cannot be zero\n * @param alphaDenominator_ denominator of alpha. If alpha is 0.5 then denominator is 2.\n alpha is alphaNumerator_/alphaDenominator_. So, 0 < alpha < 1\n * @param accessControlManager_ Address of AccessControlManager\n * @param primeLiquidityProvider_ Address of PrimeLiquidityProvider\n * @param comptroller_ Address of core pool comptroller\n * @param oracle_ Address of Oracle\n * @param loopsLimit_ Maximum number of loops allowed in a single transaction\n * @custom:error Throw InvalidAddress if any of the address is invalid\n */\n function initialize(\n address xvsVault_,\n address xvsVaultRewardToken_,\n uint256 xvsVaultPoolId_,\n uint128 alphaNumerator_,\n uint128 alphaDenominator_,\n address accessControlManager_,\n address primeLiquidityProvider_,\n address comptroller_,\n address oracle_,\n uint256 loopsLimit_\n ) external initializer {\n if (xvsVault_ == address(0)) revert InvalidAddress();\n if (xvsVaultRewardToken_ == address(0)) revert InvalidAddress();\n if (oracle_ == address(0)) revert InvalidAddress();\n if (primeLiquidityProvider_ == address(0)) revert InvalidAddress();\n\n _checkAlphaArguments(alphaNumerator_, alphaDenominator_);\n\n alphaNumerator = alphaNumerator_;\n alphaDenominator = alphaDenominator_;\n xvsVaultRewardToken = xvsVaultRewardToken_;\n xvsVaultPoolId = xvsVaultPoolId_;\n xvsVault = xvsVault_;\n nextScoreUpdateRoundId = 0;\n primeLiquidityProvider = primeLiquidityProvider_;\n corePoolComptroller = comptroller_;\n oracle = ResilientOracleInterface(oracle_);\n\n __AccessControlled_init(accessControlManager_);\n __Pausable_init();\n _setMaxLoopsLimit(loopsLimit_);\n\n _pause();\n }\n\n /**\n * @notice Prime initializer V2 for initializing pool registry\n * @param poolRegistry_ Address of IL pool registry\n */\n function initializeV2(address poolRegistry_) external reinitializer(2) {\n poolRegistry = poolRegistry_;\n }\n\n /**\n * @notice Returns boosted pending interest accrued for a user for all markets\n * @param user the account for which to get the accrued interests\n * @return pendingRewards the number of underlying tokens accrued by the user for all markets\n */\n function getPendingRewards(address user) external returns (PendingReward[] memory pendingRewards) {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n pendingRewards = new PendingReward[](marketsLength);\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n uint256 interestAccrued = getInterestAccrued(market, user);\n uint256 accrued = interests[market][user].accrued;\n\n pendingRewards[i] = PendingReward({\n vToken: market,\n rewardToken: _getUnderlying(market),\n amount: interestAccrued + accrued\n });\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Update total score of multiple users and market\n * @param users accounts for which we need to update score\n * @custom:error Throw NoScoreUpdatesRequired if no score updates are required\n * @custom:error Throw UserHasNoPrimeToken if user has no prime token\n * @custom:event Emits UserScoreUpdated event\n */\n function updateScores(address[] calldata users) external {\n if (pendingScoreUpdates == 0) revert NoScoreUpdatesRequired();\n if (nextScoreUpdateRoundId == 0) revert NoScoreUpdatesRequired();\n\n for (uint256 i; i < users.length; ) {\n address user = users[i];\n\n if (!tokens[user].exists) revert UserHasNoPrimeToken();\n if (isScoreUpdated[nextScoreUpdateRoundId][user]) {\n unchecked {\n ++i;\n }\n continue;\n }\n\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 j; j < marketsLength; ) {\n address market = allMarkets[j];\n _executeBoost(user, market);\n _updateScore(user, market);\n\n unchecked {\n ++j;\n }\n }\n\n --pendingScoreUpdates;\n isScoreUpdated[nextScoreUpdateRoundId][user] = true;\n\n unchecked {\n ++i;\n }\n\n emit UserScoreUpdated(user);\n }\n }\n\n /**\n * @notice Update value of alpha\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n * @custom:event Emits AlphaUpdated event\n * @custom:access Controlled by ACM\n */\n function updateAlpha(uint128 _alphaNumerator, uint128 _alphaDenominator) external {\n _checkAccessAllowed(\"updateAlpha(uint128,uint128)\");\n _checkAlphaArguments(_alphaNumerator, _alphaDenominator);\n\n emit AlphaUpdated(alphaNumerator, alphaDenominator, _alphaNumerator, _alphaDenominator);\n\n alphaNumerator = _alphaNumerator;\n alphaDenominator = _alphaDenominator;\n\n uint256 marketslength = _allMarkets.length;\n\n for (uint256 i; i < marketslength; ) {\n accrueInterest(_allMarkets[i]);\n\n unchecked {\n ++i;\n }\n }\n\n _startScoreUpdateRound();\n }\n\n /**\n * @notice Update multipliers for a market\n * @param market address of the market vToken\n * @param supplyMultiplier new supply multiplier for the market, scaled by 1e18\n * @param borrowMultiplier new borrow multiplier for the market, scaled by 1e18\n * @custom:error Throw MarketNotSupported if market is not supported\n * @custom:event Emits MultiplierUpdated event\n * @custom:access Controlled by ACM\n */\n function updateMultipliers(address market, uint256 supplyMultiplier, uint256 borrowMultiplier) external {\n _checkAccessAllowed(\"updateMultipliers(address,uint256,uint256)\");\n\n Market storage _market = markets[market];\n if (!_market.exists) revert MarketNotSupported();\n\n accrueInterest(market);\n\n emit MultiplierUpdated(\n market,\n _market.supplyMultiplier,\n _market.borrowMultiplier,\n supplyMultiplier,\n borrowMultiplier\n );\n _market.supplyMultiplier = supplyMultiplier;\n _market.borrowMultiplier = borrowMultiplier;\n\n _startScoreUpdateRound();\n }\n\n /**\n * @notice Update staked at timestamp for multiple users\n * @param users accounts for which we need to update staked at timestamp\n * @param timestamps new staked at timestamp for the users\n * @custom:error Throw InvalidLength if users and timestamps length are not equal\n * @custom:event Emits StakedAtUpdated event for each user\n * @custom:access Controlled by ACM\n */\n function setStakedAt(address[] calldata users, uint256[] calldata timestamps) external {\n _checkAccessAllowed(\"setStakedAt(address[],uint256[])\");\n if (users.length != timestamps.length) revert InvalidLength();\n\n for (uint256 i; i < users.length; ) {\n if (timestamps[i] > block.timestamp) revert InvalidTimestamp();\n\n stakedAt[users[i]] = timestamps[i];\n emit StakedAtUpdated(users[i], timestamps[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Add a market to prime program\n * @param comptroller address of the comptroller\n * @param market address of the market vToken\n * @param supplyMultiplier the multiplier for supply cap. It should be converted to 1e18\n * @param borrowMultiplier the multiplier for borrow cap. It should be converted to 1e18\n * @custom:error Throw MarketAlreadyExists if market already exists\n * @custom:error Throw InvalidVToken if market is not valid\n * @custom:event Emits MarketAdded event\n * @custom:access Controlled by ACM\n */\n function addMarket(\n address comptroller,\n address market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n ) external {\n _checkAccessAllowed(\"addMarket(address,address,uint256,uint256)\");\n\n if (comptroller == address(0)) revert InvalidComptroller();\n\n if (\n comptroller != corePoolComptroller &&\n PoolRegistryInterface(poolRegistry).getPoolByComptroller(comptroller).comptroller != comptroller\n ) revert InvalidComptroller();\n\n Market storage _market = markets[market];\n if (_market.exists) revert MarketAlreadyExists();\n\n bool isMarketExist = InterfaceComptroller(comptroller).markets(market);\n if (!isMarketExist) revert InvalidVToken();\n\n delete _market.rewardIndex;\n _market.supplyMultiplier = supplyMultiplier;\n _market.borrowMultiplier = borrowMultiplier;\n delete _market.sumOfMembersScore;\n _market.exists = true;\n\n address underlying = _getUnderlying(market);\n\n if (vTokenForAsset[underlying] != address(0)) revert AssetAlreadyExists();\n vTokenForAsset[underlying] = market;\n\n _allMarkets.push(market);\n _startScoreUpdateRound();\n\n _ensureMaxLoops(_allMarkets.length);\n\n emit MarketAdded(comptroller, market, supplyMultiplier, borrowMultiplier);\n }\n\n /**\n * @notice Set limits for total tokens that can be minted\n * @param _irrevocableLimit total number of irrevocable tokens that can be minted\n * @param _revocableLimit total number of revocable tokens that can be minted\n * @custom:error Throw InvalidLimit if any of the limit is less than total tokens minted\n * @custom:event Emits MintLimitsUpdated event\n * @custom:access Controlled by ACM\n */\n function setLimit(uint256 _irrevocableLimit, uint256 _revocableLimit) external {\n _checkAccessAllowed(\"setLimit(uint256,uint256)\");\n if (_irrevocableLimit < totalIrrevocable || _revocableLimit < totalRevocable) revert InvalidLimit();\n\n emit MintLimitsUpdated(irrevocableLimit, revocableLimit, _irrevocableLimit, _revocableLimit);\n\n revocableLimit = _revocableLimit;\n irrevocableLimit = _irrevocableLimit;\n }\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Number of loops limit\n * @custom:event Emits MaxLoopsLimitUpdated event on success\n * @custom:access Controlled by ACM\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external {\n _checkAccessAllowed(\"setMaxLoopsLimit(uint256)\");\n _setMaxLoopsLimit(loopsLimit);\n }\n\n /**\n * @notice Directly issue prime tokens to users\n * @param isIrrevocable are the tokens being issued\n * @param users list of address to issue tokens to\n * @custom:access Controlled by ACM\n */\n function issue(bool isIrrevocable, address[] calldata users) external {\n _checkAccessAllowed(\"issue(bool,address[])\");\n\n if (isIrrevocable) {\n for (uint256 i; i < users.length; ) {\n Token storage userToken = tokens[users[i]];\n if (userToken.exists && !userToken.isIrrevocable) {\n _upgrade(users[i]);\n } else {\n _mint(true, users[i]);\n _initializeMarkets(users[i]);\n }\n\n unchecked {\n ++i;\n }\n }\n } else {\n for (uint256 i; i < users.length; ) {\n _mint(false, users[i]);\n _initializeMarkets(users[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n }\n\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external {\n uint256 totalStaked = _xvsBalanceOfUser(user);\n bool isAccountEligible = _isEligible(totalStaked);\n\n uint256 userStakedAt = stakedAt[user];\n Token memory token = tokens[user];\n\n if (token.exists && !isAccountEligible) {\n delete stakedAt[user];\n emit StakedAtUpdated(user, 0);\n\n if (token.isIrrevocable) {\n _accrueInterestAndUpdateScore(user);\n } else {\n _burn(user);\n }\n } else if (!isAccountEligible && !token.exists && userStakedAt != 0) {\n delete stakedAt[user];\n emit StakedAtUpdated(user, 0);\n } else if (userStakedAt == 0 && isAccountEligible && !token.exists) {\n stakedAt[user] = block.timestamp;\n emit StakedAtUpdated(user, block.timestamp);\n } else if (token.exists && isAccountEligible) {\n _accrueInterestAndUpdateScore(user);\n\n if (stakedAt[user] == 0) {\n stakedAt[user] = block.timestamp;\n emit StakedAtUpdated(user, block.timestamp);\n }\n }\n }\n\n /**\n * @notice accrues interes and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external {\n _executeBoost(user, market);\n _updateScore(user, market);\n }\n\n /**\n * @notice For claiming prime token when staking period is completed\n */\n function claim() external {\n uint256 userStakedAt = stakedAt[msg.sender];\n if (userStakedAt == 0) revert IneligibleToClaim();\n if (block.timestamp - userStakedAt < STAKING_PERIOD) revert WaitMoreTime();\n\n _mint(false, msg.sender);\n _initializeMarkets(msg.sender);\n }\n\n /**\n * @notice For burning any prime token\n * @param user the account address for which the prime token will be burned\n * @custom:access Controlled by ACM\n */\n function burn(address user) external {\n _checkAccessAllowed(\"burn(address)\");\n _burn(user);\n }\n\n /**\n * @notice To pause or unpause claiming of interest\n * @custom:access Controlled by ACM\n */\n function togglePause() external {\n _checkAccessAllowed(\"togglePause()\");\n if (paused()) {\n _unpause();\n } else {\n _pause();\n }\n }\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @return amount the amount of tokens transferred to the msg.sender\n */\n function claimInterest(address vToken) external whenNotPaused returns (uint256) {\n return _claimInterest(vToken, msg.sender);\n }\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @param user the user for which to claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken, address user) external whenNotPaused returns (uint256) {\n return _claimInterest(vToken, user);\n }\n\n /**\n * @notice Retrieves an array of all available markets\n * @return an array of addresses representing all available markets\n */\n function getAllMarkets() external view returns (address[] memory) {\n return _allMarkets;\n }\n\n /**\n * @notice Retrieves the core pool comptroller address\n * @return the core pool comptroller address\n */\n function comptroller() external view returns (address) {\n return corePoolComptroller;\n }\n\n /**\n * @notice fetch the numbers of seconds remaining for staking period to complete\n * @param user the account address for which we are checking the remaining time\n * @return timeRemaining the number of seconds the user needs to wait to claim prime token\n */\n function claimTimeRemaining(address user) external view returns (uint256) {\n uint256 userStakedAt = stakedAt[user];\n if (userStakedAt == 0) return STAKING_PERIOD;\n\n uint256 totalTimeStaked;\n unchecked {\n totalTimeStaked = block.timestamp - userStakedAt;\n }\n\n if (totalTimeStaked < STAKING_PERIOD) {\n unchecked {\n return STAKING_PERIOD - totalTimeStaked;\n }\n }\n return 0;\n }\n\n /**\n * @notice Returns if user is a prime holder\n * @return isPrimeHolder true if user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool) {\n return tokens[user].exists;\n }\n\n /**\n * @notice Returns supply and borrow APR for user for a given market\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function calculateAPR(address market, address user) external view returns (APRInfo memory aprInfo) {\n IVToken vToken = IVToken(market);\n uint256 borrow = vToken.borrowBalanceStored(user);\n uint256 exchangeRate = vToken.exchangeRateStored();\n uint256 balanceOfAccount = vToken.balanceOf(user);\n uint256 supply = (exchangeRate * balanceOfAccount) / EXP_SCALE;\n\n aprInfo.userScore = interests[market][user].score;\n aprInfo.totalScore = markets[market].sumOfMembersScore;\n\n aprInfo.xvsBalanceForScore = _xvsBalanceForScore(_xvsBalanceOfUser(user));\n Capital memory capital = _capitalForScore(aprInfo.xvsBalanceForScore, borrow, supply, address(vToken));\n\n aprInfo.capital = capital.capital;\n aprInfo.cappedSupply = capital.cappedSupply;\n aprInfo.cappedBorrow = capital.cappedBorrow;\n aprInfo.supplyCapUSD = capital.supplyCapUSD;\n aprInfo.borrowCapUSD = capital.borrowCapUSD;\n\n (aprInfo.supplyAPR, aprInfo.borrowAPR) = _calculateUserAPR(\n market,\n supply,\n borrow,\n aprInfo.cappedSupply,\n aprInfo.cappedBorrow,\n aprInfo.userScore,\n aprInfo.totalScore\n );\n }\n\n /**\n * @notice Returns supply and borrow APR for estimated supply, borrow and XVS staked\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function estimateAPR(\n address market,\n address user,\n uint256 borrow,\n uint256 supply,\n uint256 xvsStaked\n ) external view returns (APRInfo memory aprInfo) {\n aprInfo.totalScore = markets[market].sumOfMembersScore - interests[market][user].score;\n\n aprInfo.xvsBalanceForScore = _xvsBalanceForScore(xvsStaked);\n Capital memory capital = _capitalForScore(aprInfo.xvsBalanceForScore, borrow, supply, market);\n\n aprInfo.capital = capital.capital;\n aprInfo.cappedSupply = capital.cappedSupply;\n aprInfo.cappedBorrow = capital.cappedBorrow;\n aprInfo.supplyCapUSD = capital.supplyCapUSD;\n aprInfo.borrowCapUSD = capital.borrowCapUSD;\n\n uint256 decimals = IERC20MetadataUpgradeable(_getUnderlying(market)).decimals();\n aprInfo.capital = aprInfo.capital * (10 ** (18 - decimals));\n\n aprInfo.userScore = Scores._calculateScore(\n aprInfo.xvsBalanceForScore,\n aprInfo.capital,\n alphaNumerator,\n alphaDenominator\n );\n\n aprInfo.totalScore = aprInfo.totalScore + aprInfo.userScore;\n\n (aprInfo.supplyAPR, aprInfo.borrowAPR) = _calculateUserAPR(\n market,\n supply,\n borrow,\n aprInfo.cappedSupply,\n aprInfo.cappedBorrow,\n aprInfo.userScore,\n aprInfo.totalScore\n );\n }\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n * @custom:error Throw MarketNotSupported if market is not supported\n */\n function accrueInterest(address vToken) public {\n Market storage market = markets[vToken];\n\n if (!market.exists) revert MarketNotSupported();\n\n address underlying = _getUnderlying(vToken);\n\n IPrimeLiquidityProvider _primeLiquidityProvider = IPrimeLiquidityProvider(primeLiquidityProvider);\n _primeLiquidityProvider.accrueTokens(underlying);\n uint256 totalAccruedInPLP = _primeLiquidityProvider.tokenAmountAccrued(underlying);\n uint256 unreleasedPLPAccruedInterest = totalAccruedInPLP - unreleasedPLPIncome[underlying];\n uint256 distributionIncome = unreleasedPLPAccruedInterest;\n\n if (distributionIncome == 0) {\n return;\n }\n\n unreleasedPLPIncome[underlying] = totalAccruedInPLP;\n\n uint256 delta;\n if (market.sumOfMembersScore != 0) {\n delta = ((distributionIncome * EXP_SCALE) / market.sumOfMembersScore);\n }\n\n market.rewardIndex += delta;\n }\n\n /**\n * @notice Returns boosted interest accrued for a user\n * @param vToken the market for which to fetch the accrued interest\n * @param user the account for which to get the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function getInterestAccrued(address vToken, address user) public returns (uint256) {\n accrueInterest(vToken);\n\n return _interestAccrued(vToken, user);\n }\n\n /**\n * @notice accrues interest and updates score of all markets for an user\n * @param user the account address for which to accrue interest and update score\n */\n function _accrueInterestAndUpdateScore(address user) internal {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n _executeBoost(user, market);\n _updateScore(user, market);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Initializes all the markets for the user when a prime token is minted\n * @param account the account address for which markets needs to be initialized\n */\n function _initializeMarkets(address account) internal {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n accrueInterest(market);\n\n interests[market][account].rewardIndex = markets[market].rewardIndex;\n\n uint256 score = _calculateScore(market, account);\n interests[market][account].score = score;\n markets[market].sumOfMembersScore = markets[market].sumOfMembersScore + score;\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice calculate the current score of user\n * @param market the market for which to calculate the score\n * @param user the account for which to calculate the score\n * @return score the score of the user\n */\n function _calculateScore(address market, address user) internal returns (uint256) {\n uint256 xvsBalanceForScore = _xvsBalanceForScore(_xvsBalanceOfUser(user));\n\n IVToken vToken = IVToken(market);\n uint256 borrow = vToken.borrowBalanceStored(user);\n uint256 exchangeRate = vToken.exchangeRateStored();\n uint256 balanceOfAccount = vToken.balanceOf(user);\n uint256 supply = (exchangeRate * balanceOfAccount) / EXP_SCALE;\n\n address xvsToken = IXVSVault(xvsVault).xvsAddress();\n oracle.updateAssetPrice(xvsToken);\n oracle.updatePrice(market);\n\n Capital memory capital = _capitalForScore(xvsBalanceForScore, borrow, supply, market);\n\n uint256 decimals = IERC20MetadataUpgradeable(_getUnderlying(market)).decimals();\n\n capital.capital = capital.capital * (10 ** (18 - decimals));\n\n return Scores._calculateScore(xvsBalanceForScore, capital.capital, alphaNumerator, alphaDenominator);\n }\n\n /**\n * @notice To transfer the accrued interest to user\n * @param vToken the market for which to claim\n * @param user the account for which to get the accrued interest\n * @return amount the amount of tokens transferred to the user\n * @custom:event Emits InterestClaimed event\n */\n function _claimInterest(address vToken, address user) internal returns (uint256) {\n uint256 amount = getInterestAccrued(vToken, user);\n amount += interests[vToken][user].accrued;\n\n interests[vToken][user].rewardIndex = markets[vToken].rewardIndex;\n delete interests[vToken][user].accrued;\n\n address underlying = _getUnderlying(vToken);\n IERC20Upgradeable asset = IERC20Upgradeable(underlying);\n\n if (amount > asset.balanceOf(address(this))) {\n delete unreleasedPLPIncome[underlying];\n IPrimeLiquidityProvider(primeLiquidityProvider).releaseFunds(address(asset));\n }\n\n asset.safeTransfer(user, amount);\n\n emit InterestClaimed(user, vToken, amount);\n\n return amount;\n }\n\n /**\n * @notice Used to mint a new prime token\n * @param isIrrevocable is the tokens being issued is irrevocable\n * @param user token owner\n * @custom:error Throw IneligibleToClaim if user is not eligible to claim prime token\n * @custom:event Emits Mint event\n */\n function _mint(bool isIrrevocable, address user) internal {\n Token storage token = tokens[user];\n if (token.exists) revert IneligibleToClaim();\n\n token.exists = true;\n token.isIrrevocable = isIrrevocable;\n\n if (isIrrevocable) {\n ++totalIrrevocable;\n } else {\n ++totalRevocable;\n }\n\n if (totalIrrevocable > irrevocableLimit || totalRevocable > revocableLimit) revert InvalidLimit();\n _updateRoundAfterTokenMinted(user);\n\n emit Mint(user, isIrrevocable);\n }\n\n /**\n * @notice Used to burn a new prime token\n * @param user owner whose prime token to burn\n * @custom:error Throw UserHasNoPrimeToken if user has no prime token\n * @custom:event Emits Burn event\n */\n function _burn(address user) internal {\n Token memory token = tokens[user];\n if (!token.exists) revert UserHasNoPrimeToken();\n\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n _executeBoost(user, market);\n markets[market].sumOfMembersScore = markets[market].sumOfMembersScore - interests[market][user].score;\n\n delete interests[market][user].score;\n delete interests[market][user].rewardIndex;\n\n unchecked {\n ++i;\n }\n }\n\n if (token.isIrrevocable) {\n --totalIrrevocable;\n } else {\n --totalRevocable;\n }\n\n delete tokens[user].exists;\n delete tokens[user].isIrrevocable;\n\n _updateRoundAfterTokenBurned(user);\n\n emit Burn(user);\n }\n\n /**\n * @notice Used to upgrade an token\n * @param user owner whose prime token to upgrade\n * @custom:error Throw InvalidLimit if total irrevocable tokens exceeds the limit\n * @custom:event Emits TokenUpgraded event\n */\n function _upgrade(address user) internal {\n Token storage userToken = tokens[user];\n\n userToken.isIrrevocable = true;\n ++totalIrrevocable;\n --totalRevocable;\n\n if (totalIrrevocable > irrevocableLimit) revert InvalidLimit();\n\n emit TokenUpgraded(user);\n }\n\n /**\n * @notice Accrue rewards for the user. Must be called before updating score\n * @param user account for which we need to accrue rewards\n * @param vToken the market for which we need to accrue rewards\n */\n function _executeBoost(address user, address vToken) internal {\n if (!markets[vToken].exists || !tokens[user].exists) {\n return;\n }\n\n accrueInterest(vToken);\n interests[vToken][user].accrued += _interestAccrued(vToken, user);\n interests[vToken][user].rewardIndex = markets[vToken].rewardIndex;\n }\n\n /**\n * @notice Update total score of user and market. Must be called after changing account's borrow or supply balance.\n * @param user account for which we need to update score\n * @param market the market for which we need to score\n */\n function _updateScore(address user, address market) internal {\n Market storage _market = markets[market];\n if (!_market.exists || !tokens[user].exists) {\n return;\n }\n\n uint256 score = _calculateScore(market, user);\n _market.sumOfMembersScore = _market.sumOfMembersScore - interests[market][user].score + score;\n\n interests[market][user].score = score;\n }\n\n /**\n * @notice Verify new alpha arguments\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n * @custom:error Throw InvalidAlphaArguments if alpha is invalid\n */\n function _checkAlphaArguments(uint128 _alphaNumerator, uint128 _alphaDenominator) internal pure {\n if (_alphaNumerator >= _alphaDenominator || _alphaNumerator == 0) {\n revert InvalidAlphaArguments();\n }\n }\n\n /**\n * @notice starts round to update scores of a particular or all markets\n */\n function _startScoreUpdateRound() internal {\n nextScoreUpdateRoundId++;\n totalScoreUpdatesRequired = totalIrrevocable + totalRevocable;\n pendingScoreUpdates = totalScoreUpdatesRequired;\n }\n\n /**\n * @notice update the required score updates when token is burned before round is completed\n */\n function _updateRoundAfterTokenBurned(address user) internal {\n if (totalScoreUpdatesRequired != 0) --totalScoreUpdatesRequired;\n\n if (pendingScoreUpdates != 0 && !isScoreUpdated[nextScoreUpdateRoundId][user]) {\n --pendingScoreUpdates;\n }\n }\n\n /**\n * @notice update the required score updates when token is minted before round is completed\n */\n function _updateRoundAfterTokenMinted(address user) internal {\n if (totalScoreUpdatesRequired != 0) isScoreUpdated[nextScoreUpdateRoundId][user] = true;\n }\n\n /**\n * @notice fetch the current XVS balance of user in the XVSVault\n * @param user the account address\n * @return xvsBalance the XVS balance of user\n */\n function _xvsBalanceOfUser(address user) internal view returns (uint256) {\n (uint256 xvs, , uint256 pendingWithdrawals) = IXVSVault(xvsVault).getUserInfo(\n xvsVaultRewardToken,\n xvsVaultPoolId,\n user\n );\n return (xvs - pendingWithdrawals);\n }\n\n /**\n * @notice calculate the current XVS balance that will be used in calculation of score\n * @param xvs the actual XVS balance of user\n * @return xvsBalanceForScore the XVS balance to use in score\n */\n function _xvsBalanceForScore(uint256 xvs) internal view returns (uint256) {\n if (xvs > MAXIMUM_XVS_CAP) {\n return MAXIMUM_XVS_CAP;\n }\n return xvs;\n }\n\n /**\n * @notice calculate the capital for calculation of score\n * @param xvs the actual XVS balance of user\n * @param borrow the borrow balance of user\n * @param supply the supply balance of user\n * @param market the market vToken address\n * @return capital the capital to use in calculation of score\n */\n function _capitalForScore(\n uint256 xvs,\n uint256 borrow,\n uint256 supply,\n address market\n ) internal view returns (Capital memory capital) {\n address xvsToken = IXVSVault(xvsVault).xvsAddress();\n\n uint256 xvsPrice = oracle.getPrice(xvsToken);\n capital.borrowCapUSD = (xvsPrice * ((xvs * markets[market].borrowMultiplier) / EXP_SCALE)) / EXP_SCALE;\n capital.supplyCapUSD = (xvsPrice * ((xvs * markets[market].supplyMultiplier) / EXP_SCALE)) / EXP_SCALE;\n\n uint256 tokenPrice = oracle.getUnderlyingPrice(market);\n uint256 supplyUSD = (tokenPrice * supply) / EXP_SCALE;\n uint256 borrowUSD = (tokenPrice * borrow) / EXP_SCALE;\n\n if (supplyUSD >= capital.supplyCapUSD) {\n supply = supplyUSD != 0 ? (supply * capital.supplyCapUSD) / supplyUSD : 0;\n }\n\n if (borrowUSD >= capital.borrowCapUSD) {\n borrow = borrowUSD != 0 ? (borrow * capital.borrowCapUSD) / borrowUSD : 0;\n }\n\n capital.capital = supply + borrow;\n capital.cappedSupply = supply;\n capital.cappedBorrow = borrow;\n }\n\n /**\n * @notice Used to get if the XVS balance is eligible for prime token\n * @param amount amount of XVS\n * @return isEligible true if the staked XVS amount is enough to consider the associated user eligible for a Prime token, false otherwise\n */\n function _isEligible(uint256 amount) internal view returns (bool) {\n if (amount >= MINIMUM_STAKED_XVS) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @notice Calculate the interests accrued by the user in the market, since the last accrual\n * @param vToken the market for which to calculate the accrued interest\n * @param user the user for which to calculate the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function _interestAccrued(address vToken, address user) internal view returns (uint256) {\n Interest memory interest = interests[vToken][user];\n uint256 index = markets[vToken].rewardIndex - interest.rewardIndex;\n\n uint256 score = interest.score;\n\n return (index * score) / EXP_SCALE;\n }\n\n /**\n * @notice Returns the underlying token associated with the VToken, or wrapped native token if the market is native market\n * @param vToken the market whose underlying token will be returned\n * @return underlying The address of the underlying token associated with the VToken, or the address of the WRAPPED_NATIVE_TOKEN token if the market is NATIVE_MARKET\n */\n function _getUnderlying(address vToken) internal view returns (address) {\n if (vToken == NATIVE_MARKET) {\n return WRAPPED_NATIVE_TOKEN;\n }\n return IVToken(vToken).underlying();\n }\n\n //////////////////////////////////////////////////\n //////////////// APR Calculation ////////////////\n ////////////////////////////////////////////////\n\n /**\n * @notice the total income that's going to be distributed in a year to prime token holders\n * @param vToken the market for which to fetch the total income that's going to distributed in a year\n * @return amount the total income\n */\n function incomeDistributionYearly(address vToken) public view returns (uint256 amount) {\n uint256 totalIncomePerBlockOrSecondFromPLP = IPrimeLiquidityProvider(primeLiquidityProvider)\n .getEffectiveDistributionSpeed(_getUnderlying(vToken));\n amount = blocksOrSecondsPerYear * totalIncomePerBlockOrSecondFromPLP;\n }\n\n /**\n * @notice used to calculate the supply and borrow APR of the user\n * @param vToken the market for which to fetch the APR\n * @param totalSupply the total token supply of the user\n * @param totalBorrow the total tokens borrowed by the user\n * @param totalCappedSupply the total token capped supply of the user\n * @param totalCappedBorrow the total capped tokens borrowed by the user\n * @param userScore the score of the user\n * @param totalScore the total market score\n * @return supplyAPR the supply APR of the user\n * @return borrowAPR the borrow APR of the user\n */\n function _calculateUserAPR(\n address vToken,\n uint256 totalSupply,\n uint256 totalBorrow,\n uint256 totalCappedSupply,\n uint256 totalCappedBorrow,\n uint256 userScore,\n uint256 totalScore\n ) internal view returns (uint256 supplyAPR, uint256 borrowAPR) {\n if (totalScore == 0) return (0, 0);\n\n uint256 userYearlyIncome = (userScore * incomeDistributionYearly(vToken)) / totalScore;\n\n uint256 totalCappedValue = totalCappedSupply + totalCappedBorrow;\n\n if (totalCappedValue == 0) return (0, 0);\n\n uint256 maximumBps = MAXIMUM_BPS;\n uint256 userSupplyIncomeYearly;\n uint256 userBorrowIncomeYearly;\n userSupplyIncomeYearly = (userYearlyIncome * totalCappedSupply) / totalCappedValue;\n userBorrowIncomeYearly = (userYearlyIncome * totalCappedBorrow) / totalCappedValue;\n supplyAPR = totalSupply == 0 ? 0 : ((userSupplyIncomeYearly * maximumBps) / totalSupply);\n borrowAPR = totalBorrow == 0 ? 0 : ((userBorrowIncomeYearly * maximumBps) / totalBorrow);\n }\n}\n" + }, + "contracts/Tokens/Prime/PrimeLiquidityProvider.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { PrimeLiquidityProviderStorageV1 } from \"./PrimeLiquidityProviderStorage.sol\";\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { PausableUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport { IPrimeLiquidityProvider } from \"./Interfaces/IPrimeLiquidityProvider.sol\";\nimport { MaxLoopsLimitHelper } from \"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\";\nimport { TimeManagerV8 } from \"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\";\n\n/**\n * @title PrimeLiquidityProvider\n * @author Venus\n * @notice PrimeLiquidityProvider is used to fund Prime\n */\ncontract PrimeLiquidityProvider is\n IPrimeLiquidityProvider,\n AccessControlledV8,\n PausableUpgradeable,\n MaxLoopsLimitHelper,\n PrimeLiquidityProviderStorageV1,\n TimeManagerV8\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice The default max token distribution speed\n uint256 public constant DEFAULT_MAX_DISTRIBUTION_SPEED = 1e18;\n\n /// @notice Emitted when a token distribution is initialized\n event TokenDistributionInitialized(address indexed token);\n\n /// @notice Emitted when a new token distribution speed is set\n event TokenDistributionSpeedUpdated(address indexed token, uint256 oldSpeed, uint256 newSpeed);\n\n /// @notice Emitted when a new max distribution speed for token is set\n event MaxTokenDistributionSpeedUpdated(address indexed token, uint256 oldSpeed, uint256 newSpeed);\n\n /// @notice Emitted when prime token contract address is changed\n event PrimeTokenUpdated(address indexed oldPrimeToken, address indexed newPrimeToken);\n\n /// @notice Emitted when distribution state(Index and block or second) is updated\n event TokensAccrued(address indexed token, uint256 amount);\n\n /// @notice Emitted when token is transferred to the prime contract\n event TokenTransferredToPrime(address indexed token, uint256 amount);\n\n /// @notice Emitted on sweep token success\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n\n /// @notice Thrown when arguments are passed are invalid\n error InvalidArguments();\n\n /// @notice Thrown when distribution speed is greater than maxTokenDistributionSpeeds[tokenAddress]\n error InvalidDistributionSpeed(uint256 speed, uint256 maxSpeed);\n\n /// @notice Thrown when caller is not the desired caller\n error InvalidCaller();\n\n /// @notice Thrown when token is initialized\n error TokenAlreadyInitialized(address token);\n\n ///@notice Error thrown when PrimeLiquidityProvider's balance is less than sweep amount\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /// @notice Error thrown when funds transfer is paused\n error FundsTransferIsPaused();\n\n /// @notice Error thrown when accrueTokens is called for an uninitialized token\n error TokenNotInitialized(address token_);\n\n /// @notice Error thrown when argument value in setter is same as previous value\n error AddressesMustDiffer();\n\n /**\n * @notice Compares two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n if (newAddress == oldAddress) {\n revert AddressesMustDiffer();\n }\n _;\n }\n\n /**\n * @notice Prime Liquidity Provider constructor\n * @param _timeBased A boolean indicating whether the contract is based on time or block.\n * @param _blocksPerYear total blocks per year\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(bool _timeBased, uint256 _blocksPerYear) TimeManagerV8(_timeBased, _blocksPerYear) {\n _disableInitializers();\n }\n\n /**\n * @notice PrimeLiquidityProvider initializer\n * @dev Initializes the deployer to owner\n * @param accessControlManager_ AccessControlManager contract address\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n * @param loopsLimit_ Maximum number of loops allowed in a single transaction\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function initialize(\n address accessControlManager_,\n address[] calldata tokens_,\n uint256[] calldata distributionSpeeds_,\n uint256[] calldata maxDistributionSpeeds_,\n uint256 loopsLimit_\n ) external initializer {\n _ensureZeroAddress(accessControlManager_);\n\n __AccessControlled_init(accessControlManager_);\n __Pausable_init();\n _setMaxLoopsLimit(loopsLimit_);\n\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if ((numTokens != distributionSpeeds_.length) || (numTokens != maxDistributionSpeeds_.length)) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _initializeToken(tokens_[i]);\n _setMaxTokenDistributionSpeed(tokens_[i], maxDistributionSpeeds_[i]);\n _setTokenDistributionSpeed(tokens_[i], distributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Initialize the distribution of the token\n * @param tokens_ Array of addresses of the tokens to be intialized\n * @custom:access Only Governance\n */\n function initializeTokens(address[] calldata tokens_) external onlyOwner {\n uint256 tokensLength = tokens_.length;\n _ensureMaxLoops(tokensLength);\n\n for (uint256 i; i < tokensLength; ) {\n _initializeToken(tokens_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Pause fund transfer of tokens to Prime contract\n * @custom:access Controlled by ACM\n */\n function pauseFundsTransfer() external {\n _checkAccessAllowed(\"pauseFundsTransfer()\");\n _pause();\n }\n\n /**\n * @notice Resume fund transfer of tokens to Prime contract\n * @custom:access Controlled by ACM\n */\n function resumeFundsTransfer() external {\n _checkAccessAllowed(\"resumeFundsTransfer()\");\n _unpause();\n }\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n * @custom:access Controlled by ACM\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function setTokensDistributionSpeed(address[] calldata tokens_, uint256[] calldata distributionSpeeds_) external {\n _checkAccessAllowed(\"setTokensDistributionSpeed(address[],uint256[])\");\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if (numTokens != distributionSpeeds_.length) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _ensureTokenInitialized(tokens_[i]);\n _setTokenDistributionSpeed(tokens_[i], distributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Set max distribution speed for token (amount of maximum token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param maxDistributionSpeeds_ New distribution speeds for tokens\n * @custom:access Controlled by ACM\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function setMaxTokensDistributionSpeed(\n address[] calldata tokens_,\n uint256[] calldata maxDistributionSpeeds_\n ) external {\n _checkAccessAllowed(\"setMaxTokensDistributionSpeed(address[],uint256[])\");\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if (numTokens != maxDistributionSpeeds_.length) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _setMaxTokenDistributionSpeed(tokens_[i], maxDistributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n * @custom:event Emits PrimeTokenUpdated event\n * @custom:access Only owner\n */\n function setPrimeToken(address prime_) external onlyOwner compareAddress(prime, prime_) {\n _ensureZeroAddress(prime_);\n\n emit PrimeTokenUpdated(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Limit for the max loops can execute at a time\n * @custom:event Emits MaxLoopsLimitUpdated event on success\n * @custom:access Controlled by ACM\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external {\n _checkAccessAllowed(\"setMaxLoopsLimit(uint256)\");\n _setMaxLoopsLimit(loopsLimit);\n }\n\n /**\n * @notice Claim all the token accrued till last block or second\n * @param token_ The token to release to the Prime contract\n * @custom:event Emits TokenTransferredToPrime event\n * @custom:error Throw InvalidArguments on Zero address(token)\n * @custom:error Throw FundsTransferIsPaused is paused\n * @custom:error Throw InvalidCaller if the sender is not the Prime contract\n */\n function releaseFunds(address token_) external {\n address _prime = prime;\n if (msg.sender != _prime) revert InvalidCaller();\n if (paused()) {\n revert FundsTransferIsPaused();\n }\n\n accrueTokens(token_);\n uint256 accruedAmount = _tokenAmountAccrued[token_];\n delete _tokenAmountAccrued[token_];\n\n emit TokenTransferredToPrime(token_, accruedAmount);\n\n IERC20Upgradeable(token_).safeTransfer(_prime, accruedAmount);\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Governance\n */\n function sweepToken(IERC20Upgradeable token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\n }\n\n /**\n * @notice Get rewards per block or second for token\n * @param token_ Address of the token\n * @return speed returns the per block or second reward\n */\n function getEffectiveDistributionSpeed(address token_) external view returns (uint256) {\n uint256 distributionSpeed = tokenDistributionSpeeds[token_];\n uint256 balance = IERC20Upgradeable(token_).balanceOf(address(this));\n uint256 accrued = _tokenAmountAccrued[token_];\n\n if (balance > accrued) {\n return distributionSpeed;\n }\n\n return 0;\n }\n\n /**\n * @notice Accrue token by updating the distribution state\n * @param token_ Address of the token\n * @custom:event Emits TokensAccrued event\n */\n function accrueTokens(address token_) public {\n _ensureZeroAddress(token_);\n\n _ensureTokenInitialized(token_);\n\n uint256 blockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 deltaBlocksOrSeconds;\n unchecked {\n deltaBlocksOrSeconds = blockNumberOrSecond - lastAccruedBlockOrSecond[token_];\n }\n\n if (deltaBlocksOrSeconds != 0) {\n uint256 distributionSpeed = tokenDistributionSpeeds[token_];\n uint256 balance = IERC20Upgradeable(token_).balanceOf(address(this));\n\n uint256 balanceDiff = balance - _tokenAmountAccrued[token_];\n if (distributionSpeed != 0 && balanceDiff != 0) {\n uint256 accruedSinceUpdate = deltaBlocksOrSeconds * distributionSpeed;\n uint256 tokenAccrued = (balanceDiff <= accruedSinceUpdate ? balanceDiff : accruedSinceUpdate);\n\n _tokenAmountAccrued[token_] += tokenAccrued;\n emit TokensAccrued(token_, tokenAccrued);\n }\n\n lastAccruedBlockOrSecond[token_] = blockNumberOrSecond;\n }\n }\n\n /**\n * @notice Get the last accrued block or second for token\n * @param token_ Address of the token\n * @return blockNumberOrSecond returns the last accrued block or second\n */\n function lastAccruedBlock(address token_) external view returns (uint256) {\n return lastAccruedBlockOrSecond[token_];\n }\n\n /**\n * @notice Get the tokens accrued\n * @param token_ Address of the token\n * @return returns the amount of accrued tokens for the token provided\n */\n function tokenAmountAccrued(address token_) external view returns (uint256) {\n return _tokenAmountAccrued[token_];\n }\n\n /**\n * @notice Initialize the distribution of the token\n * @param token_ Address of the token to be intialized\n * @custom:event Emits TokenDistributionInitialized event\n * @custom:error Throw TokenAlreadyInitialized if token is already initialized\n */\n function _initializeToken(address token_) internal {\n _ensureZeroAddress(token_);\n uint256 blockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 initializedBlockOrSecond = lastAccruedBlockOrSecond[token_];\n\n if (initializedBlockOrSecond != 0) {\n revert TokenAlreadyInitialized(token_);\n }\n\n /*\n * Update token state block number or second\n */\n lastAccruedBlockOrSecond[token_] = blockNumberOrSecond;\n\n emit TokenDistributionInitialized(token_);\n }\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param token_ Address of the token\n * @param distributionSpeed_ New distribution speed for token\n * @custom:event Emits TokenDistributionSpeedUpdated event\n * @custom:error Throw InvalidDistributionSpeed if speed is greater than max speed\n */\n function _setTokenDistributionSpeed(address token_, uint256 distributionSpeed_) internal {\n uint256 maxDistributionSpeed = maxTokenDistributionSpeeds[token_];\n if (maxDistributionSpeed == 0) {\n maxTokenDistributionSpeeds[token_] = maxDistributionSpeed = DEFAULT_MAX_DISTRIBUTION_SPEED;\n }\n\n if (distributionSpeed_ > maxDistributionSpeed) {\n revert InvalidDistributionSpeed(distributionSpeed_, maxDistributionSpeed);\n }\n\n uint256 oldDistributionSpeed = tokenDistributionSpeeds[token_];\n if (oldDistributionSpeed != distributionSpeed_) {\n // Distribution speed updated so let's update distribution state to ensure that\n // 1. Token accrued properly for the old speed, and\n // 2. Token accrued at the new speed starts after this block or second.\n accrueTokens(token_);\n\n // Update speed\n tokenDistributionSpeeds[token_] = distributionSpeed_;\n\n emit TokenDistributionSpeedUpdated(token_, oldDistributionSpeed, distributionSpeed_);\n }\n }\n\n /**\n * @notice Set max distribution speed (amount of maximum token distribute per block or second)\n * @param token_ Address of the token\n * @param maxDistributionSpeed_ New max distribution speed for token\n * @custom:event Emits MaxTokenDistributionSpeedUpdated event\n */\n function _setMaxTokenDistributionSpeed(address token_, uint256 maxDistributionSpeed_) internal {\n emit MaxTokenDistributionSpeedUpdated(token_, tokenDistributionSpeeds[token_], maxDistributionSpeed_);\n maxTokenDistributionSpeeds[token_] = maxDistributionSpeed_;\n }\n\n /**\n * @notice Revert on non initialized token\n * @param token_ Token Address to be verified for\n */\n function _ensureTokenInitialized(address token_) internal view {\n uint256 lastBlockOrSecondAccrued = lastAccruedBlockOrSecond[token_];\n\n if (lastBlockOrSecondAccrued == 0) {\n revert TokenNotInitialized(token_);\n }\n }\n\n /**\n * @notice Revert on zero address\n * @param address_ Address to be verified\n */\n function _ensureZeroAddress(address address_) internal pure {\n if (address_ == address(0)) {\n revert InvalidArguments();\n }\n }\n}\n" + }, + "contracts/Tokens/Prime/PrimeLiquidityProviderStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/**\n * @title PrimeLiquidityProviderStorageV1\n * @author Venus\n * @notice Storage for Prime Liquidity Provider\n */\ncontract PrimeLiquidityProviderStorageV1 {\n /// @notice Address of the Prime contract\n address public prime;\n\n /// @notice The rate at which token is distributed (per block or second)\n mapping(address => uint256) public tokenDistributionSpeeds;\n\n /// @notice The max token distribution speed for token\n mapping(address => uint256) public maxTokenDistributionSpeeds;\n\n /// @notice The block or second till which rewards are distributed for an asset\n mapping(address => uint256) public lastAccruedBlockOrSecond;\n\n /// @notice The token accrued but not yet transferred to prime contract\n mapping(address => uint256) internal _tokenAmountAccrued;\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 uint256[45] private __gap;\n}\n" + }, + "contracts/Tokens/Prime/PrimeStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\n/**\n * @title PrimeStorageV1\n * @author Venus\n * @notice Storage for Prime Token\n */\ncontract PrimeStorageV1 {\n struct Token {\n bool exists;\n bool isIrrevocable;\n }\n\n struct Market {\n uint256 supplyMultiplier;\n uint256 borrowMultiplier;\n uint256 rewardIndex;\n uint256 sumOfMembersScore;\n bool exists;\n }\n\n struct Interest {\n uint256 accrued;\n uint256 score;\n uint256 rewardIndex;\n }\n\n struct PendingReward {\n address vToken;\n address rewardToken;\n uint256 amount;\n }\n\n /// @notice Base unit for computations, usually used in scaling (multiplications, divisions)\n uint256 internal constant EXP_SCALE = 1e18;\n\n /// @notice maximum BPS = 100%\n uint256 internal constant MAXIMUM_BPS = 1e4;\n\n /// @notice Mapping to get prime token's metadata\n mapping(address => Token) public tokens;\n\n /// @notice Tracks total irrevocable tokens minted\n uint256 public totalIrrevocable;\n\n /// @notice Tracks total revocable tokens minted\n uint256 public totalRevocable;\n\n /// @notice Indicates maximum revocable tokens that can be minted\n uint256 public revocableLimit;\n\n /// @notice Indicates maximum irrevocable tokens that can be minted\n uint256 public irrevocableLimit;\n\n /// @notice Tracks when prime token eligible users started staking for claiming prime token\n mapping(address => uint256) public stakedAt;\n\n /// @notice vToken to market configuration\n mapping(address => Market) public markets;\n\n /// @notice vToken to user to user index\n mapping(address => mapping(address => Interest)) public interests;\n\n /// @notice A list of boosted markets\n address[] internal _allMarkets;\n\n /// @notice numerator of alpha. Ex: if alpha is 0.5 then this will be 1\n uint128 public alphaNumerator;\n\n /// @notice denominator of alpha. Ex: if alpha is 0.5 then this will be 2\n uint128 public alphaDenominator;\n\n /// @notice address of XVS vault\n address public xvsVault;\n\n /// @notice address of XVS vault reward token\n address public xvsVaultRewardToken;\n\n /// @notice address of XVS vault pool id\n uint256 public xvsVaultPoolId;\n\n /// @notice mapping to check if a account's score was updated in the round\n mapping(uint256 => mapping(address => bool)) public isScoreUpdated;\n\n /// @notice unique id for next round\n uint256 public nextScoreUpdateRoundId;\n\n /// @notice total number of accounts whose score needs to be updated\n uint256 public totalScoreUpdatesRequired;\n\n /// @notice total number of accounts whose score is yet to be updated\n uint256 public pendingScoreUpdates;\n\n /// @notice mapping used to find if an asset is part of prime markets\n mapping(address => address) public vTokenForAsset;\n\n /// @notice Address of core pool comptroller contract\n address internal corePoolComptroller;\n\n /// @notice unreleased income from PLP that's already distributed to prime holders\n /// @dev mapping of asset address => amount\n mapping(address => uint256) public unreleasedPLPIncome;\n\n /// @notice The address of PLP contract\n address public primeLiquidityProvider;\n\n /// @notice The address of ResilientOracle contract\n ResilientOracleInterface public oracle;\n\n /// @notice The address of PoolRegistry contract\n address public poolRegistry;\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 uint256[26] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "mode": "3" + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": ["storageLayout", "abi", "evm.methodIdentifiers", "metadata", "devdoc", "userdoc"], + "": ["ast"] + } + }, + "detectMissingLibraries": false, + "forceEVMLA": false, + "enableEraVMExtensions": false, + "libraries": {} + } +} diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts index 349f304e2..298d8258a 100644 --- a/hardhat.config.zksync.ts +++ b/hardhat.config.zksync.ts @@ -6,6 +6,7 @@ import "@matterlabs/hardhat-zksync-solc"; import "@matterlabs/hardhat-zksync-verify"; import "@nomicfoundation/hardhat-chai-matchers"; import "@typechain/hardhat"; +import "hardhat-dependency-compiler"; import "hardhat-deploy"; import { HardhatUserConfig, extendConfig } from "hardhat/config"; import { HardhatConfig } from "hardhat/types"; @@ -116,6 +117,13 @@ const config: HardhatUserConfig = { ], deployments: {}, }, + dependencyCompiler: { + paths: [ + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol", + "hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol", + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol", + ], + }, docgen: { outputDir: "./docgen-docs", pages: "files", diff --git a/package.json b/package.json index d656e30d8..b3f36a9c3 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "ethers": "^5.7.0", "hardhat": "^2.19.2", "hardhat-contract-sizer": "^2.8.0", + "hardhat-dependency-compiler": "^1.2.1", "hardhat-deploy": "^0.12.4", "hardhat-deploy-ethers": "^0.3.0-beta.13", "hardhat-gas-reporter": "^1.0.8", diff --git a/yarn.lock b/yarn.lock index 2074fb33f..a4fe3f28b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3780,6 +3780,7 @@ __metadata: ethers: ^5.7.0 hardhat: ^2.19.2 hardhat-contract-sizer: ^2.8.0 + hardhat-dependency-compiler: ^1.2.1 hardhat-deploy: ^0.12.4 hardhat-deploy-ethers: ^0.3.0-beta.13 hardhat-gas-reporter: ^1.0.8 @@ -7442,6 +7443,15 @@ __metadata: languageName: node linkType: hard +"hardhat-dependency-compiler@npm:^1.2.1": + version: 1.2.1 + resolution: "hardhat-dependency-compiler@npm:1.2.1" + peerDependencies: + hardhat: ^2.0.0 + checksum: cc18ca535d861ff06d906ce639669a366879e37f15cb6d83f6a516e183d3fa6d9964a551195fe7bc106dcb2fab2c96eb0360a55cf69fd2b759c6fd01c6dc3d8b + languageName: node + linkType: hard + "hardhat-deploy-ethers@npm:^0.3.0-beta.13": version: 0.3.0-beta.13 resolution: "hardhat-deploy-ethers@npm:0.3.0-beta.13" From b3281ebd86b662ce7ae29a2a35b7a29b81f39664 Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Tue, 30 Jul 2024 15:16:49 +0000 Subject: [PATCH 62/85] feat: updating deployment files --- deployments/zksyncsepolia.json | 5936 ++++++++++++++++++++++ deployments/zksyncsepolia_addresses.json | 7 + 2 files changed, 5943 insertions(+) diff --git a/deployments/zksyncsepolia.json b/deployments/zksyncsepolia.json index 6867b0fdc..c9721c68f 100644 --- a/deployments/zksyncsepolia.json +++ b/deployments/zksyncsepolia.json @@ -2,6 +2,5942 @@ "name": "zksyncsepolia", "chainId": "300", "contracts": { + "DefaultProxyAdmin": { + "address": "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeProxyAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + } + ], + "name": "getProxyImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract TransparentUpgradeableProxy", + "name": "proxy", + "type": "address" + }, + { + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ] + }, + "Prime": { + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AssetAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "ExpTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "IneligibleToClaim", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAlphaArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidComptroller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFixedPoint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "name": "InvalidFraction", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimestamp", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnNonRealResult", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "MarketAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "MarketNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoScoreUpdatesRequired", + "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": [], + "name": "UserHasNoPrimeToken", + "type": "error" + }, + { + "inputs": [], + "name": "WaitMoreTime", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldNumerator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "oldDenominator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newNumerator", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "newDenominator", + "type": "uint128" + } + ], + "name": "AlphaUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InterestClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "MarketAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldRevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRevocableLimit", + "type": "uint256" + } + ], + "name": "MintLimitsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldBorrowMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowMultiplier", + "type": "uint256" + } + ], + "name": "MultiplierUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "StakedAtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "TokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "UserScoreUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "MAXIMUM_XVS_CAP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_STAKED_XVS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NATIVE_MARKET", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STAKING_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WRAPPED_NATIVE_TOKEN", + "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": "vToken", + "type": "address" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "accrueInterestAndUpdateScore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "addMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "alphaDenominator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "alphaNumerator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "calculateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimTimeRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsStaked", + "type": "uint256" + } + ], + "name": "estimateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllMarkets", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getInterestAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getPendingRewards", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PrimeStorageV1.PendingReward[]", + "name": "pendingRewards", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "incomeDistributionYearly", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "xvsVault_", + "type": "address" + }, + { + "internalType": "address", + "name": "xvsVaultRewardToken_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "xvsVaultPoolId_", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "alphaNumerator_", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "alphaDenominator_", + "type": "uint128" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "primeLiquidityProvider_", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "poolRegistry_", + "type": "address" + } + ], + "name": "initializeV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "interests", + "outputs": [ + { + "internalType": "uint256", + "name": "accrued", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "score", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "irrevocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isScoreUpdated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "isUserPrimeHolder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + }, + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumOfMembersScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextScoreUpdateRoundId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingScoreUpdates", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primeLiquidityProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_irrevocableLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_revocableLimit", + "type": "uint256" + } + ], + "name": "setLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "timestamps", + "type": "uint256[]" + } + ], + "name": "setStakedAt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakedAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "togglePause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalIrrevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalRevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalScoreUpdatesRequired", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "unreleasedPLPIncome", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_alphaNumerator", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_alphaDenominator", + "type": "uint128" + } + ], + "name": "updateAlpha", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "updateMultipliers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "updateScores", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vTokenForAsset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "xvsUpdated", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultPoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "PrimeLiquidityProvider": { + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "FundsTransferIsPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "speed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSpeed", + "type": "uint256" + } + ], + "name": "InvalidDistributionSpeed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenAlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "TokenNotInitialized", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "MaxTokenDistributionSpeedUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPrimeToken", + "type": "address" + } + ], + "name": "PrimeTokenUpdated", + "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": "sweepAmount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenDistributionInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "TokenDistributionSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferredToPrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensAccrued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "token_", + "type": "address" + } + ], + "name": "accrueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "getEffectiveDistributionSpeed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + } + ], + "name": "initializeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "lastAccruedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAccruedBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxTokenDistributionSpeeds", + "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": "pauseFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "releaseFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resumeFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setMaxTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "prime_", + "type": "address" + } + ], + "name": "setPrimeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "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": "token_", + "type": "address" + } + ], + "name": "tokenAmountAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenDistributionSpeeds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ] + }, + "PrimeLiquidityProvider_Implementation": { + "address": "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "abi": [ + { + "inputs": [ + { + "internalType": "bool", + "name": "_timeBased", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_blocksPerYear", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AddressesMustDiffer", + "type": "error" + }, + { + "inputs": [], + "name": "FundsTransferIsPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sweepAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCaller", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "speed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxSpeed", + "type": "uint256" + } + ], + "name": "InvalidDistributionSpeed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenAlreadyInitialized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "TokenNotInitialized", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "MaxTokenDistributionSpeedUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPrimeToken", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPrimeToken", + "type": "address" + } + ], + "name": "PrimeTokenUpdated", + "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": "sweepAmount", + "type": "uint256" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenDistributionInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldSpeed", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSpeed", + "type": "uint256" + } + ], + "name": "TokenDistributionSpeedUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferredToPrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokensAccrued", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_MAX_DISTRIBUTION_SPEED", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "token_", + "type": "address" + } + ], + "name": "accrueTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "getEffectiveDistributionSpeed", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + } + ], + "name": "initializeTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "lastAccruedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "lastAccruedBlockOrSecond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxTokenDistributionSpeeds", + "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": "pauseFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "prime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token_", + "type": "address" + } + ], + "name": "releaseFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "resumeFundsTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "maxDistributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setMaxTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "prime_", + "type": "address" + } + ], + "name": "setPrimeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "tokens_", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "distributionSpeeds_", + "type": "uint256[]" + } + ], + "name": "setTokensDistributionSpeed", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "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": "token_", + "type": "address" + } + ], + "name": "tokenAmountAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenDistributionSpeeds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] + }, + "PrimeLiquidityProvider_Proxy": { + "address": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, + "Prime_Implementation": { + "address": "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_wrappedNativeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_nativeMarket", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_blocksPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_stakingPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minimumStakedXVS", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maximumXVSCap", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_timeBased", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AssetAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "ExpTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "IneligibleToClaim", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAlphaArguments", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidComptroller", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidFixedPoint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "n", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "d", + "type": "uint256" + } + ], + "name": "InvalidFraction", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLimit", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimestamp", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnNonRealResult", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "x", + "type": "int256" + } + ], + "name": "LnTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "MarketAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "MarketNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NoScoreUpdatesRequired", + "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": [], + "name": "UserHasNoPrimeToken", + "type": "error" + }, + { + "inputs": [], + "name": "WaitMoreTime", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldNumerator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "oldDenominator", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newNumerator", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "newDenominator", + "type": "uint128" + } + ], + "name": "AlphaUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InterestClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "MarketAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "oldIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldRevocableLimit", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "newIrrevocableLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRevocableLimit", + "type": "uint256" + } + ], + "name": "MintLimitsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "oldBorrowMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupplyMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowMultiplier", + "type": "uint256" + } + ], + "name": "MultiplierUpdated", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "StakedAtUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "TokenUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "UserScoreUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "MAXIMUM_XVS_CAP", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINIMUM_STAKED_XVS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NATIVE_MARKET", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STAKING_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WRAPPED_NATIVE_TOKEN", + "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": "vToken", + "type": "address" + } + ], + "name": "accrueInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "accrueInterestAndUpdateScore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "addMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "alphaDenominator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "alphaNumerator", + "outputs": [ + { + "internalType": "uint128", + "name": "", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "calculateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "claimTimeRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsStaked", + "type": "uint256" + } + ], + "name": "estimateAPR", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "supplyAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAPR", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "xvsBalanceForScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "capital", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "cappedBorrow", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCapUSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCapUSD", + "type": "uint256" + } + ], + "internalType": "struct IPrime.APRInfo", + "name": "aprInfo", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllMarkets", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getInterestAccrued", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "getPendingRewards", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PrimeStorageV1.PendingReward[]", + "name": "pendingRewards", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "incomeDistributionYearly", + "outputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "xvsVault_", + "type": "address" + }, + { + "internalType": "address", + "name": "xvsVaultRewardToken_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "xvsVaultPoolId_", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "alphaNumerator_", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "alphaDenominator_", + "type": "uint128" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "internalType": "address", + "name": "primeLiquidityProvider_", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "address", + "name": "oracle_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "loopsLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "poolRegistry_", + "type": "address" + } + ], + "name": "initializeV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "interests", + "outputs": [ + { + "internalType": "uint256", + "name": "accrued", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "score", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "irrevocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isScoreUpdated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "isUserPrimeHolder", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + }, + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "issue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sumOfMembersScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "exists", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextScoreUpdateRoundId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract ResilientOracleInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingScoreUpdates", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "primeLiquidityProvider", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revocableLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_irrevocableLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_revocableLimit", + "type": "uint256" + } + ], + "name": "setLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + } + ], + "name": "setMaxLoopsLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "timestamps", + "type": "uint256[]" + } + ], + "name": "setStakedAt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "stakedAt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "togglePause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "internalType": "bool", + "name": "exists", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isIrrevocable", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalIrrevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalRevocable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalScoreUpdatesRequired", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "unreleasedPLPIncome", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "_alphaNumerator", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_alphaDenominator", + "type": "uint128" + } + ], + "name": "updateAlpha", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplyMultiplier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowMultiplier", + "type": "uint256" + } + ], + "name": "updateMultipliers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "users", + "type": "address[]" + } + ], + "name": "updateScores", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "vTokenForAsset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "xvsUpdated", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVault", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultPoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "xvsVaultRewardToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] + }, + "Prime_Proxy": { + "address": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + }, "VTreasuryV8": { "address": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA", "abi": [ diff --git a/deployments/zksyncsepolia_addresses.json b/deployments/zksyncsepolia_addresses.json index d10d489aa..bc8f69e98 100644 --- a/deployments/zksyncsepolia_addresses.json +++ b/deployments/zksyncsepolia_addresses.json @@ -2,6 +2,13 @@ "name": "zksyncsepolia", "chainId": "300", "addresses": { + "DefaultProxyAdmin": "0x18E44f588a4DcF2F7145d35A5C226e129040b6D3", + "Prime": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", + "PrimeLiquidityProvider": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "PrimeLiquidityProvider_Implementation": "0xc2897703257C8cb174ed1Ec87Fa96d1847B4Cd5C", + "PrimeLiquidityProvider_Proxy": "0x3407c349F80E4E9544c73ca1E9334CeEA7266517", + "Prime_Implementation": "0x42639e7691189f8b87Ee0e1d209Af763855156C4", + "Prime_Proxy": "0x72b85930F7f8D00ACe5EAD10a315C17b8954FBcF", "VTreasuryV8": "0x943eBE4460a12F551D60A68f510Ea10CD8d564BA" } } From 72133a8b164f7f2f78bd4d795f5460f891c74c78 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Wed, 31 Jul 2024 15:57:41 +0530 Subject: [PATCH 63/85] fix: vpb-03 alleviation --- contracts/InterestRateModels/TwoKinksInterestRateModel.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 51e0eea12..1051bc1b8 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -84,7 +84,7 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 kink2_, int256 jumpMultiplierPerYear_ ) { - if (baseRatePerYear_ < 0 || baseRate2PerYear_ < 0 || kink1_ < 0 || kink2_ < 0) { + if (baseRatePerYear_ < 0 || baseRate2PerYear_ < 0) { revert NegativeValueNotAllowed(); } From 7d85093af922c9740205dfd1b957579d8d84ea4a Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 1 Aug 2024 15:37:08 +0530 Subject: [PATCH 64/85] chore: update oracle package version to fix cd --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 84f42f459..c3cf86472 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "@types/node": "^18.7.1", "@typescript-eslint/eslint-plugin": "^5.40.0", "@typescript-eslint/parser": "^5.40.0", - "@venusprotocol/oracle": "v2.3.0", + "@venusprotocol/oracle": "2.5.0-dev.2", "bignumber.js": "^9.1.2", "chai": "^4.3.6", "eslint": "^8.25.0", diff --git a/yarn.lock b/yarn.lock index 2074fb33f..eda1792cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3559,9 +3559,9 @@ __metadata: languageName: node linkType: hard -"@venusprotocol/oracle@npm:v2.3.0": - version: 2.3.0 - resolution: "@venusprotocol/oracle@npm:2.3.0" +"@venusprotocol/oracle@npm:2.5.0-dev.2": + version: 2.5.0-dev.2 + resolution: "@venusprotocol/oracle@npm:2.5.0-dev.2" dependencies: "@chainlink/contracts": ^0.5.1 "@defi-wonderland/smock": ^2.3.4 @@ -3573,10 +3573,10 @@ __metadata: "@venusprotocol/venus-protocol": ^6.0.0 ethers: ^5.6.8 hardhat: ^2.16.1 - hardhat-deploy: ^0.11.14 + hardhat-deploy: ^0.12.4 module-alias: ^2.2.2 solidity-docgen: ^0.6.0-beta.29 - checksum: 6ba484f72eef7701a92be1673ec5c3d7d180c79aa17c7b7ef0c3848fbf15b456e5cc7633bf0a1fbb4ff36ba05524b3f70f966e40c4f32f8b8cff551c6605878b + checksum: 86acf39fc66be4f1b1c673b5e040d29688e69ab5b77831d5abb481c407caf0f08caf79dcf7d679e3961fe2938a0acbfc7a5b4fb26f300c05807cf508e4eac6cd languageName: node linkType: hard @@ -3768,7 +3768,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.40.0 "@typescript-eslint/parser": ^5.40.0 "@venusprotocol/governance-contracts": ^2.1.0 - "@venusprotocol/oracle": v2.3.0 + "@venusprotocol/oracle": 2.5.0-dev.2 "@venusprotocol/protocol-reserve": ^2.0.0 "@venusprotocol/solidity-utilities": ^2.0.3 "@venusprotocol/token-bridge": ^2.0.0 From 3e9d5b151cdedaf393b77059da7e29b1d69a84da Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Thu, 1 Aug 2024 10:30:39 +0000 Subject: [PATCH 65/85] chore(release): 9.2.0-dev.6 [skip ci] ## [9.2.0-dev.6](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.5...v9.2.0-dev.6) (2024-08-01) ### Features * add config for zksync ([45b42ce](https://github.com/VenusProtocol/venus-protocol/commit/45b42ce826f6e1ab64c396678afd9c48e75b7e54)) * add VTreasuryV8 deployment on zksyncsepolia ([56b54c5](https://github.com/VenusProtocol/venus-protocol/commit/56b54c58d142b3ba67821f8c4b5334f1bf544aef)) * updating deployment files ([d4ddde4](https://github.com/VenusProtocol/venus-protocol/commit/d4ddde4536da12f659d8d58e3bfd5d2cc1deefa9)) ### Bug Fixes * remove zksyncsepolia in ci.yml ([637b94d](https://github.com/VenusProtocol/venus-protocol/commit/637b94d44d000cadae133973d8fff23811e23915)) --- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d79d1807..081abc5d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [9.2.0-dev.6](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.5...v9.2.0-dev.6) (2024-08-01) + + +### Features + +* add config for zksync ([45b42ce](https://github.com/VenusProtocol/venus-protocol/commit/45b42ce826f6e1ab64c396678afd9c48e75b7e54)) +* add VTreasuryV8 deployment on zksyncsepolia ([56b54c5](https://github.com/VenusProtocol/venus-protocol/commit/56b54c58d142b3ba67821f8c4b5334f1bf544aef)) +* updating deployment files ([d4ddde4](https://github.com/VenusProtocol/venus-protocol/commit/d4ddde4536da12f659d8d58e3bfd5d2cc1deefa9)) + + +### Bug Fixes + +* remove zksyncsepolia in ci.yml ([637b94d](https://github.com/VenusProtocol/venus-protocol/commit/637b94d44d000cadae133973d8fff23811e23915)) + ## [9.2.0-dev.5](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.4...v9.2.0-dev.5) (2024-07-29) diff --git a/package.json b/package.json index c3cf86472..ec8e05c49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.5", + "version": "9.2.0-dev.6", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 4fc6c70d1db5456f25ab4b4983a5c8676009ce4a Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:29:30 +0530 Subject: [PATCH 66/85] chore: yarn.lock --- yarn.lock | 1081 ++++++++++++----------------------------------------- 1 file changed, 249 insertions(+), 832 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3ef809e21..22d2b399e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -66,10 +66,10 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.24.8": - version: 7.25.0 - resolution: "@babel/compat-data@npm:7.25.0" - checksum: 2ddcf8517f15eb03a712707b5d4fb146e4db44f8ebd821c29ca19f2808ee2f013c7b2c1d5d686b255ffbfa417368d61ee563ccd5d3639ed4293ce308a5d5d481 +"@babel/compat-data@npm:^7.25.2": + version: 7.25.2 + resolution: "@babel/compat-data@npm:7.25.2" + checksum: b61bc9da7cfe249f19d08da00f4f0c20550cd9ad5bffcde787c2bf61a8a6fa5b66d92bbd89031f3a6e5495a799a2a2499f2947b6cc7964be41979377473ab132 languageName: node linkType: hard @@ -120,15 +120,15 @@ __metadata: linkType: hard "@babel/helper-compilation-targets@npm:^7.17.7": - version: 7.24.8 - resolution: "@babel/helper-compilation-targets@npm:7.24.8" + version: 7.25.2 + resolution: "@babel/helper-compilation-targets@npm:7.25.2" dependencies: - "@babel/compat-data": ^7.24.8 + "@babel/compat-data": ^7.25.2 "@babel/helper-validator-option": ^7.24.8 browserslist: ^4.23.1 lru-cache: ^5.1.1 semver: ^6.3.1 - checksum: 40c9e87212fffccca387504b259a629615d7df10fc9080c113da6c51095d3e8b622a1409d9ed09faf2191628449ea28d582179c5148e2e993a3140234076b8da + checksum: aed33c5496cb9db4b5e2d44e26bf8bc474074cc7f7bb5ebe1d4a20fdeb362cb3ba9e1596ca18c7484bcd6e5c3a155ab975e420d520c0ae60df81f9de04d0fd16 languageName: node linkType: hard @@ -171,16 +171,16 @@ __metadata: linkType: hard "@babel/helper-module-transforms@npm:^7.17.7": - version: 7.25.0 - resolution: "@babel/helper-module-transforms@npm:7.25.0" + version: 7.25.2 + resolution: "@babel/helper-module-transforms@npm:7.25.2" dependencies: "@babel/helper-module-imports": ^7.24.7 "@babel/helper-simple-access": ^7.24.7 "@babel/helper-validator-identifier": ^7.24.7 - "@babel/traverse": ^7.25.0 + "@babel/traverse": ^7.25.2 peerDependencies: "@babel/core": ^7.0.0 - checksum: 12270fe101a03e46e68d8166aca423c829472f735cd40b674a50c3061954475c840b0baee57ba546d5a51796715e0db8f781f556fb93e71529e5343bd3b6bd57 + checksum: 282d4e3308df6746289e46e9c39a0870819630af5f84d632559171e4fae6045684d771a65f62df3d569e88ccf81dc2def78b8338a449ae3a94bb421aa14fc367 languageName: node linkType: hard @@ -255,12 +255,14 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.17.3, @babel/parser@npm:^7.17.8, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/parser@npm:7.25.0" +"@babel/parser@npm:^7.17.3, @babel/parser@npm:^7.17.8, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": + version: 7.25.3 + resolution: "@babel/parser@npm:7.25.3" + dependencies: + "@babel/types": ^7.25.2 bin: parser: ./bin/babel-parser.js - checksum: e0f0f5a0d323c8ebaa7caa5a982ce82a87d1f7176939642020beed021024af523e69e30b8918be82d02666742dfe0aad562c65edfd1a696785d76a2882e7904c + checksum: b55aba64214fa1d66ccd0d29f476d2e55a48586920d280f88c546f81cbbececc0e01c9d05a78d6bf206e8438b9c426caa344942c1a581eecc4d365beaab8a20e languageName: node linkType: hard @@ -293,18 +295,18 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.17.3, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.25.0": - version: 7.25.1 - resolution: "@babel/traverse@npm:7.25.1" +"@babel/traverse@npm:^7.17.3, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.25.2": + version: 7.25.3 + resolution: "@babel/traverse@npm:7.25.3" dependencies: "@babel/code-frame": ^7.24.7 "@babel/generator": ^7.25.0 - "@babel/parser": ^7.25.0 + "@babel/parser": ^7.25.3 "@babel/template": ^7.25.0 - "@babel/types": ^7.25.0 + "@babel/types": ^7.25.2 debug: ^4.3.1 globals: ^11.1.0 - checksum: c22a5ced9aef2669fd18936e3d919481cc4c12055f2e3b91e0761b2f89e26e4c6b51bfc4577f1a52ddb8734199d9917ec09027a378a6eb25ffe844704741f50e + checksum: 5661308b1357816f1d4e2813a5dd82c6053617acc08c5c95db051b8b6577d07c4446bc861c9a5e8bf294953ac8266ae13d7d9d856b6b889fc0d34c1f51abbd8c languageName: node linkType: hard @@ -318,25 +320,14 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.17.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.8.3": - version: 7.25.0 - resolution: "@babel/types@npm:7.25.0" +"@babel/types@npm:^7.17.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.8.3": + version: 7.25.2 + resolution: "@babel/types@npm:7.25.2" dependencies: "@babel/helper-string-parser": ^7.24.8 "@babel/helper-validator-identifier": ^7.24.7 to-fast-properties: ^2.0.0 - checksum: 58645192c73ea1adf72b3311c46e6f656bb3f52adb285c3ae0566e62a3d9ea1998449e88c6590501cb7aa9fe3411bb66288c961b9ebb5c4e9c433bad8619efaa - languageName: node - linkType: hard - -"@babel/types@npm:^7.23.3": - version: 7.23.3 - resolution: "@babel/types@npm:7.23.3" - dependencies: - "@babel/helper-string-parser": ^7.22.5 - "@babel/helper-validator-identifier": ^7.22.20 - to-fast-properties: ^2.0.0 - checksum: b96f1ec495351aeb2a5f98dd494aafa17df02a351548ae96999460f35c933261c839002a34c1e83552ff0d9f5e94d0b5b8e105d38131c7c9b0f5a6588676f35d + checksum: f73f66ba903c6f7e38f519a33d53a67d49c07e208e59ea65250362691dc546c6da7ab90ec66ee79651ef697329872f6f97eb19a6dfcacc026fd05e76a563c5d2 languageName: node linkType: hard @@ -1456,154 +1447,67 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-darwin-arm64@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.4.2" - checksum: 7835e998c2ef83924efac0694bb4392f6abf770dc7f935dd28abc1a291f830cade14750d83a46a3205338e4ddff943dda60a9849317cf42edd38d7a2ce843588 - languageName: node - linkType: hard - -"@nomicfoundation/edr-darwin-x64@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" - checksum: 94daa26610621e85cb025feb37bb93e9b89c59f908bf3eae70720d2b86632dbb1236420ae3ae6f685d563ba52519d5f860e68ccd898fa1fced831961dea2c08a +"@nomicfoundation/edr-darwin-arm64@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.5.0" + checksum: fb05b125449c98df55c6b657d1453fe7a44baabad222b8a2cefe77dba3d2758b77c5a67d2c6b55b5145e1a6980d16f0e14d20e265fd332eb6ea1a6080616ed46 languageName: node linkType: hard -"@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" - checksum: a7181e237f6ece8bd97e0f75972044dbf584c506bbac5bef586d9f7d627a2c07a279a2d892837bbedc80ea3dfb39fa66becc297238b5d715a942eed2a50745cd +"@nomicfoundation/edr-darwin-x64@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.5.0" + checksum: 3ed082b9c8cb258675c5c4aea33bd3f5e05149317a258287cc5db263db1aca81e88ece3f22d779124d891fd79f049a9397f0152f61c2116d523be4b10b9bf0bf languageName: node linkType: hard -"@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" - checksum: 5a849484b7a104a7e1497774c4117afc58f64d57d30889d4f6f676dddb5c695192c0789b8be0b71171a2af770167a28aa301ae3ece7a2a156d82d94388639b66 +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.5.0" + checksum: 9c876be2926fc170273da28d5935d14aad0c8345f9ae31e058adb248c169394474286cd9be0fa1edba1ec03a4a34ed86d1c4864ce34f47b86ac4c4830e902a70 languageName: node linkType: hard -"@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" - checksum: 0520dd9a583976fd0f49dfe6c23227f03cd811a395dc5eed1a2922b4358d7c71fdcfea8f389d4a0e23b4ec53e1435959a544380f94e48122a75f94a42b177ac7 +"@nomicfoundation/edr-linux-arm64-musl@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.5.0" + checksum: 9edaeed61cecf138c02b6363095467cfa4e5c2faad83e4d9ea257d04191bd611ac8d9ca2dbcb873d19e22ed9f88bdf9e4cb0a71dddb48a1be4205bb629b49b72 languageName: node linkType: hard -"@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" - checksum: 80c3b4346d8c27539bc005b09db233dedd8930310d1a049827661e69a8e03be9cbac27eb620a6ae9bfd46a2fbe22f83cee5af8d9e63178925d74d9c656246708 +"@nomicfoundation/edr-linux-x64-gnu@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.5.0" + checksum: 6ad88a1df9eb85746f183502bc186c45d3cea91718b57c4f744c865ff1958b255eb88bc5d34dbc27d53aa0e6e67c339f84cac85ad8b54fadae4d992f79de3072 languageName: node linkType: hard -"@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.4.2" - checksum: 736fb866fd5c2708560cbd5ae72815b5fc96e650cd74bc8bab0a1cb0e8baede4f595fdceb445c159814a6a7e8e691de227a5db49f61b3cd0ddfafd5715b397ab +"@nomicfoundation/edr-linux-x64-musl@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.5.0" + checksum: 63f886307e147d1ab01779e860095f4dc23256176796256962aa90cfe80aed7ea30e3bde66e2a7283860a832ff8d0a63c4234bd67f89e5188afc576816350e3d languageName: node linkType: hard -"@nomicfoundation/edr@npm:^0.4.1": - version: 0.4.2 - resolution: "@nomicfoundation/edr@npm:0.4.2" - dependencies: - "@nomicfoundation/edr-darwin-arm64": 0.4.2 - "@nomicfoundation/edr-darwin-x64": 0.4.2 - "@nomicfoundation/edr-linux-arm64-gnu": 0.4.2 - "@nomicfoundation/edr-linux-arm64-musl": 0.4.2 - "@nomicfoundation/edr-linux-x64-gnu": 0.4.2 - "@nomicfoundation/edr-linux-x64-musl": 0.4.2 - "@nomicfoundation/edr-win32-x64-msvc": 0.4.2 - checksum: 8c8457257b59ed9a29d88b7492e98e974d24e8318903e876a14dc0f6d5dc77948cd9053937d9730f54f920ba82ce3d244cab518d068359bcc20df88623f171ef +"@nomicfoundation/edr-win32-x64-msvc@npm:0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.5.0" + checksum: 04c8546a6f672380dd04a28636ec0df56a832e48e8fe91d925277c38434a553b633c72294440b89c07d309006c5f40cc2f182ef94d52d6c8685d84d64fb8a914 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-block@npm:4.2.2": - version: 4.2.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-tx": 4.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - checksum: 174a251d9c4e0bb9c1a7a6e77c52f1b2b4708d8135dba55c1025776248258ce905e4383a79da0ce7ac4e67e03b6c56351ca634a771b5eae976ed97498fc163f9 - languageName: node - linkType: hard - -"@nomicfoundation/edr-darwin-x64@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-darwin-x64@npm:0.4.2" - checksum: 94daa26610621e85cb025feb37bb93e9b89c59f908bf3eae70720d2b86632dbb1236420ae3ae6f685d563ba52519d5f860e68ccd898fa1fced831961dea2c08a - languageName: node - linkType: hard - -"@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.4.2" - checksum: a7181e237f6ece8bd97e0f75972044dbf584c506bbac5bef586d9f7d627a2c07a279a2d892837bbedc80ea3dfb39fa66becc297238b5d715a942eed2a50745cd - languageName: node - linkType: hard - -"@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.4.2" - checksum: 5a849484b7a104a7e1497774c4117afc58f64d57d30889d4f6f676dddb5c695192c0789b8be0b71171a2af770167a28aa301ae3ece7a2a156d82d94388639b66 - languageName: node - linkType: hard - -"@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.4.2" - checksum: 0520dd9a583976fd0f49dfe6c23227f03cd811a395dc5eed1a2922b4358d7c71fdcfea8f389d4a0e23b4ec53e1435959a544380f94e48122a75f94a42b177ac7 - languageName: node - linkType: hard - -"@nomicfoundation/edr-linux-x64-musl@npm:0.4.2": - version: 0.4.2 - resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.4.2" - checksum: 80c3b4346d8c27539bc005b09db233dedd8930310d1a049827661e69a8e03be9cbac27eb620a6ae9bfd46a2fbe22f83cee5af8d9e63178925d74d9c656246708 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-common@npm:4.0.4": - version: 4.0.4 - resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" - dependencies: - "@nomicfoundation/ethereumjs-util": 9.0.4 - checksum: ce3f6e4ae15b976efdb7ccda27e19aadb62b5ffee209f9503e68b4fd8633715d4d697c0cc10ccd35f5e4e977edd05100d0f214e28880ec64fff77341dc34fcdf - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-ethash@npm:2.0.5": - version: 2.0.5 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.5" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - abstract-level: ^1.0.3 - bigint-crypto-utils: ^3.0.23 - ethereum-cryptography: 0.1.3 - checksum: 0b03c8771602cfa64c9d35e5686326d0bfecb7dc0874cd9ff737cae0ec401396187d8499c103b8858fed5b9bd930e132b8fd09d19b3f0649df36d7d0fdf4d27c - languageName: node - linkType: hard - -"@nomicfoundation/edr@npm:^0.4.1": - version: 0.4.2 - resolution: "@nomicfoundation/edr@npm:0.4.2" +"@nomicfoundation/edr@npm:^0.5.0": + version: 0.5.0 + resolution: "@nomicfoundation/edr@npm:0.5.0" dependencies: - "@nomicfoundation/edr-darwin-arm64": 0.4.2 - "@nomicfoundation/edr-darwin-x64": 0.4.2 - "@nomicfoundation/edr-linux-arm64-gnu": 0.4.2 - "@nomicfoundation/edr-linux-arm64-musl": 0.4.2 - "@nomicfoundation/edr-linux-x64-gnu": 0.4.2 - "@nomicfoundation/edr-linux-x64-musl": 0.4.2 - "@nomicfoundation/edr-win32-x64-msvc": 0.4.2 - checksum: 8c8457257b59ed9a29d88b7492e98e974d24e8318903e876a14dc0f6d5dc77948cd9053937d9730f54f920ba82ce3d244cab518d068359bcc20df88623f171ef + "@nomicfoundation/edr-darwin-arm64": 0.5.0 + "@nomicfoundation/edr-darwin-x64": 0.5.0 + "@nomicfoundation/edr-linux-arm64-gnu": 0.5.0 + "@nomicfoundation/edr-linux-arm64-musl": 0.5.0 + "@nomicfoundation/edr-linux-x64-gnu": 0.5.0 + "@nomicfoundation/edr-linux-x64-musl": 0.5.0 + "@nomicfoundation/edr-win32-x64-msvc": 0.5.0 + checksum: 4fe46ee81d48056f6b0a6c3562291146ca54c68419707b0bc38a1305d1f2cc74d0b246716d9da116f00bc63d335a36776f30d860981f253b71928d91053b2675 languageName: node linkType: hard @@ -1625,104 +1529,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" - bin: - rlp: bin/rlp - checksum: a74434cadefca9aa8754607cc1ad7bb4bbea4ee61c6214918e60a5bbee83206850346eb64e39fd1fe97f854c7ec0163e01148c0c881dda23881938f0645a0ef2 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-rlp@npm:5.0.4": - version: 5.0.4 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" - bin: - rlp: bin/rlp.cjs - checksum: ee2c2e5776c73801dc5ed636f4988b599b4563c2d0037da542ea57eb237c69dd1ac555f6bcb5e06f70515b6459779ba0d68252a6e105132b4659ab4bf62919b0 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-statemanager@npm:1.0.5": - version: 1.0.5 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.4 - "@nomicfoundation/ethereumjs-rlp": 5.0.4 - "@nomicfoundation/ethereumjs-util": 9.0.4 - ethereum-cryptography: 0.1.3 - peerDependencies: - c-kzg: ^2.1.2 - peerDependenciesMeta: - c-kzg: - optional: true - checksum: 0f1c87716682ccbcf4d92ffc6cf8ab557e658b90319d82be3219a091a736859f8803c73c98e4863682e3e86d264751c472d33ff6d3c3daf4e75b5f01d0af8fa3 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-util@npm:9.0.4, @nomicfoundation/ethereumjs-util@npm:^9.0.4": - version: 9.0.4 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 5.0.4 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - js-sdsl: ^4.1.4 - checksum: 3ab6578e252e53609afd98d8ba42a99f182dcf80252f23ed9a5e0471023ffb2502130f85fc47fa7c94cd149f9be799ed9a0942ca52a143405be9267f4ad94e64 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-trie@npm:5.0.5": - version: 5.0.5 - resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.5" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: bed56b55093275166c40d0aa097b32d348b3795cbfdc3797d48d136a578161431e70f30bcf453b74b52f77b897d79b61a3fb9d1abd10187c0cb7f25e40dea9c5 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-trie@npm:6.0.2": - version: 6.0.2 - resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@types/readable-stream": ^2.3.13 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: d4da918d333851b9f2cce7dbd25ab5753e0accd43d562d98fd991b168b6a08d1794528f0ade40fe5617c84900378376fe6256cdbe52c8d66bf4c53293bbc7c40 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-tx@npm:4.1.2": - version: 4.1.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:4.1.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - checksum: 209622bdc56e5f1267e5d2de69ed18388b141edc568f739f0ed865aecfe96e07c381aab779ed0adacefeae4da5be64fa1110a02e481e9a7c343bf0d53f4fd1b9 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-tx@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" - dependencies: - "@chainsafe/ssz": ^0.9.2 - "@ethersproject/providers": ^5.7.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - checksum: 0bbcea75786b2ccb559afe2ecc9866fb4566a9f157b6ffba4f50960d14f4b3da2e86e273f6fadda9b860e67cfcabf589970fb951b328cb5f900a585cd21842a2 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-tx@npm:5.0.4": version: 5.0.4 resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" @@ -1740,28 +1546,7 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:8.0.6, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": - version: 8.0.6 - resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.6" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - ethereum-cryptography: 0.1.3 - checksum: 7a51c2069702750d94bf6bc5afd4a26c50321fe42504339d5275b60974941451eb41232f8a08c307797bcd498f20a3b27074351a76abdfc36a5e74473a7eda01 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-util@npm:9.0.2": - version: 9.0.2 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" - dependencies: - "@chainsafe/ssz": ^0.10.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - ethereum-cryptography: 0.1.3 - checksum: 3a08f7b88079ef9f53b43da9bdcb8195498fd3d3911c2feee2571f4d1204656053f058b2f650471c86f7d2d0ba2f814768c7cfb0f266eede41c848356afc4900 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-util@npm:9.0.4": +"@nomicfoundation/ethereumjs-util@npm:9.0.4, @nomicfoundation/ethereumjs-util@npm:^9.0.4": version: 9.0.4 resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" dependencies: @@ -1776,51 +1561,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-vm@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 1c25ba4d0644cadb8a2b0241a4bb02e578bfd7f70e3492b855c2ab5c120cb159cb8f7486f84dc1597884bd1697feedbfb5feb66e91352afb51f3694fd8e4a043 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-vm@npm:^6.0.0-rc.3": - version: 6.4.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:6.4.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-blockchain": 6.2.2 - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-evm": 1.3.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-statemanager": 1.0.5 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-tx": 4.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - "@types/async-eventemitter": ^0.2.1 - async-eventemitter: ^0.2.4 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - functional-red-black-tree: ^1.0.1 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 9138b8cce872a51fe2e378942c52fc6c54d8126ff094ba6bb78cbb630cafa20d7fbaa2b08bdcf7cad6de78e19ce68493ddbcc2e02acb7c803b866dc121274ea7 - languageName: node - linkType: hard - "@nomicfoundation/hardhat-chai-matchers@npm:^1.0.3": version: 1.0.6 resolution: "@nomicfoundation/hardhat-chai-matchers@npm:1.0.6" @@ -1891,8 +1631,8 @@ __metadata: linkType: hard "@nomicfoundation/hardhat-verify@npm:^2.0.8": - version: 2.0.8 - resolution: "@nomicfoundation/hardhat-verify@npm:2.0.8" + version: 2.0.9 + resolution: "@nomicfoundation/hardhat-verify@npm:2.0.9" dependencies: "@ethersproject/abi": ^5.1.2 "@ethersproject/address": ^5.0.2 @@ -1904,15 +1644,88 @@ __metadata: table: ^6.8.0 undici: ^5.14.0 peerDependencies: - hardhat: ^2.0.4 - checksum: 2c6d239a08e7aca26625ab8c3637e5e7c1e7c8a88f62fb80c6a008fd56352431856aaf79b7a24b1755a6ee48d1423995e02d85a58ea53ceb5552b30c03073c97 + hardhat: "*" + checksum: c010d5c147fefb23d971969dc7479aac45a0bb8977e86e04c579228ab9683189e7bdebbd7b5f70fe96a10c9d0a2849aab1f10bacad56c925f6255becfd2d585c languageName: node linkType: hard -"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": - version: 0.1.1 - resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" - conditions: os=darwin & cpu=arm64 +"@nomicfoundation/slang-darwin-arm64@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-darwin-arm64@npm:0.15.1" + checksum: b683985cb482e0fb811ad817628b1518e0085d07dabc3e51f8762b528c9b328470d6f5513869d0a21047520db44a1cec94beff032309784187ec23e48d75f21a + languageName: node + linkType: hard + +"@nomicfoundation/slang-darwin-x64@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-darwin-x64@npm:0.15.1" + checksum: 396b8b600cf3b9c200c31544ea3ac914339b2117143d64088c2576ea7877eb28bca112bb01892a1052e9b175a745714c19d03ab6dc664ce825e9f8272881926b + languageName: node + linkType: hard + +"@nomicfoundation/slang-linux-arm64-gnu@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-linux-arm64-gnu@npm:0.15.1" + checksum: de364b41a47f8df8db487e0db6e9259f56c3f5eba59a18b20090016ded8b182c5873e8a6f8a0ba1820d27e7e632c7f10d97f753155010093a87a816f31efd023 + languageName: node + linkType: hard + +"@nomicfoundation/slang-linux-arm64-musl@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-linux-arm64-musl@npm:0.15.1" + checksum: d48e6150f6640b49821467c1feb08852de670d726f38816c5dc7d2ea06e96afdc8816b9f60e2a1e0024094b26d06687d363b38eeebf5839e917ab34901973bda + languageName: node + linkType: hard + +"@nomicfoundation/slang-linux-x64-gnu@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-linux-x64-gnu@npm:0.15.1" + checksum: e0705a5ec7df55f9602eaa85e892d25ce8a80fd02a09fe0a5a0e953a98dda4f87b0d28cc529ff7b1f09baf739d98d6cba0cb6556ed7624c5fcfcd75b713996d1 + languageName: node + linkType: hard + +"@nomicfoundation/slang-linux-x64-musl@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-linux-x64-musl@npm:0.15.1" + checksum: d51a63454b80940fed980f93d78a62e01443a910e57531fb39e81397cebed6e1520dffcd3616f9f60bae2cc81f3a8c29197fc0d49cbf262e1b076e0db47ba9a7 + languageName: node + linkType: hard + +"@nomicfoundation/slang-win32-arm64-msvc@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-win32-arm64-msvc@npm:0.15.1" + checksum: 8dd352ee22b55af5763cfe5fce790bb8fc005f0b0049f0730142523655e52e20ce8c281d632e63eae33ec07121445e06b0e309f38eeb0a8d3614abdab39d8cf1 + languageName: node + linkType: hard + +"@nomicfoundation/slang-win32-ia32-msvc@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-win32-ia32-msvc@npm:0.15.1" + checksum: d36a0c6ab9ac1b3df76cfd68586f259e6b0be755a7c9b8f37eae915ba943d4f394e1cfc8b56f9ba581cdec17017d288c89ec39bee37d040f6f008e00ff0c9786 + languageName: node + linkType: hard + +"@nomicfoundation/slang-win32-x64-msvc@npm:0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang-win32-x64-msvc@npm:0.15.1" + checksum: 7a4faa87c4958f217360a28236c8c2cddb8ec55407f25e8239ad5f7399b034d5a3a7666470d3e9babbf917fdfa2719d7985b7ab5276ea2d7e6804c6cf6d0cd1e + languageName: node + linkType: hard + +"@nomicfoundation/slang@npm:^0.15.1": + version: 0.15.1 + resolution: "@nomicfoundation/slang@npm:0.15.1" + dependencies: + "@nomicfoundation/slang-darwin-arm64": 0.15.1 + "@nomicfoundation/slang-darwin-x64": 0.15.1 + "@nomicfoundation/slang-linux-arm64-gnu": 0.15.1 + "@nomicfoundation/slang-linux-arm64-musl": 0.15.1 + "@nomicfoundation/slang-linux-x64-gnu": 0.15.1 + "@nomicfoundation/slang-linux-x64-musl": 0.15.1 + "@nomicfoundation/slang-win32-arm64-msvc": 0.15.1 + "@nomicfoundation/slang-win32-ia32-msvc": 0.15.1 + "@nomicfoundation/slang-win32-x64-msvc": 0.15.1 + checksum: a06384181eb1d13fa659d6a0ad6d26f05cbf1286e83c48dfc458dc22f11a57092ac045b87435294eb04d2aa4949765514466b7b3c1be2e3a9b99c3b2d44670c5 languageName: node linkType: hard @@ -2408,21 +2221,7 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts-upgradeable@npm:^4.6.0": - version: 4.9.5 - resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.5" - checksum: d5d9bad93fe2a88a8336060901d45f185ebfe1fed9844b1fe50e8641d946588c6e69a5a8f1694f0bd073c913b4b9a5c34316acfc17d8f75228adecbcb635ea62 - languageName: node - linkType: hard - -"@openzeppelin/contracts-upgradeable@npm:^4.7.3, @openzeppelin/contracts-upgradeable@npm:^4.8.0, @openzeppelin/contracts-upgradeable@npm:^4.8.3": - version: 4.9.3 - resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.3" - checksum: bda0240b1d44c913ec5a4e109c622f216c2bbd7b468d210822f75782a5f7fe0609d08bf03b78b253333625e99e507cf2f75212f1de3b274bd9fc64ae967aeec3 - languageName: node - linkType: hard - -"@openzeppelin/contracts-upgradeable@npm:^4.9.2": +"@openzeppelin/contracts-upgradeable@npm:^4.6.0, @openzeppelin/contracts-upgradeable@npm:^4.7.3, @openzeppelin/contracts-upgradeable@npm:^4.8.0, @openzeppelin/contracts-upgradeable@npm:^4.8.3, @openzeppelin/contracts-upgradeable@npm:^4.9.2": version: 4.9.6 resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.6" checksum: 481075e7222cab025ae55304263fca69a2d04305521957bc16d2aece9fa2b86b6914711724822493e3d04df7e793469cd0bcb1e09f0ddd10cb4e360ac7eed12a @@ -2443,14 +2242,7 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:^4.4.1": - version: 4.9.5 - resolution: "@openzeppelin/contracts@npm:4.9.5" - checksum: 2cddeb08c006a8f99c5cc40cc80aecb449fd941cd1a92ebda315d77f48c4b4d487798a1254bffbc3ec811b390365d14665e92dbb2dd8f45aacef479d69d94574 - languageName: node - linkType: hard - -"@openzeppelin/contracts@npm:^4.9.2": +"@openzeppelin/contracts@npm:^4.3.3, @openzeppelin/contracts@npm:^4.4.1, @openzeppelin/contracts@npm:^4.6.0, @openzeppelin/contracts@npm:^4.8.3, @openzeppelin/contracts@npm:^4.9.2": version: 4.9.6 resolution: "@openzeppelin/contracts@npm:4.9.6" checksum: 274b6e968268294f12d5ca4f0278f6e6357792c8bb4d76664f83dbdc325f780541538a127e6a6e97e4f018088b42f65952014dec9c745c0fa25081f43ef9c4bf @@ -2508,9 +2300,10 @@ __metadata: linkType: hard "@openzeppelin/upgrades-core@npm:^1.27.0": - version: 1.34.4 - resolution: "@openzeppelin/upgrades-core@npm:1.34.4" + version: 1.35.0 + resolution: "@openzeppelin/upgrades-core@npm:1.35.0" dependencies: + "@nomicfoundation/slang": ^0.15.1 cbor: ^9.0.0 chalk: ^4.1.0 compare-versions: ^6.0.0 @@ -2521,7 +2314,7 @@ __metadata: solidity-ast: ^0.4.51 bin: openzeppelin-upgrades-core: dist/cli/cli.js - checksum: 5b424201e2deb41e8d1be00375768d8477b190ba70ca5af2385fb2437f9804be8fd5fee717c47734e3058a9568b52cad4101de47ef760abcf839e007df3eb2dd + checksum: 19981a27fee720e9526c1b72d7aaeaa3593409cf7437317ce6ddc6059ccade8088642dfb73f9ada60d254da4a8a187081ab0a99ab66106e683b4d901c26c9ce7 languageName: node linkType: hard @@ -2879,51 +2672,6 @@ __metadata: languageName: node linkType: hard -"@smithy/types@npm:^2.4.0": - version: 2.5.0 - resolution: "@smithy/types@npm:2.5.0" - dependencies: - type-detect: 4.0.8 - checksum: 5023ba17edf2b85ed58262313b8e9b59e23c6860681a9af0200f239fe939e2b79736d04a260e8270ddd57196851dde3ba754d7230be5c5234e777ae2ca8af137 - languageName: node - linkType: hard - -"@sinonjs/commons@npm:^3.0.0, @sinonjs/commons@npm:^3.0.1": - version: 3.0.1 - resolution: "@sinonjs/commons@npm:3.0.1" - dependencies: - type-detect: 4.0.8 - checksum: a7c3e7cc612352f4004873747d9d8b2d4d90b13a6d483f685598c945a70e734e255f1ca5dc49702515533c403b32725defff148177453b3f3915bcb60e9d4601 - languageName: node - linkType: hard - -"@sinonjs/fake-timers@npm:^11.2.2": - version: 11.2.2 - resolution: "@sinonjs/fake-timers@npm:11.2.2" - dependencies: - "@sinonjs/commons": ^3.0.0 - checksum: 68c29b0e1856fdc280df03ddbf57c726420b78e9f943a241b471edc018fb14ff36fdc1daafd6026cba08c3c7f50c976fb7ae11b88ff44cd7f609692ca7d25158 - languageName: node - linkType: hard - -"@sinonjs/samsam@npm:^8.0.0": - version: 8.0.0 - resolution: "@sinonjs/samsam@npm:8.0.0" - dependencies: - "@sinonjs/commons": ^2.0.0 - lodash.get: ^4.4.2 - type-detect: ^4.0.8 - checksum: 95e40d0bb9f7288e27c379bee1b03c3dc51e7e78b9d5ea6aef66a690da7e81efc4715145b561b449cefc5361a171791e3ce30fb1a46ab247d4c0766024c60a60 - languageName: node - linkType: hard - -"@sinonjs/text-encoding@npm:^0.7.2": - version: 0.7.2 - resolution: "@sinonjs/text-encoding@npm:0.7.2" - checksum: fe690002a32ba06906cf87e2e8fe84d1590294586f2a7fd180a65355b53660c155c3273d8011a5f2b77209b819aa7306678ae6e4aea0df014bd7ffd4bbbcf1ab - languageName: node - linkType: hard - "@smithy/types@npm:^3.3.0": version: 3.3.0 resolution: "@smithy/types@npm:3.3.0" @@ -3099,9 +2847,9 @@ __metadata: linkType: hard "@types/chai@npm:*, @types/chai@npm:^4.3.1": - version: 4.3.16 - resolution: "@types/chai@npm:4.3.16" - checksum: bb5f52d1b70534ed8b4bf74bd248add003ffe1156303802ea367331607c06b494da885ffbc2b674a66b4f90c9ee88759790a5f243879f6759f124f22328f5e95 + version: 4.3.17 + resolution: "@types/chai@npm:4.3.17" + checksum: 56661c74c76df06547e3584be4a2b85eec60e7de4c0f6e7bbf7bf492a0ce96ce5bfc30f52a8889a7b35e24161d225e4a57041d4fa80f6e5592fea78e45dfd34c languageName: node linkType: hard @@ -3169,11 +2917,11 @@ __metadata: linkType: hard "@types/node@npm:*": - version: 22.0.0 - resolution: "@types/node@npm:22.0.0" + version: 22.0.2 + resolution: "@types/node@npm:22.0.2" dependencies: undici-types: ~6.11.1 - checksum: ef58d59bbffd9a79449ef632ea9a4f3b006496926cac2717368f80fdd152b1937e44093c17c9fac74650309c9d5387bb5c5bf4fd304adafebcbda1e6e4435fe4 + checksum: a83d7e9c81ddc5e58050b61413e871e68468f127367172fa4c14ba3182f8548be59e045096619a4742d665c38790d9843b71664ec61c0ec4ba59c771a739eded languageName: node linkType: hard @@ -3406,23 +3154,7 @@ __metadata: "@venusprotocol/solidity-utilities": 2.0.0 hardhat-deploy-ethers: ^0.3.0-beta.13 module-alias: ^2.2.2 - checksum: af3f5e8705e54c99a86f47007ce67a04bb1f110c679ad2f9d722f548883b1eb14a28b54c46ee8340d7fa1ba097e1e4d788c98850ee046abe4d91a0315879ec9f - languageName: node - linkType: hard - -"@venusprotocol/isolated-pools@npm:^2.3.0": - version: 2.4.0 - resolution: "@venusprotocol/isolated-pools@npm:2.4.0" - dependencies: - "@nomiclabs/hardhat-ethers": ^2.2.3 - "@openzeppelin/contracts": ^4.8.3 - "@openzeppelin/contracts-upgradeable": ^4.8.3 - "@openzeppelin/hardhat-upgrades": ^1.21.0 - "@solidity-parser/parser": ^0.13.2 - ethers: ^5.7.0 - hardhat-deploy: ^0.11.14 - module-alias: ^2.2.2 - checksum: c67b2d1eaf2ae7cae1e7b73799ec1dd0ffd3bc996bea09fc6e6c909f416f65fa168bd0690034ce8882da0d0b9a8825032dde3dd15bad392a5a5cad32bf697a73 + checksum: 8e6ba9b824a47cc03b296e4cfa2f9781e30e412710dd71f1e52d7b0d41d8cd6efb0b877239edadbf4eb382bda57436d96a4ee5cac6d0fae29b555ccdb68fc8c0 languageName: node linkType: hard @@ -3634,78 +3366,60 @@ __metadata: languageName: unknown linkType: soft -"@vue/compiler-core@npm:3.4.34": - version: 3.4.34 - resolution: "@vue/compiler-core@npm:3.4.34" +"@vue/compiler-core@npm:3.4.35": + version: 3.4.35 + resolution: "@vue/compiler-core@npm:3.4.35" dependencies: "@babel/parser": ^7.24.7 - "@vue/shared": 3.4.34 + "@vue/shared": 3.4.35 entities: ^4.5.0 estree-walker: ^2.0.2 source-map-js: ^1.2.0 - checksum: 397e76fec66bb5481b32823aa9530e9810bb39c33b5ac78b4488e8814f5779bbc4d1d85cac98fe96c3036e83105ccad0fb813e15cb8b5d201343dfef99750041 + checksum: 9f050edee2efefd214dcff65efea7f9faab63bab34ce31fb6ea08a7a12bad5a792b2b9f31e2f72a3d034474bd217707c769a5341e9006c8d442024647895cdd5 languageName: node linkType: hard -"@vue/compiler-dom@npm:3.4.34": - version: 3.4.34 - resolution: "@vue/compiler-dom@npm:3.4.34" +"@vue/compiler-dom@npm:3.4.35": + version: 3.4.35 + resolution: "@vue/compiler-dom@npm:3.4.35" dependencies: - "@vue/compiler-core": 3.4.34 - "@vue/shared": 3.4.34 - checksum: 6ba068d0274048eb25e3ef9665bbe6e4f9a65841ab4fd22336a6c5b760e9474c8260b31f514fbce3f3bf23e55e452c4be58cf35efafdb42c6a2d524e27cec1ca + "@vue/compiler-core": 3.4.35 + "@vue/shared": 3.4.35 + checksum: 3944753daadef563249778e5672dae80c66e687ed48509de682ffc9f620e13b373492925f2658a2c938dabcfb3914b39582b77e92e9190913be528d3e91434fc languageName: node linkType: hard "@vue/compiler-sfc@npm:^3.2.40": - version: 3.4.34 - resolution: "@vue/compiler-sfc@npm:3.4.34" + version: 3.4.35 + resolution: "@vue/compiler-sfc@npm:3.4.35" dependencies: "@babel/parser": ^7.24.7 - "@vue/compiler-core": 3.4.34 - "@vue/compiler-dom": 3.4.34 - "@vue/compiler-ssr": 3.4.34 - "@vue/shared": 3.4.34 - estree-walker: ^2.0.2 - magic-string: ^0.30.10 - postcss: ^8.4.39 - source-map-js: ^1.2.0 - checksum: e9fc4ee40372d7b5e18eb8921aa469bf224a6e6fbc33fe1a73dd16ee89c914f5ceb912e4e61453841de00e2a1dbc52e92b556e62436342637efbc19129d97eb2 - languageName: node - linkType: hard - -"@vue/compiler-ssr@npm:3.4.34": - version: 3.4.34 - resolution: "@vue/compiler-ssr@npm:3.4.34" - dependencies: - "@vue/compiler-dom": 3.4.34 - "@vue/shared": 3.4.34 - checksum: f066036859f6de1882a941e1fce7904d3bb091f858ab1ad40926e9d5bbb92ece883835e267a93b07d938c048480d51109cb776047d02b8bbe47fe4282d1bb78e + "@vue/compiler-core": 3.4.35 + "@vue/compiler-dom": 3.4.35 + "@vue/compiler-ssr": 3.4.35 + "@vue/shared": 3.4.35 + estree-walker: ^2.0.2 + magic-string: ^0.30.10 + postcss: ^8.4.40 + source-map-js: ^1.2.0 + checksum: 8fcb9141928c6309d7b7a714d5d4d262ca19b2398a88c69c4bb55ae69ab8575a8fe3cfa8ee6f2469bc3c96a54d7d309c435b8d8df9955a0037c8adba36b24d1f languageName: node linkType: hard -"@vue/reactivity-transform@npm:3.3.8": - version: 3.3.8 - resolution: "@vue/reactivity-transform@npm:3.3.8" +"@vue/compiler-ssr@npm:3.4.35": + version: 3.4.35 + resolution: "@vue/compiler-ssr@npm:3.4.35" dependencies: - "@babel/parser": ^7.23.0 - "@vue/compiler-core": 3.3.8 - "@vue/shared": 3.3.8 - estree-walker: ^2.0.2 - magic-string: ^0.30.5 - checksum: cc846146fe88aad18c9b7a5597862bee6763ad8c5afb9985a407c25430e9b512c450cf67972f944ab41f9cf3fd5237fd741c31a85a6c0961c49774cedbd0f2ff + "@vue/compiler-dom": 3.4.35 + "@vue/shared": 3.4.35 + checksum: 32a9018484bc6aba88dfb4e9d328c54c7ff3520906a0c0d1c4e913d81df26949c43b7d832364dfdb487a4ec59f3395e89c221bfa797dc3797bcf6ff2d988abb0 languageName: node linkType: hard -"JSONStream@npm:1.3.2": - version: 1.3.2 - resolution: "JSONStream@npm:1.3.2" - dependencies: - jsonparse: ^1.2.0 - through: ">=2.2.7 <3" - bin: - JSONStream: ./bin.js - checksum: d83b86f846eaeba7b947181245b977bb7e32c49e25d210234ecbf6b2d9128924610224e150558deeb65d063b07b8c28e5a1a4ab8daeb89d4c34e718047f046fd +"@vue/shared@npm:3.4.35": + version: 3.4.35 + resolution: "@vue/shared@npm:3.4.35" + checksum: 6397a102ff46e7c5e3d2507b6eb5390f4c07e56898cfdadf7be52e2bf124d1adce41c0c27b81c684ee3e211b480e67e11015fc4e3d14dcd2768ba9045a69d874 languageName: node linkType: hard @@ -3885,13 +3599,6 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:4.1.1": - version: 4.1.1 - resolution: "ansi-colors@npm:4.1.1" - checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 - languageName: node - linkType: hard - "ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" @@ -4216,17 +3923,6 @@ __metadata: linkType: hard "axios@npm:^1.4.0, axios@npm:^1.5.1, axios@npm:^1.7.2": - version: 1.7.2 - resolution: "axios@npm:1.7.2" - dependencies: - follow-redirects: ^1.15.6 - form-data: ^4.0.0 - proxy-from-env: ^1.1.0 - checksum: 573f03f59b7487d54551b16f5e155d1d130ad4864ed32d1da93d522b78a57123b34e3bde37f822a65ee297e79f1db840f9ad6514addff50d3cbf5caeed39e8dc - languageName: node - linkType: hard - -"axios@npm:^1.7.2": version: 1.7.2 resolution: "axios@npm:1.7.2" dependencies: @@ -4305,9 +4001,9 @@ __metadata: linkType: hard "binary-extensions@npm:^2.0.0, binary-extensions@npm:^2.2.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 languageName: node linkType: hard @@ -4532,16 +4228,6 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: ^1.3.1 - ieee754: ^1.1.13 - checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84 - languageName: node - linkType: hard - "bufio@npm:^1.0.7": version: 1.2.1 resolution: "bufio@npm:1.2.1" @@ -4664,9 +4350,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001640": - version: 1.0.30001643 - resolution: "caniuse-lite@npm:1.0.30001643" - checksum: e39991c13a0fd8f5c2aa99c9128188e4c4e9d6a203c3da6270c36285460ef152c5e9410ee4db560aa723904668946afe50541dce9636ab5e61434ba71dc22955 + version: 1.0.30001646 + resolution: "caniuse-lite@npm:1.0.30001646" + checksum: 53d45b990d21036aaab7547e164174a0ac9a117acdd14a6c33822c4983e2671b1df48686d5383002d0ef158b208b0047a7dc404312a6229bf8ee629de3351b44 languageName: node linkType: hard @@ -4699,15 +4385,6 @@ __metadata: linkType: hard "cbor@npm:^9.0.0, cbor@npm:^9.0.2": - version: 9.0.2 - resolution: "cbor@npm:9.0.2" - dependencies: - nofilter: ^3.1.0 - checksum: 42333ac3d42cc3f6fcc7a529e68417a2dd8099eda43ca4be1304cdc5bc7494efe058e2db8a3d3b46ae60d69c7331ea813c22dbd019c4ac592d23e599d72bbcc9 - languageName: node - linkType: hard - -"cbor@npm:^9.0.2": version: 9.0.2 resolution: "cbor@npm:9.0.2" dependencies: @@ -4727,24 +4404,9 @@ __metadata: languageName: node linkType: hard -"chai@npm:^4.3.4, chai@npm:^4.3.6": - version: 4.3.10 - resolution: "chai@npm:4.3.10" - dependencies: - assertion-error: ^1.1.0 - check-error: ^1.0.3 - deep-eql: ^4.1.3 - get-func-name: ^2.0.2 - loupe: ^2.3.6 - pathval: ^1.1.1 - type-detect: ^4.0.8 - checksum: 536668c60a0d985a0fbd94418028e388d243a925d7c5e858c7443e334753511614a3b6a124bac9ca077dfc4c37acc367d62f8c294960f440749536dc181dfc6d - languageName: node - linkType: hard - -"chai@npm:^4.3.7": - version: 4.4.1 - resolution: "chai@npm:4.4.1" +"chai@npm:^4.3.4, chai@npm:^4.3.6, chai@npm:^4.3.7": + version: 4.5.0 + resolution: "chai@npm:4.5.0" dependencies: assertion-error: ^1.1.0 check-error: ^1.0.3 @@ -4752,8 +4414,8 @@ __metadata: get-func-name: ^2.0.2 loupe: ^2.3.6 pathval: ^1.1.1 - type-detect: ^4.0.8 - checksum: 9ab84f36eb8e0b280c56c6c21ca4da5933132cd8a0c89c384f1497f77953640db0bc151edd47f81748240a9fab57b78f7d925edfeedc8e8fc98016d71f40c36e + type-detect: ^4.1.0 + checksum: 70e5a8418a39e577e66a441cc0ce4f71fd551a650a71de30dd4e3e31e75ed1f5aa7119cf4baf4a2cb5e85c0c6befdb4d8a05811fad8738c1a6f3aa6a23803821 languageName: node linkType: hard @@ -4816,7 +4478,7 @@ __metadata: dependenciesMeta: fsevents: optional: true - checksum: b49fcde40176ba007ff361b198a2d35df60d9bb2a5aab228279eb810feae9294a6b4649ab15981304447afe1e6ffbf4788ad5db77235dc770ab777c6e771980c + checksum: d2f29f499705dcd4f6f3bbed79a9ce2388cf530460122eed3b9c48efeab7a4e28739c6551fd15bec9245c6b9eeca7a32baa64694d64d9b6faeb74ddb8c4a413d languageName: node linkType: hard @@ -4950,9 +4612,9 @@ __metadata: linkType: hard "code-block-writer@npm:^13.0.1": - version: 13.0.1 - resolution: "code-block-writer@npm:13.0.1" - checksum: 678b740d1723c7cc3c5addcbc1a91d9a7a3f033510eb8e0639154fcaae456c80630dbd40d16aefdffaf3edb5ffb352d7d46f195f69c8be692c4d7debb1dc7933 + version: 13.0.2 + resolution: "code-block-writer@npm:13.0.2" + checksum: 8052ae6f27ef73366bd5df04b6f9beced493261fcaef5cbd0f3853644b5e0aa5af18d099b96448be88ea3d000c7b180207d371044edd9fcf98fea22c9f8ba3a1 languageName: node linkType: hard @@ -5085,14 +4747,7 @@ __metadata: languageName: node linkType: hard -"compare-versions@npm:^6.0.0": - version: 6.1.0 - resolution: "compare-versions@npm:6.1.0" - checksum: d4e2a45706a023d8d0b6680338b66b79e20bd02d1947f0ac6531dab634cbed89fa373b3f03d503c5e489761194258d6e1bae67a07f88b1efc61648454f2d47e7 - languageName: node - linkType: hard - -"compare-versions@npm:^6.1.0": +"compare-versions@npm:^6.0.0, compare-versions@npm:^6.1.0": version: 6.1.1 resolution: "compare-versions@npm:6.1.1" checksum: 73fe6c4f52d22efe28f0a3be10df2afd704e10b3593360cd963e86b33a7a263c263b41a1361b69c30a0fe68bfa70fef90860c1cf2ef41502629d4402890fcd57 @@ -5296,15 +4951,6 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": - version: 1.2.2 - resolution: "crc-32@npm:1.2.2" - bin: - crc32: bin/crc32.njs - checksum: ad2d0ad0cbd465b75dcaeeff0600f8195b686816ab5f3ba4c6e052a07f728c3e70df2e3ca9fd3d4484dc4ba70586e161ca5a2334ec8bf5a41bf022a6103ff243 - languageName: node - linkType: hard - "create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": version: 1.2.0 resolution: "create-hash@npm:1.2.0" @@ -5435,7 +5081,7 @@ __metadata: peerDependenciesMeta: supports-color: optional: true - checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + checksum: 1630b748dea3c581295e02137a9f5cbe2c1d85fea35c1e6597a65ca2b16a6fce68cec61b299d480787ef310ba927dc8c92d3061faba0ad06c6a724672f66be7f languageName: node linkType: hard @@ -5448,18 +5094,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.5": - version: 4.3.5 - resolution: "debug@npm:4.3.5" - dependencies: - ms: 2.1.2 - peerDependenciesMeta: - supports-color: - optional: true - checksum: 7c002b51e256257f936dda09eb37167df952758c57badf6bf44bdc40b89a4bcb8e5a0a2e4c7b53f97c69e2970dd5272d33a757378a12c8f8e64ea7bf99e8e86e - languageName: node - linkType: hard - "debuglog@npm:^1.0.1": version: 1.0.1 resolution: "debuglog@npm:1.0.1" @@ -5606,14 +5240,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^5.0.0, diff@npm:^5.1.0": - version: 5.1.0 - resolution: "diff@npm:5.1.0" - checksum: c7bf0df7c9bfbe1cf8a678fd1b2137c4fb11be117a67bc18a0e03ae75105e8533dbfb1cda6b46beb3586ef5aed22143ef9d70713977d5fb1f9114e21455fba90 - languageName: node - linkType: hard - -"diff@npm:^5.2.0": +"diff@npm:^5.0.0, diff@npm:^5.1.0, diff@npm:^5.2.0": version: 5.2.0 resolution: "diff@npm:5.2.0" checksum: 12b63ca9c36c72bafa3effa77121f0581b4015df18bc16bac1f8e263597735649f1a173c26f7eba17fb4162b073fee61788abe49610e6c70a2641fe1895443fd @@ -5756,9 +5383,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.820": - version: 1.5.2 - resolution: "electron-to-chromium@npm:1.5.2" - checksum: 530a9a4dc4aa0220abf564be49b7090470eac6e9a03acb667deadaf139c7f65466b4540ff5699677f9370f2a05619e89fc089f81603d36d33dc5acc75f12171e + version: 1.5.4 + resolution: "electron-to-chromium@npm:1.5.4" + checksum: 352f13c043cb185b464efe20f9b0a1adea2b1a7dad56e41dac995d0ad060f9981e479d632ebc73a1dce3bd5c36bbceeffe0667161ce296c2488fbb95f89bc793 languageName: node linkType: hard @@ -6329,7 +5956,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": +"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -6530,9 +6157,9 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: ^5.0.1 checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798 @@ -6623,16 +6250,6 @@ __metadata: linkType: hard "follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.6": - version: 1.15.6 - resolution: "follow-redirects@npm:1.15.6" - peerDependenciesMeta: - debug: - optional: true - checksum: 584da22ec5420c837bd096559ebfb8fe69d82512d5585004e36a3b4a6ef6d5905780e0c74508c7b72f907d1fa2b7bd339e613859e9c304d0dc96af2027fd0231 - languageName: node - linkType: hard - -"follow-redirects@npm:^1.15.6": version: 1.15.6 resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: @@ -6721,19 +6338,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^0.30.0": - version: 0.30.0 - resolution: "fs-extra@npm:0.30.0" - dependencies: - graceful-fs: ^4.1.2 - jsonfile: ^2.1.0 - klaw: ^1.0.0 - path-is-absolute: ^1.0.0 - rimraf: ^2.2.8 - checksum: 6edfd65fc813baa27f1603778c0f5ec11f8c5006a20b920437813ee2023eba18aeec8bef1c89b2e6c84f9fc90fdc7c916f4a700466c8c69d22a35d018f2570f0 - languageName: node - linkType: hard - "fs-extra@npm:^10.0.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -6746,17 +6350,6 @@ __metadata: linkType: hard "fs-extra@npm:^11.0.0, fs-extra@npm:^11.2.0": - version: 11.2.0 - resolution: "fs-extra@npm:11.2.0" - dependencies: - graceful-fs: ^4.2.0 - jsonfile: ^6.0.1 - universalify: ^2.0.0 - checksum: fb883c68245b2d777fbc1f2082c9efb084eaa2bbf9fddaa366130d196c03608eebef7fb490541276429ee1ca99f317e2d73e96f5ca0999eefedf5a624ae1edfd - languageName: node - linkType: hard - -"fs-extra@npm:^11.2.0": version: 11.2.0 resolution: "fs-extra@npm:11.2.0" dependencies: @@ -7041,22 +6634,6 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.4.1": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: ^3.1.0 - jackspeak: ^3.1.2 - minimatch: ^9.0.4 - minipass: ^7.1.2 - package-json-from-dist: ^1.0.0 - path-scurry: ^1.11.1 - bin: - glob: dist/esm/bin.mjs - checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 - languageName: node - linkType: hard - -"glob@npm:^10.4.1": version: 10.4.5 resolution: "glob@npm:10.4.5" dependencies: @@ -7336,7 +6913,7 @@ __metadata: murmur-128: ^0.2.1 qs: ^6.9.4 zksync-web3: ^0.14.3 - checksum: 498c9b1485fa73161cef24eeeaaab749097df8c5a53df3f22e3c23cb825adf3006289778f0f5a433a7efcd58df3e18034f09dd4650d714d8f0b08c1e79527590 + checksum: 7ecce33c3305857bdd1873a25d391e27ae9f581df75757035cb028ace7bb5fbb83f053435e843bc3d925e7fd8412c3dc582797fe5b4bbe1fef7f3dd989a7c878 languageName: node linkType: hard @@ -7385,74 +6962,13 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:^2.14.0": - version: 2.22.6 - resolution: "hardhat@npm:2.22.6" - dependencies: - "@ethersproject/abi": ^5.1.2 - "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/edr": ^0.4.1 - "@nomicfoundation/ethereumjs-common": 4.0.4 - "@nomicfoundation/ethereumjs-tx": 5.0.4 - "@nomicfoundation/ethereumjs-util": 9.0.4 - "@nomicfoundation/solidity-analyzer": ^0.1.0 - "@sentry/node": ^5.18.1 - "@types/bn.js": ^5.1.0 - "@types/lru-cache": ^5.1.0 - adm-zip: ^0.4.16 - aggregate-error: ^3.0.0 - ansi-escapes: ^4.3.0 - boxen: ^5.1.2 - chalk: ^2.4.2 - chokidar: ^3.4.0 - ci-info: ^2.0.0 - debug: ^4.1.1 - enquirer: ^2.3.0 - env-paths: ^2.2.0 - ethereum-cryptography: ^1.0.3 - ethereumjs-abi: ^0.6.8 - find-up: ^2.1.0 - fp-ts: 1.19.3 - fs-extra: ^7.0.1 - glob: 7.2.0 - immutable: ^4.0.0-rc.12 - io-ts: 1.10.4 - keccak: ^3.0.2 - lodash: ^4.17.11 - mnemonist: ^0.38.0 - mocha: ^10.0.0 - p-map: ^4.0.0 - raw-body: ^2.4.1 - resolve: 1.17.0 - semver: ^6.3.0 - solc: 0.8.26 - source-map-support: ^0.5.13 - stacktrace-parser: ^0.1.10 - tsort: 0.0.1 - undici: ^5.14.0 - uuid: ^8.3.2 - ws: ^7.4.6 - peerDependencies: - ts-node: "*" - typescript: "*" - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - bin: - hardhat: internal/cli/bootstrap.js - checksum: 5aec1824db3575d63754de18c2629bcd820bc836d836f8a6346bcd9aa2ae4c397e090c43ea482ee765b704e018001015b5c84c5ded301a6a1144129c1a4c509b - languageName: node - linkType: hard - -"hardhat@npm:^2.16.1": - version: 2.18.1 - resolution: "hardhat@npm:2.18.1" +"hardhat@npm:^2.14.0, hardhat@npm:^2.16.1, hardhat@npm:^2.19.2, hardhat@npm:^2.8.0": + version: 2.22.7 + resolution: "hardhat@npm:2.22.7" dependencies: "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/edr": ^0.4.1 + "@nomicfoundation/edr": ^0.5.0 "@nomicfoundation/ethereumjs-common": 4.0.4 "@nomicfoundation/ethereumjs-tx": 5.0.4 "@nomicfoundation/ethereumjs-util": 9.0.4 @@ -7503,7 +7019,7 @@ __metadata: optional: true bin: hardhat: internal/cli/bootstrap.js - checksum: 5aec1824db3575d63754de18c2629bcd820bc836d836f8a6346bcd9aa2ae4c397e090c43ea482ee765b704e018001015b5c84c5ded301a6a1144129c1a4c509b + checksum: 3b630db8c337d47d220ab0a94a009e61da0a4bb08cc4576ae33cb50e57d9dbb577ab64a85211914fc511e59cd5fca55c986e9ee2180c2e05657c084a14128b16 languageName: node linkType: hard @@ -7788,7 +7304,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": +"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -8303,19 +7819,6 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": ^8.0.2 - "@pkgjs/parseargs": ^0.11.0 - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 - languageName: node - linkType: hard - "jackspeak@npm:^3.1.2": version: 3.4.3 resolution: "jackspeak@npm:3.4.3" @@ -8924,16 +8427,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": - version: 10.0.2 - resolution: "lru-cache@npm:10.0.2" - dependencies: - semver: ^7.3.5 - checksum: 83ad0e899d79f48574bdda131fe8157c6d65cbd073a6e78e0d1a3467a85dce1ef4d8dc9fd618a56c57a068271501c81d54471e13f84dd121e046b155ed061ed4 - languageName: node - linkType: hard - -"lru-cache@npm:^10.2.0": +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" checksum: 6476138d2125387a6d20f100608c2583d415a4f64a0fecf30c9e2dda976614f09cad4baa0842447bd37dd459a7bd27f57d9d8f8ce558805abd487c583f3d774a @@ -9222,30 +8716,12 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:5.0.1": - version: 5.0.1 - resolution: "minimatch@npm:5.0.1" - dependencies: - brace-expansion: ^2.0.1 - checksum: b34b98463da4754bc526b244d680c69d4d6089451ebe512edaf6dd9eeed0279399cfa3edb19233513b8f830bf4bfcad911dddcdf125e75074100d52f724774f0 - languageName: node - linkType: hard - -"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0": +"minimatch@npm:^5.0.1, minimatch@npm:^5.1.0, minimatch@npm:^5.1.6": version: 5.1.6 resolution: "minimatch@npm:5.1.6" dependencies: brace-expansion: ^2.0.1 - checksum: 2c035575eda1e50623c731ec6c14f65a85296268f749b9337005210bb2b34e2705f8ef1a358b188f69892286ab99dc42c8fb98a57bde55c8d81b3023c19cea28 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: ^2.0.1 - checksum: 2c035575eda1e50623c731ec6c14f65a85296268f749b9337005210bb2b34e2705f8ef1a358b188f69892286ab99dc42c8fb98a57bde55c8d81b3023c19cea28 + checksum: 7564208ef81d7065a370f788d337cd80a689e981042cb9a1d0e6580b6c6a8c9279eba80010516e258835a988363f99f54a6f711a315089b8b42694f5da9d0d77 languageName: node linkType: hard @@ -9377,14 +8853,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": - version: 7.0.4 - resolution: "minipass@npm:7.0.4" - checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 - languageName: node - linkType: hard - -"minipass@npm:^7.1.2": +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": version: 7.1.2 resolution: "minipass@npm:7.1.2" checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3 @@ -9502,13 +8971,6 @@ __metadata: languageName: node linkType: hard -"module-error@npm:^1.0.1, module-error@npm:^1.0.2": - version: 1.0.2 - resolution: "module-error@npm:1.0.2" - checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 - languageName: node - linkType: hard - "module-not-found-error@npm:^1.0.1": version: 1.0.1 resolution: "module-not-found-error@npm:1.0.1" @@ -9523,7 +8985,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2": +"ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -9557,15 +9019,6 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:3.3.3": - version: 3.3.3 - resolution: "nanoid@npm:3.3.3" - bin: - nanoid: bin/nanoid.cjs - checksum: ada019402a07464a694553c61d2dca8a4353645a7d92f2830f0d487fedff403678a0bee5323a46522752b2eab95a0bc3da98b6cccaa7c0c55cd9975130e6d6f0 - languageName: node - linkType: hard - "nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -10391,16 +9844,6 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: ^10.2.0 - minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 - languageName: node - linkType: hard - "path-scurry@npm:^1.11.1": version: 1.11.1 resolution: "path-scurry@npm:1.11.1" @@ -10507,7 +9950,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.39": +"postcss@npm:^8.4.40": version: 8.4.40 resolution: "postcss@npm:8.4.40" dependencies: @@ -11307,7 +10750,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.6.2": +"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.4, semver@npm:^7.6.2": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -11316,9 +10759,9 @@ __metadata: languageName: node linkType: hard -"serialize-javascript@npm:6.0.0": - version: 6.0.0 - resolution: "serialize-javascript@npm:6.0.0" +"serialize-javascript@npm:^6.0.2": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" dependencies: randombytes: ^2.1.0 checksum: c4839c6206c1d143c0f80763997a361310305751171dd95e4b57efee69b8f6edd8960a0b7fbfc45042aadff98b206d55428aee0dc276efe54f100899c7fa8ab7 @@ -11541,23 +10984,6 @@ __metadata: languageName: node linkType: hard -"solc@npm:0.8.26": - version: 0.8.26 - resolution: "solc@npm:0.8.26" - dependencies: - command-exists: ^1.2.8 - commander: ^8.1.0 - follow-redirects: ^1.12.1 - js-sha3: 0.8.0 - memorystream: ^0.3.1 - semver: ^5.5.0 - tmp: 0.0.33 - bin: - solcjs: solcjs - checksum: 2d8eb16c6d8f648213c94dc8d977cffe5099cba7d41c82d92d769ef71ae8320a985065ce3d6c306440a85f8e8d2b27fb30bdd3ac38f69e5c1fa0ab8a3fb2f217 - languageName: node - linkType: hard - "solc@npm:0.8.26": version: 0.8.26 resolution: "solc@npm:0.8.26" @@ -11606,7 +11032,7 @@ __metadata: languageName: node linkType: hard -"solidity-ast@npm:^0.4.26, solidity-ast@npm:^0.4.56": +"solidity-ast@npm:^0.4.26, solidity-ast@npm:^0.4.38, solidity-ast@npm:^0.4.51, solidity-ast@npm:^0.4.56": version: 0.4.56 resolution: "solidity-ast@npm:0.4.56" dependencies: @@ -11615,15 +11041,6 @@ __metadata: languageName: node linkType: hard -"solidity-ast@npm:^0.4.38, solidity-ast@npm:^0.4.51": - version: 0.4.53 - resolution: "solidity-ast@npm:0.4.53" - dependencies: - array.prototype.findlast: ^1.2.2 - checksum: 124cd54dc187860c83f4e8a3cbc41f890fbd0aaad4695356763034bdc782046eac414b161b7f354e423e075dba303d6bef213682df8932fee5d143d52135cd4e - languageName: node - linkType: hard - "solidity-comments-extractor@npm:^0.0.8": version: 0.0.8 resolution: "solidity-comments-extractor@npm:0.0.8" @@ -11749,9 +11166,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.16 - resolution: "spdx-license-ids@npm:3.0.16" - checksum: 5cdaa85aaa24bd02f9353a2e357b4df0a4f205cb35655f3fd0a5674a4fb77081f28ffd425379214bc3be2c2b7593ce1215df6bcc75884aeee0a9811207feabe2 + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 457825df5dd1fc0135b0bb848c896143f70945cc2da148afc71c73ed0837d1d651f809006e406d82109c9dd71a8cb39785a3604815fe46bc0548e9d3976f6b69 languageName: node linkType: hard @@ -12185,9 +11602,9 @@ __metadata: languageName: node linkType: hard -"tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.2.0 - resolution: "tar@npm:6.2.0" +"tar@npm:^6.1.0, tar@npm:^6.1.11, tar@npm:^6.1.2, tar@npm:^6.2.1": + version: 6.2.1 + resolution: "tar@npm:6.2.1" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 @@ -12494,7 +11911,7 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": +"type-detect@npm:4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 @@ -12732,14 +12149,14 @@ __metadata: resolution: "undici@npm:5.28.4" dependencies: "@fastify/busboy": ^2.0.0 - checksum: 22bbdd763798700979986546d70072b67223189353d2a811efa9c6e44476161a0d1781ffe24115221f69a1b344b95d5926bd39a6eb760a2cd8804781cec0c5eb + checksum: a8193132d84540e4dc1895ecc8dbaa176e8a49d26084d6fbe48a292e28397cd19ec5d13bc13e604484e76f94f6e334b2bdc740d5f06a6e50c44072818d0c19f9 languageName: node linkType: hard "undici@npm:^6.18.2": - version: 6.19.2 - resolution: "undici@npm:6.19.2" - checksum: 024ff60791bef86646730dc0f240e8a643219d18c6070d7e067d4f7fd311cea85b485b79ebeabff2bb60f4a7ca18fa7ae37da1cc008b23e7b6f17b289c728771 + version: 6.19.5 + resolution: "undici@npm:6.19.5" + checksum: 4ca8d8811fe2d8f905bd20eaf9dbf141f51cb6de3d8a4ef7e606b637cbd05f316edcb01d7d5a860a719ef97034f3ad96943a6c6a4cbcc797c89565091e3ba1d2 languageName: node linkType: hard @@ -13028,7 +12445,7 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:~1.2.3": +"word-wrap@npm:^1.2.5, word-wrap@npm:~1.2.3": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" checksum: f93ba3586fc181f94afdaff3a6fef27920b4b6d9eaefed0f428f8e07adea2a7f54a5f2830ce59406c8416f033f86902b91eb824072354645eea687dff3691ccb From 2847c80d66bfb3dc3eacb8540e64ec14befb1ae0 Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Thu, 1 Aug 2024 12:02:08 +0000 Subject: [PATCH 67/85] feat: updating deployment files --- deployments/zksyncsepolia.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/deployments/zksyncsepolia.json b/deployments/zksyncsepolia.json index eb9d52c66..b5c50ecc5 100644 --- a/deployments/zksyncsepolia.json +++ b/deployments/zksyncsepolia.json @@ -195,13 +195,7 @@ "type": "receive" } ] - } - } -} -{ - "name": "zksyncsepolia", - "chainId": "300", - "contracts": { + }, "XVSStore": { "address": "0xf0DaEFE5f5df4170426F88757EcdF45430332d88", "abi": [ From 332c88624d8afe906fded6753d5d9167d334f988 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:08:07 +0530 Subject: [PATCH 68/85] chore: update dependency and fix tests --- package.json | 4 +- tests/hardhat/Prime/Prime.ts | 4 +- tests/hardhat/Prime/PrimeLiquidityProvider.ts | 2 +- tests/hardhat/integration/index.ts | 4 +- yarn.lock | 768 +++++++++++++++++- 5 files changed, 764 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index ec8e05c49..98970ed36 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "clean": "hardhat clean && hardhat clean --config hardhat.config.zksync.ts" }, "dependencies": { + "@defi-wonderland/smock": "2.3.5", "@nomicfoundation/hardhat-ethers": "^3.0.0", "@openzeppelin/contracts": "4.9.3", "@openzeppelin/contracts-upgradeable": "^4.8.0", @@ -40,12 +41,12 @@ "@venusprotocol/token-bridge": "^2.0.0", "bignumber.js": "^9.1.2", "dotenv": "^16.0.1", + "hardhat": "2.19.5", "module-alias": "^2.2.2" }, "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", - "@defi-wonderland/smock": "^2.2.0", "@ethersproject/abi": "^5.6.4", "@ethersproject/abstract-provider": "^5", "@ethersproject/abstract-signer": "^5", @@ -78,7 +79,6 @@ "eslint": "^8.25.0", "eslint-config-prettier": "^8.5.0", "ethers": "^5.7.0", - "hardhat": "^2.19.2", "hardhat-contract-sizer": "^2.8.0", "hardhat-deploy": "^0.12.4", "hardhat-deploy-ethers": "^0.3.0-beta.13", diff --git a/tests/hardhat/Prime/Prime.ts b/tests/hardhat/Prime/Prime.ts index ac4220c38..e20eaeaf2 100644 --- a/tests/hardhat/Prime/Prime.ts +++ b/tests/hardhat/Prime/Prime.ts @@ -190,7 +190,7 @@ async function deployProtocol(): Promise { ], { constructorArgs: [false, 10512000], - unsafeAllow: "constructor", + unsafeAllow: ["constructor", "internal-function-storage"], }, ); @@ -217,7 +217,7 @@ async function deployProtocol(): Promise { ], { constructorArgs: [wbnb.address, vbnb.address, 10512000, stakingPeriod, minimumXVS, maximumXVSCap, false], - unsafeAllow: "constructor", + unsafeAllow: ["constructor", "internal-function-storage"], }, ); diff --git a/tests/hardhat/Prime/PrimeLiquidityProvider.ts b/tests/hardhat/Prime/PrimeLiquidityProvider.ts index f98e83227..8d1352cdc 100644 --- a/tests/hardhat/Prime/PrimeLiquidityProvider.ts +++ b/tests/hardhat/Prime/PrimeLiquidityProvider.ts @@ -52,7 +52,7 @@ const fixture = async () => { ], { constructorArgs: [false, 10512000], - unsafeAllow: "constructor", + unsafeAllow: ["constructor", "internal-function-storage"], }, ); diff --git a/tests/hardhat/integration/index.ts b/tests/hardhat/integration/index.ts index 91f5c0b3a..466c2bcdd 100644 --- a/tests/hardhat/integration/index.ts +++ b/tests/hardhat/integration/index.ts @@ -194,7 +194,7 @@ async function deployProtocol(): Promise { 10, ], { - unsafeAllow: "constructor", + unsafeAllow: ["constructor", "internal-function-storage"], constructorArgs: [false, 10512000], }, ); @@ -220,7 +220,7 @@ async function deployProtocol(): Promise { ], { constructorArgs: [wbnb.address, vbnb.address, 10512000, stakingPeriod, minimumXVS, maximumXVSCap, false], - unsafeAllow: "constructor", + unsafeAllow: ["constructor", "internal-function-storage"], }, ); diff --git a/yarn.lock b/yarn.lock index 22d2b399e..ba4fcaf33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -349,6 +349,52 @@ __metadata: languageName: node linkType: hard +"@chainsafe/as-sha256@npm:^0.3.1": + version: 0.3.1 + resolution: "@chainsafe/as-sha256@npm:0.3.1" + checksum: 58ea733be1657b0e31dbf48b0dba862da0833df34a81c1460c7352f04ce90874f70003cbf34d0afb9e5e53a33ee2d63a261a8b12462be85b2ba0a6f7f13d6150 + languageName: node + linkType: hard + +"@chainsafe/persistent-merkle-tree@npm:^0.4.2": + version: 0.4.2 + resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + checksum: f9cfcb2132a243992709715dbd28186ab48c7c0c696f29d30857693cca5526bf753974a505ef68ffd5623bbdbcaa10f9083f4dd40bf99eb6408e451cc26a1a9e + languageName: node + linkType: hard + +"@chainsafe/persistent-merkle-tree@npm:^0.5.0": + version: 0.5.0 + resolution: "@chainsafe/persistent-merkle-tree@npm:0.5.0" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + checksum: 2c67203da776c79cd3a6132e2d672fe132393b2e63dc71604e3134acc8c0ec25cc5e431051545939ea0f7c5ff2066fb806b9e5cab974ca085d046226a1671f7d + languageName: node + linkType: hard + +"@chainsafe/ssz@npm:^0.10.0": + version: 0.10.2 + resolution: "@chainsafe/ssz@npm:0.10.2" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + "@chainsafe/persistent-merkle-tree": ^0.5.0 + checksum: 6bb70cf741d0a19dd0b28b3f6f067b96fa39f556e2eefa6ac745b21db9c3b3a8393dc3cca8ff4a6ce065ed71ddc3fb1b2b390a92004b9d01067c26e2558e5503 + languageName: node + linkType: hard + +"@chainsafe/ssz@npm:^0.9.2": + version: 0.9.4 + resolution: "@chainsafe/ssz@npm:0.9.4" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + "@chainsafe/persistent-merkle-tree": ^0.4.2 + case: ^1.6.3 + checksum: c6eaedeae9e5618b3c666ff4507a27647f665a8dcf17d5ca86da4ed4788c5a93868f256d0005467d184fdf35ec03f323517ec2e55ec42492d769540a2ec396bc + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -562,7 +608,30 @@ __metadata: languageName: node linkType: hard -"@defi-wonderland/smock@npm:^2.2.0, @defi-wonderland/smock@npm:^2.3.4": +"@defi-wonderland/smock@npm:2.3.5": + version: 2.3.5 + resolution: "@defi-wonderland/smock@npm:2.3.5" + dependencies: + "@nomicfoundation/ethereumjs-evm": ^1.0.0-rc.3 + "@nomicfoundation/ethereumjs-util": ^8.0.0-rc.3 + "@nomicfoundation/ethereumjs-vm": ^6.0.0-rc.3 + diff: ^5.0.0 + lodash.isequal: ^4.5.0 + lodash.isequalwith: ^4.4.0 + rxjs: ^7.2.0 + semver: ^7.3.5 + peerDependencies: + "@ethersproject/abi": ^5 + "@ethersproject/abstract-provider": ^5 + "@ethersproject/abstract-signer": ^5 + "@nomiclabs/hardhat-ethers": ^2 + ethers: ^5 + hardhat: ^2 + checksum: b3c408fb43cd7b02bf6f3b3a392758944ee4d4ad9d92a5bcb595b2bdf7ebe702d052b8631afba0b408e80185b1db22d655dc63feba82365f5f1f6786eb98d859 + languageName: node + linkType: hard + +"@defi-wonderland/smock@npm:^2.3.4": version: 2.4.0 resolution: "@defi-wonderland/smock@npm:2.4.0" dependencies: @@ -909,7 +978,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.4.4, @ethersproject/providers@npm:^5.6.8, @ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.2": +"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.4.4, @ethersproject/providers@npm:^5.6.8, @ethersproject/providers@npm:^5.7.0, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" dependencies: @@ -1511,6 +1580,96 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-block@npm:4.2.2": + version: 4.2.2 + resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-tx": 4.1.2 + "@nomicfoundation/ethereumjs-util": 8.0.6 + ethereum-cryptography: 0.1.3 + checksum: 174a251d9c4e0bb9c1a7a6e77c52f1b2b4708d8135dba55c1025776248258ce905e4383a79da0ce7ac4e67e03b6c56351ca634a771b5eae976ed97498fc163f9 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-block@npm:5.0.2": + version: 5.0.2 + resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + ethereum-cryptography: 0.1.3 + ethers: ^5.7.1 + checksum: 7ff744f44a01f1c059ca7812a1cfc8089f87aa506af6cb39c78331dca71b32993cbd6fa05ad03f8c4f4fab73bb998a927af69e0d8ff01ae192ee5931606e09f5 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-blockchain@npm:6.2.2": + version: 6.2.2 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:6.2.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 4.2.2 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-ethash": 2.0.5 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-util": 8.0.6 + abstract-level: ^1.0.3 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + level: ^8.0.0 + lru-cache: ^5.1.1 + memory-level: ^1.0.0 + checksum: 5933600bf005ec3e33f6fdd0b3582b80ed7eac8fa776fc86f21de8a6ac3614e3262c48ad3737015c19558165aecd7b13a8056e96afd61511d0605411e0264871 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-blockchain@npm:7.0.2": + version: 7.0.2 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-ethash": 3.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + abstract-level: ^1.0.3 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + level: ^8.0.0 + lru-cache: ^5.1.1 + memory-level: ^1.0.0 + checksum: b7e440dcd73e32aa72d13bfd28cb472773c9c60ea808a884131bf7eb3f42286ad594a0864215f599332d800f3fe1f772fff4b138d2dcaa8f41e4d8389bff33e7 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-common@npm:3.1.2": + version: 3.1.2 + resolution: "@nomicfoundation/ethereumjs-common@npm:3.1.2" + dependencies: + "@nomicfoundation/ethereumjs-util": 8.0.6 + crc-32: ^1.2.0 + checksum: b886e47bb4da26b42bf9e905c5f073db62d2ad1b740d50898012580b501868839fcf08430debe3fca927b4d73e01628c1b0b2e84401feb551245dacfac045404 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-common@npm:4.0.2": + version: 4.0.2 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.2" + dependencies: + "@nomicfoundation/ethereumjs-util": 9.0.2 + crc-32: ^1.2.0 + checksum: f0d84704d6254d374299c19884312bd5666974b4b6f342d3f10bc76e549de78d20e45a53d25fbdc146268a52335497127e4f069126da7c60ac933a158e704887 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-common@npm:4.0.4": version: 4.0.4 resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" @@ -1520,6 +1679,84 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-ethash@npm:2.0.5": + version: 2.0.5 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.5" + dependencies: + "@nomicfoundation/ethereumjs-block": 4.2.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-util": 8.0.6 + abstract-level: ^1.0.3 + bigint-crypto-utils: ^3.0.23 + ethereum-cryptography: 0.1.3 + checksum: 0b03c8771602cfa64c9d35e5686326d0bfecb7dc0874cd9ff737cae0ec401396187d8499c103b8858fed5b9bd930e132b8fd09d19b3f0649df36d7d0fdf4d27c + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-ethash@npm:3.0.2": + version: 3.0.2 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + abstract-level: ^1.0.3 + bigint-crypto-utils: ^3.0.23 + ethereum-cryptography: 0.1.3 + checksum: e4011e4019dd9b92f7eeebfc1e6c9a9685c52d8fd0ee4f28f03e50048a23b600c714490827f59fdce497b3afb503b3fd2ebf6815ff307e9949c3efeff1403278 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-evm@npm:1.3.2, @nomicfoundation/ethereumjs-evm@npm:^1.0.0-rc.3": + version: 1.3.2 + resolution: "@nomicfoundation/ethereumjs-evm@npm:1.3.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-util": 8.0.6 + "@types/async-eventemitter": ^0.2.1 + async-eventemitter: ^0.2.4 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: 4a051f36968574ffbee5d3c401ebf1c81899b69a0692c372fced67691fe18f26741f26d1781e79dfa52136af888e561d80de4fd7dd59000d640c51bd8b130023 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-evm@npm:2.0.2": + version: 2.0.2 + resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.2" + dependencies: + "@ethersproject/providers": ^5.7.1 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: a23cf570836ddc147606b02df568069de946108e640f902358fef67e589f6b371d856056ee44299d9b4e3497f8ae25faa45e6b18fefd90e9b222dc6a761d85f0 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-rlp@npm:4.0.3": + version: 4.0.3 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:4.0.3" + bin: + rlp: bin/rlp + checksum: 14fc83701dd52323fae705786549ab07482ace315de69a586bb948b6f21ec529794cef8248af0b5c7e8f8b05fbadfbe222754b305841fa2189bfbc8f1eb064a2 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": + version: 5.0.2 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" + bin: + rlp: bin/rlp + checksum: a74434cadefca9aa8754607cc1ad7bb4bbea4ee61c6214918e60a5bbee83206850346eb64e39fd1fe97f854c7ec0163e01148c0c881dda23881938f0645a0ef2 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-rlp@npm:5.0.4": version: 5.0.4 resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" @@ -1529,6 +1766,86 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-statemanager@npm:1.0.5": + version: 1.0.5 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5" + dependencies: + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-util": 8.0.6 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + functional-red-black-tree: ^1.0.1 + checksum: 0f88743900b2211deb5d2393bf111ef63411ce533387a6d06c48cc9ac1f4fc38f968cdecc4712ebdafdebc3c4c2ce6bd1abd82989f4f4f515d3f571981d38f9f + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": + version: 2.0.2 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + ethers: ^5.7.1 + js-sdsl: ^4.1.4 + checksum: 3ab6578e252e53609afd98d8ba42a99f182dcf80252f23ed9a5e0471023ffb2502130f85fc47fa7c94cd149f9be799ed9a0942ca52a143405be9267f4ad94e64 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-trie@npm:5.0.5": + version: 5.0.5 + resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.5" + dependencies: + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-util": 8.0.6 + ethereum-cryptography: 0.1.3 + readable-stream: ^3.6.0 + checksum: bed56b55093275166c40d0aa097b32d348b3795cbfdc3797d48d136a578161431e70f30bcf453b74b52f77b897d79b61a3fb9d1abd10187c0cb7f25e40dea9c5 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-trie@npm:6.0.2": + version: 6.0.2 + resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" + dependencies: + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + "@types/readable-stream": ^2.3.13 + ethereum-cryptography: 0.1.3 + readable-stream: ^3.6.0 + checksum: d4da918d333851b9f2cce7dbd25ab5753e0accd43d562d98fd991b168b6a08d1794528f0ade40fe5617c84900378376fe6256cdbe52c8d66bf4c53293bbc7c40 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-tx@npm:4.1.2": + version: 4.1.2 + resolution: "@nomicfoundation/ethereumjs-tx@npm:4.1.2" + dependencies: + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-util": 8.0.6 + ethereum-cryptography: 0.1.3 + checksum: 209622bdc56e5f1267e5d2de69ed18388b141edc568f739f0ed865aecfe96e07c381aab779ed0adacefeae4da5be64fa1110a02e481e9a7c343bf0d53f4fd1b9 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-tx@npm:5.0.2": + version: 5.0.2 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" + dependencies: + "@chainsafe/ssz": ^0.9.2 + "@ethersproject/providers": ^5.7.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + ethereum-cryptography: 0.1.3 + checksum: 0bbcea75786b2ccb559afe2ecc9866fb4566a9f157b6ffba4f50960d14f4b3da2e86e273f6fadda9b860e67cfcabf589970fb951b328cb5f900a585cd21842a2 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-tx@npm:5.0.4": version: 5.0.4 resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" @@ -1546,6 +1863,27 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-util@npm:8.0.6, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": + version: 8.0.6 + resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.6" + dependencies: + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + ethereum-cryptography: 0.1.3 + checksum: 7a51c2069702750d94bf6bc5afd4a26c50321fe42504339d5275b60974941451eb41232f8a08c307797bcd498f20a3b27074351a76abdfc36a5e74473a7eda01 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-util@npm:9.0.2": + version: 9.0.2 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" + dependencies: + "@chainsafe/ssz": ^0.10.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + ethereum-cryptography: 0.1.3 + checksum: 3a08f7b88079ef9f53b43da9bdcb8195498fd3d3911c2feee2571f4d1204656053f058b2f650471c86f7d2d0ba2f814768c7cfb0f266eede41c848356afc4900 + languageName: node + linkType: hard + "@nomicfoundation/ethereumjs-util@npm:9.0.4, @nomicfoundation/ethereumjs-util@npm:^9.0.4": version: 9.0.4 resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" @@ -1561,6 +1899,51 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-vm@npm:7.0.2": + version: 7.0.2 + resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-blockchain": 7.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-evm": 2.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-statemanager": 2.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: 1c25ba4d0644cadb8a2b0241a4bb02e578bfd7f70e3492b855c2ab5c120cb159cb8f7486f84dc1597884bd1697feedbfb5feb66e91352afb51f3694fd8e4a043 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-vm@npm:^6.0.0-rc.3": + version: 6.4.2 + resolution: "@nomicfoundation/ethereumjs-vm@npm:6.4.2" + dependencies: + "@nomicfoundation/ethereumjs-block": 4.2.2 + "@nomicfoundation/ethereumjs-blockchain": 6.2.2 + "@nomicfoundation/ethereumjs-common": 3.1.2 + "@nomicfoundation/ethereumjs-evm": 1.3.2 + "@nomicfoundation/ethereumjs-rlp": 4.0.3 + "@nomicfoundation/ethereumjs-statemanager": 1.0.5 + "@nomicfoundation/ethereumjs-trie": 5.0.5 + "@nomicfoundation/ethereumjs-tx": 4.1.2 + "@nomicfoundation/ethereumjs-util": 8.0.6 + "@types/async-eventemitter": ^0.2.1 + async-eventemitter: ^0.2.4 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + functional-red-black-tree: ^1.0.1 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: 9138b8cce872a51fe2e378942c52fc6c54d8126ff094ba6bb78cbb630cafa20d7fbaa2b08bdcf7cad6de78e19ce68493ddbcc2e02acb7c803b866dc121274ea7 + languageName: node + linkType: hard + "@nomicfoundation/hardhat-chai-matchers@npm:^1.0.3": version: 1.0.6 resolution: "@nomicfoundation/hardhat-chai-matchers@npm:1.0.6" @@ -2819,6 +3202,15 @@ __metadata: languageName: node linkType: hard +"@types/async-eventemitter@npm:^0.2.1": + version: 0.2.4 + resolution: "@types/async-eventemitter@npm:0.2.4" + dependencies: + "@types/events": "*" + checksum: cee62e258cf02a45688a3f6f517b623270a9c2779dfd2f53b52e0efbcb0282d7078c3ce1fafb2af257aefdb892acc09ba51d93647930885414ec719437430bf7 + languageName: node + linkType: hard + "@types/bn.js@npm:^4.11.3": version: 4.11.6 resolution: "@types/bn.js@npm:4.11.6" @@ -2862,6 +3254,13 @@ __metadata: languageName: node linkType: hard +"@types/events@npm:*": + version: 3.0.3 + resolution: "@types/events@npm:3.0.3" + checksum: 50af9312fab001fd6bd4bb3ff65830f940877e6778de140a92481a0d9bf5f4853d44ec758a8800ef60e0598ac43ed1b5688116a3c65906ae54e989278d6c7c82 + languageName: node + linkType: hard + "@types/form-data@npm:0.0.33": version: 0.0.33 resolution: "@types/form-data@npm:0.0.33" @@ -2992,6 +3391,16 @@ __metadata: languageName: node linkType: hard +"@types/readable-stream@npm:^2.3.13": + version: 2.3.15 + resolution: "@types/readable-stream@npm:2.3.15" + dependencies: + "@types/node": "*" + safe-buffer: ~5.1.1 + checksum: ec36f525cad09b6c65a1dafcb5ad99b9e2ed824ec49b7aa23180ac427e5d35b8a0706193ecd79ab4253a283ad485ba03d5917a98daaaa144f0ea34f4823e9d82 + languageName: node + linkType: hard + "@types/secp256k1@npm:^4.0.1": version: 4.0.6 resolution: "@types/secp256k1@npm:4.0.6" @@ -3304,7 +3713,7 @@ __metadata: dependencies: "@commitlint/cli": ^17.0.3 "@commitlint/config-conventional": ^17.0.3 - "@defi-wonderland/smock": ^2.2.0 + "@defi-wonderland/smock": 2.3.5 "@ethersproject/abi": ^5.6.4 "@ethersproject/abstract-provider": ^5 "@ethersproject/abstract-signer": ^5 @@ -3345,7 +3754,7 @@ __metadata: eslint: ^8.25.0 eslint-config-prettier: ^8.5.0 ethers: ^5.7.0 - hardhat: ^2.19.2 + hardhat: 2.19.5 hardhat-contract-sizer: ^2.8.0 hardhat-deploy: ^0.12.4 hardhat-deploy-ethers: ^0.3.0-beta.13 @@ -3468,6 +3877,21 @@ __metadata: languageName: node linkType: hard +"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3, abstract-level@npm:^1.0.4": + version: 1.0.4 + resolution: "abstract-level@npm:1.0.4" + dependencies: + buffer: ^6.0.3 + catering: ^2.1.0 + is-buffer: ^2.0.5 + level-supports: ^4.0.0 + level-transcoder: ^1.0.1 + module-error: ^1.0.1 + queue-microtask: ^1.2.3 + checksum: 5b70d08926f5234c3c23ffca848542af4def780dc96d6ca35a81659af80e6439c46f5106bd14a5ea37465173d7dcc8294317048b0194fdf6480103edc4aa9e63 + languageName: node + linkType: hard + "acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" @@ -3874,6 +4298,15 @@ __metadata: languageName: node linkType: hard +"async-eventemitter@npm:^0.2.4": + version: 0.2.4 + resolution: "async-eventemitter@npm:0.2.4" + dependencies: + async: ^2.4.0 + checksum: b9e77e0f58ebd7188c50c23d613d1263e0ab501f5e677e02b57cc97d7032beaf60aafa189887e7105569c791e212df4af00b608be1e9a4c425911d577124911e + languageName: node + linkType: hard + "async-retry@npm:^1.3.3": version: 1.3.3 resolution: "async-retry@npm:1.3.3" @@ -3890,6 +4323,15 @@ __metadata: languageName: node linkType: hard +"async@npm:^2.4.0": + version: 2.6.4 + resolution: "async@npm:2.6.4" + dependencies: + lodash: ^4.17.14 + checksum: a52083fb32e1ebe1d63e5c5624038bb30be68ff07a6c8d7dfe35e47c93fc144bd8652cbec869e0ac07d57dde387aa5f1386be3559cdee799cb1f789678d88e19 + languageName: node + linkType: hard + "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -3979,6 +4421,13 @@ __metadata: languageName: node linkType: hard +"bigint-crypto-utils@npm:^3.0.23": + version: 3.3.0 + resolution: "bigint-crypto-utils@npm:3.3.0" + checksum: 9598ce57b23f776c8936d44114c9f051e62b5fa654915b664784cbcbacc5aa0485f4479571c51ff58008abb1210c0d6a234853742f07cf84bda890f2a1e01000 + languageName: node + linkType: hard + "bignumber.js@npm:^9.1.2": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -4114,6 +4563,18 @@ __metadata: languageName: node linkType: hard +"browser-level@npm:^1.0.1": + version: 1.0.1 + resolution: "browser-level@npm:1.0.1" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.1 + module-error: ^1.0.2 + run-parallel-limit: ^1.1.0 + checksum: 67fbc77ce832940bfa25073eccff279f512ad56f545deb996a5b23b02316f5e76f4a79d381acc27eda983f5c9a2566aaf9c97e4fdd0748288c4407307537a29b + languageName: node + linkType: hard + "browser-stdout@npm:^1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" @@ -4228,6 +4689,16 @@ __metadata: languageName: node linkType: hard +"buffer@npm:^6.0.3": + version: 6.0.3 + resolution: "buffer@npm:6.0.3" + dependencies: + base64-js: ^1.3.1 + ieee754: ^1.2.1 + checksum: 5ad23293d9a731e4318e420025800b42bf0d264004c0286c8cc010af7a270c7a0f6522e84f54b9ad65cbd6db20b8badbfd8d2ebf4f80fa03dab093b89e68c3f9 + languageName: node + linkType: hard + "bufio@npm:^1.0.7": version: 1.2.1 resolution: "bufio@npm:1.2.1" @@ -4368,6 +4839,13 @@ __metadata: languageName: node linkType: hard +"case@npm:^1.6.3": + version: 1.6.3 + resolution: "case@npm:1.6.3" + checksum: febe73278f910b0d28aab7efd6f51c235f9aa9e296148edb56dfb83fd58faa88308c30ce9a0122b6e53e0362c44f4407105bd5ef89c46860fc2b184e540fd68d + languageName: node + linkType: hard + "caseless@npm:^0.12.0, caseless@npm:~0.12.0": version: 0.12.0 resolution: "caseless@npm:0.12.0" @@ -4375,6 +4853,13 @@ __metadata: languageName: node linkType: hard +"catering@npm:^2.1.0, catering@npm:^2.1.1": + version: 2.1.1 + resolution: "catering@npm:2.1.1" + checksum: 205daefa69c935b0c19f3d8f2e0a520dd69aebe9bda55902958003f7c9cff8f967dfb90071b421bd6eb618576f657a89d2bc0986872c9bc04bbd66655e9d4bd6 + languageName: node + linkType: hard + "cbor@npm:^8.1.0": version: 8.1.0 resolution: "cbor@npm:8.1.0" @@ -4522,6 +5007,20 @@ __metadata: languageName: node linkType: hard +"classic-level@npm:^1.2.0": + version: 1.4.1 + resolution: "classic-level@npm:1.4.1" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.0 + module-error: ^1.0.1 + napi-macros: ^2.2.2 + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 62e7e07297fcd656941eb88f92b91df0046ebb2b34987e98ec870cb736f096e212ef109a25541deba2f30866b9d5df550594ed04948614815dd5964933da50a9 + languageName: node + linkType: hard + "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -4716,6 +5215,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:3.0.2": + version: 3.0.2 + resolution: "commander@npm:3.0.2" + checksum: 6d14ad030d1904428139487ed31febcb04c1604db2b8d9fae711f60ee6718828dc0e11602249e91c8a97b0e721e9c6d53edbc166bad3cde1596851d59a8f824d + languageName: node + linkType: hard + "commander@npm:^10.0.0": version: 10.0.1 resolution: "commander@npm:10.0.1" @@ -4951,6 +5457,15 @@ __metadata: languageName: node linkType: hard +"crc-32@npm:^1.2.0": + version: 1.2.2 + resolution: "crc-32@npm:1.2.2" + bin: + crc32: bin/crc32.njs + checksum: ad2d0ad0cbd465b75dcaeeff0600f8195b686816ab5f3ba4c6e052a07f728c3e70df2e3ca9fd3d4484dc4ba70586e161ca5a2334ec8bf5a41bf022a6103ff243 + languageName: node + linkType: hard + "create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": version: 1.2.0 resolution: "create-hash@npm:1.2.0" @@ -5956,7 +6471,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": +"ethers@npm:^5.6.8, ethers@npm:^5.7.0, ethers@npm:^5.7.1, ethers@npm:^5.7.2, ethers@npm:~5.7.0, ethers@npm:~5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -6338,6 +6853,19 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^0.30.0": + version: 0.30.0 + resolution: "fs-extra@npm:0.30.0" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^2.1.0 + klaw: ^1.0.0 + path-is-absolute: ^1.0.0 + rimraf: ^2.2.8 + checksum: 6edfd65fc813baa27f1603778c0f5ec11f8c5006a20b920437813ee2023eba18aeec8bef1c89b2e6c84f9fc90fdc7c916f4a700466c8c69d22a35d018f2570f0 + languageName: node + linkType: hard + "fs-extra@npm:^10.0.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -6464,6 +6992,13 @@ __metadata: languageName: node linkType: hard +"functional-red-black-tree@npm:^1.0.1": + version: 1.0.1 + resolution: "functional-red-black-tree@npm:1.0.1" + checksum: ca6c170f37640e2d94297da8bb4bf27a1d12bea3e00e6a3e007fd7aa32e37e000f5772acf941b4e4f3cf1c95c3752033d0c509af157ad8f526e7f00723b9eb9f + languageName: node + linkType: hard + "functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" @@ -6790,7 +7325,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -6962,7 +7497,74 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:^2.14.0, hardhat@npm:^2.16.1, hardhat@npm:^2.19.2, hardhat@npm:^2.8.0": +"hardhat@npm:2.19.5": + version: 2.19.5 + resolution: "hardhat@npm:2.19.5" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@metamask/eth-sig-util": ^4.0.0 + "@nomicfoundation/ethereumjs-block": 5.0.2 + "@nomicfoundation/ethereumjs-blockchain": 7.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.2 + "@nomicfoundation/ethereumjs-evm": 2.0.2 + "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-statemanager": 2.0.2 + "@nomicfoundation/ethereumjs-trie": 6.0.2 + "@nomicfoundation/ethereumjs-tx": 5.0.2 + "@nomicfoundation/ethereumjs-util": 9.0.2 + "@nomicfoundation/ethereumjs-vm": 7.0.2 + "@nomicfoundation/solidity-analyzer": ^0.1.0 + "@sentry/node": ^5.18.1 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": ^5.1.0 + adm-zip: ^0.4.16 + aggregate-error: ^3.0.0 + ansi-escapes: ^4.3.0 + boxen: ^5.1.2 + chalk: ^2.4.2 + chokidar: ^3.4.0 + ci-info: ^2.0.0 + debug: ^4.1.1 + enquirer: ^2.3.0 + env-paths: ^2.2.0 + ethereum-cryptography: ^1.0.3 + ethereumjs-abi: ^0.6.8 + find-up: ^2.1.0 + fp-ts: 1.19.3 + fs-extra: ^7.0.1 + glob: 7.2.0 + immutable: ^4.0.0-rc.12 + io-ts: 1.10.4 + keccak: ^3.0.2 + lodash: ^4.17.11 + mnemonist: ^0.38.0 + mocha: ^10.0.0 + p-map: ^4.0.0 + raw-body: ^2.4.1 + resolve: 1.17.0 + semver: ^6.3.0 + solc: 0.7.3 + source-map-support: ^0.5.13 + stacktrace-parser: ^0.1.10 + tsort: 0.0.1 + undici: ^5.14.0 + uuid: ^8.3.2 + ws: ^7.4.6 + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: 316b03a1d090360e6ed471fe125360ec0c66c5bb62e29492898932b1a9a5227c12d7a18343877c59725f321647a01fde0841649bf7d8a4a746148a0d38b0ee27 + languageName: node + linkType: hard + +"hardhat@npm:^2.14.0, hardhat@npm:^2.16.1, hardhat@npm:^2.8.0": version: 2.22.7 resolution: "hardhat@npm:2.22.7" dependencies: @@ -7304,7 +7906,7 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4": +"ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e @@ -7524,6 +8126,13 @@ __metadata: languageName: node linkType: hard +"is-buffer@npm:^2.0.5": + version: 2.0.5 + resolution: "is-buffer@npm:2.0.5" + checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 + languageName: node + linkType: hard + "is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" @@ -7853,6 +8462,13 @@ __metadata: languageName: node linkType: hard +"js-sdsl@npm:^4.1.4": + version: 4.4.2 + resolution: "js-sdsl@npm:4.4.2" + checksum: ba705adc1788bf3c6f6c8e5077824f2bb4f0acab5a984420ce5cc492c7fff3daddc26335ad2c9a67d4f5e3241ec790f9e5b72a625adcf20cf321d2fd85e62b8b + languageName: node + linkType: hard + "js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" @@ -7971,6 +8587,18 @@ __metadata: languageName: node linkType: hard +"jsonfile@npm:^2.1.0": + version: 2.4.0 + resolution: "jsonfile@npm:2.4.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: f5064aabbc9e35530dc471d8b203ae1f40dbe949ddde4391c6f6a6d310619a15f0efdae5587df594d1d70c555193aaeee9d2ed4aec9ffd5767bd5e4e62d49c3d + languageName: node + linkType: hard + "jsonfile@npm:^4.0.0": version: 4.0.0 resolution: "jsonfile@npm:4.0.0" @@ -8059,6 +8687,46 @@ __metadata: languageName: node linkType: hard +"klaw@npm:^1.0.0": + version: 1.3.1 + resolution: "klaw@npm:1.3.1" + dependencies: + graceful-fs: ^4.1.9 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 8f69e4797c26e7c3f2426bfa85f38a3da3c2cb1b4c6bd850d2377aed440d41ce9d806f2885c2e2e224372c56af4b1d43b8a499adecf9a05e7373dc6b8b7c52e4 + languageName: node + linkType: hard + +"level-supports@npm:^4.0.0": + version: 4.0.1 + resolution: "level-supports@npm:4.0.1" + checksum: d4552b42bb8cdeada07b0f6356c7a90fefe76279147331f291aceae26e3e56d5f927b09ce921647c0230bfe03ddfbdcef332be921e5c2194421ae2bfa3cf6368 + languageName: node + linkType: hard + +"level-transcoder@npm:^1.0.1": + version: 1.0.1 + resolution: "level-transcoder@npm:1.0.1" + dependencies: + buffer: ^6.0.3 + module-error: ^1.0.1 + checksum: 304f08d802faf3491a533b6d87ad8be3cabfd27f2713bbe9d4c633bf50fcb9460eab5a6776bf015e101ead7ba1c1853e05e7f341112f17a9d0cb37ee5a421a25 + languageName: node + linkType: hard + +"level@npm:^8.0.0": + version: 8.0.1 + resolution: "level@npm:8.0.1" + dependencies: + abstract-level: ^1.0.4 + browser-level: ^1.0.1 + classic-level: ^1.2.0 + checksum: c5641cbba666ef9eb0292aad01d86a4f1af18e637d1fc097c65bf0109ab8d7e6fba8c8faf6c74ae4e48edac4310f7dd87def26ffeebfe395c7afd9bd2461ab97 + languageName: node + linkType: hard + "levn@npm:^0.4.1": version: 0.4.1 resolution: "levn@npm:0.4.1" @@ -8579,6 +9247,13 @@ __metadata: languageName: node linkType: hard +"mcl-wasm@npm:^0.7.1": + version: 0.7.9 + resolution: "mcl-wasm@npm:0.7.9" + checksum: 6b6ed5084156b98b2db70b223e1ba2c01953970b48a2e0c4ea3eeb9296610e6b3bfb2a2cce9e92e2d7ad61778b5f5a630e705e663835e915ba188c174a0a37fa + languageName: node + linkType: hard + "md5.js@npm:^1.3.4": version: 1.3.5 resolution: "md5.js@npm:1.3.5" @@ -8590,6 +9265,17 @@ __metadata: languageName: node linkType: hard +"memory-level@npm:^1.0.0": + version: 1.0.0 + resolution: "memory-level@npm:1.0.0" + dependencies: + abstract-level: ^1.0.0 + functional-red-black-tree: ^1.0.1 + module-error: ^1.0.1 + checksum: 80b1b7aedaf936e754adbcd7b9303018c3684fb32f9992fd967c448f145d177f16c724fbba9ed3c3590a9475fd563151eae664d69b83d2ad48714852e9fc5c72 + languageName: node + linkType: hard + "memorystream@npm:^0.3.1": version: 0.3.1 resolution: "memorystream@npm:0.3.1" @@ -8971,6 +9657,13 @@ __metadata: languageName: node linkType: hard +"module-error@npm:^1.0.1, module-error@npm:^1.0.2": + version: 1.0.2 + resolution: "module-error@npm:1.0.2" + checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 + languageName: node + linkType: hard + "module-not-found-error@npm:^1.0.1": version: 1.0.1 resolution: "module-not-found-error@npm:1.0.1" @@ -9028,6 +9721,13 @@ __metadata: languageName: node linkType: hard +"napi-macros@npm:^2.2.2": + version: 2.2.2 + resolution: "napi-macros@npm:2.2.2" + checksum: c6f9bd71cdbbc37ddc3535aa5be481238641d89585b8a3f4d301cb89abf459e2d294810432bb7d12056d1f9350b1a0899a5afcf460237a3da6c398cf0fec7629 + languageName: node + linkType: hard + "natural-compare-lite@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare-lite@npm:1.4.0" @@ -9108,7 +9808,7 @@ __metadata: languageName: node linkType: hard -"node-gyp-build@npm:^4.2.0": +"node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": version: 4.8.1 resolution: "node-gyp-build@npm:4.8.1" bin: @@ -10155,7 +10855,7 @@ __metadata: languageName: node linkType: hard -"queue-microtask@npm:^1.2.2": +"queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 @@ -10414,7 +11114,7 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.2": +"require-from-string@npm:^2.0.0, require-from-string@npm:^2.0.2": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b @@ -10530,6 +11230,17 @@ __metadata: languageName: node linkType: hard +"rimraf@npm:^2.2.8": + version: 2.7.1 + resolution: "rimraf@npm:2.7.1" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd + languageName: node + linkType: hard + "rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" @@ -10562,6 +11273,15 @@ __metadata: languageName: node linkType: hard +"run-parallel-limit@npm:^1.1.0": + version: 1.1.0 + resolution: "run-parallel-limit@npm:1.1.0" + dependencies: + queue-microtask: ^1.2.2 + checksum: 672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -10571,6 +11291,13 @@ __metadata: languageName: node linkType: hard +"rustbn.js@npm:~0.2.0": + version: 0.2.0 + resolution: "rustbn.js@npm:0.2.0" + checksum: 2148e7ba34e70682907ee29df4784639e6eb025481b2c91249403b7ec57181980161868d9aa24822a5075dd1bb5a180dfedc77309e5f0d27b6301f9b563af99a + languageName: node + linkType: hard + "rxjs@npm:^7.2.0": version: 7.8.1 resolution: "rxjs@npm:7.8.1" @@ -10984,6 +11711,25 @@ __metadata: languageName: node linkType: hard +"solc@npm:0.7.3": + version: 0.7.3 + resolution: "solc@npm:0.7.3" + dependencies: + command-exists: ^1.2.8 + commander: 3.0.2 + follow-redirects: ^1.12.1 + fs-extra: ^0.30.0 + js-sha3: 0.8.0 + memorystream: ^0.3.1 + require-from-string: ^2.0.0 + semver: ^5.5.0 + tmp: 0.0.33 + bin: + solcjs: solcjs + checksum: 2d8eb16c6d8f648213c94dc8d977cffe5099cba7d41c82d92d769ef71ae8320a985065ce3d6c306440a85f8e8d2b27fb30bdd3ac38f69e5c1fa0ab8a3fb2f217 + languageName: node + linkType: hard + "solc@npm:0.8.26": version: 0.8.26 resolution: "solc@npm:0.8.26" From 8f68f70f8bc86ca110f3c67f4c30d7c27422684e Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Mon, 5 Aug 2024 19:14:01 +0530 Subject: [PATCH 69/85] chore: add "@types/debug" package --- package.json | 1 + yarn.lock | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/package.json b/package.json index 98970ed36..6f8720314 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@typechain/ethers-v5": "^10.1.0", "@typechain/hardhat": "^6.1.2", "@types/chai": "^4.3.1", + "@types/debug": "^4.1.12", "@types/mocha": "^9.1.1", "@types/node": "^18.7.1", "@typescript-eslint/eslint-plugin": "^5.40.0", diff --git a/yarn.lock b/yarn.lock index ba4fcaf33..a9e7bdbad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3254,6 +3254,15 @@ __metadata: languageName: node linkType: hard +"@types/debug@npm:^4.1.12": + version: 4.1.12 + resolution: "@types/debug@npm:4.1.12" + dependencies: + "@types/ms": "*" + checksum: 47876a852de8240bfdaf7481357af2b88cb660d30c72e73789abf00c499d6bc7cd5e52f41c915d1b9cd8ec9fef5b05688d7b7aef17f7f272c2d04679508d1053 + languageName: node + linkType: hard + "@types/events@npm:*": version: 3.0.3 resolution: "@types/events@npm:3.0.3" @@ -3315,6 +3324,13 @@ __metadata: languageName: node linkType: hard +"@types/ms@npm:*": + version: 0.7.34 + resolution: "@types/ms@npm:0.7.34" + checksum: f38d36e7b6edecd9badc9cf50474159e9da5fa6965a75186cceaf883278611b9df6669dc3a3cc122b7938d317b68a9e3d573d316fcb35d1be47ec9e468c6bd8a + languageName: node + linkType: hard + "@types/node@npm:*": version: 22.0.2 resolution: "@types/node@npm:22.0.2" @@ -3739,6 +3755,7 @@ __metadata: "@typechain/ethers-v5": ^10.1.0 "@typechain/hardhat": ^6.1.2 "@types/chai": ^4.3.1 + "@types/debug": ^4.1.12 "@types/mocha": ^9.1.1 "@types/node": ^18.7.1 "@typescript-eslint/eslint-plugin": ^5.40.0 From 51c070278168a0a65789c3b9e6320a1f57d5876c Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:20:13 +0530 Subject: [PATCH 70/85] PR comments --- deploy/008-deploy-vaults.ts | 3 --- package.json | 2 +- tests/hardhat/Prime/Prime.ts | 2 ++ tests/hardhat/Prime/PrimeLiquidityProvider.ts | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/008-deploy-vaults.ts b/deploy/008-deploy-vaults.ts index 7e6e3310c..b0a521c34 100644 --- a/deploy/008-deploy-vaults.ts +++ b/deploy/008-deploy-vaults.ts @@ -13,7 +13,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { log: true, autoMine: true, skipIfAlreadyDeployed: true, - maxFeePerGas: "200000000", }); await deploy("XVSVaultProxy", { @@ -22,7 +21,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { log: true, autoMine: true, skipIfAlreadyDeployed: true, - maxFeePerGas: "200000000", }); await deploy("XVSStore", { @@ -31,7 +29,6 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { log: true, autoMine: true, skipIfAlreadyDeployed: true, - maxFeePerGas: "200000000", }); }; diff --git a/package.json b/package.json index 6f8720314..9622a0d00 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "clean": "hardhat clean && hardhat clean --config hardhat.config.zksync.ts" }, "dependencies": { - "@defi-wonderland/smock": "2.3.5", "@nomicfoundation/hardhat-ethers": "^3.0.0", "@openzeppelin/contracts": "4.9.3", "@openzeppelin/contracts-upgradeable": "^4.8.0", @@ -47,6 +46,7 @@ "devDependencies": { "@commitlint/cli": "^17.0.3", "@commitlint/config-conventional": "^17.0.3", + "@defi-wonderland/smock": "2.3.5", "@ethersproject/abi": "^5.6.4", "@ethersproject/abstract-provider": "^5", "@ethersproject/abstract-signer": "^5", diff --git a/tests/hardhat/Prime/Prime.ts b/tests/hardhat/Prime/Prime.ts index e20eaeaf2..31963afd1 100644 --- a/tests/hardhat/Prime/Prime.ts +++ b/tests/hardhat/Prime/Prime.ts @@ -190,6 +190,7 @@ async function deployProtocol(): Promise { ], { constructorArgs: [false, 10512000], + // To allow the usage constructor & internal functions that might change storage unsafeAllow: ["constructor", "internal-function-storage"], }, ); @@ -217,6 +218,7 @@ async function deployProtocol(): Promise { ], { constructorArgs: [wbnb.address, vbnb.address, 10512000, stakingPeriod, minimumXVS, maximumXVSCap, false], + // To allow the usage constructor & internal functions that might change storage unsafeAllow: ["constructor", "internal-function-storage"], }, ); diff --git a/tests/hardhat/Prime/PrimeLiquidityProvider.ts b/tests/hardhat/Prime/PrimeLiquidityProvider.ts index 8d1352cdc..9dd854fc8 100644 --- a/tests/hardhat/Prime/PrimeLiquidityProvider.ts +++ b/tests/hardhat/Prime/PrimeLiquidityProvider.ts @@ -52,6 +52,7 @@ const fixture = async () => { ], { constructorArgs: [false, 10512000], + // To allow the usage constructor & internal functions that might change storage unsafeAllow: ["constructor", "internal-function-storage"], }, ); From 4bd4d30182e490554c7d132bda0853bc68ce8d89 Mon Sep 17 00:00:00 2001 From: Jesus Lanchas Date: Thu, 8 Aug 2024 10:34:36 +0200 Subject: [PATCH 71/85] chore: move to dev dependency the hardhat package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9622a0d00..c51f669ab 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@venusprotocol/token-bridge": "^2.0.0", "bignumber.js": "^9.1.2", "dotenv": "^16.0.1", - "hardhat": "2.19.5", "module-alias": "^2.2.2" }, "devDependencies": { @@ -80,6 +79,7 @@ "eslint": "^8.25.0", "eslint-config-prettier": "^8.5.0", "ethers": "^5.7.0", + "hardhat": "2.19.5", "hardhat-contract-sizer": "^2.8.0", "hardhat-deploy": "^0.12.4", "hardhat-deploy-ethers": "^0.3.0-beta.13", From 89938d0a963217d881f160f08b0143e08eead37f Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Thu, 8 Aug 2024 10:14:33 +0000 Subject: [PATCH 72/85] chore(release): 9.2.0-dev.7 [skip ci] ## [9.2.0-dev.7](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.6...v9.2.0-dev.7) (2024-08-08) ### Features * deployment of XVSVault on zksyncsepolia ([0afc425](https://github.com/VenusProtocol/venus-protocol/commit/0afc4253b38db7b6f3f9fce988c89f5bfad307c1)) * updating deployment files ([2847c80](https://github.com/VenusProtocol/venus-protocol/commit/2847c80d66bfb3dc3eacb8540e64ec14befb1ae0)) * updating deployment files ([fc3f331](https://github.com/VenusProtocol/venus-protocol/commit/fc3f3311785de87931f1704c7d3a246dd5b194e6)) --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 081abc5d1..c5ffeb778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [9.2.0-dev.7](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.6...v9.2.0-dev.7) (2024-08-08) + + +### Features + +* deployment of XVSVault on zksyncsepolia ([0afc425](https://github.com/VenusProtocol/venus-protocol/commit/0afc4253b38db7b6f3f9fce988c89f5bfad307c1)) +* updating deployment files ([2847c80](https://github.com/VenusProtocol/venus-protocol/commit/2847c80d66bfb3dc3eacb8540e64ec14befb1ae0)) +* updating deployment files ([fc3f331](https://github.com/VenusProtocol/venus-protocol/commit/fc3f3311785de87931f1704c7d3a246dd5b194e6)) + ## [9.2.0-dev.6](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.5...v9.2.0-dev.6) (2024-08-01) diff --git a/package.json b/package.json index c51f669ab..e925acffe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.6", + "version": "9.2.0-dev.7", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From edf387052fa9e1d68e05bfd317b24ea3adcc9dc1 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:08:18 +0530 Subject: [PATCH 73/85] refactor: add dependency compiler in hardhat config --- hardhat.config.ts | 7 +++++++ hardhat.config.zksync.ts | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 71c89dc08..6c0ccc0e8 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -7,6 +7,7 @@ import "@nomiclabs/hardhat-etherscan"; import "@openzeppelin/hardhat-upgrades"; import "@typechain/hardhat"; import fs from "fs"; +import "hardhat-dependency-compiler"; import "hardhat-deploy"; import { HardhatUserConfig, extendConfig, task } from "hardhat/config"; import { HardhatConfig } from "hardhat/types"; @@ -336,6 +337,12 @@ const config: HardhatUserConfig = { pages: "files", templates: "docgen-templates", }, + dependencyCompiler: { + paths: [ + "hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol", + "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol", + ], + }, }; function isFork() { diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts index 298d8258a..ee5b442ca 100644 --- a/hardhat.config.zksync.ts +++ b/hardhat.config.zksync.ts @@ -119,7 +119,6 @@ const config: HardhatUserConfig = { }, dependencyCompiler: { paths: [ - "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol", "hardhat-deploy/solc_0.8/proxy/OptimizedTransparentUpgradeableProxy.sol", "hardhat-deploy/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol", ], From cb85299dcec3e5f58adae8303ab4f6e481196f7f Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Tue, 13 Aug 2024 16:51:13 +0000 Subject: [PATCH 74/85] chore(release): 9.2.0-dev.8 [skip ci] ## [9.2.0-dev.8](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.7...v9.2.0-dev.8) (2024-08-13) ### Features * Prime deployments on zksync sepolia ([5716327](https://github.com/VenusProtocol/venus-protocol/commit/571632700882626edbf2bfea20ad5ce5ae9fbefc)) * updating deployment files ([b3281eb](https://github.com/VenusProtocol/venus-protocol/commit/b3281ebd86b662ce7ae29a2a35b7a29b81f39664)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ffeb778..2828d274f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [9.2.0-dev.8](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.7...v9.2.0-dev.8) (2024-08-13) + + +### Features + +* Prime deployments on zksync sepolia ([5716327](https://github.com/VenusProtocol/venus-protocol/commit/571632700882626edbf2bfea20ad5ce5ae9fbefc)) +* updating deployment files ([b3281eb](https://github.com/VenusProtocol/venus-protocol/commit/b3281ebd86b662ce7ae29a2a35b7a29b81f39664)) + ## [9.2.0-dev.7](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.6...v9.2.0-dev.7) (2024-08-08) diff --git a/package.json b/package.json index 0dc187ee4..9b2f8024e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.7", + "version": "9.2.0-dev.8", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 94c3a738527d5e72801fbb55ea5ea3afa2bee41a Mon Sep 17 00:00:00 2001 From: pwdcd Date: Wed, 14 Aug 2024 11:28:05 +0800 Subject: [PATCH 75/85] chore: fix some comments Signed-off-by: pwdcd --- tests/hardhat/Fork/TokenRedeemer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hardhat/Fork/TokenRedeemer.ts b/tests/hardhat/Fork/TokenRedeemer.ts index ae1942a6a..37a5a2777 100644 --- a/tests/hardhat/Fork/TokenRedeemer.ts +++ b/tests/hardhat/Fork/TokenRedeemer.ts @@ -323,7 +323,7 @@ const test = (setup: () => Promise) => () => { ).to.be.reverted; }); - it("should redeem and transfer succesfully", async () => { + it("should redeem and transfer successfully", async () => { const vTokenAmount = await vToken.balanceOf(supplier.address); const exchRateCurr = await vToken.callStatic.exchangeRateCurrent(); const vTokenRedeemAmount = SUPPLIED_AMOUNT.mul(parseUnits("1", 18)).div(exchRateCurr); @@ -370,7 +370,7 @@ const test = (setup: () => Promise) => () => { ).to.be.reverted; }); - it("should redeem and repay succesfully", async () => { + it("should redeem and repay successfully", async () => { await vToken2.connect(borrower).borrow(BORROWED_AMOUNT); const vTokenAmount = await vToken2.balanceOf(treasury.address); @@ -691,7 +691,7 @@ const test = (setup: () => Promise) => () => { ).to.be.revertedWith("Ownable: caller is not the owner"); }); - it("repays one borrow succesfully", async () => { + it("repays one borrow successfully", async () => { await vaiController.connect(borrower).mintVAI(BORROWED_AMOUNT); await vai.mint(redeemer.address, BORROWED_AMOUNT); expect(await vaiController.getVAIRepayAmount(borrower.address)).to.equal(BORROWED_AMOUNT); @@ -699,7 +699,7 @@ const test = (setup: () => Promise) => () => { expect(await vaiController.getVAIRepayAmount(borrower.address)).to.equal(0); }); - it("repays multiple borrows succesfully and transfers refund to treasury", async () => { + it("repays multiple borrows successfully and transfers refund to treasury", async () => { for (const borrower of borrowers) { await vaiController.connect(borrower).mintVAI(BORROWED_AMOUNT); } From cf5b5287559b12841339f322de4478f9a4757783 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Fri, 16 Aug 2024 14:04:11 +0530 Subject: [PATCH 76/85] fix: ven-s2 --- .../TwoKinksInterestRateModel.sol | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 1051bc1b8..08c231bba 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -40,6 +40,11 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { */ int256 public immutable BASE_RATE_2_PER_BLOCK; + /** + * @notice The maximum kink interest rate + */ + int256 public immutable RATE_1; + ////////////////////// SLOPE 3 ////////////////////// /** @@ -52,6 +57,11 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { */ int256 public immutable JUMP_MULTIPLIER_PER_BLOCK; + /** + * @notice The maximum kink interest rate + */ + int256 public immutable RATE_2; + /// @notice Base unit for computations, usually used in scaling (multiplications, divisions) uint256 internal constant EXP_SCALE = 1e18; @@ -99,6 +109,15 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { BASE_RATE_2_PER_BLOCK = baseRate2PerYear_ / BLOCKS_PER_YEAR; KINK_2 = kink2_; JUMP_MULTIPLIER_PER_BLOCK = jumpMultiplierPerYear_ / BLOCKS_PER_YEAR; + + int256 expScale = int256(EXP_SCALE); + RATE_1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); + + int256 slope2Util; + unchecked { + slope2Util = KINK_2 - KINK_1; + } + RATE_2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; } /** @@ -168,29 +187,21 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { if (util < KINK_1) { return _minCap(((util * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); } else if (util < KINK_2) { - int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); int256 slope2Util; unchecked { slope2Util = util - KINK_1; } int256 rate2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; - return _minCap(rate1 + rate2); + return _minCap(RATE_1 + rate2); } else { - int256 rate1 = (((KINK_1 * MULTIPLIER_PER_BLOCK) / expScale) + BASE_RATE_PER_BLOCK); - int256 slope2Util; - - unchecked { - slope2Util = KINK_2 - KINK_1; - } - int256 rate2 = ((slope2Util * MULTIPLIER_2_PER_BLOCK) / expScale) + BASE_RATE_2_PER_BLOCK; int256 slope3Util; unchecked { slope3Util = util - KINK_2; } int256 rate3 = ((slope3Util * JUMP_MULTIPLIER_PER_BLOCK) / expScale); - return _minCap(rate1 + rate2 + rate3); + return _minCap(RATE_1 + RATE_2 + rate3); } } From ae53d56ba0fa2a05c3c5605b8d9f48703fbcc775 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Fri, 16 Aug 2024 14:06:17 +0530 Subject: [PATCH 77/85] fix: ven-s3 --- .../TwoKinksInterestRateModel.sol | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol index 08c231bba..7fd540bff 100644 --- a/contracts/InterestRateModels/TwoKinksInterestRateModel.sol +++ b/contracts/InterestRateModels/TwoKinksInterestRateModel.sol @@ -14,12 +14,12 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { ////////////////////// SLOPE 1 ////////////////////// /** - * @notice The multiplier of utilization rate per block that gives the slope 1 of the interest rate + * @notice The multiplier of utilization rate per block that gives the slope 1 of the interest rate scaled by EXP_SCALE */ int256 public immutable MULTIPLIER_PER_BLOCK; /** - * @notice The base interest rate per block which is the y-intercept when utilization rate is 0 + * @notice The base interest rate per block which is the y-intercept when utilization rate is 0 scaled by EXP_SCALE */ int256 public immutable BASE_RATE_PER_BLOCK; @@ -31,17 +31,17 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 public immutable KINK_1; /** - * @notice The multiplier of utilization rate per block that gives the slope 2 of the interest rate + * @notice The multiplier of utilization rate per block that gives the slope 2 of the interest rate scaled by EXP_SCALE */ int256 public immutable MULTIPLIER_2_PER_BLOCK; /** - * @notice The base interest rate per block which is the y-intercept when utilization rate hits KINK_1 + * @notice The base interest rate per block which is the y-intercept when utilization rate hits KINK_1 scaled by EXP_SCALE */ int256 public immutable BASE_RATE_2_PER_BLOCK; /** - * @notice The maximum kink interest rate + * @notice The maximum kink interest rate scaled by EXP_SCALE */ int256 public immutable RATE_1; @@ -53,12 +53,12 @@ contract TwoKinksInterestRateModel is InterestRateModelV8 { int256 public immutable KINK_2; /** - * @notice The multiplier of utilization rate per block that gives the slope 3 of interest rate + * @notice The multiplier of utilization rate per block that gives the slope 3 of interest rate scaled by EXP_SCALE */ int256 public immutable JUMP_MULTIPLIER_PER_BLOCK; /** - * @notice The maximum kink interest rate + * @notice The maximum kink interest rate scaled by EXP_SCALE */ int256 public immutable RATE_2; From 8615411098842b9f81b9edef572bd296ed4a0af0 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Wed, 21 Aug 2024 09:45:51 +0000 Subject: [PATCH 78/85] chore(release): 9.2.0-dev.9 [skip ci] ## [9.2.0-dev.9](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.8...v9.2.0-dev.9) (2024-08-21) ### Bug Fixes * added TwoKinksInterestRateModel ([11510df](https://github.com/VenusProtocol/venus-protocol/commit/11510df081d8626107a0ff64a82004695986e572)) * fix comment ([e9aee5c](https://github.com/VenusProtocol/venus-protocol/commit/e9aee5ce51795cc4ec35588bb9af3190070f8746)) * fixed tests ([f3a10bb](https://github.com/VenusProtocol/venus-protocol/commit/f3a10bb03edae8a9a967bb72c20a845f9341fae0)) * max utilisation rate ([35c832e](https://github.com/VenusProtocol/venus-protocol/commit/35c832eed9a773fe0f4bdaed1ab9d6e696201cad)) * removed SignedSafeMath ([2864022](https://github.com/VenusProtocol/venus-protocol/commit/2864022a634434331fbded9848539a07640d500d)) * use solidity 0.8 ([9124f4f](https://github.com/VenusProtocol/venus-protocol/commit/9124f4fd4f97437bff9f819a02f05622bd51fbee)) * ven-s2 ([cf5b528](https://github.com/VenusProtocol/venus-protocol/commit/cf5b5287559b12841339f322de4478f9a4757783)) * ven-s3 ([ae53d56](https://github.com/VenusProtocol/venus-protocol/commit/ae53d56ba0fa2a05c3c5605b8d9f48703fbcc775)) * vpb-01 ([4c9be09](https://github.com/VenusProtocol/venus-protocol/commit/4c9be09cc591e9f1eff5a596e699d380340c8073)) * vpb-01 ([191b1c4](https://github.com/VenusProtocol/venus-protocol/commit/191b1c4d2c29d77ca5b79072881ea9d631adf2d6)) * vpb-02 ([414bd7d](https://github.com/VenusProtocol/venus-protocol/commit/414bd7d71eac5ce5eefd16ffcb5971c08c20f75e)) * vpb-03 ([f339105](https://github.com/VenusProtocol/venus-protocol/commit/f339105dbce91c202beed6d6a14fcf75efb29058)) * vpb-03 alleviation ([72133a8](https://github.com/VenusProtocol/venus-protocol/commit/72133a8b164f7f2f78bd4d795f5460f891c74c78)) * vpb-05 ([b5df8d2](https://github.com/VenusProtocol/venus-protocol/commit/b5df8d29db3e3d9e86ac01e82b5c3ab39b9222e4)) * wip - unit tests ([0cb0b21](https://github.com/VenusProtocol/venus-protocol/commit/0cb0b2168255b31315a45763a57a088ee772f084)) --- CHANGELOG.md | 21 +++++++++++++++++++++ package.json | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2828d274f..1914d1fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +## [9.2.0-dev.9](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.8...v9.2.0-dev.9) (2024-08-21) + + +### Bug Fixes + +* added TwoKinksInterestRateModel ([11510df](https://github.com/VenusProtocol/venus-protocol/commit/11510df081d8626107a0ff64a82004695986e572)) +* fix comment ([e9aee5c](https://github.com/VenusProtocol/venus-protocol/commit/e9aee5ce51795cc4ec35588bb9af3190070f8746)) +* fixed tests ([f3a10bb](https://github.com/VenusProtocol/venus-protocol/commit/f3a10bb03edae8a9a967bb72c20a845f9341fae0)) +* max utilisation rate ([35c832e](https://github.com/VenusProtocol/venus-protocol/commit/35c832eed9a773fe0f4bdaed1ab9d6e696201cad)) +* removed SignedSafeMath ([2864022](https://github.com/VenusProtocol/venus-protocol/commit/2864022a634434331fbded9848539a07640d500d)) +* use solidity 0.8 ([9124f4f](https://github.com/VenusProtocol/venus-protocol/commit/9124f4fd4f97437bff9f819a02f05622bd51fbee)) +* ven-s2 ([cf5b528](https://github.com/VenusProtocol/venus-protocol/commit/cf5b5287559b12841339f322de4478f9a4757783)) +* ven-s3 ([ae53d56](https://github.com/VenusProtocol/venus-protocol/commit/ae53d56ba0fa2a05c3c5605b8d9f48703fbcc775)) +* vpb-01 ([4c9be09](https://github.com/VenusProtocol/venus-protocol/commit/4c9be09cc591e9f1eff5a596e699d380340c8073)) +* vpb-01 ([191b1c4](https://github.com/VenusProtocol/venus-protocol/commit/191b1c4d2c29d77ca5b79072881ea9d631adf2d6)) +* vpb-02 ([414bd7d](https://github.com/VenusProtocol/venus-protocol/commit/414bd7d71eac5ce5eefd16ffcb5971c08c20f75e)) +* vpb-03 ([f339105](https://github.com/VenusProtocol/venus-protocol/commit/f339105dbce91c202beed6d6a14fcf75efb29058)) +* vpb-03 alleviation ([72133a8](https://github.com/VenusProtocol/venus-protocol/commit/72133a8b164f7f2f78bd4d795f5460f891c74c78)) +* vpb-05 ([b5df8d2](https://github.com/VenusProtocol/venus-protocol/commit/b5df8d29db3e3d9e86ac01e82b5c3ab39b9222e4)) +* wip - unit tests ([0cb0b21](https://github.com/VenusProtocol/venus-protocol/commit/0cb0b2168255b31315a45763a57a088ee772f084)) + ## [9.2.0-dev.8](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.7...v9.2.0-dev.8) (2024-08-13) diff --git a/package.json b/package.json index 9b2f8024e..9fc2bed70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.8", + "version": "9.2.0-dev.9", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From 52127eb3d40589d0fb09ed383b5a410fb52ad8b6 Mon Sep 17 00:00:00 2001 From: Kirill Kuvshinov Date: Wed, 21 Aug 2024 12:32:14 +0300 Subject: [PATCH 79/85] feat: add interest rate model deployments for Chaos recs --- ...slope1000bps_jump50000bps_kink8000bps.json | 380 ++++++++++++++++++ ..._slope750bps_jump50000bps_kink8000bps.json | 380 ++++++++++++++++++ .../4099a9899d8cb27aac6a0a3565b643da.json | 366 +++++++++++++++++ helpers/deploymentConfig.ts | 6 +- 4 files changed, 1129 insertions(+), 3 deletions(-) create mode 100644 deployments/bscmainnet/JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps.json create mode 100644 deployments/bscmainnet/JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps.json create mode 100644 deployments/bscmainnet/solcInputs/4099a9899d8cb27aac6a0a3565b643da.json diff --git a/deployments/bscmainnet/JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps.json b/deployments/bscmainnet/JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps.json new file mode 100644 index 000000000..0fc379019 --- /dev/null +++ b/deployments/bscmainnet/JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps.json @@ -0,0 +1,380 @@ +{ + "address": "0x05c68eE7c9c66BE3a42476fe3838DE65ddE968f1", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" + } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x319ca443f4e591aaf33a8bb5cbcb662fe404db4e3f3b7ae7d6641083021a0e35", + "receipt": { + "to": null, + "from": "0x55A9f5374Af30E3045FB491f1da3C2E8a74d168D", + "contractAddress": "0x05c68eE7c9c66BE3a42476fe3838DE65ddE968f1", + "transactionIndex": 205, + "gasUsed": "468700", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000", + "blockHash": "0xa0d2386ad6e925285437137fdcb016956658d2576660802acba4f724f4067f71", + "transactionHash": "0x319ca443f4e591aaf33a8bb5cbcb662fe404db4e3f3b7ae7d6641083021a0e35", + "logs": [ + { + "transactionIndex": 205, + "blockNumber": 41549378, + "transactionHash": "0x319ca443f4e591aaf33a8bb5cbcb662fe404db4e3f3b7ae7d6641083021a0e35", + "address": "0x05c68eE7c9c66BE3a42476fe3838DE65ddE968f1", + "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023703e87b0000000000000000000000000000000000000000000000000000006ebec3680c0000000000000000000000000000000000000000000000000b1a2bc2ec500000", + "logIndex": 518, + "blockHash": "0xa0d2386ad6e925285437137fdcb016956658d2576660802acba4f724f4067f71" + } + ], + "blockNumber": 41549378, + "cumulativeGasUsed": "21591930", + "status": 1, + "byzantium": true + }, + "args": ["0", "100000000000000000", "5000000000000000000", "800000000000000000"], + "numDeployments": 1, + "solcInputHash": "4099a9899d8cb27aac6a0a3565b643da", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", + "devdoc": { + "author": "Venus", + "methods": { + "constructor": { + "params": { + "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by 1e18)", + "jumpMultiplierPerYear": "The multiplierPerBlock after hitting a specified utilization point", + "kink_": "The utilization point at which the jump multiplier is applied", + "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by 1e18)" + } + }, + "getBorrowRate(uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserves": "The amount of reserves in the market" + }, + "return": "The borrow rate percentage per block as a mantissa (scaled by 1e18)" + }, + "getSupplyRate(uint256,uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserveFactorMantissa": "The current reserve factor for the market", + "reserves": "The amount of reserves in the market" + }, + "return": "The supply rate percentage per block as a mantissa (scaled by 1e18)" + }, + "utilizationRate(uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserves": "The amount of reserves in the market (currently unused)" + }, + "return": "The utilization rate as a mantissa between [0, 1e18]" + } + }, + "title": "Venus's JumpRateModel Contract" + }, + "userdoc": { + "methods": { + "constructor": "Construct an interest rate model", + "getBorrowRate(uint256,uint256,uint256)": { + "notice": "Calculates the current borrow rate per block, with the error code expected by the market" + }, + "getSupplyRate(uint256,uint256,uint256,uint256)": { + "notice": "Calculates the current supply rate per block" + }, + "utilizationRate(uint256,uint256,uint256)": { + "notice": "Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`" + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 9103, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "multiplierPerBlock", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 9105, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "baseRatePerBlock", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 9107, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "jumpMultiplierPerBlock", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 9109, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "kink", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "types": { + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/bscmainnet/JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps.json b/deployments/bscmainnet/JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps.json new file mode 100644 index 000000000..e2571e730 --- /dev/null +++ b/deployments/bscmainnet/JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps.json @@ -0,0 +1,380 @@ +{ + "address": "0xdEf4b9462223c9a44E61d217a145063C7836FD7B", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" + } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x0adffaa3dadcc0579963420497a3034b2f8d232b7796500c0fd62555b1ba4a99", + "receipt": { + "to": null, + "from": "0x55A9f5374Af30E3045FB491f1da3C2E8a74d168D", + "contractAddress": "0xdEf4b9462223c9a44E61d217a145063C7836FD7B", + "transactionIndex": 91, + "gasUsed": "468712", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x955aa58a650c0d721f1054d24332fcdbba37a64dc18d7508ac378b2617112e4c", + "transactionHash": "0x0adffaa3dadcc0579963420497a3034b2f8d232b7796500c0fd62555b1ba4a99", + "logs": [ + { + "transactionIndex": 91, + "blockNumber": 41557363, + "transactionHash": "0x0adffaa3dadcc0579963420497a3034b2f8d232b7796500c0fd62555b1ba4a99", + "address": "0xdEf4b9462223c9a44E61d217a145063C7836FD7B", + "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a942ee5c0000000000000000000000000000000000000000000000000000006ebec3680c0000000000000000000000000000000000000000000000000b1a2bc2ec500000", + "logIndex": 245, + "blockHash": "0x955aa58a650c0d721f1054d24332fcdbba37a64dc18d7508ac378b2617112e4c" + } + ], + "blockNumber": 41557363, + "cumulativeGasUsed": "7909633", + "status": 1, + "byzantium": true + }, + "args": ["0", "75000000000000000", "5000000000000000000", "800000000000000000"], + "numDeployments": 1, + "solcInputHash": "4099a9899d8cb27aac6a0a3565b643da", + "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerBlock\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"blocksPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per block as a mantissa (scaled by 1e18)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"Venus's JumpRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/InterestRateModels/JumpRateModel.sol\":\"JumpRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModels/InterestRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @title Venus's InterestRateModel Interface\\n * @author Venus\\n */\\ncontract InterestRateModel {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) external view returns (uint);\\n}\\n\",\"keccak256\":\"0x7896290ed5d98f1b744676c0cf5cb0bc656befdd8a79ae4cd2d9f90d83aaa52d\"},\"contracts/InterestRateModels/JumpRateModel.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\nimport \\\"../Utils/SafeMath.sol\\\";\\nimport \\\"./InterestRateModel.sol\\\";\\n\\n/**\\n * @title Venus's JumpRateModel Contract\\n * @author Venus\\n */\\ncontract JumpRateModel is InterestRateModel {\\n using SafeMath for uint;\\n\\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\\n\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplierPerBlock after hitting a specified utilization point\\n */\\n uint public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint public kink;\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market (currently unused)\\n * @return The utilization rate as a mantissa between [0, 1e18]\\n */\\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\\n // Utilization rate is 0 when there are no borrows\\n if (borrows == 0) {\\n return 0;\\n }\\n\\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\\n uint util = utilizationRate(cash, borrows, reserves);\\n\\n if (util <= kink) {\\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n } else {\\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\\n uint excessUtil = util.sub(kink);\\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\\n }\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\n * @param cash The amount of cash in the market\\n * @param borrows The amount of borrows in the market\\n * @param reserves The amount of reserves in the market\\n * @param reserveFactorMantissa The current reserve factor for the market\\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint cash,\\n uint borrows,\\n uint reserves,\\n uint reserveFactorMantissa\\n ) public view returns (uint) {\\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n }\\n}\\n\",\"keccak256\":\"0x0c90d867067f823ca47664590f132385830ed66d2cfccdf242c028d0a85bd7c9\"},\"contracts/Utils/SafeMath.sol\":{\"content\":\"pragma solidity ^0.5.16;\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return add(a, b, \\\"SafeMath: addition overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n uint256 c = a + b;\\n require(c >= a, errorMessage);\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMath: subtraction overflow\\\");\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n uint256 c = a - b;\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMath: division by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n // Solidity only automatically asserts when dividing by 0\\n require(b > 0, errorMessage);\\n uint256 c = a / b;\\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n return c;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * Reverts with custom message when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x9431fd772ed4abc038cdfe9ce6c0066897bd1685ad45848748d1952935d5b8ef\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516108113803806108118339818101604052608081101561003357600080fd5b508051602080830151604084015160609094015192939092909161006590859062a066809061039e6100fd821b17901c565b6001556100808362a066806100fd602090811b61039e17901c565b60005561009b8262a066806100fd602090811b61039e17901c565b60028190556003829055600154600054604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a1505050506101ee565b600061014583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061014c60201b60201c565b9392505050565b600081836101d85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561019d578181015183820152602001610185565b50505050905090810190601f1680156101ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816101e457fe5b0495945050505050565b610614806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063a385fb9611610066578063a385fb9614610120578063b816881614610128578063b9f9850a14610157578063f14039de1461015f578063fd2da3391461016757610093565b806315f24053146100985780632191f92a146100d35780636e71e2d8146100ef5780638726bb8914610118575b600080fd5b6100c1600480360360608110156100ae57600080fd5b508035906020810135906040013561016f565b60408051918252519081900360200190f35b6100db610247565b604080519115158252519081900360200190f35b6100c16004803603606081101561010557600080fd5b508035906020810135906040013561024c565b6100c161029e565b6100c16102a4565b6100c16004803603608081101561013e57600080fd5b50803590602081013590604081013590606001356102ab565b6100c161032a565b6100c1610330565b6100c1610336565b60008061017d85858561024c565b905060035481116101cf576101c76001546101bb670de0b6b3a76400006101af6000548661033c90919063ffffffff16565b9063ffffffff61039e16565b9063ffffffff6103e016565b915050610240565b60006101fa6001546101bb670de0b6b3a76400006101af60005460035461033c90919063ffffffff16565b905060006102136003548461042290919063ffffffff16565b905061023a826101bb670de0b6b3a76400006101af6002548661033c90919063ffffffff16565b93505050505b9392505050565b600181565b60008261025b57506000610240565b61029661027e83610272878763ffffffff6103e016565b9063ffffffff61042216565b6101af85670de0b6b3a764000063ffffffff61033c16565b949350505050565b60005481565b62a0668081565b6000806102c6670de0b6b3a76400008463ffffffff61042216565b905060006102d587878761016f565b905060006102f5670de0b6b3a76400006101af848663ffffffff61033c16565b905061031e670de0b6b3a76400006101af836103128c8c8c61024c565b9063ffffffff61033c16565b98975050505050505050565b60025481565b60015481565b60035481565b60008261034b57506000610398565b8282028284828161035857fe5b04146103955760405162461bcd60e51b81526004018080602001828103825260218152602001806105bf6021913960400191505060405180910390fd5b90505b92915050565b600061039583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610464565b600061039583836040518060400160405280601b81526020017f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815250610506565b600061039583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610564565b600081836104f05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b557818101518382015260200161049d565b50505050905090810190601f1680156104e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816104fc57fe5b0495945050505050565b6000838301828582101561055b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50949350505050565b600081848411156105b65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156104b557818101518382015260200161049d565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158208d524531d4bd676b08c415f951c89512128d7ce72185b07b426ac97c6c3b50a564736f6c63430005100032", + "devdoc": { + "author": "Venus", + "methods": { + "constructor": { + "params": { + "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by 1e18)", + "jumpMultiplierPerYear": "The multiplierPerBlock after hitting a specified utilization point", + "kink_": "The utilization point at which the jump multiplier is applied", + "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by 1e18)" + } + }, + "getBorrowRate(uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserves": "The amount of reserves in the market" + }, + "return": "The borrow rate percentage per block as a mantissa (scaled by 1e18)" + }, + "getSupplyRate(uint256,uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserveFactorMantissa": "The current reserve factor for the market", + "reserves": "The amount of reserves in the market" + }, + "return": "The supply rate percentage per block as a mantissa (scaled by 1e18)" + }, + "utilizationRate(uint256,uint256,uint256)": { + "params": { + "borrows": "The amount of borrows in the market", + "cash": "The amount of cash in the market", + "reserves": "The amount of reserves in the market (currently unused)" + }, + "return": "The utilization rate as a mantissa between [0, 1e18]" + } + }, + "title": "Venus's JumpRateModel Contract" + }, + "userdoc": { + "methods": { + "constructor": "Construct an interest rate model", + "getBorrowRate(uint256,uint256,uint256)": { + "notice": "Calculates the current borrow rate per block, with the error code expected by the market" + }, + "getSupplyRate(uint256,uint256,uint256,uint256)": { + "notice": "Calculates the current supply rate per block" + }, + "utilizationRate(uint256,uint256,uint256)": { + "notice": "Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`" + } + } + }, + "storageLayout": { + "storage": [ + { + "astId": 9103, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "multiplierPerBlock", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 9105, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "baseRatePerBlock", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 9107, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "jumpMultiplierPerBlock", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 9109, + "contract": "contracts/InterestRateModels/JumpRateModel.sol:JumpRateModel", + "label": "kink", + "offset": 0, + "slot": "3", + "type": "t_uint256" + } + ], + "types": { + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/deployments/bscmainnet/solcInputs/4099a9899d8cb27aac6a0a3565b643da.json b/deployments/bscmainnet/solcInputs/4099a9899d8cb27aac6a0a3565b643da.json new file mode 100644 index 000000000..8a6313073 --- /dev/null +++ b/deployments/bscmainnet/solcInputs/4099a9899d8cb27aac6a0a3565b643da.json @@ -0,0 +1,366 @@ +{ + "language": "Solidity", + "sources": { + "@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\nimport \"./IAccessControlManagerV5.sol\";\n\n/**\n * @title AccessControlledV5\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.5.16)\n * to integrate access controlled mechanism. It provides initialise methods and verifying access methods.\n */\ncontract AccessControlledV5 {\n /// @notice Access control manager contract\n IAccessControlManagerV5 private _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 /**\n * @notice Returns the address of the access control manager contract\n */\n function accessControlManager() external view returns (IAccessControlManagerV5) {\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 = IAccessControlManagerV5(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\");\n }\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./GovernorBravoInterfaces.sol\";\n\n/**\n * @title GovernorBravoDelegate\n * @notice Venus Governance latest on chain governance includes several new features including variable proposal routes and fine grained pause control.\n * Variable routes for proposals allows for governance paramaters such as voting threshold and timelocks to be customized based on the risk level and\n * impact of the proposal. Added granularity to the pause control mechanism allows governance to pause individual actions on specific markets,\n * which reduces impact on the protocol as a whole. This is particularly useful when applied to isolated pools.\n *\n * The goal of **Governance** is to increase governance efficiency, while mitigating and eliminating malicious or erroneous proposals.\n *\n * ## Details\n *\n * Governance has **3 main contracts**: **GovernanceBravoDelegate, XVSVault, XVS** token.\n *\n * - XVS token is the protocol token used for protocol users to cast their vote on submitted proposals.\n * - XVSVault is the main staking contract for XVS. Users first stake their XVS in the vault and receive voting power proportional to their staked\n * tokens that they can use to vote on proposals. Users also can choose to delegate their voting power to other users.\n *\n * # Governor Bravo\n *\n * `GovernanceBravoDelegate` is main Venus Governance contract. Users interact with it to:\n * - Submit new proposal\n * - Vote on a proposal\n * - Cancel a proposal\n * - Queue a proposal for execution with a timelock executor contract.\n * `GovernanceBravoDelegate` uses the XVSVault to get restrict certain actions based on a user's voting power. The governance rules it inforces are:\n * - A user's voting power must be greater than the `proposalThreshold` to submit a proposal\n * - If a user's voting power drops below certain amount, anyone can cancel the the proposal. The governance guardian and proposal creator can also\n * cancel a proposal at anytime before it is queued for execution.\n *\n * ## Venus Improvement Proposal\n *\n * Venus Governance allows for Venus Improvement Proposals (VIPs) to be categorized based on their impact and risk levels. This allows for optimizing proposals\n * execution to allow for things such as expediting interest rate changes and quickly updating risk parameters, while moving slower on other types of proposals\n * that can prevent a larger risk to the protocol and are not urgent. There are three different types of VIPs with different proposal paramters:\n *\n * - `NORMAL`\n * - `FASTTRACK`\n * - `CRITICAL`\n *\n * When initializing the `GovernorBravo` contract, the parameters for the three routes are set. The parameters are:\n *\n * - `votingDelay`: The delay in blocks between submitting a proposal and when voting begins\n * - `votingPeriod`: The number of blocks where voting will be open\n * - `proposalThreshold`: The number of votes required in order submit a proposal\n *\n * There is also a separate timelock executor contract for each route, which is used to dispatch the VIP for execution, giving even more control over the\n * flow of each type of VIP.\n *\n * ## Voting\n *\n * After a VIP is proposed, voting is opened after the `votingDelay` has passed. For example, if `votingDelay = 0`, then voting will begin in the next block\n * after the proposal has been submitted. After the delay, the proposal state is `ACTIVE` and users can cast their vote `for`, `against`, or `abstain`,\n * weighted by their total voting power (tokens + delegated voting power). Abstaining from a voting allows for a vote to be cast and optionally include a\n * comment, without the incrementing for or against vote count. The total voting power for the user is obtained by calling XVSVault's `getPriorVotes`.\n *\n * `GovernorBravoDelegate` also accepts [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for voting on proposals via the external function\n * `castVoteBySig`.\n *\n * ## Delegating\n *\n * A users voting power includes the amount of staked XVS the have staked as well as the votes delegate to them. Delegating is the process of a user loaning\n * their voting power to another, so that the latter has the combined voting power of both users. This is an important feature because it allows for a user\n * to let another user who they trust propose or vote in their place.\n *\n * The delegation of votes happens through the `XVSVault` contract by calling the `delegate` or `delegateBySig` functions. These same functions can revert\n * vote delegation by calling the same function with a value of `0`.\n */\ncontract GovernorBravoDelegate is GovernorBravoDelegateStorageV2, GovernorBravoEvents {\n /// @notice The name of this contract\n string public constant name = \"Venus Governor Bravo\";\n\n /// @notice The minimum setable proposal threshold\n uint public constant MIN_PROPOSAL_THRESHOLD = 150000e18; // 150,000 Xvs\n\n /// @notice The maximum setable proposal threshold\n uint public constant MAX_PROPOSAL_THRESHOLD = 300000e18; //300,000 Xvs\n\n /// @notice The minimum setable voting period\n uint public constant MIN_VOTING_PERIOD = 20 * 60 * 3; // About 3 hours, 3 secs per block\n\n /// @notice The max setable voting period\n uint public constant MAX_VOTING_PERIOD = 20 * 60 * 24 * 14; // About 2 weeks, 3 secs per block\n\n /// @notice The min setable voting delay\n uint public constant MIN_VOTING_DELAY = 1;\n\n /// @notice The max setable voting delay\n uint public constant MAX_VOTING_DELAY = 20 * 60 * 24 * 7; // About 1 week, 3 secs per block\n\n /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n uint public constant quorumVotes = 600000e18; // 600,000 = 2% of Xvs\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the ballot struct used by the contract\n bytes32 public constant BALLOT_TYPEHASH = keccak256(\"Ballot(uint256 proposalId,uint8 support)\");\n\n /**\n * @notice Used to initialize the contract during delegator contructor\n * @param xvsVault_ The address of the XvsVault\n * @param proposalConfigs_ Governance configs for each governance route\n * @param timelocks Timelock addresses for each governance route\n */\n function initialize(\n address xvsVault_,\n ProposalConfig[] memory proposalConfigs_,\n TimelockInterface[] memory timelocks,\n address guardian_\n ) public {\n require(address(proposalTimelocks[0]) == address(0), \"GovernorBravo::initialize: cannot initialize twice\");\n require(msg.sender == admin, \"GovernorBravo::initialize: admin only\");\n require(xvsVault_ != address(0), \"GovernorBravo::initialize: invalid xvs address\");\n require(guardian_ != address(0), \"GovernorBravo::initialize: invalid guardian\");\n require(\n timelocks.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of timelocks should match number of governance routes\"\n );\n require(\n proposalConfigs_.length == uint8(ProposalType.CRITICAL) + 1,\n \"GovernorBravo::initialize:number of proposal configs should match number of governance routes\"\n );\n\n xvsVault = XvsVaultInterface(xvsVault_);\n proposalMaxOperations = 10;\n guardian = guardian_;\n\n //Set parameters for each Governance Route\n uint256 arrLength = proposalConfigs_.length;\n for (uint256 i; i < arrLength; ++i) {\n require(\n proposalConfigs_[i].votingPeriod >= MIN_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid min voting period\"\n );\n require(\n proposalConfigs_[i].votingPeriod <= MAX_VOTING_PERIOD,\n \"GovernorBravo::initialize: invalid max voting period\"\n );\n require(\n proposalConfigs_[i].votingDelay >= MIN_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid min voting delay\"\n );\n require(\n proposalConfigs_[i].votingDelay <= MAX_VOTING_DELAY,\n \"GovernorBravo::initialize: invalid max voting delay\"\n );\n require(\n proposalConfigs_[i].proposalThreshold >= MIN_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid min proposal threshold\"\n );\n require(\n proposalConfigs_[i].proposalThreshold <= MAX_PROPOSAL_THRESHOLD,\n \"GovernorBravo::initialize: invalid max proposal threshold\"\n );\n require(address(timelocks[i]) != address(0), \"GovernorBravo::initialize:invalid timelock address\");\n\n proposalConfigs[i] = proposalConfigs_[i];\n proposalTimelocks[i] = timelocks[i];\n }\n }\n\n /**\n * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n * targets, values, signatures, and calldatas must be of equal length\n * @dev NOTE: Proposals with duplicate set of actions can not be queued for execution. If the proposals consists\n * of duplicate actions, it's recommended to split those actions into separate proposals\n * @param targets Target addresses for proposal calls\n * @param values BNB values for proposal calls\n * @param signatures Function signatures for proposal calls\n * @param calldatas Calldatas for proposal calls\n * @param description String description of the proposal\n * @param proposalType the type of the proposal (e.g NORMAL, FASTTRACK, CRITICAL)\n * @return Proposal id of new proposal\n */\n function propose(\n address[] memory targets,\n uint[] memory values,\n string[] memory signatures,\n bytes[] memory calldatas,\n string memory description,\n ProposalType proposalType\n ) public returns (uint) {\n // Reject proposals before initiating as Governor\n require(initialProposalId != 0, \"GovernorBravo::propose: Governor Bravo not active\");\n require(\n xvsVault.getPriorVotes(msg.sender, sub256(block.number, 1)) >=\n proposalConfigs[uint8(proposalType)].proposalThreshold,\n \"GovernorBravo::propose: proposer votes below proposal threshold\"\n );\n require(\n targets.length == values.length &&\n targets.length == signatures.length &&\n targets.length == calldatas.length,\n \"GovernorBravo::propose: proposal function information arity mismatch\"\n );\n require(targets.length != 0, \"GovernorBravo::propose: must provide actions\");\n require(targets.length <= proposalMaxOperations, \"GovernorBravo::propose: too many actions\");\n\n uint latestProposalId = latestProposalIds[msg.sender];\n if (latestProposalId != 0) {\n ProposalState proposersLatestProposalState = state(latestProposalId);\n require(\n proposersLatestProposalState != ProposalState.Active,\n \"GovernorBravo::propose: one live proposal per proposer, found an already active proposal\"\n );\n require(\n proposersLatestProposalState != ProposalState.Pending,\n \"GovernorBravo::propose: one live proposal per proposer, found an already pending proposal\"\n );\n }\n\n uint startBlock = add256(block.number, proposalConfigs[uint8(proposalType)].votingDelay);\n uint endBlock = add256(startBlock, proposalConfigs[uint8(proposalType)].votingPeriod);\n\n proposalCount++;\n Proposal memory newProposal = Proposal({\n id: proposalCount,\n proposer: msg.sender,\n eta: 0,\n targets: targets,\n values: values,\n signatures: signatures,\n calldatas: calldatas,\n startBlock: startBlock,\n endBlock: endBlock,\n forVotes: 0,\n againstVotes: 0,\n abstainVotes: 0,\n canceled: false,\n executed: false,\n proposalType: uint8(proposalType)\n });\n\n proposals[newProposal.id] = newProposal;\n latestProposalIds[newProposal.proposer] = newProposal.id;\n\n emit ProposalCreated(\n newProposal.id,\n msg.sender,\n targets,\n values,\n signatures,\n calldatas,\n startBlock,\n endBlock,\n description,\n uint8(proposalType)\n );\n return newProposal.id;\n }\n\n /**\n * @notice Queues a proposal of state succeeded\n * @param proposalId The id of the proposal to queue\n */\n function queue(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Succeeded,\n \"GovernorBravo::queue: proposal can only be queued if it is succeeded\"\n );\n Proposal storage proposal = proposals[proposalId];\n uint eta = add256(block.timestamp, proposalTimelocks[uint8(proposal.proposalType)].delay());\n for (uint i; i < proposal.targets.length; ++i) {\n queueOrRevertInternal(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n eta,\n uint8(proposal.proposalType)\n );\n }\n proposal.eta = eta;\n emit ProposalQueued(proposalId, eta);\n }\n\n function queueOrRevertInternal(\n address target,\n uint value,\n string memory signature,\n bytes memory data,\n uint eta,\n uint8 proposalType\n ) internal {\n require(\n !proposalTimelocks[proposalType].queuedTransactions(\n keccak256(abi.encode(target, value, signature, data, eta))\n ),\n \"GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta\"\n );\n proposalTimelocks[proposalType].queueTransaction(target, value, signature, data, eta);\n }\n\n /**\n * @notice Executes a queued proposal if eta has passed\n * @param proposalId The id of the proposal to execute\n */\n function execute(uint proposalId) external {\n require(\n state(proposalId) == ProposalState.Queued,\n \"GovernorBravo::execute: proposal can only be executed if it is queued\"\n );\n Proposal storage proposal = proposals[proposalId];\n proposal.executed = true;\n for (uint i; i < proposal.targets.length; ++i) {\n proposalTimelocks[uint8(proposal.proposalType)].executeTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n emit ProposalExecuted(proposalId);\n }\n\n /**\n * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n * @param proposalId The id of the proposal to cancel\n */\n function cancel(uint proposalId) external {\n require(state(proposalId) != ProposalState.Executed, \"GovernorBravo::cancel: cannot cancel executed proposal\");\n\n Proposal storage proposal = proposals[proposalId];\n require(\n msg.sender == guardian ||\n msg.sender == proposal.proposer ||\n xvsVault.getPriorVotes(proposal.proposer, sub256(block.number, 1)) <\n proposalConfigs[proposal.proposalType].proposalThreshold,\n \"GovernorBravo::cancel: proposer above threshold\"\n );\n\n proposal.canceled = true;\n for (uint i = 0; i < proposal.targets.length; i++) {\n proposalTimelocks[proposal.proposalType].cancelTransaction(\n proposal.targets[i],\n proposal.values[i],\n proposal.signatures[i],\n proposal.calldatas[i],\n proposal.eta\n );\n }\n\n emit ProposalCanceled(proposalId);\n }\n\n /**\n * @notice Gets actions of a proposal\n * @param proposalId the id of the proposal\n * @return targets, values, signatures, and calldatas of the proposal actions\n */\n function getActions(\n uint proposalId\n )\n external\n view\n returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)\n {\n Proposal storage p = proposals[proposalId];\n return (p.targets, p.values, p.signatures, p.calldatas);\n }\n\n /**\n * @notice Gets the receipt for a voter on a given proposal\n * @param proposalId the id of proposal\n * @param voter The address of the voter\n * @return The voting receipt\n */\n function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) {\n return proposals[proposalId].receipts[voter];\n }\n\n /**\n * @notice Gets the state of a proposal\n * @param proposalId The id of the proposal\n * @return Proposal state\n */\n function state(uint proposalId) public view returns (ProposalState) {\n require(\n proposalCount >= proposalId && proposalId > initialProposalId,\n \"GovernorBravo::state: invalid proposal id\"\n );\n Proposal storage proposal = proposals[proposalId];\n if (proposal.canceled) {\n return ProposalState.Canceled;\n } else if (block.number <= proposal.startBlock) {\n return ProposalState.Pending;\n } else if (block.number <= proposal.endBlock) {\n return ProposalState.Active;\n } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) {\n return ProposalState.Defeated;\n } else if (proposal.eta == 0) {\n return ProposalState.Succeeded;\n } else if (proposal.executed) {\n return ProposalState.Executed;\n } else if (\n block.timestamp >= add256(proposal.eta, proposalTimelocks[uint8(proposal.proposalType)].GRACE_PERIOD())\n ) {\n return ProposalState.Expired;\n } else {\n return ProposalState.Queued;\n }\n }\n\n /**\n * @notice Cast a vote for a proposal\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n */\n function castVote(uint proposalId, uint8 support) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), \"\");\n }\n\n /**\n * @notice Cast a vote for a proposal with a reason\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param reason The reason given for the vote by the voter\n */\n function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external {\n emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason);\n }\n\n /**\n * @notice Cast a vote for a proposal by signature\n * @dev External function that accepts EIP-712 signatures for voting on proposals.\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @param v recovery id of ECDSA signature\n * @param r part of the ECDSA sig output\n * @param s part of the ECDSA sig output\n */\n function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"GovernorBravo::castVoteBySig: invalid signature\");\n emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), \"\");\n }\n\n /**\n * @notice Internal function that caries out voting logic\n * @param voter The voter that is casting their vote\n * @param proposalId The id of the proposal to vote on\n * @param support The support value for the vote. 0=against, 1=for, 2=abstain\n * @return The number of votes cast\n */\n function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) {\n require(state(proposalId) == ProposalState.Active, \"GovernorBravo::castVoteInternal: voting is closed\");\n require(support <= 2, \"GovernorBravo::castVoteInternal: invalid vote type\");\n Proposal storage proposal = proposals[proposalId];\n Receipt storage receipt = proposal.receipts[voter];\n require(receipt.hasVoted == false, \"GovernorBravo::castVoteInternal: voter already voted\");\n uint96 votes = xvsVault.getPriorVotes(voter, proposal.startBlock);\n\n if (support == 0) {\n proposal.againstVotes = add256(proposal.againstVotes, votes);\n } else if (support == 1) {\n proposal.forVotes = add256(proposal.forVotes, votes);\n } else if (support == 2) {\n proposal.abstainVotes = add256(proposal.abstainVotes, votes);\n }\n\n receipt.hasVoted = true;\n receipt.support = support;\n receipt.votes = votes;\n\n return votes;\n }\n\n /**\n * @notice Sets the new governance guardian\n * @param newGuardian the address of the new guardian\n */\n function _setGuardian(address newGuardian) external {\n require(msg.sender == guardian || msg.sender == admin, \"GovernorBravo::_setGuardian: admin or guardian only\");\n require(newGuardian != address(0), \"GovernorBravo::_setGuardian: cannot live without a guardian\");\n address oldGuardian = guardian;\n guardian = newGuardian;\n\n emit NewGuardian(oldGuardian, newGuardian);\n }\n\n /**\n * @notice Initiate the GovernorBravo contract\n * @dev Admin only. Sets initial proposal id which initiates the contract, ensuring a continuous proposal id count\n * @param governorAlpha The address for the Governor to continue the proposal id count from\n */\n function _initiate(address governorAlpha) external {\n require(msg.sender == admin, \"GovernorBravo::_initiate: admin only\");\n require(initialProposalId == 0, \"GovernorBravo::_initiate: can only initiate once\");\n proposalCount = GovernorAlphaInterface(governorAlpha).proposalCount();\n initialProposalId = proposalCount;\n for (uint256 i; i < uint8(ProposalType.CRITICAL) + 1; ++i) {\n proposalTimelocks[i].acceptAdmin();\n }\n }\n\n /**\n * @notice Set max proposal operations\n * @dev Admin only.\n * @param proposalMaxOperations_ Max proposal operations\n */\n function _setProposalMaxOperations(uint proposalMaxOperations_) external {\n require(msg.sender == admin, \"GovernorBravo::_setProposalMaxOperations: admin only\");\n uint oldProposalMaxOperations = proposalMaxOperations;\n proposalMaxOperations = proposalMaxOperations_;\n\n emit ProposalMaxOperationsUpdated(oldProposalMaxOperations, proposalMaxOperations_);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) external {\n // Check caller = admin\n require(msg.sender == admin, \"GovernorBravo:_setPendingAdmin: admin only\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() external {\n // Check caller is pendingAdmin and pendingAdmin ≠ address(0)\n require(\n msg.sender == pendingAdmin && msg.sender != address(0),\n \"GovernorBravo:_acceptAdmin: pending admin only\"\n );\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n function add256(uint256 a, uint256 b) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, \"addition overflow\");\n return c;\n }\n\n function sub256(uint256 a, uint256 b) internal pure returns (uint) {\n require(b <= a, \"subtraction underflow\");\n return a - b;\n }\n\n function getChainIdInternal() internal pure returns (uint) {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title GovernorBravoEvents\n * @author Venus\n * @notice Set of events emitted by the GovernorBravo contracts.\n */\ncontract GovernorBravoEvents {\n /// @notice An event emitted when a new proposal is created\n event ProposalCreated(\n uint id,\n address proposer,\n address[] targets,\n uint[] values,\n string[] signatures,\n bytes[] calldatas,\n uint startBlock,\n uint endBlock,\n string description,\n uint8 proposalType\n );\n\n /// @notice An event emitted when a vote has been cast on a proposal\n /// @param voter The address which casted a vote\n /// @param proposalId The proposal id which was voted on\n /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n /// @param votes Number of votes which were cast by the voter\n /// @param reason The reason given for the vote by the voter\n event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason);\n\n /// @notice An event emitted when a proposal has been canceled\n event ProposalCanceled(uint id);\n\n /// @notice An event emitted when a proposal has been queued in the Timelock\n event ProposalQueued(uint id, uint eta);\n\n /// @notice An event emitted when a proposal has been executed in the Timelock\n event ProposalExecuted(uint id);\n\n /// @notice An event emitted when the voting delay is set\n event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay);\n\n /// @notice An event emitted when the voting period is set\n event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod);\n\n /// @notice Emitted when implementation is changed\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /// @notice Emitted when proposal threshold is set\n event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold);\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Emitted when pendingAdmin is accepted, which means admin is updated\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /// @notice Emitted when the new guardian address is set\n event NewGuardian(address oldGuardian, address newGuardian);\n\n /// @notice Emitted when the maximum number of operations in one proposal is updated\n event ProposalMaxOperationsUpdated(uint oldMaxOperations, uint newMaxOperations);\n}\n\n/**\n * @title GovernorBravoDelegatorStorage\n * @author Venus\n * @notice Storage layout of the `GovernorBravoDelegator` contract\n */\ncontract GovernorBravoDelegatorStorage {\n /// @notice Administrator for this contract\n address public admin;\n\n /// @notice Pending administrator for this contract\n address public pendingAdmin;\n\n /// @notice Active brains of Governor\n address public implementation;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV1\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage {\n /// @notice DEPRECATED The delay before voting on a proposal may take place, once proposed, in blocks\n uint public votingDelay;\n\n /// @notice DEPRECATED The duration of voting on a proposal, in blocks\n uint public votingPeriod;\n\n /// @notice DEPRECATED The number of votes required in order for a voter to become a proposer\n uint public proposalThreshold;\n\n /// @notice Initial proposal id set at become\n uint public initialProposalId;\n\n /// @notice The total number of proposals\n uint public proposalCount;\n\n /// @notice The address of the Venus Protocol Timelock\n TimelockInterface public timelock;\n\n /// @notice The address of the Venus governance token\n XvsVaultInterface public xvsVault;\n\n /// @notice The official record of all proposals ever proposed\n mapping(uint => Proposal) public proposals;\n\n /// @notice The latest proposal for each proposer\n mapping(address => uint) public latestProposalIds;\n\n struct Proposal {\n /// @notice Unique id for looking up a proposal\n uint id;\n /// @notice Creator of the proposal\n address proposer;\n /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds\n uint eta;\n /// @notice the ordered list of target addresses for calls to be made\n address[] targets;\n /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made\n uint[] values;\n /// @notice The ordered list of function signatures to be called\n string[] signatures;\n /// @notice The ordered list of calldata to be passed to each call\n bytes[] calldatas;\n /// @notice The block at which voting begins: holders must delegate their votes prior to this block\n uint startBlock;\n /// @notice The block at which voting ends: votes must be cast prior to this block\n uint endBlock;\n /// @notice Current number of votes in favor of this proposal\n uint forVotes;\n /// @notice Current number of votes in opposition to this proposal\n uint againstVotes;\n /// @notice Current number of votes for abstaining for this proposal\n uint abstainVotes;\n /// @notice Flag marking whether the proposal has been canceled\n bool canceled;\n /// @notice Flag marking whether the proposal has been executed\n bool executed;\n /// @notice Receipts of ballots for the entire set of voters\n mapping(address => Receipt) receipts;\n /// @notice The type of the proposal\n uint8 proposalType;\n }\n\n /// @notice Ballot receipt record for a voter\n struct Receipt {\n /// @notice Whether or not a vote has been cast\n bool hasVoted;\n /// @notice Whether or not the voter supports the proposal or abstains\n uint8 support;\n /// @notice The number of votes the voter had, which were cast\n uint96 votes;\n }\n\n /// @notice Possible states that a proposal may be in\n enum ProposalState {\n Pending,\n Active,\n Canceled,\n Defeated,\n Succeeded,\n Queued,\n Expired,\n Executed\n }\n\n /// @notice The maximum number of actions that can be included in a proposal\n uint public proposalMaxOperations;\n\n /// @notice A privileged role that can cancel any proposal\n address public guardian;\n}\n\n/**\n * @title GovernorBravoDelegateStorageV2\n * @dev For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new\n * contract which implements GovernorBravoDelegateStorageV2 and following the naming convention\n * GovernorBravoDelegateStorageVX.\n */\ncontract GovernorBravoDelegateStorageV2 is GovernorBravoDelegateStorageV1 {\n enum ProposalType {\n NORMAL,\n FASTTRACK,\n CRITICAL\n }\n\n struct ProposalConfig {\n /// @notice The delay before voting on a proposal may take place, once proposed, in blocks\n uint256 votingDelay;\n /// @notice The duration of voting on a proposal, in blocks\n uint256 votingPeriod;\n /// @notice The number of votes required in order for a voter to become a proposer\n uint256 proposalThreshold;\n }\n\n /// @notice mapping containing configuration for each proposal type\n mapping(uint => ProposalConfig) public proposalConfigs;\n\n /// @notice mapping containing Timelock addresses for each proposal type\n mapping(uint => TimelockInterface) public proposalTimelocks;\n}\n\n/**\n * @title TimelockInterface\n * @author Venus\n * @notice Interface implemented by the Timelock contract.\n */\ninterface TimelockInterface {\n function delay() external view returns (uint);\n\n function GRACE_PERIOD() external view returns (uint);\n\n function acceptAdmin() external;\n\n function queuedTransactions(bytes32 hash) external view returns (bool);\n\n function queueTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external returns (bytes32);\n\n function cancelTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external;\n\n function executeTransaction(\n address target,\n uint value,\n string calldata signature,\n bytes calldata data,\n uint eta\n ) external payable returns (bytes memory);\n}\n\ninterface XvsVaultInterface {\n function getPriorVotes(address account, uint blockNumber) external view returns (uint96);\n}\n\ninterface GovernorAlphaInterface {\n /// @notice The total number of proposals\n function proposalCount() external returns (uint);\n}\n" + }, + "@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\n/**\n * @title IAccessControlManagerV5\n * @author Venus\n * @notice Interface implemented by the `AccessControlManagerV5` contract.\n */\ninterface IAccessControlManagerV5 {\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 */\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 /**\n * @notice Gives a function call permission to one single account\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleGranted} event.\n * @param contractAddress address of contract for which call permissions will be granted\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\n\n /**\n * @notice Revokes an account's permission to a particular function call\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\n * \t\tMay emit a {RoleRevoked} event.\n * @param contractAddress address of contract for which call permissions will be revoked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n */\n function revokeCallPermission(\n address contractAddress,\n string calldata functionSig,\n address accountToRevoke\n ) external;\n\n /**\n * @notice Verifies if the given account can call a praticular contract's function\n * @dev Since the contract is calling itself this function, we can get contracts address with msg.sender\n * @param account address (eoa or contract) for which call permissions will be checked\n * @param functionSig signature e.g. \"functionName(uint,bool)\"\n * @return false if the user account cannot call the particular contract function\n *\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" + }, + "@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.5.16;\n\ncontract TimeManagerV5 {\n /// @dev The approximate number of seconds per year\n uint256 public constant SECONDS_PER_YEAR = 31_536_000;\n\n /// @notice Number of blocks per year or seconds per year\n uint256 public blocksOrSecondsPerYear;\n\n /// @dev Sets true when block timestamp is used\n bool public isTimeBased;\n\n /// @dev Sets true when contract is initialized\n bool private isInitialized;\n\n /// @notice Deprecated slot for _getCurrentSlot function pointer\n bytes8 private __deprecatedSlot1;\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[48] private __gap;\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view returns (uint256) {\n return isTimeBased ? _getBlockTimestamp() : _getBlockNumber();\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function _initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) internal {\n if (isInitialized) revert(\"Already initialized TimeManager\");\n\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert(\"Invalid blocks per year\");\n }\n if (timeBased_ && blocksPerYear_ != 0) {\n revert(\"Invalid time based configuration\");\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n isInitialized = true;\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "contracts/Comptroller/ComptrollerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerTypes } from \"./ComptrollerStorage.sol\";\n\ncontract ComptrollerInterface {\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n bool public constant isComptroller = true;\n\n /*** Assets You Are In ***/\n\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\n\n function exitMarket(address vToken) external returns (uint);\n\n /*** Policy Hooks ***/\n\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\n\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\n\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\n\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint repayAmount,\n uint borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount\n ) external returns (uint);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint repayAmount,\n uint seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external returns (uint);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) external;\n\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\n\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\n\n /*** Liquidity/Liquidation Calculations ***/\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint repayAmount\n ) external view returns (uint, uint);\n\n function getXVSAddress() public view returns (address);\n\n function markets(address) external view returns (bool, uint);\n\n function oracle() external view returns (PriceOracle);\n\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\n\n function getAssetsIn(address) external view returns (VToken[] memory);\n\n function claimVenus(address) external;\n\n function venusAccrued(address) external view returns (uint);\n\n function venusSupplySpeeds(address) external view returns (uint);\n\n function venusBorrowSpeeds(address) external view returns (uint);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function venusSupplierIndex(address, address) external view returns (uint);\n\n function venusInitialIndex() external view returns (uint224);\n\n function venusBorrowerIndex(address, address) external view returns (uint);\n\n function venusBorrowState(address) external view returns (uint224, uint32);\n\n function venusSupplyState(address) external view returns (uint224, uint32);\n\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\n\n function vaiController() external view returns (VAIControllerInterface);\n\n function liquidationIncentiveMantissa() external view returns (uint);\n\n function protocolPaused() external view returns (bool);\n\n function actionPaused(address market, ComptrollerTypes.Action action) public view returns (bool);\n\n function mintedVAIs(address user) external view returns (uint);\n\n function vaiMintRate() external view returns (uint);\n}\n\ninterface IVAIVault {\n function updatePendingRewards() external;\n}\n\ninterface IComptroller {\n function liquidationIncentiveMantissa() external view returns (uint);\n\n /*** Treasury Data ***/\n function treasuryAddress() external view returns (address);\n\n function treasuryPercent() external view returns (uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerLensInterface.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ninterface ComptrollerLensInterface {\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint);\n\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint);\n}\n" + }, + "contracts/Comptroller/ComptrollerStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity ^0.5.16;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { PriceOracle } from \"../Oracle/PriceOracle.sol\";\nimport { VAIControllerInterface } from \"../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"./ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../Tokens/Prime/IPrime.sol\";\n\ninterface ComptrollerTypes {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n}\n\ncontract UnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public comptrollerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingComptrollerImplementation;\n}\n\ncontract ComptrollerV1Storage is ComptrollerTypes, UnitrollerAdminStorage {\n /**\n * @notice Oracle which gives the price of any given asset\n */\n PriceOracle public oracle;\n\n /**\n * @notice Multiplier used to calculate the maximum repayAmount when liquidating a borrow\n */\n uint256 public closeFactorMantissa;\n\n /**\n * @notice Multiplier representing the discount on collateral that a liquidator receives\n */\n uint256 public liquidationIncentiveMantissa;\n\n /**\n * @notice Max number of assets a single account can participate in (borrow or use as collateral)\n */\n uint256 public maxAssets;\n\n /**\n * @notice Per-account mapping of \"assets you are in\", capped by maxAssets\n */\n mapping(address => VToken[]) public accountAssets;\n\n struct Market {\n /// @notice Whether or not this market is listed\n bool isListed;\n /**\n * @notice Multiplier representing the most one can borrow against their collateral in this market.\n * For instance, 0.9 to allow borrowing 90% of collateral value.\n * Must be between 0 and 1, and stored as a mantissa.\n */\n uint256 collateralFactorMantissa;\n /// @notice Per-market mapping of \"accounts in this asset\"\n mapping(address => bool) accountMembership;\n /// @notice Whether or not this market receives XVS\n bool isVenus;\n }\n\n /**\n * @notice Official mapping of vTokens -> Market metadata\n * @dev Used e.g. to determine if a market is supported\n */\n mapping(address => Market) public markets;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n address public pauseGuardian;\n\n /// @notice Whether minting is paused (deprecated, superseded by actionPaused)\n bool private _mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool private _borrowGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal transferGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n bool internal seizeGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal mintGuardianPaused;\n /// @notice Whether borrowing is paused (deprecated, superseded by actionPaused)\n mapping(address => bool) internal borrowGuardianPaused;\n\n struct VenusMarketState {\n /// @notice The market's last updated venusBorrowIndex or venusSupplyIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice A list of all markets\n VToken[] public allMarkets;\n\n /// @notice The rate at which the flywheel distributes XVS, per block\n uint256 internal venusRate;\n\n /// @notice The portion of venusRate that each market currently receives\n mapping(address => uint256) internal venusSpeeds;\n\n /// @notice The Venus market supply state for each market\n mapping(address => VenusMarketState) public venusSupplyState;\n\n /// @notice The Venus market borrow state for each market\n mapping(address => VenusMarketState) public venusBorrowState;\n\n /// @notice The Venus supply index for each market for each supplier as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusSupplierIndex;\n\n /// @notice The Venus borrow index for each market for each borrower as of the last time they accrued XVS\n mapping(address => mapping(address => uint256)) public venusBorrowerIndex;\n\n /// @notice The XVS accrued but not yet transferred to each user\n mapping(address => uint256) public venusAccrued;\n\n /// @notice The Address of VAIController\n VAIControllerInterface public vaiController;\n\n /// @notice The minted VAI amount to each user\n mapping(address => uint256) public mintedVAIs;\n\n /// @notice VAI Mint Rate as a percentage\n uint256 public vaiMintRate;\n\n /**\n * @notice The Pause Guardian can pause certain actions as a safety mechanism.\n */\n bool public mintVAIGuardianPaused;\n bool public repayVAIGuardianPaused;\n\n /**\n * @notice Pause/Unpause whole protocol actions\n */\n bool public protocolPaused;\n\n /// @notice The rate at which the flywheel distributes XVS to VAI Minters, per block (deprecated)\n uint256 private venusVAIRate;\n}\n\ncontract ComptrollerV2Storage is ComptrollerV1Storage {\n /// @notice The rate at which the flywheel distributes XVS to VAI Vault, per block\n uint256 public venusVAIVaultRate;\n\n // address of VAI Vault\n address public vaiVaultAddress;\n\n // start block of release to VAI Vault\n uint256 public releaseStartBlock;\n\n // minimum release amount to VAI Vault\n uint256 public minReleaseAmount;\n}\n\ncontract ComptrollerV3Storage is ComptrollerV2Storage {\n /// @notice The borrowCapGuardian can set borrowCaps to any number for any market. Lowering the borrow cap could disable borrowing on the given market.\n address public borrowCapGuardian;\n\n /// @notice Borrow caps enforced by borrowAllowed for each vToken address. Defaults to zero which corresponds to unlimited borrowing.\n mapping(address => uint256) public borrowCaps;\n}\n\ncontract ComptrollerV4Storage is ComptrollerV3Storage {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n}\n\ncontract ComptrollerV5Storage is ComptrollerV4Storage {\n /// @notice The portion of XVS that each contributor receives per block (deprecated)\n mapping(address => uint256) private venusContributorSpeeds;\n\n /// @notice Last block at which a contributor's XVS rewards have been allocated (deprecated)\n mapping(address => uint256) private lastContributorBlock;\n}\n\ncontract ComptrollerV6Storage is ComptrollerV5Storage {\n address public liquidatorContract;\n}\n\ncontract ComptrollerV7Storage is ComptrollerV6Storage {\n ComptrollerLensInterface public comptrollerLens;\n}\n\ncontract ComptrollerV8Storage is ComptrollerV7Storage {\n /// @notice Supply caps enforced by mintAllowed for each vToken address. Defaults to zero which corresponds to minting notAllowed\n mapping(address => uint256) public supplyCaps;\n}\n\ncontract ComptrollerV9Storage is ComptrollerV8Storage {\n /// @notice AccessControlManager address\n address internal accessControl;\n\n /// @notice True if a certain action is paused on a certain market\n mapping(address => mapping(uint256 => bool)) internal _actionPaused;\n}\n\ncontract ComptrollerV10Storage is ComptrollerV9Storage {\n /// @notice The rate at which venus is distributed to the corresponding borrow market (per block)\n mapping(address => uint256) public venusBorrowSpeeds;\n\n /// @notice The rate at which venus is distributed to the corresponding supply market (per block)\n mapping(address => uint256) public venusSupplySpeeds;\n}\n\ncontract ComptrollerV11Storage is ComptrollerV10Storage {\n /// @notice Whether the delegate is allowed to borrow or redeem on behalf of the user\n //mapping(address user => mapping (address delegate => bool approved)) public approvedDelegates;\n mapping(address => mapping(address => bool)) public approvedDelegates;\n}\n\ncontract ComptrollerV12Storage is ComptrollerV11Storage {\n /// @notice Whether forced liquidation is enabled for all users borrowing in a certain market\n mapping(address => bool) public isForcedLiquidationEnabled;\n}\n\ncontract ComptrollerV13Storage is ComptrollerV12Storage {\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in _facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in _facetAddresses array\n }\n\n mapping(bytes4 => FacetAddressAndPosition) internal _selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) internal _facetFunctionSelectors;\n // facet addresses\n address[] internal _facetAddresses;\n}\n\ncontract ComptrollerV14Storage is ComptrollerV13Storage {\n /// @notice Prime token address\n IPrime public prime;\n}\n\ncontract ComptrollerV15Storage is ComptrollerV14Storage {\n /// @notice Whether forced liquidation is enabled for the borrows of a user in a market\n mapping(address /* user */ => mapping(address /* market */ => bool)) public isForcedLiquidationEnabledForUser;\n}\n\ncontract ComptrollerV16Storage is ComptrollerV15Storage {\n /// @notice The XVS token contract address\n address internal xvs;\n\n /// @notice The XVS vToken contract address\n address internal xvsVToken;\n}\n" + }, + "contracts/Comptroller/Diamond/Diamond.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { IDiamondCut } from \"./interfaces/IDiamondCut.sol\";\nimport { Unitroller, ComptrollerV16Storage } from \"../Unitroller.sol\";\n\n/**\n * @title Diamond\n * @author Venus\n * @notice This contract contains functions related to facets\n */\ncontract Diamond is IDiamondCut, ComptrollerV16Storage {\n /// @notice Emitted when functions are added, replaced or removed to facets\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut);\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /**\n * @notice Call _acceptImplementation to accept the diamond proxy as new implementaion\n * @param unitroller Address of the unitroller\n */\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n /**\n * @notice To add function selectors to the facet's mapping\n * @dev Allows the contract admin to add function selectors\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function diamondCut(IDiamondCut.FacetCut[] memory diamondCut_) public {\n require(msg.sender == admin, \"only unitroller admin can\");\n libDiamondCut(diamondCut_);\n }\n\n /**\n * @notice Get all function selectors mapped to the facet address\n * @param facet Address of the facet\n * @return selectors Array of function selectors\n */\n function facetFunctionSelectors(address facet) external view returns (bytes4[] memory) {\n return _facetFunctionSelectors[facet].functionSelectors;\n }\n\n /**\n * @notice Get facet position in the _facetFunctionSelectors through facet address\n * @param facet Address of the facet\n * @return Position of the facet\n */\n function facetPosition(address facet) external view returns (uint256) {\n return _facetFunctionSelectors[facet].facetAddressPosition;\n }\n\n /**\n * @notice Get all facet addresses\n * @return facetAddresses Array of facet addresses\n */\n function facetAddresses() external view returns (address[] memory) {\n return _facetAddresses;\n }\n\n /**\n * @notice Get facet address and position through function selector\n * @param functionSelector function selector\n * @return FacetAddressAndPosition facet address and position\n */\n function facetAddress(\n bytes4 functionSelector\n ) external view returns (ComptrollerV16Storage.FacetAddressAndPosition memory) {\n return _selectorToFacetAndPosition[functionSelector];\n }\n\n /**\n * @notice Get all facets address and their function selector\n * @return facets_ Array of Facet\n */\n function facets() external view returns (Facet[] memory) {\n uint256 facetsLength = _facetAddresses.length;\n Facet[] memory facets_ = new Facet[](facetsLength);\n for (uint256 i; i < facetsLength; ++i) {\n address facet = _facetAddresses[i];\n facets_[i].facetAddress = facet;\n facets_[i].functionSelectors = _facetFunctionSelectors[facet].functionSelectors;\n }\n return facets_;\n }\n\n /**\n * @notice To add function selectors to the facets' mapping\n * @param diamondCut_ IDiamondCut contains facets address, action and function selectors\n */\n function libDiamondCut(IDiamondCut.FacetCut[] memory diamondCut_) internal {\n uint256 diamondCutLength = diamondCut_.length;\n for (uint256 facetIndex; facetIndex < diamondCutLength; ++facetIndex) {\n IDiamondCut.FacetCutAction action = diamondCut_[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(diamondCut_[facetIndex].facetAddress, diamondCut_[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(diamondCut_);\n }\n\n /**\n * @notice Add function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to add in the mapping\n */\n function addFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Replace facet's address mapping for function selectors i.e selectors already associate to any other existing facet\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to replace in the mapping\n */\n function replaceFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n require(functionSelectors.length != 0, \"LibDiamondCut: No selectors in facet to cut\");\n require(facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(_facetFunctionSelectors[facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(facetAddress);\n }\n uint256 functionSelectorsLength = functionSelectors.length;\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(oldFacetAddress, selector);\n addFunction(selector, selectorPosition, facetAddress);\n ++selectorPosition;\n }\n }\n\n /**\n * @notice Remove function selectors to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param functionSelectors Array of function selectors need to remove in the mapping\n */\n function removeFunctions(address facetAddress, bytes4[] memory functionSelectors) internal {\n uint256 functionSelectorsLength = functionSelectors.length;\n require(functionSelectorsLength != 0, \"LibDiamondCut: No selectors in facet to cut\");\n // if function does not exist then do nothing and revert\n require(facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < functionSelectorsLength; ++selectorIndex) {\n bytes4 selector = functionSelectors[selectorIndex];\n address oldFacetAddress = _selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(oldFacetAddress, selector);\n }\n }\n\n /**\n * @notice Add new facet to the proxy\n * @param facetAddress Address of the facet\n */\n function addFacet(address facetAddress) internal {\n enforceHasContractCode(facetAddress, \"Diamond: New facet has no code\");\n _facetFunctionSelectors[facetAddress].facetAddressPosition = _facetAddresses.length;\n _facetAddresses.push(facetAddress);\n }\n\n /**\n * @notice Add function selector to the facet's address mapping\n * @param selector funciton selector need to be added\n * @param selectorPosition funciton selector position\n * @param facetAddress Address of the facet\n */\n function addFunction(bytes4 selector, uint96 selectorPosition, address facetAddress) internal {\n _selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;\n _facetFunctionSelectors[facetAddress].functionSelectors.push(selector);\n _selectorToFacetAndPosition[selector].facetAddress = facetAddress;\n }\n\n /**\n * @notice Remove function selector to the facet's address mapping\n * @param facetAddress Address of the facet\n * @param selector function selectors need to remove in the mapping\n */\n function removeFunction(address facetAddress, bytes4 selector) internal {\n require(facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = _selectorToFacetAndPosition[selector].functionSelectorPosition;\n uint256 lastSelectorPosition = _facetFunctionSelectors[facetAddress].functionSelectors.length - 1;\n // if not the same then replace selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = _facetFunctionSelectors[facetAddress].functionSelectors[lastSelectorPosition];\n _facetFunctionSelectors[facetAddress].functionSelectors[selectorPosition] = lastSelector;\n _selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n _facetFunctionSelectors[facetAddress].functionSelectors.pop();\n delete _selectorToFacetAndPosition[selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = _facetAddresses.length - 1;\n uint256 facetAddressPosition = _facetFunctionSelectors[facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = _facetAddresses[lastFacetAddressPosition];\n _facetAddresses[facetAddressPosition] = lastFacetAddress;\n _facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n _facetAddresses.pop();\n delete _facetFunctionSelectors[facetAddress];\n }\n }\n\n /**\n * @dev Ensure that the given address has contract code deployed\n * @param _contract The address to check for contract code\n * @param _errorMessage The error message to display if the contract code is not deployed\n */\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize != 0, _errorMessage);\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n function() external payable {\n address facet = _selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n // Execute public function from facet using delegatecall and return any value.\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/DiamondConsolidated.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"./facets/MarketFacet.sol\";\nimport \"./facets/PolicyFacet.sol\";\nimport \"./facets/RewardFacet.sol\";\nimport \"./facets/SetterFacet.sol\";\nimport \"./Diamond.sol\";\n\n/**\n * @title DiamondConsolidated\n * @author Venus\n * @notice This contract contains the functions defined in the different facets of the Diamond, plus the getters to the public variables.\n * This contract cannot be deployed, due to its size. Its main purpose is to allow the easy generation of an ABI and the typechain to interact with the\n * Unitroller contract in a simple way\n */\ncontract DiamondConsolidated is Diamond, MarketFacet, PolicyFacet, RewardFacet, SetterFacet {}\n" + }, + "contracts/Comptroller/Diamond/facets/FacetBase.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken, ComptrollerErrorReporter, ExponentialNoError } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IVAIVault } from \"../../../Comptroller/ComptrollerInterface.sol\";\nimport { ComptrollerV16Storage } from \"../../../Comptroller/ComptrollerStorage.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\n\n/**\n * @title FacetBase\n * @author Venus\n * @notice This facet contract contains functions related to access and checks\n */\ncontract FacetBase is ComptrollerV16Storage, ExponentialNoError, ComptrollerErrorReporter {\n using SafeBEP20 for IBEP20;\n\n /// @notice The initial Venus index for a market\n uint224 public constant venusInitialIndex = 1e36;\n // closeFactorMantissa must be strictly greater than this value\n uint256 internal constant closeFactorMinMantissa = 0.05e18; // 0.05\n // closeFactorMantissa must not exceed this value\n uint256 internal constant closeFactorMaxMantissa = 0.9e18; // 0.9\n // No collateralFactorMantissa may exceed this value\n uint256 internal constant collateralFactorMaxMantissa = 0.9e18; // 0.9\n\n /// @notice Emitted when an account enters a market\n event MarketEntered(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when XVS is distributed to VAI Vault\n event DistributedVAIVaultVenus(uint256 amount);\n\n /// @notice Reverts if the protocol is paused\n function checkProtocolPauseState() internal view {\n require(!protocolPaused, \"protocol is paused\");\n }\n\n /// @notice Reverts if a certain action is paused on a market\n function checkActionPauseState(address market, Action action) internal view {\n require(!actionPaused(market, action), \"action is paused\");\n }\n\n /// @notice Reverts if the caller is not admin\n function ensureAdmin() internal view {\n require(msg.sender == admin, \"only admin can\");\n }\n\n /// @notice Checks the passed address is nonzero\n function ensureNonzeroAddress(address someone) internal pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @notice Reverts if the market is not listed\n function ensureListed(Market storage market) internal view {\n require(market.isListed, \"market not listed\");\n }\n\n /// @notice Reverts if the caller is neither admin nor the passed address\n function ensureAdminOr(address privilegedAddress) internal view {\n require(msg.sender == admin || msg.sender == privilegedAddress, \"access denied\");\n }\n\n /// @notice Checks the caller is allowed to call the specified fuction\n function ensureAllowed(string memory functionSig) internal view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /**\n * @notice Checks if a certain action is paused on a market\n * @param action Action id\n * @param market vToken address\n */\n function actionPaused(address market, Action action) public view returns (bool) {\n return _actionPaused[market][uint256(action)];\n }\n\n /**\n * @notice Get the latest block number\n */\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n /**\n * @notice Get the latest block number with the safe32 check\n */\n function getBlockNumberAsUint32() internal view returns (uint32) {\n return safe32(getBlockNumber(), \"block # > 32 bits\");\n }\n\n /**\n * @notice Transfer XVS to VAI Vault\n */\n function releaseToVault() internal {\n if (releaseStartBlock == 0 || getBlockNumber() < releaseStartBlock) {\n return;\n }\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n uint256 xvsBalance = xvs_.balanceOf(address(this));\n if (xvsBalance == 0) {\n return;\n }\n\n uint256 actualAmount;\n uint256 deltaBlocks = sub_(getBlockNumber(), releaseStartBlock);\n // releaseAmount = venusVAIVaultRate * deltaBlocks\n uint256 releaseAmount_ = mul_(venusVAIVaultRate, deltaBlocks);\n\n if (xvsBalance >= releaseAmount_) {\n actualAmount = releaseAmount_;\n } else {\n actualAmount = xvsBalance;\n }\n\n if (actualAmount < minReleaseAmount) {\n return;\n }\n\n releaseStartBlock = getBlockNumber();\n\n xvs_.safeTransfer(vaiVaultAddress, actualAmount);\n emit DistributedVAIVaultVenus(actualAmount);\n\n IVAIVault(vaiVaultAddress).updatePendingRewards();\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @dev Note that we calculate the exchangeRateStored for each collateral vToken using stored data,\n * without calculating accumulated interest.\n * @return (possible error code,\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidityInternal(\n address account,\n VToken vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) internal view returns (Error, uint256, uint256) {\n (uint256 err, uint256 liquidity, uint256 shortfall) = comptrollerLens.getHypotheticalAccountLiquidity(\n address(this),\n account,\n vTokenModify,\n redeemTokens,\n borrowAmount\n );\n return (Error(err), liquidity, shortfall);\n }\n\n /**\n * @notice Add the market to the borrower's \"assets in\" for liquidity calculations\n * @param vToken The market to enter\n * @param borrower The address of the account to modify\n * @return Success indicator for whether the market was entered\n */\n function addToMarketInternal(VToken vToken, address borrower) internal returns (Error) {\n checkActionPauseState(address(vToken), Action.ENTER_MARKET);\n Market storage marketToJoin = markets[address(vToken)];\n ensureListed(marketToJoin);\n if (marketToJoin.accountMembership[borrower]) {\n // already joined\n return Error.NO_ERROR;\n }\n // survived the gauntlet, add to list\n // NOTE: we store these somewhat redundantly as a significant optimization\n // this avoids having to iterate through the list for the most common use cases\n // that is, only when we need to perform liquidity checks\n // and not whenever we want to check if an account is in a particular market\n marketToJoin.accountMembership[borrower] = true;\n accountAssets[borrower].push(vToken);\n\n emit MarketEntered(vToken, borrower);\n\n return Error.NO_ERROR;\n }\n\n /**\n * @notice Checks for the user is allowed to redeem tokens\n * @param vToken Address of the market\n * @param redeemer Address of the user\n * @param redeemTokens Amount of tokens to redeem\n * @return Success indicator for redeem is allowed or not\n */\n function redeemAllowedInternal(\n address vToken,\n address redeemer,\n uint256 redeemTokens\n ) internal view returns (uint256) {\n ensureListed(markets[vToken]);\n /* If the redeemer is not 'in' the market, then we can bypass the liquidity check */\n if (!markets[vToken].accountMembership[redeemer]) {\n return uint256(Error.NO_ERROR);\n }\n /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n redeemer,\n VToken(vToken),\n redeemTokens,\n 0\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Returns the XVS address\n * @return The address of XVS token\n */\n function getXVSAddress() external view returns (address) {\n return xvs;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/MarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { IMarketFacet } from \"../interfaces/IMarketFacet.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title MarketFacet\n * @author Venus\n * @dev This facet contains all the methods related to the market's management in the pool\n * @notice This facet contract contains functions regarding markets\n */\ncontract MarketFacet is IMarketFacet, FacetBase {\n /// @notice Emitted when an admin supports a market\n event MarketListed(VToken indexed vToken);\n\n /// @notice Emitted when an account exits a market\n event MarketExited(VToken indexed vToken, address indexed account);\n\n /// @notice Emitted when the borrowing or redeeming delegate rights are updated for an account\n event DelegateUpdated(address indexed approver, address indexed delegate, bool approved);\n\n /// @notice Indicator that this is a Comptroller contract (for inspection)\n function isComptroller() public pure returns (bool) {\n return true;\n }\n\n /**\n * @notice Returns the assets an account has entered\n * @param account The address of the account to pull assets for\n * @return A dynamic list with the assets the account has entered\n */\n function getAssetsIn(address account) external view returns (VToken[] memory) {\n return accountAssets[account];\n }\n\n /**\n * @notice Return all of the markets\n * @dev The automatic getter may be used to access an individual market\n * @return The list of market addresses\n */\n function getAllMarkets() external view returns (VToken[] memory) {\n return allMarkets;\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenBorrowed The address of the borrowed vToken\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateCalculateSeizeTokens(\n address(this),\n vTokenBorrowed,\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Calculate number of tokens of collateral asset to seize given an underlying amount\n * @dev Used in liquidation (called in vToken.liquidateBorrowFresh)\n * @param vTokenCollateral The address of the collateral vToken\n * @param actualRepayAmount The amount of vTokenBorrowed underlying to convert into vTokenCollateral tokens\n * @return (errorCode, number of vTokenCollateral tokens to be seized in a liquidation)\n */\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256) {\n (uint256 err, uint256 seizeTokens) = comptrollerLens.liquidateVAICalculateSeizeTokens(\n address(this),\n vTokenCollateral,\n actualRepayAmount\n );\n return (err, seizeTokens);\n }\n\n /**\n * @notice Returns whether the given account is entered in the given asset\n * @param account The address of the account to check\n * @param vToken The vToken to check\n * @return True if the account is in the asset, otherwise false\n */\n function checkMembership(address account, VToken vToken) external view returns (bool) {\n return markets[address(vToken)].accountMembership[account];\n }\n\n /**\n * @notice Add assets to be included in account liquidity calculation\n * @param vTokens The list of addresses of the vToken markets to be enabled\n * @return Success indicator for whether each corresponding market was entered\n */\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory) {\n uint256 len = vTokens.length;\n\n uint256[] memory results = new uint256[](len);\n for (uint256 i; i < len; ++i) {\n results[i] = uint256(addToMarketInternal(VToken(vTokens[i]), msg.sender));\n }\n\n return results;\n }\n\n /**\n * @notice Removes asset from sender's account liquidity calculation\n * @dev Sender must not have an outstanding borrow balance in the asset,\n * or be providing necessary collateral for an outstanding borrow\n * @param vTokenAddress The address of the asset to be removed\n * @return Whether or not the account successfully exited the market\n */\n function exitMarket(address vTokenAddress) external returns (uint256) {\n checkActionPauseState(vTokenAddress, Action.EXIT_MARKET);\n\n VToken vToken = VToken(vTokenAddress);\n /* Get sender tokensHeld and amountOwed underlying from the vToken */\n (uint256 oErr, uint256 tokensHeld, uint256 amountOwed, ) = vToken.getAccountSnapshot(msg.sender);\n require(oErr == 0, \"getAccountSnapshot failed\"); // semi-opaque error code\n\n /* Fail if the sender has a borrow balance */\n if (amountOwed != 0) {\n return fail(Error.NONZERO_BORROW_BALANCE, FailureInfo.EXIT_MARKET_BALANCE_OWED);\n }\n\n /* Fail if the sender is not permitted to redeem all of their tokens */\n uint256 allowed = redeemAllowedInternal(vTokenAddress, msg.sender, tokensHeld);\n if (allowed != 0) {\n return failOpaque(Error.REJECTION, FailureInfo.EXIT_MARKET_REJECTION, allowed);\n }\n\n Market storage marketToExit = markets[address(vToken)];\n\n /* Return true if the sender is not already ‘in’ the market */\n if (!marketToExit.accountMembership[msg.sender]) {\n return uint256(Error.NO_ERROR);\n }\n\n /* Set vToken account membership to false */\n delete marketToExit.accountMembership[msg.sender];\n\n /* Delete vToken from the account’s list of assets */\n // In order to delete vToken, copy last item in list to location of item to be removed, reduce length by 1\n VToken[] storage userAssetList = accountAssets[msg.sender];\n uint256 len = userAssetList.length;\n uint256 i;\n for (; i < len; ++i) {\n if (userAssetList[i] == vToken) {\n userAssetList[i] = userAssetList[len - 1];\n userAssetList.length--;\n break;\n }\n }\n\n // We *must* have found the asset in the list or our redundant data structure is broken\n assert(i < len);\n\n emit MarketExited(vToken, msg.sender);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Add the market to the markets mapping and set it as listed\n * @dev Allows a privileged role to add and list markets to the Comptroller\n * @param vToken The address of the market (token) to list\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _supportMarket(VToken vToken) external returns (uint256) {\n ensureAllowed(\"_supportMarket(address)\");\n\n if (markets[address(vToken)].isListed) {\n return fail(Error.MARKET_ALREADY_LISTED, FailureInfo.SUPPORT_MARKET_EXISTS);\n }\n\n vToken.isVToken(); // Sanity check to make sure its really a VToken\n\n // Note that isVenus is not in active use anymore\n Market storage newMarket = markets[address(vToken)];\n newMarket.isListed = true;\n newMarket.isVenus = false;\n newMarket.collateralFactorMantissa = 0;\n\n _addMarketInternal(vToken);\n _initializeMarket(address(vToken));\n\n emit MarketListed(vToken);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Grants or revokes the borrowing or redeeming delegate rights to / from an account\n * If allowed, the delegate will be able to borrow funds on behalf of the sender\n * Upon a delegated borrow, the delegate will receive the funds, and the borrower\n * will see the debt on their account\n * Upon a delegated redeem, the delegate will receive the redeemed amount and the approver\n * will see a deduction in his vToken balance\n * @param delegate The address to update the rights for\n * @param approved Whether to grant (true) or revoke (false) the borrowing or redeeming rights\n */\n function updateDelegate(address delegate, bool approved) external {\n ensureNonzeroAddress(delegate);\n require(approvedDelegates[msg.sender][delegate] != approved, \"Delegation status unchanged\");\n\n _updateDelegate(msg.sender, delegate, approved);\n }\n\n function _updateDelegate(address approver, address delegate, bool approved) internal {\n approvedDelegates[approver][delegate] = approved;\n emit DelegateUpdated(approver, delegate, approved);\n }\n\n function _addMarketInternal(VToken vToken) internal {\n uint256 allMarketsLength = allMarkets.length;\n for (uint256 i; i < allMarketsLength; ++i) {\n require(allMarkets[i] != vToken, \"already added\");\n }\n allMarkets.push(vToken);\n }\n\n function _initializeMarket(address vToken) internal {\n uint32 blockNumber = getBlockNumberAsUint32();\n\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n\n /*\n * Update market state indices\n */\n if (supplyState.index == 0) {\n // Initialize supply state index with default value\n supplyState.index = venusInitialIndex;\n }\n\n if (borrowState.index == 0) {\n // Initialize borrow state index with default value\n borrowState.index = venusInitialIndex;\n }\n\n /*\n * Update market state block numbers\n */\n supplyState.block = borrowState.block = blockNumber;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/PolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IPolicyFacet } from \"../interfaces/IPolicyFacet.sol\";\n\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\n\n/**\n * @title PolicyFacet\n * @author Venus\n * @dev This facet contains all the hooks used while transferring the assets\n * @notice This facet contract contains all the external pre-hook functions related to vToken\n */\ncontract PolicyFacet is IPolicyFacet, XVSRewardsHelper {\n /// @notice Emitted when a new borrow-side XVS speed is calculated for a market\n event VenusBorrowSpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /// @notice Emitted when a new supply-side XVS speed is calculated for a market\n event VenusSupplySpeedUpdated(VToken indexed vToken, uint256 newSpeed);\n\n /**\n * @notice Checks if the account should be allowed to mint tokens in the given market\n * @param vToken The market to verify the mint against\n * @param minter The account which would get the minted tokens\n * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens\n * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.MINT);\n ensureListed(markets[vToken]);\n\n uint256 supplyCap = supplyCaps[vToken];\n require(supplyCap != 0, \"market supply cap is 0\");\n\n uint256 vTokenSupply = VToken(vToken).totalSupply();\n Exp memory exchangeRate = Exp({ mantissa: VToken(vToken).exchangeRateStored() });\n uint256 nextTotalSupply = mul_ScalarTruncateAddUInt(exchangeRate, vTokenSupply, mintAmount);\n require(nextTotalSupply <= supplyCap, \"market supply cap reached\");\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, minter);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates mint, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being minted\n * @param minter The address minting the tokens\n * @param actualMintAmount The amount of the underlying asset being minted\n * @param mintTokens The number of tokens being minted\n */\n // solhint-disable-next-line no-unused-vars\n function mintVerify(address vToken, address minter, uint256 actualMintAmount, uint256 mintTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(minter, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to redeem tokens in the given market\n * @param vToken The market to verify the redeem against\n * @param redeemer The account which would redeem the tokens\n * @param redeemTokens The number of vTokens to exchange for the underlying asset in the market\n * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REDEEM);\n\n uint256 allowed = redeemAllowedInternal(vToken, redeemer, redeemTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, redeemer);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates redeem, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being redeemed\n * @param redeemer The address redeeming the tokens\n * @param redeemAmount The amount of the underlying asset being redeemed\n * @param redeemTokens The number of tokens being redeemed\n */\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external {\n require(redeemTokens != 0 || redeemAmount == 0, \"redeemTokens zero\");\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(redeemer, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to borrow the underlying asset of the given market\n * @param vToken The market to verify the borrow against\n * @param borrower The account which would borrow the asset\n * @param borrowAmount The amount of underlying the account would borrow\n * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.BORROW);\n\n ensureListed(markets[vToken]);\n\n if (!markets[vToken].accountMembership[borrower]) {\n // only vTokens may call borrowAllowed if borrower not in market\n require(msg.sender == vToken, \"sender must be vToken\");\n\n // attempt to add borrower to the market\n Error err = addToMarketInternal(VToken(vToken), borrower);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n }\n\n if (oracle.getUnderlyingPrice(VToken(vToken)) == 0) {\n return uint256(Error.PRICE_ERROR);\n }\n\n uint256 borrowCap = borrowCaps[vToken];\n // Borrow cap of 0 corresponds to unlimited borrowing\n if (borrowCap != 0) {\n uint256 nextTotalBorrows = add_(VToken(vToken).totalBorrows(), borrowAmount);\n require(nextTotalBorrows < borrowCap, \"market borrow cap reached\");\n }\n\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n borrower,\n VToken(vToken),\n 0,\n borrowAmount\n );\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall != 0) {\n return uint256(Error.INSUFFICIENT_LIQUIDITY);\n }\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates borrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset whose underlying is being borrowed\n * @param borrower The address borrowing the underlying\n * @param borrowAmount The amount of the underlying asset requested to borrow\n */\n // solhint-disable-next-line no-unused-vars\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to repay a borrow in the given market\n * @param vToken The market to verify the repay against\n * @param payer The account which would repay the asset\n * @param borrower The account which borrowed the asset\n * @param repayAmount The amount of the underlying asset the account would repay\n * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function repayBorrowAllowed(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 repayAmount // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.REPAY);\n ensureListed(markets[vToken]);\n\n // Keep the flywheel moving\n Exp memory borrowIndex = Exp({ mantissa: VToken(vToken).borrowIndex() });\n updateVenusBorrowIndex(vToken, borrowIndex);\n distributeBorrowerVenus(vToken, borrower, borrowIndex);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates repayBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being repaid\n * @param payer The address repaying the borrow\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n */\n function repayBorrowVerify(\n address vToken,\n address payer, // solhint-disable-line no-unused-vars\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 borrowerIndex // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vToken);\n }\n }\n\n /**\n * @notice Checks if the liquidation should be allowed to occur\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param repayAmount The amount of underlying being repaid\n */\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256) {\n checkProtocolPauseState();\n\n // if we want to pause liquidating to vTokenCollateral, we should pause seizing\n checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);\n\n if (liquidatorContract != address(0) && liquidator != liquidatorContract) {\n return uint256(Error.UNAUTHORIZED);\n }\n\n ensureListed(markets[vTokenCollateral]);\n\n uint256 borrowBalance;\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n borrowBalance = VToken(vTokenBorrowed).borrowBalanceStored(borrower);\n } else {\n borrowBalance = vaiController.getVAIRepayAmount(borrower);\n }\n\n if (isForcedLiquidationEnabled[vTokenBorrowed] || isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed]) {\n if (repayAmount > borrowBalance) {\n return uint(Error.TOO_MUCH_REPAY);\n }\n return uint(Error.NO_ERROR);\n }\n\n /* The borrower must have shortfall in order to be liquidatable */\n (Error err, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(borrower, VToken(address(0)), 0, 0);\n if (err != Error.NO_ERROR) {\n return uint256(err);\n }\n if (shortfall == 0) {\n return uint256(Error.INSUFFICIENT_SHORTFALL);\n }\n\n // The liquidator may not repay more than what is allowed by the closeFactor\n //-- maxClose = multipy of closeFactorMantissa and borrowBalance\n if (repayAmount > mul_ScalarTruncate(Exp({ mantissa: closeFactorMantissa }), borrowBalance)) {\n return uint256(Error.TOO_MUCH_REPAY);\n }\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates liquidateBorrow, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param actualRepayAmount The amount of underlying being repaid\n * @param seizeTokens The amount of collateral token that will be seized\n */\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 actualRepayAmount, // solhint-disable-line no-unused-vars\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenBorrowed);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenBorrowed);\n }\n }\n\n /**\n * @notice Checks if the seizing of assets should be allowed to occur\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vTokenCollateral, Action.SEIZE);\n\n Market storage market = markets[vTokenCollateral];\n\n // We've added VAIController as a borrowed token list check for seize\n ensureListed(market);\n\n if (!market.accountMembership[borrower]) {\n return uint256(Error.MARKET_NOT_COLLATERAL);\n }\n\n if (address(vTokenBorrowed) != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n\n if (VToken(vTokenCollateral).comptroller() != VToken(vTokenBorrowed).comptroller()) {\n return uint256(Error.COMPTROLLER_MISMATCH);\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vTokenCollateral);\n distributeSupplierVenus(vTokenCollateral, borrower);\n distributeSupplierVenus(vTokenCollateral, liquidator);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates seize, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vTokenCollateral Asset which was used as collateral and will be seized\n * @param vTokenBorrowed Asset which was borrowed by the borrower\n * @param liquidator The address repaying the borrow and seizing the collateral\n * @param borrower The address of the borrower\n * @param seizeTokens The number of collateral tokens to seize\n */\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed, // solhint-disable-line no-unused-vars\n address liquidator,\n address borrower,\n uint256 seizeTokens // solhint-disable-line no-unused-vars\n ) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(borrower, vTokenCollateral);\n prime.accrueInterestAndUpdateScore(liquidator, vTokenCollateral);\n }\n }\n\n /**\n * @notice Checks if the account should be allowed to transfer tokens in the given market\n * @param vToken The market to verify the transfer against\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol)\n */\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256) {\n // Pausing is a very serious situation - we revert to sound the alarms\n checkProtocolPauseState();\n checkActionPauseState(vToken, Action.TRANSFER);\n\n // Currently the only consideration is whether or not\n // the src is allowed to redeem this many tokens\n uint256 allowed = redeemAllowedInternal(vToken, src, transferTokens);\n if (allowed != uint256(Error.NO_ERROR)) {\n return allowed;\n }\n\n // Keep the flywheel moving\n updateVenusSupplyIndex(vToken);\n distributeSupplierVenus(vToken, src);\n distributeSupplierVenus(vToken, dst);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Validates transfer, accrues interest and updates score in prime. Reverts on rejection. May emit logs.\n * @param vToken Asset being transferred\n * @param src The account which sources the tokens\n * @param dst The account which receives the tokens\n * @param transferTokens The number of vTokens to transfer\n */\n // solhint-disable-next-line no-unused-vars\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external {\n if (address(prime) != address(0)) {\n prime.accrueInterestAndUpdateScore(src, vToken);\n prime.accrueInterestAndUpdateScore(dst, vToken);\n }\n }\n\n /**\n * @notice Determine the current account liquidity wrt collateral requirements\n * @return (possible error code (semi-opaque),\n account liquidity in excess of collateral requirements,\n * account shortfall below collateral requirements)\n */\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(address(0)),\n 0,\n 0\n );\n\n return (uint256(err), liquidity, shortfall);\n }\n\n /**\n * @notice Determine what the account liquidity would be if the given amounts were redeemed/borrowed\n * @param vTokenModify The market to hypothetically redeem/borrow in\n * @param account The account to determine liquidity for\n * @param redeemTokens The number of tokens to hypothetically redeem\n * @param borrowAmount The amount of underlying to hypothetically borrow\n * @return (possible error code (semi-opaque),\n hypothetical account liquidity in excess of collateral requirements,\n * hypothetical account shortfall below collateral requirements)\n */\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256) {\n (Error err, uint256 liquidity, uint256 shortfall) = getHypotheticalAccountLiquidityInternal(\n account,\n VToken(vTokenModify),\n redeemTokens,\n borrowAmount\n );\n return (uint256(err), liquidity, shortfall);\n }\n\n // setter functionality\n /**\n * @notice Set XVS speed for a single market\n * @dev Allows the contract admin to set XVS speed for a market\n * @param vTokens The market whose XVS speed to update\n * @param supplySpeeds New XVS speed for supply\n * @param borrowSpeeds New XVS speed for borrow\n */\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external {\n ensureAdmin();\n\n uint256 numTokens = vTokens.length;\n require(numTokens == supplySpeeds.length && numTokens == borrowSpeeds.length, \"invalid input\");\n\n for (uint256 i; i < numTokens; ++i) {\n ensureNonzeroAddress(address(vTokens[i]));\n setVenusSpeedInternal(vTokens[i], supplySpeeds[i], borrowSpeeds[i]);\n }\n }\n\n function setVenusSpeedInternal(VToken vToken, uint256 supplySpeed, uint256 borrowSpeed) internal {\n ensureListed(markets[address(vToken)]);\n\n if (venusSupplySpeeds[address(vToken)] != supplySpeed) {\n // Supply speed updated so let's update supply state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n\n updateVenusSupplyIndex(address(vToken));\n // Update speed and emit event\n venusSupplySpeeds[address(vToken)] = supplySpeed;\n emit VenusSupplySpeedUpdated(vToken, supplySpeed);\n }\n\n if (venusBorrowSpeeds[address(vToken)] != borrowSpeed) {\n // Borrow speed updated so let's update borrow state to ensure that\n // 1. XVS accrued properly for the old speed, and\n // 2. XVS accrued at the new speed starts after this block.\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n\n // Update speed and emit event\n venusBorrowSpeeds[address(vToken)] = borrowSpeed;\n emit VenusBorrowSpeedUpdated(vToken, borrowSpeed);\n }\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/RewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { IRewardFacet } from \"../interfaces/IRewardFacet.sol\";\nimport { XVSRewardsHelper } from \"./XVSRewardsHelper.sol\";\nimport { SafeBEP20, IBEP20 } from \"../../../Utils/SafeBEP20.sol\";\nimport { VBep20Interface } from \"../../../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title RewardFacet\n * @author Venus\n * @dev This facet contains all the methods related to the reward functionality\n * @notice This facet contract provides the external functions related to all claims and rewards of the protocol\n */\ncontract RewardFacet is IRewardFacet, XVSRewardsHelper {\n /// @notice Emitted when Venus is granted by admin\n event VenusGranted(address indexed recipient, uint256 amount);\n\n /// @notice Emitted when XVS are seized for the holder\n event VenusSeized(address indexed holder, uint256 amount);\n\n using SafeBEP20 for IBEP20;\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets and VAI\n * @param holder The address to claim XVS for\n */\n function claimVenus(address holder) public {\n return claimVenus(holder, allMarkets);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in the specified markets\n * @param holder The address to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n */\n function claimVenus(address holder, VToken[] memory vTokens) public {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, vTokens, true, true);\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function claimVenus(address[] memory holders, VToken[] memory vTokens, bool borrowers, bool suppliers) public {\n claimVenus(holders, vTokens, borrowers, suppliers, false);\n }\n\n /**\n * @notice Claim all the xvs accrued by holder in all markets, a shorthand for `claimVenus` with collateral set to `true`\n * @param holder The address to claim XVS for\n */\n function claimVenusAsCollateral(address holder) external {\n address[] memory holders = new address[](1);\n holders[0] = holder;\n claimVenus(holders, allMarkets, true, true, true);\n }\n\n /**\n * @notice Transfer XVS to the user with user's shortfall considered\n * @dev Note: If there is not enough XVS, we do not perform the transfer all\n * @param user The address of the user to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n * @param shortfall The shortfall of the user\n * @param collateral Whether or not we will use user's venus reward as collateral to pay off the debt\n * @return The amount of XVS which was NOT transferred to the user\n */\n function grantXVSInternal(\n address user,\n uint256 amount,\n uint256 shortfall,\n bool collateral\n ) internal returns (uint256) {\n // If the user is blacklisted, they can't get XVS rewards\n require(\n user != 0xEF044206Db68E40520BfA82D45419d498b4bc7Bf &&\n user != 0x7589dD3355DAE848FDbF75044A3495351655cB1A &&\n user != 0x33df7a7F6D44307E1e5F3B15975b47515e5524c0 &&\n user != 0x24e77E5b74B30b026E9996e4bc3329c881e24968,\n \"Blacklisted\"\n );\n\n IBEP20 xvs_ = IBEP20(xvs);\n\n if (amount == 0 || amount > xvs_.balanceOf(address(this))) {\n return amount;\n }\n\n if (shortfall == 0) {\n xvs_.safeTransfer(user, amount);\n return 0;\n }\n // If user's bankrupt and doesn't use pending xvs as collateral, don't grant\n // anything, otherwise, we will transfer the pending xvs as collateral to\n // vXVS token and mint vXVS for the user\n //\n // If mintBehalf failed, don't grant any xvs\n require(collateral, \"bankrupt\");\n\n address xvsVToken_ = xvsVToken;\n\n xvs_.safeApprove(xvsVToken_, 0);\n xvs_.safeApprove(xvsVToken_, amount);\n require(VBep20Interface(xvsVToken_).mintBehalf(user, amount) == uint256(Error.NO_ERROR), \"mint behalf error\");\n\n // set venusAccrued[user] to 0\n return 0;\n }\n\n /*** Venus Distribution Admin ***/\n\n /**\n * @notice Transfer XVS to the recipient\n * @dev Allows the contract admin to transfer XVS to any recipient based on the recipient's shortfall\n * Note: If there is not enough XVS, we do not perform the transfer all\n * @param recipient The address of the recipient to transfer XVS to\n * @param amount The amount of XVS to (possibly) transfer\n */\n function _grantXVS(address recipient, uint256 amount) external {\n ensureAdmin();\n uint256 amountLeft = grantXVSInternal(recipient, amount, 0, false);\n require(amountLeft == 0, \"no xvs\");\n emit VenusGranted(recipient, amount);\n }\n\n /**\n * @dev Seize XVS tokens from the specified holders and transfer to recipient\n * @notice Seize XVS rewards allocated to holders\n * @param holders Addresses of the XVS holders\n * @param recipient Address of the XVS token recipient\n * @return The total amount of XVS tokens seized and transferred to recipient\n */\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256) {\n ensureAllowed(\"seizeVenus(address[],address)\");\n\n uint256 holdersLength = holders.length;\n uint256 totalHoldings;\n\n updateAndDistributeRewardsInternal(holders, allMarkets, true, true);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n uint256 userHolding = venusAccrued[holder];\n\n if (userHolding != 0) {\n totalHoldings += userHolding;\n delete venusAccrued[holder];\n }\n\n emit VenusSeized(holder, userHolding);\n }\n\n if (totalHoldings != 0) {\n IBEP20(xvs).safeTransfer(recipient, totalHoldings);\n emit VenusGranted(recipient, totalHoldings);\n }\n\n return totalHoldings;\n }\n\n /**\n * @notice Claim all xvs accrued by the holders\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n * @param collateral Whether or not to use XVS earned as collateral, only takes effect when the holder has a shortfall\n */\n function claimVenus(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) public {\n uint256 holdersLength = holders.length;\n\n updateAndDistributeRewardsInternal(holders, vTokens, borrowers, suppliers);\n for (uint256 j; j < holdersLength; ++j) {\n address holder = holders[j];\n\n // If there is a positive shortfall, the XVS reward is accrued,\n // but won't be granted to this holder\n (, , uint256 shortfall) = getHypotheticalAccountLiquidityInternal(holder, VToken(address(0)), 0, 0);\n\n uint256 value = venusAccrued[holder];\n delete venusAccrued[holder];\n\n uint256 returnAmount = grantXVSInternal(holder, value, shortfall, collateral);\n\n // returnAmount can only be positive if balance of xvsAddress is less than grant amount(venusAccrued[holder])\n if (returnAmount != 0) {\n venusAccrued[holder] = returnAmount;\n }\n }\n }\n\n /**\n * @notice Update and distribute tokens\n * @param holders The addresses to claim XVS for\n * @param vTokens The list of markets to claim XVS in\n * @param borrowers Whether or not to claim XVS earned by borrowing\n * @param suppliers Whether or not to claim XVS earned by supplying\n */\n function updateAndDistributeRewardsInternal(\n address[] memory holders,\n VToken[] memory vTokens,\n bool borrowers,\n bool suppliers\n ) internal {\n uint256 j;\n uint256 holdersLength = holders.length;\n uint256 vTokensLength = vTokens.length;\n\n for (uint256 i; i < vTokensLength; ++i) {\n VToken vToken = vTokens[i];\n ensureListed(markets[address(vToken)]);\n if (borrowers) {\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n for (j = 0; j < holdersLength; ++j) {\n distributeBorrowerVenus(address(vToken), holders[j], borrowIndex);\n }\n }\n\n if (suppliers) {\n updateVenusSupplyIndex(address(vToken));\n for (j = 0; j < holdersLength; ++j) {\n distributeSupplierVenus(address(vToken), holders[j]);\n }\n }\n }\n }\n\n /**\n * @notice Returns the XVS vToken address\n * @return The address of XVS vToken\n */\n function getXVSVTokenAddress() external view returns (address) {\n return xvsVToken;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/SetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ISetterFacet } from \"../interfaces/ISetterFacet.sol\";\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { ComptrollerLensInterface } from \"../../ComptrollerLensInterface.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\n/**\n * @title SetterFacet\n * @author Venus\n * @dev This facet contains all the setters for the states\n * @notice This facet contract contains all the configurational setter functions\n */\ncontract SetterFacet is ISetterFacet, FacetBase {\n /// @notice Emitted when close factor is changed by admin\n event NewCloseFactor(uint256 oldCloseFactorMantissa, uint256 newCloseFactorMantissa);\n\n /// @notice Emitted when a collateral factor is changed by admin\n event NewCollateralFactor(\n VToken indexed vToken,\n uint256 oldCollateralFactorMantissa,\n uint256 newCollateralFactorMantissa\n );\n\n /// @notice Emitted when liquidation incentive is changed by admin\n event NewLiquidationIncentive(uint256 oldLiquidationIncentiveMantissa, uint256 newLiquidationIncentiveMantissa);\n\n /// @notice Emitted when price oracle is changed\n event NewPriceOracle(PriceOracle oldPriceOracle, PriceOracle newPriceOracle);\n\n /// @notice Emitted when borrow cap for a vToken is changed\n event NewBorrowCap(VToken indexed vToken, uint256 newBorrowCap);\n\n /// @notice Emitted when VAIController is changed\n event NewVAIController(VAIControllerInterface oldVAIController, VAIControllerInterface newVAIController);\n\n /// @notice Emitted when VAI mint rate is changed by admin\n event NewVAIMintRate(uint256 oldVAIMintRate, uint256 newVAIMintRate);\n\n /// @notice Emitted when protocol state is changed by admin\n event ActionProtocolPaused(bool state);\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Emitted when liquidator adress is changed\n event NewLiquidatorContract(address oldLiquidatorContract, address newLiquidatorContract);\n\n /// @notice Emitted when ComptrollerLens address is changed\n event NewComptrollerLens(address oldComptrollerLens, address newComptrollerLens);\n\n /// @notice Emitted when supply cap for a vToken is changed\n event NewSupplyCap(VToken indexed vToken, uint256 newSupplyCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when pause guardian is changed\n event NewPauseGuardian(address oldPauseGuardian, address newPauseGuardian);\n\n /// @notice Emitted when an action is paused on a market\n event ActionPausedMarket(VToken indexed vToken, Action indexed action, bool pauseState);\n\n /// @notice Emitted when VAI Vault info is changed\n event NewVAIVaultInfo(address indexed vault_, uint256 releaseStartBlock_, uint256 releaseInterval_);\n\n /// @notice Emitted when Venus VAI Vault rate is changed\n event NewVenusVAIVaultRate(uint256 oldVenusVAIVaultRate, uint256 newVenusVAIVaultRate);\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(IPrime oldPrimeToken, IPrime newPrimeToken);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for all users in a market\n event IsForcedLiquidationEnabledUpdated(address indexed vToken, bool enable);\n\n /// @notice Emitted when forced liquidation is enabled or disabled for a user borrowing in a market\n event IsForcedLiquidationEnabledForUserUpdated(address indexed borrower, address indexed vToken, bool enable);\n\n /// @notice Emitted when XVS token address is changed\n event NewXVSToken(address indexed oldXVS, address indexed newXVS);\n\n /// @notice Emitted when XVS vToken address is changed\n event NewXVSVToken(address indexed oldXVSVToken, address indexed newXVSVToken);\n\n /**\n * @notice Compare two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n require(oldAddress != newAddress, \"old address is same as new address\");\n _;\n }\n\n /**\n * @notice Compare two values to ensure they are different\n * @param oldValue The original value to compare\n * @param newValue The new value to compare\n */\n modifier compareValue(uint256 oldValue, uint256 newValue) {\n require(oldValue != newValue, \"old value is same as new value\");\n _;\n }\n\n /**\n * @notice Sets a new price oracle for the comptroller\n * @dev Allows the contract admin to set a new price oracle used by the Comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPriceOracle(\n PriceOracle newOracle\n ) external compareAddress(address(oracle), address(newOracle)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(newOracle));\n\n // Track the old oracle for the comptroller\n PriceOracle oldOracle = oracle;\n\n // Set comptroller's oracle to newOracle\n oracle = newOracle;\n\n // Emit NewPriceOracle(oldOracle, newOracle)\n emit NewPriceOracle(oldOracle, newOracle);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the closeFactor used when liquidating borrows\n * @dev Allows the contract admin to set the closeFactor used to liquidate borrows\n * @param newCloseFactorMantissa New close factor, scaled by 1e18\n * @return uint256 0=success, otherwise will revert\n */\n function _setCloseFactor(\n uint256 newCloseFactorMantissa\n ) external compareValue(closeFactorMantissa, newCloseFactorMantissa) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n\n Exp memory newCloseFactorExp = Exp({ mantissa: newCloseFactorMantissa });\n\n //-- Check close factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: closeFactorMaxMantissa });\n //-- Check close factor >= 0.05\n Exp memory lowLimit = Exp({ mantissa: closeFactorMinMantissa });\n\n if (lessThanExp(highLimit, newCloseFactorExp) || greaterThanExp(lowLimit, newCloseFactorExp)) {\n return fail(Error.INVALID_CLOSE_FACTOR, FailureInfo.SET_CLOSE_FACTOR_VALIDATION);\n }\n\n uint256 oldCloseFactorMantissa = closeFactorMantissa;\n closeFactorMantissa = newCloseFactorMantissa;\n emit NewCloseFactor(oldCloseFactorMantissa, newCloseFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Allows the contract admin to set the address of access control of this contract\n * @param newAccessControlAddress New address for the access control\n * @return uint256 0=success, otherwise will revert\n */\n function _setAccessControl(\n address newAccessControlAddress\n ) external compareAddress(accessControl, newAccessControlAddress) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, newAccessControlAddress);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets the collateralFactor for a market\n * @dev Allows a privileged role to set the collateralFactorMantissa\n * @param vToken The market to set the factor on\n * @param newCollateralFactorMantissa The new collateral factor, scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setCollateralFactor(\n VToken vToken,\n uint256 newCollateralFactorMantissa\n )\n external\n compareValue(markets[address(vToken)].collateralFactorMantissa, newCollateralFactorMantissa)\n returns (uint256)\n {\n // Check caller is allowed by access control manager\n ensureAllowed(\"_setCollateralFactor(address,uint256)\");\n ensureNonzeroAddress(address(vToken));\n\n // Verify market is listed\n Market storage market = markets[address(vToken)];\n ensureListed(market);\n\n Exp memory newCollateralFactorExp = Exp({ mantissa: newCollateralFactorMantissa });\n\n //-- Check collateral factor <= 0.9\n Exp memory highLimit = Exp({ mantissa: collateralFactorMaxMantissa });\n if (lessThanExp(highLimit, newCollateralFactorExp)) {\n return fail(Error.INVALID_COLLATERAL_FACTOR, FailureInfo.SET_COLLATERAL_FACTOR_VALIDATION);\n }\n\n // If collateral factor != 0, fail if price == 0\n if (newCollateralFactorMantissa != 0 && oracle.getUnderlyingPrice(vToken) == 0) {\n return fail(Error.PRICE_ERROR, FailureInfo.SET_COLLATERAL_FACTOR_WITHOUT_PRICE);\n }\n\n // Set market's collateral factor to new collateral factor, remember old value\n uint256 oldCollateralFactorMantissa = market.collateralFactorMantissa;\n market.collateralFactorMantissa = newCollateralFactorMantissa;\n\n // Emit event with asset, old collateral factor, and new collateral factor\n emit NewCollateralFactor(vToken, oldCollateralFactorMantissa, newCollateralFactorMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets liquidationIncentive\n * @dev Allows a privileged role to set the liquidationIncentiveMantissa\n * @param newLiquidationIncentiveMantissa New liquidationIncentive scaled by 1e18\n * @return uint256 0=success, otherwise a failure. (See ErrorReporter for details)\n */\n function _setLiquidationIncentive(\n uint256 newLiquidationIncentiveMantissa\n ) external compareValue(liquidationIncentiveMantissa, newLiquidationIncentiveMantissa) returns (uint256) {\n ensureAllowed(\"_setLiquidationIncentive(uint256)\");\n\n require(newLiquidationIncentiveMantissa >= 1e18, \"incentive < 1e18\");\n\n // Save current value for use in log\n uint256 oldLiquidationIncentiveMantissa = liquidationIncentiveMantissa;\n // Set liquidation incentive to new incentive\n liquidationIncentiveMantissa = newLiquidationIncentiveMantissa;\n\n // Emit event with old incentive, new incentive\n emit NewLiquidationIncentive(oldLiquidationIncentiveMantissa, newLiquidationIncentiveMantissa);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Update the address of the liquidator contract\n * @dev Allows the contract admin to update the address of liquidator contract\n * @param newLiquidatorContract_ The new address of the liquidator contract\n */\n function _setLiquidatorContract(\n address newLiquidatorContract_\n ) external compareAddress(liquidatorContract, newLiquidatorContract_) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(newLiquidatorContract_);\n address oldLiquidatorContract = liquidatorContract;\n liquidatorContract = newLiquidatorContract_;\n emit NewLiquidatorContract(oldLiquidatorContract, newLiquidatorContract_);\n }\n\n /**\n * @notice Admin function to change the Pause Guardian\n * @dev Allows the contract admin to change the Pause Guardian\n * @param newPauseGuardian The address of the new Pause Guardian\n * @return uint256 0=success, otherwise a failure. (See enum Error for details)\n */\n function _setPauseGuardian(\n address newPauseGuardian\n ) external compareAddress(pauseGuardian, newPauseGuardian) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(newPauseGuardian);\n\n // Save current value for inclusion in log\n address oldPauseGuardian = pauseGuardian;\n // Store pauseGuardian with value newPauseGuardian\n pauseGuardian = newPauseGuardian;\n\n // Emit NewPauseGuardian(OldPauseGuardian, NewPauseGuardian)\n emit NewPauseGuardian(oldPauseGuardian, newPauseGuardian);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the given borrow caps for the given vToken market Borrowing that brings total borrows to or above borrow cap will revert\n * @dev Allows a privileged role to set the borrowing cap for a vToken market. A borrow cap of 0 corresponds to unlimited borrowing\n * @param vTokens The addresses of the markets (tokens) to change the borrow caps for\n * @param newBorrowCaps The new borrow cap values in underlying to be set. A value of 0 corresponds to unlimited borrowing\n */\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external {\n ensureAllowed(\"_setMarketBorrowCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numBorrowCaps = newBorrowCaps.length;\n\n require(numMarkets != 0 && numMarkets == numBorrowCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n borrowCaps[address(vTokens[i])] = newBorrowCaps[i];\n emit NewBorrowCap(vTokens[i], newBorrowCaps[i]);\n }\n }\n\n /**\n * @notice Set the given supply caps for the given vToken market Supply that brings total Supply to or above supply cap will revert\n * @dev Allows a privileged role to set the supply cap for a vToken. A supply cap of 0 corresponds to Minting NotAllowed\n * @param vTokens The addresses of the markets (tokens) to change the supply caps for\n * @param newSupplyCaps The new supply cap values in underlying to be set. A value of 0 corresponds to Minting NotAllowed\n */\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external {\n ensureAllowed(\"_setMarketSupplyCaps(address[],uint256[])\");\n\n uint256 numMarkets = vTokens.length;\n uint256 numSupplyCaps = newSupplyCaps.length;\n\n require(numMarkets != 0 && numMarkets == numSupplyCaps, \"invalid input\");\n\n for (uint256 i; i < numMarkets; ++i) {\n supplyCaps[address(vTokens[i])] = newSupplyCaps[i];\n emit NewSupplyCap(vTokens[i], newSupplyCaps[i]);\n }\n }\n\n /**\n * @notice Set whole protocol pause/unpause state\n * @dev Allows a privileged role to pause/unpause protocol\n * @param state The new state (true=paused, false=unpaused)\n * @return bool The updated state of the protocol\n */\n function _setProtocolPaused(bool state) external returns (bool) {\n ensureAllowed(\"_setProtocolPaused(bool)\");\n\n protocolPaused = state;\n emit ActionProtocolPaused(state);\n return state;\n }\n\n /**\n * @notice Pause/unpause certain actions\n * @dev Allows a privileged role to pause/unpause the protocol action state\n * @param markets_ Markets to pause/unpause the actions on\n * @param actions_ List of action ids to pause/unpause\n * @param paused_ The new paused state (true=paused, false=unpaused)\n */\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external {\n ensureAllowed(\"_setActionsPaused(address[],uint8[],bool)\");\n\n uint256 numMarkets = markets_.length;\n uint256 numActions = actions_.length;\n for (uint256 marketIdx; marketIdx < numMarkets; ++marketIdx) {\n for (uint256 actionIdx; actionIdx < numActions; ++actionIdx) {\n setActionPausedInternal(markets_[marketIdx], actions_[actionIdx], paused_);\n }\n }\n }\n\n /**\n * @dev Pause/unpause an action on a market\n * @param market Market to pause/unpause the action on\n * @param action Action id to pause/unpause\n * @param paused The new paused state (true=paused, false=unpaused)\n */\n function setActionPausedInternal(address market, Action action, bool paused) internal {\n ensureListed(markets[market]);\n _actionPaused[market][uint256(action)] = paused;\n emit ActionPausedMarket(VToken(market), action, paused);\n }\n\n /**\n * @notice Sets a new VAI controller\n * @dev Admin function to set a new VAI controller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIController(\n VAIControllerInterface vaiController_\n ) external compareAddress(address(vaiController), address(vaiController_)) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n ensureNonzeroAddress(address(vaiController_));\n\n VAIControllerInterface oldVaiController = vaiController;\n vaiController = vaiController_;\n emit NewVAIController(oldVaiController, vaiController_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the VAI mint rate\n * @param newVAIMintRate The new VAI mint rate to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setVAIMintRate(\n uint256 newVAIMintRate\n ) external compareValue(vaiMintRate, newVAIMintRate) returns (uint256) {\n // Check caller is admin\n ensureAdmin();\n uint256 oldVAIMintRate = vaiMintRate;\n vaiMintRate = newVAIMintRate;\n emit NewVAIMintRate(oldVAIMintRate, newVAIMintRate);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the minted VAI amount of the `owner`\n * @param owner The address of the account to set\n * @param amount The amount of VAI to set to the account\n * @return The number of minted VAI by `owner`\n */\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256) {\n checkProtocolPauseState();\n\n // Pausing is a very serious situation - we revert to sound the alarms\n require(!mintVAIGuardianPaused && !repayVAIGuardianPaused, \"VAI is paused\");\n // Check caller is vaiController\n if (msg.sender != address(vaiController)) {\n return fail(Error.REJECTION, FailureInfo.SET_MINTED_VAI_REJECTION);\n }\n mintedVAIs[owner] = amount;\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the treasury data.\n * @param newTreasuryGuardian The new address of the treasury guardian to be set\n * @param newTreasuryAddress The new address of the treasury to be set\n * @param newTreasuryPercent The new treasury percent to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n ensureAdminOr(treasuryGuardian);\n\n require(newTreasuryPercent < 1e18, \"percent >= 100%\");\n ensureNonzeroAddress(newTreasuryGuardian);\n ensureNonzeroAddress(newTreasuryAddress);\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /*** Venus Distribution ***/\n\n /**\n * @dev Set ComptrollerLens contract address\n * @param comptrollerLens_ The new ComptrollerLens contract address to be set\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptrollerLens(\n ComptrollerLensInterface comptrollerLens_\n ) external compareAddress(address(comptrollerLens), address(comptrollerLens_)) returns (uint256) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the amount of XVS distributed per block to VAI Vault\n * @param venusVAIVaultRate_ The amount of XVS wei per block to distribute to VAI Vault\n */\n function _setVenusVAIVaultRate(\n uint256 venusVAIVaultRate_\n ) external compareValue(venusVAIVaultRate, venusVAIVaultRate_) {\n ensureAdmin();\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n uint256 oldVenusVAIVaultRate = venusVAIVaultRate;\n venusVAIVaultRate = venusVAIVaultRate_;\n emit NewVenusVAIVaultRate(oldVenusVAIVaultRate, venusVAIVaultRate_);\n }\n\n /**\n * @notice Set the VAI Vault infos\n * @param vault_ The address of the VAI Vault\n * @param releaseStartBlock_ The start block of release to VAI Vault\n * @param minReleaseAmount_ The minimum release amount to VAI Vault\n */\n function _setVAIVaultInfo(\n address vault_,\n uint256 releaseStartBlock_,\n uint256 minReleaseAmount_\n ) external compareAddress(vaiVaultAddress, vault_) {\n ensureAdmin();\n ensureNonzeroAddress(vault_);\n if (vaiVaultAddress != address(0)) {\n releaseToVault();\n }\n\n vaiVaultAddress = vault_;\n releaseStartBlock = releaseStartBlock_;\n minReleaseAmount = minReleaseAmount_;\n emit NewVAIVaultInfo(vault_, releaseStartBlock_, minReleaseAmount_);\n }\n\n /**\n * @notice Sets the prime token contract for the comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPrimeToken(IPrime _prime) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(_prime));\n\n IPrime oldPrime = prime;\n prime = _prime;\n emit NewPrimeToken(oldPrime, _prime);\n\n return uint(Error.NO_ERROR);\n }\n\n /** @notice Enables forced liquidations for a market. If forced liquidation is enabled,\n * borrows in the market may be liquidated regardless of the account liquidity\n * @dev Allows a privileged role to set enable/disable forced liquidations\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidation(address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidation(address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabled[vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledUpdated(vTokenBorrowed, enable);\n }\n\n /**\n * @notice Enables forced liquidations for user's borrows in a certain market. If forced\n * liquidation is enabled, user's borrows in the market may be liquidated regardless of\n * the account liquidity. Forced liquidation may be enabled for a user even if it is not\n * enabled for the entire market.\n * @param borrower The address of the borrower\n * @param vTokenBorrowed Borrowed vToken\n * @param enable Whether to enable forced liquidations\n */\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external {\n ensureAllowed(\"_setForcedLiquidationForUser(address,address,bool)\");\n if (vTokenBorrowed != address(vaiController)) {\n ensureListed(markets[vTokenBorrowed]);\n }\n isForcedLiquidationEnabledForUser[borrower][vTokenBorrowed] = enable;\n emit IsForcedLiquidationEnabledForUserUpdated(borrower, vTokenBorrowed, enable);\n }\n\n /**\n * @notice Set the address of the XVS token\n * @param xvs_ The address of the XVS token\n */\n function _setXVSToken(address xvs_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvs_);\n\n emit NewXVSToken(xvs, xvs_);\n xvs = xvs_;\n }\n\n /**\n * @notice Set the address of the XVS vToken\n * @param xvsVToken_ The address of the XVS vToken\n */\n function _setXVSVToken(address xvsVToken_) external {\n ensureAdmin();\n ensureNonzeroAddress(xvsVToken_);\n\n address underlying = VToken(xvsVToken_).underlying();\n require(underlying == xvs, \"invalid xvs vtoken address\");\n\n emit NewXVSVToken(xvsVToken, xvsVToken_);\n xvsVToken = xvsVToken_;\n }\n}\n" + }, + "contracts/Comptroller/Diamond/facets/XVSRewardsHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { FacetBase } from \"./FacetBase.sol\";\n\n/**\n * @title XVSRewardsHelper\n * @author Venus\n * @dev This contract contains internal functions used in RewardFacet and PolicyFacet\n * @notice This facet contract contains the shared functions used by the RewardFacet and PolicyFacet\n */\ncontract XVSRewardsHelper is FacetBase {\n /// @notice Emitted when XVS is distributed to a borrower\n event DistributedBorrowerVenus(\n VToken indexed vToken,\n address indexed borrower,\n uint256 venusDelta,\n uint256 venusBorrowIndex\n );\n\n /// @notice Emitted when XVS is distributed to a supplier\n event DistributedSupplierVenus(\n VToken indexed vToken,\n address indexed supplier,\n uint256 venusDelta,\n uint256 venusSupplyIndex\n );\n\n /**\n * @notice Accrue XVS to the market by updating the borrow index\n * @param vToken The market whose borrow index to update\n */\n function updateVenusBorrowIndex(address vToken, Exp memory marketBorrowIndex) internal {\n VenusMarketState storage borrowState = venusBorrowState[vToken];\n uint256 borrowSpeed = venusBorrowSpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n uint256 deltaBlocks = sub_(blockNumber, borrowState.block);\n if (deltaBlocks != 0 && borrowSpeed != 0) {\n uint256 borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint256 accruedVenus = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount != 0 ? fraction(accruedVenus, borrowAmount) : Double({ mantissa: 0 });\n borrowState.index = safe224(add_(Double({ mantissa: borrowState.index }), ratio).mantissa, \"224\");\n borrowState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n borrowState.block = blockNumber;\n }\n }\n\n /**\n * @notice Accrue XVS to the market by updating the supply index\n * @param vToken The market whose supply index to update\n */\n function updateVenusSupplyIndex(address vToken) internal {\n VenusMarketState storage supplyState = venusSupplyState[vToken];\n uint256 supplySpeed = venusSupplySpeeds[vToken];\n uint32 blockNumber = getBlockNumberAsUint32();\n\n uint256 deltaBlocks = sub_(blockNumber, supplyState.block);\n if (deltaBlocks != 0 && supplySpeed != 0) {\n uint256 supplyTokens = VToken(vToken).totalSupply();\n uint256 accruedVenus = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens != 0 ? fraction(accruedVenus, supplyTokens) : Double({ mantissa: 0 });\n supplyState.index = safe224(add_(Double({ mantissa: supplyState.index }), ratio).mantissa, \"224\");\n supplyState.block = blockNumber;\n } else if (deltaBlocks != 0) {\n supplyState.block = blockNumber;\n }\n }\n\n /**\n * @notice Calculate XVS accrued by a supplier and possibly transfer it to them\n * @param vToken The market in which the supplier is interacting\n * @param supplier The address of the supplier to distribute XVS to\n */\n function distributeSupplierVenus(address vToken, address supplier) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 supplyIndex = venusSupplyState[vToken].index;\n uint256 supplierIndex = venusSupplierIndex[vToken][supplier];\n // Update supplier's index to the current index since we are distributing accrued XVS\n venusSupplierIndex[vToken][supplier] = supplyIndex;\n if (supplierIndex == 0 && supplyIndex >= venusInitialIndex) {\n // Covers the case where users supplied tokens before the market's supply state index was set.\n // Rewards the user with XVS accrued from the start of when supplier rewards were first\n // set for the market.\n supplierIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per vToken accrued\n Double memory deltaIndex = Double({ mantissa: sub_(supplyIndex, supplierIndex) });\n // Multiply of supplierTokens and supplierDelta\n uint256 supplierDelta = mul_(VToken(vToken).balanceOf(supplier), deltaIndex);\n // Addition of supplierAccrued and supplierDelta\n venusAccrued[supplier] = add_(venusAccrued[supplier], supplierDelta);\n emit DistributedSupplierVenus(VToken(vToken), supplier, supplierDelta, supplyIndex);\n }\n\n /**\n * @notice Calculate XVS accrued by a borrower and possibly transfer it to them\n * @dev Borrowers will not begin to accrue until after the first interaction with the protocol\n * @param vToken The market in which the borrower is interacting\n * @param borrower The address of the borrower to distribute XVS to\n */\n function distributeBorrowerVenus(address vToken, address borrower, Exp memory marketBorrowIndex) internal {\n if (address(vaiVaultAddress) != address(0)) {\n releaseToVault();\n }\n uint256 borrowIndex = venusBorrowState[vToken].index;\n uint256 borrowerIndex = venusBorrowerIndex[vToken][borrower];\n // Update borrowers's index to the current index since we are distributing accrued XVS\n venusBorrowerIndex[vToken][borrower] = borrowIndex;\n if (borrowerIndex == 0 && borrowIndex >= venusInitialIndex) {\n // Covers the case where users borrowed tokens before the market's borrow state index was set.\n // Rewards the user with XVS accrued from the start of when borrower rewards were first\n // set for the market.\n borrowerIndex = venusInitialIndex;\n }\n // Calculate change in the cumulative sum of the XVS per borrowed unit accrued\n Double memory deltaIndex = Double({ mantissa: sub_(borrowIndex, borrowerIndex) });\n uint256 borrowerDelta = mul_(div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex), deltaIndex);\n venusAccrued[borrower] = add_(venusAccrued[borrower], borrowerDelta);\n emit DistributedBorrowerVenus(VToken(vToken), borrower, borrowerDelta, borrowIndex);\n }\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n function diamondCut(FacetCut[] calldata _diamondCut) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IMarketFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IMarketFacet {\n function isComptroller() external pure returns (bool);\n\n function liquidateCalculateSeizeTokens(\n address vTokenBorrowed,\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function liquidateVAICalculateSeizeTokens(\n address vTokenCollateral,\n uint256 actualRepayAmount\n ) external view returns (uint256, uint256);\n\n function checkMembership(address account, VToken vToken) external view returns (bool);\n\n function enterMarkets(address[] calldata vTokens) external returns (uint256[] memory);\n\n function exitMarket(address vToken) external returns (uint256);\n\n function _supportMarket(VToken vToken) external returns (uint256);\n\n function getAssetsIn(address account) external view returns (VToken[] memory);\n\n function getAllMarkets() external view returns (VToken[] memory);\n\n function updateDelegate(address delegate, bool allowBorrows) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IPolicyFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\n\ninterface IPolicyFacet {\n function mintAllowed(address vToken, address minter, uint256 mintAmount) external returns (uint256);\n\n function mintVerify(address vToken, address minter, uint256 mintAmount, uint256 mintTokens) external;\n\n function redeemAllowed(address vToken, address redeemer, uint256 redeemTokens) external returns (uint256);\n\n function redeemVerify(address vToken, address redeemer, uint256 redeemAmount, uint256 redeemTokens) external;\n\n function borrowAllowed(address vToken, address borrower, uint256 borrowAmount) external returns (uint256);\n\n function borrowVerify(address vToken, address borrower, uint256 borrowAmount) external;\n\n function repayBorrowAllowed(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount\n ) external returns (uint256);\n\n function repayBorrowVerify(\n address vToken,\n address payer,\n address borrower,\n uint256 repayAmount,\n uint256 borrowerIndex\n ) external;\n\n function liquidateBorrowAllowed(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount\n ) external view returns (uint256);\n\n function liquidateBorrowVerify(\n address vTokenBorrowed,\n address vTokenCollateral,\n address liquidator,\n address borrower,\n uint256 repayAmount,\n uint256 seizeTokens\n ) external;\n\n function seizeAllowed(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external returns (uint256);\n\n function seizeVerify(\n address vTokenCollateral,\n address vTokenBorrowed,\n address liquidator,\n address borrower,\n uint256 seizeTokens\n ) external;\n\n function transferAllowed(\n address vToken,\n address src,\n address dst,\n uint256 transferTokens\n ) external returns (uint256);\n\n function transferVerify(address vToken, address src, address dst, uint256 transferTokens) external;\n\n function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);\n\n function getHypotheticalAccountLiquidity(\n address account,\n address vTokenModify,\n uint256 redeemTokens,\n uint256 borrowAmount\n ) external view returns (uint256, uint256, uint256);\n\n function _setVenusSpeeds(\n VToken[] calldata vTokens,\n uint256[] calldata supplySpeeds,\n uint256[] calldata borrowSpeeds\n ) external;\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/IRewardFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\n\ninterface IRewardFacet {\n function claimVenus(address holder) external;\n\n function claimVenus(address holder, VToken[] calldata vTokens) external;\n\n function claimVenus(address[] calldata holders, VToken[] calldata vTokens, bool borrowers, bool suppliers) external;\n\n function claimVenusAsCollateral(address holder) external;\n\n function _grantXVS(address recipient, uint256 amount) external;\n\n function getXVSAddress() external view returns (address);\n\n function getXVSVTokenAddress() external view returns (address);\n\n function actionPaused(address market, ComptrollerTypes.Action action) external view returns (bool);\n\n function claimVenus(\n address[] calldata holders,\n VToken[] calldata vTokens,\n bool borrowers,\n bool suppliers,\n bool collateral\n ) external;\n function seizeVenus(address[] calldata holders, address recipient) external returns (uint256);\n}\n" + }, + "contracts/Comptroller/Diamond/interfaces/ISetterFacet.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\n\nimport { PriceOracle } from \"../../../Oracle/PriceOracle.sol\";\nimport { VToken } from \"../../../Tokens/VTokens/VToken.sol\";\nimport { ComptrollerTypes } from \"../../ComptrollerStorage.sol\";\nimport { VAIControllerInterface } from \"../../../Tokens/VAI/VAIControllerInterface.sol\";\nimport { ComptrollerLensInterface } from \"../../../Comptroller/ComptrollerLensInterface.sol\";\nimport { IPrime } from \"../../../Tokens/Prime/IPrime.sol\";\n\ninterface ISetterFacet {\n function _setPriceOracle(PriceOracle newOracle) external returns (uint256);\n\n function _setCloseFactor(uint256 newCloseFactorMantissa) external returns (uint256);\n\n function _setAccessControl(address newAccessControlAddress) external returns (uint256);\n\n function _setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa) external returns (uint256);\n\n function _setLiquidationIncentive(uint256 newLiquidationIncentiveMantissa) external returns (uint256);\n\n function _setLiquidatorContract(address newLiquidatorContract_) external;\n\n function _setPauseGuardian(address newPauseGuardian) external returns (uint256);\n\n function _setMarketBorrowCaps(VToken[] calldata vTokens, uint256[] calldata newBorrowCaps) external;\n\n function _setMarketSupplyCaps(VToken[] calldata vTokens, uint256[] calldata newSupplyCaps) external;\n\n function _setProtocolPaused(bool state) external returns (bool);\n\n function _setActionsPaused(\n address[] calldata markets,\n ComptrollerTypes.Action[] calldata actions,\n bool paused\n ) external;\n\n function _setVAIController(VAIControllerInterface vaiController_) external returns (uint256);\n\n function _setVAIMintRate(uint256 newVAIMintRate) external returns (uint256);\n\n function setMintedVAIOf(address owner, uint256 amount) external returns (uint256);\n\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256);\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint256);\n\n function _setVenusVAIVaultRate(uint256 venusVAIVaultRate_) external;\n\n function _setVAIVaultInfo(address vault_, uint256 releaseStartBlock_, uint256 minReleaseAmount_) external;\n\n function _setForcedLiquidation(address vToken, bool enable) external;\n\n function _setPrimeToken(IPrime _prime) external returns (uint);\n\n function _setForcedLiquidationForUser(address borrower, address vTokenBorrowed, bool enable) external;\n\n function _setXVSToken(address xvs_) external;\n\n function _setXVSVToken(address xvsVToken_) external;\n}\n" + }, + "contracts/Comptroller/Unitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerStorage.sol\";\nimport \"../Utils/ErrorReporter.sol\";\n\n/**\n * @title ComptrollerCore\n * @dev Storage for the comptroller is at this address, while execution is delegated to the `comptrollerImplementation`.\n * VTokens should reference this contract as their comptroller.\n */\ncontract Unitroller is UnitrollerAdminStorage, ComptrollerErrorReporter {\n /**\n * @notice Emitted when pendingComptrollerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingComptrollerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation and pendingImplementation ≠ address(0)\n if (msg.sender != pendingComptrollerImplementation || pendingComptrollerImplementation == address(0)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = comptrollerImplementation;\n address oldPendingImplementation = pendingComptrollerImplementation;\n\n comptrollerImplementation = pendingComptrollerImplementation;\n\n pendingComptrollerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, comptrollerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingComptrollerImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = comptrollerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Governance/VTreasury.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/IBEP20.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/Ownable.sol\";\n\n/**\n * @title VTreasury\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasury is Ownable {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n // WithdrawTreasuryBEP20 Event\n event WithdrawTreasuryBEP20(address tokenAddress, uint256 withdrawAmount, address withdrawAddress);\n\n // WithdrawTreasuryBNB Event\n event WithdrawTreasuryBNB(uint256 withdrawAmount, address withdrawAddress);\n\n /**\n * @notice To receive BNB\n */\n function() external payable {}\n\n /**\n * @notice Withdraw Treasury BEP20 Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBEP20(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IBEP20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer BEP20 Token to withdrawAddress\n IBEP20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryBEP20(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury BNB, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n */\n function withdrawTreasuryBNB(uint256 withdrawAmount, address payable withdrawAddress) external payable onlyOwner {\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury BNB Balance\n uint256 bnbBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > bnbBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = bnbBalance;\n }\n // Transfer BNB to withdrawAddress\n withdrawAddress.transfer(actualWithdrawAmount);\n\n emit WithdrawTreasuryBNB(actualWithdrawAmount, withdrawAddress);\n }\n}\n" + }, + "contracts/InterestRateModels/InterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Venus's InterestRateModel Interface\n * @author Venus\n */\ncontract InterestRateModel {\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\n bool public constant isInterestRateModel = true;\n\n /**\n * @notice Calculates the current borrow interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);\n\n /**\n * @notice Calculates the current supply interest rate per block\n * @param cash The total amount of cash the market has\n * @param borrows The total amount of borrows the market has outstanding\n * @param reserves The total amnount of reserves the market has\n * @param reserveFactorMantissa The current reserve factor the market has\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) external view returns (uint);\n}\n" + }, + "contracts/InterestRateModels/JumpRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's JumpRateModel Contract\n * @author Venus\n */\ncontract JumpRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice The multiplierPerBlock after hitting a specified utilization point\n */\n uint public jumpMultiplierPerBlock;\n\n /**\n * @notice The utilization point at which the jump multiplier is applied\n */\n uint public kink;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\n * @param kink_ The utilization point at which the jump multiplier is applied\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);\n kink = kink_;\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint util = utilizationRate(cash, borrows, reserves);\n\n if (util <= kink) {\n return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n } else {\n uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n uint excessUtil = util.sub(kink);\n return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);\n }\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/InterestRateModels/WhitePaperInterestRateModel.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"./InterestRateModel.sol\";\n\n/**\n * @title Venus's WhitePaperInterestRateModel Contract\n * @author Venus\n * @notice The parameterized model described in section 2.4 of the original Venus Protocol whitepaper\n */\ncontract WhitePaperInterestRateModel is InterestRateModel {\n using SafeMath for uint;\n\n event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock);\n\n /**\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\n */\n uint public constant blocksPerYear = (60 * 60 * 24 * 365) / 3; // (assuming 3s blocks)\n\n /**\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\n */\n uint public multiplierPerBlock;\n\n /**\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\n */\n uint public baseRatePerBlock;\n\n /**\n * @notice Construct an interest rate model\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\n */\n constructor(uint baseRatePerYear, uint multiplierPerYear) public {\n baseRatePerBlock = baseRatePerYear.div(blocksPerYear);\n multiplierPerBlock = multiplierPerYear.div(blocksPerYear);\n\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock);\n }\n\n /**\n * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market (currently unused)\n * @return The utilization rate as a mantissa between [0, 1e18]\n */\n function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {\n // Utilization rate is 0 when there are no borrows\n if (borrows == 0) {\n return 0;\n }\n\n return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\n }\n\n /**\n * @notice Calculates the current borrow rate per block, with the error code expected by the market\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getBorrowRate(uint cash, uint borrows, uint reserves) public view returns (uint) {\n uint ur = utilizationRate(cash, borrows, reserves);\n return ur.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);\n }\n\n /**\n * @notice Calculates the current supply rate per block\n * @param cash The amount of cash in the market\n * @param borrows The amount of borrows in the market\n * @param reserves The amount of reserves in the market\n * @param reserveFactorMantissa The current reserve factor for the market\n * @return The supply rate percentage per block as a mantissa (scaled by 1e18)\n */\n function getSupplyRate(\n uint cash,\n uint borrows,\n uint reserves,\n uint reserveFactorMantissa\n ) public view returns (uint) {\n uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);\n uint borrowRate = getBorrowRate(cash, borrows, reserves);\n uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\n return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\n }\n}\n" + }, + "contracts/Lens/ComptrollerLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Utils/ErrorReporter.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Comptroller/ComptrollerLensInterface.sol\";\nimport \"../Tokens/VAI/VAIControllerInterface.sol\";\n\n/**\n * @title ComptrollerLens Contract\n * @author Venus\n * @notice The ComptrollerLens contract has functions to get the number of tokens that\n * can be seized through liquidation, hypothetical account liquidity and shortfall of an account.\n */\ncontract ComptrollerLens is ComptrollerLensInterface, ComptrollerErrorReporter, ExponentialNoError {\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account liquidity.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountLiquidityLocalVars {\n uint sumCollateral;\n uint sumBorrowPlusEffects;\n uint vTokenBalance;\n uint borrowBalance;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Computes the number of collateral tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenBorrowed Address of the borrowed vToken\n * @param vTokenCollateral Address of collateral for the borrow\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateCalculateSeizeTokens(\n address comptroller,\n address vTokenBorrowed,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenBorrowed)\n );\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceBorrowedMantissa == 0 || priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the number of VAI tokens to be seized in a liquidation event\n * @param comptroller Address of comptroller\n * @param vTokenCollateral Address of collateral for vToken\n * @param actualRepayAmount Repayment amount i.e amount to be repaid of the total borrowed amount\n * @return A tuple of error code, and tokens to seize\n */\n function liquidateVAICalculateSeizeTokens(\n address comptroller,\n address vTokenCollateral,\n uint actualRepayAmount\n ) external view returns (uint, uint) {\n /* Read oracle prices for borrowed and collateral markets */\n uint priceBorrowedMantissa = 1e18; // Note: this is VAI\n uint priceCollateralMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(\n VToken(vTokenCollateral)\n );\n if (priceCollateralMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0);\n }\n\n /*\n * Get the exchange rate and calculate the number of collateral tokens to seize:\n * seizeAmount = actualRepayAmount * liquidationIncentive * priceBorrowed / priceCollateral\n * seizeTokens = seizeAmount / exchangeRate\n * = actualRepayAmount * (liquidationIncentive * priceBorrowed) / (priceCollateral * exchangeRate)\n */\n uint exchangeRateMantissa = VToken(vTokenCollateral).exchangeRateStored(); // Note: reverts on error\n uint seizeTokens;\n Exp memory numerator;\n Exp memory denominator;\n Exp memory ratio;\n\n numerator = mul_(\n Exp({ mantissa: ComptrollerInterface(comptroller).liquidationIncentiveMantissa() }),\n Exp({ mantissa: priceBorrowedMantissa })\n );\n denominator = mul_(Exp({ mantissa: priceCollateralMantissa }), Exp({ mantissa: exchangeRateMantissa }));\n ratio = div_(numerator, denominator);\n\n seizeTokens = mul_ScalarTruncate(ratio, actualRepayAmount);\n\n return (uint(Error.NO_ERROR), seizeTokens);\n }\n\n /**\n * @notice Computes the hypothetical liquidity and shortfall of an account given a hypothetical borrow\n * A snapshot of the account is taken and the total borrow amount of the account is calculated\n * @param comptroller Address of comptroller\n * @param account Address of the borrowed vToken\n * @param vTokenModify Address of collateral for vToken\n * @param redeemTokens Number of vTokens being redeemed\n * @param borrowAmount Amount borrowed\n * @return Returns a tuple of error code, liquidity, and shortfall\n */\n function getHypotheticalAccountLiquidity(\n address comptroller,\n address account,\n VToken vTokenModify,\n uint redeemTokens,\n uint borrowAmount\n ) external view returns (uint, uint, uint) {\n AccountLiquidityLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptroller).getAssetsIn(account);\n uint assetsCount = assets.length;\n for (uint i = 0; i < assetsCount; ++i) {\n VToken asset = assets[i];\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = asset.getAccountSnapshot(\n account\n );\n if (oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint(Error.SNAPSHOT_ERROR), 0, 0);\n }\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptroller).markets(address(asset));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptroller).oracle().getUnderlyingPrice(asset);\n if (vars.oraclePriceMantissa == 0) {\n return (uint(Error.PRICE_ERROR), 0, 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n // sumCollateral += tokensToDenom * vTokenBalance\n vars.sumCollateral = mul_ScalarTruncateAddUInt(vars.tokensToDenom, vars.vTokenBalance, vars.sumCollateral);\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n\n // Calculate effects of interacting with vTokenModify\n if (asset == vTokenModify) {\n // redeem effect\n // sumBorrowPlusEffects += tokensToDenom * redeemTokens\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.tokensToDenom,\n redeemTokens,\n vars.sumBorrowPlusEffects\n );\n\n // borrow effect\n // sumBorrowPlusEffects += oraclePrice * borrowAmount\n vars.sumBorrowPlusEffects = mul_ScalarTruncateAddUInt(\n vars.oraclePrice,\n borrowAmount,\n vars.sumBorrowPlusEffects\n );\n }\n }\n\n VAIControllerInterface vaiController = ComptrollerInterface(comptroller).vaiController();\n\n if (address(vaiController) != address(0)) {\n vars.sumBorrowPlusEffects = add_(vars.sumBorrowPlusEffects, vaiController.getVAIRepayAmount(account));\n }\n\n // These are safe, as the underflow condition is checked first\n if (vars.sumCollateral > vars.sumBorrowPlusEffects) {\n return (uint(Error.NO_ERROR), vars.sumCollateral - vars.sumBorrowPlusEffects, 0);\n } else {\n return (uint(Error.NO_ERROR), 0, vars.sumBorrowPlusEffects - vars.sumCollateral);\n }\n }\n}\n" + }, + "contracts/Lens/SnapshotLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport { VToken } from \"../Tokens/VTokens/VToken.sol\";\nimport { ExponentialNoError } from \"../Utils/ExponentialNoError.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SnapshotLens is ExponentialNoError {\n using SafeMath for uint256;\n\n struct AccountSnapshot {\n address account;\n string assetName;\n address vTokenAddress;\n address underlyingAssetAddress;\n uint256 supply;\n uint256 supplyInUsd;\n uint256 collateral;\n uint256 borrows;\n uint256 borrowsInUsd;\n uint256 assetPrice;\n uint256 accruedInterest;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint exchangeRate;\n bool isACollateral;\n }\n\n /** Snapshot calculation **/\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account snapshot.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountSnapshotLocalVars {\n uint collateral;\n uint vTokenBalance;\n uint borrowBalance;\n uint borrowsInUsd;\n uint balanceOfUnderlying;\n uint supplyInUsd;\n uint exchangeRateMantissa;\n uint oraclePriceMantissa;\n Exp collateralFactor;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n bool isACollateral;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress\n ) public returns (AccountSnapshot[] memory) {\n // For each asset the account is in\n VToken[] memory assets = ComptrollerInterface(comptrollerAddress).getAllMarkets();\n AccountSnapshot[] memory accountSnapshots = new AccountSnapshot[](assets.length);\n for (uint256 i = 0; i < assets.length; ++i) {\n accountSnapshots[i] = getAccountSnapshot(account, comptrollerAddress, assets[i]);\n }\n return accountSnapshots;\n }\n\n function isACollateral(address account, address asset, address comptrollerAddress) public view returns (bool) {\n VToken[] memory assetsAsCollateral = ComptrollerInterface(comptrollerAddress).getAssetsIn(account);\n for (uint256 j = 0; j < assetsAsCollateral.length; ++j) {\n if (address(assetsAsCollateral[j]) == asset) {\n return true;\n }\n }\n\n return false;\n }\n\n function getAccountSnapshot(\n address payable account,\n address comptrollerAddress,\n VToken vToken\n ) public returns (AccountSnapshot memory) {\n AccountSnapshotLocalVars memory vars; // Holds all our calculation results\n uint oErr;\n\n // Read the balances and exchange rate from the vToken\n (oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = vToken.getAccountSnapshot(account);\n require(oErr == 0, \"Snapshot Error\");\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n (, uint collateralFactorMantissa) = ComptrollerInterface(comptrollerAddress).markets(address(vToken));\n vars.collateralFactor = Exp({ mantissa: collateralFactorMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = ComptrollerInterface(comptrollerAddress).oracle().getUnderlyingPrice(vToken);\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n // Pre-compute a conversion factor from tokens -> bnb (normalized price value)\n vars.tokensToDenom = mul_(mul_(vars.collateralFactor, vars.exchangeRate), vars.oraclePrice);\n\n //Collateral = tokensToDenom * vTokenBalance\n vars.collateral = mul_ScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n\n vars.balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n vars.supplyInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.balanceOfUnderlying);\n\n vars.borrowsInUsd = mul_ScalarTruncate(vars.oraclePrice, vars.borrowBalance);\n\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n vars.isACollateral = isACollateral(account, address(vToken), comptrollerAddress);\n\n return\n AccountSnapshot({\n account: account,\n assetName: vToken.name(),\n vTokenAddress: address(vToken),\n underlyingAssetAddress: underlyingAssetAddress,\n supply: vars.balanceOfUnderlying,\n supplyInUsd: vars.supplyInUsd,\n collateral: vars.collateral,\n borrows: vars.borrowBalance,\n borrowsInUsd: vars.borrowsInUsd,\n assetPrice: vars.oraclePriceMantissa,\n accruedInterest: vToken.borrowIndex(),\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n exchangeRate: vToken.exchangeRateCurrent(),\n isACollateral: vars.isACollateral\n });\n }\n\n // utilities\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Lens/VenusLens.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Tokens/VTokens/VBep20.sol\";\nimport \"../Tokens/VTokens/VToken.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/EIP20Interface.sol\";\nimport \"../Tokens/XVS/XVS.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\nimport \"../Utils/SafeMath.sol\";\nimport { ComptrollerTypes } from \"../Comptroller/ComptrollerStorage.sol\";\n\ncontract VenusLens is ExponentialNoError {\n using SafeMath for uint;\n\n /// @notice Blocks Per Day\n uint public constant BLOCKS_PER_DAY = 28800;\n\n /// @notice Total actions available on VToken\n uint public constant VTOKEN_ACTIONS = 8;\n\n struct VenusMarketState {\n uint224 index;\n uint32 block;\n }\n\n struct VTokenMetadata {\n address vToken;\n uint exchangeRateCurrent;\n uint supplyRatePerBlock;\n uint borrowRatePerBlock;\n uint reserveFactorMantissa;\n uint totalBorrows;\n uint totalReserves;\n uint totalSupply;\n uint totalCash;\n bool isListed;\n uint collateralFactorMantissa;\n address underlyingAssetAddress;\n uint vTokenDecimals;\n uint underlyingDecimals;\n uint venusSupplySpeed;\n uint venusBorrowSpeed;\n uint dailySupplyXvs;\n uint dailyBorrowXvs;\n uint pausedActions;\n }\n\n struct VTokenBalances {\n address vToken;\n uint balanceOf;\n uint borrowBalanceCurrent;\n uint balanceOfUnderlying;\n uint tokenBalance;\n uint tokenAllowance;\n }\n\n struct VTokenUnderlyingPrice {\n address vToken;\n uint underlyingPrice;\n }\n\n struct AccountLimits {\n VToken[] markets;\n uint liquidity;\n uint shortfall;\n }\n\n struct XVSBalanceMetadata {\n uint balance;\n uint votes;\n address delegate;\n }\n\n struct XVSBalanceMetadataExt {\n uint balance;\n uint votes;\n address delegate;\n uint allocated;\n }\n\n struct VenusVotes {\n uint blockNumber;\n uint votes;\n }\n\n struct ClaimVenusLocalVariables {\n uint totalRewards;\n uint224 borrowIndex;\n uint32 borrowBlock;\n uint224 supplyIndex;\n uint32 supplyBlock;\n }\n\n /**\n * @dev Struct for Pending Rewards for per market\n */\n struct PendingReward {\n address vTokenAddress;\n uint256 amount;\n }\n\n /**\n * @dev Struct for Reward of a single reward token.\n */\n struct RewardSummary {\n address distributorAddress;\n address rewardTokenAddress;\n uint256 totalRewards;\n PendingReward[] pendingRewards;\n }\n\n /**\n * @notice Query the metadata of a vToken by its address\n * @param vToken The address of the vToken to fetch VTokenMetadata\n * @return VTokenMetadata struct with vToken supply and borrow information.\n */\n function vTokenMetadata(VToken vToken) public returns (VTokenMetadata memory) {\n uint exchangeRateCurrent = vToken.exchangeRateCurrent();\n address comptrollerAddress = address(vToken.comptroller());\n ComptrollerInterface comptroller = ComptrollerInterface(comptrollerAddress);\n (bool isListed, uint collateralFactorMantissa) = comptroller.markets(address(vToken));\n address underlyingAssetAddress;\n uint underlyingDecimals;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n underlyingAssetAddress = address(0);\n underlyingDecimals = 18;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n underlyingAssetAddress = vBep20.underlying();\n underlyingDecimals = EIP20Interface(vBep20.underlying()).decimals();\n }\n\n uint venusSupplySpeedPerBlock = comptroller.venusSupplySpeeds(address(vToken));\n uint venusBorrowSpeedPerBlock = comptroller.venusBorrowSpeeds(address(vToken));\n\n uint256 pausedActions;\n\n for (uint8 i; i <= VTOKEN_ACTIONS; ++i) {\n uint256 paused = comptroller.actionPaused(address(vToken), ComptrollerTypes.Action(i)) ? 1 : 0;\n pausedActions |= paused << i;\n }\n\n return\n VTokenMetadata({\n vToken: address(vToken),\n exchangeRateCurrent: exchangeRateCurrent,\n supplyRatePerBlock: vToken.supplyRatePerBlock(),\n borrowRatePerBlock: vToken.borrowRatePerBlock(),\n reserveFactorMantissa: vToken.reserveFactorMantissa(),\n totalBorrows: vToken.totalBorrows(),\n totalReserves: vToken.totalReserves(),\n totalSupply: vToken.totalSupply(),\n totalCash: vToken.getCash(),\n isListed: isListed,\n collateralFactorMantissa: collateralFactorMantissa,\n underlyingAssetAddress: underlyingAssetAddress,\n vTokenDecimals: vToken.decimals(),\n underlyingDecimals: underlyingDecimals,\n venusSupplySpeed: venusSupplySpeedPerBlock,\n venusBorrowSpeed: venusBorrowSpeedPerBlock,\n dailySupplyXvs: venusSupplySpeedPerBlock.mul(BLOCKS_PER_DAY),\n dailyBorrowXvs: venusBorrowSpeedPerBlock.mul(BLOCKS_PER_DAY),\n pausedActions: pausedActions\n });\n }\n\n /**\n * @notice Get VTokenMetadata for an array of vToken addresses\n * @param vTokens Array of vToken addresses to fetch VTokenMetadata\n * @return Array of structs with vToken supply and borrow information.\n */\n function vTokenMetadataAll(VToken[] calldata vTokens) external returns (VTokenMetadata[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenMetadata[] memory res = new VTokenMetadata[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenMetadata(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Get amount of XVS distributed daily to an account\n * @param account Address of account to fetch the daily XVS distribution\n * @param comptrollerAddress Address of the comptroller proxy\n * @return Amount of XVS distributed daily to an account\n */\n function getDailyXVS(address payable account, address comptrollerAddress) external returns (uint) {\n ComptrollerInterface comptrollerInstance = ComptrollerInterface(comptrollerAddress);\n VToken[] memory vTokens = comptrollerInstance.getAllMarkets();\n uint dailyXvsPerAccount = 0;\n\n for (uint i = 0; i < vTokens.length; i++) {\n VToken vToken = vTokens[i];\n if (!compareStrings(vToken.symbol(), \"vUST\") && !compareStrings(vToken.symbol(), \"vLUNA\")) {\n VTokenMetadata memory metaDataItem = vTokenMetadata(vToken);\n\n //get balanceOfUnderlying and borrowBalanceCurrent from vTokenBalance\n VTokenBalances memory vTokenBalanceInfo = vTokenBalances(vToken, account);\n\n VTokenUnderlyingPrice memory underlyingPriceResponse = vTokenUnderlyingPrice(vToken);\n uint underlyingPrice = underlyingPriceResponse.underlyingPrice;\n Exp memory underlyingPriceMantissa = Exp({ mantissa: underlyingPrice });\n\n //get dailyXvsSupplyMarket\n uint dailyXvsSupplyMarket = 0;\n uint supplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.balanceOfUnderlying);\n uint marketTotalSupply = (metaDataItem.totalSupply.mul(metaDataItem.exchangeRateCurrent)).div(1e18);\n uint marketTotalSupplyInUsd = mul_ScalarTruncate(underlyingPriceMantissa, marketTotalSupply);\n\n if (marketTotalSupplyInUsd > 0) {\n dailyXvsSupplyMarket = (metaDataItem.dailySupplyXvs.mul(supplyInUsd)).div(marketTotalSupplyInUsd);\n }\n\n //get dailyXvsBorrowMarket\n uint dailyXvsBorrowMarket = 0;\n uint borrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, vTokenBalanceInfo.borrowBalanceCurrent);\n uint marketTotalBorrowsInUsd = mul_ScalarTruncate(underlyingPriceMantissa, metaDataItem.totalBorrows);\n\n if (marketTotalBorrowsInUsd > 0) {\n dailyXvsBorrowMarket = (metaDataItem.dailyBorrowXvs.mul(borrowsInUsd)).div(marketTotalBorrowsInUsd);\n }\n\n dailyXvsPerAccount += dailyXvsSupplyMarket + dailyXvsBorrowMarket;\n }\n }\n\n return dailyXvsPerAccount;\n }\n\n /**\n * @notice Get the current vToken balance (outstanding borrows) for an account\n * @param vToken Address of the token to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances with token balance information\n */\n function vTokenBalances(VToken vToken, address payable account) public returns (VTokenBalances memory) {\n uint balanceOf = vToken.balanceOf(account);\n uint borrowBalanceCurrent = vToken.borrowBalanceCurrent(account);\n uint balanceOfUnderlying = vToken.balanceOfUnderlying(account);\n uint tokenBalance;\n uint tokenAllowance;\n\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n tokenBalance = account.balance;\n tokenAllowance = account.balance;\n } else {\n VBep20 vBep20 = VBep20(address(vToken));\n EIP20Interface underlying = EIP20Interface(vBep20.underlying());\n tokenBalance = underlying.balanceOf(account);\n tokenAllowance = underlying.allowance(account, address(vToken));\n }\n\n return\n VTokenBalances({\n vToken: address(vToken),\n balanceOf: balanceOf,\n borrowBalanceCurrent: borrowBalanceCurrent,\n balanceOfUnderlying: balanceOfUnderlying,\n tokenBalance: tokenBalance,\n tokenAllowance: tokenAllowance\n });\n }\n\n /**\n * @notice Get the current vToken balances (outstanding borrows) for all vTokens on an account\n * @param vTokens Addresses of the tokens to check the balance of\n * @param account Account address to fetch the balance of\n * @return VTokenBalances Array with token balance information\n */\n function vTokenBalancesAll(\n VToken[] calldata vTokens,\n address payable account\n ) external returns (VTokenBalances[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenBalances[] memory res = new VTokenBalances[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenBalances(vTokens[i], account);\n }\n return res;\n }\n\n /**\n * @notice Get the price for the underlying asset of a vToken\n * @param vToken address of the vToken\n * @return response struct with underlyingPrice info of vToken\n */\n function vTokenUnderlyingPrice(VToken vToken) public view returns (VTokenUnderlyingPrice memory) {\n ComptrollerInterface comptroller = ComptrollerInterface(address(vToken.comptroller()));\n PriceOracle priceOracle = comptroller.oracle();\n\n return\n VTokenUnderlyingPrice({ vToken: address(vToken), underlyingPrice: priceOracle.getUnderlyingPrice(vToken) });\n }\n\n /**\n * @notice Query the underlyingPrice of an array of vTokens\n * @param vTokens Array of vToken addresses\n * @return array of response structs with underlying price information of vTokens\n */\n function vTokenUnderlyingPriceAll(\n VToken[] calldata vTokens\n ) external view returns (VTokenUnderlyingPrice[] memory) {\n uint vTokenCount = vTokens.length;\n VTokenUnderlyingPrice[] memory res = new VTokenUnderlyingPrice[](vTokenCount);\n for (uint i = 0; i < vTokenCount; i++) {\n res[i] = vTokenUnderlyingPrice(vTokens[i]);\n }\n return res;\n }\n\n /**\n * @notice Query the account liquidity and shortfall of an account\n * @param comptroller Address of comptroller proxy\n * @param account Address of the account to query\n * @return Struct with markets user has entered, liquidity, and shortfall of the account\n */\n function getAccountLimits(\n ComptrollerInterface comptroller,\n address account\n ) public view returns (AccountLimits memory) {\n (uint errorCode, uint liquidity, uint shortfall) = comptroller.getAccountLiquidity(account);\n require(errorCode == 0, \"account liquidity error\");\n\n return AccountLimits({ markets: comptroller.getAssetsIn(account), liquidity: liquidity, shortfall: shortfall });\n }\n\n /**\n * @notice Query the XVSBalance info of an account\n * @param xvs XVS contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details\n */\n function getXVSBalanceMetadata(XVS xvs, address account) external view returns (XVSBalanceMetadata memory) {\n return\n XVSBalanceMetadata({\n balance: xvs.balanceOf(account),\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account)\n });\n }\n\n /**\n * @notice Query the XVSBalance extended info of an account\n * @param xvs XVS contract address\n * @param comptroller Comptroller proxy contract address\n * @param account Account address\n * @return Struct with XVS balance and voter details and XVS allocation\n */\n function getXVSBalanceMetadataExt(\n XVS xvs,\n ComptrollerInterface comptroller,\n address account\n ) external returns (XVSBalanceMetadataExt memory) {\n uint balance = xvs.balanceOf(account);\n comptroller.claimVenus(account);\n uint newBalance = xvs.balanceOf(account);\n uint accrued = comptroller.venusAccrued(account);\n uint total = add_(accrued, newBalance, \"sum xvs total\");\n uint allocated = sub_(total, balance, \"sub allocated\");\n\n return\n XVSBalanceMetadataExt({\n balance: balance,\n votes: uint256(xvs.getCurrentVotes(account)),\n delegate: xvs.delegates(account),\n allocated: allocated\n });\n }\n\n /**\n * @notice Query the voting power for an account at a specific list of block numbers\n * @param xvs XVS contract address\n * @param account Address of the account\n * @param blockNumbers Array of blocks to query\n * @return Array of VenusVotes structs with block number and vote count\n */\n function getVenusVotes(\n XVS xvs,\n address account,\n uint32[] calldata blockNumbers\n ) external view returns (VenusVotes[] memory) {\n VenusVotes[] memory res = new VenusVotes[](blockNumbers.length);\n for (uint i = 0; i < blockNumbers.length; i++) {\n res[i] = VenusVotes({\n blockNumber: uint256(blockNumbers[i]),\n votes: uint256(xvs.getPriorVotes(account, blockNumbers[i]))\n });\n }\n return res;\n }\n\n /**\n * @dev Queries the current supply to calculate rewards for an account\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusSupplyIndex(\n VenusMarketState memory supplyState,\n address vToken,\n ComptrollerInterface comptroller\n ) internal view {\n uint supplySpeed = comptroller.venusSupplySpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(supplyState.block));\n if (deltaBlocks > 0 && supplySpeed > 0) {\n uint supplyTokens = VToken(vToken).totalSupply();\n uint venusAccrued = mul_(deltaBlocks, supplySpeed);\n Double memory ratio = supplyTokens > 0 ? fraction(venusAccrued, supplyTokens) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: supplyState.index }), ratio);\n supplyState.index = safe224(index.mantissa, \"new index overflows\");\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n supplyState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Queries the current borrow to calculate rewards for an account\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param comptroller Address of the comptroller proxy\n */\n function updateVenusBorrowIndex(\n VenusMarketState memory borrowState,\n address vToken,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view {\n uint borrowSpeed = comptroller.venusBorrowSpeeds(vToken);\n uint blockNumber = block.number;\n uint deltaBlocks = sub_(blockNumber, uint(borrowState.block));\n if (deltaBlocks > 0 && borrowSpeed > 0) {\n uint borrowAmount = div_(VToken(vToken).totalBorrows(), marketBorrowIndex);\n uint venusAccrued = mul_(deltaBlocks, borrowSpeed);\n Double memory ratio = borrowAmount > 0 ? fraction(venusAccrued, borrowAmount) : Double({ mantissa: 0 });\n Double memory index = add_(Double({ mantissa: borrowState.index }), ratio);\n borrowState.index = safe224(index.mantissa, \"new index overflows\");\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n } else if (deltaBlocks > 0) {\n borrowState.block = safe32(blockNumber, \"block number overflows\");\n }\n }\n\n /**\n * @dev Calculate available rewards for an account's supply\n * @param supplyState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param supplier Address of the account supplying\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from supplies\n */\n function distributeSupplierVenus(\n VenusMarketState memory supplyState,\n address vToken,\n address supplier,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory supplyIndex = Double({ mantissa: supplyState.index });\n Double memory supplierIndex = Double({ mantissa: comptroller.venusSupplierIndex(vToken, supplier) });\n if (supplierIndex.mantissa == 0 && supplyIndex.mantissa > 0) {\n supplierIndex.mantissa = comptroller.venusInitialIndex();\n }\n\n Double memory deltaIndex = sub_(supplyIndex, supplierIndex);\n uint supplierTokens = VToken(vToken).balanceOf(supplier);\n uint supplierDelta = mul_(supplierTokens, deltaIndex);\n return supplierDelta;\n }\n\n /**\n * @dev Calculate available rewards for an account's borrows\n * @param borrowState VenusMarketState struct\n * @param vToken Address of a vToken\n * @param borrower Address of the account borrowing\n * @param marketBorrowIndex vToken Borrow index\n * @param comptroller Address of the comptroller proxy\n * @return Undistributed earned XVS from borrows\n */\n function distributeBorrowerVenus(\n VenusMarketState memory borrowState,\n address vToken,\n address borrower,\n Exp memory marketBorrowIndex,\n ComptrollerInterface comptroller\n ) internal view returns (uint) {\n Double memory borrowIndex = Double({ mantissa: borrowState.index });\n Double memory borrowerIndex = Double({ mantissa: comptroller.venusBorrowerIndex(vToken, borrower) });\n if (borrowerIndex.mantissa > 0) {\n Double memory deltaIndex = sub_(borrowIndex, borrowerIndex);\n uint borrowerAmount = div_(VToken(vToken).borrowBalanceStored(borrower), marketBorrowIndex);\n uint borrowerDelta = mul_(borrowerAmount, deltaIndex);\n return borrowerDelta;\n }\n return 0;\n }\n\n /**\n * @notice Calculate the total XVS tokens pending and accrued by a user account\n * @param holder Account to query pending XVS\n * @param comptroller Address of the comptroller\n * @return Reward object contraining the totalRewards and pending rewards for each market\n */\n function pendingRewards(\n address holder,\n ComptrollerInterface comptroller\n ) external view returns (RewardSummary memory) {\n VToken[] memory vTokens = comptroller.getAllMarkets();\n ClaimVenusLocalVariables memory vars;\n RewardSummary memory rewardSummary;\n rewardSummary.distributorAddress = address(comptroller);\n rewardSummary.rewardTokenAddress = comptroller.getXVSAddress();\n rewardSummary.totalRewards = comptroller.venusAccrued(holder);\n rewardSummary.pendingRewards = new PendingReward[](vTokens.length);\n for (uint i; i < vTokens.length; ++i) {\n (vars.borrowIndex, vars.borrowBlock) = comptroller.venusBorrowState(address(vTokens[i]));\n VenusMarketState memory borrowState = VenusMarketState({\n index: vars.borrowIndex,\n block: vars.borrowBlock\n });\n\n (vars.supplyIndex, vars.supplyBlock) = comptroller.venusSupplyState(address(vTokens[i]));\n VenusMarketState memory supplyState = VenusMarketState({\n index: vars.supplyIndex,\n block: vars.supplyBlock\n });\n\n Exp memory borrowIndex = Exp({ mantissa: vTokens[i].borrowIndex() });\n\n PendingReward memory marketReward;\n marketReward.vTokenAddress = address(vTokens[i]);\n\n updateVenusBorrowIndex(borrowState, address(vTokens[i]), borrowIndex, comptroller);\n uint256 borrowReward = distributeBorrowerVenus(\n borrowState,\n address(vTokens[i]),\n holder,\n borrowIndex,\n comptroller\n );\n\n updateVenusSupplyIndex(supplyState, address(vTokens[i]), comptroller);\n uint256 supplyReward = distributeSupplierVenus(supplyState, address(vTokens[i]), holder, comptroller);\n\n marketReward.amount = add_(borrowReward, supplyReward);\n rewardSummary.pendingRewards[i] = marketReward;\n }\n return rewardSummary;\n }\n\n // utilities\n /**\n * @notice Compares if two strings are equal\n * @param a First string to compare\n * @param b Second string to compare\n * @return Boolean depending on if the strings are equal\n */\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/Oracle/PriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\ncontract PriceOracle {\n /// @notice Indicator that this is a PriceOracle contract (for inspection)\n bool public constant isPriceOracle = true;\n\n /**\n * @notice Get the underlying price of a vToken asset\n * @param vToken The vToken to get the underlying price of\n * @return The underlying asset price mantissa (scaled by 1e18).\n * Zero means the price is unavailable.\n */\n function getUnderlyingPrice(VToken vToken) external view returns (uint);\n}\n" + }, + "contracts/test/BEP20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\n// Mock import\nimport { GovernorBravoDelegate } from \"@venusprotocol/governance-contracts/contracts/Governance/GovernorBravoDelegate.sol\";\n\ninterface BEP20Base {\n event Approval(address indexed owner, address indexed spender, uint256 value);\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n function totalSupply() external view returns (uint256);\n\n function allowance(address owner, address spender) external view returns (uint256);\n\n function approve(address spender, uint256 value) external returns (bool);\n\n function balanceOf(address who) external view returns (uint256);\n}\n\ncontract BEP20 is BEP20Base {\n function transfer(address to, uint256 value) external returns (bool);\n\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n\ncontract BEP20NS is BEP20Base {\n function transfer(address to, uint256 value) external;\n\n function transferFrom(address from, address to, uint256 value) external;\n}\n\n/**\n * @title Standard BEP20 token\n * @dev Implementation of the basic standard token.\n * See https://github.com/ethereum/EIPs/issues/20\n */\ncontract StandardToken is BEP20 {\n using SafeMath for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\n/**\n * @title Non-Standard BEP20 token\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ncontract NonStandardToken is BEP20NS {\n using SafeMath for uint256;\n\n string public name;\n uint8 public decimals;\n string public symbol;\n uint256 public totalSupply;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public balanceOf;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public {\n totalSupply = _initialAmount;\n balanceOf[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n }\n\n function transfer(address dst, uint256 amount) external {\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n }\n\n function transferFrom(address src, address dst, uint256 amount) external {\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n }\n\n function approve(address _spender, uint256 amount) external returns (bool) {\n allowance[msg.sender][_spender] = amount;\n emit Approval(msg.sender, _spender, amount);\n return true;\n }\n}\n\ncontract BEP20Harness is StandardToken {\n // To support testing, we can specify addresses for which transferFrom should fail and return false\n mapping(address => bool) public failTransferFromAddresses;\n\n // To support testing, we allow the contract to always fail `transfer`.\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function harnessSetFailTransferFromAddress(address src, bool _fail) public {\n failTransferFromAddresses[src] = _fail;\n }\n\n function harnessSetFailTransferToAddress(address dst, bool _fail) public {\n failTransferToAddresses[dst] = _fail;\n }\n\n function harnessSetBalance(address _account, uint _amount) public {\n balanceOf[_account] = _amount;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferToAddresses[dst]) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success) {\n // Added for testing purposes\n if (failTransferFromAddresses[src]) {\n return false;\n }\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount, \"Insufficient allowance\");\n balanceOf[src] = balanceOf[src].sub(amount, \"Insufficient balance\");\n balanceOf[dst] = balanceOf[dst].add(amount, \"Balance overflow\");\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/ComptrollerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\ncontract ComptrollerHarness is ComptrollerMock {\n address internal xvsAddress;\n address internal vXVSAddress;\n uint public blockNumber;\n\n constructor() public ComptrollerMock() {}\n\n function setVenusSupplyState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusSupplyState[vToken].index = index;\n venusSupplyState[vToken].block = blockNumber_;\n }\n\n function setVenusBorrowState(address vToken, uint224 index, uint32 blockNumber_) public {\n venusBorrowState[vToken].index = index;\n venusBorrowState[vToken].block = blockNumber_;\n }\n\n function setVenusAccrued(address user, uint userAccrued) public {\n venusAccrued[user] = userAccrued;\n }\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n function setXVSVTokenAddress(address vXVSAddress_) public {\n vXVSAddress = vXVSAddress_;\n }\n\n /**\n * @notice Set the amount of XVS distributed per block\n * @param venusRate_ The amount of XVS wei per block to distribute\n */\n function harnessSetVenusRate(uint venusRate_) public {\n venusRate = venusRate_;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function harnessRefreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n\n function setVenusBorrowerIndex(address vToken, address borrower, uint index) public {\n venusBorrowerIndex[vToken][borrower] = index;\n }\n\n function setVenusSupplierIndex(address vToken, address supplier, uint index) public {\n venusSupplierIndex[vToken][supplier] = index;\n }\n\n function harnessDistributeAllBorrowerVenus(\n address vToken,\n address borrower,\n uint marketBorrowIndexMantissa\n ) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n venusAccrued[borrower] = grantXVSInternal(borrower, venusAccrued[borrower], 0, false);\n }\n\n function harnessDistributeAllSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n venusAccrued[supplier] = grantXVSInternal(supplier, venusAccrued[supplier], 0, false);\n }\n\n function harnessUpdateVenusBorrowIndex(address vToken, uint marketBorrowIndexMantissa) public {\n updateVenusBorrowIndex(vToken, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessUpdateVenusSupplyIndex(address vToken) public {\n updateVenusSupplyIndex(vToken);\n }\n\n function harnessDistributeBorrowerVenus(address vToken, address borrower, uint marketBorrowIndexMantissa) public {\n distributeBorrowerVenus(vToken, borrower, Exp({ mantissa: marketBorrowIndexMantissa }));\n }\n\n function harnessDistributeSupplierVenus(address vToken, address supplier) public {\n distributeSupplierVenus(vToken, supplier);\n }\n\n function harnessTransferVenus(address user, uint userAccrued, uint threshold) public returns (uint) {\n if (userAccrued > 0 && userAccrued >= threshold) {\n return grantXVSInternal(user, userAccrued, 0, false);\n }\n return userAccrued;\n }\n\n function harnessAddVenusMarkets(address[] memory vTokens) public {\n for (uint i = 0; i < vTokens.length; i++) {\n // temporarily set venusSpeed to 1 (will be fixed by `harnessRefreshVenusSpeeds`)\n setVenusSpeedInternal(VToken(vTokens[i]), 1, 1);\n }\n }\n\n function harnessSetMintedVAIs(address user, uint amount) public {\n mintedVAIs[user] = amount;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (venusSpeeds[address(allMarkets[i])] > 0) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function harnessSetReleaseStartBlock(uint startBlock) external {\n releaseStartBlock = startBlock;\n }\n\n function harnessAddVtoken(address vToken) external {\n markets[vToken] = Market({ isListed: true, isVenus: false, collateralFactorMantissa: 0 });\n }\n}\n\ncontract EchoTypesComptroller is UnitrollerAdminStorage {\n function stringy(string memory s) public pure returns (string memory) {\n return s;\n }\n\n function addresses(address a) public pure returns (address) {\n return a;\n }\n\n function booly(bool b) public pure returns (bool) {\n return b;\n }\n\n function listOInts(uint[] memory u) public pure returns (uint[] memory) {\n return u;\n }\n\n function reverty() public pure {\n require(false, \"gotcha sucka\");\n }\n\n function becomeBrains(address payable unitroller) public {\n Unitroller(unitroller)._acceptImplementation();\n }\n}\n" + }, + "contracts/test/ComptrollerMock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMock is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerMockR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Comptroller/Diamond/facets/MarketFacet.sol\";\nimport \"../Comptroller/Diamond/facets/PolicyFacet.sol\";\nimport \"../Comptroller/Diamond/facets/RewardFacet.sol\";\nimport \"../Comptroller/Diamond/facets/SetterFacet.sol\";\nimport \"../Comptroller/Unitroller.sol\";\n\n// This contract contains all methods of Comptroller implementation in different facets at one place for testing purpose\n// This contract does not have diamond functionality(i.e delegate call to facets methods)\ncontract ComptrollerMockR1 is MarketFacet, PolicyFacet, RewardFacet, SetterFacet {\n event MarketListed(address vToken);\n event NewCollateralFactor(address vToken, uint256 oldCollateralFactorMantissa, uint256 newCollateralFactorMantissa);\n event MarketEntered(address vToken, address account);\n event MarketExited(address vToken, address account);\n\n constructor() public {\n admin = msg.sender;\n }\n\n function _become(Unitroller unitroller) public {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can\");\n require(unitroller._acceptImplementation() == 0, \"not authorized\");\n }\n\n function _setComptrollerLens(ComptrollerLensInterface comptrollerLens_) external returns (uint) {\n ensureAdmin();\n ensureNonzeroAddress(address(comptrollerLens_));\n address oldComptrollerLens = address(comptrollerLens);\n comptrollerLens = comptrollerLens_;\n emit NewComptrollerLens(oldComptrollerLens, address(comptrollerLens));\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/ComptrollerScenario.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./ComptrollerMock.sol\";\n\ncontract ComptrollerScenario is ComptrollerMock {\n uint public blockNumber;\n address public xvsAddress;\n address public vaiAddress;\n\n constructor() public ComptrollerMock() {}\n\n function setXVSAddress(address xvsAddress_) public {\n xvsAddress = xvsAddress_;\n }\n\n // function getXVSAddress() public view returns (address) {\n // return xvsAddress;\n // }\n\n function setVAIAddress(address vaiAddress_) public {\n vaiAddress = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vaiAddress;\n }\n\n function membershipLength(VToken vToken) public view returns (uint) {\n return accountAssets[address(vToken)].length;\n }\n\n function fastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n\n return blockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getVenusMarkets() public view returns (address[] memory) {\n uint m = allMarkets.length;\n uint n = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n n++;\n }\n }\n\n address[] memory venusMarkets = new address[](n);\n uint k = 0;\n for (uint i = 0; i < m; i++) {\n if (markets[address(allMarkets[i])].isVenus) {\n venusMarkets[k++] = address(allMarkets[i]);\n }\n }\n return venusMarkets;\n }\n\n function unlist(VToken vToken) public {\n markets[address(vToken)].isListed = false;\n }\n\n /**\n * @notice Recalculate and update XVS speeds for all XVS markets\n */\n function refreshVenusSpeeds() public {\n VToken[] memory allMarkets_ = allMarkets;\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n Exp memory borrowIndex = Exp({ mantissa: vToken.borrowIndex() });\n updateVenusSupplyIndex(address(vToken));\n updateVenusBorrowIndex(address(vToken), borrowIndex);\n }\n\n Exp memory totalUtility = Exp({ mantissa: 0 });\n Exp[] memory utilities = new Exp[](allMarkets_.length);\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets_[i];\n if (venusSpeeds[address(vToken)] > 0) {\n Exp memory assetPrice = Exp({ mantissa: oracle.getUnderlyingPrice(vToken) });\n Exp memory utility = mul_(assetPrice, vToken.totalBorrows());\n utilities[i] = utility;\n totalUtility = add_(totalUtility, utility);\n }\n }\n\n for (uint i = 0; i < allMarkets_.length; i++) {\n VToken vToken = allMarkets[i];\n uint newSpeed = totalUtility.mantissa > 0 ? mul_(venusRate, div_(utilities[i], totalUtility)) : 0;\n setVenusSpeedInternal(vToken, newSpeed, newSpeed);\n }\n }\n}\n" + }, + "contracts/test/DiamondHarness.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Comptroller/Diamond/Diamond.sol\";\n\ncontract DiamondHarness is Diamond {\n function getFacetAddress(bytes4 sig) public view returns (address) {\n address facet = _selectorToFacetAndPosition[sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n return facet;\n }\n}\n" + }, + "contracts/test/EvilToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title The Venus Evil Test Token\n * @author Venus\n * @notice A simple test token that fails certain operations\n */\ncontract EvilToken is FaucetToken {\n bool public fail;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n fail = true;\n }\n\n function setFail(bool _fail) external {\n fail = _fail;\n }\n\n function transfer(address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n if (fail) {\n return false;\n }\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(amount);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/EvilXDelegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice VTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract EvilXDelegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint256 initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint256 mintAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint256 redeemTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint256 borrowAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint256, uint256, uint256, uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint256, uint256, uint256, uint256));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint256) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function seize(address liquidator, address borrower, uint256 seizeTokens) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint256));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setReserveFactor(uint256 newReserveFactorMantissa) external returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint256 addAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _reduceReserves(uint256 reduceAmount) external returns (uint256) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint256) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint256));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/test/EvilXToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\nimport \"../Comptroller/ComptrollerInterface.sol\";\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\n// doTransferOut method of this token supposed to be compromised and contians malicious code which\n// can be used by attacker to compromise the protocol working.\ncontract EvilXToken is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n event LogLiquidity(uint liquidity);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n address public comptrollerAddress;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function setComptrollerAddress(address _comptrollerAddress) external {\n comptrollerAddress = _comptrollerAddress;\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n super.doTransferOut(to, amount);\n\n // Checking the Liquidity of the user after the tranfer.\n // solhint-disable-next-line no-unused-vars\n (uint errorCode, uint liquidity, uint shortfall) = ComptrollerInterface(comptrollerAddress).getAccountLiquidity(\n msg.sender\n );\n emit LogLiquidity(liquidity);\n return;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n" + }, + "contracts/test/Fauceteer.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/EIP20NonStandardInterface.sol\";\n\n/**\n * @title Fauceteer\n * @author Venus\n * @notice First computer program to be part of The Giving Pledge\n */\ncontract Fauceteer {\n /**\n * @notice Drips some tokens to caller\n * @dev We send 0.01% of our tokens to the caller. Over time, the amount will tend toward and eventually reach zero.\n * @param token The token to drip. Note: if we have no balance in this token, function will revert.\n */\n function drip(EIP20NonStandardInterface token) public {\n uint tokenBalance = token.balanceOf(address(this));\n require(tokenBalance > 0, \"Fauceteer is empty\");\n token.transfer(msg.sender, tokenBalance / 10000); // 0.01%\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n\n require(success, \"Transfer returned false.\");\n }\n}\n" + }, + "contracts/test/FaucetToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./BEP20.sol\";\n\n/**\n * @title The Venus Faucet Test Token\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetToken is StandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public StandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Test Token (non-standard)\n * @author Venus\n * @notice A simple test token that lets anyone get more of it.\n */\ncontract FaucetNonStandardToken is NonStandardToken {\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol\n ) public NonStandardToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {}\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n\n/**\n * @title The Venus Faucet Re-Entrant Test Token\n * @author Venus\n * @notice A test token that is malicious and tries to re-enter callers\n */\ncontract FaucetTokenReEntrantHarness {\n using SafeMath for uint256;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 internal totalSupply_;\n mapping(address => mapping(address => uint256)) internal allowance_;\n mapping(address => uint256) internal balanceOf_;\n\n bytes public reEntryCallData;\n string public reEntryFun;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n bytes memory _reEntryCallData,\n string memory _reEntryFun\n ) public {\n totalSupply_ = _initialAmount;\n balanceOf_[msg.sender] = _initialAmount;\n name = _tokenName;\n symbol = _tokenSymbol;\n decimals = _decimalUnits;\n reEntryCallData = _reEntryCallData;\n reEntryFun = _reEntryFun;\n }\n\n modifier reEnter(string memory funName) {\n string memory _reEntryFun = reEntryFun;\n if (compareStrings(_reEntryFun, funName)) {\n reEntryFun = \"\"; // Clear re-entry fun\n (bool success, bytes memory returndata) = msg.sender.call(reEntryCallData);\n assembly {\n if eq(success, 0) {\n revert(add(returndata, 0x20), returndatasize())\n }\n }\n }\n\n _;\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)));\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf_[_owner] += value;\n totalSupply_ += value;\n emit Transfer(address(this), _owner, value);\n }\n\n function totalSupply() public reEnter(\"totalSupply\") returns (uint256) {\n return totalSupply_;\n }\n\n function allowance(address owner, address spender) public reEnter(\"allowance\") returns (uint256 remaining) {\n return allowance_[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public reEnter(\"approve\") returns (bool success) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function balanceOf(address owner) public reEnter(\"balanceOf\") returns (uint256 balance) {\n return balanceOf_[owner];\n }\n\n function transfer(address dst, uint256 amount) public reEnter(\"transfer\") returns (bool success) {\n _transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(\n address src,\n address dst,\n uint256 amount\n ) public reEnter(\"transferFrom\") returns (bool success) {\n _transfer(src, dst, amount);\n _approve(src, msg.sender, allowance_[src][msg.sender].sub(amount));\n return true;\n }\n\n function _approve(address owner, address spender, uint256 amount) internal {\n require(spender != address(0), \"sender should be valid address\");\n require(owner != address(0), \"owner should be valid address\");\n allowance_[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address src, address dst, uint256 amount) internal {\n require(dst != address(0), \"dst should be valid address\");\n balanceOf_[src] = balanceOf_[src].sub(amount);\n balanceOf_[dst] = balanceOf_[dst].add(amount);\n emit Transfer(src, dst, amount);\n }\n}\n" + }, + "contracts/test/FeeToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./FaucetToken.sol\";\n\n/**\n * @title Fee Token\n * @author Venus\n * @notice A simple test token that charges fees on transfer. Used to mock USDT.\n */\ncontract FeeToken is FaucetToken {\n uint public basisPointFee;\n address public owner;\n\n constructor(\n uint256 _initialAmount,\n string memory _tokenName,\n uint8 _decimalUnits,\n string memory _tokenSymbol,\n uint _basisPointFee,\n address _owner\n ) public FaucetToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol) {\n basisPointFee = _basisPointFee;\n owner = _owner;\n }\n\n function transfer(address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n emit Transfer(msg.sender, dst, amount);\n return true;\n }\n\n function transferFrom(address src, address dst, uint amount) public returns (bool) {\n uint fee = amount.mul(basisPointFee).div(10000);\n uint net = amount.sub(fee);\n balanceOf[owner] = balanceOf[owner].add(fee);\n balanceOf[src] = balanceOf[src].sub(amount);\n balanceOf[dst] = balanceOf[dst].add(net);\n allowance[src][msg.sender] = allowance[src][msg.sender].sub(amount);\n emit Transfer(src, dst, amount);\n return true;\n }\n}\n" + }, + "contracts/test/FixedPriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\n\ncontract FixedPriceOracle is PriceOracle {\n uint public price;\n\n constructor(uint _price) public {\n price = _price;\n }\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n vToken;\n return price;\n }\n\n function assetPrices(address asset) public view returns (uint) {\n asset;\n return price;\n }\n}\n" + }, + "contracts/test/InterestRateModelHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../InterestRateModels/InterestRateModel.sol\";\n\n/**\n * @title An Interest Rate Model for tests that can be instructed to return a failure instead of doing a calculation\n * @author Venus\n */\ncontract InterestRateModelHarness is InterestRateModel {\n uint public constant opaqueBorrowFailureCode = 20;\n bool public failBorrowRate;\n uint public borrowRate;\n\n constructor(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function setFailBorrowRate(bool failBorrowRate_) public {\n failBorrowRate = failBorrowRate_;\n }\n\n function setBorrowRate(uint borrowRate_) public {\n borrowRate = borrowRate_;\n }\n\n function getBorrowRate(uint _cash, uint _borrows, uint _reserves) public view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n require(!failBorrowRate, \"INTEREST_RATE_MODEL_ERROR\");\n return borrowRate;\n }\n\n function getSupplyRate(\n uint _cash,\n uint _borrows,\n uint _reserves,\n uint _reserveFactor\n ) external view returns (uint) {\n _cash; // unused\n _borrows; // unused\n _reserves; // unused\n return borrowRate * (1 - _reserveFactor);\n }\n}\n" + }, + "contracts/test/MockDeflationaryToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\n\ncontract DeflatingERC20 {\n using SafeMath for uint;\n\n string public constant name = \"Deflating Test Token\";\n string public constant symbol = \"DTT\";\n uint8 public constant decimals = 18;\n uint public totalSupply;\n mapping(address => uint) public balanceOf;\n mapping(address => mapping(address => uint)) public allowance;\n\n bytes32 public DOMAIN_SEPARATOR;\n // keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;\n mapping(address => uint) public nonces;\n\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n constructor(uint _totalSupply) public {\n uint chainId;\n assembly {\n chainId := chainid()\n }\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(\"1\")),\n chainId,\n address(this)\n )\n );\n _mint(msg.sender, _totalSupply);\n }\n\n function _mint(address to, uint value) internal {\n totalSupply = totalSupply.add(value);\n balanceOf[to] = balanceOf[to].add(value);\n emit Transfer(address(0), to, value);\n }\n\n function _burn(address from, uint value) internal {\n balanceOf[from] = balanceOf[from].sub(value);\n totalSupply = totalSupply.sub(value);\n emit Transfer(from, address(0), value);\n }\n\n function _approve(address owner, address spender, uint value) private {\n allowance[owner][spender] = value;\n emit Approval(owner, spender, value);\n }\n\n function _transfer(address from, address to, uint value) private {\n uint burnAmount = value / 100;\n _burn(from, burnAmount);\n uint transferAmount = value.sub(burnAmount);\n balanceOf[from] = balanceOf[from].sub(transferAmount);\n balanceOf[to] = balanceOf[to].add(transferAmount);\n emit Transfer(from, to, transferAmount);\n }\n\n function approve(address spender, uint value) external returns (bool) {\n _approve(msg.sender, spender, value);\n return true;\n }\n\n function transfer(address to, uint value) external returns (bool) {\n _transfer(msg.sender, to, value);\n return true;\n }\n\n function transferFrom(address from, address to, uint value) external returns (bool) {\n if (allowance[from][msg.sender] != uint(-1)) {\n allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);\n }\n _transfer(from, to, value);\n return true;\n }\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {\n require(deadline >= block.timestamp, \"EXPIRED\");\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))\n )\n );\n address recoveredAddress = ecrecover(digest, v, r, s);\n require(recoveredAddress != address(0) && recoveredAddress == owner, \"INVALID_SIGNATURE\");\n _approve(owner, spender, value);\n }\n}\n" + }, + "contracts/test/MockVBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract MockVBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n function setTotalReserves(uint totalReserves_) external payable {\n totalReserves = totalReserves_;\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n\n /**\n * @dev Function to simply retrieve block number\n * This exists mainly for inheriting test contracts to stub this result.\n */\n function getBlockNumber() internal view returns (uint) {\n return block.number;\n }\n\n /**\n * @notice Reduces reserves by transferring to admin\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n // totalReserves - reduceAmount\n uint totalReservesNew;\n\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != getBlockNumber()) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(admin, reduceAmount);\n\n emit ReservesReduced(admin, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount) external nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount);\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = getBlockNumber();\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n require(mathErr == MathError.NO_ERROR, \"could not calculate block delta\");\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n}\n" + }, + "contracts/test/SimplePriceOracle.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Oracle/PriceOracle.sol\";\nimport \"../Tokens/VTokens/VBep20.sol\";\n\ncontract SimplePriceOracle is PriceOracle {\n mapping(address => uint) internal prices;\n event PricePosted(address asset, uint previousPriceMantissa, uint requestedPriceMantissa, uint newPriceMantissa);\n\n function getUnderlyingPrice(VToken vToken) public view returns (uint) {\n if (compareStrings(vToken.symbol(), \"vBNB\")) {\n return 1e18;\n } else if (compareStrings(vToken.symbol(), \"VAI\")) {\n return prices[address(vToken)];\n } else {\n return prices[address(VBep20(address(vToken)).underlying())];\n }\n }\n\n function setUnderlyingPrice(VToken vToken, uint underlyingPriceMantissa) public {\n address asset = address(VBep20(address(vToken)).underlying());\n emit PricePosted(asset, prices[asset], underlyingPriceMantissa, underlyingPriceMantissa);\n prices[asset] = underlyingPriceMantissa;\n }\n\n function setDirectPrice(address asset, uint price) public {\n emit PricePosted(asset, prices[asset], price, price);\n prices[asset] = price;\n }\n\n // v1 price oracle interface for use as backing of proxy\n function assetPrices(address asset) external view returns (uint) {\n return prices[asset];\n }\n\n function compareStrings(string memory a, string memory b) internal pure returns (bool) {\n return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));\n }\n}\n" + }, + "contracts/test/VAIControllerHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAIController.sol\";\n\ncontract VAIControllerHarness is VAIController {\n uint public blockNumber;\n uint public blocksPerYear;\n\n constructor() public VAIController() {\n admin = msg.sender;\n }\n\n function setVenusVAIState(uint224 index, uint32 blockNumber_) public {\n venusVAIState.index = index;\n venusVAIState.block = blockNumber_;\n }\n\n function setVAIAddress(address vaiAddress_) public {\n vai = vaiAddress_;\n }\n\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n function harnessRepayVAIFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayVAIFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateVAIFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateVAIFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessFastForward(uint blocks) public returns (uint) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function setBlockNumber(uint number) public {\n blockNumber = number;\n }\n\n function setBlocksPerYear(uint number) public {\n blocksPerYear = number;\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBlocksPerYear() public view returns (uint) {\n return blocksPerYear;\n }\n}\n" + }, + "contracts/test/VAIHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VAI/VAI.sol\";\n\ncontract VAIScenario is VAI {\n uint internal blockNumber = 100000;\n\n constructor(uint chainId) public VAI(chainId) {}\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetTotalSupply(uint _totalSupply) public {\n totalSupply = _totalSupply;\n }\n\n function harnessIncrementTotalSupply(uint addtlSupply_) public {\n totalSupply = totalSupply + addtlSupply_;\n }\n\n function harnessSetBalanceOf(address account, uint _amount) public {\n balanceOf[account] = _amount;\n }\n\n function allocateTo(address _owner, uint256 value) public {\n balanceOf[_owner] += value;\n totalSupply += value;\n emit Transfer(address(this), _owner, value);\n }\n}\n" + }, + "contracts/test/VBep20Harness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VBep20Immutable.sol\";\nimport \"../Tokens/VTokens/VBep20Delegator.sol\";\nimport \"../Tokens/VTokens/VBep20Delegate.sol\";\nimport \"./ComptrollerScenario.sol\";\n\ncontract VBep20Harness is VBep20Immutable {\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20Scenario is VBep20Immutable {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Immutable(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VEvil is VBep20Scenario {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n )\n public\n VBep20Scenario(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_\n )\n {}\n\n function evilSeize(VToken treasure, address liquidator, address borrower, uint seizeTokens) public returns (uint) {\n return treasure.seize(liquidator, borrower, seizeTokens);\n }\n}\n\ncontract VBep20DelegatorScenario is VBep20Delegator {\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n )\n public\n VBep20Delegator(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_,\n admin_,\n implementation_,\n becomeImplementationData\n )\n {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n}\n\ncontract VBep20DelegateHarness is VBep20Delegate {\n event Log(string x, address y);\n event Log(string x, uint y);\n\n uint internal blockNumber = 100000;\n uint internal harnessExchangeRate;\n bool internal harnessExchangeRateStored;\n\n mapping(address => bool) public failTransferToAddresses;\n\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n if (harnessExchangeRateStored) {\n return (MathError.NO_ERROR, harnessExchangeRate);\n }\n return super.exchangeRateStoredInternal();\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n require(failTransferToAddresses[to] == false, \"TOKEN_TRANSFER_OUT_FAILED\");\n return super.doTransferOut(to, amount);\n }\n\n function getBlockNumber() internal view returns (uint) {\n return blockNumber;\n }\n\n function getBorrowRateMaxMantissa() public pure returns (uint) {\n return borrowRateMaxMantissa;\n }\n\n function harnessSetBlockNumber(uint newBlockNumber) public {\n blockNumber = newBlockNumber;\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n function harnessSetBalance(address account, uint amount) external {\n accountTokens[account] = amount;\n }\n\n function harnessSetAccrualBlockNumber(uint _accrualblockNumber) public {\n accrualBlockNumber = _accrualblockNumber;\n }\n\n function harnessSetTotalSupply(uint totalSupply_) public {\n totalSupply = totalSupply_;\n }\n\n function harnessSetTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function harnessIncrementTotalBorrows(uint addtlBorrow_) public {\n totalBorrows = totalBorrows + addtlBorrow_;\n }\n\n function harnessSetTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function harnessExchangeRateDetails(uint totalSupply_, uint totalBorrows_, uint totalReserves_) public {\n totalSupply = totalSupply_;\n totalBorrows = totalBorrows_;\n totalReserves = totalReserves_;\n }\n\n function harnessSetExchangeRate(uint exchangeRate) public {\n harnessExchangeRate = exchangeRate;\n harnessExchangeRateStored = true;\n }\n\n function harnessSetFailTransferToAddress(address _to, bool _fail) public {\n failTransferToAddresses[_to] = _fail;\n }\n\n function harnessMintFresh(address account, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintFresh(account, mintAmount);\n return err;\n }\n\n function harnessMintBehalfFresh(address payer, address receiver, uint mintAmount) public returns (uint) {\n (uint err, ) = super.mintBehalfFresh(payer, receiver, mintAmount);\n return err;\n }\n\n function harnessRedeemFresh(\n address payable account,\n uint vTokenAmount,\n uint underlyingAmount\n ) public returns (uint) {\n return super.redeemFresh(account, account, vTokenAmount, underlyingAmount);\n }\n\n function harnessAccountBorrows(address account) public view returns (uint principal, uint interestIndex) {\n BorrowSnapshot memory snapshot = accountBorrows[account];\n return (snapshot.principal, snapshot.interestIndex);\n }\n\n function harnessSetAccountBorrows(address account, uint principal, uint interestIndex) public {\n accountBorrows[account] = BorrowSnapshot({ principal: principal, interestIndex: interestIndex });\n }\n\n function harnessSetBorrowIndex(uint borrowIndex_) public {\n borrowIndex = borrowIndex_;\n }\n\n function harnessBorrowFresh(address payable account, uint borrowAmount) public returns (uint) {\n return borrowFresh(account, account, borrowAmount);\n }\n\n function harnessRepayBorrowFresh(address payer, address account, uint repayAmount) public returns (uint) {\n (uint err, ) = repayBorrowFresh(payer, account, repayAmount);\n return err;\n }\n\n function harnessLiquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VToken vTokenCollateral\n ) public returns (uint) {\n (uint err, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n function harnessReduceReservesFresh(uint amount) public returns (uint) {\n return _reduceReservesFresh(amount);\n }\n\n function harnessSetReserveFactorFresh(uint newReserveFactorMantissa) public returns (uint) {\n return _setReserveFactorFresh(newReserveFactorMantissa);\n }\n\n function harnessSetInterestRateModelFresh(InterestRateModel newInterestRateModel) public returns (uint) {\n return _setInterestRateModelFresh(newInterestRateModel);\n }\n\n function harnessSetInterestRateModel(address newInterestRateModelAddress) public {\n interestRateModel = InterestRateModel(newInterestRateModelAddress);\n }\n\n function harnessCallBorrowAllowed(uint amount) public returns (uint) {\n return comptroller.borrowAllowed(address(this), msg.sender, amount);\n }\n}\n\ncontract VBep20DelegateScenario is VBep20Delegate {\n constructor() public {}\n\n function setTotalBorrows(uint totalBorrows_) public {\n totalBorrows = totalBorrows_;\n }\n\n function setTotalReserves(uint totalReserves_) public {\n totalReserves = totalReserves_;\n }\n\n function getBlockNumber() internal view returns (uint) {\n ComptrollerScenario comptrollerScenario = ComptrollerScenario(address(comptroller));\n return comptrollerScenario.blockNumber();\n }\n}\n\ncontract VBep20DelegateScenarioExtra is VBep20DelegateScenario {\n function iHaveSpoken() public pure returns (string memory) {\n return \"i have spoken\";\n }\n\n function itIsTheWay() public {\n admin = address(1); // make a change to test effect\n }\n\n function babyYoda() public pure {\n revert(\"protect the baby\");\n }\n}\n" + }, + "contracts/test/VBep20MockDelegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/VTokens/VToken.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice VTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20MockDelegate is VToken, VBep20Interface {\n address public implementation;\n uint internal blockNumber = 100000;\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n\n function harnessFastForward(uint blocks) public {\n blockNumber += blocks;\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @param borrower the account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount fo underlying token to add as reserves\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n EIP20Interface token = EIP20Interface(underlying);\n return token.balanceOf(address(this));\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n token.transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying);\n token.transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a complaint BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n}\n" + }, + "contracts/test/VRTConverterHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/VRT/VRTConverter.sol\";\n\ncontract VRTConverterHarness is VRTConverter {\n constructor() public VRTConverter() {\n admin = msg.sender;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function setConversionRatio(uint256 _conversionRatio) public onlyAdmin {\n conversionRatio = _conversionRatio;\n }\n\n function setConversionTimeline(uint256 _conversionStartTime, uint256 _conversionPeriod) public onlyAdmin {\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n }\n\n function getXVSRedeemedAmount(uint256 vrtAmount) public view returns (uint256) {\n return vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(vrtDecimalsMultiplier);\n }\n}\n" + }, + "contracts/test/VRTVaultHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/VRTVault/VRTVault.sol\";\n\ncontract VRTVaultHarness is VRTVault {\n uint public blockNumber;\n\n constructor() public VRTVault() {}\n\n function overrideInterestRatePerBlock(uint256 _interestRatePerBlock) public {\n interestRatePerBlock = _interestRatePerBlock;\n }\n\n function balanceOfUser() public view returns (uint256, address) {\n uint256 vrtBalanceOfUser = vrt.balanceOf(msg.sender);\n return (vrtBalanceOfUser, msg.sender);\n }\n\n function harnessFastForward(uint256 blocks) public returns (uint256) {\n blockNumber += blocks;\n return blockNumber;\n }\n\n function setBlockNumber(uint256 number) public {\n blockNumber = number;\n }\n\n function getBlockNumber() public view returns (uint256) {\n return blockNumber;\n }\n}\n" + }, + "contracts/test/XVSHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Tokens/XVS/XVS.sol\";\n\ncontract XVSScenario is XVS {\n constructor(address account) public XVS(account) {}\n\n function transferScenario(address[] calldata destinations, uint256 amount) external returns (bool) {\n for (uint i = 0; i < destinations.length; i++) {\n address dst = destinations[i];\n _transferTokens(msg.sender, dst, uint96(amount));\n }\n return true;\n }\n\n function transferFromScenario(address[] calldata froms, uint256 amount) external returns (bool) {\n for (uint i = 0; i < froms.length; i++) {\n address from = froms[i];\n _transferTokens(from, msg.sender, uint96(amount));\n }\n return true;\n }\n\n function generateCheckpoints(uint count, uint offset) external {\n for (uint i = 1 + offset; i <= count + offset; i++) {\n checkpoints[msg.sender][numCheckpoints[msg.sender]++] = Checkpoint(uint32(i), uint96(i));\n }\n }\n}\n" + }, + "contracts/test/XVSVaultScenario.sol": { + "content": "pragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../XVSVault/XVSVault.sol\";\n\ncontract XVSVaultScenario is XVSVault {\n using SafeMath for uint256;\n\n constructor() public {\n admin = msg.sender;\n }\n\n function pushOldWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 0));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, uint128(_lockedUntil), 0);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n function requestOldWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushOldWithdrawalRequest(user, requests, _amount, lockedUntil);\n\n // Update Delegate Amount\n if (_rewardToken == address(xvsAddress)) {\n _moveDelegates(delegates[msg.sender], address(0), uint96(_amount));\n }\n\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n function transferReward(address rewardToken, address user, uint256 amount) external {\n _transferReward(rewardToken, user, amount);\n }\n}\n" + }, + "contracts/test/XVSVestingHarness.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../contracts/Tokens/XVS/XVSVesting.sol\";\n\ncontract XVSVestingHarness is XVSVesting {\n address public constant ZERO_ADDRESS = 0x0000000000000000000000000000000000000000;\n\n constructor() public XVSVesting() {\n admin = msg.sender;\n }\n\n uint public blockNumber;\n\n function recoverXVS(address recoveryAddress) public payable {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n xvs.safeTransferFrom(address(this), recoveryAddress, xvsBalance);\n }\n\n function overWriteVRTConversionAddress() public {\n vrtConversionAddress = ZERO_ADDRESS;\n }\n\n function computeWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) public view returns (uint256 vestedAmount, uint256 toWithdraw) {\n (vestedAmount, toWithdraw) = super.calculateWithdrawableAmount(amount, vestingStartTime, withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n function computeVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) public view returns (uint256) {\n return super.calculateVestedAmount(vestingAmount, vestingStartTime, currentTime);\n }\n\n function getVestingCount(address beneficiary) public view returns (uint256) {\n return vestings[beneficiary].length;\n }\n\n function getVestedAmount(address recipient) public view nonZeroAddress(recipient) returns (uint256) {\n VestingRecord[] memory vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalVestedAmount = 0;\n uint256 currentTime = getCurrentTime();\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord memory vesting = vestingsOfRecipient[i];\n uint256 vestedAmount = calculateVestedAmount(vesting.amount, vesting.startTime, currentTime);\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n }\n\n return totalVestedAmount;\n }\n}\n" + }, + "contracts/Tokens/EIP20Interface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title BEP 20 Token Standard Interface\n * https://eips.ethereum.org/EIPS/eip-20\n */\ninterface EIP20Interface {\n function name() external view returns (string memory);\n\n function symbol() external view returns (string memory);\n\n function decimals() external view returns (uint8);\n\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transfer(address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return success whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool success);\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return success whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/EIP20NonStandardInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title EIP20NonStandardInterface\n * @dev Version of BEP20 with no return values for `transfer` and `transferFrom`\n * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\ninterface EIP20NonStandardInterface {\n /**\n * @notice Get the total number of tokens in circulation\n * @return The supply of tokens\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @notice Gets the balance of the specified address\n * @param owner The address from which the balance will be retrieved\n * @return balance of the owner\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transfer` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transfer(address dst, uint256 amount) external;\n\n ///\n /// !!!!!!!!!!!!!!\n /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the BEP-20 specification\n /// !!!!!!!!!!!!!!\n ///\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n */\n function transferFrom(address src, address dst, uint256 amount) external;\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved\n * @return success Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool success);\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return remaining The number of tokens allowed to be spent\n */\n function allowance(address owner, address spender) external view returns (uint256 remaining);\n\n event Transfer(address indexed from, address indexed to, uint256 amount);\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n}\n" + }, + "contracts/Tokens/Prime/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\npragma experimental ABIEncoderV2;\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns if user is a prime holder\n * @param isPrimeHolder returns if the user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool isPrimeHolder);\n}\n" + }, + "contracts/Tokens/VAI/lib.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\ncontract LibNote {\n event LogNote(\n bytes4 indexed sig,\n address indexed usr,\n bytes32 indexed arg1,\n bytes32 indexed arg2,\n bytes data\n ) anonymous;\n\n modifier note() {\n _;\n assembly {\n // log an 'anonymous' event with a constant 6 words of calldata\n // and four indexed topics: selector, caller, arg1 and arg2\n let mark := msize() // end of memory ensures zero\n mstore(0x40, add(mark, 288)) // update free memory pointer\n mstore(mark, 0x20) // bytes type data offset\n mstore(add(mark, 0x20), 224) // bytes size (padded)\n calldatacopy(add(mark, 0x40), 0, 224) // bytes payload\n log4(\n mark,\n 288, // calldata\n shl(224, shr(224, calldataload(0))), // msg.sig\n caller(), // msg.sender\n calldataload(4), // arg1\n calldataload(36) // arg2\n )\n }\n }\n}\n" + }, + "contracts/Tokens/VAI/VAI.sol": { + "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\n// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\npragma solidity ^0.5.16;\n\nimport \"./lib.sol\";\n\ncontract VAI is LibNote {\n // --- Auth ---\n mapping(address => uint256) public wards;\n\n function rely(address guy) external note auth {\n wards[guy] = 1;\n }\n\n function deny(address guy) external note auth {\n wards[guy] = 0;\n }\n\n modifier auth() {\n require(wards[msg.sender] == 1, \"VAI/not-authorized\");\n _;\n }\n\n // --- BEP20 Data ---\n string public constant name = \"VAI Stablecoin\";\n string public constant symbol = \"VAI\";\n string public constant version = \"1\";\n uint8 public constant decimals = 18;\n uint256 public totalSupply;\n\n mapping(address => uint256) public balanceOf;\n mapping(address => mapping(address => uint256)) public allowance;\n mapping(address => uint256) public nonces;\n\n event Approval(address indexed src, address indexed guy, uint256 wad);\n event Transfer(address indexed src, address indexed dst, uint256 wad);\n\n // --- Math ---\n function add(uint256 x, uint256 y) internal pure returns (uint256 z) {\n require((z = x + y) >= x, \"VAI math error\");\n }\n\n function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {\n require((z = x - y) <= x, \"VAI math error\");\n }\n\n // --- EIP712 niceties ---\n bytes32 public DOMAIN_SEPARATOR;\n // bytes32 public constant PERMIT_TYPEHASH = keccak256(\"Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)\");\n bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb;\n\n constructor(uint256 chainId_) public {\n wards[msg.sender] = 1;\n DOMAIN_SEPARATOR = keccak256(\n abi.encode(\n keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"),\n keccak256(bytes(name)),\n keccak256(bytes(version)),\n chainId_,\n address(this)\n )\n );\n }\n\n // --- Token ---\n function transfer(address dst, uint256 wad) external returns (bool) {\n return transferFrom(msg.sender, dst, wad);\n }\n\n function transferFrom(address src, address dst, uint256 wad) public returns (bool) {\n require(balanceOf[src] >= wad, \"VAI/insufficient-balance\");\n if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) {\n require(allowance[src][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad);\n }\n balanceOf[src] = sub(balanceOf[src], wad);\n balanceOf[dst] = add(balanceOf[dst], wad);\n emit Transfer(src, dst, wad);\n return true;\n }\n\n function mint(address usr, uint256 wad) external auth {\n balanceOf[usr] = add(balanceOf[usr], wad);\n totalSupply = add(totalSupply, wad);\n emit Transfer(address(0), usr, wad);\n }\n\n function burn(address usr, uint256 wad) external {\n require(balanceOf[usr] >= wad, \"VAI/insufficient-balance\");\n if (usr != msg.sender && allowance[usr][msg.sender] != uint256(-1)) {\n require(allowance[usr][msg.sender] >= wad, \"VAI/insufficient-allowance\");\n allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad);\n }\n balanceOf[usr] = sub(balanceOf[usr], wad);\n totalSupply = sub(totalSupply, wad);\n emit Transfer(usr, address(0), wad);\n }\n\n function approve(address usr, uint256 wad) external returns (bool) {\n allowance[msg.sender][usr] = wad;\n emit Approval(msg.sender, usr, wad);\n return true;\n }\n\n // --- Alias ---\n function push(address usr, uint256 wad) external {\n transferFrom(msg.sender, usr, wad);\n }\n\n function pull(address usr, uint256 wad) external {\n transferFrom(usr, msg.sender, wad);\n }\n\n function move(address src, address dst, uint256 wad) external {\n transferFrom(src, dst, wad);\n }\n\n // --- Approve by signature ---\n function permit(\n address holder,\n address spender,\n uint256 nonce,\n uint256 expiry,\n bool allowed,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external {\n bytes32 digest = keccak256(\n abi.encodePacked(\n \"\\x19\\x01\",\n DOMAIN_SEPARATOR,\n keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed))\n )\n );\n\n require(holder != address(0), \"VAI/invalid-address-0\");\n require(holder == ecrecover(digest, v, r, s), \"VAI/invalid-permit\");\n require(expiry == 0 || now <= expiry, \"VAI/permit-expired\");\n require(nonce == nonces[holder]++, \"VAI/invalid-nonce\");\n uint256 wad = allowed ? uint256(-1) : 0;\n allowance[holder][spender] = wad;\n emit Approval(holder, spender, wad);\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIController.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.5.16;\n\nimport { PriceOracle } from \"../../Oracle/PriceOracle.sol\";\nimport { VAIControllerErrorReporter } from \"../../Utils/ErrorReporter.sol\";\nimport { Exponential } from \"../../Utils/Exponential.sol\";\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\nimport { VToken, EIP20Interface } from \"../VTokens/VToken.sol\";\nimport { VAIUnitroller, VAIControllerStorageG4 } from \"./VAIUnitroller.sol\";\nimport { VAIControllerInterface } from \"./VAIControllerInterface.sol\";\nimport { VAI } from \"./VAI.sol\";\nimport { IPrime } from \"../Prime/IPrime.sol\";\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\n/**\n * @title VAI Comptroller\n * @author Venus\n * @notice This is the implementation contract for the VAIUnitroller proxy\n */\ncontract VAIController is VAIControllerInterface, VAIControllerStorageG4, VAIControllerErrorReporter, Exponential {\n /// @notice Initial index used in interest computations\n uint256 public constant INITIAL_VAI_MINT_INDEX = 1e18;\n\n /// @notice Emitted when Comptroller is changed\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /// @notice Emitted when mint for prime holder is changed\n event MintOnlyForPrimeHolder(bool previousMintEnabledOnlyForPrimeHolder, bool newMintEnabledOnlyForPrimeHolder);\n\n /// @notice Emitted when Prime is changed\n event NewPrime(address oldPrime, address newPrime);\n\n /// @notice Event emitted when VAI is minted\n event MintVAI(address minter, uint256 mintVAIAmount);\n\n /// @notice Event emitted when VAI is repaid\n event RepayVAI(address payer, address borrower, uint256 repayVAIAmount);\n\n /// @notice Event emitted when a borrow is liquidated\n event LiquidateVAI(\n address liquidator,\n address borrower,\n uint256 repayAmount,\n address vTokenCollateral,\n uint256 seizeTokens\n );\n\n /// @notice Emitted when treasury guardian is changed\n event NewTreasuryGuardian(address oldTreasuryGuardian, address newTreasuryGuardian);\n\n /// @notice Emitted when treasury address is changed\n event NewTreasuryAddress(address oldTreasuryAddress, address newTreasuryAddress);\n\n /// @notice Emitted when treasury percent is changed\n event NewTreasuryPercent(uint256 oldTreasuryPercent, uint256 newTreasuryPercent);\n\n /// @notice Event emitted when VAIs are minted and fee are transferred\n event MintFee(address minter, uint256 feeAmount);\n\n /// @notice Emiitted when VAI base rate is changed\n event NewVAIBaseRate(uint256 oldBaseRateMantissa, uint256 newBaseRateMantissa);\n\n /// @notice Emiitted when VAI float rate is changed\n event NewVAIFloatRate(uint256 oldFloatRateMantissa, uint256 newFlatRateMantissa);\n\n /// @notice Emiitted when VAI receiver address is changed\n event NewVAIReceiver(address oldReceiver, address newReceiver);\n\n /// @notice Emiitted when VAI mint cap is changed\n event NewVAIMintCap(uint256 oldMintCap, uint256 newMintCap);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControl(address oldAccessControlAddress, address newAccessControlAddress);\n\n /// @notice Emitted when VAI token address is changed by admin\n event NewVaiToken(address oldVaiToken, address newVaiToken);\n\n function initialize() external onlyAdmin {\n require(vaiMintIndex == 0, \"already initialized\");\n\n vaiMintIndex = INITIAL_VAI_MINT_INDEX;\n accrualBlockNumber = getBlockNumber();\n mintCap = uint256(-1);\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n function _become(VAIUnitroller unitroller) external {\n require(msg.sender == unitroller.admin(), \"only unitroller admin can change brains\");\n require(unitroller._acceptImplementation() == 0, \"change not authorized\");\n }\n\n /**\n * @notice The mintVAI function mints and transfers VAI from the protocol to the user, and adds a borrow balance.\n * The amount minted must be less than the user's Account Liquidity and the mint vai limit.\n * @dev If the Comptroller address is not set, minting is a no-op and the function returns the success code.\n * @param mintVAIAmount The amount of the VAI to be minted.\n * @return 0 on success, otherwise an error code\n */\n // solhint-disable-next-line code-complexity\n function mintVAI(uint256 mintVAIAmount) external nonReentrant returns (uint256) {\n if (address(comptroller) == address(0)) {\n return uint256(Error.NO_ERROR);\n }\n\n _ensureNonzeroAmount(mintVAIAmount);\n _ensureNotPaused();\n accrueVAIInterest();\n\n uint256 err;\n address minter = msg.sender;\n address _vai = vai;\n uint256 vaiTotalSupply = EIP20Interface(_vai).totalSupply();\n\n uint256 vaiNewTotalSupply = add_(vaiTotalSupply, mintVAIAmount);\n require(vaiNewTotalSupply <= mintCap, \"mint cap reached\");\n\n uint256 accountMintableVAI;\n (err, accountMintableVAI) = getMintableVAI(minter);\n require(err == uint256(Error.NO_ERROR), \"could not compute mintable amount\");\n\n // check that user have sufficient mintableVAI balance\n require(mintVAIAmount <= accountMintableVAI, \"minting more than allowed\");\n\n // Calculate the minted balance based on interest index\n uint256 totalMintedVAI = comptroller.mintedVAIs(minter);\n\n if (totalMintedVAI > 0) {\n uint256 repayAmount = getVAIRepayAmount(minter);\n uint256 remainedAmount = sub_(repayAmount, totalMintedVAI);\n pastVAIInterest[minter] = add_(pastVAIInterest[minter], remainedAmount);\n totalMintedVAI = repayAmount;\n }\n\n uint256 accountMintVAINew = add_(totalMintedVAI, mintVAIAmount);\n err = comptroller.setMintedVAIOf(minter, accountMintVAINew);\n require(err == uint256(Error.NO_ERROR), \"comptroller rejection\");\n\n uint256 remainedAmount;\n if (treasuryPercent != 0) {\n uint256 feeAmount = div_(mul_(mintVAIAmount, treasuryPercent), 1e18);\n remainedAmount = sub_(mintVAIAmount, feeAmount);\n VAI(_vai).mint(treasuryAddress, feeAmount);\n\n emit MintFee(minter, feeAmount);\n } else {\n remainedAmount = mintVAIAmount;\n }\n\n VAI(_vai).mint(minter, remainedAmount);\n vaiMinterInterestIndex[minter] = vaiMintIndex;\n\n emit MintVAI(minter, remainedAmount);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice The repay function transfers VAI interest into the protocol and burns the rest,\n * reducing the borrower's borrow balance. Before repaying VAI, users must first approve\n * VAIController to access their VAI balance.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAI(uint256 amount) external nonReentrant returns (uint256, uint256) {\n return _repayVAI(msg.sender, amount);\n }\n\n /**\n * @notice The repay on behalf function transfers VAI interest into the protocol and burns the rest,\n * reducing the borrower's borrow balance. Borrowed VAIs are repaid by another user (possibly the borrower).\n * Before repaying VAI, the payer must first approve VAIController to access their VAI balance.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param borrower The account to repay the debt for.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAIBehalf(address borrower, uint256 amount) external nonReentrant returns (uint256, uint256) {\n _ensureNonzeroAddress(borrower);\n return _repayVAI(borrower, amount);\n }\n\n /**\n * @dev Checks the parameters and the protocol state, accrues interest, and invokes repayVAIFresh.\n * @dev If the Comptroller address is not set, repayment is a no-op and the function returns the success code.\n * @param borrower The account to repay the debt for.\n * @param amount The amount of VAI to be repaid.\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function _repayVAI(address borrower, uint256 amount) internal returns (uint256, uint256) {\n if (address(comptroller) == address(0)) {\n return (0, 0);\n }\n _ensureNonzeroAmount(amount);\n _ensureNotPaused();\n\n accrueVAIInterest();\n return repayVAIFresh(msg.sender, borrower, amount);\n }\n\n /**\n * @dev Repay VAI, expecting interest to be accrued\n * @dev Borrowed VAIs are repaid by another user (possibly the borrower).\n * @param payer the account paying off the VAI\n * @param borrower the account with the debt being payed off\n * @param repayAmount the amount of VAI being repaid\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function repayVAIFresh(address payer, address borrower, uint256 repayAmount) internal returns (uint256, uint256) {\n (uint256 burn, uint256 partOfCurrentInterest, uint256 partOfPastInterest) = getVAICalculateRepayAmount(\n borrower,\n repayAmount\n );\n\n VAI _vai = VAI(vai);\n _vai.burn(payer, burn);\n bool success = _vai.transferFrom(payer, receiver, partOfCurrentInterest);\n require(success == true, \"failed to transfer VAI fee\");\n\n uint256 vaiBalanceBorrower = comptroller.mintedVAIs(borrower);\n\n uint256 accountVAINew = sub_(sub_(vaiBalanceBorrower, burn), partOfPastInterest);\n pastVAIInterest[borrower] = sub_(pastVAIInterest[borrower], partOfPastInterest);\n\n uint256 error = comptroller.setMintedVAIOf(borrower, accountVAINew);\n // We have to revert upon error since side-effects already happened at this point\n require(error == uint256(Error.NO_ERROR), \"comptroller rejection\");\n\n uint256 repaidAmount = add_(burn, partOfCurrentInterest);\n emit RepayVAI(payer, borrower, repaidAmount);\n\n return (uint256(Error.NO_ERROR), repaidAmount);\n }\n\n /**\n * @notice The sender liquidates the vai minters collateral. The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of vai to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external nonReentrant returns (uint256, uint256) {\n _ensureNotPaused();\n\n uint256 error = vTokenCollateral.accrueInterest();\n if (error != uint256(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateVAIFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateVAIFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral by repay borrowers VAI.\n * The collateral seized is transferred to the liquidator.\n * @dev If the Comptroller address is not set, liquidation is a no-op and the function returns the success code.\n * @param liquidator The address repaying the VAI and seizing collateral\n * @param borrower The borrower of this VAI to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the VAI to repay\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol)\n * @return Actual repayment amount\n */\n function liquidateVAIFresh(\n address liquidator,\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint256, uint256) {\n if (address(comptroller) != address(0)) {\n accrueVAIInterest();\n\n /* Fail if liquidate not allowed */\n uint256 allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n //if (vTokenCollateral.accrualBlockNumber() != accrualBlockNumber) {\n if (vTokenCollateral.accrualBlockNumber() != getBlockNumber()) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint256(-1)) {\n return (fail(Error.REJECTION, FailureInfo.VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayVAI fails */\n (uint256 repayBorrowError, uint256 actualRepayAmount) = repayVAIFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint256(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint256 amountSeizeError, uint256 seizeTokens) = comptroller.liquidateVAICalculateSeizeTokens(\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(\n amountSeizeError == uint256(Error.NO_ERROR),\n \"VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\"\n );\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"VAI_LIQUIDATE_SEIZE_TOO_MUCH\");\n\n uint256 seizeError;\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint256(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateVAI(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint256(Error.NO_ERROR), actualRepayAmount);\n }\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Sets a new comptroller\n * @dev Admin function to set a new comptroller\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setComptroller(ComptrollerInterface comptroller_) external returns (uint256) {\n // Check caller is admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_COMPTROLLER_OWNER_CHECK);\n }\n\n ComptrollerInterface oldComptroller = comptroller;\n comptroller = comptroller_;\n emit NewComptroller(oldComptroller, comptroller_);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external onlyAdmin {\n emit NewPrime(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the VAI token contract address\n * @param vai_ The new address of the VAI token contract\n */\n function setVAIToken(address vai_) external onlyAdmin {\n emit NewVaiToken(vai, vai_);\n vai = vai_;\n }\n\n /**\n * @notice Toggle mint only for prime holder\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function toggleOnlyPrimeHolderMint() external returns (uint256) {\n _ensureAllowed(\"toggleOnlyPrimeHolderMint()\");\n\n if (!mintEnabledOnlyForPrimeHolder && prime == address(0)) {\n return uint256(Error.REJECTION);\n }\n\n emit MintOnlyForPrimeHolder(mintEnabledOnlyForPrimeHolder, !mintEnabledOnlyForPrimeHolder);\n mintEnabledOnlyForPrimeHolder = !mintEnabledOnlyForPrimeHolder;\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @dev Local vars for avoiding stack-depth limits in calculating account total supply balance.\n * Note that `vTokenBalance` is the number of vTokens the account owns in the market,\n * whereas `borrowBalance` is the amount of underlying that the account has borrowed.\n */\n struct AccountAmountLocalVars {\n uint256 oErr;\n MathError mErr;\n uint256 sumSupply;\n uint256 marketSupply;\n uint256 sumBorrowPlusEffects;\n uint256 vTokenBalance;\n uint256 borrowBalance;\n uint256 exchangeRateMantissa;\n uint256 oraclePriceMantissa;\n Exp exchangeRate;\n Exp oraclePrice;\n Exp tokensToDenom;\n }\n\n /**\n * @notice Function that returns the amount of VAI a user can mint based on their account liquidy and the VAI mint rate\n * If mintEnabledOnlyForPrimeHolder is true, only Prime holders are able to mint VAI\n * @param minter The account to check mintable VAI\n * @return Error code (0=success, otherwise a failure, see ErrorReporter.sol for details)\n * @return Mintable amount (with 18 decimals)\n */\n // solhint-disable-next-line code-complexity\n function getMintableVAI(address minter) public view returns (uint256, uint256) {\n if (mintEnabledOnlyForPrimeHolder && !IPrime(prime).isUserPrimeHolder(minter)) {\n return (uint256(Error.REJECTION), 0);\n }\n\n PriceOracle oracle = comptroller.oracle();\n VToken[] memory enteredMarkets = comptroller.getAssetsIn(minter);\n\n AccountAmountLocalVars memory vars; // Holds all our calculation results\n\n uint256 accountMintableVAI;\n uint256 i;\n\n /**\n * We use this formula to calculate mintable VAI amount.\n * totalSupplyAmount * VAIMintRate - (totalBorrowAmount + mintedVAIOf)\n */\n uint256 marketsCount = enteredMarkets.length;\n for (i = 0; i < marketsCount; i++) {\n (vars.oErr, vars.vTokenBalance, vars.borrowBalance, vars.exchangeRateMantissa) = enteredMarkets[i]\n .getAccountSnapshot(minter);\n if (vars.oErr != 0) {\n // semi-opaque error code, we assume NO_ERROR == 0 is invariant between upgrades\n return (uint256(Error.SNAPSHOT_ERROR), 0);\n }\n vars.exchangeRate = Exp({ mantissa: vars.exchangeRateMantissa });\n\n // Get the normalized price of the asset\n vars.oraclePriceMantissa = oracle.getUnderlyingPrice(enteredMarkets[i]);\n if (vars.oraclePriceMantissa == 0) {\n return (uint256(Error.PRICE_ERROR), 0);\n }\n vars.oraclePrice = Exp({ mantissa: vars.oraclePriceMantissa });\n\n (vars.mErr, vars.tokensToDenom) = mulExp(vars.exchangeRate, vars.oraclePrice);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n // marketSupply = tokensToDenom * vTokenBalance\n (vars.mErr, vars.marketSupply) = mulScalarTruncate(vars.tokensToDenom, vars.vTokenBalance);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (, uint256 collateralFactorMantissa) = comptroller.markets(address(enteredMarkets[i]));\n (vars.mErr, vars.marketSupply) = mulUInt(vars.marketSupply, collateralFactorMantissa);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.marketSupply) = divUInt(vars.marketSupply, 1e18);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, vars.sumSupply) = addUInt(vars.sumSupply, vars.marketSupply);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n // sumBorrowPlusEffects += oraclePrice * borrowBalance\n (vars.mErr, vars.sumBorrowPlusEffects) = mulScalarTruncateAddUInt(\n vars.oraclePrice,\n vars.borrowBalance,\n vars.sumBorrowPlusEffects\n );\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n }\n\n uint256 totalMintedVAI = comptroller.mintedVAIs(minter);\n uint256 repayAmount = 0;\n\n if (totalMintedVAI > 0) {\n repayAmount = getVAIRepayAmount(minter);\n }\n\n (vars.mErr, vars.sumBorrowPlusEffects) = addUInt(vars.sumBorrowPlusEffects, repayAmount);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.MATH_ERROR), 0);\n }\n\n (vars.mErr, accountMintableVAI) = mulUInt(vars.sumSupply, comptroller.vaiMintRate());\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = divUInt(accountMintableVAI, 10000);\n require(vars.mErr == MathError.NO_ERROR, \"VAI_MINT_AMOUNT_CALCULATION_FAILED\");\n\n (vars.mErr, accountMintableVAI) = subUInt(accountMintableVAI, vars.sumBorrowPlusEffects);\n if (vars.mErr != MathError.NO_ERROR) {\n return (uint256(Error.REJECTION), 0);\n }\n\n return (uint256(Error.NO_ERROR), accountMintableVAI);\n }\n\n /**\n * @notice Update treasury data\n * @param newTreasuryGuardian New Treasury Guardian address\n * @param newTreasuryAddress New Treasury Address\n * @param newTreasuryPercent New fee percentage for minting VAI that is sent to the treasury\n */\n function _setTreasuryData(\n address newTreasuryGuardian,\n address newTreasuryAddress,\n uint256 newTreasuryPercent\n ) external returns (uint256) {\n // Check caller is admin\n if (!(msg.sender == admin || msg.sender == treasuryGuardian)) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_TREASURY_OWNER_CHECK);\n }\n\n require(newTreasuryPercent < 1e18, \"treasury percent cap overflow\");\n\n address oldTreasuryGuardian = treasuryGuardian;\n address oldTreasuryAddress = treasuryAddress;\n uint256 oldTreasuryPercent = treasuryPercent;\n\n treasuryGuardian = newTreasuryGuardian;\n treasuryAddress = newTreasuryAddress;\n treasuryPercent = newTreasuryPercent;\n\n emit NewTreasuryGuardian(oldTreasuryGuardian, newTreasuryGuardian);\n emit NewTreasuryAddress(oldTreasuryAddress, newTreasuryAddress);\n emit NewTreasuryPercent(oldTreasuryPercent, newTreasuryPercent);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Gets yearly VAI interest rate based on the VAI price\n * @return uint256 Yearly VAI interest rate\n */\n function getVAIRepayRate() public view returns (uint256) {\n PriceOracle oracle = comptroller.oracle();\n MathError mErr;\n\n if (baseRateMantissa > 0) {\n if (floatRateMantissa > 0) {\n uint256 oraclePrice = oracle.getUnderlyingPrice(VToken(getVAIAddress()));\n if (1e18 > oraclePrice) {\n uint256 delta;\n uint256 rate;\n\n (mErr, delta) = subUInt(1e18, oraclePrice);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = mulUInt(delta, floatRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n (mErr, rate) = addUInt(delta, baseRateMantissa);\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n } else {\n return baseRateMantissa;\n }\n } else {\n return baseRateMantissa;\n }\n } else {\n return 0;\n }\n }\n\n /**\n * @notice Get interest rate per block\n * @return uint256 Interest rate per bock\n */\n function getVAIRepayRatePerBlock() public view returns (uint256) {\n uint256 yearlyRate = getVAIRepayRate();\n\n MathError mErr;\n uint256 rate;\n\n (mErr, rate) = divUInt(yearlyRate, getBlocksPerYear());\n require(mErr == MathError.NO_ERROR, \"VAI_REPAY_RATE_CALCULATION_FAILED\");\n\n return rate;\n }\n\n /**\n * @notice Get the last updated interest index for a VAI Minter\n * @param minter Address of VAI minter\n * @return uint256 Returns the interest rate index for a minter\n */\n function getVAIMinterInterestIndex(address minter) public view returns (uint256) {\n uint256 storedIndex = vaiMinterInterestIndex[minter];\n // If the user minted VAI before the stability fee was introduced, accrue\n // starting from stability fee launch\n if (storedIndex == 0) {\n return INITIAL_VAI_MINT_INDEX;\n }\n return storedIndex;\n }\n\n /**\n * @notice Get the current total VAI a user needs to repay\n * @param account The address of the VAI borrower\n * @return (uint256) The total amount of VAI the user needs to repay\n */\n function getVAIRepayAmount(address account) public view returns (uint256) {\n MathError mErr;\n uint256 delta;\n\n uint256 amount = comptroller.mintedVAIs(account);\n uint256 interest = pastVAIInterest[account];\n uint256 totalMintedVAI;\n uint256 newInterest;\n\n (mErr, totalMintedVAI) = subUInt(amount, interest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, delta) = subUInt(vaiMintIndex, getVAIMinterInterestIndex(account));\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = mulUInt(delta, totalMintedVAI);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, newInterest) = divUInt(newInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, amount) = addUInt(amount, newInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_TOTAL_REPAY_AMOUNT_CALCULATION_FAILED\");\n\n return amount;\n }\n\n /**\n * @notice Calculate how much VAI the user needs to repay\n * @param borrower The address of the VAI borrower\n * @param repayAmount The amount of VAI being returned\n * @return Amount of VAI to be burned\n * @return Amount of VAI the user needs to pay in current interest\n * @return Amount of VAI the user needs to pay in past interest\n */\n function getVAICalculateRepayAmount(\n address borrower,\n uint256 repayAmount\n ) public view returns (uint256, uint256, uint256) {\n MathError mErr;\n uint256 totalRepayAmount = getVAIRepayAmount(borrower);\n uint256 currentInterest;\n\n (mErr, currentInterest) = subUInt(totalRepayAmount, comptroller.mintedVAIs(borrower));\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, currentInterest) = addUInt(pastVAIInterest[borrower], currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n uint256 burn;\n uint256 partOfCurrentInterest = currentInterest;\n uint256 partOfPastInterest = pastVAIInterest[borrower];\n\n if (repayAmount >= totalRepayAmount) {\n (mErr, burn) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n } else {\n uint256 delta;\n\n (mErr, delta) = mulUInt(repayAmount, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n (mErr, delta) = divUInt(delta, totalRepayAmount);\n require(mErr == MathError.NO_ERROR, \"VAI_PART_CALCULATION_FAILED\");\n\n uint256 totalMintedAmount;\n (mErr, totalMintedAmount) = subUInt(totalRepayAmount, currentInterest);\n require(mErr == MathError.NO_ERROR, \"VAI_MINTED_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = mulUInt(totalMintedAmount, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, burn) = divUInt(burn, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_BURN_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = mulUInt(currentInterest, delta);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfCurrentInterest) = divUInt(partOfCurrentInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_CURRENT_INTEREST_AMOUNT_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = mulUInt(pastVAIInterest[borrower], delta);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n\n (mErr, partOfPastInterest) = divUInt(partOfPastInterest, 1e18);\n require(mErr == MathError.NO_ERROR, \"VAI_PAST_INTEREST_CALCULATION_FAILED\");\n }\n\n return (burn, partOfCurrentInterest, partOfPastInterest);\n }\n\n /**\n * @notice Accrue interest on outstanding minted VAI\n */\n function accrueVAIInterest() public {\n MathError mErr;\n uint256 delta;\n\n (mErr, delta) = mulUInt(getVAIRepayRatePerBlock(), getBlockNumber() - accrualBlockNumber);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCRUE_FAILED\");\n\n (mErr, delta) = addUInt(delta, vaiMintIndex);\n require(mErr == MathError.NO_ERROR, \"VAI_INTEREST_ACCRUE_FAILED\");\n\n vaiMintIndex = delta;\n accrualBlockNumber = getBlockNumber();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _ensureNonzeroAddress(newAccessControlAddress);\n\n address oldAccessControlAddress = accessControl;\n accessControl = newAccessControlAddress;\n emit NewAccessControl(oldAccessControlAddress, accessControl);\n }\n\n /**\n * @notice Set VAI borrow base rate\n * @param newBaseRateMantissa the base rate multiplied by 10**18\n */\n function setBaseRate(uint256 newBaseRateMantissa) external {\n _ensureAllowed(\"setBaseRate(uint256)\");\n\n uint256 old = baseRateMantissa;\n baseRateMantissa = newBaseRateMantissa;\n emit NewVAIBaseRate(old, baseRateMantissa);\n }\n\n /**\n * @notice Set VAI borrow float rate\n * @param newFloatRateMantissa the VAI float rate multiplied by 10**18\n */\n function setFloatRate(uint256 newFloatRateMantissa) external {\n _ensureAllowed(\"setFloatRate(uint256)\");\n\n uint256 old = floatRateMantissa;\n floatRateMantissa = newFloatRateMantissa;\n emit NewVAIFloatRate(old, floatRateMantissa);\n }\n\n /**\n * @notice Set VAI stability fee receiver address\n * @param newReceiver the address of the VAI fee receiver\n */\n function setReceiver(address newReceiver) external onlyAdmin {\n _ensureNonzeroAddress(newReceiver);\n\n address old = receiver;\n receiver = newReceiver;\n emit NewVAIReceiver(old, newReceiver);\n }\n\n /**\n * @notice Set VAI mint cap\n * @param _mintCap the amount of VAI that can be minted\n */\n function setMintCap(uint256 _mintCap) external {\n _ensureAllowed(\"setMintCap(uint256)\");\n\n uint256 old = mintCap;\n mintCap = _mintCap;\n emit NewVAIMintCap(old, _mintCap);\n }\n\n function getBlockNumber() internal view returns (uint256) {\n return block.number;\n }\n\n function getBlocksPerYear() public view returns (uint256) {\n return 10512000; //(24 * 60 * 60 * 365) / 3;\n }\n\n /**\n * @notice Return the address of the VAI token\n * @return The address of VAI\n */\n function getVAIAddress() public view returns (address) {\n return vai;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n function _ensureAllowed(string memory functionSig) private view {\n require(IAccessControlManagerV5(accessControl).isAllowedToCall(msg.sender, functionSig), \"access denied\");\n }\n\n /// @dev Reverts if the protocol is paused\n function _ensureNotPaused() private view {\n require(!comptroller.protocolPaused(), \"protocol is paused\");\n }\n\n /// @dev Reverts if the passed address is zero\n function _ensureNonzeroAddress(address someone) private pure {\n require(someone != address(0), \"can't be zero address\");\n }\n\n /// @dev Reverts if the passed amount is zero\n function _ensureNonzeroAmount(uint256 amount) private pure {\n require(amount > 0, \"amount can't be zero\");\n }\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerInterface.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VTokenInterface } from \"../VTokens/VTokenInterfaces.sol\";\n\ncontract VAIControllerInterface {\n function mintVAI(uint256 mintVAIAmount) external returns (uint256);\n\n function repayVAI(uint256 amount) external returns (uint256, uint256);\n\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\n\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint256, uint256);\n\n function getMintableVAI(address minter) external view returns (uint256, uint256);\n\n function getVAIAddress() external view returns (address);\n\n function getVAIRepayAmount(address account) external view returns (uint256);\n}\n" + }, + "contracts/Tokens/VAI/VAIControllerStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { ComptrollerInterface } from \"../../Comptroller/ComptrollerInterface.sol\";\n\ncontract VAIUnitrollerAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of Unitroller\n */\n address public vaiControllerImplementation;\n\n /**\n * @notice Pending brains of Unitroller\n */\n address public pendingVAIControllerImplementation;\n}\n\ncontract VAIControllerStorageG1 is VAIUnitrollerAdminStorage {\n ComptrollerInterface public comptroller;\n\n struct VenusVAIState {\n /// @notice The last updated venusVAIMintIndex\n uint224 index;\n /// @notice The block number the index was last updated at\n uint32 block;\n }\n\n /// @notice The Venus VAI state\n VenusVAIState public venusVAIState;\n\n /// @notice The Venus VAI state initialized\n bool public isVenusVAIInitialized;\n\n /// @notice The Venus VAI minter index as of the last time they accrued XVS\n mapping(address => uint256) public venusVAIMinterIndex;\n}\n\ncontract VAIControllerStorageG2 is VAIControllerStorageG1 {\n /// @notice Treasury Guardian address\n address public treasuryGuardian;\n\n /// @notice Treasury address\n address public treasuryAddress;\n\n /// @notice Fee percent of accrued interest with decimal 18\n uint256 public treasuryPercent;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The base rate for stability fee\n uint256 public baseRateMantissa;\n\n /// @notice The float rate for stability fee\n uint256 public floatRateMantissa;\n\n /// @notice The address for VAI interest receiver\n address public receiver;\n\n /// @notice Accumulator of the total earned interest rate since the opening of the market. For example: 0.6 (60%)\n uint256 public vaiMintIndex;\n\n /// @notice Block number that interest was last accrued at\n uint256 internal accrualBlockNumber;\n\n /// @notice Global vaiMintIndex as of the most recent balance-changing action for user\n mapping(address => uint256) internal vaiMinterInterestIndex;\n\n /// @notice Tracks the amount of mintedVAI of a user that represents the accrued interest\n mapping(address => uint256) public pastVAIInterest;\n\n /// @notice VAI mint cap\n uint256 public mintCap;\n\n /// @notice Access control manager address\n address public accessControl;\n}\n\ncontract VAIControllerStorageG3 is VAIControllerStorageG2 {\n /// @notice The address of the prime contract. It can be a ZERO address\n address public prime;\n\n /// @notice Tracks if minting is enabled only for prime token holders. Only used if prime is set\n bool public mintEnabledOnlyForPrimeHolder;\n}\n\ncontract VAIControllerStorageG4 is VAIControllerStorageG3 {\n /// @notice The address of the VAI token\n address internal vai;\n}\n" + }, + "contracts/Tokens/VAI/VAIUnitroller.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"./VAIControllerStorage.sol\";\n\n/**\n * @title VAI Unitroller\n * @author Venus\n * @notice This is the proxy contract for the VAIComptroller\n */\ncontract VAIUnitroller is VAIUnitrollerAdminStorage, VAIControllerErrorReporter {\n /**\n * @notice Emitted when pendingVAIControllerImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIControllerImplementation is accepted, which means comptroller implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint256) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of comptroller. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint256) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIControllerImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiControllerImplementation;\n address oldPendingImplementation = pendingVAIControllerImplementation;\n\n vaiControllerImplementation = pendingVAIControllerImplementation;\n\n pendingVAIControllerImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiControllerImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIControllerImplementation);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint256) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint256 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint256) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint256(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiControllerImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRT.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract VRT is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus Reward Token\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"VRT\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000000e18; // 30 billion VRT\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new VRT token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"VRT::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"VRT::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"VRT::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"VRT::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"VRT::delegateBySig: invalid nonce\");\n require(now <= expiry, \"VRT::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"VRT::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"VRT::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"VRT::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"VRT::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"VRT::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"VRT::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"VRT::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"VRT::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverter.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\nimport \"./VRTConverterStorage.sol\";\nimport \"./VRTConverterProxy.sol\";\n\n/**\n * @title Venus's VRTConversion Contract\n * @author Venus\n */\ncontract VRTConverter is VRTConverterStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;\n\n /// @notice decimal precision for VRT\n uint256 public constant vrtDecimalsMultiplier = 1e18;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when an admin set conversion info\n event ConversionInfoSet(\n uint256 conversionRatio,\n uint256 conversionStartTime,\n uint256 conversionPeriod,\n uint256 conversionEndTime\n );\n\n /// @notice Emitted when token conversion is done\n event TokenConverted(\n address reedeemer,\n address vrtAddress,\n uint256 vrtAmount,\n address xvsAddress,\n uint256 xvsAmount\n );\n\n /// @notice Emitted when an admin withdraw converted token\n event TokenWithdraw(address token, address to, uint256 amount);\n\n /// @notice Emitted when XVSVestingAddress is set\n event XVSVestingSet(address xvsVestingAddress);\n\n constructor() public {}\n\n function initialize(\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public {\n require(msg.sender == admin, \"only admin may initialize the VRTConverter\");\n require(initialized == false, \"VRTConverter is already initialized\");\n\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n vrt = IBEP20(_vrtAddress);\n\n require(_xvsAddress != address(0), \"xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n require(_conversionRatio > 0, \"conversionRatio cannot be Zero\");\n conversionRatio = _conversionRatio;\n\n require(_conversionStartTime >= block.timestamp, \"conversionStartTime must be time in the future\");\n require(_conversionPeriod > 0, \"_conversionPeriod is invalid\");\n\n conversionStartTime = _conversionStartTime;\n conversionPeriod = _conversionPeriod;\n conversionEndTime = conversionStartTime.add(conversionPeriod);\n emit ConversionInfoSet(conversionRatio, conversionStartTime, conversionPeriod, conversionEndTime);\n\n totalVrtConverted = 0;\n _notEntered = true;\n initialized = true;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice sets XVSVestingProxy Address\n * @dev Note: If XVSVestingProxy is not set, then Conversion is not allowed\n * @param _xvsVestingAddress The XVSVestingProxy Address\n */\n function setXVSVesting(address _xvsVestingAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_xvsVestingAddress != address(0), \"xvsVestingAddress cannot be Zero\");\n xvsVesting = IXVSVesting(_xvsVestingAddress);\n emit XVSVestingSet(_xvsVestingAddress);\n }\n\n modifier isInitialized() {\n require(initialized == true, \"VRTConverter is not initialized\");\n _;\n }\n\n function isConversionActive() public view returns (bool) {\n uint256 currentTime = block.timestamp;\n if (currentTime >= conversionStartTime && currentTime <= conversionEndTime) {\n return true;\n }\n return false;\n }\n\n modifier checkForActiveConversionPeriod() {\n uint256 currentTime = block.timestamp;\n require(currentTime >= conversionStartTime, \"Conversion did not start yet\");\n require(currentTime <= conversionEndTime, \"Conversion Period Ended\");\n _;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Transfer VRT and redeem XVS\n * @dev Note: If there is not enough XVS, we do not perform the conversion.\n * @param vrtAmount The amount of VRT\n */\n function convert(uint256 vrtAmount) external isInitialized checkForActiveConversionPeriod nonReentrant {\n require(\n address(xvsVesting) != address(0) && address(xvsVesting) != DEAD_ADDRESS,\n \"XVS-Vesting Address is not set\"\n );\n require(vrtAmount > 0, \"VRT amount must be non-zero\");\n totalVrtConverted = totalVrtConverted.add(vrtAmount);\n\n uint256 redeemAmount = vrtAmount.mul(conversionRatio).mul(xvsDecimalsMultiplier).div(1e18).div(\n vrtDecimalsMultiplier\n );\n\n emit TokenConverted(msg.sender, address(vrt), vrtAmount, address(xvs), redeemAmount);\n vrt.safeTransferFrom(msg.sender, DEAD_ADDRESS, vrtAmount);\n xvsVesting.deposit(msg.sender, redeemAmount);\n }\n\n /*** Admin Functions ***/\n function _become(VRTConverterProxy vrtConverterProxy) public {\n require(msg.sender == vrtConverterProxy.admin(), \"only proxy admin can change brains\");\n vrtConverterProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTConverterStorage.sol\";\n\ncontract VRTConverterProxy is VRTConverterAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRTConverter implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _vrtAddress,\n address _xvsAddress,\n uint256 _conversionRatio,\n uint256 _conversionStartTime,\n uint256 _conversionPeriod\n ) public nonZeroAddress(implementation_) nonZeroAddress(_vrtAddress) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,uint256,uint256,uint256)\",\n _vrtAddress,\n _xvsAddress,\n _conversionRatio,\n _conversionStartTime,\n _conversionPeriod\n )\n );\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTConverterProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTConverterProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRTConverter. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/VRT/VRTConverterStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\nimport \"../XVS/IXVSVesting.sol\";\n\ncontract VRTConverterAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRTConverter\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VRTConverter\n */\n address public pendingImplementation;\n}\n\ncontract VRTConverterStorage is VRTConverterAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice XVSVesting Contract reference\n IXVSVesting public xvsVesting;\n\n /// @notice Conversion ratio from VRT to XVS with decimal 18\n uint256 public conversionRatio;\n\n /// @notice total VRT converted to XVS\n uint256 public totalVrtConverted;\n\n /// @notice Conversion Start time in EpochSeconds\n uint256 public conversionStartTime;\n\n /// @notice ConversionPeriod in Seconds\n uint256 public conversionPeriod;\n\n /// @notice Conversion End time in EpochSeconds\n uint256 public conversionEndTime;\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VBep20DelegateR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../VTokenInterfaces.sol\";\nimport { VBep20R1 } from \"./VBep20R1.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaceR1.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20DelegateR1 is VBep20R1, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VBep20DelegatorR1.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../VTokenInterfaces.sol\";\nimport \"./VTokenInterfaceR1.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20DelegatorR1 is VTokenInterfaceR1, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VBep20R1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VTokenR1, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VTokenR1.sol\";\nimport { EIP20Interface } from \"../../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20R1 is VTokenR1, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VTokenInterfaceR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../../InterestRateModels/InterestRateModel.sol\";\nimport \"../VTokenInterfaces.sol\";\n\ncontract VTokenInterfaceR1 is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/legacy/VTokenR1.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../../Utils/ErrorReporter.sol\";\nimport \"../../../Utils/Exponential.sol\";\nimport \"../../../Tokens/EIP20Interface.sol\";\nimport \"../../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../../InterestRateModels/InterestRateModel.sol\";\nimport \"../VTokenInterfaces.sol\";\nimport { VTokenInterfaceR1 } from \"./VTokenInterfaceR1.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VTokenR1 is VTokenInterfaceR1, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VBep20.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VToken, VBep20Interface, ComptrollerInterface, InterestRateModel, VTokenInterface } from \"./VToken.sol\";\nimport { EIP20Interface } from \"../EIP20Interface.sol\";\nimport { EIP20NonStandardInterface } from \"../EIP20NonStandardInterface.sol\";\n\n/**\n * @title Venus's VBep20 Contract\n * @notice vTokens which wrap an EIP-20 underlying\n * @author Venus\n */\ncontract VBep20 is VToken, VBep20Interface {\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint(uint mintAmount) external returns (uint) {\n (uint err, ) = mintInternal(mintAmount);\n return err;\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits MintBehalf event\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n (uint err, ) = mintBehalfInternal(receiver, mintAmount);\n return err;\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The user on behalf of whom to redeem\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemBehalf(address redeemer, uint redeemTokens) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemInternal(redeemer, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer, on behalf of whom to redeem\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlyingBehalf(address redeemer, uint redeemAmount) external returns (uint) {\n require(comptroller.approvedDelegates(redeemer, msg.sender), \"not an approved delegate\");\n\n return redeemUnderlyingInternal(redeemer, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender borrows assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the borrower using `comptroller.updateDelegate`\n * @param borrower The borrower, on behalf of whom to borrow.\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrowBehalf(address borrower, uint borrowAmount) external returns (uint) {\n require(comptroller.approvedDelegates(borrower, msg.sender), \"not an approved delegate\");\n return borrowInternal(borrower, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow(uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowInternal(repayAmount);\n return err;\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n (uint err, ) = repayBorrowBehalfInternal(borrower, repayAmount);\n return err;\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n (uint err, ) = liquidateBorrowInternal(borrower, repayAmount, vTokenCollateral);\n return err;\n }\n\n /**\n * @notice The sender adds to reserves.\n * @param addAmount The amount of underlying tokens to add as reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesAdded event\n function _addReserves(uint addAmount) external returns (uint) {\n return _addReservesInternal(addAmount);\n }\n\n /**\n * @notice Initialize the new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n */\n function initialize(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n // VToken initialize does the bulk of the work\n super.initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set underlying and sanity check it\n underlying = underlying_;\n EIP20Interface(underlying).totalSupply();\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.\n * This will revert due to insufficient balance or insufficient allowance.\n * This function returns the actual amount received,\n * which may be less than `amount` if there is a fee attached to the transfer.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n uint balanceBefore = EIP20Interface(underlying).balanceOf(address(this));\n EIP20NonStandardInterface(underlying).transferFrom(from, address(this), amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_IN_FAILED\");\n\n // Calculate the amount that was *actually* transferred\n uint balanceAfter = EIP20Interface(underlying).balanceOf(address(this));\n require(balanceAfter >= balanceBefore, \"TOKEN_TRANSFER_IN_OVERFLOW\");\n return balanceAfter - balanceBefore; // underflow already checked above, just subtract\n }\n\n /**\n * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory\n * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to\n * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified\n * it is >= amount, this should not revert in normal conditions.\n *\n * Note: This wrapper safely handles non-standard BEP-20 tokens that do not return a value.\n * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca\n */\n function doTransferOut(address payable to, uint amount) internal {\n EIP20NonStandardInterface(underlying).transfer(to, amount);\n\n bool success;\n assembly {\n switch returndatasize()\n case 0 {\n // This is a non-standard BEP-20\n success := not(0) // set success to true\n }\n case 32 {\n // This is a compliant BEP-20\n returndatacopy(0, 0, 32)\n success := mload(0) // Set `success = returndata` of external call\n }\n default {\n // This is an excessively non-compliant BEP-20, revert.\n revert(0, 0)\n }\n }\n require(success, \"TOKEN_TRANSFER_OUT_FAILED\");\n }\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying tokens owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n return EIP20Interface(underlying).balanceOf(address(this));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegate.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport { VBep20 } from \"./VBep20.sol\";\nimport { VDelegateInterface } from \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegate Contract\n * @notice VTokens which wrap an EIP-20 underlying and are delegated to\n * @author Venus\n */\ncontract VBep20Delegate is VBep20, VDelegateInterface {\n /**\n * @notice Construct an empty delegate\n */\n constructor() public {}\n\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public {\n // Shh -- currently unused\n data;\n\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _becomeImplementation\");\n }\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public {\n // Shh -- we don't ever want this hook to be marked pure\n if (false) {\n implementation = address(0);\n }\n\n require(msg.sender == admin, \"only the admin may call _resignImplementation\");\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Delegator.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VTokenInterfaces.sol\";\n\n/**\n * @title Venus's VBep20Delegator Contract\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\n * @author Venus\n */\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n * @param implementation_ The address of the implementation the contract delegates to\n * @param becomeImplementationData The encoded args for becomeImplementation\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_,\n address implementation_,\n bytes memory becomeImplementationData\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\n \"initialize(address,address,address,uint256,string,string,uint8)\",\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n )\n );\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_, false, becomeImplementationData);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n */\n function() external payable {\n require(msg.value == 0, \"VBep20Delegator:fallback: cannot send value to fallback\");\n\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mint(uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"mint(uint256)\", mintAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"mintBehalf(address,uint256)\", receiver, mintAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying asset\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeem(uint redeemTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"redeem(uint256)\", redeemTokens));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"redeemUnderlying(uint256)\", redeemAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrow(uint borrowAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrow(uint256)\", borrowAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrow(uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"repayBorrow(uint256)\", repayAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrower\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"repayBorrowBehalf(address,uint256)\", borrower, repayAmount)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"liquidateBorrow(address,uint256,address)\", borrower, repayAmount, vTokenCollateral)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint amount) external returns (bool) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"transfer(address,uint256)\", dst, amount));\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"transferFrom(address,address,uint256)\", src, dst, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint256 amount) external returns (bool) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"approve(address,uint256)\", spender, amount)\n );\n return abi.decode(data, (bool));\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"balanceOfUnderlying(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"totalBorrowsCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"borrowBalanceCurrent(address)\", account));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"seize(address,address,uint256)\", liquidator, borrower, seizeTokens)\n );\n return abi.decode(data, (uint));\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setPendingAdmin(address)\", newPendingAdmin)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\n * @dev Admin function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setReserveFactor(uint256)\", newReserveFactorMantissa)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _acceptAdmin() external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_acceptAdmin()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from admin\n * @param addAmount Amount of reserves to add\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReserves(uint addAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_addReserves(uint256)\", addAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to admin\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReserves(uint reduceAmount) external returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"_reduceReserves(uint256)\", reduceAmount));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"getCash()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"allowance(address,address)\", owner, spender)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"balanceOf(address)\", owner));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Get a snapshot of the account's balances and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"getAccountSnapshot(address)\", account)\n );\n return abi.decode(data, (uint, uint, uint, uint));\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"borrowRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"supplyRatePerBlock()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n // @custom:access Only callable by admin\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public {\n require(msg.sender == admin, \"VBep20Delegator::_setImplementation: Caller must be admin\");\n\n if (allowResign) {\n delegateToImplementation(abi.encodeWithSignature(\"_resignImplementation()\"));\n }\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n delegateToImplementation(abi.encodeWithSignature(\"_becomeImplementation(bytes)\", becomeImplementationData));\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"exchangeRateCurrent()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves.\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage.\n */\n function accrueInterest() public returns (uint) {\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\"accrueInterest()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setComptroller(address)\", newComptroller)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\n * @dev Admin function to accrue interest and update the interest rate model\n * @param newInterestRateModel The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) {\n bytes memory data = delegateToImplementation(\n abi.encodeWithSignature(\"_setInterestRateModel(address)\", newInterestRateModel)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Delegates execution to the implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\n return delegateTo(implementation, data);\n }\n\n /**\n * @notice Delegates execution to an implementation contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\n (bool success, bytes memory returnData) = address(this).staticcall(\n abi.encodeWithSignature(\"delegateToImplementation(bytes)\", data)\n );\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return abi.decode(returnData, (bytes));\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n bytes memory data = delegateToViewImplementation(\n abi.encodeWithSignature(\"borrowBalanceStored(address)\", account)\n );\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\"exchangeRateStored()\"));\n return abi.decode(data, (uint));\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBep20Immutable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VBep20.sol\";\n\n/**\n * @title Venus's VBep20Immutable Contract\n * @notice VTokens which wrap an EIP-20 underlying and are immutable\n * @author Venus\n */\ncontract VBep20Immutable is VBep20 {\n /**\n * @notice Construct a new money market\n * @param underlying_ The address of the underlying asset\n * @param comptroller_ The address of the comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n address underlying_,\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // Initialize the market\n initialize(\n underlying_,\n comptroller_,\n interestRateModel_,\n initialExchangeRateMantissa_,\n name_,\n symbol_,\n decimals_\n );\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n}\n" + }, + "contracts/Tokens/VTokens/VBNB.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VToken.sol\";\n\n/**\n * @title Venus's vBNB Contract\n * @notice vToken which wraps BNB\n * @author Venus\n */\ncontract VBNB is VToken {\n /**\n * @notice Construct a new vBNB money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ BEP-20 name of this token\n * @param symbol_ BEP-20 symbol of this token\n * @param decimals_ BEP-20 decimal precision of this token\n * @param admin_ Address of the administrator of this token\n */\n constructor(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n address payable admin_\n ) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n initialize(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_);\n\n // Set the proper admin now that initialization is done\n admin = admin_;\n }\n\n /**\n * @notice Send BNB to VBNB to mint\n */\n function() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /*** User Interface ***/\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Reverts upon any failure\n */\n // @custom:event Emits Transfer event\n // @custom:event Emits Mint event\n function mint() external payable {\n (uint err, ) = mintInternal(msg.value);\n requireNoError(err, \"mint failed\");\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for the underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeem(uint redeemTokens) external returns (uint) {\n return redeemInternal(msg.sender, msg.sender, redeemTokens);\n }\n\n /**\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemAmount The amount of underlying to redeem\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Redeem event on success\n // @custom:event Emits Transfer event on success\n // @custom:event Emits RedeemFee when fee is charged by the treasury\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\n return redeemUnderlyingInternal(msg.sender, msg.sender, redeemAmount);\n }\n\n /**\n * @notice Sender borrows assets from the protocol to their own address\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Borrow event on success\n function borrow(uint borrowAmount) external returns (uint) {\n return borrowInternal(msg.sender, msg.sender, borrowAmount);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @dev Reverts upon any failure\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrow() external payable {\n (uint err, ) = repayBorrowInternal(msg.value);\n requireNoError(err, \"repayBorrow failed\");\n }\n\n /**\n * @notice Sender repays a borrow belonging to borrower\n * @dev Reverts upon any failure\n * @param borrower The account with the debt being payed off\n */\n // @custom:event Emits RepayBorrow event on success\n function repayBorrowBehalf(address borrower) external payable {\n (uint err, ) = repayBorrowBehalfInternal(borrower, msg.value);\n requireNoError(err, \"repayBorrowBehalf failed\");\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @dev Reverts upon any failure\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n */\n // @custom:event Emit LiquidateBorrow event on success\n function liquidateBorrow(address borrower, VToken vTokenCollateral) external payable {\n (uint err, ) = liquidateBorrowInternal(borrower, msg.value, vTokenCollateral);\n requireNoError(err, \"liquidateBorrow failed\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Perform the actual transfer in, which is a no-op\n * @param from Address sending the BNB\n * @param amount Amount of BNB being sent\n * @return The actual amount of BNB transferred\n */\n function doTransferIn(address from, uint amount) internal returns (uint) {\n // Sanity checks\n require(msg.sender == from, \"sender mismatch\");\n require(msg.value == amount, \"value mismatch\");\n return amount;\n }\n\n function doTransferOut(address payable to, uint amount) internal {\n /* Send the BNB, with minimal gas and revert on failure */\n to.transfer(amount);\n }\n\n /**\n * @notice Gets balance of this contract in terms of BNB, before this message\n * @dev This excludes the value of the current message, if any\n * @return The quantity of BNB owned by this contract\n */\n function getCashPrior() internal view returns (uint) {\n (MathError err, uint startingBalance) = subUInt(address(this).balance, msg.value);\n require(err == MathError.NO_ERROR, \"cash prior math error\");\n return startingBalance;\n }\n\n function requireNoError(uint errCode, string memory message) internal pure {\n if (errCode == uint(Error.NO_ERROR)) {\n return;\n }\n\n bytes memory fullMessage = new bytes(bytes(message).length + 5);\n uint i;\n\n for (i = 0; i < bytes(message).length; i++) {\n fullMessage[i] = bytes(message)[i];\n }\n\n fullMessage[i + 0] = bytes1(uint8(32));\n fullMessage[i + 1] = bytes1(uint8(40));\n fullMessage[i + 2] = bytes1(uint8(48 + (errCode / 10)));\n fullMessage[i + 3] = bytes1(uint8(48 + (errCode % 10)));\n fullMessage[i + 4] = bytes1(uint8(41));\n\n require(errCode == uint(Error.NO_ERROR), string(fullMessage));\n }\n}\n" + }, + "contracts/Tokens/VTokens/VToken.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../Utils/ErrorReporter.sol\";\nimport \"../../Utils/Exponential.sol\";\nimport \"../../Tokens/EIP20Interface.sol\";\nimport \"../../Tokens/EIP20NonStandardInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\nimport \"./VTokenInterfaces.sol\";\nimport { IAccessControlManagerV5 } from \"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV5.sol\";\n\n/**\n * @title Venus's vToken Contract\n * @notice Abstract base for vTokens\n * @author Venus\n */\ncontract VToken is VTokenInterface, Exponential, TokenErrorReporter {\n struct MintLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint mintTokens;\n uint totalSupplyNew;\n uint accountTokensNew;\n uint actualMintAmount;\n }\n\n struct RedeemLocalVars {\n MathError mathErr;\n uint exchangeRateMantissa;\n uint redeemTokens;\n uint redeemAmount;\n uint totalSupplyNew;\n uint accountTokensNew;\n }\n\n struct BorrowLocalVars {\n MathError mathErr;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n }\n\n struct RepayBorrowLocalVars {\n Error err;\n MathError mathErr;\n uint repayAmount;\n uint borrowerIndex;\n uint accountBorrows;\n uint accountBorrowsNew;\n uint totalBorrowsNew;\n uint actualRepayAmount;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transfer(address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param amount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n // @custom:event Emits Transfer event\n function transferFrom(address src, address dst, uint256 amount) external nonReentrant returns (bool) {\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n * @param spender The address of the account which may transfer tokens\n * @param amount The number of tokens that are approved (-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n // @custom:event Emits Approval event on successful approve\n function approve(address spender, uint256 amount) external returns (bool) {\n transferAllowances[msg.sender][spender] = amount;\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the underlying balance of the `owner`\n * @dev This also accrues interest in a transaction\n * @param owner The address of the account to query\n * @return The amount of underlying owned by `owner`\n */\n function balanceOfUnderlying(address owner) external returns (uint) {\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\n ensureNoMathError(mErr);\n return balance;\n }\n\n /**\n * @notice Returns the current total borrows plus accrued interest\n * @return The total borrows with interest\n */\n function totalBorrowsCurrent() external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return totalBorrows;\n }\n\n /**\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\n * @param account The address whose balance should be calculated after updating borrowIndex\n * @return The calculated balance\n */\n function borrowBalanceCurrent(address account) external nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return borrowBalanceStored(account);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Will fail unless called by another vToken during the process of liquidation.\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits Transfer event\n function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) {\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) {\n // Check caller = admin\n ensureAdmin(msg.sender);\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewAdmin event on successful acceptance\n // @custom:event Emits NewPendingAdmin event with null new pending admin\n function _acceptAdmin() external returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\n * @dev Governor function to accrue interest and set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewReserveFactor event\n function _setReserveFactor(uint newReserveFactorMantissa_) external nonReentrant returns (uint) {\n ensureAllowed(\"_setReserveFactor(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\n }\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\n return _setReserveFactorFresh(newReserveFactorMantissa_);\n }\n\n /**\n * @notice Sets the address of the access control manager of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlManagerAddress New address for the access control\n * @return uint 0=success, otherwise will revert\n */\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ensureNonZeroAddress(newAccessControlManagerAddress);\n\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\n accessControlManager = newAccessControlManagerAddress;\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\n * @param reduceAmount_ Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits ReservesReduced event\n function _reduceReserves(uint reduceAmount_) external nonReentrant returns (uint) {\n ensureAllowed(\"_reduceReserves(uint256)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // If reserves were reduced in accrueInterest\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\n return _reduceReservesFresh(reduceAmount_);\n }\n\n /**\n * @notice Get the current allowance from `owner` for `spender`\n * @param owner The address of the account which owns the tokens to be spent\n * @param spender The address of the account which may transfer tokens\n * @return The number of tokens allowed to be spent (-1 means infinite)\n */\n function allowance(address owner, address spender) external view returns (uint256) {\n return transferAllowances[owner][spender];\n }\n\n /**\n * @notice Get the token balance of the `owner`\n * @param owner The address of the account to query\n * @return The number of tokens owned by `owner`\n */\n function balanceOf(address owner) external view returns (uint256) {\n return accountTokens[owner];\n }\n\n /**\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\n * @param account Address of the account to snapshot\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\n */\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) {\n uint vTokenBalance = accountTokens[account];\n uint borrowBalance;\n uint exchangeRateMantissa;\n\n MathError mErr;\n\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\n if (mErr != MathError.NO_ERROR) {\n return (uint(Error.MATH_ERROR), 0, 0, 0);\n }\n\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\n }\n\n /**\n * @notice Returns the current per-block supply interest rate for this vToken\n * @return The supply interest rate per block, scaled by 1e18\n */\n function supplyRatePerBlock() external view returns (uint) {\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\n }\n\n /**\n * @notice Returns the current per-block borrow interest rate for this vToken\n * @return The borrow interest rate per block, scaled by 1e18\n */\n function borrowRatePerBlock() external view returns (uint) {\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\n }\n\n /**\n * @notice Get cash balance of this vToken in the underlying asset\n * @return The quantity of underlying asset owned by this contract\n */\n function getCash() external view returns (uint) {\n return getCashPrior();\n }\n\n /**\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\n * @param newReduceReservesBlockDelta_ block difference value\n */\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\n require(newReduceReservesBlockDelta_ > 0, \"Invalid Input\");\n ensureAllowed(\"setReduceReservesBlockDelta(uint256)\");\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protcolShareReserve_ The address of protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\n // Check caller is admin\n ensureAdmin(msg.sender);\n ensureNonZeroAddress(protcolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\n protocolShareReserve = protcolShareReserve_;\n }\n\n /**\n * @notice Initialize the money market\n * @param comptroller_ The address of the Comptroller\n * @param interestRateModel_ The address of the interest rate model\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\n * @param name_ EIP-20 name of this token\n * @param symbol_ EIP-20 symbol of this token\n * @param decimals_ EIP-20 decimal precision of this token\n */\n function initialize(\n ComptrollerInterface comptroller_,\n InterestRateModel interestRateModel_,\n uint initialExchangeRateMantissa_,\n string memory name_,\n string memory symbol_,\n uint8 decimals_\n ) public {\n ensureAdmin(msg.sender);\n require(accrualBlockNumber == 0 && borrowIndex == 0, \"market may only be initialized once\");\n\n // Set initial exchange rate\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\n require(initialExchangeRateMantissa > 0, \"initial exchange rate must be greater than zero.\");\n\n // Set the comptroller\n uint err = _setComptroller(comptroller_);\n require(err == uint(Error.NO_ERROR), \"setting comptroller failed\");\n\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\n accrualBlockNumber = block.number;\n borrowIndex = mantissaOne;\n\n // Set the interest rate model (depends on block number / borrow index)\n err = _setInterestRateModelFresh(interestRateModel_);\n require(err == uint(Error.NO_ERROR), \"setting interest rate model failed\");\n\n name = name_;\n symbol = symbol_;\n decimals = decimals_;\n\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\n _notEntered = true;\n }\n\n /**\n * @notice Accrue interest then return the up-to-date exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateCurrent() public nonReentrant returns (uint) {\n require(accrueInterest() == uint(Error.NO_ERROR), \"accrue interest failed\");\n return exchangeRateStored();\n }\n\n /**\n * @notice Applies accrued interest to total borrows and reserves\n * @dev This calculates interest accrued from the last checkpointed block\n * up to the current block and writes new checkpoint to storage and\n * reduce spread reserves to protocol share reserve\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\n */\n // @custom:event Emits AccrueInterest event\n function accrueInterest() public returns (uint) {\n /* Remember the initial block number */\n uint currentBlockNumber = block.number;\n uint accrualBlockNumberPrior = accrualBlockNumber;\n\n /* Short-circuit accumulating 0 interest */\n if (accrualBlockNumberPrior == currentBlockNumber) {\n return uint(Error.NO_ERROR);\n }\n\n /* Read the previous values out of storage */\n uint cashPrior = getCashPrior();\n uint borrowsPrior = totalBorrows;\n uint reservesPrior = totalReserves;\n uint borrowIndexPrior = borrowIndex;\n\n /* Calculate the current borrow interest rate */\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\n require(borrowRateMantissa <= borrowRateMaxMantissa, \"borrow rate is absurdly high\");\n\n /* Calculate the number of blocks elapsed since the last accrual */\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\n ensureNoMathError(mathErr);\n\n /*\n * Calculate the interest accumulated into borrows and reserves and the new index:\n * simpleInterestFactor = borrowRate * blockDelta\n * interestAccumulated = simpleInterestFactor * totalBorrows\n * totalBorrowsNew = interestAccumulated + totalBorrows\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\n */\n\n Exp memory simpleInterestFactor;\n uint interestAccumulated;\n uint totalBorrowsNew;\n uint totalReservesNew;\n uint borrowIndexNew;\n\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\n Exp({ mantissa: reserveFactorMantissa }),\n interestAccumulated,\n reservesPrior\n );\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\n if (mathErr != MathError.NO_ERROR) {\n return\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n uint(mathErr)\n );\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accrualBlockNumber = currentBlockNumber;\n borrowIndex = borrowIndexNew;\n totalBorrows = totalBorrowsNew;\n totalReserves = totalReservesNew;\n\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\n ensureNoMathError(mathErr);\n if (blockDelta >= reduceReservesBlockDelta) {\n reduceReservesBlockNumber = currentBlockNumber;\n if (cashPrior < totalReservesNew) {\n _reduceReservesFresh(cashPrior);\n } else {\n _reduceReservesFresh(totalReservesNew);\n }\n }\n\n /* We emit an AccrueInterest event */\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new comptroller for the market\n * @dev Admin function to set a new comptroller\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // @custom:event Emits NewComptroller event\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint) {\n // Check caller is admin\n ensureAdmin(msg.sender);\n\n ComptrollerInterface oldComptroller = comptroller;\n // Ensure invoke comptroller.isComptroller() returns true\n require(newComptroller.isComptroller(), \"marker method returned false\");\n\n // Set market's comptroller to newComptroller\n comptroller = newComptroller;\n\n // Emit NewComptroller(oldComptroller, newComptroller)\n emit NewComptroller(oldComptroller, newComptroller);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\n * @dev Governance function to accrue interest and update the interest rate model\n * @param newInterestRateModel_ The new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModel(InterestRateModel newInterestRateModel_) public returns (uint) {\n ensureAllowed(\"_setInterestRateModel(address)\");\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\n }\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\n return _setInterestRateModelFresh(newInterestRateModel_);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the VToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Calculated exchange rate scaled by 1e18\n */\n function exchangeRateStored() public view returns (uint) {\n (MathError err, uint result) = exchangeRateStoredInternal();\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return The calculated balance\n */\n function borrowBalanceStored(address account) public view returns (uint) {\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\n ensureNoMathError(err);\n return result;\n }\n\n /**\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\n * @dev Called by both `transfer` and `transferFrom` internally\n * @param spender The address of the account performing the transfer\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param tokens The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\n /* Fail if transfer not allowed */\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Do not allow self-transfers */\n if (src == dst) {\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n /* Get the allowance, infinite for the account owner */\n uint startingAllowance = 0;\n if (spender == src) {\n startingAllowance = uint(-1);\n } else {\n startingAllowance = transferAllowances[src][spender];\n }\n\n /* Do the calculations, checking for {under,over}flow */\n MathError mathErr;\n uint allowanceNew;\n uint srvTokensNew;\n uint dstTokensNew;\n\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\n }\n\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\n }\n\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\n if (mathErr != MathError.NO_ERROR) {\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n accountTokens[src] = srvTokensNew;\n accountTokens[dst] = dstTokensNew;\n\n /* Eat some of the allowance (if necessary) */\n if (startingAllowance != uint(-1)) {\n transferAllowances[src][spender] = allowanceNew;\n }\n\n /* We emit a Transfer event */\n emit Transfer(src, dst, tokens);\n\n comptroller.transferVerify(address(this), src, dst, tokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender supplies assets into the market and receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintFresh(msg.sender, mintAmount);\n }\n\n /**\n * @notice User supplies assets into the market and receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param minter The address of the account which is supplying the assets\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the minter and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[minter] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[minter] = vars.accountTokensNew;\n\n /* We emit a Mint event, and a Transfer event */\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), minter, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param receiver The address of the account which is receiving the vTokens\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\n }\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\n }\n\n /**\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\n * @dev Assumes interest has already been accrued up to the current block\n * @param payer The address of the account which is paying the underlying token\n * @param receiver The address of the account which is receiving vToken\n * @param mintAmount The amount of the underlying asset to supply\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\n */\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\n ensureNonZeroAddress(receiver);\n /* Fail if mint not allowed */\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\n }\n\n MintLocalVars memory vars;\n\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n if (vars.mathErr != MathError.NO_ERROR) {\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call `doTransferIn` for the payer and the mintAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\n * side-effects occurred. The function returns the amount actually transferred,\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\n * of cash.\n */\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\n\n /*\n * We get the current exchange rate and calculate the number of vTokens to be minted:\n * mintTokens = actualMintAmount / exchangeRate\n */\n\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\n vars.actualMintAmount,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n /*\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\n * totalSupplyNew = totalSupply + mintTokens\n * accountTokensNew = accountTokens[receiver] + mintTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\n ensureNoMathError(vars.mathErr);\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[receiver] = vars.accountTokensNew;\n\n /* We emit a MintBehalf event, and a Transfer event */\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\n emit Transfer(address(this), receiver, vars.mintTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\n\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokens The number of vTokens to redeem into underlying\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemInternal(\n address redeemer,\n address payable receiver,\n uint redeemTokens\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\n }\n\n /**\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens, if called by a delegate\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function redeemUnderlyingInternal(\n address redeemer,\n address payable receiver,\n uint redeemAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\n }\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\n }\n\n /**\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\n * @dev Assumes interest has already been accrued up to the current block\n * @param redeemer The address of the account which is redeeming the tokens\n * @param receiver The receiver of the tokens\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n // solhint-disable-next-line code-complexity\n function redeemFresh(\n address redeemer,\n address payable receiver,\n uint redeemTokensIn,\n uint redeemAmountIn\n ) internal returns (uint) {\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \"one of redeemTokensIn or redeemAmountIn must be zero\");\n\n RedeemLocalVars memory vars;\n\n /* exchangeRate = invoke Exchange Rate Stored() */\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\n ensureNoMathError(vars.mathErr);\n\n /* If redeemTokensIn > 0: */\n if (redeemTokensIn > 0) {\n /*\n * We calculate the exchange rate and the amount of underlying to be redeemed:\n * redeemTokens = redeemTokensIn\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\n */\n vars.redeemTokens = redeemTokensIn;\n\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\n Exp({ mantissa: vars.exchangeRateMantissa }),\n redeemTokensIn\n );\n ensureNoMathError(vars.mathErr);\n } else {\n /*\n * We get the current exchange rate and calculate the amount to be redeemed:\n * redeemTokens = redeemAmountIn / exchangeRate\n * redeemAmount = redeemAmountIn\n */\n\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\n redeemAmountIn,\n Exp({ mantissa: vars.exchangeRateMantissa })\n );\n ensureNoMathError(vars.mathErr);\n\n vars.redeemAmount = redeemAmountIn;\n }\n\n /* Fail if redeem not allowed */\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /*\n * We calculate the new total supply and redeemer balance, checking for underflow:\n * totalSupplyNew = totalSupply - redeemTokens\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\n */\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\n ensureNoMathError(vars.mathErr);\n\n /* Fail gracefully if protocol has insufficient cash */\n if (getCashPrior() < vars.redeemAmount) {\n revert(\"math error\");\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write previously calculated values into storage */\n totalSupply = vars.totalSupplyNew;\n accountTokens[redeemer] = vars.accountTokensNew;\n\n /*\n * We invoke doTransferOut for the receiver and the redeemAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken has redeemAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n\n uint feeAmount;\n uint remainedAmount;\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\n (vars.mathErr, feeAmount) = mulUInt(\n vars.redeemAmount,\n IComptroller(address(comptroller)).treasuryPercent()\n );\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\n ensureNoMathError(vars.mathErr);\n\n doTransferOut(address(uint160(IComptroller(address(comptroller)).treasuryAddress())), feeAmount);\n\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\n } else {\n remainedAmount = vars.redeemAmount;\n }\n\n doTransferOut(receiver, remainedAmount);\n\n /* We emit a Transfer event, and a Redeem event */\n emit Transfer(redeemer, address(this), vars.redeemTokens);\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function borrowInternal(\n address borrower,\n address payable receiver,\n uint borrowAmount\n ) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\n }\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\n return borrowFresh(borrower, receiver, borrowAmount);\n }\n\n /**\n * @notice Receiver gets the borrow on behalf of the borrower address\n * @dev Before calling this function, ensure that the interest has been accrued\n * @param borrower The borrower, on behalf of whom to borrow\n * @param receiver The account that would receive the funds (can be the same as the borrower)\n * @param borrowAmount The amount of the underlying asset to borrow\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\n */\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\n /* Revert if borrow not allowed */\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\n if (allowed != 0) {\n revert(\"math error\");\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n revert(\"math error\");\n }\n\n /* Revert if protocol has insufficient underlying cash */\n if (getCashPrior() < borrowAmount) {\n revert(\"math error\");\n }\n\n BorrowLocalVars memory vars;\n\n /*\n * We calculate the new borrower and total borrow balances, failing on overflow:\n * accountBorrowsNew = accountBorrows + borrowAmount\n * totalBorrowsNew = totalBorrows + borrowAmount\n */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\n ensureNoMathError(vars.mathErr);\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /*\n * We invoke doTransferOut for the receiver and the borrowAmount.\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken borrowAmount less of cash.\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n */\n doTransferOut(receiver, borrowAmount);\n\n /* We emit a Borrow event */\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sender repays their own borrow\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\n }\n\n /**\n * @notice Sender repays a borrow belonging to another borrowing account\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\n }\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\n }\n\n /**\n * @notice Borrows are repaid by another user (possibly the borrower).\n * @param payer The account paying off the borrow\n * @param borrower The account with the debt being payed off\n * @param repayAmount The amount of undelrying tokens being returned\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\n /* Fail if repayBorrow not allowed */\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\n if (allowed != 0) {\n return (\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\n 0\n );\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\n }\n\n RepayBorrowLocalVars memory vars;\n\n /* We remember the original borrowerIndex for verification purposes */\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\n\n /* We fetch the amount the borrower owes, with accumulated interest */\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\n if (vars.mathErr != MathError.NO_ERROR) {\n return (\n failOpaque(\n Error.MATH_ERROR,\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n uint(vars.mathErr)\n ),\n 0\n );\n }\n\n /* If repayAmount == -1, repayAmount = accountBorrows */\n if (repayAmount == uint(-1)) {\n vars.repayAmount = vars.accountBorrows;\n } else {\n vars.repayAmount = repayAmount;\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the payer and the repayAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional repayAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\n\n /*\n * We calculate the new borrower and total borrow balances, failing on underflow:\n * accountBorrowsNew = accountBorrows - actualRepayAmount\n * totalBorrowsNew = totalBorrows - actualRepayAmount\n */\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\n ensureNoMathError(vars.mathErr);\n\n /* We write the previously calculated values into storage */\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\n accountBorrows[borrower].interestIndex = borrowIndex;\n totalBorrows = vars.totalBorrowsNew;\n\n /* We emit a RepayBorrow event */\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\n\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\n }\n\n /**\n * @notice The sender liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n function liquidateBorrowInternal(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal nonReentrant returns (uint, uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\n }\n\n error = vTokenCollateral.accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\n }\n\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\n }\n\n /**\n * @notice The liquidator liquidates the borrowers collateral.\n * The collateral seized is transferred to the liquidator.\n * @param borrower The borrower of this vToken to be liquidated\n * @param liquidator The address repaying the borrow and seizing collateral\n * @param vTokenCollateral The market in which to seize collateral from the borrower\n * @param repayAmount The amount of the underlying borrowed asset to repay\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\n */\n // solhint-disable-next-line code-complexity\n function liquidateBorrowFresh(\n address liquidator,\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) internal returns (uint, uint) {\n /* Fail if liquidate not allowed */\n uint allowed = comptroller.liquidateBorrowAllowed(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n repayAmount\n );\n if (allowed != 0) {\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\n }\n\n /* Verify market's block number equals current block number */\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\n }\n\n /* Verify vTokenCollateral market's block number equals current block number */\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\n }\n\n /* Fail if repayAmount = 0 */\n if (repayAmount == 0) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\n }\n\n /* Fail if repayAmount = -1 */\n if (repayAmount == uint(-1)) {\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\n }\n\n /* Fail if repayBorrow fails */\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\n if (repayBorrowError != uint(Error.NO_ERROR)) {\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We calculate the number of collateral tokens that will be seized */\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\n address(this),\n address(vTokenCollateral),\n actualRepayAmount\n );\n require(amountSeizeError == uint(Error.NO_ERROR), \"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\");\n\n /* Revert if borrower collateral token balance < seizeTokens */\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \"LIQUIDATE_SEIZE_TOO_MUCH\");\n\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\n uint seizeError;\n if (address(vTokenCollateral) == address(this)) {\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\n } else {\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\n }\n\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\n require(seizeError == uint(Error.NO_ERROR), \"token seizure failed\");\n\n /* We emit a LiquidateBorrow event */\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.liquidateBorrowVerify(\n address(this),\n address(vTokenCollateral),\n liquidator,\n borrower,\n actualRepayAmount,\n seizeTokens\n );\n\n return (uint(Error.NO_ERROR), actualRepayAmount);\n }\n\n /**\n * @notice Transfers collateral tokens (this market) to the liquidator.\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\n * @param liquidator The account receiving seized collateral\n * @param borrower The account having collateral seized\n * @param seizeTokens The number of vTokens to seize\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function seizeInternal(\n address seizerToken,\n address liquidator,\n address borrower,\n uint seizeTokens\n ) internal returns (uint) {\n /* Fail if seize not allowed */\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\n if (allowed != 0) {\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\n }\n\n /* Fail if borrower = liquidator */\n if (borrower == liquidator) {\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\n }\n\n MathError mathErr;\n uint borrowerTokensNew;\n uint liquidatorTokensNew;\n\n /*\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\n */\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\n }\n\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\n if (mathErr != MathError.NO_ERROR) {\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /* We write the previously calculated values into storage */\n accountTokens[borrower] = borrowerTokensNew;\n accountTokens[liquidator] = liquidatorTokensNew;\n\n /* Emit a Transfer event */\n emit Transfer(borrower, liquidator, seizeTokens);\n\n /* We call the defense and prime accrue interest hook */\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\n * @dev Governance function to set a new reserve factor\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\n // Verify market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\n }\n\n // Check newReserveFactor ≤ maxReserveFactor\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\n }\n\n uint oldReserveFactorMantissa = reserveFactorMantissa;\n reserveFactorMantissa = newReserveFactorMantissa;\n\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\n * @param addAmount Amount of addition to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\n uint error = accrueInterest();\n if (error != uint(Error.NO_ERROR)) {\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\n }\n\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\n (error, ) = _addReservesFresh(addAmount);\n return error;\n }\n\n /**\n * @notice Add reserves by transferring from caller\n * @dev Requires fresh interest accrual\n * @param addAmount Amount of addition to reserves\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\n */\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\n // totalReserves + actualAddAmount\n uint totalReservesNew;\n uint actualAddAmount;\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n /*\n * We call doTransferIn for the caller and the addAmount\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\n * On success, the vToken holds an additional addAmount of cash.\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\n * it returns the amount actually transferred, in case of a fee.\n */\n\n actualAddAmount = doTransferIn(msg.sender, addAmount);\n\n totalReservesNew = totalReserves + actualAddAmount;\n\n /* Revert on overflow */\n require(totalReservesNew >= totalReserves, \"add reserves unexpected overflow\");\n\n // Store reserves[n+1] = reserves[n] + actualAddAmount\n totalReserves = totalReservesNew;\n\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\n\n /* Return (NO_ERROR, actualAddAmount) */\n return (uint(Error.NO_ERROR), actualAddAmount);\n }\n\n /**\n * @notice Reduces reserves by transferring to protocol share reserve contract\n * @dev Requires fresh interest accrual\n * @param reduceAmount Amount of reduction to reserves\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _reduceReservesFresh(uint reduceAmount) internal returns (uint) {\n if (reduceAmount == 0) {\n return uint(Error.NO_ERROR);\n }\n\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\n }\n\n // Fail gracefully if protocol has insufficient underlying cash\n if (getCashPrior() < reduceAmount) {\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\n }\n\n // Check reduceAmount ≤ reserves[n] (totalReserves)\n if (reduceAmount > totalReserves) {\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\n }\n\n /////////////////////////\n // EFFECTS & INTERACTIONS\n // (No safe failures beyond this point)\n\n // totalReserves - reduceAmount\n uint totalReservesNew = totalReserves - reduceAmount;\n\n // Store reserves[n+1] = reserves[n] - reduceAmount\n totalReserves = totalReservesNew;\n\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\n doTransferOut(protocolShareReserve, reduceAmount);\n\n IProtocolShareReserveV5(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserveV5.IncomeType.SPREAD\n );\n\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice updates the interest rate model (requires fresh interest accrual)\n * @dev Governance function to update the interest rate model\n * @param newInterestRateModel the new interest rate model to use\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\n */\n function _setInterestRateModelFresh(InterestRateModel newInterestRateModel) internal returns (uint) {\n // Used to store old model for use in the event that is emitted on success\n InterestRateModel oldInterestRateModel;\n // We fail gracefully unless market's block number equals current block number\n if (accrualBlockNumber != block.number) {\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\n }\n\n // Track the market's current interest rate model\n oldInterestRateModel = interestRateModel;\n\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\n require(newInterestRateModel.isInterestRateModel(), \"marker method returned false\");\n\n // Set the interest rate model to newInterestRateModel\n interestRateModel = newInterestRateModel;\n\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\n\n return uint(Error.NO_ERROR);\n }\n\n /*** Safe Token ***/\n\n /**\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\n * This may revert due to insufficient balance or insufficient allowance.\n */\n function doTransferIn(address from, uint amount) internal returns (uint);\n\n /**\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\n */\n function doTransferOut(address payable to, uint amount) internal;\n\n /**\n * @notice Return the borrow balance of account based on stored data\n * @param account The address whose balance should be calculated\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\n */\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\n /* Note: we do not assert that the market is up to date */\n MathError mathErr;\n uint principalTimesIndex;\n uint result;\n\n /* Get borrowBalance and borrowIndex */\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\n\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\n */\n if (borrowSnapshot.principal == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n /* Calculate new borrow balance using the interest index:\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\n */\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, result);\n }\n\n /**\n * @notice Calculates the exchange rate from the underlying to the vToken\n * @dev This function does not accrue interest before calculating the exchange rate\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\n */\n function exchangeRateStoredInternal() internal view returns (MathError, uint) {\n uint _totalSupply = totalSupply;\n if (_totalSupply == 0) {\n /*\n * If there are no tokens minted:\n * exchangeRate = initialExchangeRate\n */\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\n } else {\n /*\n * Otherwise:\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\n */\n uint totalCash = getCashPrior();\n uint cashPlusBorrowsMinusReserves;\n Exp memory exchangeRate;\n MathError mathErr;\n\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\n if (mathErr != MathError.NO_ERROR) {\n return (mathErr, 0);\n }\n\n return (MathError.NO_ERROR, exchangeRate.mantissa);\n }\n }\n\n function ensureAllowed(string memory functionSig) private view {\n require(\n IAccessControlManagerV5(accessControlManager).isAllowedToCall(msg.sender, functionSig),\n \"access denied\"\n );\n }\n\n function ensureAdmin(address caller_) private view {\n require(caller_ == admin, \"Unauthorized\");\n }\n\n function ensureNoMathError(MathError mErr) private pure {\n require(mErr == MathError.NO_ERROR, \"math error\");\n }\n\n function ensureNonZeroAddress(address address_) private pure {\n require(address_ != address(0), \"zero address\");\n }\n\n /*** Safe Token ***/\n\n /**\n * @notice Gets balance of this contract in terms of the underlying\n * @dev This excludes the value of the current message, if any\n * @return The quantity of underlying owned by this contract\n */\n function getCashPrior() internal view returns (uint);\n}\n" + }, + "contracts/Tokens/VTokens/VTokenInterfaces.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Comptroller/ComptrollerInterface.sol\";\nimport \"../../InterestRateModels/InterestRateModel.sol\";\n\ninterface IProtocolShareReserveV5 {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ncontract VTokenStorageBase {\n /**\n * @notice Container for borrow balance information\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\n */\n struct BorrowSnapshot {\n uint principal;\n uint interestIndex;\n }\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n bool internal _notEntered;\n\n /**\n * @notice EIP-20 token name for this token\n */\n string public name;\n\n /**\n * @notice EIP-20 token symbol for this token\n */\n string public symbol;\n\n /**\n * @notice EIP-20 token decimals for this token\n */\n uint8 public decimals;\n\n /**\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\n */\n\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\n\n /**\n * @notice Maximum fraction of interest that can be set aside for reserves\n */\n uint internal constant reserveFactorMaxMantissa = 1e18;\n\n /**\n * @notice Administrator for this contract\n */\n address payable public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address payable public pendingAdmin;\n\n /**\n * @notice Contract which oversees inter-vToken operations\n */\n ComptrollerInterface public comptroller;\n\n /**\n * @notice Model which tells what the current interest rate should be\n */\n InterestRateModel public interestRateModel;\n\n /**\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\n */\n uint internal initialExchangeRateMantissa;\n\n /**\n * @notice Fraction of interest currently set aside for reserves\n */\n uint public reserveFactorMantissa;\n\n /**\n * @notice Block number that interest was last accrued at\n */\n uint public accrualBlockNumber;\n\n /**\n * @notice Accumulator of the total earned interest rate since the opening of the market\n */\n uint public borrowIndex;\n\n /**\n * @notice Total amount of outstanding borrows of the underlying in this market\n */\n uint public totalBorrows;\n\n /**\n * @notice Total amount of reserves of the underlying held in this market\n */\n uint public totalReserves;\n\n /**\n * @notice Total number of tokens in circulation\n */\n uint public totalSupply;\n\n /**\n * @notice Official record of token balances for each account\n */\n mapping(address => uint) internal accountTokens;\n\n /**\n * @notice Approved token transfer amounts on behalf of others\n */\n mapping(address => mapping(address => uint)) internal transferAllowances;\n\n /**\n * @notice Mapping of account addresses to outstanding borrow balances\n */\n mapping(address => BorrowSnapshot) internal accountBorrows;\n\n /**\n * @notice Underlying asset for this VToken\n */\n address public underlying;\n\n /**\n * @notice Implementation address for this contract\n */\n address public implementation;\n\n /**\n * @notice delta block after which reserves will be reduced\n */\n uint public reduceReservesBlockDelta;\n\n /**\n * @notice last block number at which reserves were reduced\n */\n uint public reduceReservesBlockNumber;\n\n /**\n * @notice address of protocol share reserve contract\n */\n address payable public protocolShareReserve;\n\n /**\n * @notice address of accessControlManager\n */\n\n address public accessControlManager;\n}\n\ncontract VTokenStorage is VTokenStorageBase {\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\ncontract VTokenInterface is VTokenStorage {\n /**\n * @notice Indicator that this is a vToken contract (for inspection)\n */\n bool public constant isVToken = true;\n\n /*** Market Events ***/\n\n /**\n * @notice Event emitted when interest is accrued\n */\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\n\n /**\n * @notice Event emitted when tokens are minted\n */\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are minted behalf by payer to receiver\n */\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed\n */\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\n\n /**\n * @notice Event emitted when tokens are redeemed and fee is transferred\n */\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\n\n /**\n * @notice Event emitted when underlying is borrowed\n */\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is repaid\n */\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\n\n /**\n * @notice Event emitted when a borrow is liquidated\n */\n event LiquidateBorrow(\n address liquidator,\n address borrower,\n uint repayAmount,\n address vTokenCollateral,\n uint seizeTokens\n );\n\n /*** Admin Events ***/\n\n /**\n * @notice Event emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n /**\n * @notice Event emitted when comptroller is changed\n */\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\n\n /**\n * @notice Event emitted when interestRateModel is changed\n */\n event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel);\n\n /**\n * @notice Event emitted when the reserve factor is changed\n */\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\n\n /**\n * @notice Event emitted when the reserves are added\n */\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\n\n /**\n * @notice Event emitted when the reserves are reduced\n */\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\n\n /**\n * @notice EIP20 Transfer event\n */\n event Transfer(address indexed from, address indexed to, uint amount);\n\n /**\n * @notice EIP20 Approval event\n */\n event Approval(address indexed owner, address indexed spender, uint amount);\n\n /**\n * @notice Event emitted when block delta for reduce reserves get updated\n */\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\n\n /**\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\n */\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\n\n /**\n * @notice Failure event\n */\n event Failure(uint error, uint info, uint detail);\n\n /// @notice Emitted when access control address is changed by admin\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\n\n /*** User Interface ***/\n\n function transfer(address dst, uint amount) external returns (bool);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function approve(address spender, uint amount) external returns (bool);\n\n function balanceOfUnderlying(address owner) external returns (uint);\n\n function totalBorrowsCurrent() external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint);\n\n /*** Admin Function ***/\n function _setPendingAdmin(address payable newPendingAdmin) external returns (uint);\n\n /*** Admin Function ***/\n function _acceptAdmin() external returns (uint);\n\n /*** Admin Function ***/\n function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint);\n\n /*** Admin Function ***/\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint);\n\n function borrowRatePerBlock() external view returns (uint);\n\n function supplyRatePerBlock() external view returns (uint);\n\n function getCash() external view returns (uint);\n\n function exchangeRateCurrent() public returns (uint);\n\n function accrueInterest() public returns (uint);\n\n /*** Admin Function ***/\n function _setComptroller(ComptrollerInterface newComptroller) public returns (uint);\n\n /*** Admin Function ***/\n function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint);\n\n function borrowBalanceStored(address account) public view returns (uint);\n\n function exchangeRateStored() public view returns (uint);\n}\n\ncontract VBep20Interface {\n /*** User Interface ***/\n\n function mint(uint mintAmount) external returns (uint);\n\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function redeem(uint redeemTokens) external returns (uint);\n\n function redeemUnderlying(uint redeemAmount) external returns (uint);\n\n function borrow(uint borrowAmount) external returns (uint);\n\n function repayBorrow(uint repayAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function liquidateBorrow(\n address borrower,\n uint repayAmount,\n VTokenInterface vTokenCollateral\n ) external returns (uint);\n\n /*** Admin Functions ***/\n\n function _addReserves(uint addAmount) external returns (uint);\n}\n\ncontract VDelegatorInterface {\n /**\n * @notice Emitted when implementation is changed\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\n */\n function _setImplementation(\n address implementation_,\n bool allowResign,\n bytes memory becomeImplementationData\n ) public;\n}\n\ncontract VDelegateInterface {\n /**\n * @notice Called by the delegator on a delegate to initialize it for duty\n * @dev Should revert if any issues arise which make it unfit for delegation\n * @param data The encoded bytes data for any initialization\n */\n function _becomeImplementation(bytes memory data) public;\n\n /**\n * @notice Called by the delegator on a delegate to forfeit its responsibility\n */\n function _resignImplementation() public;\n}\n" + }, + "contracts/Tokens/XVS/IXVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\ninterface IXVSVesting {\n /// @param _recipient Address of the Vesting. recipient entitled to claim the vested funds\n /// @param _amount Total number of tokens Vested\n function deposit(address _recipient, uint256 _amount) external;\n}\n" + }, + "contracts/Tokens/XVS/XVS.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/Tokenlock.sol\";\n\ncontract XVS is Tokenlock {\n /// @notice BEP-20 token name for this token\n string public constant name = \"Venus\";\n\n /// @notice BEP-20 token symbol for this token\n string public constant symbol = \"XVS\";\n\n /// @notice BEP-20 token decimals for this token\n uint8 public constant decimals = 18;\n\n /// @notice Total number of tokens in circulation\n uint public constant totalSupply = 30000000e18; // 30 million XVS\n\n /// @notice Allowance amounts on behalf of others\n mapping(address => mapping(address => uint96)) internal allowances;\n\n /// @notice Official record of token balances for each account\n mapping(address => uint96) internal balances;\n\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A checkpoint for marking number of votes from a given block\n struct Checkpoint {\n uint32 fromBlock;\n uint96 votes;\n }\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice The standard BEP-20 transfer event\n event Transfer(address indexed from, address indexed to, uint256 amount);\n\n /// @notice The standard BEP-20 approval event\n event Approval(address indexed owner, address indexed spender, uint256 amount);\n\n /**\n * @notice Construct a new XVS token\n * @param account The initial account to grant all the tokens\n */\n constructor(address account) public {\n balances[account] = uint96(totalSupply);\n emit Transfer(address(0), account, totalSupply);\n }\n\n /**\n * @notice Get the number of tokens `spender` is approved to spend on behalf of `account`\n * @param account The address of the account holding the funds\n * @param spender The address of the account spending the funds\n * @return The number of tokens approved\n */\n function allowance(address account, address spender) external view returns (uint) {\n return allowances[account][spender];\n }\n\n /**\n * @notice Approve `spender` to transfer up to `amount` from `src`\n * @dev This will overwrite the approval amount for `spender`\n * @param spender The address of the account which may transfer tokens\n * @param rawAmount The number of tokens that are approved (2^256-1 means infinite)\n * @return Whether or not the approval succeeded\n */\n function approve(address spender, uint rawAmount) external validLock returns (bool) {\n uint96 amount;\n if (rawAmount == uint(-1)) {\n amount = uint96(-1);\n } else {\n amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n }\n\n allowances[msg.sender][spender] = amount;\n\n emit Approval(msg.sender, spender, amount);\n return true;\n }\n\n /**\n * @notice Get the number of tokens held by the `account`\n * @param account The address of the account to get the balance of\n * @return The number of tokens held\n */\n function balanceOf(address account) external view returns (uint) {\n return balances[account];\n }\n\n /**\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transfer(address dst, uint rawAmount) external validLock returns (bool) {\n uint96 amount = safe96(rawAmount, \"XVS::transfer: amount exceeds 96 bits\");\n _transferTokens(msg.sender, dst, amount);\n return true;\n }\n\n /**\n * @notice Transfer `amount` tokens from `src` to `dst`\n * @param src The address of the source account\n * @param dst The address of the destination account\n * @param rawAmount The number of tokens to transfer\n * @return Whether or not the transfer succeeded\n */\n function transferFrom(address src, address dst, uint rawAmount) external validLock returns (bool) {\n address spender = msg.sender;\n uint96 spenderAllowance = allowances[src][spender];\n uint96 amount = safe96(rawAmount, \"XVS::approve: amount exceeds 96 bits\");\n\n if (spender != src && spenderAllowance != uint96(-1)) {\n uint96 newAllowance = sub96(\n spenderAllowance,\n amount,\n \"XVS::transferFrom: transfer amount exceeds spender allowance\"\n );\n allowances[src][spender] = newAllowance;\n\n emit Approval(src, spender, newAllowance);\n }\n\n _transferTokens(src, dst, amount);\n return true;\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) public validLock {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public validLock {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ecrecover(digest, v, r, s);\n require(signatory != address(0), \"XVS::delegateBySig: invalid signature\");\n require(nonce == nonces[signatory]++, \"XVS::delegateBySig: invalid nonce\");\n require(now <= expiry, \"XVS::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n /**\n * @notice Determine the prior number of votes for an account as of a block number\n * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.\n * @param account The address of the account to check\n * @param blockNumber The block number to get the vote balance at\n * @return The number of votes the account had as of the given block\n */\n function getPriorVotes(address account, uint blockNumber) public view returns (uint96) {\n require(blockNumber < block.number, \"XVS::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlock > blockNumber) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlock == blockNumber) {\n return cp.votes;\n } else if (cp.fromBlock < blockNumber) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = balances[delegator];\n delegates[delegator] = delegatee;\n\n emit DelegateChanged(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _transferTokens(address src, address dst, uint96 amount) internal {\n require(src != address(0), \"XVS::_transferTokens: cannot transfer from the zero address\");\n require(dst != address(0), \"XVS::_transferTokens: cannot transfer to the zero address\");\n\n balances[src] = sub96(balances[src], amount, \"XVS::_transferTokens: transfer amount exceeds balance\");\n balances[dst] = add96(balances[dst], amount, \"XVS::_transferTokens: transfer amount overflows\");\n emit Transfer(src, dst, amount);\n\n _moveDelegates(delegates[src], delegates[dst], amount);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVS::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVS::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumber = safe32(block.number, \"XVS::_writeCheckpoint: block number exceeds 32 bits\");\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChanged(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVesting.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/IBEP20.sol\";\nimport \"../../Utils/SafeBEP20.sol\";\nimport \"./XVSVestingStorage.sol\";\nimport \"./XVSVestingProxy.sol\";\n\n/**\n * @title Venus's XVSVesting Contract\n * @author Venus\n */\ncontract XVSVesting is XVSVestingStorage {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice total vesting period for 1 year in seconds\n uint256 public constant TOTAL_VESTING_TIME = 365 * 24 * 60 * 60;\n\n /// @notice decimal precision for XVS\n uint256 public constant xvsDecimalsMultiplier = 1e18;\n\n /// @notice Emitted when XVSVested is claimed by recipient\n event VestedTokensClaimed(address recipient, uint256 amountClaimed);\n\n /// @notice Emitted when vrtConversionAddress is set\n event VRTConversionSet(address vrtConversionAddress);\n\n /// @notice Emitted when XVS is deposited for vesting\n event XVSVested(address indexed recipient, uint256 startTime, uint256 amount, uint256 withdrawnAmount);\n\n /// @notice Emitted when XVS is withdrawn by recipient\n event XVSWithdrawn(address recipient, uint256 amount);\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n constructor() public {}\n\n /**\n * @notice initialize XVSVestingStorage\n * @param _xvsAddress The XVSToken address\n */\n function initialize(address _xvsAddress) public {\n require(msg.sender == admin, \"only admin may initialize the XVSVesting\");\n require(initialized == false, \"XVSVesting is already initialized\");\n require(_xvsAddress != address(0), \"_xvsAddress cannot be Zero\");\n xvs = IBEP20(_xvsAddress);\n\n _notEntered = true;\n initialized = true;\n }\n\n modifier isInitialized() {\n require(initialized == true, \"XVSVesting is not initialized\");\n _;\n }\n\n /**\n * @notice sets VRTConverter Address\n * @dev Note: If VRTConverter is not set, then Vesting is not allowed\n * @param _vrtConversionAddress The VRTConverterProxy Address\n */\n function setVRTConverter(address _vrtConversionAddress) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtConversionAddress != address(0), \"vrtConversionAddress cannot be Zero\");\n vrtConversionAddress = _vrtConversionAddress;\n emit VRTConversionSet(_vrtConversionAddress);\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyVrtConverter() {\n require(msg.sender == vrtConversionAddress, \"only VRTConversion Address can call the function\");\n _;\n }\n\n modifier vestingExistCheck(address recipient) {\n require(vestings[recipient].length > 0, \"recipient doesnot have any vestingRecord\");\n _;\n }\n\n /**\n * @notice Deposit XVS for Vesting\n * @param recipient The vesting recipient\n * @param depositAmount XVS amount for deposit\n */\n function deposit(\n address recipient,\n uint depositAmount\n ) external isInitialized onlyVrtConverter nonZeroAddress(recipient) {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n\n VestingRecord memory vesting = VestingRecord({\n recipient: recipient,\n startTime: getCurrentTime(),\n amount: depositAmount,\n withdrawnAmount: 0\n });\n\n vestingsOfRecipient.push(vesting);\n\n emit XVSVested(recipient, vesting.startTime, vesting.amount, vesting.withdrawnAmount);\n }\n\n /**\n * @notice Withdraw Vested XVS of recipient\n */\n function withdraw() external isInitialized vestingExistCheck(msg.sender) {\n address recipient = msg.sender;\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n uint256 totalWithdrawableAmount = 0;\n\n for (uint i = 0; i < vestingCount; ++i) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n if (toWithdraw > 0) {\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n vesting.withdrawnAmount = vesting.withdrawnAmount.add(toWithdraw);\n }\n }\n\n if (totalWithdrawableAmount > 0) {\n uint256 xvsBalance = xvs.balanceOf(address(this));\n require(xvsBalance >= totalWithdrawableAmount, \"Insufficient XVS for withdrawal\");\n emit XVSWithdrawn(recipient, totalWithdrawableAmount);\n xvs.safeTransfer(recipient, totalWithdrawableAmount);\n }\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param recipient The vesting recipient\n * @dev returns A tuple with totalWithdrawableAmount , totalVestedAmount and totalWithdrawnAmount\n */\n function getWithdrawableAmount(\n address recipient\n )\n public\n view\n isInitialized\n nonZeroAddress(recipient)\n vestingExistCheck(recipient)\n returns (uint256 totalWithdrawableAmount, uint256 totalVestedAmount, uint256 totalWithdrawnAmount)\n {\n VestingRecord[] storage vestingsOfRecipient = vestings[recipient];\n uint256 vestingCount = vestingsOfRecipient.length;\n\n for (uint i = 0; i < vestingCount; i++) {\n VestingRecord storage vesting = vestingsOfRecipient[i];\n (uint256 vestedAmount, uint256 toWithdraw) = calculateWithdrawableAmount(\n vesting.amount,\n vesting.startTime,\n vesting.withdrawnAmount\n );\n totalVestedAmount = totalVestedAmount.add(vestedAmount);\n totalWithdrawableAmount = totalWithdrawableAmount.add(toWithdraw);\n totalWithdrawnAmount = totalWithdrawnAmount.add(vesting.withdrawnAmount);\n }\n\n return (totalWithdrawableAmount, totalVestedAmount, totalWithdrawnAmount);\n }\n\n /**\n * @notice get Withdrawable XVS Amount\n * @param amount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param withdrawnAmount XVSAmount withdrawn from VestedAmount\n * @dev returns A tuple with vestedAmount and withdrawableAmount\n */\n function calculateWithdrawableAmount(\n uint256 amount,\n uint256 vestingStartTime,\n uint256 withdrawnAmount\n ) internal view returns (uint256, uint256) {\n uint256 vestedAmount = calculateVestedAmount(amount, vestingStartTime, getCurrentTime());\n uint toWithdraw = vestedAmount.sub(withdrawnAmount);\n return (vestedAmount, toWithdraw);\n }\n\n /**\n * @notice calculate total vested amount\n * @param vestingAmount Amount deposited for vesting\n * @param vestingStartTime time in epochSeconds at the time of vestingDeposit\n * @param currentTime currentTime in epochSeconds\n * @return Total XVS amount vested\n */\n function calculateVestedAmount(\n uint256 vestingAmount,\n uint256 vestingStartTime,\n uint256 currentTime\n ) internal view returns (uint256) {\n if (currentTime < vestingStartTime) {\n return 0;\n } else if (currentTime > vestingStartTime.add(TOTAL_VESTING_TIME)) {\n return vestingAmount;\n } else {\n return (vestingAmount.mul(currentTime.sub(vestingStartTime))).div(TOTAL_VESTING_TIME);\n }\n }\n\n /**\n * @notice current block timestamp\n * @return blocktimestamp\n */\n function getCurrentTime() public view returns (uint256) {\n return block.timestamp;\n }\n\n /*** Admin Functions ***/\n function _become(XVSVestingProxy xvsVestingProxy) public {\n require(msg.sender == xvsVestingProxy.admin(), \"only proxy admin can change brains\");\n xvsVestingProxy._acceptImplementation();\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVestingStorage.sol\";\n\ncontract XVSVestingProxy is XVSVestingAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means XVSVesting implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(\n address implementation_,\n address _xvsAddress\n ) public nonZeroAddress(implementation_) nonZeroAddress(_xvsAddress) {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(implementation_, abi.encodeWithSignature(\"initialize(address)\", _xvsAddress));\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"XVSVestingProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"XVSVestingProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal nonZeroAddress(callee) returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(\n address newPendingImplementation\n ) public nonZeroAddress(newPendingImplementation) {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public nonZeroAddress(newPendingAdmin) {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n require(newPendingAdmin != pendingAdmin, \"New pendingAdmin can not be same as the previous one\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/Tokens/XVS/XVSVestingStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../../Utils/SafeMath.sol\";\nimport \"../../Utils/IBEP20.sol\";\n\ncontract XVSVestingAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVSVesting\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVSVesting\n */\n address public pendingImplementation;\n}\n\ncontract XVSVestingStorage is XVSVestingAdminStorage {\n struct VestingRecord {\n address recipient;\n uint256 startTime;\n uint256 amount;\n uint256 withdrawnAmount;\n }\n\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice indicator to check if the contract is initialized\n bool public initialized;\n\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice VRTConversion Contract Address\n address public vrtConversionAddress;\n\n /// @notice mapping of VestingRecord(s) for user(s)\n mapping(address => VestingRecord[]) public vestings;\n}\n" + }, + "contracts/Utils/Address.sol": { + "content": "pragma solidity ^0.5.5;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\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 */\n function isContract(address account) internal view returns (bool) {\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n codehash := extcodehash(account)\n }\n return (codehash != accountHash && codehash != 0x0);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n // solium-disable-next-line security/no-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n" + }, + "contracts/Utils/CarefulMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Careful Math\n * @author Venus\n * @notice Derived from OpenZeppelin's SafeMath library\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\n */\ncontract CarefulMath {\n /**\n * @dev Possible error codes that we can return\n */\n enum MathError {\n NO_ERROR,\n DIVISION_BY_ZERO,\n INTEGER_OVERFLOW,\n INTEGER_UNDERFLOW\n }\n\n /**\n * @dev Multiplies two numbers, returns an error on overflow.\n */\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (a == 0) {\n return (MathError.NO_ERROR, 0);\n }\n\n uint c = a * b;\n\n if (c / a != b) {\n return (MathError.INTEGER_OVERFLOW, 0);\n } else {\n return (MathError.NO_ERROR, c);\n }\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b == 0) {\n return (MathError.DIVISION_BY_ZERO, 0);\n }\n\n return (MathError.NO_ERROR, a / b);\n }\n\n /**\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\n */\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\n if (b <= a) {\n return (MathError.NO_ERROR, a - b);\n } else {\n return (MathError.INTEGER_UNDERFLOW, 0);\n }\n }\n\n /**\n * @dev Adds two numbers, returns an error on overflow.\n */\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\n uint c = a + b;\n\n if (c >= a) {\n return (MathError.NO_ERROR, c);\n } else {\n return (MathError.INTEGER_OVERFLOW, 0);\n }\n }\n\n /**\n * @dev add a and b and then subtract c\n */\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\n (MathError err0, uint sum) = addUInt(a, b);\n\n if (err0 != MathError.NO_ERROR) {\n return (err0, 0);\n }\n\n return subUInt(sum, c);\n }\n}\n" + }, + "contracts/Utils/Context.sol": { + "content": "pragma solidity ^0.5.16;\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 GSN 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 */\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor() internal {}\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\n" + }, + "contracts/Utils/ECDSA.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Adapted from OpenZeppelin Contracts v4.3.2 (utils/cryptography/ECDSA.sol)\n\n// SPDX-Copyright-Text: OpenZeppelin, 2021\n// SPDX-Copyright-Text: Venus, 2021\n\npragma solidity ^0.5.16;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\ncontract ECDSA {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n}\n" + }, + "contracts/Utils/ErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract ComptrollerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n COMPTROLLER_MISMATCH,\n INSUFFICIENT_SHORTFALL,\n INSUFFICIENT_LIQUIDITY,\n INVALID_CLOSE_FACTOR,\n INVALID_COLLATERAL_FACTOR,\n INVALID_LIQUIDATION_INCENTIVE,\n MARKET_NOT_ENTERED, // no longer possible\n MARKET_NOT_LISTED,\n MARKET_ALREADY_LISTED,\n MATH_ERROR,\n NONZERO_BORROW_BALANCE,\n PRICE_ERROR,\n REJECTION,\n SNAPSHOT_ERROR,\n TOO_MANY_ASSETS,\n TOO_MUCH_REPAY,\n INSUFFICIENT_BALANCE_FOR_VAI,\n MARKET_NOT_COLLATERAL\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n EXIT_MARKET_BALANCE_OWED,\n EXIT_MARKET_REJECTION,\n SET_CLOSE_FACTOR_OWNER_CHECK,\n SET_CLOSE_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_NO_EXISTS,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\n SET_IMPLEMENTATION_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_PRICE_ORACLE_OWNER_CHECK,\n SUPPORT_MARKET_EXISTS,\n SUPPORT_MARKET_OWNER_CHECK,\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\n SET_VAI_MINT_RATE_CHECK,\n SET_VAICONTROLLER_OWNER_CHECK,\n SET_MINTED_VAI_REJECTION,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract TokenErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED,\n BAD_INPUT,\n COMPTROLLER_REJECTION,\n COMPTROLLER_CALCULATION_ERROR,\n INTEREST_RATE_MODEL_ERROR,\n INVALID_ACCOUNT_PAIR,\n INVALID_CLOSE_AMOUNT_REQUESTED,\n INVALID_COLLATERAL_FACTOR,\n MATH_ERROR,\n MARKET_NOT_FRESH,\n MARKET_NOT_LISTED,\n TOKEN_INSUFFICIENT_ALLOWANCE,\n TOKEN_INSUFFICIENT_BALANCE,\n TOKEN_INSUFFICIENT_CASH,\n TOKEN_TRANSFER_IN_FAILED,\n TOKEN_TRANSFER_OUT_FAILED,\n TOKEN_PRICE_ERROR\n }\n\n /*\n * Note: FailureInfo (but not Error) is kept in alphabetical order\n * This is because FailureInfo grows significantly faster, and\n * the order of Error has some meaning, while the order of FailureInfo\n * is entirely arbitrary.\n */\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n BORROW_ACCRUE_INTEREST_FAILED,\n BORROW_CASH_NOT_AVAILABLE,\n BORROW_FRESHNESS_CHECK,\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n BORROW_MARKET_NOT_LISTED,\n BORROW_COMPTROLLER_REJECTION,\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n LIQUIDATE_COMPTROLLER_REJECTION,\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n LIQUIDATE_FRESHNESS_CHECK,\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_ACCRUE_INTEREST_FAILED,\n MINT_COMPTROLLER_REJECTION,\n MINT_EXCHANGE_CALCULATION_FAILED,\n MINT_EXCHANGE_RATE_READ_FAILED,\n MINT_FRESHNESS_CHECK,\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n MINT_TRANSFER_IN_FAILED,\n MINT_TRANSFER_IN_NOT_POSSIBLE,\n REDEEM_ACCRUE_INTEREST_FAILED,\n REDEEM_COMPTROLLER_REJECTION,\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\n REDEEM_EXCHANGE_RATE_READ_FAILED,\n REDEEM_FRESHNESS_CHECK,\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\n REDUCE_RESERVES_ADMIN_CHECK,\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\n REDUCE_RESERVES_FRESH_CHECK,\n REDUCE_RESERVES_VALIDATION,\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_COMPTROLLER_REJECTION,\n REPAY_BORROW_FRESHNESS_CHECK,\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\n SET_COLLATERAL_FACTOR_VALIDATION,\n SET_COMPTROLLER_OWNER_CHECK,\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\n SET_MAX_ASSETS_OWNER_CHECK,\n SET_ORACLE_MARKET_NOT_LISTED,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\n SET_RESERVE_FACTOR_ADMIN_CHECK,\n SET_RESERVE_FACTOR_FRESH_CHECK,\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\n TRANSFER_COMPTROLLER_REJECTION,\n TRANSFER_NOT_ALLOWED,\n TRANSFER_NOT_ENOUGH,\n TRANSFER_TOO_MUCH,\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\n ADD_RESERVES_FRESH_CHECK,\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\n REPAY_VAI_COMPTROLLER_REJECTION,\n REPAY_VAI_FRESHNESS_CHECK,\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n\ncontract VAIControllerErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED, // The sender is not authorized to perform this action.\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\n MATH_ERROR, // A math calculation error occurred.\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\n }\n\n enum FailureInfo {\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\n SET_COMPTROLLER_OWNER_CHECK,\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n VAI_MINT_REJECTION,\n VAI_BURN_REJECTION,\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\n VAI_LIQUIDATE_FRESHNESS_CHECK,\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\n MINT_FEE_CALCULATION_FAILED,\n SET_TREASURY_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/Utils/Exponential.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./CarefulMath.sol\";\nimport \"./ExponentialNoError.sol\";\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Venus\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract Exponential is CarefulMath, ExponentialNoError {\n /**\n * @dev Creates an exponential from numerator and denominator values.\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\n * or if `denom` is zero.\n */\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\n }\n\n /**\n * @dev Adds two exponentials, returning a new exponential.\n */\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Subtracts two exponentials, returning a new exponential.\n */\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\n\n return (error, Exp({ mantissa: result }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, returning a new Exp.\n */\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(product));\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\n (MathError err, Exp memory product) = mulScalar(a, scalar);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return addUInt(truncate(product), addend);\n }\n\n /**\n * @dev Divide an Exp by a scalar, returning a new Exp.\n */\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\n }\n\n /**\n * @dev Divide a scalar by an Exp, returning a new Exp.\n */\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\n /*\n We are doing this as:\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\n\n How it works:\n Exp = a / b;\n Scalar = s;\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\n */\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n return getExp(numerator, divisor.mantissa);\n }\n\n /**\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\n */\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\n if (err != MathError.NO_ERROR) {\n return (err, 0);\n }\n\n return (MathError.NO_ERROR, truncate(fraction));\n }\n\n /**\n * @dev Multiplies two exponentials, returning a new exponential.\n */\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\n if (err0 != MathError.NO_ERROR) {\n return (err0, Exp({ mantissa: 0 }));\n }\n\n // We add half the scale before dividing so that we get rounding instead of truncation.\n // See \"Listing 6\" and text above it at https://accu.org/index.php/journals/1717\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\n if (err1 != MathError.NO_ERROR) {\n return (err1, Exp({ mantissa: 0 }));\n }\n\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\n assert(err2 == MathError.NO_ERROR);\n\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\n }\n\n /**\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\n */\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\n }\n\n /**\n * @dev Multiplies three exponentials, returning a new exponential.\n */\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\n (MathError err, Exp memory ab) = mulExp(a, b);\n if (err != MathError.NO_ERROR) {\n return (err, ab);\n }\n return mulExp(ab, c);\n }\n\n /**\n * @dev Divides two exponentials, returning a new exponential.\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\n */\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\n return getExp(a.mantissa, b.mantissa);\n }\n}\n" + }, + "contracts/Utils/ExponentialNoError.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @title Exponential module for storing fixed-precision decimals\n * @author Compound\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\n * `Exp({mantissa: 5100000000000000000})`.\n */\ncontract ExponentialNoError {\n uint internal constant expScale = 1e18;\n uint internal constant doubleScale = 1e36;\n uint internal constant halfExpScale = expScale / 2;\n uint internal constant mantissaOne = expScale;\n\n struct Exp {\n uint mantissa;\n }\n\n struct Double {\n uint mantissa;\n }\n\n /**\n * @dev Truncates the given exp to a whole number value.\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\n */\n function truncate(Exp memory exp) internal pure returns (uint) {\n // Note: We are not using careful math here as we're performing a division that cannot fail\n return exp.mantissa / expScale;\n }\n\n /**\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\n */\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return truncate(product);\n }\n\n /**\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\n */\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\n Exp memory product = mul_(a, scalar);\n return add_(truncate(product), addend);\n }\n\n /**\n * @dev Checks if first Exp is less than second Exp.\n */\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa < right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp <= right Exp.\n */\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa <= right.mantissa;\n }\n\n /**\n * @dev Checks if left Exp > right Exp.\n */\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\n return left.mantissa > right.mantissa;\n }\n\n /**\n * @dev returns true if Exp is exactly zero\n */\n function isZeroExp(Exp memory value) internal pure returns (bool) {\n return value.mantissa == 0;\n }\n\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\n require(n < 2 ** 224, errorMessage);\n return uint224(n);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\n }\n\n function add_(uint a, uint b) internal pure returns (uint) {\n return add_(a, b, \"addition overflow\");\n }\n\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n uint c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\n }\n\n function sub_(uint a, uint b) internal pure returns (uint) {\n return sub_(a, b, \"subtraction underflow\");\n }\n\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\n }\n\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / expScale;\n }\n\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\n }\n\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: mul_(a.mantissa, b) });\n }\n\n function mul_(uint a, Double memory b) internal pure returns (uint) {\n return mul_(a, b.mantissa) / doubleScale;\n }\n\n function mul_(uint a, uint b) internal pure returns (uint) {\n return mul_(a, b, \"multiplication overflow\");\n }\n\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n if (a == 0 || b == 0) {\n return 0;\n }\n uint c = a * b;\n require(c / a == b, errorMessage);\n return c;\n }\n\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\n }\n\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\n return Exp({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Exp memory b) internal pure returns (uint) {\n return div_(mul_(a, expScale), b.mantissa);\n }\n\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\n }\n\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(a.mantissa, b) });\n }\n\n function div_(uint a, Double memory b) internal pure returns (uint) {\n return div_(mul_(a, doubleScale), b.mantissa);\n }\n\n function div_(uint a, uint b) internal pure returns (uint) {\n return div_(a, b, \"divide by zero\");\n }\n\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\n require(b > 0, errorMessage);\n return a / b;\n }\n\n function fraction(uint a, uint b) internal pure returns (Double memory) {\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\n }\n}\n" + }, + "contracts/Utils/IBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\n/**\n * @dev Interface of the BEP20 standard as defined in the EIP. Does not include\n * the optional functions; to access them see {BEP20Detailed}.\n */\ninterface IBEP20 {\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 `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);\n\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" + }, + "contracts/Utils/Ownable.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Context.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 */\ncontract Ownable is Context {\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 constructor() internal {\n address msgSender = _msgSender();\n _owner = msgSender;\n emit OwnershipTransferred(address(0), msgSender);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n" + }, + "contracts/Utils/Owned.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract Owned {\n address public owner;\n\n event OwnershipTransferred(address indexed _from, address indexed _to);\n\n constructor() public {\n owner = msg.sender;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Should be owner\");\n _;\n }\n\n function transferOwnership(address newOwner) public onlyOwner {\n owner = newOwner;\n emit OwnershipTransferred(owner, newOwner);\n }\n}\n" + }, + "contracts/Utils/SafeBEP20.sol": { + "content": "pragma solidity ^0.5.0;\n\nimport \"./SafeMath.sol\";\nimport \"./IBEP20.sol\";\nimport \"./Address.sol\";\n\n/**\n * @title SafeBEP20\n * @dev Wrappers around BEP20 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 SafeBEP20 for BEP20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeBEP20 {\n using SafeMath for uint256;\n using Address for address;\n\n function safeTransfer(IBEP20 token, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(IBEP20 token, address from, address to, uint256 value) internal {\n callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n function safeApprove(IBEP20 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 // solhint-disable-next-line max-line-length\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeBEP20: approve from non-zero to non-zero allowance\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).add(value);\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(IBEP20 token, address spender, uint256 value) internal {\n uint256 newAllowance = token.allowance(address(this), spender).sub(\n value,\n \"SafeBEP20: decreased allowance below zero\"\n );\n callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\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(IBEP20 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.\n\n // A Solidity high level call has three parts:\n // 1. The target address is checked to verify it contains contract code\n // 2. The call itself is made, and success asserted\n // 3. The return value is decoded, which in turn checks the size of the returned data.\n // solhint-disable-next-line max-line-length\n require(address(token).isContract(), \"SafeBEP20: call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = address(token).call(data);\n require(success, \"SafeBEP20: low-level call failed\");\n\n if (returndata.length > 0) {\n // Return data is optional\n // solhint-disable-next-line max-line-length\n require(abi.decode(returndata, (bool)), \"SafeBEP20: BEP20 operation did not succeed\");\n }\n }\n}\n" + }, + "contracts/Utils/SafeCast.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2 ** 128, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value < 2 ** 64, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value < 2 ** 32, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value < 2 ** 16, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2 ** 8, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= -2 ** 127 && value < 2 ** 127, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= -2 ** 63 && value < 2 ** 63, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= -2 ** 31 && value < 2 ** 31, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= -2 ** 15 && value < 2 ** 15, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits.\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= -2 ** 7 && value < 2 ** 7, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n require(value < 2 ** 255, \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "contracts/Utils/SafeMath.sol": { + "content": "pragma solidity ^0.5.16;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return add(a, b, \"SafeMath: addition overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, errorMessage);\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n" + }, + "contracts/Utils/Tokenlock.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./Owned.sol\";\n\ncontract Tokenlock is Owned {\n /// @notice Indicates if token is locked\n uint8 internal isLocked = 0;\n\n event Freezed();\n event UnFreezed();\n\n modifier validLock() {\n require(isLocked == 0, \"Token is locked\");\n _;\n }\n\n function freeze() public onlyOwner {\n isLocked = 1;\n\n emit Freezed();\n }\n\n function unfreeze() public onlyOwner {\n isLocked = 0;\n\n emit UnFreezed();\n }\n}\n" + }, + "contracts/VAIVault/VAIVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport { VAIVaultProxy } from \"./VAIVaultProxy.sol\";\n\n/**\n * @title VAI Vault\n * @author Venus\n * @notice The VAI Vault is configured for users to stake VAI And receive XVS as a reward.\n */\ncontract VAIVault is VAIVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice Event emitted when VAI deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when VAI withrawal\n event Withdraw(address indexed user, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /*** Reentrancy Guard ***/\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VAI to VAIVault for XVS allocation\n * @param _amount The amount to deposit to vault\n */\n function deposit(uint256 _amount) external nonReentrant isActive {\n UserInfo storage user = userInfo[msg.sender];\n\n updateVault();\n\n // Transfer pending tokens to user\n updateAndPayOutPending(msg.sender);\n\n // Transfer in the amounts from user\n if (_amount > 0) {\n vai.safeTransferFrom(address(msg.sender), address(this), _amount);\n user.amount = user.amount.add(_amount);\n }\n\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n emit Deposit(msg.sender, _amount);\n }\n\n /**\n * @notice Withdraw VAI from VAIVault\n * @param _amount The amount to withdraw from vault\n */\n function withdraw(uint256 _amount) external nonReentrant isActive {\n _withdraw(msg.sender, _amount);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n */\n function claim() external nonReentrant isActive {\n _withdraw(msg.sender, 0);\n }\n\n /**\n * @notice Claim XVS from VAIVault\n * @param account The account for which to claim XVS\n */\n function claim(address account) external nonReentrant isActive {\n _withdraw(account, 0);\n }\n\n /**\n * @notice Low level withdraw function\n * @param account The account to withdraw from vault\n * @param _amount The amount to withdraw from vault\n */\n function _withdraw(address account, uint256 _amount) internal {\n UserInfo storage user = userInfo[account];\n require(user.amount >= _amount, \"withdraw: not good\");\n\n updateVault();\n updateAndPayOutPending(account); // Update balances of account this is not withdrawal but claiming XVS farmed\n\n if (_amount > 0) {\n user.amount = user.amount.sub(_amount);\n vai.safeTransfer(address(account), _amount);\n }\n user.rewardDebt = user.amount.mul(accXVSPerShare).div(1e18);\n\n emit Withdraw(account, _amount);\n }\n\n /**\n * @notice View function to see pending XVS on frontend\n * @param _user The user to see pending XVS\n * @return Amount of XVS the user can claim\n */\n function pendingXVS(address _user) public view returns (uint256) {\n UserInfo storage user = userInfo[_user];\n\n return user.amount.mul(accXVSPerShare).div(1e18).sub(user.rewardDebt);\n }\n\n /**\n * @notice Update and pay out pending XVS to user\n * @param account The user to pay out\n */\n function updateAndPayOutPending(address account) internal {\n uint256 pending = pendingXVS(account);\n\n if (pending > 0) {\n safeXVSTransfer(account, pending);\n }\n }\n\n /**\n * @notice Safe XVS transfer function, just in case if rounding error causes pool to not have enough XVS\n * @param _to The address that XVS to be transfered\n * @param _amount The amount that XVS to be transfered\n */\n function safeXVSTransfer(address _to, uint256 _amount) internal {\n uint256 xvsBal = xvs.balanceOf(address(this));\n\n if (_amount > xvsBal) {\n xvs.transfer(_to, xvsBal);\n xvsBalance = xvs.balanceOf(address(this));\n } else {\n xvs.transfer(_to, _amount);\n xvsBalance = xvs.balanceOf(address(this));\n }\n }\n\n /**\n * @notice Function that updates pending rewards\n */\n function updatePendingRewards() public isActive {\n uint256 newRewards = xvs.balanceOf(address(this)).sub(xvsBalance);\n\n if (newRewards > 0) {\n xvsBalance = xvs.balanceOf(address(this)); // If there is no change the balance didn't change\n pendingRewards = pendingRewards.add(newRewards);\n }\n }\n\n /**\n * @notice Update reward variables to be up-to-date\n */\n function updateVault() internal {\n updatePendingRewards();\n\n uint256 vaiBalance = vai.balanceOf(address(this));\n if (vaiBalance == 0) {\n // avoids division by 0 errors\n return;\n }\n\n accXVSPerShare = accXVSPerShare.add(pendingRewards.mul(1e18).div(vaiBalance));\n pendingRewards = 0;\n }\n\n /*** Admin Functions ***/\n\n function _become(VAIVaultProxy vaiVaultProxy) external {\n require(msg.sender == vaiVaultProxy.admin(), \"only proxy admin can change brains\");\n require(vaiVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setVenusInfo(address _xvs, address _vai) external onlyAdmin {\n require(_xvs != address(0) && _vai != address(0), \"addresses must not be zero\");\n require(address(xvs) == address(0) && address(vai) == address(0), \"addresses already set\");\n xvs = IBEP20(_xvs);\n vai = IBEP20(_vai);\n\n _notEntered = true;\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract VAIVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VAIVaultStorage.sol\";\nimport \"./VAIVaultErrorReporter.sol\";\n\n/**\n * @title VAI Vault Proxy\n * @author Venus\n * @notice Proxy contract for the VAI Vault\n */\ncontract VAIVaultProxy is VAIVaultAdminStorage, VAIVaultErrorReporter {\n /**\n * @notice Emitted when pendingVAIVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingVAIVaultImplementation is accepted, which means VAI Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of VAI Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingVAIVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = vaiVaultImplementation;\n address oldPendingImplementation = pendingVAIVaultImplementation;\n\n vaiVaultImplementation = pendingVAIVaultImplementation;\n\n pendingVAIVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, vaiVaultImplementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingVAIVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = vaiVaultImplementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VAIVault/VAIVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VAIVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VAI Vault\n */\n address public vaiVaultImplementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingVAIVaultImplementation;\n}\n\ncontract VAIVaultStorage is VAIVaultAdminStorage {\n /// @notice The XVS TOKEN!\n IBEP20 public xvs;\n\n /// @notice The VAI TOKEN!\n IBEP20 public vai;\n\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice XVS balance of vault\n uint256 public xvsBalance;\n\n /// @notice Accumulated XVS per share\n uint256 public accXVSPerShare;\n\n //// pending rewards awaiting anyone to update\n uint256 public pendingRewards;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\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" + }, + "contracts/VRTVault/VRTVault.sol": { + "content": "pragma solidity 0.5.16;\n\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./VRTVaultStorage.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\n\ninterface IVRTVaultProxy {\n function _acceptImplementation() external;\n\n function admin() external returns (address);\n}\n\ncontract VRTVault is VRTVaultStorage, AccessControlledV5 {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for lastAccruingBlock. Close to year 3,000, considering 3 seconds per block. Used to avoid a value absurdly high\n uint256 public constant MAX_LAST_ACCRUING_BLOCK = 9999999999;\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted on VRT deposit\n event Deposit(address indexed user, uint256 amount);\n\n /// @notice Event emitted when accruedInterest and VRT PrincipalAmount is withrawn\n event Withdraw(\n address indexed user,\n uint256 withdrawnAmount,\n uint256 totalPrincipalAmount,\n uint256 accruedInterest\n );\n\n /// @notice Event emitted when Admin withdraw BEP20 token from contract\n event WithdrawToken(address indexed tokenAddress, address indexed receiver, uint256 amount);\n\n /// @notice Event emitted when accruedInterest is claimed\n event Claim(address indexed user, uint256 interestAmount);\n\n /// @notice Event emitted when lastAccruingBlock state variable changes\n event LastAccruingBlockChanged(uint256 oldLastAccruingBlock, uint256 newLastAccruingBlock);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin allowed\");\n _;\n }\n\n function initialize(address _vrtAddress, uint256 _interestRatePerBlock) public {\n require(msg.sender == admin, \"only admin may initialize the Vault\");\n require(_vrtAddress != address(0), \"vrtAddress cannot be Zero\");\n require(interestRatePerBlock == 0, \"Vault may only be initialized once\");\n\n // Set initial exchange rate\n interestRatePerBlock = _interestRatePerBlock;\n require(interestRatePerBlock > 0, \"interestRate Per Block must be greater than zero.\");\n\n // Set the VRT\n vrt = IBEP20(_vrtAddress);\n _notEntered = true;\n }\n\n modifier isInitialized() {\n require(interestRatePerBlock > 0, \"Vault is not initialized\");\n _;\n }\n\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n modifier nonZeroAddress(address _address) {\n require(_address != address(0), \"Address cannot be Zero\");\n _;\n }\n\n modifier userHasPosition(address userAddress) {\n UserInfo storage user = userInfo[userAddress];\n require(user.userAddress != address(0), \"User does not have any position in the Vault.\");\n _;\n }\n\n /**\n * @notice Pause vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Deposit VRT to VRTVault for a fixed-interest-rate\n * @param depositAmount The amount to deposit to vault\n */\n function deposit(uint256 depositAmount) external nonReentrant isInitialized isActive {\n require(depositAmount > 0, \"Deposit amount must be non-zero\");\n\n address userAddress = msg.sender;\n UserInfo storage user = userInfo[userAddress];\n\n if (user.userAddress == address(0)) {\n user.userAddress = userAddress;\n user.totalPrincipalAmount = depositAmount;\n } else {\n // accrue Interest and transfer to the user\n uint256 accruedInterest = computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n\n user.totalPrincipalAmount = user.totalPrincipalAmount.add(depositAmount);\n\n if (accruedInterest > 0) {\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(\n vrtBalance >= accruedInterest,\n \"Failed to transfer accruedInterest, Insufficient VRT in Vault.\"\n );\n emit Claim(userAddress, accruedInterest);\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n emit Deposit(userAddress, depositAmount);\n vrt.safeTransferFrom(userAddress, address(this), depositAmount);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param userAddress Address of User in the the Vault\n * @return The interest accrued, in VRT\n */\n function getAccruedInterest(\n address userAddress\n ) public view nonZeroAddress(userAddress) isInitialized returns (uint256) {\n UserInfo storage user = userInfo[userAddress];\n if (user.accrualStartBlockNumber == 0) {\n return 0;\n }\n\n return computeAccruedInterest(user.totalPrincipalAmount, user.accrualStartBlockNumber);\n }\n\n /**\n * @notice get accruedInterest of the user's VRTDeposits in the Vault\n * @param totalPrincipalAmount of the User\n * @param accrualStartBlockNumber of the User\n * @return The interest accrued, in VRT\n */\n function computeAccruedInterest(\n uint256 totalPrincipalAmount,\n uint256 accrualStartBlockNumber\n ) internal view isInitialized returns (uint256) {\n uint256 blockNumber = getBlockNumber();\n uint256 _lastAccruingBlock = lastAccruingBlock;\n\n if (blockNumber > _lastAccruingBlock) {\n blockNumber = _lastAccruingBlock;\n }\n\n if (accrualStartBlockNumber == 0 || accrualStartBlockNumber >= blockNumber) {\n return 0;\n }\n\n // Number of blocks since deposit\n uint256 blockDelta = blockNumber.sub(accrualStartBlockNumber);\n uint256 accruedInterest = (totalPrincipalAmount.mul(interestRatePerBlock).mul(blockDelta)).div(1e18);\n return accruedInterest;\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n */\n function claim() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n _claim(msg.sender);\n }\n\n /**\n * @notice claim the accruedInterest of the user's VRTDeposits in the Vault\n * @param account The account for which to claim rewards\n */\n function claim(address account) external nonReentrant isInitialized userHasPosition(account) isActive {\n _claim(account);\n }\n\n /**\n * @notice Low level claim function\n * @param account The account for which to claim rewards\n */\n function _claim(address account) internal {\n uint256 accruedInterest = getAccruedInterest(account);\n if (accruedInterest > 0) {\n UserInfo storage user = userInfo[account];\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= accruedInterest, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n emit Claim(account, accruedInterest);\n uint256 currentBlock_ = getBlockNumber();\n if (lastAccruingBlock > currentBlock_) {\n user.accrualStartBlockNumber = currentBlock_;\n } else {\n user.accrualStartBlockNumber = lastAccruingBlock;\n }\n vrt.safeTransfer(user.userAddress, accruedInterest);\n }\n }\n\n /**\n * @notice withdraw accruedInterest and totalPrincipalAmount of the user's VRTDeposit in the Vault\n */\n function withdraw() external nonReentrant isInitialized userHasPosition(msg.sender) isActive {\n address userAddress = msg.sender;\n uint256 accruedInterest = getAccruedInterest(userAddress);\n\n UserInfo storage user = userInfo[userAddress];\n\n uint256 totalPrincipalAmount = user.totalPrincipalAmount;\n uint256 vrtForWithdrawal = accruedInterest.add(totalPrincipalAmount);\n user.totalPrincipalAmount = 0;\n user.accrualStartBlockNumber = getBlockNumber();\n\n uint256 vrtBalance = vrt.balanceOf(address(this));\n require(vrtBalance >= vrtForWithdrawal, \"Failed to transfer VRT, Insufficient VRT in Vault.\");\n\n emit Withdraw(userAddress, vrtForWithdrawal, totalPrincipalAmount, accruedInterest);\n vrt.safeTransfer(user.userAddress, vrtForWithdrawal);\n }\n\n /**\n * @notice withdraw BEP20 tokens from the contract to a recipient address.\n * @param tokenAddress address of the BEP20 token\n * @param receiver recipient of the BEP20 token\n * @param amount tokenAmount\n */\n function withdrawBep20(\n address tokenAddress,\n address receiver,\n uint256 amount\n ) external isInitialized nonZeroAddress(tokenAddress) nonZeroAddress(receiver) {\n _checkAccessAllowed(\"withdrawBep20(address,address,uint256)\");\n require(amount > 0, \"amount is invalid\");\n IBEP20 token = IBEP20(tokenAddress);\n require(amount <= token.balanceOf(address(this)), \"Insufficient amount in Vault\");\n emit WithdrawToken(tokenAddress, receiver, amount);\n token.safeTransfer(receiver, amount);\n }\n\n function setLastAccruingBlock(uint256 _lastAccruingBlock) external {\n _checkAccessAllowed(\"setLastAccruingBlock(uint256)\");\n require(_lastAccruingBlock < MAX_LAST_ACCRUING_BLOCK, \"_lastAccruingBlock is absurdly high\");\n\n uint256 oldLastAccruingBlock = lastAccruingBlock;\n uint256 currentBlock = getBlockNumber();\n if (oldLastAccruingBlock != 0) {\n require(currentBlock < oldLastAccruingBlock, \"Cannot change at this point\");\n }\n if (oldLastAccruingBlock == 0 || _lastAccruingBlock < oldLastAccruingBlock) {\n // Must be in future\n require(currentBlock < _lastAccruingBlock, \"Invalid _lastAccruingBlock interest have been accumulated\");\n }\n lastAccruingBlock = _lastAccruingBlock;\n emit LastAccruingBlockChanged(oldLastAccruingBlock, _lastAccruingBlock);\n }\n\n function getBlockNumber() public view returns (uint256) {\n return block.number;\n }\n\n /*** Admin Functions ***/\n\n function _become(IVRTVaultProxy vrtVaultProxy) external {\n require(msg.sender == vrtVaultProxy.admin(), \"only proxy admin can change brains\");\n vrtVaultProxy._acceptImplementation();\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./VRTVaultStorage.sol\";\n\ncontract VRTVaultProxy is VRTVaultAdminStorage {\n /**\n * @notice Emitted when pendingImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingImplementation is accepted, which means VRT Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor(address implementation_, address vrtAddress_, uint256 interestRatePerBlock_) public {\n // Creator of the contract is admin during initialization\n admin = msg.sender;\n\n // New implementations always get set via the settor (post-initialize)\n _setImplementation(implementation_);\n\n // First delegate gets to initialize the delegator (i.e. storage contract)\n delegateTo(\n implementation_,\n abi.encodeWithSignature(\"initialize(address,uint256)\", vrtAddress_, interestRatePerBlock_)\n );\n }\n\n /**\n * @notice Called by the admin to update the implementation of the delegator\n * @param implementation_ The address of the new implementation for delegation\n */\n function _setImplementation(address implementation_) public {\n require(msg.sender == admin, \"VRTVaultProxy::_setImplementation: admin only\");\n require(implementation_ != address(0), \"VRTVaultProxy::_setImplementation: invalid implementation address\");\n\n address oldImplementation = implementation;\n implementation = implementation_;\n\n emit NewImplementation(oldImplementation, implementation);\n }\n\n /**\n * @notice Internal method to delegate execution to another contract\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\n * @param callee The contract to delegatecall\n * @param data The raw data to delegatecall\n * @return The returned bytes from the delegatecall\n */\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\n (bool success, bytes memory returnData) = callee.delegatecall(data);\n assembly {\n if eq(success, 0) {\n revert(add(returnData, 0x20), returndatasize)\n }\n }\n return returnData;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public {\n require(msg.sender == admin, \"Only admin can set Pending Implementation\");\n\n address oldPendingImplementation = pendingImplementation;\n\n pendingImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Accepts new implementation of VRT Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n */\n function _acceptImplementation() public {\n // Check caller is pendingImplementation\n require(\n msg.sender == pendingImplementation,\n \"only address marked as pendingImplementation can accept Implementation\"\n );\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingImplementation;\n\n implementation = pendingImplementation;\n\n pendingImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingImplementation);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n */\n function _setPendingAdmin(address newPendingAdmin) public {\n // Check caller = admin\n require(msg.sender == admin, \"only admin can set pending admin\");\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @dev return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public {\n // Check caller is pendingAdmin\n require(msg.sender == pendingAdmin, \"only address marked as pendingAdmin can accept as Admin\");\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/VRTVault/VRTVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\n\ncontract VRTVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of VRT Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of VAI Vault\n */\n address public pendingImplementation;\n}\n\ncontract VRTVaultStorage is VRTVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool public _notEntered;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice The VRT TOKEN!\n IBEP20 public vrt;\n\n /// @notice interestRate for accrual - per Block\n uint256 public interestRatePerBlock;\n\n /// @notice Info of each user.\n struct UserInfo {\n address userAddress;\n uint256 accrualStartBlockNumber;\n uint256 totalPrincipalAmount;\n uint256 lastWithdrawnBlockNumber;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => UserInfo) public userInfo;\n\n /// @notice block number after which no interest will be accrued\n uint256 public lastAccruingBlock;\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" + }, + "contracts/XVSVault/XVSStore.sol": { + "content": "pragma solidity 0.5.16;\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\n\n/**\n * @title XVS Store\n * @author Venus\n * @notice XVS Store responsible for distributing XVS rewards\n */\ncontract XVSStore {\n using SafeMath for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The Admin Address\n address public admin;\n\n /// @notice The pending admin address\n address public pendingAdmin;\n\n /// @notice The Owner Address\n address public owner;\n\n /// @notice The reward tokens\n mapping(address => bool) public rewardTokens;\n\n /// @notice Emitted when pendingAdmin is changed\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /// @notice Event emitted when admin changed\n event AdminTransferred(address indexed oldAdmin, address indexed newAdmin);\n\n /// @notice Event emitted when owner changed\n event OwnerTransferred(address indexed oldOwner, address indexed newOwner);\n\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"only owner can\");\n _;\n }\n\n /**\n * @notice Safely transfer rewards. Only active reward tokens can be sent using this function.\n * Only callable by owner\n * @dev Safe reward token transfer function, just in case if rounding error causes pool to not have enough tokens.\n * @param token Reward token to transfer\n * @param _to Destination address of the reward\n * @param _amount Amount to transfer\n */\n function safeRewardTransfer(address token, address _to, uint256 _amount) external onlyOwner {\n require(rewardTokens[token] == true, \"only reward token can\");\n\n if (address(token) != address(0)) {\n uint256 tokenBalance = IBEP20(token).balanceOf(address(this));\n if (_amount > tokenBalance) {\n IBEP20(token).safeTransfer(_to, tokenBalance);\n } else {\n IBEP20(token).safeTransfer(_to, _amount);\n }\n }\n }\n\n /**\n * @notice Allows the admin to propose a new admin\n * Only callable admin\n * @param _admin Propose an account as admin of the XVS store\n */\n function setPendingAdmin(address _admin) external onlyAdmin {\n address oldPendingAdmin = pendingAdmin;\n pendingAdmin = _admin;\n emit NewPendingAdmin(oldPendingAdmin, _admin);\n }\n\n /**\n * @notice Allows an account that is pending as admin to accept the role\n * nly calllable by the pending admin\n */\n function acceptAdmin() external {\n require(msg.sender == pendingAdmin, \"only pending admin\");\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n admin = pendingAdmin;\n pendingAdmin = address(0);\n\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n emit AdminTransferred(oldAdmin, admin);\n }\n\n /**\n * @notice Set the contract owner\n * @param _owner The address of the owner to set\n * Only callable admin\n */\n function setNewOwner(address _owner) external onlyAdmin {\n require(_owner != address(0), \"new owner is the zero address\");\n address oldOwner = owner;\n owner = _owner;\n emit OwnerTransferred(oldOwner, _owner);\n }\n\n /**\n * @notice Set or disable a reward token\n * @param _tokenAddress The address of a token to set as active or inactive\n * @param status Set whether a reward token is active or not\n */\n function setRewardToken(address _tokenAddress, bool status) external {\n require(msg.sender == admin || msg.sender == owner, \"only admin or owner can\");\n rewardTokens[_tokenAddress] = status;\n }\n\n /**\n * @notice Security function to allow the owner of the contract to withdraw from the contract\n * @param _tokenAddress Reward token address to withdraw\n * @param _amount Amount of token to withdraw\n */\n function emergencyRewardWithdraw(address _tokenAddress, uint256 _amount) external onlyOwner {\n IBEP20(_tokenAddress).safeTransfer(address(msg.sender), _amount);\n }\n}\n" + }, + "contracts/XVSVault/XVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\n\npragma solidity 0.5.16;\npragma experimental ABIEncoderV2;\n\nimport \"../Utils/ECDSA.sol\";\nimport \"../Utils/SafeBEP20.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"./XVSVaultStorage.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\nimport \"../Utils/SafeCast.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV5.sol\";\nimport \"@venusprotocol/solidity-utilities/contracts/TimeManagerV5.sol\";\n\nimport { XVSStore } from \"./XVSStore.sol\";\nimport { XVSVaultProxy } from \"./XVSVaultProxy.sol\";\n\n/**\n * @title XVS Vault\n * @author Venus\n * @notice The XVS Vault allows XVS holders to lock their XVS to recieve voting rights in Venus governance and are rewarded with XVS.\n */\ncontract XVSVault is XVSVaultStorage, ECDSA, AccessControlledV5, TimeManagerV5 {\n using SafeMath for uint256;\n using SafeCast for uint256;\n using SafeBEP20 for IBEP20;\n\n /// @notice The upper bound for the lock period in a pool, 10 years\n uint256 public constant MAX_LOCK_PERIOD = 60 * 60 * 24 * 365 * 10;\n\n /// @notice Event emitted when deposit\n event Deposit(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when execute withrawal\n event ExecutedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when request withrawal\n event RequestedWithdrawal(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice An event thats emitted when an account changes its delegate\n event DelegateChangedV2(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /// @notice An event thats emitted when a delegate account's vote balance changes\n event DelegateVotesChangedV2(address indexed delegate, uint previousBalance, uint newBalance);\n\n /// @notice An event emitted when the reward store address is updated\n event StoreUpdated(address oldXvs, address oldStore, address newXvs, address newStore);\n\n /// @notice An event emitted when the withdrawal locking period is updated for a pool\n event WithdrawalLockingPeriodUpdated(address indexed rewardToken, uint indexed pid, uint oldPeriod, uint newPeriod);\n\n /// @notice An event emitted when the reward amount per block or second is modified for a pool\n event RewardAmountUpdated(address indexed rewardToken, uint oldReward, uint newReward);\n\n /// @notice An event emitted when a new pool is added\n event PoolAdded(\n address indexed rewardToken,\n uint indexed pid,\n address indexed token,\n uint allocPoints,\n uint rewardPerBlockOrSecond,\n uint lockPeriod\n );\n\n /// @notice An event emitted when a pool allocation points are updated\n event PoolUpdated(address indexed rewardToken, uint indexed pid, uint oldAllocPoints, uint newAllocPoints);\n\n /// @notice Event emitted when reward claimed\n event Claim(address indexed user, address indexed rewardToken, uint256 indexed pid, uint256 amount);\n\n /// @notice Event emitted when vault is paused\n event VaultPaused(address indexed admin);\n\n /// @notice Event emitted when vault is resumed after pause\n event VaultResumed(address indexed admin);\n\n /// @notice Event emitted when protocol logs a debt to a user due to insufficient funds for pending reward distribution\n event VaultDebtUpdated(\n address indexed rewardToken,\n address indexed userAddress,\n uint256 oldOwedAmount,\n uint256 newOwedAmount\n );\n\n /// @notice Emitted when prime token contract address is changed\n event NewPrimeToken(\n IPrime indexed oldPrimeToken,\n IPrime indexed newPrimeToken,\n address oldPrimeRewardToken,\n address newPrimeRewardToken,\n uint256 oldPrimePoolId,\n uint256 newPrimePoolId\n );\n\n /**\n * @notice XVSVault constructor\n */\n constructor() public {\n admin = msg.sender;\n }\n\n modifier onlyAdmin() {\n require(msg.sender == admin, \"only admin can\");\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n require(_notEntered, \"re-entered\");\n _notEntered = false;\n _;\n _notEntered = true; // get a gas-refund post-Istanbul\n }\n\n /**\n * @dev Prevents functions to execute when vault is paused.\n */\n modifier isActive() {\n require(!vaultPaused, \"Vault is paused\");\n _;\n }\n\n /**\n * @notice Pauses vault\n */\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n require(!vaultPaused, \"Vault is already paused\");\n vaultPaused = true;\n emit VaultPaused(msg.sender);\n }\n\n /**\n * @notice Resume vault\n */\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n require(vaultPaused, \"Vault is not paused\");\n vaultPaused = false;\n emit VaultResumed(msg.sender);\n }\n\n /**\n * @notice Returns the number of pools with the specified reward token\n * @param rewardToken Reward token address\n * @return Number of pools that distribute the specified token as a reward\n */\n function poolLength(address rewardToken) external view returns (uint256) {\n return poolInfos[rewardToken].length;\n }\n\n /**\n * @notice Returns the number of reward tokens created per block or second\n * @param _rewardToken Reward token address\n * @return Number of reward tokens created per block or second\n */\n function rewardTokenAmountsPerBlock(address _rewardToken) external view returns (uint256) {\n return rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n }\n\n /**\n * @notice Add a new token pool\n * @dev This vault DOES NOT support deflationary tokens — it expects that\n * the amount of transferred tokens would equal the actually deposited\n * amount. In practice this means that this vault DOES NOT support USDT\n * and similar tokens (that do not provide these guarantees).\n * @param _rewardToken Reward token address\n * @param _allocPoint Number of allocation points assigned to this pool\n * @param _token Staked token\n * @param _rewardPerBlockOrSecond Initial reward per block or second, in terms of _rewardToken\n * @param _lockPeriod A period between withdrawal request and a moment when it's executable\n */\n function add(\n address _rewardToken,\n uint256 _allocPoint,\n IBEP20 _token,\n uint256 _rewardPerBlockOrSecond,\n uint256 _lockPeriod\n ) external {\n _checkAccessAllowed(\"add(address,uint256,address,uint256,uint256)\");\n _ensureNonzeroAddress(_rewardToken);\n _ensureNonzeroAddress(address(_token));\n require(address(xvsStore) != address(0), \"Store contract address is empty\");\n require(_allocPoint > 0, \"Alloc points must not be zero\");\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n require(poolInfo[pid].token != _token, \"Pool already added\");\n }\n\n // We use balanceOf to get the supply amount, so shouldn't be possible to\n // configure pools with different reward token but the same staked token\n require(!isStakedToken[address(_token)], \"Token exists in other pool\");\n\n totalAllocPoints[_rewardToken] = totalAllocPoints[_rewardToken].add(_allocPoint);\n\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardPerBlockOrSecond;\n\n poolInfo.push(\n PoolInfo({\n token: _token,\n allocPoint: _allocPoint,\n lastRewardBlockOrSecond: getBlockNumberOrTimestamp(),\n accRewardPerShare: 0,\n lockPeriod: _lockPeriod\n })\n );\n isStakedToken[address(_token)] = true;\n\n XVSStore(xvsStore).setRewardToken(_rewardToken, true);\n\n emit PoolAdded(\n _rewardToken,\n poolInfo.length - 1,\n address(_token),\n _allocPoint,\n _rewardPerBlockOrSecond,\n _lockPeriod\n );\n }\n\n /**\n * @notice Update the given pool's reward allocation point\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _allocPoint Number of allocation points assigned to this pool\n */\n function set(address _rewardToken, uint256 _pid, uint256 _allocPoint) external {\n _checkAccessAllowed(\"set(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n\n massUpdatePools(_rewardToken);\n\n PoolInfo[] storage poolInfo = poolInfos[_rewardToken];\n uint256 newTotalAllocPoints = totalAllocPoints[_rewardToken].sub(poolInfo[_pid].allocPoint).add(_allocPoint);\n require(newTotalAllocPoints > 0, \"Alloc points per reward token must not be zero\");\n\n uint256 oldAllocPoints = poolInfo[_pid].allocPoint;\n poolInfo[_pid].allocPoint = _allocPoint;\n totalAllocPoints[_rewardToken] = newTotalAllocPoints;\n\n emit PoolUpdated(_rewardToken, _pid, oldAllocPoints, _allocPoint);\n }\n\n /**\n * @notice Update the given reward token's amount per block or second\n * @param _rewardToken Reward token address\n * @param _rewardAmount Number of allocation points assigned to this pool\n */\n function setRewardAmountPerBlockOrSecond(address _rewardToken, uint256 _rewardAmount) external {\n _checkAccessAllowed(\"setRewardAmountPerBlockOrSecond(address,uint256)\");\n require(XVSStore(xvsStore).rewardTokens(_rewardToken), \"Invalid reward token\");\n massUpdatePools(_rewardToken);\n uint256 oldReward = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n rewardTokenAmountsPerBlockOrSecond[_rewardToken] = _rewardAmount;\n\n emit RewardAmountUpdated(_rewardToken, oldReward, _rewardAmount);\n }\n\n /**\n * @notice Update the lock period after which a requested withdrawal can be executed\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _newPeriod New lock period\n */\n function setWithdrawalLockingPeriod(address _rewardToken, uint256 _pid, uint256 _newPeriod) external {\n _checkAccessAllowed(\"setWithdrawalLockingPeriod(address,uint256,uint256)\");\n _ensureValidPool(_rewardToken, _pid);\n require(_newPeriod > 0 && _newPeriod < MAX_LOCK_PERIOD, \"Invalid new locking period\");\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n uint256 oldPeriod = pool.lockPeriod;\n pool.lockPeriod = _newPeriod;\n\n emit WithdrawalLockingPeriodUpdated(_rewardToken, _pid, oldPeriod, _newPeriod);\n }\n\n /**\n * @notice Deposit XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to deposit to vault\n */\n function deposit(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, msg.sender) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n if (pending > 0) {\n _transferReward(_rewardToken, msg.sender, pending);\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n }\n }\n pool.token.safeTransferFrom(msg.sender, address(this), _amount);\n user.amount = user.amount.add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(address(0), delegates[msg.sender], safe96(_amount, \"XVSVault::deposit: votes overflow\"));\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Deposit(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Claim rewards for pool\n * @param _account The account for which to claim rewards\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function claim(address _account, address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_account];\n _updatePool(_rewardToken, _pid);\n require(pendingWithdrawalsBeforeUpgrade(_rewardToken, _pid, _account) == 0, \"execute pending withdrawal\");\n\n if (user.amount > 0) {\n uint256 pending = _computeReward(user, pool);\n\n if (pending > 0) {\n user.rewardDebt = _cumulativeReward(user, pool);\n\n _transferReward(_rewardToken, _account, pending);\n emit Claim(_account, _rewardToken, _pid, pending);\n }\n }\n }\n\n /**\n * @notice Pushes withdrawal request to the requests array and updates\n * the pending withdrawals amount. The requests are always sorted\n * by unlock time (descending) so that the earliest to execute requests\n * are always at the end of the array.\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @param _amount The amount being requested\n */\n function pushWithdrawalRequest(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests,\n uint _amount,\n uint _lockedUntil\n ) internal {\n uint i = _requests.length;\n _requests.push(WithdrawalRequest(0, 0, 1));\n // Keep it sorted so that the first to get unlocked request is always at the end\n for (; i > 0 && _requests[i - 1].lockedUntil <= _lockedUntil; --i) {\n _requests[i] = _requests[i - 1];\n }\n _requests[i] = WithdrawalRequest(_amount, _lockedUntil.toUint128(), 1);\n _user.pendingWithdrawals = _user.pendingWithdrawals.add(_amount);\n }\n\n /**\n * @notice Pops the requests with unlock time < now from the requests\n * array and deducts the computed amount from the user's pending\n * withdrawals counter. Assumes that the requests array is sorted\n * by unclock time (descending).\n * @dev This function **removes** the eligible requests from the requests\n * array. If this function is called, the withdrawal should actually\n * happen (or the transaction should be reverted).\n * @param _user The user struct storage pointer\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade (this amount should be\n * sent to the user, otherwise the state would be inconsistent).\n */\n function popEligibleWithdrawalRequests(\n UserInfo storage _user,\n WithdrawalRequest[] storage _requests\n ) internal returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n // Since the requests are sorted by their unlock time, we can just\n // pop them from the array and stop at the first not-yet-eligible one\n for (uint i = _requests.length; i > 0 && isUnlocked(_requests[i - 1]); --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n\n _requests.pop();\n }\n _user.pendingWithdrawals = _user.pendingWithdrawals.sub(\n afterUpgradeWithdrawalAmount.add(beforeUpgradeWithdrawalAmount)\n );\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Checks if the request is eligible for withdrawal.\n * @param _request The request struct storage pointer\n * @return True if the request is eligible for withdrawal, false otherwise\n */\n function isUnlocked(WithdrawalRequest storage _request) private view returns (bool) {\n return _request.lockedUntil <= block.timestamp;\n }\n\n /**\n * @notice Execute withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n */\n function executeWithdrawal(address _rewardToken, uint256 _pid) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint256 beforeUpgradeWithdrawalAmount;\n uint256 afterUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount) = popEligibleWithdrawalRequests(user, requests);\n require(beforeUpgradeWithdrawalAmount > 0 || afterUpgradeWithdrawalAmount > 0, \"nothing to withdraw\");\n\n // Having both old-style and new-style requests is not allowed and shouldn't be possible\n require(beforeUpgradeWithdrawalAmount == 0 || afterUpgradeWithdrawalAmount == 0, \"inconsistent state\");\n\n if (beforeUpgradeWithdrawalAmount > 0) {\n _updatePool(_rewardToken, _pid);\n uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e12).sub(user.rewardDebt);\n XVSStore(xvsStore).safeRewardTransfer(_rewardToken, msg.sender, pending);\n user.amount = user.amount.sub(beforeUpgradeWithdrawalAmount);\n user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e12);\n pool.token.safeTransfer(address(msg.sender), beforeUpgradeWithdrawalAmount);\n } else {\n user.amount = user.amount.sub(afterUpgradeWithdrawalAmount);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].sub(\n afterUpgradeWithdrawalAmount\n );\n pool.token.safeTransfer(address(msg.sender), afterUpgradeWithdrawalAmount);\n }\n\n emit ExecutedWithdrawal(\n msg.sender,\n _rewardToken,\n _pid,\n beforeUpgradeWithdrawalAmount.add(afterUpgradeWithdrawalAmount)\n );\n }\n\n /**\n * @notice Returns before and after upgrade pending withdrawal amount\n * @param _requests The user's requests array storage pointer\n * @return beforeUpgradeWithdrawalAmount The amount eligible for withdrawal before upgrade\n * @return afterUpgradeWithdrawalAmount The amount eligible for withdrawal after upgrade\n */\n function getRequestedWithdrawalAmount(\n WithdrawalRequest[] storage _requests\n ) internal view returns (uint beforeUpgradeWithdrawalAmount, uint afterUpgradeWithdrawalAmount) {\n for (uint i = _requests.length; i > 0; --i) {\n if (_requests[i - 1].afterUpgrade == 1) {\n afterUpgradeWithdrawalAmount = afterUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n } else {\n beforeUpgradeWithdrawalAmount = beforeUpgradeWithdrawalAmount.add(_requests[i - 1].amount);\n }\n }\n return (beforeUpgradeWithdrawalAmount, afterUpgradeWithdrawalAmount);\n }\n\n /**\n * @notice Request withdrawal to XVSVault for XVS allocation\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _amount The amount to withdraw from the vault\n */\n function requestWithdrawal(address _rewardToken, uint256 _pid, uint256 _amount) external nonReentrant isActive {\n _ensureValidPool(_rewardToken, _pid);\n require(_amount > 0, \"requested amount cannot be zero\");\n UserInfo storage user = userInfos[_rewardToken][_pid][msg.sender];\n require(user.amount >= user.pendingWithdrawals.add(_amount), \"requested amount is invalid\");\n\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][msg.sender];\n\n uint beforeUpgradeWithdrawalAmount;\n\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n require(beforeUpgradeWithdrawalAmount == 0, \"execute pending withdrawal\");\n\n _updatePool(_rewardToken, _pid);\n uint256 pending = _computeReward(user, pool);\n _transferReward(_rewardToken, msg.sender, pending);\n\n uint lockedUntil = pool.lockPeriod.add(block.timestamp);\n\n pushWithdrawalRequest(user, requests, _amount, lockedUntil);\n totalPendingWithdrawals[_rewardToken][_pid] = totalPendingWithdrawals[_rewardToken][_pid].add(_amount);\n user.rewardDebt = _cumulativeReward(user, pool);\n\n // Update Delegate Amount\n if (address(pool.token) == xvsAddress) {\n _moveDelegates(\n delegates[msg.sender],\n address(0),\n safe96(_amount, \"XVSVault::requestWithdrawal: votes overflow\")\n );\n }\n\n if (primeRewardToken == _rewardToken && _pid == primePoolId) {\n primeToken.xvsUpdated(msg.sender);\n }\n\n emit Claim(msg.sender, _rewardToken, _pid, pending);\n emit RequestedWithdrawal(msg.sender, _rewardToken, _pid, _amount);\n }\n\n /**\n * @notice Get unlocked withdrawal amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return withdrawalAmount Amount that the user can withdraw\n */\n function getEligibleWithdrawalAmount(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint withdrawalAmount) {\n _ensureValidPool(_rewardToken, _pid);\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n // Since the requests are sorted by their unlock time, we can take\n // the entries from the end of the array and stop at the first\n // not-yet-eligible one\n for (uint i = requests.length; i > 0 && isUnlocked(requests[i - 1]); --i) {\n withdrawalAmount = withdrawalAmount.add(requests[i - 1].amount);\n }\n return withdrawalAmount;\n }\n\n /**\n * @notice Get requested amount\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return Total amount of requested but not yet executed withdrawals (including both executable and locked ones)\n */\n function getRequestedAmount(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n return user.pendingWithdrawals;\n }\n\n /**\n * @notice Returns the array of withdrawal requests that have not been executed yet\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The User Address\n * @return An array of withdrawal requests\n */\n function getWithdrawalRequests(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (WithdrawalRequest[] memory) {\n _ensureValidPool(_rewardToken, _pid);\n return withdrawalRequests[_rewardToken][_pid][_user];\n }\n\n /**\n * @notice View function to see pending XVSs on frontend\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return Reward the user is eligible for in this pool, in terms of _rewardToken\n */\n function pendingReward(address _rewardToken, uint256 _pid, address _user) external view returns (uint256) {\n _ensureValidPool(_rewardToken, _pid);\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n uint256 accRewardPerShare = pool.accRewardPerShare;\n uint256 supply = pool.token.balanceOf(address(this)).sub(totalPendingWithdrawals[_rewardToken][_pid]);\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 rewardTokenPerBlockOrSecond = rewardTokenAmountsPerBlockOrSecond[_rewardToken];\n if (curBlockNumberOrSecond > pool.lastRewardBlockOrSecond && supply != 0) {\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenPerBlockOrSecond).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n accRewardPerShare = accRewardPerShare.add(reward.mul(1e12).div(supply));\n }\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (, uint256 afterUpgradeWithdrawalAmount) = getRequestedWithdrawalAmount(requests);\n return user.amount.sub(afterUpgradeWithdrawalAmount).mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);\n }\n\n // Update reward variables for all pools. Be careful of gas spending!\n function massUpdatePools(address _rewardToken) internal {\n uint256 length = poolInfos[_rewardToken].length;\n for (uint256 pid = 0; pid < length; ++pid) {\n _updatePool(_rewardToken, pid);\n }\n }\n\n /**\n * @notice Update reward variables of the given pool to be up-to-date\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n */\n function updatePool(address _rewardToken, uint256 _pid) external isActive {\n _ensureValidPool(_rewardToken, _pid);\n _updatePool(_rewardToken, _pid);\n }\n\n // Update reward variables of the given pool to be up-to-date.\n function _updatePool(address _rewardToken, uint256 _pid) internal {\n PoolInfo storage pool = poolInfos[_rewardToken][_pid];\n if (getBlockNumberOrTimestamp() <= pool.lastRewardBlockOrSecond) {\n return;\n }\n uint256 supply = pool.token.balanceOf(address(this));\n supply = supply.sub(totalPendingWithdrawals[_rewardToken][_pid]);\n if (supply == 0) {\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n return;\n }\n uint256 curBlockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 multiplier = curBlockNumberOrSecond.sub(pool.lastRewardBlockOrSecond);\n uint256 reward = multiplier.mul(rewardTokenAmountsPerBlockOrSecond[_rewardToken]).mul(pool.allocPoint).div(\n totalAllocPoints[_rewardToken]\n );\n pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e12).div(supply));\n pool.lastRewardBlockOrSecond = getBlockNumberOrTimestamp();\n }\n\n function _ensureValidPool(address rewardToken, uint256 pid) internal view {\n require(pid < poolInfos[rewardToken].length, \"vault: pool exists?\");\n }\n\n /**\n * @notice Get user info with reward token address and pid\n * @param _rewardToken Reward token address\n * @param _pid Pool index\n * @param _user User address\n * @return amount Deposited amount\n * @return rewardDebt Reward debt (technical value used to track past payouts)\n * @return pendingWithdrawals Requested but not yet executed withdrawals\n */\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals) {\n _ensureValidPool(_rewardToken, _pid);\n UserInfo storage user = userInfos[_rewardToken][_pid][_user];\n amount = user.amount;\n rewardDebt = user.rewardDebt;\n pendingWithdrawals = user.pendingWithdrawals;\n }\n\n /**\n * @notice Gets the total pending withdrawal amount of a user before upgrade\n * @param _rewardToken The Reward Token Address\n * @param _pid The Pool Index\n * @param _user The address of the user\n * @return beforeUpgradeWithdrawalAmount Total pending withdrawal amount in requests made before the vault upgrade\n */\n function pendingWithdrawalsBeforeUpgrade(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) public view returns (uint256 beforeUpgradeWithdrawalAmount) {\n WithdrawalRequest[] storage requests = withdrawalRequests[_rewardToken][_pid][_user];\n (beforeUpgradeWithdrawalAmount, ) = getRequestedWithdrawalAmount(requests);\n return beforeUpgradeWithdrawalAmount;\n }\n\n /**\n * @notice Get the XVS stake balance of an account (excluding the pending withdrawals)\n * @param account The address of the account to check\n * @return The balance that user staked\n */\n function getStakeAmount(address account) internal view returns (uint96) {\n require(xvsAddress != address(0), \"XVSVault::getStakeAmount: xvs address is not set\");\n\n PoolInfo[] storage poolInfo = poolInfos[xvsAddress];\n\n uint256 length = poolInfo.length;\n for (uint256 pid = 0; pid < length; ++pid) {\n if (address(poolInfo[pid].token) == address(xvsAddress)) {\n UserInfo storage user = userInfos[xvsAddress][pid][account];\n return safe96(user.amount.sub(user.pendingWithdrawals), \"XVSVault::getStakeAmount: votes overflow\");\n }\n }\n return uint96(0);\n }\n\n /**\n * @notice Delegate votes from `msg.sender` to `delegatee`\n * @param delegatee The address to delegate votes to\n */\n function delegate(address delegatee) external isActive {\n return _delegate(msg.sender, delegatee);\n }\n\n /**\n * @notice Delegates votes from signatory to `delegatee`\n * @param delegatee The address to delegate votes to\n * @param nonce The contract state required to match the signature\n * @param expiry The time at which to expire the signature\n * @param v The recovery byte of the signature\n * @param r Half of the ECDSA signature pair\n * @param s Half of the ECDSA signature pair\n */\n function delegateBySig(\n address delegatee,\n uint nonce,\n uint expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external isActive {\n bytes32 domainSeparator = keccak256(\n abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(\"XVSVault\")), getChainId(), address(this))\n );\n bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));\n bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n address signatory = ECDSA.recover(digest, v, r, s);\n require(nonce == nonces[signatory]++, \"XVSVault::delegateBySig: invalid nonce\");\n require(block.timestamp <= expiry, \"XVSVault::delegateBySig: signature expired\");\n return _delegate(signatory, delegatee);\n }\n\n /**\n * @notice Gets the current votes balance for `account`\n * @param account The address to get votes balance\n * @return The number of current votes for `account`\n */\n function getCurrentVotes(address account) external view returns (uint96) {\n uint32 nCheckpoints = numCheckpoints[account];\n return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;\n }\n\n function _delegate(address delegator, address delegatee) internal {\n address currentDelegate = delegates[delegator];\n uint96 delegatorBalance = getStakeAmount(delegator);\n delegates[delegator] = delegatee;\n\n emit DelegateChangedV2(delegator, currentDelegate, delegatee);\n\n _moveDelegates(currentDelegate, delegatee, delegatorBalance);\n }\n\n function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal {\n if (srcRep != dstRep && amount > 0) {\n if (srcRep != address(0)) {\n uint32 srcRepNum = numCheckpoints[srcRep];\n uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;\n uint96 srcRepNew = sub96(srcRepOld, amount, \"XVSVault::_moveVotes: vote amount underflows\");\n _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);\n }\n\n if (dstRep != address(0)) {\n uint32 dstRepNum = numCheckpoints[dstRep];\n uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;\n uint96 dstRepNew = add96(dstRepOld, amount, \"XVSVault::_moveVotes: vote amount overflows\");\n _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);\n }\n }\n }\n\n function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {\n uint32 blockNumberOrSecond = safe32(\n getBlockNumberOrTimestamp(),\n \"XVSVault::_writeCheckpoint: block number or second exceeds 32 bits\"\n );\n\n if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlockOrSecond == blockNumberOrSecond) {\n checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;\n } else {\n checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumberOrSecond, newVotes);\n numCheckpoints[delegatee] = nCheckpoints + 1;\n }\n\n emit DelegateVotesChangedV2(delegatee, oldVotes, newVotes);\n }\n\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\n require(n < 2 ** 32, errorMessage);\n return uint32(n);\n }\n\n function safe96(uint n, string memory errorMessage) internal pure returns (uint96) {\n require(n < 2 ** 96, errorMessage);\n return uint96(n);\n }\n\n function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n uint96 c = a + b;\n require(c >= a, errorMessage);\n return c;\n }\n\n function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) {\n require(b <= a, errorMessage);\n return a - b;\n }\n\n function getChainId() internal pure returns (uint) {\n uint256 chainId;\n assembly {\n chainId := chainid()\n }\n return chainId;\n }\n\n /**\n * @notice Determine the xvs stake balance for an account\n * @param account The address of the account to check\n * @param blockNumberOrSecond The block number or second to get the vote balance at\n * @return The balance that user staked\n */\n function getPriorVotes(address account, uint256 blockNumberOrSecond) external view returns (uint96) {\n require(blockNumberOrSecond < getBlockNumberOrTimestamp(), \"XVSVault::getPriorVotes: not yet determined\");\n\n uint32 nCheckpoints = numCheckpoints[account];\n if (nCheckpoints == 0) {\n return 0;\n }\n\n // First check most recent balance\n if (checkpoints[account][nCheckpoints - 1].fromBlockOrSecond <= blockNumberOrSecond) {\n return checkpoints[account][nCheckpoints - 1].votes;\n }\n\n // Next check implicit zero balance\n if (checkpoints[account][0].fromBlockOrSecond > blockNumberOrSecond) {\n return 0;\n }\n\n uint32 lower = 0;\n uint32 upper = nCheckpoints - 1;\n while (upper > lower) {\n uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow\n Checkpoint memory cp = checkpoints[account][center];\n if (cp.fromBlockOrSecond == blockNumberOrSecond) {\n return cp.votes;\n } else if (cp.fromBlockOrSecond < blockNumberOrSecond) {\n lower = center;\n } else {\n upper = center - 1;\n }\n }\n return checkpoints[account][lower].votes;\n }\n\n /*** Admin Functions ***/\n\n function _become(XVSVaultProxy xvsVaultProxy) external {\n require(msg.sender == xvsVaultProxy.admin(), \"only proxy admin can change brains\");\n require(xvsVaultProxy._acceptImplementation() == 0, \"change not authorized\");\n }\n\n function setXvsStore(address _xvs, address _xvsStore) external onlyAdmin {\n _ensureNonzeroAddress(_xvs);\n _ensureNonzeroAddress(_xvsStore);\n\n address oldXvsContract = xvsAddress;\n address oldStore = xvsStore;\n require(oldXvsContract == address(0), \"already initialized\");\n\n xvsAddress = _xvs;\n xvsStore = _xvsStore;\n\n _notEntered = true;\n\n emit StoreUpdated(oldXvsContract, oldStore, _xvs, _xvsStore);\n }\n\n /**\n * @notice Sets the address of the prime token contract\n * @param _primeToken address of the prime token contract\n * @param _primeRewardToken address of reward token\n * @param _primePoolId pool id for reward\n */\n function setPrimeToken(IPrime _primeToken, address _primeRewardToken, uint256 _primePoolId) external onlyAdmin {\n require(address(_primeToken) != address(0), \"prime token cannot be zero address\");\n require(_primeRewardToken != address(0), \"reward cannot be zero address\");\n\n _ensureValidPool(_primeRewardToken, _primePoolId);\n\n emit NewPrimeToken(primeToken, _primeToken, primeRewardToken, _primeRewardToken, primePoolId, _primePoolId);\n\n primeToken = _primeToken;\n primeRewardToken = _primeRewardToken;\n primePoolId = _primePoolId;\n }\n\n /**\n * @dev Initializes the contract to use either blocks or seconds\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n */\n function initializeTimeManager(bool timeBased_, uint256 blocksPerYear_) external onlyAdmin {\n _initializeTimeManager(timeBased_, blocksPerYear_);\n }\n\n /**\n * @notice Sets the address of the access control of this contract\n * @dev Admin function to set the access control address\n * @param newAccessControlAddress New address for the access control\n */\n function setAccessControl(address newAccessControlAddress) external onlyAdmin {\n _setAccessControlManager(newAccessControlAddress);\n }\n\n /**\n * @dev Reverts if the provided address is a zero address\n * @param address_ Address to check\n */\n function _ensureNonzeroAddress(address address_) internal pure {\n require(address_ != address(0), \"zero address not allowed\");\n }\n\n /**\n * @dev Transfers the reward to the user, taking into account the rewards store\n * balance and the previous debt. If there are not enough rewards in the store,\n * transfers the available funds and records the debt amount in pendingRewardTransfers.\n * @param rewardToken Reward token address\n * @param userAddress User address\n * @param amount Reward amount, in reward tokens\n */\n function _transferReward(address rewardToken, address userAddress, uint256 amount) internal {\n address xvsStore_ = xvsStore;\n uint256 storeBalance = IBEP20(rewardToken).balanceOf(xvsStore_);\n uint256 debtDueToFailedTransfers = pendingRewardTransfers[rewardToken][userAddress];\n uint256 fullAmount = amount.add(debtDueToFailedTransfers);\n\n if (fullAmount <= storeBalance) {\n if (debtDueToFailedTransfers != 0) {\n pendingRewardTransfers[rewardToken][userAddress] = 0;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, 0);\n }\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, fullAmount);\n return;\n }\n // Overflow isn't possible due to the check above\n uint256 newOwedAmount = fullAmount - storeBalance;\n pendingRewardTransfers[rewardToken][userAddress] = newOwedAmount;\n emit VaultDebtUpdated(rewardToken, userAddress, debtDueToFailedTransfers, newOwedAmount);\n XVSStore(xvsStore_).safeRewardTransfer(rewardToken, userAddress, storeBalance);\n }\n\n /**\n * @dev Computes cumulative reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _cumulativeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return user.amount.sub(user.pendingWithdrawals).mul(pool.accRewardPerShare).div(1e12);\n }\n\n /**\n * @dev Computes the reward for all user's shares\n * @param user UserInfo storage struct\n * @param pool PoolInfo storage struct\n */\n function _computeReward(UserInfo storage user, PoolInfo storage pool) internal view returns (uint256) {\n return _cumulativeReward(user, pool).sub(user.rewardDebt);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultErrorReporter.sol": { + "content": "pragma solidity ^0.5.16;\n\ncontract XVSVaultErrorReporter {\n enum Error {\n NO_ERROR,\n UNAUTHORIZED\n }\n\n enum FailureInfo {\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\n SET_PENDING_ADMIN_OWNER_CHECK,\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK\n }\n\n /**\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\n **/\n event Failure(uint error, uint info, uint detail);\n\n /**\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\n */\n function fail(Error err, FailureInfo info) internal returns (uint) {\n emit Failure(uint(err), uint(info), 0);\n\n return uint(err);\n }\n\n /**\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\n */\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\n emit Failure(uint(err), uint(info), opaqueError);\n\n return uint(err);\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultProxy.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"./XVSVaultStorage.sol\";\nimport \"./XVSVaultErrorReporter.sol\";\n\n/**\n * @title XVS Vault Proxy\n * @author Venus\n * @notice XVS Vault Proxy contract\n */\ncontract XVSVaultProxy is XVSVaultAdminStorage, XVSVaultErrorReporter {\n /**\n * @notice Emitted when pendingXVSVaultImplementation is changed\n */\n event NewPendingImplementation(address oldPendingImplementation, address newPendingImplementation);\n\n /**\n * @notice Emitted when pendingXVSVaultImplementation is accepted, which means XVS Vault implementation is updated\n */\n event NewImplementation(address oldImplementation, address newImplementation);\n\n /**\n * @notice Emitted when pendingAdmin is changed\n */\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\n\n /**\n * @notice Emitted when pendingAdmin is accepted, which means admin is updated\n */\n event NewAdmin(address oldAdmin, address newAdmin);\n\n constructor() public {\n // Set admin to caller\n admin = msg.sender;\n }\n\n /*** Admin Functions ***/\n function _setPendingImplementation(address newPendingImplementation) public returns (uint) {\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_IMPLEMENTATION_OWNER_CHECK);\n }\n\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = newPendingImplementation;\n\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts new implementation of XVS Vault. msg.sender must be pendingImplementation\n * @dev Admin function for new implementation to accept it's role as implementation\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptImplementation() public returns (uint) {\n // Check caller is pendingImplementation\n if (msg.sender != pendingXVSVaultImplementation) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldImplementation = implementation;\n address oldPendingImplementation = pendingXVSVaultImplementation;\n\n implementation = pendingXVSVaultImplementation;\n\n pendingXVSVaultImplementation = address(0);\n\n emit NewImplementation(oldImplementation, implementation);\n emit NewPendingImplementation(oldPendingImplementation, pendingXVSVaultImplementation);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\n * @param newPendingAdmin New pending admin.\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _setPendingAdmin(address newPendingAdmin) public returns (uint) {\n // Check caller = admin\n if (msg.sender != admin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK);\n }\n\n // Save current value, if any, for inclusion in log\n address oldPendingAdmin = pendingAdmin;\n\n // Store pendingAdmin with value newPendingAdmin\n pendingAdmin = newPendingAdmin;\n\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\n * @dev Admin function for pending admin to accept role and update admin\n * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)\n */\n function _acceptAdmin() public returns (uint) {\n // Check caller is pendingAdmin\n if (msg.sender != pendingAdmin) {\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\n }\n\n // Save current values for inclusion in log\n address oldAdmin = admin;\n address oldPendingAdmin = pendingAdmin;\n\n // Store admin with value pendingAdmin\n admin = pendingAdmin;\n\n // Clear the pending value\n pendingAdmin = address(0);\n\n emit NewAdmin(oldAdmin, admin);\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\n\n return uint(Error.NO_ERROR);\n }\n\n /**\n * @dev Delegates execution to an implementation contract.\n * It returns to the external caller whatever the implementation returns\n * or forwards reverts.\n */\n function() external payable {\n // delegate all other functions to current implementation\n (bool success, ) = implementation.delegatecall(msg.data);\n\n assembly {\n let free_mem_ptr := mload(0x40)\n returndatacopy(free_mem_ptr, 0, returndatasize)\n\n switch success\n case 0 {\n revert(free_mem_ptr, returndatasize)\n }\n default {\n return(free_mem_ptr, returndatasize)\n }\n }\n }\n}\n" + }, + "contracts/XVSVault/XVSVaultStorage.sol": { + "content": "pragma solidity ^0.5.16;\n\nimport \"../Utils/SafeMath.sol\";\nimport \"../Utils/IBEP20.sol\";\nimport \"../Tokens/Prime/IPrime.sol\";\n\ncontract XVSVaultAdminStorage {\n /**\n * @notice Administrator for this contract\n */\n address public admin;\n\n /**\n * @notice Pending administrator for this contract\n */\n address public pendingAdmin;\n\n /**\n * @notice Active brains of XVS Vault\n */\n address public implementation;\n\n /**\n * @notice Pending brains of XVS Vault\n */\n address public pendingXVSVaultImplementation;\n}\n\ncontract XVSVaultStorageV1 is XVSVaultAdminStorage {\n /// @notice Guard variable for re-entrancy checks\n bool internal _notEntered;\n\n /// @notice The reward token store\n address public xvsStore;\n\n /// @notice The xvs token address\n address public xvsAddress;\n\n // Reward tokens created per block or second indentified by reward token address.\n mapping(address => uint256) public rewardTokenAmountsPerBlockOrSecond;\n\n /// @notice Info of each user.\n struct UserInfo {\n uint256 amount;\n uint256 rewardDebt;\n uint256 pendingWithdrawals;\n }\n\n // Info of each pool.\n struct PoolInfo {\n IBEP20 token; // Address of token contract to stake.\n uint256 allocPoint; // How many allocation points assigned to this pool.\n uint256 lastRewardBlockOrSecond; // Last block number or second that reward tokens distribution occurs.\n uint256 accRewardPerShare; // Accumulated per share, times 1e12. See below.\n uint256 lockPeriod; // Min time between withdrawal request and its execution.\n }\n\n // Infomation about a withdrawal request\n struct WithdrawalRequest {\n uint256 amount;\n uint128 lockedUntil;\n uint128 afterUpgrade;\n }\n\n // Info of each user that stakes tokens.\n mapping(address => mapping(uint256 => mapping(address => UserInfo))) internal userInfos;\n\n // Info of each pool.\n mapping(address => PoolInfo[]) public poolInfos;\n\n // Total allocation points. Must be the sum of all allocation points in all pools.\n mapping(address => uint256) public totalAllocPoints;\n\n // Info of requested but not yet executed withdrawals\n mapping(address => mapping(uint256 => mapping(address => WithdrawalRequest[]))) internal withdrawalRequests;\n\n /// @notice DEPRECATED A record of each accounts delegate (before the voting power fix)\n mapping(address => address) private __oldDelegatesSlot;\n\n /// @notice A checkpoint for marking number of votes from a given block or second\n struct Checkpoint {\n uint32 fromBlockOrSecond;\n uint96 votes;\n }\n\n /// @notice DEPRECATED A record of votes checkpoints for each account, by index (before the voting power fix)\n mapping(address => mapping(uint32 => Checkpoint)) private __oldCheckpointsSlot;\n\n /// @notice DEPRECATED The number of checkpoints for each account (before the voting power fix)\n mapping(address => uint32) private __oldNumCheckpointsSlot;\n\n /// @notice A record of states for signing / validating signatures\n mapping(address => uint) public nonces;\n\n /// @notice The EIP-712 typehash for the contract's domain\n bytes32 public constant DOMAIN_TYPEHASH =\n keccak256(\"EIP712Domain(string name,uint256 chainId,address verifyingContract)\");\n\n /// @notice The EIP-712 typehash for the delegation struct used by the contract\n bytes32 public constant DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n}\n\ncontract XVSVaultStorage is XVSVaultStorageV1 {\n /// @notice A record of each accounts delegate\n mapping(address => address) public delegates;\n\n /// @notice A record of votes checkpoints for each account, by index\n mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;\n\n /// @notice The number of checkpoints for each account\n mapping(address => uint32) public numCheckpoints;\n\n /// @notice Tracks pending withdrawals for all users for a particular reward token and pool id\n mapping(address => mapping(uint256 => uint256)) public totalPendingWithdrawals;\n\n /// @notice pause indicator for Vault\n bool public vaultPaused;\n\n /// @notice if the token is added to any of the pools\n mapping(address => bool) public isStakedToken;\n\n /// @notice Amount we owe to users because of failed transfer attempts\n mapping(address => mapping(address => uint256)) public pendingRewardTransfers;\n\n /// @notice Prime token contract address\n IPrime public primeToken;\n\n /// @notice Reward token for which prime token is issued for staking\n address public primeRewardToken;\n\n /// @notice Pool ID for which prime token is issued for staking\n uint256 public primePoolId;\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[46] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "storageLayout", + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "evm.gasEstimates" + ], + "": ["ast"] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} diff --git a/helpers/deploymentConfig.ts b/helpers/deploymentConfig.ts index d78bbc2ad..90eec24ef 100644 --- a/helpers/deploymentConfig.ts +++ b/helpers/deploymentConfig.ts @@ -179,8 +179,8 @@ export const getGlobalConfig: () => Promise = async () => { symbol: "vFDUSD", rateModel: InterestRateModels.JumpRate.toString(), baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), - jumpMultiplierPerYear: convertToUnit("2.5", 18), + multiplierPerYear: convertToUnit("0.075", 18), + jumpMultiplierPerYear: convertToUnit("5.0", 18), kink_: convertToUnit("0.8", 18), collateralFactor: convertToUnit("0.75", 18), liquidationThreshold: convertToUnit("0.8", 18), @@ -213,7 +213,7 @@ export const getGlobalConfig: () => Promise = async () => { symbol: "vUSDT", rateModel: InterestRateModels.JumpRate.toString(), baseRatePerYear: "0", - multiplierPerYear: convertToUnit("0.06875", 18), + multiplierPerYear: convertToUnit("0.1", 18), jumpMultiplierPerYear: convertToUnit("2.5", 18), kink_: convertToUnit("0.8", 18), collateralFactor: convertToUnit("0.75", 18), From e18f96d0fdab08520e53118609993dcad4fe063b Mon Sep 17 00:00:00 2001 From: kkirka Date: Wed, 21 Aug 2024 16:32:00 +0000 Subject: [PATCH 80/85] feat: updating deployment files --- deployments/bscmainnet.json | 502 ++++++++++++++++++++++++++ deployments/bscmainnet_addresses.json | 2 + 2 files changed, 504 insertions(+) diff --git a/deployments/bscmainnet.json b/deployments/bscmainnet.json index eb422d9a8..07559e620 100644 --- a/deployments/bscmainnet.json +++ b/deployments/bscmainnet.json @@ -7501,6 +7501,257 @@ } ] }, + "JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps": { + "address": "0x05c68eE7c9c66BE3a42476fe3838DE65ddE968f1", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" + } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ] + }, "JumpRateModel_base0bps_slope1250bps_jump25000bps_kink8000bps": { "address": "0x1485A27D95D3d2878a6641055dD3a643F296CCf6", "abi": [ @@ -8254,6 +8505,257 @@ } ] }, + "JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps": { + "address": "0xdEf4b9462223c9a44E61d217a145063C7836FD7B", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "baseRatePerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "multiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "jumpMultiplierPerBlock", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kink", + "type": "uint256" + } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "getBorrowRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa", + "type": "uint256" + } + ], + "name": "getSupplyRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "cash", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrows", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "reserves", + "type": "uint256" + } + ], + "name": "utilizationRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ] + }, "JumpRateModel_base0bps_slope875bps_jump25000bps_kink8000bps": { "address": "0xBe4609d972FdEBAa9DC870F4A957F40C301bEb1D", "abi": [ diff --git a/deployments/bscmainnet_addresses.json b/deployments/bscmainnet_addresses.json index 734e244e2..7767f5fa2 100644 --- a/deployments/bscmainnet_addresses.json +++ b/deployments/bscmainnet_addresses.json @@ -20,9 +20,11 @@ "JumpRateModel_base0bps_slope10000bps_jump25000bps_kink8000bps": "0x9e8fbACBfbD811Fc561af3Af7df8e38dEd4c52F3", "JumpRateModel_base0bps_slope10000bps_jump50000bps_kink8000bps": "0x958F4C84d3ad523Fa9936Dc465A123C7AD43D69B", "JumpRateModel_base0bps_slope1000bps_jump25000bps_kink8000bps": "0x62A8919C4C413fd4F9aef7348540Bc4B1b5CC805", + "JumpRateModel_base0bps_slope1000bps_jump50000bps_kink8000bps": "0x05c68eE7c9c66BE3a42476fe3838DE65ddE968f1", "JumpRateModel_base0bps_slope1250bps_jump25000bps_kink8000bps": "0x1485A27D95D3d2878a6641055dD3a643F296CCf6", "JumpRateModel_base0bps_slope1250bps_jump50000bps_kink8000bps": "0x9Fca5d66Cc0DF990080825051E825A8104a7ffA4", "JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps": "0xB105F9B511836cc7dF9F3dD0Ec4873766b5b6660", + "JumpRateModel_base0bps_slope750bps_jump50000bps_kink8000bps": "0xdEf4b9462223c9a44E61d217a145063C7836FD7B", "JumpRateModel_base0bps_slope875bps_jump25000bps_kink8000bps": "0xBe4609d972FdEBAa9DC870F4A957F40C301bEb1D", "JumpRateModel_base0bps_slope875bps_jump50000bps_kink8000bps": "0xE19C14171C2aC6CA63E008133e4B0D8571164BA3", "LINK": "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", From 2887b61856089003882566e3b89ad1f7547b4708 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 22 Aug 2024 12:33:54 +0530 Subject: [PATCH 81/85] feat: add deployments of VTreasury on zksync --- .env.example | 3 +- .github/workflows/ci.yml | 2 +- deploy/005-deploy-VTreasuryV8.ts | 1 + deployments/zksyncmainnet/.chainId | 1 + deployments/zksyncmainnet/VTreasuryV8.json | 427 ++++++++++++++++++ .../3c9481568d844c1a0b477e0dd5566399.json | 280 ++++++++++++ hardhat.config.zksync.ts | 14 + 7 files changed, 726 insertions(+), 2 deletions(-) create mode 100644 deployments/zksyncmainnet/.chainId create mode 100644 deployments/zksyncmainnet/VTreasuryV8.json create mode 100644 deployments/zksyncmainnet/solcInputs/3c9481568d844c1a0b477e0dd5566399.json diff --git a/.env.example b/.env.example index 5773c1852..cf9235853 100644 --- a/.env.example +++ b/.env.example @@ -18,7 +18,8 @@ DEPLOYER_PRIVATE_KEY= #ARCHIVE_NODE_arbitrumsepolia=https://sepolia-rollup.arbitrum.io/rpc #ARCHIVE_NODE_xlayertestnet=https://rpc.ankr.com/xlayer_testnet/ #ARCHIVE_NODE_xlayermainnet=https://rpc.ankr.com/xlayer -# ARCHIVE_NODE_zksyncsepolia=https://zksync-sepolia.g.alchemy.com/v2/ +#ARCHIVE_NODE_zksyncsepolia=https://zksync-sepolia.g.alchemy.com/v2/ +#ARCHIVE_NODE_zksyncmainnet=https://open-platform.nodereal.io//zksync ETHERSCAN_API_KEY= diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b43e7b982..e3db0aaf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done - for NETWORK in zksyncsepolia; do + for NETWORK in zksyncsepolia zksyncmainnet; do EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json --config hardhat.config.zksync.ts jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json done diff --git a/deploy/005-deploy-VTreasuryV8.ts b/deploy/005-deploy-VTreasuryV8.ts index 8e21e1d1f..d5ee6786f 100644 --- a/deploy/005-deploy-VTreasuryV8.ts +++ b/deploy/005-deploy-VTreasuryV8.ts @@ -33,6 +33,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { arbitrumone: "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0", // ARBITRUM_ONE MULTISIG xlayertestnet: "0x5961449d63149035aCfC0714D5155f24C9819004", // XLAYER TESTNET MULTISIG zksyncsepolia: "0xa2f83de95E9F28eD443132C331B6a9C9B7a9F866", // ZKSYNC SEPOLIA MULTISIG + zksyncmainnet: "0x751Aa759cfBB6CE71A43b48e40e1cCcFC66Ba4aa", // ZKSYNC MAINNET MULTISIG bscmainnet: await getTimelock(), bsctestnet: await getTimelock(), hardhat: deployer, diff --git a/deployments/zksyncmainnet/.chainId b/deployments/zksyncmainnet/.chainId new file mode 100644 index 000000000..5f1a9f39c --- /dev/null +++ b/deployments/zksyncmainnet/.chainId @@ -0,0 +1 @@ +324 \ No newline at end of file diff --git a/deployments/zksyncmainnet/VTreasuryV8.json b/deployments/zksyncmainnet/VTreasuryV8.json new file mode 100644 index 000000000..6aa9ed68e --- /dev/null +++ b/deployments/zksyncmainnet/VTreasuryV8.json @@ -0,0 +1,427 @@ +{ + "address": "0xB2e9174e23382f7744CebF7e0Be54cA001D95599", + "abi": [ + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "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": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryNative", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryToken", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "receipt": { + "to": "0x0000000000000000000000000000000000008006", + "from": "0x7f423E50147930e197dAaE9F637198E66746D597", + "contractAddress": "0xB2e9174e23382f7744CebF7e0Be54cA001D95599", + "transactionIndex": 3, + "gasUsed": "1253254", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf", + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000007f423e50147930e197daae9f637198e66746d597", + "0x0000000000000000000000000000000000000000000000000000000000008001" + ], + "data": "0x000000000000000000000000000000000000000000000000000052f266ae1d10", + "logIndex": 15, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + }, + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0x0000000000000000000000000000000000008008", + "topics": ["0x27fe8c0b49f49507b9d4fe5968c9f49edfe5c9df277d433a07a0717ede97638d"], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013f60000000000000000000000000000000000000000000000000000000000008008000000000000000000000000000000000000000000000000000000000000800e8ff8579340dce92cb8d3a2dad85cbedc221bd192e8ce40459d995d79d7667df1", + "logIndex": 16, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + }, + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0x0000000000000000000000000000000000008008", + "topics": [ + "0x3a36e47291f4201faf137fab081d92295bce2d53be2c6ca68ba82c7faa9ce241", + "0x000000000000000000000000000000000000000000000000000000000000800e", + "0x8ff8579340dce92cb8d3a2dad85cbedc221bd192e8ce40459d995d79d7667df1" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000186202230000000000000000000002db00010430000000b801008041ffffffffffffffff0000000000320435000000b80210009c000000b802008041000002ba0000c13d0000000102000039000000000101004b000000800010043f0000800d020000390000000002000414000000000100041a000000b80320009c00000040011002100000000000210435000000400100043d000000c0011002100000000001000414000002ba0000213d000000000101043b000002ba0000413d000002da0001042e000000200100003902d902cf0000040f0000000303000039000000bb011001c700000000010004160000000102200190000000000001042d000000000201004b000000000112019f000000c40010043f000000a40010043f000000840010043f000000cb01000041000000db0000c13d000000010100003900000000030100190000000002000019000000000101043300000020030000390000000402100039000000cb0200004100000024021000390000004402100039000000c0022002100000000005000019000100000001035502d902d40000040f0000000001000019000000e201000041000000000202004b000000ba01100197000000000201041a000000000021041b000002ba0000613d0000000101200190000000bc04000041000000c001200210000000b80120009c000000000262019f000000d90000c13d000000600330027053616665455243320000002400000000020000000000000000000000ffffffff000000000001042f000000b80310009c0000000401000029000000e704400197000000000121019f00000000014101cf000000000141022f000001000440008900000003044002100000001f0430018f000000000968004b0000000008980436000000007907043c0000026c0000c13d00000001055001900000026c0000213d0000000105004039000000400400043d000000e703300197000000cd011001c70000000000560435000000000701034f000000200430008c0000000002080019000700000008001d000600000009001d00050000000a001d00000000040340190000002004000039000000000131034f000000740000613d0000028b0000613d000000c8011001c7000000040010044300000000001004390000001f010000390000000202000039000000000200041600000000050004110000000402100370000000d60000013d000000b9022001970000000201000039000000ba05100197000000000020041b0000000006000411000000b902100197000000000012041b000000b901100197000000400040043f000000b803300197a5a5b6fb5ee820e5e7a2de409e1e4a895abe6f14a9c1a648a1a8f67cf36b6872ffffffffffffffe06865206f776e65726973206e6f7420742063616c6c6572204f776e61626c653a6e742063616c6c00207265656e747261637947756172643a5265656e7472616e00000004000000808579befe0000000000000064000000806265207a65726f00757374206e6f7420416d6f756e74206d77697468647261774e487b71000000007472616374000000206e6f6e2d636f6e2063616c6c20746f416464726573733ada8d42c9c056980c840c85d79c130dcb36c8f8bdf640d0de6d043f5c542a67e800000084000000006f6e20646964206e206f706572617469303a20455243323065640000000000006f742073756363657fffffffffffffff023a8d90e8508b8302500962caba6a1568e884a7374b41e01806aa1896bbf2656c206661696c65646576656c2063616c303a206c6f772d6ca9059cbb00000000000000240000008070a0823100000000000000840000008072000000000000006e6577206f776e656e6f7420746865206c6c657220697320537465703a2063614f776e61626c65320000002000000080d8c362d765e22700fa1faef420bfe791c7c124b9cd0de2d338d16b8cac22d99fbdd8bdfcdaf30dfa598c481af871c76f02c636f8939b0b1b41448dfa44379fc60000002000000000000000640000000008c379a0000000006c6564000000000043616c6c206661690200000200000000125fc972a6507f396b1951864fbfc14e829bd487b90b72539cc7f708afc659440000000079ba50970000000074c17a3500000000715018a600000000e30c3978000000008da5cb5b00000000fed7036e00000000f2fde38b00000000f2fde38a000000008da5cb5a00000040000001000000000200000000e3b4186f6b6457e019497f9722a3daaf1344cd1fd0a4f2848be0079c53165914ffffffff00000000000002d900000432000002d700210423000002d200210421000001a10000013d00000006060000290000000705000029000000dd040000410000000502000029000000dc011001c70000002a03000039000000db03000041000000da030000410000006402100039000002bc0000c13d000000000221004b000000010200c0390000000301000029000000200110008c000000d90210009c000002bc0000613d00000060011002100000004002300210000000b803008041000000b80230009c0000000303000029000001d80000013d0000001d03000039000000de03000041000002950000c13d00008002020000390000000701000029000000d801000041000002990000c13d000000e001000041000000040010043f00000041010000390000000000100435000000df0100004100000060022002100000004402400039000000000002043500000000023200190000001f04200039000002580000413d000000000524004b0000002004400039000000000065043500000000060604330000000006740019000000000534001900000000040000190000025f0000613d0000000207000029000000000402004b000000440310003900000000002304350000002403100039000000000202043300000001020000290000028c0000c13d000002720000c13d0000000000130435000000000151019f000000000545022f00000000054501cf00000000050304330000000303300029000002430000613d000000000504004b000002310000c13d000000000857004b0000000007870436000000006806043c000000000601034f00000000053700190000000307000029000002350000613d00000005033002100000000503300272000300000005001d00000000053504360000000405000029000000c90640009c000000000554004b0000000004450019000400000004001d000000e7054001970000003f044000390000001f04300039000002430000013d000300800000003d000400600000003d000002180000c13d000000b803300198000000b80030019d000000010220018f000000000113019f0000006003500210000000b805008041000000b80350009c0000004001400210000000400220021000000060013002100000000000150435000000000161019f000000000646022f00000000064601cf00000000060504330000000005520019000000000151034f000001fd0000613d000000000604004b000001eb0000c13d00000000080200190000000006520019000001ef0000613d00000005055002100000000505300272000000400200043d000000cc011001c70000000b03000039000000ca030000410000018f0000013d0000000000310435000000000343019f00000000033501cf000000000535022f0000010003300089000000000505043b000000000434022f00000000043401cf000000000401043300000003033002100000000001140019000000000515034f0000018f0000613d000000000603004b000001c00000c13d0000000008040019000000000705034f0000000006140019000001c40000613d00000005011002100000000501100272000000010500036700000000041404360000001f0310018f000000400030043f000000c90630009c000000000543004b00000000033400190000003f033000390000001f031000390000000605000029000000ce0400004100000002030000390000000702000029000001d30000613d000001a90000c13d000000000301004b000000b801100197000000b80010019d00000060011002700000800902000039000002180000013d000002030000c13d000000040680008c0000000005020433000100000006001d000000200500003900000100065001bf0000000000670435000200000007001d000000d7060000410000012007500039000000400060043f0000014006500039000000000062043500000044060000390000000000a60435000000c406500039000000000a06801900000000076a004b0000000000970435000000a4075000390000000000740435000000d607000041000000800600043d000000a004500039000000400020043f00000080025001bf000000600520018f0000001f02400039000000050a00002900000006090000290000000708000029000001e30000613d000000000003001f000000000585019f00000000055701cf000000000757022f0000010005500089000000000707043b000000000858022f00000000085801cf000000000806043300000080066000390000000305500210000000000761034f0000000506600210000001590000613d000000000705004b000001460000c13d000000a00890008c0000000009890436000000007807043c0000014a0000613d00000005064002720000001f0540018f0000008009000039000000d5011001c7000001880000013d0000000002040019000001850000c13d000000000203004b000001600000013d000000200230008c0000000003000031000001320000c13d000000040480008c000000840020043f0000000002000410000000800020043f000000d402000041000000e1010000410000011e0000c13d00000000020a004b000000000209004b000000000208004b000000000022041b0000018d0000013d00000000010000310000012b0000c13d000700000003001d000000040240008c00000006040000290000000703004029000000070210006b0000800a020000390000000001000410000000c701000041000600000003001d000700000004001d000001140000613d000000000104004b000000d301000041000000e40010043f000000d201000041000000d1010000410000002901000039000000e601000041000000cf04000041000000000151004b000000ba0160009c000000000601043b0000000401100370000000240230008c000000e5010000410000010d0000c13d000000020440008c000000000402041a000000000242004b0000000004000411000000ba02200197000000000200041a000000ba0220009c000000ba09200197000000000202043b0000004402100370000000000a02043b0000002402100370000000ba0280009c000000000802043b000000640230008c0000000006000019000000000010041b000000000032041b000000b903300197000000000302041a000000000252004b000000ba02100197000000d001000041000000e401000041000000e301000041000000f00000c13d000000000103004b000000000011041b000000b10000613d000000020220008c000000000121004b0000000002000411000000ba0110009c000000ba031001970000002401100370000000000402043b000000440230008c000000c10220009c000000bb0000613d000000c00420009c000000e40000c13d000000000363004b000000ba03200197000000c60120009c000000980000613d000000c50420009c000000800000613d000000c40420009c000000bd0100004100000120000004430000010000100443000000000102041a0000007c0000013d000000000101041a000000c30120009c000000780000613d000000c20120009c0000005b0000213d000000bf0420009c0000003c0000a13d000000be0420009c000000e002200270000000000201043b000000d90000413d000000040230008c0000001c0000c13d0000008004000039000100000031035500070000000000020002000000000002022202210027004000770220021f0076001d021e021d021c021b021a0219021802170216021502140213003f001c00090007002602120211001c000900070008021000750074000d00730072003e0071000c0070003d0006003c001b000b001a003b0019003a0039006f000800380018020f020e020d0017020c020b020a02090208003f001c00090007002600370207007202060205006e0038000d0073003e0071000c0070003d0006003c001b000b001a003b006d020402030202003f02010016006c020001ff001501fe01fd0014000d003601fc01fb0025006f003701fa01f901f801f701f601f5000a01f40001001c00090007000d0036000a01f30017001c00090007000d01f2006b01f10025000801f001ef01ee007501ed0013000500020012001b000b001a003b01ec006d01eb0016006a00350007006c01ea01e9001401e801e701e601e501e401e3001401e201e101e001df0025006901de01dd01dc0024000a001800230068002201db00210034000101da0016006a0035000701d901d801d70014000d0036006b01d6002500260037006e003e00380013000500020012001b000b001a01d50019003a0039003300170024000a00180023002201d40021003400010024000a0018002301d3002201d2002101d101d001cf000101ce01cd01cc01cb01ca006701c900660013000500020012006501c80032001d0064001501c7002701c6001301c501c401c301c2000801c101c001bf01be006301bd006301bc01bb0024000a001800230068002201ba00210034000101b901b801b701b6000c01b501b4006201b301b20061006001b100050002001201b001af01ae01ad005f005e003d0006003c01ac005d005c003201ab002700400077005b0061006001aa01a901a8005a01a701a601a501a401a301a201a101a0019f019e019d019c019b019a0199019801970196005901950031001d01940193019201910190018f018e018d005b0016018c018b018a01890188005e0187018601850184005f0183018201810180017f017e017d017c017b017a0179017800590177000c0176005d017500080174001b0173003000190031017201710170016f016e0011001d016d016c001000050002000f000c000e0006002f00200058000b016b016a01690019003a00390026006900740033001701680057016700570056016601650030005501640054005300520163016201610160015f015e015d015c015b015a00510050004f0159015801570156015501540153015201510150014f014e014d014c014b014a002e01490004002d01480004002c0010002b002a000400050002000f014700010146004e0145014401430142005a014100510050004f0140013f013e013d013c004d013b013a01390015004c004b004a013801370136000e000601350020000101340133013201310130000e0006002f0049005c0019012f003100270040012e012d012c012b012a0129012800480127012600560125012401230030005501220054005300520076004e01210120011f011e011d011c011b011a011901180117011601150114011300620112004d01110110010f0015004c004b004a010e010d004700290035010c001f010b0011002c0010002b002a0004010a010901080107010601050104010301020101010000ff00fe00fd00fc00fb00fa004800f900f800f7000e000600f600460002000f0020000100f500f400f300f200f10001001f00f000ef006700ee00660013000500020012006500ed0032001d00640015000900ec0011002e00eb0004002d00ea00e9004500e800e700e600e50046000200e40049000100470029001f00e300e2001400e1001600e00029001f002800df00de0007000900dd001100dc00db0004002e00da0004002d00d90004002c0010002b002a000400050002000f00d8000100330001001100d7001000050002000f000c000e0006002f00200058000b001a00d600d500d400d3004500d20008001e0028001e00d10008001e0028001e00d00017000100000000000000000000000000000044000300cf000000000000004400030003004300000000000000ce00cd00cc00cb00ca000000c9000000000000000000c800000000000000c700000000000000c600000000000000c500000000000000c400000000000000c300000000000000c200000000000000c100000000000000c000bf00be00bd00bc00bb000000420000000000000000000300ba00b90000000000b80000000000000000000000b700000043000000b6000000b500b400b300b200b100b000af00ae0000000000ad000000ac00ab00aa00a900a800a7000000000000000000a6000000a50000000000000000000000a4000000a3000000000000004100a200a100a0009f009e009d009c009b000300030003009a0099000000000041009800970096000000000095000000940093009200910090008f008e008d008c0000000000000000000000420000008b008a0089008800000000008700000086000000000000000000000085000000840083008200810080007f007e007d000300030003007c007b007a00790078000000000000000000000000000000000000000000000000000000000000", + "logIndex": 17, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + }, + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0x0000000000000000000000000000000000008004", + "topics": [ + "0xc94722ff13eacf53547c4741dab5228353a05938ffcdd5d4a2d533ae0e618287", + "0x010000e9722371af5b1399b228ece938fb8c93e1aebf95f10a09bfc0feb3e2d6", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "data": "0x", + "logIndex": 18, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + }, + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0xB2e9174e23382f7744CebF7e0Be54cA001D95599", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000007f423e50147930e197daae9f637198e66746d597" + ], + "data": "0x", + "logIndex": 19, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + }, + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0x0000000000000000000000000000000000008006", + "topics": [ + "0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5", + "0x0000000000000000000000007f423e50147930e197daae9f637198e66746d597", + "0x010000e9722371af5b1399b228ece938fb8c93e1aebf95f10a09bfc0feb3e2d6", + "0x000000000000000000000000b2e9174e23382f7744cebf7e0be54ca001d95599" + ], + "data": "0x", + "logIndex": 20, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + }, + { + "transactionIndex": 3, + "blockNumber": 42302569, + "transactionHash": "0xd0163a3a11df22e1f91495d53b4c877c98fa88a9de2c4422ad9e8b083b181cec", + "address": "0x000000000000000000000000000000000000800A", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000008001", + "0x0000000000000000000000007f423e50147930e197daae9f637198e66746d597" + ], + "data": "0x00000000000000000000000000000000000000000000000000001f5ea2904230", + "logIndex": 21, + "blockHash": "0xa8d560a7b2e4ecb5427540267dce3c33a83fb90fd53a3110a07508ec53a1ebbf" + } + ], + "blockNumber": 42302569, + "cumulativeGasUsed": "0", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "3c9481568d844c1a0b477e0dd5566399", + "metadata": { + "llvm_options": [], + "optimizer_settings": { + "is_debug_logging_enabled": false, + "is_fallback_to_size_enabled": false, + "is_verify_each_enabled": false, + "level_back_end": "Aggressive", + "level_middle_end": "Aggressive", + "level_middle_end_size": "Zero" + }, + "solc_metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.47b979f3\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"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\":false,\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"WithdrawTreasuryNative\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"WithdrawTreasuryToken\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawTreasuryNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"withdrawAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"withdrawAddress\",\"type\":\"address\"}],\"name\":\"withdrawTreasuryToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"acceptOwnership()\":{\"details\":\"The new owner accepts the ownership transfer.\"},\"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.\"},\"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.\"},\"withdrawTreasuryNative(uint256,address)\":{\"custom:error\":\"ZeroAddressNotAllowed thrown when withdrawAddress is zero.\",\"params\":{\"withdrawAddress\":\"The withdraw address\",\"withdrawAmount\":\"The withdraw amount to owner\"}},\"withdrawTreasuryToken(address,uint256,address)\":{\"custom:error\":\"ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.\",\"params\":{\"tokenAddress\":\"The address of treasury token\",\"withdrawAddress\":\"The withdraw address\",\"withdrawAmount\":\"The withdraw amount to owner\"}}},\"title\":\"VTreasuryV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"kind\":\"user\",\"methods\":{\"withdrawTreasuryNative(uint256,address)\":{\"notice\":\"Withdraw Treasury Native, Only owner call it\"},\"withdrawTreasuryToken(address,uint256,address)\":{\"notice\":\"Withdraw Treasury Tokens, Only owner call it\"}},\"notice\":\"Protocol treasury that holds tokens owned by Venus\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/VTreasuryV8.sol\":\"VTreasuryV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"details\":{\"constantOptimizer\":false,\"cse\":false,\"deduplicate\":false,\"inliner\":false,\"jumpdestRemover\":false,\"orderLiterals\":false,\"peephole\":false,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":true,\"yulDetails\":{\"optimizerSteps\":\"dhfoDgvulfnTUtnIf[xa[r]EscLMcCTUtTOntnfDIulLculVcul [j]Tpeulxa[rul]xa[r]cLgvifCTUca[r]LSsTFOtfDnca[r]Iulc]jmul[jul] VcTOcul jmul:fDnTOcmu\",\"stackAllocation\":true}},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fc980984badf3984b6303b377711220e067722bbd6a135b24669ff5069ef9f32\",\"dweb:/ipfs/QmPHXMSXj99XjSVM21YsY6aNtLLjLVXDbyN76J5HQYvvrz\"]},\"@openzeppelin/contracts/access/Ownable2Step.sol\":{\"keccak256\":\"0xde231558366826d7cb61725af8147965a61c53b77a352cc8c9af38fc5a92ac3c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1fd55624076bf61d44af5ff351919e32dda748567acfbdd6ba3d6c7be61c758e\",\"dweb:/ipfs/QmSki4dTrf4GPm7MTpG3fk8mC7rnjwd2zMomLp6jLuF63Q\"]},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://41319e7f621f2dc3733511332c4fd032f8e32ad2aa7fd6f665c19741d9941a34\",\"dweb:/ipfs/QmcYR3bd862GD1Bc7jwrU9bGxrhUu5na1oP964bDCu2id1\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bd39944e8fc06be6dbe2dd1d8449b5336e23c6a7ba3e8e9ae5ae0f37f35283f5\",\"dweb:/ipfs/QmPV3FGYjVwvKSgAXKUN3r9T9GwniZz83CxBpM7vyj2G53\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0xec63854014a5b4f2b3290ab9103a21bdf902a508d0f41a8573fea49e98bf571a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc5b5dc12fbc4002f282eaa7a5f06d8310ed62c1c77c5770f6283e058454c39a\",\"dweb:/ipfs/Qme9rE2wS3yBuyJq9GgbmzbsBQsW2M2sVFqYYLw7bosGrv\"]},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9d213d3befca47da33f6db0310826bcdb148299805c10d77175ecfe1d06a9a68\",\"dweb:/ipfs/QmRgCn6SP1hbBkExUADFuDo8xkT4UU47yjNF5FhCeRbQmS\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2455248c8ddd9cc6a7af76a13973cddf222072427e7b0e2a7d1aff345145e931\",\"dweb:/ipfs/QmfYjnjRbWqYpuxurqveE6HtzsY1Xx323J428AKQgtBJZm\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]},\"contracts/Governance/VTreasuryV8.sol\":{\"keccak256\":\"0x254876cbfd6840dc6d610db8b4d930656f0eda51a00b3aeee6d91ed8c96dcfc1\",\"license\":\"BSD-3-Clause\",\"urls\":[\"bzz-raw://452e607b3ff5eb14d37315022627848ada87df047ae3745f6f42f1ba4ee43e69\",\"dweb:/ipfs/QmU2s1o166cT16BFguGZdTW5tPfsPiVcUzo86yJRhNN3ay\"]}},\"version\":1}", + "solc_version": "0.8.25", + "solc_zkvm_edition": "1.0.1", + "zk_version": "1.5.0" + }, + "bytecode": "0x0002000000000002000700000000000200000000030100190000006003300270000000b80330019700010000003103550000008004000039000000400040043f00000001022001900000001c0000c13d000000040230008c000000d90000413d000000000201043b000000e002200270000000be0420009c0000003c0000a13d000000bf0420009c0000005b0000213d000000c20120009c000000780000613d000000c30120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000101041a0000007c0000013d0000000001000416000000000101004b000002ba0000c13d0000000102000039000000000102041a000000b901100197000000000012041b000000000100041a000000b9021001970000000006000411000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc0400004102d902cf0000040f0000000101200190000002ba0000613d00000002010000390000000102000039000000000021041b000000200100003900000100001004430000012000000443000000bd01000041000002da0001042e000000c40420009c000000800000613d000000c50420009c000000980000613d000000c60120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000201041a000000ba032001970000000006000411000000000363004b000000e40000c13d000000b902200197000000000021041b000000000100041a000000b902100197000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc04000041000000d60000013d000000c00420009c000000bb0000613d000000c10220009c000000d90000c13d000000440230008c000002ba0000413d0000000402100370000000000402043b0000002401100370000000000101043b000000ba03100197000000ba0110009c000002ba0000213d000000000100041a000000ba011001970000000002000411000000000121004b000000db0000c13d0000000201000039000000000201041a000000020220008c000000b10000613d000000000011041b000000000103004b000000f00000c13d000000e301000041000000800010043f000000e401000041000002db000104300000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba01100197000000800010043f000000d001000041000002da0001042e0000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba021001970000000005000411000000000252004b000000db0000c13d0000000102000039000000000302041a000000b903300197000000000032041b000000b901100197000000000010041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000bc040000410000000006000019000000d60000013d000000640230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000402100370000000000802043b000000ba0280009c000002ba0000213d0000002402100370000000000a02043b0000004402100370000000000202043b000000ba09200197000000ba0220009c000002ba0000213d000000000200041a000000ba022001970000000004000411000000000242004b000000db0000c13d0000000202000039000000000402041a000000020440008c0000010d0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e501000041000000c40010043f000000e201000041000002db00010430000000240230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000401100370000000000601043b000000ba0160009c000002ba0000213d000000000100041a000000ba011001970000000005000411000000000151004b000000db0000c13d0000000101000039000000000201041a000000b902200197000000000262019f000000000021041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000cf0400004102d902cf0000040f0000000101200190000002ba0000613d0000000001000019000002da0001042e000000cb01000041000000800010043f0000002001000039000000840010043f000000a40010043f000000e601000041000000c40010043f000000e201000041000002db00010430000000cb01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000000d101000041000000c40010043f000000d201000041000000e40010043f000000d301000041000002db00010430000000000104004b000001140000613d000700000004001d000600000003001d000000c7010000410000000000100439000000000100041000000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c70000800a0200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000070210006b0000000003010019000000070300402900000000010004140000000604000029000000040240008c000700000003001d0000012b0000c13d000000010200003900000000010000310000018d0000013d000000000022041b000000000208004b000000740000613d000000000209004b000000740000613d00000000020a004b0000011e0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e101000041000000c40010043f000000e201000041000002db00010430000000d402000041000000800020043f0000000002000410000000840020043f0000000002000414000000040480008c000001320000c13d000000000131034f0000000003000031000000200230008c00000020040000390000000004034019000001600000013d000000b80210009c000000b801008041000000c001100210000000000203004b000001850000c13d0000000002040019000001880000013d00050000000a001d000600000009001d000000b80120009c000000b802008041000000c001200210000000d5011001c7000700000008001d000000000208001902d902d40000040f000000800900003900000000030100190000006003300270000000b803300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000014a0000613d000000000701034f000000007807043c0000000009890436000000a00890008c000001460000c13d000000000705004b000001590000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00010000000103550000000102200190000001e30000613d00000007080000290000000609000029000000050a0000290000001f02400039000000600520018f00000080025001bf000000400020043f000000200430008c000002ba0000413d000000a004500039000000800600043d000000d6070000410000000000740435000000a407500039000600000009001d000000000097043500000000076a004b000000000a068019000000c40650003900050000000a001d0000000000a60435000000440600003900000000006204350000014006500039000000400060043f0000012007500039000000d706000041000200000007001d000000000067043500000100065001bf0000002005000039000100000006001d000000000056043500000000050204330000000002000414000000040680008c000700000008001d000002030000c13d0000000102000039000002180000013d000000bb011001c70000800902000039000000000500001902d902cf0000040f00010000000103550000006001100270000000b80010019d000000b801100197000000000301004b000001a90000c13d000000400100043d0000000102200190000001d30000613d00000007020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000203000039000000ce04000041000000060500002902d902cf0000040f0000000101200190000002ba0000613d00000001010000390000000202000039000000000012041b0000000001000019000002da0001042e0000001f03100039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000543004b00000000050000190000000105004039000000c90630009c0000026c0000213d00000001055001900000026c0000c13d000000400030043f0000001f0310018f0000000004140436000000010500036700000005011002720000000501100210000001c40000613d0000000006140019000000000705034f0000000008040019000000007907043c0000000008980436000000000968004b000001c00000c13d000000000603004b0000018f0000613d000000000515034f00000000011400190000000303300210000000000401043300000000043401cf000000000434022f000000000505043b0000010003300089000000000535022f00000000033501cf000000000343019f00000000003104350000018f0000013d0000004402100039000000ca03000041000000000032043500000024021000390000000b030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000cc011001c7000002db00010430000000400200043d0000001f0430018f00000005053002720000000505500210000001ef0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000001eb0000c13d000000000604004b000001fd0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000b80320009c000000b8020080410000004002200210000000000112019f000002db000104300000004001400210000000b80350009c000000b8050080410000006003500210000000000113019f000000b80320009c000000b802008041000000c002200210000000000121019f000000000208001902d902cf0000040f000000010220018f000100000001035500000000030100190000006003300270000000b80030019d000000b803300198000002180000c13d000400600000003d000300800000003d000002430000013d0000001f04300039000000e7044001970000003f04400039000000e705400197000000400400043d000400000004001d0000000004450019000000000554004b00000000050000190000000105004039000000c90640009c0000026c0000213d00000001055001900000026c0000c13d000000400040043f0000001f0430018f00000004050000290000000005350436000300000005001d00000005033002720000000503300210000002350000613d00000003070000290000000005370019000000000601034f000000006806043c0000000007870436000000000857004b000002310000c13d000000000504004b000002430000613d000000000131034f00000003033000290000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000013043500000004010000290000000001010433000000000202004b000002720000c13d000000000201004b0000028c0000c13d000000400100043d000000cb02000041000000000021043500000004021000390000002003000039000000000032043500000001020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b00000002070000290000025f0000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000002580000413d0000001f04200039000000e704400197000000000232001900000000000204350000004402400039000000b80320009c000000b8020080410000006002200210000000b80310009c000000b8010080410000004001100210000000000112019f000002db00010430000000df0100004100000000001004350000004101000039000000040010043f000000e001000041000002db00010430000000000201004b000002990000c13d000000d8010000410000000000100439000000070100002900000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c7000080020200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000000101004b000002950000c13d000000400100043d0000004402100039000000de03000041000000000032043500000024021000390000001d03000039000001d80000013d000000000001042f0000000303000029000000b80230009c000000b8030080410000004002300210000000b80310009c000000b8010080410000006001100210000000000121019f000002db0001043000000004010000290000000001010433000000000201004b000002bc0000613d000000d90210009c000002ba0000213d000000200110008c000002ba0000413d00000003010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000002ba0000c13d000000000101004b000002bc0000c13d000000400100043d0000006402100039000000da0300004100000000003204350000004402100039000000db03000041000000000032043500000024021000390000002a030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000dc011001c7000002db000104300000000001000019000002db00010430000000400100043d00000005020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000303000039000000dd0400004100000007050000290000000606000029000001a10000013d000000000001042f000002d2002104210000000102000039000000000001042d0000000002000019000000000001042d000002d7002104230000000102000039000000000001042d0000000002000019000000000001042d000002d900000432000002da0001042e000002db00010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008da5cb5a00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fed7036e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000715018a60000000000000000000000000000000000000000000000000000000074c17a350000000000000000000000000000000000000000000000000000000079ba50979cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff43616c6c206661696c656400000000000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000020000000000000000000000000000000000002000000000000000000000000041448dfa44379fc602c636f8939b0b1b598c481af871c76fbdd8bdfcdaf30dfa38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270000000000000000000000000000000000000000200000008000000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000070a08231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000800000000000000000a9059cbb000000000000000000000000000000000000000000000000000000005361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65641806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e00000000000000000000000000000000000000840000000000000000000000006d043f5c542a67e836c8f8bdf640d0de840c85d79c130dcbda8d42c9c056980c416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000007769746864726177416d6f756e74206d757374206e6f74206265207a65726f0000000000000000000000000000000000000000640000008000000000000000008579befe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000005265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0a1a8f67cf36b68725abe6f14a9c1a648e7a2de409e1e4a89a5a5b6fb5ee820e5", + "deployedBytecode": "0x0002000000000002000700000000000200000000030100190000006003300270000000b80330019700010000003103550000008004000039000000400040043f00000001022001900000001c0000c13d000000040230008c000000d90000413d000000000201043b000000e002200270000000be0420009c0000003c0000a13d000000bf0420009c0000005b0000213d000000c20120009c000000780000613d000000c30120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000101041a0000007c0000013d0000000001000416000000000101004b000002ba0000c13d0000000102000039000000000102041a000000b901100197000000000012041b000000000100041a000000b9021001970000000006000411000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc0400004102d902cf0000040f0000000101200190000002ba0000613d00000002010000390000000102000039000000000021041b000000200100003900000100001004430000012000000443000000bd01000041000002da0001042e000000c40420009c000000800000613d000000c50420009c000000980000613d000000c60120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000201041a000000ba032001970000000006000411000000000363004b000000e40000c13d000000b902200197000000000021041b000000000100041a000000b902100197000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc04000041000000d60000013d000000c00420009c000000bb0000613d000000c10220009c000000d90000c13d000000440230008c000002ba0000413d0000000402100370000000000402043b0000002401100370000000000101043b000000ba03100197000000ba0110009c000002ba0000213d000000000100041a000000ba011001970000000002000411000000000121004b000000db0000c13d0000000201000039000000000201041a000000020220008c000000b10000613d000000000011041b000000000103004b000000f00000c13d000000e301000041000000800010043f000000e401000041000002db000104300000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba01100197000000800010043f000000d001000041000002da0001042e0000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba021001970000000005000411000000000252004b000000db0000c13d0000000102000039000000000302041a000000b903300197000000000032041b000000b901100197000000000010041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000bc040000410000000006000019000000d60000013d000000640230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000402100370000000000802043b000000ba0280009c000002ba0000213d0000002402100370000000000a02043b0000004402100370000000000202043b000000ba09200197000000ba0220009c000002ba0000213d000000000200041a000000ba022001970000000004000411000000000242004b000000db0000c13d0000000202000039000000000402041a000000020440008c0000010d0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e501000041000000c40010043f000000e201000041000002db00010430000000240230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000401100370000000000601043b000000ba0160009c000002ba0000213d000000000100041a000000ba011001970000000005000411000000000151004b000000db0000c13d0000000101000039000000000201041a000000b902200197000000000262019f000000000021041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000cf0400004102d902cf0000040f0000000101200190000002ba0000613d0000000001000019000002da0001042e000000cb01000041000000800010043f0000002001000039000000840010043f000000a40010043f000000e601000041000000c40010043f000000e201000041000002db00010430000000cb01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000000d101000041000000c40010043f000000d201000041000000e40010043f000000d301000041000002db00010430000000000104004b000001140000613d000700000004001d000600000003001d000000c7010000410000000000100439000000000100041000000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c70000800a0200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000070210006b0000000003010019000000070300402900000000010004140000000604000029000000040240008c000700000003001d0000012b0000c13d000000010200003900000000010000310000018d0000013d000000000022041b000000000208004b000000740000613d000000000209004b000000740000613d00000000020a004b0000011e0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e101000041000000c40010043f000000e201000041000002db00010430000000d402000041000000800020043f0000000002000410000000840020043f0000000002000414000000040480008c000001320000c13d000000000131034f0000000003000031000000200230008c00000020040000390000000004034019000001600000013d000000b80210009c000000b801008041000000c001100210000000000203004b000001850000c13d0000000002040019000001880000013d00050000000a001d000600000009001d000000b80120009c000000b802008041000000c001200210000000d5011001c7000700000008001d000000000208001902d902d40000040f000000800900003900000000030100190000006003300270000000b803300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000014a0000613d000000000701034f000000007807043c0000000009890436000000a00890008c000001460000c13d000000000705004b000001590000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00010000000103550000000102200190000001e30000613d00000007080000290000000609000029000000050a0000290000001f02400039000000600520018f00000080025001bf000000400020043f000000200430008c000002ba0000413d000000a004500039000000800600043d000000d6070000410000000000740435000000a407500039000600000009001d000000000097043500000000076a004b000000000a068019000000c40650003900050000000a001d0000000000a60435000000440600003900000000006204350000014006500039000000400060043f0000012007500039000000d706000041000200000007001d000000000067043500000100065001bf0000002005000039000100000006001d000000000056043500000000050204330000000002000414000000040680008c000700000008001d000002030000c13d0000000102000039000002180000013d000000bb011001c70000800902000039000000000500001902d902cf0000040f00010000000103550000006001100270000000b80010019d000000b801100197000000000301004b000001a90000c13d000000400100043d0000000102200190000001d30000613d00000007020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000203000039000000ce04000041000000060500002902d902cf0000040f0000000101200190000002ba0000613d00000001010000390000000202000039000000000012041b0000000001000019000002da0001042e0000001f03100039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000543004b00000000050000190000000105004039000000c90630009c0000026c0000213d00000001055001900000026c0000c13d000000400030043f0000001f0310018f0000000004140436000000010500036700000005011002720000000501100210000001c40000613d0000000006140019000000000705034f0000000008040019000000007907043c0000000008980436000000000968004b000001c00000c13d000000000603004b0000018f0000613d000000000515034f00000000011400190000000303300210000000000401043300000000043401cf000000000434022f000000000505043b0000010003300089000000000535022f00000000033501cf000000000343019f00000000003104350000018f0000013d0000004402100039000000ca03000041000000000032043500000024021000390000000b030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000cc011001c7000002db00010430000000400200043d0000001f0430018f00000005053002720000000505500210000001ef0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000001eb0000c13d000000000604004b000001fd0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000b80320009c000000b8020080410000004002200210000000000112019f000002db000104300000004001400210000000b80350009c000000b8050080410000006003500210000000000113019f000000b80320009c000000b802008041000000c002200210000000000121019f000000000208001902d902cf0000040f000000010220018f000100000001035500000000030100190000006003300270000000b80030019d000000b803300198000002180000c13d000400600000003d000300800000003d000002430000013d0000001f04300039000000e7044001970000003f04400039000000e705400197000000400400043d000400000004001d0000000004450019000000000554004b00000000050000190000000105004039000000c90640009c0000026c0000213d00000001055001900000026c0000c13d000000400040043f0000001f0430018f00000004050000290000000005350436000300000005001d00000005033002720000000503300210000002350000613d00000003070000290000000005370019000000000601034f000000006806043c0000000007870436000000000857004b000002310000c13d000000000504004b000002430000613d000000000131034f00000003033000290000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000013043500000004010000290000000001010433000000000202004b000002720000c13d000000000201004b0000028c0000c13d000000400100043d000000cb02000041000000000021043500000004021000390000002003000039000000000032043500000001020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b00000002070000290000025f0000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000002580000413d0000001f04200039000000e704400197000000000232001900000000000204350000004402400039000000b80320009c000000b8020080410000006002200210000000b80310009c000000b8010080410000004001100210000000000112019f000002db00010430000000df0100004100000000001004350000004101000039000000040010043f000000e001000041000002db00010430000000000201004b000002990000c13d000000d8010000410000000000100439000000070100002900000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c7000080020200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000000101004b000002950000c13d000000400100043d0000004402100039000000de03000041000000000032043500000024021000390000001d03000039000001d80000013d000000000001042f0000000303000029000000b80230009c000000b8030080410000004002300210000000b80310009c000000b8010080410000006001100210000000000121019f000002db0001043000000004010000290000000001010433000000000201004b000002bc0000613d000000d90210009c000002ba0000213d000000200110008c000002ba0000413d00000003010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000002ba0000c13d000000000101004b000002bc0000c13d000000400100043d0000006402100039000000da0300004100000000003204350000004402100039000000db03000041000000000032043500000024021000390000002a030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000dc011001c7000002db000104300000000001000019000002db00010430000000400100043d00000005020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000303000039000000dd0400004100000007050000290000000606000029000001a10000013d000000000001042f000002d2002104210000000102000039000000000001042d0000000002000019000000000001042d000002d7002104230000000102000039000000000001042d0000000002000019000000000001042d000002d900000432000002da0001042e000002db00010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008da5cb5a00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fed7036e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000715018a60000000000000000000000000000000000000000000000000000000074c17a350000000000000000000000000000000000000000000000000000000079ba50979cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff43616c6c206661696c656400000000000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000020000000000000000000000000000000000002000000000000000000000000041448dfa44379fc602c636f8939b0b1b598c481af871c76fbdd8bdfcdaf30dfa38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270000000000000000000000000000000000000000200000008000000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000070a08231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000800000000000000000a9059cbb000000000000000000000000000000000000000000000000000000005361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65641806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e00000000000000000000000000000000000000840000000000000000000000006d043f5c542a67e836c8f8bdf640d0de840c85d79c130dcbda8d42c9c056980c416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000007769746864726177416d6f756e74206d757374206e6f74206265207a65726f0000000000000000000000000000000000000000640000008000000000000000008579befe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000005265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0a1a8f67cf36b68725abe6f14a9c1a648e7a2de409e1e4a89a5a5b6fb5ee820e5", + "devdoc": { + "author": "Venus", + "kind": "dev", + "methods": { + "acceptOwnership()": { + "details": "The new owner accepts the ownership transfer." + }, + "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." + }, + "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." + }, + "withdrawTreasuryNative(uint256,address)": { + "custom:error": "ZeroAddressNotAllowed thrown when withdrawAddress is zero.", + "params": { + "withdrawAddress": "The withdraw address", + "withdrawAmount": "The withdraw amount to owner" + } + }, + "withdrawTreasuryToken(address,uint256,address)": { + "custom:error": "ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.", + "params": { + "tokenAddress": "The address of treasury token", + "withdrawAddress": "The withdraw address", + "withdrawAmount": "The withdraw amount to owner" + } + } + }, + "title": "VTreasuryV8", + "version": 1 + }, + "userdoc": { + "errors": { + "ZeroAddressNotAllowed()": [ + { + "notice": "Thrown if the supplied address is a zero address where it is not allowed" + } + ] + }, + "kind": "user", + "methods": { + "withdrawTreasuryNative(uint256,address)": { + "notice": "Withdraw Treasury Native, Only owner call it" + }, + "withdrawTreasuryToken(address,uint256,address)": { + "notice": "Withdraw Treasury Tokens, Only owner call it" + } + }, + "notice": "Protocol treasury that holds tokens owned by Venus", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3139, + "contract": "contracts/Governance/VTreasuryV8.sol:VTreasuryV8", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3252, + "contract": "contracts/Governance/VTreasuryV8.sol:VTreasuryV8", + "label": "_pendingOwner", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 4372, + "contract": "contracts/Governance/VTreasuryV8.sol:VTreasuryV8", + "label": "_status", + "offset": 0, + "slot": "2", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + }, + "factoryDeps": [ + "0x0002000000000002000700000000000200000000030100190000006003300270000000b80330019700010000003103550000008004000039000000400040043f00000001022001900000001c0000c13d000000040230008c000000d90000413d000000000201043b000000e002200270000000be0420009c0000003c0000a13d000000bf0420009c0000005b0000213d000000c20120009c000000780000613d000000c30120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000101041a0000007c0000013d0000000001000416000000000101004b000002ba0000c13d0000000102000039000000000102041a000000b901100197000000000012041b000000000100041a000000b9021001970000000006000411000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc0400004102d902cf0000040f0000000101200190000002ba0000613d00000002010000390000000102000039000000000021041b000000200100003900000100001004430000012000000443000000bd01000041000002da0001042e000000c40420009c000000800000613d000000c50420009c000000980000613d000000c60120009c000000d90000c13d0000000001000416000000000101004b000002ba0000c13d0000000101000039000000000201041a000000ba032001970000000006000411000000000363004b000000e40000c13d000000b902200197000000000021041b000000000100041a000000b902100197000000000262019f000000000020041b0000000002000414000000ba05100197000000b80120009c000000b802008041000000c001200210000000bb011001c70000800d020000390000000303000039000000bc04000041000000d60000013d000000c00420009c000000bb0000613d000000c10220009c000000d90000c13d000000440230008c000002ba0000413d0000000402100370000000000402043b0000002401100370000000000101043b000000ba03100197000000ba0110009c000002ba0000213d000000000100041a000000ba011001970000000002000411000000000121004b000000db0000c13d0000000201000039000000000201041a000000020220008c000000b10000613d000000000011041b000000000103004b000000f00000c13d000000e301000041000000800010043f000000e401000041000002db000104300000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba01100197000000800010043f000000d001000041000002da0001042e0000000001000416000000000101004b000002ba0000c13d000000000100041a000000ba021001970000000005000411000000000252004b000000db0000c13d0000000102000039000000000302041a000000b903300197000000000032041b000000b901100197000000000010041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000bc040000410000000006000019000000d60000013d000000640230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000402100370000000000802043b000000ba0280009c000002ba0000213d0000002402100370000000000a02043b0000004402100370000000000202043b000000ba09200197000000ba0220009c000002ba0000213d000000000200041a000000ba022001970000000004000411000000000242004b000000db0000c13d0000000202000039000000000402041a000000020440008c0000010d0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e501000041000000c40010043f000000e201000041000002db00010430000000240230008c000002ba0000413d0000000002000416000000000202004b000002ba0000c13d0000000401100370000000000601043b000000ba0160009c000002ba0000213d000000000100041a000000ba011001970000000005000411000000000151004b000000db0000c13d0000000101000039000000000201041a000000b902200197000000000262019f000000000021041b0000000001000414000000b80210009c000000b801008041000000c001100210000000bb011001c70000800d020000390000000303000039000000cf0400004102d902cf0000040f0000000101200190000002ba0000613d0000000001000019000002da0001042e000000cb01000041000000800010043f0000002001000039000000840010043f000000a40010043f000000e601000041000000c40010043f000000e201000041000002db00010430000000cb01000041000000800010043f0000002001000039000000840010043f0000002901000039000000a40010043f000000d101000041000000c40010043f000000d201000041000000e40010043f000000d301000041000002db00010430000000000104004b000001140000613d000700000004001d000600000003001d000000c7010000410000000000100439000000000100041000000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c70000800a0200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000070210006b0000000003010019000000070300402900000000010004140000000604000029000000040240008c000700000003001d0000012b0000c13d000000010200003900000000010000310000018d0000013d000000000022041b000000000208004b000000740000613d000000000209004b000000740000613d00000000020a004b0000011e0000c13d000000cb01000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000e101000041000000c40010043f000000e201000041000002db00010430000000d402000041000000800020043f0000000002000410000000840020043f0000000002000414000000040480008c000001320000c13d000000000131034f0000000003000031000000200230008c00000020040000390000000004034019000001600000013d000000b80210009c000000b801008041000000c001100210000000000203004b000001850000c13d0000000002040019000001880000013d00050000000a001d000600000009001d000000b80120009c000000b802008041000000c001200210000000d5011001c7000700000008001d000000000208001902d902d40000040f000000800900003900000000030100190000006003300270000000b803300197000000200430008c000000200400003900000000040340190000001f0540018f00000005064002720000014a0000613d000000000701034f000000007807043c0000000009890436000000a00890008c000001460000c13d000000000705004b000001590000613d0000000506600210000000000761034f00000003055002100000008006600039000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f0000000000560435000000000003001f00010000000103550000000102200190000001e30000613d00000007080000290000000609000029000000050a0000290000001f02400039000000600520018f00000080025001bf000000400020043f000000200430008c000002ba0000413d000000a004500039000000800600043d000000d6070000410000000000740435000000a407500039000600000009001d000000000097043500000000076a004b000000000a068019000000c40650003900050000000a001d0000000000a60435000000440600003900000000006204350000014006500039000000400060043f0000012007500039000000d706000041000200000007001d000000000067043500000100065001bf0000002005000039000100000006001d000000000056043500000000050204330000000002000414000000040680008c000700000008001d000002030000c13d0000000102000039000002180000013d000000bb011001c70000800902000039000000000500001902d902cf0000040f00010000000103550000006001100270000000b80010019d000000b801100197000000000301004b000001a90000c13d000000400100043d0000000102200190000001d30000613d00000007020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000203000039000000ce04000041000000060500002902d902cf0000040f0000000101200190000002ba0000613d00000001010000390000000202000039000000000012041b0000000001000019000002da0001042e0000001f03100039000000e7033001970000003f03300039000000e703300197000000400400043d0000000003340019000000000543004b00000000050000190000000105004039000000c90630009c0000026c0000213d00000001055001900000026c0000c13d000000400030043f0000001f0310018f0000000004140436000000010500036700000005011002720000000501100210000001c40000613d0000000006140019000000000705034f0000000008040019000000007907043c0000000008980436000000000968004b000001c00000c13d000000000603004b0000018f0000613d000000000515034f00000000011400190000000303300210000000000401043300000000043401cf000000000434022f000000000505043b0000010003300089000000000535022f00000000033501cf000000000343019f00000000003104350000018f0000013d0000004402100039000000ca03000041000000000032043500000024021000390000000b030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000cc011001c7000002db00010430000000400200043d0000001f0430018f00000005053002720000000505500210000001ef0000613d0000000006520019000000000701034f0000000008020019000000007907043c0000000008980436000000000968004b000001eb0000c13d000000000604004b000001fd0000613d000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f00000000001504350000006001300210000000b80320009c000000b8020080410000004002200210000000000112019f000002db000104300000004001400210000000b80350009c000000b8050080410000006003500210000000000113019f000000b80320009c000000b802008041000000c002200210000000000121019f000000000208001902d902cf0000040f000000010220018f000100000001035500000000030100190000006003300270000000b80030019d000000b803300198000002180000c13d000400600000003d000300800000003d000002430000013d0000001f04300039000000e7044001970000003f04400039000000e705400197000000400400043d000400000004001d0000000004450019000000000554004b00000000050000190000000105004039000000c90640009c0000026c0000213d00000001055001900000026c0000c13d000000400040043f0000001f0430018f00000004050000290000000005350436000300000005001d00000005033002720000000503300210000002350000613d00000003070000290000000005370019000000000601034f000000006806043c0000000007870436000000000857004b000002310000c13d000000000504004b000002430000613d000000000131034f00000003033000290000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f000000000013043500000004010000290000000001010433000000000202004b000002720000c13d000000000201004b0000028c0000c13d000000400100043d000000cb02000041000000000021043500000004021000390000002003000039000000000032043500000001020000290000000002020433000000240310003900000000002304350000004403100039000000000402004b00000002070000290000025f0000613d000000000400001900000000053400190000000006740019000000000606043300000000006504350000002004400039000000000524004b000002580000413d0000001f04200039000000e704400197000000000232001900000000000204350000004402400039000000b80320009c000000b8020080410000006002200210000000b80310009c000000b8010080410000004001100210000000000112019f000002db00010430000000df0100004100000000001004350000004101000039000000040010043f000000e001000041000002db00010430000000000201004b000002990000c13d000000d8010000410000000000100439000000070100002900000004001004430000000001000414000000b80210009c000000b801008041000000c001100210000000c8011001c7000080020200003902d902d40000040f00000001022001900000028b0000613d000000000101043b000000000101004b000002950000c13d000000400100043d0000004402100039000000de03000041000000000032043500000024021000390000001d03000039000001d80000013d000000000001042f0000000303000029000000b80230009c000000b8030080410000004002300210000000b80310009c000000b8010080410000006001100210000000000121019f000002db0001043000000004010000290000000001010433000000000201004b000002bc0000613d000000d90210009c000002ba0000213d000000200110008c000002ba0000413d00000003010000290000000001010433000000000201004b0000000002000019000000010200c039000000000221004b000002ba0000c13d000000000101004b000002bc0000c13d000000400100043d0000006402100039000000da0300004100000000003204350000004402100039000000db03000041000000000032043500000024021000390000002a030000390000000000320435000000cb020000410000000000210435000000040210003900000020030000390000000000320435000000b80210009c000000b8010080410000004001100210000000dc011001c7000002db000104300000000001000019000002db00010430000000400100043d00000005020000290000000000210435000000b80210009c000000b80100804100000040011002100000000002000414000000b80320009c000000b802008041000000c002200210000000000112019f000000cd011001c70000800d020000390000000303000039000000dd0400004100000007050000290000000606000029000001a10000013d000000000001042f000002d2002104210000000102000039000000000001042d0000000002000019000000000001042d000002d7002104230000000102000039000000000001042d0000000002000019000000000001042d000002d900000432000002da0001042e000002db00010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff02000000000000000000000000000000000000000000000000000000000000008be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e00000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008da5cb5a00000000000000000000000000000000000000000000000000000000f2fde38a00000000000000000000000000000000000000000000000000000000f2fde38b00000000000000000000000000000000000000000000000000000000fed7036e000000000000000000000000000000000000000000000000000000008da5cb5b00000000000000000000000000000000000000000000000000000000e30c397800000000000000000000000000000000000000000000000000000000715018a60000000000000000000000000000000000000000000000000000000074c17a350000000000000000000000000000000000000000000000000000000079ba50979cc7f708afc65944829bd487b90b72536b1951864fbfc14e125fc972a6507f390200000200000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff43616c6c206661696c656400000000000000000000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064000000000000000000000000020000000000000000000000000000000000002000000000000000000000000041448dfa44379fc602c636f8939b0b1b598c481af871c76fbdd8bdfcdaf30dfa38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270000000000000000000000000000000000000000200000008000000000000000004f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206e6577206f776e65720000000000000000000000000000000000000000000000000000000000000000000000000000000000008400000080000000000000000070a08231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000800000000000000000a9059cbb000000000000000000000000000000000000000000000000000000005361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65641806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6f742073756363656564000000000000000000000000000000000000000000005361666545524332303a204552433230206f7065726174696f6e20646964206e00000000000000000000000000000000000000840000000000000000000000006d043f5c542a67e836c8f8bdf640d0de840c85d79c130dcbda8d42c9c056980c416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000007769746864726177416d6f756e74206d757374206e6f74206265207a65726f0000000000000000000000000000000000000000640000008000000000000000008579befe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000005265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0a1a8f67cf36b68725abe6f14a9c1a648e7a2de409e1e4a89a5a5b6fb5ee820e5" + ] +} diff --git a/deployments/zksyncmainnet/solcInputs/3c9481568d844c1a0b477e0dd5566399.json b/deployments/zksyncmainnet/solcInputs/3c9481568d844c1a0b477e0dd5566399.json new file mode 100644 index 000000000..e5cb9c28a --- /dev/null +++ b/deployments/zksyncmainnet/solcInputs/3c9481568d844c1a0b477e0dd5566399.json @@ -0,0 +1,280 @@ +{ + "language": "Solidity", + "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 {Initializable} from \"../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 address private _pendingOwner;\n\n event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);\n\n function __Ownable2Step_init() internal onlyInitializing {\n __Ownable_init_unchained();\n }\n\n function __Ownable2Step_init_unchained() internal onlyInitializing {\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" + }, + "@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 {Initializable} from \"../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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport {Initializable} from \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\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" + }, + "@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 {Initializable} from \"../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" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (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 *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\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 * CAUTION: See Security Considerations above.\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" + }, + "@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" + }, + "@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" + }, + "@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" + }, + "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport {Initializable} from \"../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 function _contextSuffixLength() internal view virtual returns (uint256) {\n return 0;\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" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n require(value <= type(uint248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n require(value <= type(uint240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n require(value <= type(uint232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.2._\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n require(value <= type(uint216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n require(value <= type(uint208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n require(value <= type(uint200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n require(value <= type(uint192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n require(value <= type(uint184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n require(value <= type(uint176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n require(value <= type(uint168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n require(value <= type(uint160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n require(value <= type(uint152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n require(value <= type(uint144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n require(value <= type(uint136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v2.5._\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n require(value <= type(uint120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n require(value <= type(uint112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n require(value <= type(uint104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.2._\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n require(value <= type(uint88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n require(value <= type(uint80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n require(value <= type(uint72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v2.5._\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n require(value <= type(uint56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n require(value <= type(uint48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n require(value <= type(uint40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v2.5._\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n require(value <= type(uint24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v2.5._\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v2.5._\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n *\n * _Available since v3.0._\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\n downcasted = int248(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 248 bits\");\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\n downcasted = int240(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 240 bits\");\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\n downcasted = int232(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 232 bits\");\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.7._\n */\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\n downcasted = int224(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 224 bits\");\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\n downcasted = int216(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 216 bits\");\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\n downcasted = int208(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 208 bits\");\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\n downcasted = int200(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 200 bits\");\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\n downcasted = int192(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 192 bits\");\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\n downcasted = int184(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 184 bits\");\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\n downcasted = int176(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 176 bits\");\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\n downcasted = int168(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 168 bits\");\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\n downcasted = int160(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 160 bits\");\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\n downcasted = int152(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 152 bits\");\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\n downcasted = int144(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 144 bits\");\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\n downcasted = int136(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 136 bits\");\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\n downcasted = int128(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 128 bits\");\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\n downcasted = int120(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 120 bits\");\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\n downcasted = int112(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 112 bits\");\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\n downcasted = int104(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 104 bits\");\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.7._\n */\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\n downcasted = int96(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 96 bits\");\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\n downcasted = int88(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 88 bits\");\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\n downcasted = int80(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 80 bits\");\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\n downcasted = int72(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 72 bits\");\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\n downcasted = int64(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 64 bits\");\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\n downcasted = int56(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 56 bits\");\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\n downcasted = int48(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 48 bits\");\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\n downcasted = int40(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 40 bits\");\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\n downcasted = int32(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 32 bits\");\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\n downcasted = int24(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 24 bits\");\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\n downcasted = int16(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 16 bits\");\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\n downcasted = int8(value);\n require(downcasted == value, \"SafeCast: value doesn't fit in 8 bits\");\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n *\n * _Available since v3.0._\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\n}\n" + }, + "@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" + }, + "@openzeppelin/contracts/access/Ownable.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/Context.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 Ownable is Context {\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 constructor() {\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" + }, + "@openzeppelin/contracts/access/Ownable2Step.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 \"./Ownable.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 Ownable2Step is Ownable {\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" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC1967.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.8.3._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../Proxy.sol\";\nimport \"../ERC1967/ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\n *\n * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't\n * conflict with the storage layout of the implementation behind the proxy.\n *\n * _Available since v3.4._\n */\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the proxy with `beacon`.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This\n * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity\n * constructor.\n *\n * Requirements:\n *\n * - `beacon` must be a contract with the interface {IBeacon}.\n */\n constructor(address beacon, bytes memory data) payable {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n\n /**\n * @dev Returns the current beacon address.\n */\n function _beacon() internal view virtual returns (address) {\n return _getBeacon();\n }\n\n /**\n * @dev Returns the current implementation address of the associated beacon.\n */\n function _implementation() internal view virtual override returns (address) {\n return IBeacon(_getBeacon()).implementation();\n }\n\n /**\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\n *\n * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon.\n *\n * Requirements:\n *\n * - `beacon` must be a contract.\n * - The implementation returned by `beacon` must be a contract.\n */\n function _setBeacon(address beacon, bytes memory data) internal virtual {\n _upgradeBeaconToAndCall(beacon, data, false);\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IBeacon.sol\";\nimport \"../../access/Ownable.sol\";\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"UpgradeableBeacon: implementation is not a contract\");\n _implementation = newImplementation;\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/IERC1967.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n /**\n * @dev Returns the current implementation of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Returns the current admin of `proxy`.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) {\n // We need to manually run the static call since the getter cannot be flagged as view\n // bytes4(keccak256(\"admin()\")) == 0xf851a440\n (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n require(success);\n return abi.decode(returndata, (address));\n }\n\n /**\n * @dev Changes the admin of `proxy` to `newAdmin`.\n *\n * Requirements:\n *\n * - This contract must be the current admin of `proxy`.\n */\n function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n proxy.changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n proxy.upgradeTo(implementation);\n }\n\n /**\n * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n * {TransparentUpgradeableProxy-upgradeToAndCall}.\n *\n * Requirements:\n *\n * - This contract must be the admin of `proxy`.\n */\n function upgradeAndCall(\n ITransparentUpgradeableProxy proxy,\n address implementation,\n bytes memory data\n ) public payable virtual onlyOwner {\n proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\n * include them in the ABI so this interface must be used to interact with it.\n */\ninterface ITransparentUpgradeableProxy is IERC1967 {\n function admin() external view returns (address);\n\n function implementation() external view returns (address);\n\n function changeAdmin(address) external;\n\n function upgradeTo(address) external;\n\n function upgradeToAndCall(address, bytes memory) external payable;\n}\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n *\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\n * implementation.\n *\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) {\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n *\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\n * implementation provides a function with the same selector.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\n */\n function _fallback() internal virtual override {\n if (msg.sender == _getAdmin()) {\n bytes memory ret;\n bytes4 selector = msg.sig;\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\n ret = _dispatchUpgradeTo();\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\n ret = _dispatchUpgradeToAndCall();\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\n ret = _dispatchChangeAdmin();\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\n ret = _dispatchAdmin();\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\n ret = _dispatchImplementation();\n } else {\n revert(\"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n }\n assembly {\n return(add(ret, 0x20), mload(ret))\n }\n } else {\n super._fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function _dispatchAdmin() private returns (bytes memory) {\n _requireZeroValue();\n\n address admin = _getAdmin();\n return abi.encode(admin);\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function _dispatchImplementation() private returns (bytes memory) {\n _requireZeroValue();\n\n address implementation = _implementation();\n return abi.encode(implementation);\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _dispatchChangeAdmin() private returns (bytes memory) {\n _requireZeroValue();\n\n address newAdmin = abi.decode(msg.data[4:], (address));\n _changeAdmin(newAdmin);\n\n return \"\";\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n */\n function _dispatchUpgradeTo() private returns (bytes memory) {\n _requireZeroValue();\n\n address newImplementation = abi.decode(msg.data[4:], (address));\n _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n\n return \"\";\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n */\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\n _upgradeToAndCall(newImplementation, data, true);\n\n return \"\";\n }\n\n /**\n * @dev Returns the current admin.\n *\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\n * emulate some proxy functions being non-payable while still allowing value to pass through.\n */\n function _requireZeroValue() private {\n require(msg.value == 0);\n }\n}\n" + }, + "@openzeppelin/contracts/security/ReentrancyGuard.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\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 ReentrancyGuard {\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 constructor() {\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" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.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 IERC20Permit {\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" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.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 IERC20 {\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" + }, + "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.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 \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.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 SafeERC20 {\n using Address 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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(IERC20 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 IERC20Permit 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(IERC20 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(IERC20 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))) && Address.isContract(address(token));\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.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 Address {\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" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\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 Context {\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" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" + }, + "@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 private _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" + }, + "@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" + }, + "@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" + }, + "@venusprotocol/solidity-utilities/contracts/constants.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\nuint256 constant EXP_SCALE = 1e18;\n\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\nuint256 constant MANTISSA_ONE = EXP_SCALE;\n\n/// @dev The approximate number of seconds per year\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\n" + }, + "@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/**\n * @title MaxLoopsLimitHelper\n * @author Venus\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\n */\nabstract contract MaxLoopsLimitHelper {\n // Limit for the loops to avoid the DOS\n uint256 public maxLoopsLimit;\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 max loops limit is set\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\n\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param limit Limit for the max loops can execute at a time\n */\n function _setMaxLoopsLimit(uint256 limit) internal {\n require(limit > maxLoopsLimit, \"Comptroller: Invalid maxLoopsLimit\");\n\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\n maxLoopsLimit = limit;\n\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\n }\n\n /**\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\n * @param len Length of the loops iterate\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\n */\n function _ensureMaxLoops(uint256 len) internal view {\n if (len > maxLoopsLimit) {\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\n }\n }\n}\n" + }, + "@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SECONDS_PER_YEAR } from \"./constants.sol\";\n\nabstract contract TimeManagerV8 {\n /// @notice Stores blocksPerYear if isTimeBased is true else secondsPerYear is stored\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable blocksOrSecondsPerYear;\n\n /// @notice Acknowledges if a contract is time based or not\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n bool public immutable isTimeBased;\n\n /// @notice Stores the current block timestamp or block number depending on isTimeBased\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n function() view returns (uint256) private immutable _getCurrentSlot;\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[48] private __gap;\n\n /// @notice Thrown when blocks per year is invalid\n error InvalidBlocksPerYear();\n\n /// @notice Thrown when time based but blocks per year is provided\n error InvalidTimeBasedConfiguration();\n\n /**\n * @param timeBased_ A boolean indicating whether the contract is based on time or block\n * If timeBased is true than blocksPerYear_ param is ignored as blocksOrSecondsPerYear is set to SECONDS_PER_YEAR\n * @param blocksPerYear_ The number of blocks per year\n * @custom:error InvalidBlocksPerYear is thrown if blocksPerYear entered is zero and timeBased is false\n * @custom:error InvalidTimeBasedConfiguration is thrown if blocksPerYear entered is non zero and timeBased is true\n * @custom:oz-upgrades-unsafe-allow constructor\n */\n constructor(bool timeBased_, uint256 blocksPerYear_) {\n if (!timeBased_ && blocksPerYear_ == 0) {\n revert InvalidBlocksPerYear();\n }\n\n if (timeBased_ && blocksPerYear_ != 0) {\n revert InvalidTimeBasedConfiguration();\n }\n\n isTimeBased = timeBased_;\n blocksOrSecondsPerYear = timeBased_ ? SECONDS_PER_YEAR : blocksPerYear_;\n _getCurrentSlot = timeBased_ ? _getBlockTimestamp : _getBlockNumber;\n }\n\n /**\n * @dev Function to simply retrieve block number or block timestamp\n * @return Current block number or block timestamp\n */\n function getBlockNumberOrTimestamp() public view virtual returns (uint256) {\n return _getCurrentSlot();\n }\n\n /**\n * @dev Returns the current timestamp in seconds\n * @return The current timestamp\n */\n function _getBlockTimestamp() private view returns (uint256) {\n return block.timestamp;\n }\n\n /**\n * @dev Returns the current block number\n * @return The current block number\n */\n function _getBlockNumber() private view returns (uint256) {\n return block.number;\n }\n}\n" + }, + "@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" + }, + "contracts/Admin/VBNBAdmin.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IProtocolShareReserve, IWBNB, VBNBAdminStorage, VTokenInterface } from \"./VBNBAdminStorage.sol\";\n\n/**\n * @title VBNBAdmin\n * @author Venus\n * @notice This contract is the \"admin\" of the vBNB market, reducing the reserves of the market, sending them to the `ProtocolShareReserve` contract,\n * and allowing the executions of the rest of the privileged functions in the vBNB contract (after checking if the sender has the required permissions).\n */\ncontract VBNBAdmin is ReentrancyGuardUpgradeable, AccessControlledV8, VBNBAdminStorage {\n using SafeERC20Upgradeable for IWBNB;\n\n /// @notice address of vBNB\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n VTokenInterface public immutable vBNB;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IWBNB public immutable WBNB;\n\n /// @notice Emitted when PSR is updated\n event ProtocolShareReserveUpdated(\n IProtocolShareReserve indexed oldProtocolShareReserve,\n IProtocolShareReserve indexed newProtocolShareReserve\n );\n\n /// @notice Emitted reserves are reduced\n event ReservesReduced(uint256 reduceAmount);\n\n /// @param _vBNB Address of the vBNB contract\n /// @param _WBNB Address of the WBNB token\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(VTokenInterface _vBNB, IWBNB _WBNB) {\n require(address(_WBNB) != address(0), \"WBNB address invalid\");\n require(address(_vBNB) != address(0), \"vBNB address invalid\");\n\n vBNB = _vBNB;\n WBNB = _WBNB;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /// @notice Used to initialize non-immutable variables\n function initialize(\n IProtocolShareReserve _protocolShareReserve,\n address accessControlManager\n ) external initializer {\n require(address(_protocolShareReserve) != address(0), \"PSR address invalid\");\n protocolShareReserve = _protocolShareReserve;\n\n __ReentrancyGuard_init();\n __AccessControlled_init(accessControlManager);\n }\n\n /**\n * @notice PSR setter.\n * @param protocolShareReserve_ Address of the PSR contract\n * @custom:access Only owner (Governance)\n * @custom:event Emits ProtocolShareReserveUpdated event.\n */\n function setProtocolShareReserve(IProtocolShareReserve protocolShareReserve_) external onlyOwner {\n require(address(protocolShareReserve_) != address(0), \"PSR address invalid\");\n emit ProtocolShareReserveUpdated(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Reduce reserves of vBNB, wrap them and send them to the PSR contract\n * @param reduceAmount amount of reserves to reduce\n * @custom:event Emits ReservesReduced event.\n */\n function reduceReserves(uint reduceAmount) external nonReentrant {\n require(vBNB._reduceReserves(reduceAmount) == 0, \"reduceReserves failed\");\n _wrapBNB();\n\n uint256 balance = WBNB.balanceOf(address(this));\n WBNB.safeTransfer(address(protocolShareReserve), balance);\n protocolShareReserve.updateAssetsState(\n vBNB.comptroller(),\n address(WBNB),\n IProtocolShareReserve.IncomeType.SPREAD\n );\n\n emit ReservesReduced(reduceAmount);\n }\n\n /**\n * @notice Sets the interest rate model of the vBNB contract\n * @param newInterestRateModel Address of the new interest rate model\n * @custom:access Controlled by ACM\n */\n function setInterestRateModel(address newInterestRateModel) public returns (uint256) {\n _checkAccessAllowed(\"setInterestRateModel(address)\");\n return vBNB._setInterestRateModel(newInterestRateModel);\n }\n\n /**\n * @notice Wraps BNB into WBNB\n */\n function _wrapBNB() internal {\n uint256 bnbBalance = address(this).balance;\n WBNB.deposit{ value: bnbBalance }();\n }\n\n /**\n * @notice Invoked when BNB is sent to this contract\n * @custom:access Only vBNB is considered a valid sender\n */\n receive() external payable {\n require(msg.sender == address(vBNB), \"only vBNB can send BNB to this contract\");\n }\n\n /**\n * @notice Invoked when called function does not exist in the contract. The function will be executed in the vBNB contract.\n * @custom:access Only owner (Governance)\n */\n fallback(bytes calldata data) external payable onlyOwner returns (bytes memory) {\n (bool ok, bytes memory res) = address(vBNB).call{ value: msg.value }(data);\n require(ok, \"call failed\");\n return res;\n }\n}\n" + }, + "contracts/Admin/VBNBAdminStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\ninterface VTokenInterface {\n function _reduceReserves(uint reduceAmount) external returns (uint);\n\n function _acceptAdmin() external returns (uint);\n\n function comptroller() external returns (address);\n\n function _setInterestRateModel(address newInterestRateModel) external returns (uint);\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ncontract VBNBAdminStorage {\n /// @notice address of protocol share reserve contract\n IProtocolShareReserve public protocolShareReserve;\n\n /// @dev gap to prevent collision in inheritence\n uint256[49] private __gap;\n}\n" + }, + "contracts/DelegateBorrowers/MoveDebtDelegate.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { IVBep20, IComptroller } from \"../InterfacesV8.sol\";\n\ncontract MoveDebtDelegate is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n /// @dev VToken return value signalling about successful execution\n uint256 internal constant NO_ERROR = 0;\n\n /// @notice A wildcard indicating that repayment is allowed for _any_ user in the market\n address public constant ANY_USER = address(1);\n\n /// @notice User to borrow on behalf of\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable newBorrower;\n\n /// @notice Whether to allow borrowing from the corresponding vToken\n mapping(address => bool) public borrowAllowed;\n\n /// @notice Whether to allow repaying to the corresponding vToken on behalf of\n /// a certain user. Use ANY_USER to check if repayment is allowed for any user.\n mapping(address => mapping(address => bool)) public repaymentAllowed;\n\n /// @notice Emitted when vToken is allowed or denied to be borrowed from\n event BorrowAllowedSet(address indexed vTokenToBorrow, bool allowed);\n\n /// @notice Emitted when vToken is allowed or denied to be borrowed from\n event RepaymentAllowedSet(address indexed vTokenToRepay, address indexed originalBorrower, bool allowed);\n\n /// @notice Emitted if debt is swapped successfully\n event DebtMoved(\n address indexed originalBorrower,\n address indexed vTokenRepaid,\n uint256 repaidAmount,\n address newBorrower,\n address indexed vTokenBorrowed,\n uint256 borrowedAmount\n );\n\n /// @notice Emitted when the owner transfers tokens, accidentially sent to this contract,\n /// to their account\n event SweptTokens(address indexed token, uint256 amount);\n\n /// @notice Thrown if VTokens' comptrollers are not equal\n error ComptrollerMismatch();\n\n /// @notice Thrown if repayment fails with an error code\n error RepaymentFailed(uint256 errorCode);\n\n /// @notice Thrown if borrow fails with an error code\n error BorrowFailed(uint256 errorCode);\n\n /// @notice Thrown if borrowing from the corresponding vToken is not allowed\n error BorrowNotAllowed(address vToken);\n\n /// @notice Thrown if repaying the debts of the borrower to the corresponding vToken is not allowed\n error RepaymentNotAllowed(address vToken, address borrower);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param newBorrower_ User to borrow on behalf of\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address newBorrower_) {\n newBorrower = newBorrower_;\n _disableInitializers();\n }\n\n function initialize() external initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n }\n\n /**\n * @notice Repays originalBorrower's borrow in vTokenToRepay.underlying() and borrows\n * vTokenToBorrow.underlying() on behalf of newBorrower.\n *\n * @param originalBorrower The address of the borrower, whose debt to repay\n * @param vTokenToRepay VToken to repay to on behalf of originalBorrower\n * @param repayAmount The amount to repay in terms of vTokenToRepay.underlying()\n * @param vTokenToBorrow VToken to borrow from\n */\n function moveDebt(\n IVBep20 vTokenToRepay,\n address originalBorrower,\n uint256 repayAmount,\n IVBep20 vTokenToBorrow\n ) external nonReentrant {\n if (!borrowAllowed[address(vTokenToBorrow)]) {\n revert BorrowNotAllowed(address(vTokenToBorrow));\n }\n\n mapping(address => bool) storage repaymentAllowedFor = repaymentAllowed[address(vTokenToRepay)];\n if (!repaymentAllowedFor[ANY_USER] && !repaymentAllowedFor[originalBorrower]) {\n revert RepaymentNotAllowed(address(vTokenToRepay), originalBorrower);\n }\n\n uint256 actualRepaymentAmount = _repay(vTokenToRepay, originalBorrower, repayAmount);\n uint256 amountToBorrow = _convert(vTokenToRepay, vTokenToBorrow, actualRepaymentAmount);\n _borrow(vTokenToBorrow, amountToBorrow);\n emit DebtMoved(\n originalBorrower,\n address(vTokenToRepay),\n actualRepaymentAmount,\n newBorrower,\n address(vTokenToBorrow),\n amountToBorrow\n );\n }\n\n /**\n * @notice Allows or denies borrowing from the corresponding vToken\n * @param vTokenToBorrow VToken to borrow from\n * @param allow Whether to allow borrowing from the corresponding vToken\n */\n function setBorrowAllowed(address vTokenToBorrow, bool allow) external onlyOwner {\n ensureNonzeroAddress(vTokenToBorrow);\n if (borrowAllowed[vTokenToBorrow] != allow) {\n borrowAllowed[vTokenToBorrow] = allow;\n emit BorrowAllowedSet(vTokenToBorrow, allow);\n }\n }\n\n /**\n * @notice Allows or denies repaying the debts of originalBorrower to the corresponding vToken\n * @param vTokenToRepay VToken to repay to\n * @param originalBorrower The address of the borrower, whose debt to repay (or ANY_USER to allow\n * repayments for all users in the market, e.g. if the market is going to be deprecated soon)\n * @param allow Whether to allow repaying to the corresponding vToken on behalf of originalBorrower\n */\n function setRepaymentAllowed(address vTokenToRepay, address originalBorrower, bool allow) external onlyOwner {\n ensureNonzeroAddress(vTokenToRepay);\n ensureNonzeroAddress(originalBorrower);\n if (repaymentAllowed[vTokenToRepay][originalBorrower] != allow) {\n repaymentAllowed[vTokenToRepay][originalBorrower] = allow;\n emit RepaymentAllowedSet(vTokenToRepay, originalBorrower, allow);\n }\n }\n\n /**\n * @notice Transfers tokens, accidentially sent to this contract, to the owner\n * @param token ERC-20 token to sweep\n */\n function sweepTokens(IERC20Upgradeable token) external onlyOwner {\n uint256 amount = token.balanceOf(address(this));\n token.safeTransfer(owner(), amount);\n emit SweptTokens(address(token), amount);\n }\n\n /**\n * @dev Transfers the funds from the sender and repays a borrow in vToken on behalf of the borrower\n * @param vTokenToRepay VToken to repay to\n * @param borrower The address of the borrower, whose debt to repay\n * @param repayAmount The amount to repay in terms of underlying\n */\n function _repay(\n IVBep20 vTokenToRepay,\n address borrower,\n uint256 repayAmount\n ) internal returns (uint256 actualRepaymentAmount) {\n IERC20Upgradeable underlying = IERC20Upgradeable(vTokenToRepay.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n underlying.safeTransferFrom(msg.sender, address(this), repayAmount);\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 repayAmountMinusFee = balanceAfter - balanceBefore;\n\n uint256 borrowBalanceBefore = vTokenToRepay.borrowBalanceCurrent(borrower);\n approveOrRevert(underlying, address(vTokenToRepay), repayAmountMinusFee);\n uint256 err = vTokenToRepay.repayBorrowBehalf(borrower, repayAmountMinusFee);\n if (err != NO_ERROR) {\n revert RepaymentFailed(err);\n }\n approveOrRevert(underlying, address(vTokenToRepay), 0);\n uint256 borrowBalanceAfter = vTokenToRepay.borrowBalanceCurrent(borrower);\n return borrowBalanceBefore - borrowBalanceAfter;\n }\n\n /**\n * @dev Borrows in vToken on behalf of the borrower and transfers the funds to the sender\n * @param vTokenToBorrow VToken to borrow from\n * @param borrowAmount The amount to borrow in terms of underlying\n */\n function _borrow(IVBep20 vTokenToBorrow, uint256 borrowAmount) internal {\n IERC20Upgradeable underlying = IERC20Upgradeable(vTokenToBorrow.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n uint256 err = vTokenToBorrow.borrowBehalf(newBorrower, borrowAmount);\n if (err != NO_ERROR) {\n revert BorrowFailed(err);\n }\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 actualBorrowedAmount = balanceAfter - balanceBefore;\n underlying.safeTransfer(msg.sender, actualBorrowedAmount);\n }\n\n /**\n * @dev Converts the value expressed in convertFrom.underlying() to a value\n * in convertTo.underlying(), using the oracle price\n * @param convertFrom VToken to convert from\n * @param convertTo VToken to convert to\n * @param amount The amount in convertFrom.underlying()\n */\n function _convert(IVBep20 convertFrom, IVBep20 convertTo, uint256 amount) internal view returns (uint256) {\n IComptroller comptroller = convertFrom.comptroller();\n if (comptroller != convertTo.comptroller()) {\n revert ComptrollerMismatch();\n }\n ResilientOracleInterface oracle = comptroller.oracle();\n\n // Decimals are accounted for in the oracle contract\n uint256 scaledUsdValue = oracle.getUnderlyingPrice(address(convertFrom)) * amount; // the USD value here has 36 decimals\n return scaledUsdValue / oracle.getUnderlyingPrice(address(convertTo));\n }\n}\n" + }, + "contracts/DelegateBorrowers/SwapDebtDelegate.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { IVBep20, IComptroller } from \"../InterfacesV8.sol\";\n\ncontract SwapDebtDelegate is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n /// @dev VToken return value signalling about successful execution\n uint256 internal constant NO_ERROR = 0;\n\n /// @notice Emitted if debt is swapped successfully\n event DebtSwapped(\n address indexed borrower,\n address indexed vTokenRepaid,\n uint256 repaidAmount,\n address indexed vTokenBorrowed,\n uint256 borrowedAmount\n );\n\n /// @notice Emitted when the owner transfers tokens, accidentially sent to this contract,\n /// to their account\n event SweptTokens(address indexed token, uint256 amount);\n\n /// @notice Thrown if VTokens' comptrollers are not equal\n error ComptrollerMismatch();\n\n /// @notice Thrown if repayment fails with an error code\n error RepaymentFailed(uint256 errorCode);\n\n /// @notice Thrown if borrow fails with an error code\n error BorrowFailed(uint256 errorCode);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n function initialize() external initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n }\n\n /**\n * @notice Repays a borrow in repayTo.underlying() and borrows borrowFrom.underlying()\n * @param borrower The address of the borrower, whose debt to swap\n * @param repayTo VToken to repay the debt to\n * @param borrowFrom VToken to borrow from\n * @param repayAmount The amount to repay in terms of repayTo.underlying()\n */\n function swapDebt(\n address borrower,\n IVBep20 repayTo,\n IVBep20 borrowFrom,\n uint256 repayAmount\n ) external onlyOwner nonReentrant {\n uint256 actualRepaymentAmount = _repay(repayTo, borrower, repayAmount);\n uint256 amountToBorrow = _convert(repayTo, borrowFrom, actualRepaymentAmount);\n _borrow(borrowFrom, borrower, amountToBorrow);\n emit DebtSwapped(borrower, address(repayTo), actualRepaymentAmount, address(borrowFrom), amountToBorrow);\n }\n\n /**\n * @notice Transfers tokens, accidentially sent to this contract, to the owner\n * @param token ERC-20 token to sweep\n */\n function sweepTokens(IERC20Upgradeable token) external onlyOwner {\n uint256 amount = token.balanceOf(address(this));\n token.safeTransfer(owner(), amount);\n emit SweptTokens(address(token), amount);\n }\n\n /**\n * @dev Transfers the funds from the sender and repays a borrow in vToken on behalf of the borrower\n * @param vToken VToken to repay the debt to\n * @param borrower The address of the borrower, whose debt to repay\n * @param repayAmount The amount to repay in terms of underlying\n */\n function _repay(\n IVBep20 vToken,\n address borrower,\n uint256 repayAmount\n ) internal returns (uint256 actualRepaymentAmount) {\n IERC20Upgradeable underlying = IERC20Upgradeable(vToken.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n underlying.safeTransferFrom(msg.sender, address(this), repayAmount);\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 repayAmountMinusFee = balanceAfter - balanceBefore;\n\n underlying.safeApprove(address(vToken), 0);\n underlying.safeApprove(address(vToken), repayAmountMinusFee);\n uint256 borrowBalanceBefore = vToken.borrowBalanceCurrent(borrower);\n uint256 err = vToken.repayBorrowBehalf(borrower, repayAmountMinusFee);\n if (err != NO_ERROR) {\n revert RepaymentFailed(err);\n }\n uint256 borrowBalanceAfter = vToken.borrowBalanceCurrent(borrower);\n return borrowBalanceBefore - borrowBalanceAfter;\n }\n\n /**\n * @dev Borrows in vToken on behalf of the borrower and transfers the funds to the sender\n * @param vToken VToken to borrow from\n * @param borrower The address of the borrower, who will own the borrow\n * @param borrowAmount The amount to borrow in terms of underlying\n */\n function _borrow(IVBep20 vToken, address borrower, uint256 borrowAmount) internal {\n IERC20Upgradeable underlying = IERC20Upgradeable(vToken.underlying());\n uint256 balanceBefore = underlying.balanceOf(address(this));\n uint256 err = vToken.borrowBehalf(borrower, borrowAmount);\n if (err != NO_ERROR) {\n revert BorrowFailed(err);\n }\n uint256 balanceAfter = underlying.balanceOf(address(this));\n uint256 actualBorrowedAmount = balanceAfter - balanceBefore;\n underlying.safeTransfer(msg.sender, actualBorrowedAmount);\n }\n\n /**\n * @dev Converts the value expressed in convertFrom.underlying() to a value\n * in convertTo.underlying(), using the oracle price\n * @param convertFrom VToken to convert from\n * @param convertTo VToken to convert to\n * @param amount The amount in convertFrom.underlying()\n */\n function _convert(IVBep20 convertFrom, IVBep20 convertTo, uint256 amount) internal view returns (uint256) {\n IComptroller comptroller = convertFrom.comptroller();\n if (comptroller != convertTo.comptroller()) {\n revert ComptrollerMismatch();\n }\n ResilientOracleInterface oracle = comptroller.oracle();\n\n // Decimals are accounted for in the oracle contract\n uint256 scaledUsdValue = oracle.getUnderlyingPrice(address(convertFrom)) * amount; // the USD value here has 36 decimals\n return scaledUsdValue / oracle.getUnderlyingPrice(address(convertTo));\n }\n}\n" + }, + "contracts/Governance/TokenRedeemer.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\nimport { Ownable2Step } from \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { IVAIController, IVToken, IVBep20, IVBNB } from \"../InterfacesV8.sol\";\nimport { Currency, CurrencyLibrary } from \"../lib/Currency.sol\";\n\ncontract TokenRedeemer is ReentrancyGuard, Ownable2Step {\n using CurrencyLibrary for Currency;\n\n struct Repayment {\n address borrower;\n uint256 amount;\n }\n\n IVBNB public immutable VBNB;\n\n error AccrueInterestFailed(uint256 errCode);\n error RedeemFailed(uint256 errCode);\n error RepaymentFailed(uint256 errCode);\n error NativeTokenTransferFailed();\n\n constructor(address owner_, IVBNB vBNB) {\n ensureNonzeroAddress(owner_);\n VBNB = vBNB;\n _transferOwnership(owner_);\n }\n\n receive() external payable {}\n\n function redeemAndTransfer(IVToken vToken, address destination) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n uint256 err = vToken.redeem(vToken.balanceOf(address(this)));\n if (err != 0) {\n revert RedeemFailed(err);\n }\n underlying.transferAll(destination);\n }\n\n function redeemUnderlyingAndTransfer(\n IVToken vToken,\n address destination,\n uint256 amount,\n address receiver\n ) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n underlying.transferAll(receiver); // Just in case there were some underlying tokens on the contract\n uint256 err = vToken.redeemUnderlying(amount);\n if (err != 0) {\n revert RedeemFailed(err);\n }\n underlying.transferAll(destination);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function redeemUnderlyingAndRepayBorrowBehalf(\n IVToken vToken,\n address borrower,\n uint256 amount,\n address receiver\n ) external nonReentrant onlyOwner {\n Currency underlying = _underlying(vToken);\n\n uint256 err = vToken.redeemUnderlying(amount);\n if (err != 0) {\n revert RedeemFailed(err);\n }\n\n underlying.approve(address(vToken), amount);\n\n _repay(vToken, borrower, amount);\n\n underlying.approve(address(vToken), 0);\n\n underlying.transferAll(receiver);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function redeemAndBatchRepay(\n IVToken vToken,\n Repayment[] calldata requestedRepayments,\n address receiver\n ) external nonReentrant onlyOwner {\n _accrueInterest(vToken);\n\n (uint256 totalBorrowedAmount, Repayment[] memory repayments) = _getAmountsToRepay(vToken, requestedRepayments);\n _redeemUpTo(vToken, totalBorrowedAmount);\n\n Currency underlying = _underlying(vToken);\n uint256 balance = underlying.balanceOfSelf();\n underlying.approve(address(vToken), totalBorrowedAmount);\n uint256 repaymentsCount = repayments.length;\n // The code below assumes no fees on transfer\n if (balance >= totalBorrowedAmount) {\n // If we're doing a full repayment, we can optimize it by skipping the balance checks\n for (uint256 i = 0; i < repaymentsCount; ++i) {\n Repayment memory repayment = repayments[i];\n _repay(vToken, repayment.borrower, repayment.amount);\n }\n } else {\n // Otherwise, we have to check and update the balance on every iteration\n for (uint256 i = 0; i < repaymentsCount && balance != 0; ++i) {\n Repayment memory repayment = repayments[i];\n _repay(vToken, repayment.borrower, _min(repayment.amount, balance));\n balance = underlying.balanceOfSelf();\n }\n }\n underlying.approve(address(vToken), 0);\n\n underlying.transferAll(receiver);\n Currency.wrap(address(vToken)).transferAll(receiver);\n }\n\n function batchRepayVAI(\n IVAIController vaiController,\n Repayment[] calldata requestedRepayments,\n address receiver\n ) external nonReentrant onlyOwner {\n vaiController.accrueVAIInterest();\n Currency vai = Currency.wrap(vaiController.getVAIAddress());\n uint256 balance = vai.balanceOfSelf();\n vai.approve(address(vaiController), type(uint256).max);\n uint256 repaymentsCount = requestedRepayments.length;\n for (uint256 i = 0; i < repaymentsCount && balance != 0; ++i) {\n Repayment calldata requestedRepayment = requestedRepayments[i];\n uint256 repaymentCap = requestedRepayment.amount;\n uint256 debt = vaiController.getVAIRepayAmount(requestedRepayment.borrower);\n uint256 amount = _min(repaymentCap, debt);\n _repayVAI(vaiController, requestedRepayment.borrower, _min(amount, balance));\n balance = vai.balanceOfSelf();\n }\n vai.approve(address(vaiController), 0);\n vai.transferAll(receiver);\n }\n\n function sweepTokens(address token, address destination) external onlyOwner {\n Currency.wrap(token).transferAll(destination);\n }\n\n function _accrueInterest(IVToken vToken) internal {\n uint256 err = vToken.accrueInterest();\n if (err != 0) {\n revert AccrueInterestFailed(err);\n }\n }\n\n function _redeemUpTo(IVToken vToken, uint256 amount) internal {\n uint256 unredeemedUnderlying = vToken.balanceOfUnderlying(address(this));\n if (unredeemedUnderlying > 0) {\n uint256 err = vToken.redeemUnderlying(_min(amount, unredeemedUnderlying));\n if (err != 0) {\n revert RedeemFailed(err);\n }\n }\n }\n\n function _repay(IVToken vToken, address borrower, uint256 amount) internal {\n if (amount == 0) {\n return;\n }\n if (_isVBNB(vToken)) {\n IVBNB(address(vToken)).repayBorrowBehalf{ value: amount }(borrower);\n } else {\n uint256 err = IVBep20(address(vToken)).repayBorrowBehalf(borrower, amount);\n if (err != 0) {\n revert RepaymentFailed(err);\n }\n }\n }\n\n function _repayVAI(IVAIController vaiController, address borrower, uint256 amount) internal {\n if (amount == 0) {\n return;\n }\n (uint256 err, ) = vaiController.repayVAIBehalf(borrower, amount);\n if (err != 0) {\n revert RepaymentFailed(err);\n }\n }\n\n function _getAmountsToRepay(\n IVToken vToken,\n Repayment[] calldata requestedRepayments\n ) internal view returns (uint256, Repayment[] memory) {\n uint256 repaymentsCount = requestedRepayments.length;\n Repayment[] memory actualRepayments = new Repayment[](repaymentsCount);\n uint256 totalAmountToRepay = 0;\n for (uint256 i = 0; i < repaymentsCount; ++i) {\n Repayment calldata requestedRepayment = requestedRepayments[i];\n uint256 repaymentCap = requestedRepayment.amount;\n uint256 debt = vToken.borrowBalanceStored(requestedRepayment.borrower);\n uint256 amountToRepay = _min(repaymentCap, debt);\n totalAmountToRepay += amountToRepay;\n actualRepayments[i] = Repayment({ borrower: requestedRepayment.borrower, amount: amountToRepay });\n }\n return (totalAmountToRepay, actualRepayments);\n }\n\n function _underlying(IVToken vToken) internal view returns (Currency) {\n if (_isVBNB(vToken)) {\n return CurrencyLibrary.NATIVE;\n }\n return Currency.wrap(IVBep20(address(vToken)).underlying());\n }\n\n function _isVBNB(IVToken vToken) internal view returns (bool) {\n return address(vToken) == address(VBNB);\n }\n\n function _min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n}\n" + }, + "contracts/Governance/VTreasuryV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20, IERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport { Ownable2Step } from \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport { ReentrancyGuard } from \"@openzeppelin/contracts/security/ReentrancyGuard.sol\";\n\n/**\n * @title VTreasuryV8\n * @author Venus\n * @notice Protocol treasury that holds tokens owned by Venus\n */\ncontract VTreasuryV8 is Ownable2Step, ReentrancyGuard {\n using SafeERC20 for IERC20;\n\n // WithdrawTreasuryToken Event\n event WithdrawTreasuryToken(address indexed tokenAddress, uint256 withdrawAmount, address indexed withdrawAddress);\n\n // WithdrawTreasuryNative Event\n event WithdrawTreasuryNative(uint256 withdrawAmount, address indexed withdrawAddress);\n\n /// @notice Thrown if the supplied address is a zero address where it is not allowed\n error ZeroAddressNotAllowed();\n\n /**\n * @notice To receive Native when msg.data is not empty\n */\n fallback() external payable {}\n\n /**\n * @notice To receive Native when msg.data is empty\n */\n receive() external payable {}\n\n /**\n * @notice Withdraw Treasury Tokens, Only owner call it\n * @param tokenAddress The address of treasury token\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n * @custom:error ZeroAddressNotAllowed thrown when token or withdrawAddress is zero.\n */\n function withdrawTreasuryToken(\n address tokenAddress,\n uint256 withdrawAmount,\n address withdrawAddress\n ) external onlyOwner nonReentrant {\n ensureNonzeroAddress(tokenAddress);\n ensureNonzeroAddress(withdrawAddress);\n require(withdrawAmount > 0, \"withdrawAmount must not be zero\");\n\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Token Balance\n uint256 treasuryBalance = IERC20(tokenAddress).balanceOf(address(this));\n\n // Check Withdraw Amount\n if (withdrawAmount > treasuryBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = treasuryBalance;\n }\n\n // Transfer Token to withdrawAddress\n IERC20(tokenAddress).safeTransfer(withdrawAddress, actualWithdrawAmount);\n\n emit WithdrawTreasuryToken(tokenAddress, actualWithdrawAmount, withdrawAddress);\n }\n\n /**\n * @notice Withdraw Treasury Native, Only owner call it\n * @param withdrawAmount The withdraw amount to owner\n * @param withdrawAddress The withdraw address\n * @custom:error ZeroAddressNotAllowed thrown when withdrawAddress is zero.\n */\n function withdrawTreasuryNative(\n uint256 withdrawAmount,\n address payable withdrawAddress\n ) external payable onlyOwner nonReentrant {\n ensureNonzeroAddress(withdrawAddress);\n require(withdrawAmount > 0, \"withdrawAmount must not be zero\");\n uint256 actualWithdrawAmount = withdrawAmount;\n // Get Treasury Native Balance\n uint256 nativeBalance = address(this).balance;\n\n // Check Withdraw Amount\n if (withdrawAmount > nativeBalance) {\n // Update actualWithdrawAmount\n actualWithdrawAmount = nativeBalance;\n }\n // Transfer the native token to withdrawAddress\n (bool sent, ) = withdrawAddress.call{ value: actualWithdrawAmount }(\"\");\n require(sent, \"Call failed\");\n emit WithdrawTreasuryNative(actualWithdrawAmount, withdrawAddress);\n }\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\n function ensureNonzeroAddress(address address_) internal pure {\n if (address_ == address(0)) {\n revert ZeroAddressNotAllowed();\n }\n }\n}\n" + }, + "contracts/InterfacesV8.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\ninterface IVToken is IERC20Upgradeable {\n function accrueInterest() external returns (uint256);\n\n function redeem(uint256 redeemTokens) external returns (uint256);\n\n function redeemUnderlying(uint256 redeemAmount) external returns (uint256);\n\n function borrowBalanceCurrent(address borrower) external returns (uint256);\n\n function balanceOfUnderlying(address owner) external returns (uint256);\n\n function comptroller() external view returns (IComptroller);\n\n function borrowBalanceStored(address account) external view returns (uint256);\n}\n\ninterface IVBep20 is IVToken {\n function borrowBehalf(address borrower, uint256 borrowAmount) external returns (uint256);\n\n function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256);\n\n function liquidateBorrow(\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external returns (uint256);\n\n function underlying() external view returns (address);\n}\n\ninterface IVBNB is IVToken {\n function repayBorrowBehalf(address borrower) external payable;\n\n function liquidateBorrow(address borrower, IVToken vTokenCollateral) external payable;\n}\n\ninterface IVAIController {\n function accrueVAIInterest() external;\n\n function liquidateVAI(\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external returns (uint256, uint256);\n\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\n\n function getVAIAddress() external view returns (address);\n\n function getVAIRepayAmount(address borrower) external view returns (uint256);\n}\n\ninterface IComptroller {\n enum Action {\n MINT,\n REDEEM,\n BORROW,\n REPAY,\n SEIZE,\n LIQUIDATE,\n TRANSFER,\n ENTER_MARKET,\n EXIT_MARKET\n }\n\n function _setActionsPaused(address[] calldata markets_, Action[] calldata actions_, bool paused_) external;\n\n function liquidationIncentiveMantissa() external view returns (uint256);\n\n function vaiController() external view returns (IVAIController);\n\n function liquidatorContract() external view returns (address);\n\n function oracle() external view returns (ResilientOracleInterface);\n\n function actionPaused(address market, Action action) external view returns (bool);\n\n function markets(address) external view returns (bool, uint256, bool);\n\n function isForcedLiquidationEnabled(address) external view returns (bool);\n}\n\ninterface ILiquidator {\n function restrictLiquidation(address borrower) external;\n\n function unrestrictLiquidation(address borrower) external;\n\n function addToAllowlist(address borrower, address liquidator) external;\n\n function removeFromAllowlist(address borrower, address liquidator) external;\n\n function liquidateBorrow(\n address vToken,\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external payable;\n\n function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external;\n\n function treasuryPercentMantissa() external view returns (uint256);\n}\n\ninterface IProtocolShareReserve {\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType kind) external;\n}\n\ninterface IWBNB is IERC20Upgradeable {\n function deposit() external payable;\n}\n" + }, + "contracts/lib/approveOrRevert.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\n\n/// @notice Thrown if a contract is unable to approve a transfer\nerror ApproveFailed();\n\n/// @notice Approves a transfer, ensuring that it is successful. This function supports non-compliant\n/// tokens like the ones that don't return a boolean value on success. Thus, such approve call supports\n/// three different kinds of tokens:\n/// * Compliant tokens that revert on failure\n/// * Compliant tokens that return false on failure\n/// * Non-compliant tokens that don't return a value\n/// @param token The contract address of the token which will be transferred\n/// @param spender The spender contract address\n/// @param amount The value of the transfer\nfunction approveOrRevert(IERC20Upgradeable token, address spender, uint256 amount) {\n bytes memory callData = abi.encodeCall(token.approve, (spender, amount));\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory result) = address(token).call(callData);\n\n if (!success || (result.length != 0 && !abi.decode(result, (bool)))) {\n revert ApproveFailed();\n }\n}\n" + }, + "contracts/lib/Currency.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n// This library is heavily inspired by Uniswap v4 Currency lib\n// (https://github.com/Uniswap/v4-core/blob/b230769238879e1d4f58ffa57a4696b0c390d188/src/types/Currency.sol)\n// Contrary to the implementation above, this library does not\n// use assembly to save gas. It rather relies on OpenZeppelin's\n// SafeERC20 to simplify the review and audits. This might change\n// in future if it's more heavily used by Venus contracts.\n\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport { SafeERC20 } from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\ntype Currency is address;\n\nlibrary CurrencyLibrary {\n using CurrencyLibrary for Currency;\n\n /// @notice Thrown when a native transfer fails\n error NativeTransferFailed();\n\n Currency public constant NATIVE = Currency.wrap(0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB);\n\n /**\n * @dev If currency is a token, invokes SafeERC20.forceApprove to allow spender\n * to spend the amount of tokens on behalf of the current contract. Otherwise,\n * does nothing.\n * @param currency Currency\n * @param spender The account approved to spend the tokens\n * @param amount The approved amount\n */\n function approve(Currency currency, address spender, uint256 amount) internal {\n if (!currency.isNative()) {\n // I'd rather use approveOrRevert instead of forceApprove\n // once we migrate to OZ v5: force-approve does approve(0)\n // before approving the amount, and it's not always\n // desirable. The users will need to pay gas unnecessarily,\n // and using just approve() is safe as long as we revert on\n // errors (approveOrRevert handles that) and reset the approvals\n // after transfers (which is a best practice recommended by\n // auditors anyway).\n SafeERC20.forceApprove(IERC20(Currency.unwrap(currency)), spender, amount);\n }\n }\n\n /**\n * @dev Transfers an amount of currency to the receiver. If currency is a token,\n * uses SafeERC20.safeTransfer, otherwise transfers the native currency using\n * the recommended approach (`receiver.call{value: amount}(\"\")`).\n * @param currency Currency\n * @param receiver The account that would receive the tokens\n * @param amount The amount to transfer\n */\n function transfer(Currency currency, address receiver, uint256 amount) internal {\n if (currency.isNative()) {\n (bool success, ) = receiver.call{ value: amount }(\"\");\n if (!success) {\n revert NativeTransferFailed();\n }\n } else {\n SafeERC20.safeTransfer(IERC20(Currency.unwrap(currency)), receiver, amount);\n }\n }\n\n function transferAll(Currency currency, address receiver) internal {\n uint256 balance = currency.balanceOfSelf();\n if (balance > 0) {\n currency.transfer(receiver, balance);\n }\n }\n\n function balanceOfSelf(Currency currency) internal view returns (uint256) {\n if (currency.isNative()) {\n return address(this).balance;\n }\n return IERC20(Currency.unwrap(currency)).balanceOf(address(this));\n }\n\n function isNative(Currency currency) internal pure returns (bool) {\n return Currency.unwrap(currency) == Currency.unwrap(NATIVE);\n }\n}\n" + }, + "contracts/Liquidator/BUSDLiquidator.sol": { + "content": "// SPDX-License-Identifier: MIT\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 { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { MANTISSA_ONE } from \"@venusprotocol/solidity-utilities/contracts/constants.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\n\nimport { approveOrRevert } from \"../lib/approveOrRevert.sol\";\nimport { ILiquidator, IComptroller, IVToken, IVBep20, IVBNB, IVAIController } from \"../InterfacesV8.sol\";\n\n/**\n * @title BUSDLiquidator\n * @author Venus\n * @notice A custom contract for force-liquidating BUSD debts\n */\ncontract BUSDLiquidator is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n using SafeERC20Upgradeable for IVToken;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVBep20 public immutable vBUSD;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IComptroller public immutable comptroller;\n\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable treasury;\n\n /// @notice The liquidator's share, scaled by 1e18 (e.g. 1.02 * 1e18 for 102% of the debt covered)\n uint256 public liquidatorShareMantissa;\n\n /// @notice Thrown if trying to set liquidator's share lower than 100% of the debt covered\n error LiquidatorShareTooLow(uint256 liquidatorShareMantissa_);\n\n /// @notice Thrown if trying to set liquidator's share larger than this contract can receive from a liquidation\n error LiquidatorShareTooHigh(uint256 maxLiquidatorShareMantissa, uint256 liquidatorShareMantissa_);\n\n /// @notice Emitted when the liquidator's share is set\n event NewLiquidatorShare(uint256 oldLiquidatorShareMantissa, uint256 newLiquidatorShareMantissa);\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param comptroller_ The address of the Comptroller contract\n /// @param vBUSD_ The address of the VBNB\n /// @param treasury_ The address of Venus treasury\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address vBUSD_, address treasury_) {\n ensureNonzeroAddress(vBUSD_);\n ensureNonzeroAddress(comptroller_);\n ensureNonzeroAddress(treasury_);\n vBUSD = IVBep20(vBUSD_);\n comptroller = IComptroller(comptroller_);\n treasury = treasury_;\n _disableInitializers();\n }\n\n /// @notice Initializer for the implementation contract.\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n /// @custom:error LiquidatorShareTooHigh is thrown if trying to set liquidator percent larger than the liquidation profit\n function initialize(uint256 liquidatorShareMantissa_) external virtual initializer {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n _validateLiquidatorShareMantissa(liquidatorShareMantissa_);\n liquidatorShareMantissa = liquidatorShareMantissa_;\n }\n\n /// @notice Liquidate the entire BUSD debt of a borrower, seizing vTokenCollateral\n /// @param borrower The borrower whose debt should be liquidated\n /// @param vTokenCollateral The collateral to seize from the borrower\n function liquidateEntireBorrow(address borrower, IVToken vTokenCollateral) external nonReentrant {\n uint256 repayAmount = vBUSD.borrowBalanceCurrent(borrower);\n _unpauseAndLiquidate(borrower, repayAmount, vTokenCollateral);\n }\n\n /// @notice Liquidate a BUSD borrow, repaying the repayAmount of BUSD\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function liquidateBorrow(address borrower, uint256 repayAmount, IVToken vTokenCollateral) external nonReentrant {\n _unpauseAndLiquidate(borrower, repayAmount, vTokenCollateral);\n }\n\n /// @notice Allows Governance to set the liquidator's share\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n /// @custom:access Only Governance\n function setLiquidatorShare(uint256 liquidatorShareMantissa_) external onlyOwner {\n _validateLiquidatorShareMantissa(liquidatorShareMantissa_);\n uint256 oldLiquidatorShareMantissa = liquidatorShareMantissa;\n liquidatorShareMantissa = liquidatorShareMantissa_;\n emit NewLiquidatorShare(oldLiquidatorShareMantissa, liquidatorShareMantissa_);\n }\n\n /// @notice Allows to recover token accidentally sent to this contract by sending the entire balance to Governance\n /// @param token The address of the token to recover\n /// @custom:access Only Governance\n function sweepToken(IERC20Upgradeable token) external onlyOwner {\n token.safeTransfer(msg.sender, token.balanceOf(address(this)));\n }\n\n /// @dev Unpauses the liquidation on the BUSD market, liquidates the borrower's debt,\n /// and pauses the liquidations back\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function _unpauseAndLiquidate(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n address[] memory vTokens = new address[](1);\n vTokens[0] = address(vBUSD);\n IComptroller.Action[] memory actions = new IComptroller.Action[](1);\n actions[0] = IComptroller.Action.LIQUIDATE;\n\n comptroller._setActionsPaused(vTokens, actions, false);\n _liquidateBorrow(borrower, repayAmount, vTokenCollateral);\n comptroller._setActionsPaused(vTokens, actions, true);\n }\n\n /// @dev Performs the actual liquidation, transferring BUSD from the sender to this contract,\n /// repaying the debt, and transferring the seized collateral to the sender and the treasury\n /// @param borrower The borrower whose debt should be liquidated\n /// @param repayAmount The amount to repay\n /// @param vTokenCollateral The collateral to seize from the borrower\n function _liquidateBorrow(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n ILiquidator liquidatorContract = ILiquidator(comptroller.liquidatorContract());\n IERC20Upgradeable busd = IERC20Upgradeable(vBUSD.underlying());\n\n uint256 actualRepayAmount = _transferIn(busd, msg.sender, repayAmount);\n approveOrRevert(busd, address(liquidatorContract), actualRepayAmount);\n uint256 balanceBefore = vTokenCollateral.balanceOf(address(this));\n liquidatorContract.liquidateBorrow(address(vBUSD), borrower, actualRepayAmount, vTokenCollateral);\n uint256 receivedAmount = vTokenCollateral.balanceOf(address(this)) - balanceBefore;\n approveOrRevert(busd, address(liquidatorContract), 0);\n\n (uint256 liquidatorAmount, uint256 treasuryAmount) = _computeShares(receivedAmount);\n vTokenCollateral.safeTransfer(msg.sender, liquidatorAmount);\n vTokenCollateral.safeTransfer(treasury, treasuryAmount);\n }\n\n /// @dev Transfers tokens to this contract and returns the actual transfer amount\n /// @param token The token to transfer\n /// @param from The account to transfer from\n /// @param amount The amount to transfer\n /// @return The actual amount transferred\n function _transferIn(IERC20Upgradeable token, address from, uint256 amount) internal returns (uint256) {\n uint256 prevBalance = token.balanceOf(address(this));\n token.safeTransferFrom(from, address(this), amount);\n return token.balanceOf(address(this)) - prevBalance;\n }\n\n /// @dev Computes the liquidator's and treasury's shares of the received amount\n /// @param receivedAmount The amount received from the liquidation\n /// @return liquidatorAmount The liquidator's share\n /// @return treasuryAmount The treasury's share\n function _computeShares(\n uint256 receivedAmount\n ) internal view returns (uint256 liquidatorAmount, uint256 treasuryAmount) {\n uint256 denominator = _getDenominator();\n liquidatorAmount = (receivedAmount * liquidatorShareMantissa) / denominator;\n treasuryAmount = receivedAmount - liquidatorAmount;\n }\n\n /// @dev Returns (liquidation incentive - treasury percent), the value used as the denominator\n /// when calculating the liquidator's share\n /// @return The denominator for the seized amount used when calculating the liquidator's share\n function _getDenominator() internal view returns (uint256) {\n uint256 totalPercentageToDistribute = comptroller.liquidationIncentiveMantissa();\n uint256 regularTreasuryPercent = ILiquidator(comptroller.liquidatorContract()).treasuryPercentMantissa();\n uint256 denominator = totalPercentageToDistribute - regularTreasuryPercent;\n return denominator;\n }\n\n /// @dev Checks if the liquidator's share is more than 100% of the debt covered and less\n /// than (liquidation incentive - treasury percent)\n /// @param liquidatorShareMantissa_ Liquidator's share, scaled by 1e18 (e.g. 1.01 * 1e18 for 101%)\n function _validateLiquidatorShareMantissa(uint256 liquidatorShareMantissa_) internal view {\n uint256 maxLiquidatorShareMantissa = _getDenominator();\n if (liquidatorShareMantissa_ < MANTISSA_ONE) {\n revert LiquidatorShareTooLow(liquidatorShareMantissa_);\n }\n\n if (liquidatorShareMantissa_ > maxLiquidatorShareMantissa) {\n revert LiquidatorShareTooHigh(maxLiquidatorShareMantissa, liquidatorShareMantissa_);\n }\n }\n}\n" + }, + "contracts/Liquidator/Liquidator.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport { Ownable2StepUpgradeable } from \"@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol\";\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport { SafeERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { ensureNonzeroAddress } from \"@venusprotocol/solidity-utilities/contracts/validators.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport \"./LiquidatorStorage.sol\";\nimport { IComptroller, IVToken, IVBep20, IVBNB, IVAIController, IProtocolShareReserve, IWBNB } from \"../InterfacesV8.sol\";\n\ncontract Liquidator is Ownable2StepUpgradeable, ReentrancyGuardUpgradeable, LiquidatorStorage, AccessControlledV8 {\n /// @notice Address of vBNB contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVBNB public immutable vBnb;\n\n /// @notice Address of Venus Unitroller contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IComptroller public immutable comptroller;\n\n /// @notice Address of VAIUnitroller contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVAIController public immutable vaiController;\n\n /// @notice Address of wBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable wBNB;\n\n /// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\n uint256 internal constant MANTISSA_ONE = 1e18;\n\n /* Events */\n\n /// @notice Emitted when the percent of the seized amount that goes to treasury changes.\n event NewLiquidationTreasuryPercent(uint256 oldPercent, uint256 newPercent);\n\n /// @notice Emitted when a borrow is liquidated\n event LiquidateBorrowedTokens(\n address indexed liquidator,\n address indexed borrower,\n uint256 repayAmount,\n address vTokenBorrowed,\n address indexed vTokenCollateral,\n uint256 seizeTokensForTreasury,\n uint256 seizeTokensForLiquidator\n );\n\n /// @notice Emitted when the liquidation is restricted for a borrower\n event LiquidationRestricted(address indexed borrower);\n\n /// @notice Emitted when the liquidation restrictions are removed for a borrower\n event LiquidationRestrictionsDisabled(address indexed borrower);\n\n /// @notice Emitted when a liquidator is added to the allowedLiquidatorsByAccount mapping\n event AllowlistEntryAdded(address indexed borrower, address indexed liquidator);\n\n /// @notice Emitted when a liquidator is removed from the allowedLiquidatorsByAccount mapping\n event AllowlistEntryRemoved(address indexed borrower, address indexed liquidator);\n\n /// @notice Emitted when the amount of minLiquidatableVAI is updated\n event NewMinLiquidatableVAI(uint256 oldMinLiquidatableVAI, uint256 newMinLiquidatableVAI);\n\n /// @notice Emitted when the length of chunk gets updated\n event NewPendingRedeemChunkLength(uint256 oldPendingRedeemChunkLength, uint256 newPendingRedeemChunkLength);\n\n /// @notice Emitted when force liquidation is paused\n event ForceVAILiquidationPaused(address indexed sender);\n\n /// @notice Emitted when force liquidation is resumed\n event ForceVAILiquidationResumed(address indexed sender);\n\n /// @notice Emitted when new address of protocol share reserve is set\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserves);\n\n /// @notice Emitted when reserves are reduced from liquidator contract to protocol share reserves\n event ProtocolLiquidationIncentiveTransferred(address indexed sender, address indexed token, uint256 reducedAmount);\n\n /* Errors */\n\n /// @notice Thrown if the liquidation is restricted and the liquidator is not in the allowedLiquidatorsByAccount mapping\n error LiquidationNotAllowed(address borrower, address liquidator);\n\n /// @notice Thrown if VToken transfer fails after the liquidation\n error VTokenTransferFailed(address from, address to, uint256 amount);\n\n /// @notice Thrown if the liquidation is not successful (the error code is from TokenErrorReporter)\n error LiquidationFailed(uint256 errorCode);\n\n /// @notice Thrown if trying to restrict liquidations for an already restricted borrower\n error AlreadyRestricted(address borrower);\n\n /// @notice Thrown if trying to unrestrict liquidations for a borrower that is not restricted\n error NoRestrictionsExist(address borrower);\n\n /// @notice Thrown if the liquidator is already in the allowedLiquidatorsByAccount mapping\n error AlreadyAllowed(address borrower, address liquidator);\n\n /// @notice Thrown if trying to remove a liquidator that is not in the allowedLiquidatorsByAccount mapping\n error AllowlistEntryNotFound(address borrower, address liquidator);\n\n /// @notice Thrown if BNB amount sent with the transaction doesn't correspond to the\n /// intended BNB repayment\n error WrongTransactionAmount(uint256 expected, uint256 actual);\n\n /// @notice Thrown if trying to set treasury percent larger than the liquidation profit\n error TreasuryPercentTooHigh(uint256 maxTreasuryPercentMantissa, uint256 treasuryPercentMantissa_);\n\n /// @notice Thrown if trying to liquidate any token when VAI debt is too high\n error VAIDebtTooHigh(uint256 vaiDebt, uint256 minLiquidatableVAI);\n\n /// @notice Thrown when vToken is not listed\n error MarketNotListed(address vToken);\n\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @param comptroller_ The address of the Comptroller contract\n /// @param vBnb_ The address of the VBNB\n /// @param wBNB_ The address of wBNB\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address payable vBnb_, address wBNB_) {\n ensureNonzeroAddress(vBnb_);\n ensureNonzeroAddress(comptroller_);\n ensureNonzeroAddress(wBNB_);\n vBnb = IVBNB(vBnb_);\n wBNB = wBNB_;\n comptroller = IComptroller(comptroller_);\n vaiController = IVAIController(IComptroller(comptroller_).vaiController());\n _disableInitializers();\n }\n\n receive() external payable {}\n\n /// @notice Initializer for the implementation contract.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param accessControlManager_ address of access control manager\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function initialize(\n uint256 treasuryPercentMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) external virtual reinitializer(2) {\n __Liquidator_init(treasuryPercentMantissa_, accessControlManager_, protocolShareReserve_);\n }\n\n /// @dev Liquidator initializer for derived contracts.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param accessControlManager_ address of access control manager\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function __Liquidator_init(\n uint256 treasuryPercentMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) internal onlyInitializing {\n __Ownable2Step_init();\n __ReentrancyGuard_init();\n __Liquidator_init_unchained(treasuryPercentMantissa_, protocolShareReserve_);\n __AccessControlled_init_unchained(accessControlManager_);\n }\n\n /// @dev Liquidator initializer for derived contracts that doesn't call parent initializers.\n /// @param treasuryPercentMantissa_ Treasury share, scaled by 1e18 (e.g. 0.2 * 1e18 for 20%)\n /// @param protocolShareReserve_ The address of the protocol share reserve contract\n function __Liquidator_init_unchained(\n uint256 treasuryPercentMantissa_,\n address protocolShareReserve_\n ) internal onlyInitializing {\n validateTreasuryPercentMantissa(treasuryPercentMantissa_);\n treasuryPercentMantissa = treasuryPercentMantissa_;\n _setProtocolShareReserve(protocolShareReserve_);\n }\n\n /// @notice An admin function to restrict liquidations to allowed addresses only.\n /// @dev Use {addTo,removeFrom}AllowList to configure the allowed addresses.\n /// @param borrower The address of the borrower\n function restrictLiquidation(address borrower) external {\n _checkAccessAllowed(\"restrictLiquidation(address)\");\n if (liquidationRestricted[borrower]) {\n revert AlreadyRestricted(borrower);\n }\n liquidationRestricted[borrower] = true;\n emit LiquidationRestricted(borrower);\n }\n\n /// @notice An admin function to remove restrictions for liquidations.\n /// @dev Does not impact the allowedLiquidatorsByAccount mapping for the borrower, just turns off the check.\n /// @param borrower The address of the borrower\n function unrestrictLiquidation(address borrower) external {\n _checkAccessAllowed(\"unrestrictLiquidation(address)\");\n if (!liquidationRestricted[borrower]) {\n revert NoRestrictionsExist(borrower);\n }\n liquidationRestricted[borrower] = false;\n emit LiquidationRestrictionsDisabled(borrower);\n }\n\n /// @notice An admin function to add the liquidator to the allowedLiquidatorsByAccount mapping for a certain\n /// borrower. If the liquidations are restricted, only liquidators from the\n /// allowedLiquidatorsByAccount mapping can participate in liquidating the positions of this borrower.\n /// @param borrower The address of the borrower\n /// @param borrower The address of the liquidator\n function addToAllowlist(address borrower, address liquidator) external {\n _checkAccessAllowed(\"addToAllowlist(address,address)\");\n if (allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert AlreadyAllowed(borrower, liquidator);\n }\n allowedLiquidatorsByAccount[borrower][liquidator] = true;\n emit AllowlistEntryAdded(borrower, liquidator);\n }\n\n /// @notice An admin function to remove the liquidator from the allowedLiquidatorsByAccount mapping of a certain\n /// borrower. If the liquidations are restricted, this liquidator will not be\n /// able to liquidate the positions of this borrower.\n /// @param borrower The address of the borrower\n /// @param borrower The address of the liquidator\n function removeFromAllowlist(address borrower, address liquidator) external {\n _checkAccessAllowed(\"removeFromAllowlist(address,address)\");\n if (!allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert AllowlistEntryNotFound(borrower, liquidator);\n }\n allowedLiquidatorsByAccount[borrower][liquidator] = false;\n emit AllowlistEntryRemoved(borrower, liquidator);\n }\n\n /// @notice Liquidates a borrow and splits the seized amount between protocol share reserve and\n /// liquidator. The liquidators should use this interface instead of calling\n /// vToken.liquidateBorrow(...) directly.\n /// @notice Checks force VAI liquidation first; vToken should be address of vaiController if vaiDebt is greater than threshold\n /// @notice For BNB borrows msg.value should be equal to repayAmount; otherwise msg.value\n /// should be zero.\n /// @param vToken Borrowed vToken\n /// @param borrower The address of the borrower\n /// @param repayAmount The amount to repay on behalf of the borrower\n /// @param vTokenCollateral The collateral to seize\n function liquidateBorrow(\n address vToken,\n address borrower,\n uint256 repayAmount,\n IVToken vTokenCollateral\n ) external payable nonReentrant {\n ensureNonzeroAddress(borrower);\n checkRestrictions(borrower, msg.sender);\n (bool isListed, , ) = IComptroller(comptroller).markets(address(vTokenCollateral));\n if (!isListed) {\n revert MarketNotListed(address(vTokenCollateral));\n }\n\n _checkForceVAILiquidate(vToken, borrower);\n uint256 ourBalanceBefore = vTokenCollateral.balanceOf(address(this));\n if (vToken == address(vBnb)) {\n if (repayAmount != msg.value) {\n revert WrongTransactionAmount(repayAmount, msg.value);\n }\n vBnb.liquidateBorrow{ value: msg.value }(borrower, vTokenCollateral);\n } else {\n if (msg.value != 0) {\n revert WrongTransactionAmount(0, msg.value);\n }\n if (vToken == address(vaiController)) {\n _liquidateVAI(borrower, repayAmount, vTokenCollateral);\n } else {\n _liquidateBep20(IVBep20(vToken), borrower, repayAmount, vTokenCollateral);\n }\n }\n uint256 ourBalanceAfter = vTokenCollateral.balanceOf(address(this));\n uint256 seizedAmount = ourBalanceAfter - ourBalanceBefore;\n (uint256 ours, uint256 theirs) = _distributeLiquidationIncentive(vTokenCollateral, seizedAmount);\n _reduceReservesInternal();\n emit LiquidateBorrowedTokens(\n msg.sender,\n borrower,\n repayAmount,\n vToken,\n address(vTokenCollateral),\n ours,\n theirs\n );\n }\n\n /// @notice Sets the new percent of the seized amount that goes to treasury. Should\n /// be less than or equal to comptroller.liquidationIncentiveMantissa().sub(1e18).\n /// @param newTreasuryPercentMantissa New treasury percent (scaled by 10^18).\n function setTreasuryPercent(uint256 newTreasuryPercentMantissa) external {\n _checkAccessAllowed(\"setTreasuryPercent(uint256)\");\n validateTreasuryPercentMantissa(newTreasuryPercentMantissa);\n emit NewLiquidationTreasuryPercent(treasuryPercentMantissa, newTreasuryPercentMantissa);\n treasuryPercentMantissa = newTreasuryPercentMantissa;\n }\n\n /**\n * @notice Sets protocol share reserve contract address\n * @param protocolShareReserve_ The address of the protocol share reserve contract\n */\n function setProtocolShareReserve(address payable protocolShareReserve_) external onlyOwner {\n _setProtocolShareReserve(protocolShareReserve_);\n }\n\n /**\n * @notice Reduce the reserves of the pending accumulated reserves\n */\n function reduceReserves() external nonReentrant {\n _reduceReservesInternal();\n }\n\n function _reduceReservesInternal() internal {\n uint256 _pendingRedeemLength = pendingRedeem.length;\n uint256 range = _pendingRedeemLength >= pendingRedeemChunkLength\n ? pendingRedeemChunkLength\n : _pendingRedeemLength;\n for (uint256 index = range; index > 0; ) {\n address vToken = pendingRedeem[index - 1];\n uint256 vTokenBalance_ = IVToken(vToken).balanceOf(address(this));\n if (_redeemUnderlying(vToken, vTokenBalance_)) {\n if (vToken == address(vBnb)) {\n _reduceBnbReserves();\n } else {\n _reduceVTokenReserves(vToken);\n }\n pendingRedeem[index - 1] = pendingRedeem[pendingRedeem.length - 1];\n pendingRedeem.pop();\n }\n unchecked {\n index--;\n }\n }\n }\n\n /// @dev Transfers BEP20 tokens to self, then approves vToken to take these tokens.\n function _liquidateBep20(IVBep20 vToken, address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n (bool isListed, , ) = IComptroller(comptroller).markets(address(vToken));\n if (!isListed) {\n revert MarketNotListed(address(vToken));\n }\n\n IERC20Upgradeable borrowedToken = IERC20Upgradeable(vToken.underlying());\n uint256 actualRepayAmount = _transferBep20(borrowedToken, msg.sender, address(this), repayAmount);\n borrowedToken.safeApprove(address(vToken), 0);\n borrowedToken.safeApprove(address(vToken), actualRepayAmount);\n requireNoError(vToken.liquidateBorrow(borrower, actualRepayAmount, vTokenCollateral));\n }\n\n /// @dev Transfers BEP20 tokens to self, then approves VAI to take these tokens.\n function _liquidateVAI(address borrower, uint256 repayAmount, IVToken vTokenCollateral) internal {\n IERC20Upgradeable vai = IERC20Upgradeable(vaiController.getVAIAddress());\n vai.safeTransferFrom(msg.sender, address(this), repayAmount);\n vai.safeApprove(address(vaiController), 0);\n vai.safeApprove(address(vaiController), repayAmount);\n\n (uint256 err, ) = vaiController.liquidateVAI(borrower, repayAmount, vTokenCollateral);\n requireNoError(err);\n }\n\n /// @dev Distribute seized collateral between liquidator and protocol share reserve\n function _distributeLiquidationIncentive(\n IVToken vTokenCollateral,\n uint256 seizedAmount\n ) internal returns (uint256 ours, uint256 theirs) {\n (ours, theirs) = _splitLiquidationIncentive(seizedAmount);\n if (!vTokenCollateral.transfer(msg.sender, theirs)) {\n revert VTokenTransferFailed(address(this), msg.sender, theirs);\n }\n\n if (ours > 0 && !_redeemUnderlying(address(vTokenCollateral), ours)) {\n // Check if asset is already present in pendingRedeem array\n uint256 index;\n for (index; index < pendingRedeem.length; ) {\n if (pendingRedeem[index] == address(vTokenCollateral)) {\n break;\n }\n unchecked {\n index++;\n }\n }\n if (index == pendingRedeem.length) {\n pendingRedeem.push(address(vTokenCollateral));\n }\n } else {\n if (address(vTokenCollateral) == address(vBnb)) {\n _reduceBnbReserves();\n } else {\n _reduceVTokenReserves(address(vTokenCollateral));\n }\n }\n }\n\n /// @dev Wraps BNB to wBNB and sends to protocol share reserve\n function _reduceBnbReserves() private {\n uint256 bnbBalance = address(this).balance;\n IWBNB(wBNB).deposit{ value: bnbBalance }();\n IERC20Upgradeable(wBNB).safeTransfer(protocolShareReserve, bnbBalance);\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\n address(comptroller),\n wBNB,\n IProtocolShareReserve.IncomeType.LIQUIDATION\n );\n emit ProtocolLiquidationIncentiveTransferred(msg.sender, wBNB, bnbBalance);\n }\n\n /// @dev Redeem seized collateral to underlying assets\n function _redeemUnderlying(address vToken, uint256 amount) private returns (bool) {\n try IVToken(address(vToken)).redeem(amount) returns (uint256 response) {\n if (response == 0) {\n return true;\n } else {\n return false;\n }\n } catch {\n return false;\n }\n }\n\n /// @dev Transfers seized collateral other than BNB to protocol share reserve\n function _reduceVTokenReserves(address vToken) private {\n address underlying = IVBep20(vToken).underlying();\n uint256 underlyingBalance = IERC20Upgradeable(underlying).balanceOf(address(this));\n IERC20Upgradeable(underlying).safeTransfer(protocolShareReserve, underlyingBalance);\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\n address(comptroller),\n underlying,\n IProtocolShareReserve.IncomeType.LIQUIDATION\n );\n emit ProtocolLiquidationIncentiveTransferred(msg.sender, underlying, underlyingBalance);\n }\n\n /// @dev Transfers tokens and returns the actual transfer amount\n function _transferBep20(\n IERC20Upgradeable token,\n address from,\n address to,\n uint256 amount\n ) internal returns (uint256) {\n uint256 prevBalance = token.balanceOf(to);\n token.safeTransferFrom(from, to, amount);\n return token.balanceOf(to) - prevBalance;\n }\n\n /// @dev Computes the amounts that would go to treasury and to the liquidator.\n function _splitLiquidationIncentive(uint256 seizedAmount) internal view returns (uint256 ours, uint256 theirs) {\n uint256 totalIncentive = comptroller.liquidationIncentiveMantissa();\n ours = (seizedAmount * treasuryPercentMantissa) / totalIncentive;\n theirs = seizedAmount - ours;\n }\n\n function requireNoError(uint256 errCode) internal pure {\n if (errCode == uint256(0)) {\n return;\n }\n\n revert LiquidationFailed(errCode);\n }\n\n function checkRestrictions(address borrower, address liquidator) internal view {\n if (liquidationRestricted[borrower] && !allowedLiquidatorsByAccount[borrower][liquidator]) {\n revert LiquidationNotAllowed(borrower, liquidator);\n }\n }\n\n function validateTreasuryPercentMantissa(uint256 treasuryPercentMantissa_) internal view {\n uint256 maxTreasuryPercentMantissa = comptroller.liquidationIncentiveMantissa() - MANTISSA_ONE;\n if (treasuryPercentMantissa_ > maxTreasuryPercentMantissa) {\n revert TreasuryPercentTooHigh(maxTreasuryPercentMantissa, treasuryPercentMantissa_);\n }\n }\n\n /// @dev Checks liquidation action in comptroller and vaiDebt with minLiquidatableVAI threshold\n function _checkForceVAILiquidate(address vToken_, address borrower_) private view {\n uint256 _vaiDebt = vaiController.getVAIRepayAmount(borrower_);\n bool _isVAILiquidationPaused = comptroller.actionPaused(address(vaiController), IComptroller.Action.LIQUIDATE);\n bool _isForcedLiquidationEnabled = comptroller.isForcedLiquidationEnabled(vToken_);\n if (\n _isForcedLiquidationEnabled ||\n _isVAILiquidationPaused ||\n !forceVAILiquidate ||\n _vaiDebt < minLiquidatableVAI ||\n vToken_ == address(vaiController)\n ) return;\n revert VAIDebtTooHigh(_vaiDebt, minLiquidatableVAI);\n }\n\n function _setProtocolShareReserve(address protocolShareReserve_) internal {\n ensureNonzeroAddress(protocolShareReserve_);\n emit NewProtocolShareReserve(protocolShareReserve, protocolShareReserve_);\n protocolShareReserve = protocolShareReserve_;\n }\n\n /**\n * @notice Sets the threshold for minimum amount of vaiLiquidate\n * @param minLiquidatableVAI_ New address for the access control\n */\n function setMinLiquidatableVAI(uint256 minLiquidatableVAI_) external {\n _checkAccessAllowed(\"setMinLiquidatableVAI(uint256)\");\n emit NewMinLiquidatableVAI(minLiquidatableVAI, minLiquidatableVAI_);\n minLiquidatableVAI = minLiquidatableVAI_;\n }\n\n /**\n * @notice Length of the pendingRedeem array to be consider while redeeming in Liquidation transaction\n * @param newLength_ Length of the chunk\n */\n function setPendingRedeemChunkLength(uint256 newLength_) external {\n _checkAccessAllowed(\"setPendingRedeemChunkLength(uint256)\");\n require(newLength_ > 0, \"Invalid chunk size\");\n emit NewPendingRedeemChunkLength(pendingRedeemChunkLength, newLength_);\n pendingRedeemChunkLength = newLength_;\n }\n\n /**\n * @notice Pause Force Liquidation of VAI\n */\n function pauseForceVAILiquidate() external {\n _checkAccessAllowed(\"pauseForceVAILiquidate()\");\n require(forceVAILiquidate, \"Force Liquidation of VAI is already Paused\");\n forceVAILiquidate = false;\n emit ForceVAILiquidationPaused(msg.sender);\n }\n\n /**\n * @notice Resume Force Liquidation of VAI\n */\n function resumeForceVAILiquidate() external {\n _checkAccessAllowed(\"resumeForceVAILiquidate()\");\n require(!forceVAILiquidate, \"Force Liquidation of VAI is already resumed\");\n forceVAILiquidate = true;\n emit ForceVAILiquidationResumed(msg.sender);\n }\n\n function renounceOwnership() public override {}\n}\n" + }, + "contracts/Liquidator/LiquidatorStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\ncontract LiquidatorStorage {\n /* State */\n\n /// @notice Percent of seized amount that goes to treasury.\n uint256 public treasuryPercentMantissa;\n\n /// @notice Mapping of addresses allowed to liquidate an account if liquidationRestricted[borrower] == true\n mapping(address => mapping(address => bool)) public allowedLiquidatorsByAccount;\n\n /// @notice Whether the liquidations are restricted to enabled allowedLiquidatorsByAccount addresses only\n mapping(address => bool) public liquidationRestricted;\n\n /// @notice minimum amount of VAI liquidation threshold\n uint256 public minLiquidatableVAI;\n\n /// @notice check for liquidation of VAI\n bool public forceVAILiquidate;\n\n /// @notice assests whose redeem is pending to reduce reserves\n address[] public pendingRedeem;\n\n /// @notice protocol share reserve contract address\n address public protocolShareReserve;\n\n /// @dev Size of chunk to consider when redeeming underlying at the time of liquidation\n uint256 internal pendingRedeemChunkLength;\n\n /// @notice gap to prevent collision in inheritance\n uint256[49] private __gap;\n}\n" + }, + "contracts/PegStability/IVAI.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IVAI {\n function balanceOf(address usr) external returns (uint256);\n\n function transferFrom(address src, address dst, uint amount) external returns (bool);\n\n function mint(address usr, uint wad) external;\n\n function burn(address usr, uint wad) external;\n}\n" + }, + "contracts/PegStability/PegStability.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\nimport \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { IVAI } from \"./IVAI.sol\";\n\n/**\n * @title Peg Stability Contract.\n * @notice Contract for swapping stable token for VAI token and vice versa to maintain the peg stability between them.\n * @author Venus Protocol\n */\ncontract PegStability is AccessControlledV8, ReentrancyGuardUpgradeable {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n // Helper enum for calculation of the fee.\n enum FeeDirection {\n IN,\n OUT\n }\n\n /// @notice The divisor used to convert fees to basis points.\n uint256 public constant BASIS_POINTS_DIVISOR = 10000;\n\n /// @notice The mantissa value representing 1 (used for calculations).\n uint256 public constant MANTISSA_ONE = 1e18;\n\n /// @notice The value representing one dollar in the stable token.\n /// @dev Our oracle is returning amount depending on the number of decimals of the stable token. (36 - asset_decimals) E.g. 8 decimal asset = 1e28.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable ONE_DOLLAR;\n\n /// @notice VAI token contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n IVAI public immutable VAI;\n\n /// @notice The address of the stable token contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable STABLE_TOKEN_ADDRESS;\n\n /// @notice The address of ResilientOracle contract wrapped in its interface.\n ResilientOracleInterface public oracle;\n\n /// @notice The address of the Venus Treasury contract.\n address public venusTreasury;\n\n /// @notice The incoming stableCoin fee. (Fee for swapStableForVAI).\n uint256 public feeIn;\n\n /// @notice The outgoing stableCoin fee. (Fee for swapVAIForStable).\n uint256 public feeOut;\n\n /// @notice The maximum amount of VAI that can be minted through this contract.\n uint256 public vaiMintCap;\n\n /// @notice The total amount of VAI minted through this contract.\n uint256 public vaiMinted;\n\n /// @notice A flag indicating whether the contract is currently paused or not.\n bool public isPaused;\n\n /// @notice Event emitted when contract is paused.\n event PSMPaused(address indexed admin);\n\n /// @notice Event emitted when the contract is resumed after pause.\n event PSMResumed(address indexed admin);\n\n /// @notice Event emitted when feeIn state var is modified.\n event FeeInChanged(uint256 oldFeeIn, uint256 newFeeIn);\n\n /// @notice Event emitted when feeOut state var is modified.\n event FeeOutChanged(uint256 oldFeeOut, uint256 newFeeOut);\n\n /// @notice Event emitted when vaiMintCap state var is modified.\n event VAIMintCapChanged(uint256 oldCap, uint256 newCap);\n\n /// @notice Event emitted when venusTreasury state var is modified.\n event VenusTreasuryChanged(address indexed oldTreasury, address indexed newTreasury);\n\n /// @notice Event emitted when oracle state var is modified.\n event OracleChanged(address indexed oldOracle, address indexed newOracle);\n\n /// @notice Event emitted when stable token is swapped for VAI.\n event StableForVAISwapped(uint256 stableIn, uint256 vaiOut, uint256 fee);\n\n /// @notice Event emitted when stable token is swapped for VAI.\n event VAIForStableSwapped(uint256 vaiBurnt, uint256 stableOut, uint256 vaiFee);\n\n /// @notice thrown when contract is in paused state\n error Paused();\n\n /// @notice thrown when attempted to pause an already paused contract\n error AlreadyPaused();\n\n /// @notice thrown when attempted to resume the contract if it is already resumed\n error NotPaused();\n\n /// @notice thrown when stable token has more than 18 decimals\n error TooManyDecimals();\n\n /// @notice thrown when fee is >= 100%\n error InvalidFee();\n\n /// @notice thrown when a zero address is passed as a function parameter\n error ZeroAddress();\n\n /// @notice thrown when a zero amount is passed as stable token amount parameter\n error ZeroAmount();\n\n /// @notice thrown when the user doesn't have enough VAI balance to provide for the amount of stable tokens he wishes to get\n error NotEnoughVAI();\n\n /// @notice thrown when the amount of VAI to be burnt exceeds the vaiMinted amount\n error VAIMintedUnderflow();\n\n /// @notice thrown when the VAI transfer to treasury fails\n error VAITransferFail();\n\n /// @notice thrown when VAI to be minted will go beyond the mintCap threshold\n error VAIMintCapReached();\n /// @notice thrown when fee calculation will result in rounding down to 0 due to stable token amount being a too small number\n error AmountTooSmall();\n\n /**\n * @dev Prevents functions to execute when contract is paused.\n */\n modifier isActive() {\n if (isPaused) revert Paused();\n _;\n }\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address stableTokenAddress_, address vaiAddress_) {\n _ensureNonzeroAddress(stableTokenAddress_);\n _ensureNonzeroAddress(vaiAddress_);\n\n uint256 decimals_ = IERC20MetadataUpgradeable(stableTokenAddress_).decimals();\n\n if (decimals_ > 18) {\n revert TooManyDecimals();\n }\n\n ONE_DOLLAR = 10 ** (36 - decimals_); // 1$ scaled to the decimals returned by our Oracle\n STABLE_TOKEN_ADDRESS = stableTokenAddress_;\n VAI = IVAI(vaiAddress_);\n _disableInitializers();\n }\n\n /**\n * @notice Initializes the contract via Proxy Contract with the required parameters.\n * @param accessControlManager_ The address of the AccessControlManager contract.\n * @param venusTreasury_ The address where fees will be sent.\n * @param oracleAddress_ The address of the ResilientOracle contract.\n * @param feeIn_ The percentage of fees to be applied to a stablecoin -> VAI swap.\n * @param feeOut_ The percentage of fees to be applied to a VAI -> stablecoin swap.\n * @param vaiMintCap_ The cap for the total amount of VAI that can be minted.\n */\n function initialize(\n address accessControlManager_,\n address venusTreasury_,\n address oracleAddress_,\n uint256 feeIn_,\n uint256 feeOut_,\n uint256 vaiMintCap_\n ) external initializer {\n _ensureNonzeroAddress(accessControlManager_);\n _ensureNonzeroAddress(venusTreasury_);\n _ensureNonzeroAddress(oracleAddress_);\n __AccessControlled_init(accessControlManager_);\n __ReentrancyGuard_init();\n\n if (feeIn_ >= BASIS_POINTS_DIVISOR || feeOut_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n\n feeIn = feeIn_;\n feeOut = feeOut_;\n vaiMintCap = vaiMintCap_;\n venusTreasury = venusTreasury_;\n oracle = ResilientOracleInterface(oracleAddress_);\n }\n\n /*** Swap Functions ***/\n\n /**\n * @notice Swaps VAI for a stable token.\n * @param receiver The address where the stablecoin will be sent.\n * @param stableTknAmount The amount of stable tokens to receive.\n * @return The amount of VAI received and burnt from the sender.\n */\n // @custom:event Emits VAIForStableSwapped event.\n function swapVAIForStable(\n address receiver,\n uint256 stableTknAmount\n ) external isActive nonReentrant returns (uint256) {\n _ensureNonzeroAddress(receiver);\n _ensureNonzeroAmount(stableTknAmount);\n\n // update oracle price and calculate USD value of the stable token amount scaled in 18 decimals\n oracle.updateAssetPrice(STABLE_TOKEN_ADDRESS);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.OUT);\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.OUT);\n\n if (VAI.balanceOf(msg.sender) < stableTknAmountUSD + fee) {\n revert NotEnoughVAI();\n }\n if (vaiMinted < stableTknAmountUSD) {\n revert VAIMintedUnderflow();\n }\n\n unchecked {\n vaiMinted -= stableTknAmountUSD;\n }\n\n if (fee != 0) {\n bool success = VAI.transferFrom(msg.sender, venusTreasury, fee);\n if (!success) {\n revert VAITransferFail();\n }\n }\n\n VAI.burn(msg.sender, stableTknAmountUSD);\n IERC20Upgradeable(STABLE_TOKEN_ADDRESS).safeTransfer(receiver, stableTknAmount);\n emit VAIForStableSwapped(stableTknAmountUSD, stableTknAmount, fee);\n return stableTknAmountUSD;\n }\n\n /**\n * @notice Swaps stable tokens for VAI with fees.\n * @dev This function adds support to fee-on-transfer tokens. The actualTransferAmt is calculated, by recording token balance state before and after the transfer.\n * @param receiver The address that will receive the VAI tokens.\n * @param stableTknAmount The amount of stable tokens to be swapped.\n * @return Amount of VAI minted to the sender.\n */\n // @custom:event Emits StableForVAISwapped event.\n function swapStableForVAI(\n address receiver,\n uint256 stableTknAmount\n ) external isActive nonReentrant returns (uint256) {\n _ensureNonzeroAddress(receiver);\n _ensureNonzeroAmount(stableTknAmount);\n // transfer IN, supporting fee-on-transfer tokens\n uint256 balanceBefore = IERC20Upgradeable(STABLE_TOKEN_ADDRESS).balanceOf(address(this));\n IERC20Upgradeable(STABLE_TOKEN_ADDRESS).safeTransferFrom(msg.sender, address(this), stableTknAmount);\n uint256 balanceAfter = IERC20Upgradeable(STABLE_TOKEN_ADDRESS).balanceOf(address(this));\n\n //calculate actual transfered amount (in case of fee-on-transfer tokens)\n uint256 actualTransferAmt = balanceAfter - balanceBefore;\n\n // update oracle price and calculate USD value of the stable token amount scaled in 18 decimals\n oracle.updateAssetPrice(STABLE_TOKEN_ADDRESS);\n uint256 actualTransferAmtInUSD = _previewTokenUSDAmount(actualTransferAmt, FeeDirection.IN);\n\n //calculate feeIn\n uint256 fee = _calculateFee(actualTransferAmtInUSD, FeeDirection.IN);\n uint256 vaiToMint = actualTransferAmtInUSD - fee;\n\n if (vaiMinted + actualTransferAmtInUSD > vaiMintCap) {\n revert VAIMintCapReached();\n }\n unchecked {\n vaiMinted += actualTransferAmtInUSD;\n }\n\n // mint VAI to receiver\n VAI.mint(receiver, vaiToMint);\n\n // mint VAI fee to venus treasury\n if (fee != 0) {\n VAI.mint(venusTreasury, fee);\n }\n\n emit StableForVAISwapped(actualTransferAmt, vaiToMint, fee);\n return vaiToMint;\n }\n\n /*** Admin Functions ***/\n\n /**\n * @notice Pause the PSM contract.\n * @dev Reverts if the contract is already paused.\n */\n // @custom:event Emits PSMPaused event.\n function pause() external {\n _checkAccessAllowed(\"pause()\");\n if (isPaused) {\n revert AlreadyPaused();\n }\n isPaused = true;\n emit PSMPaused(msg.sender);\n }\n\n /**\n * @notice Resume the PSM contract.\n * @dev Reverts if the contract is not paused.\n */\n // @custom:event Emits PSMResumed event.\n function resume() external {\n _checkAccessAllowed(\"resume()\");\n if (!isPaused) {\n revert NotPaused();\n }\n isPaused = false;\n emit PSMResumed(msg.sender);\n }\n\n /**\n * @notice Set the fee percentage for incoming swaps.\n * @dev Reverts if the new fee percentage is invalid (greater than or equal to BASIS_POINTS_DIVISOR).\n * @param feeIn_ The new fee percentage for incoming swaps.\n */\n // @custom:event Emits FeeInChanged event.\n function setFeeIn(uint256 feeIn_) external {\n _checkAccessAllowed(\"setFeeIn(uint256)\");\n // feeIn = 10000 = 100%\n if (feeIn_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n uint256 oldFeeIn = feeIn;\n feeIn = feeIn_;\n emit FeeInChanged(oldFeeIn, feeIn_);\n }\n\n /**\n * @notice Set the fee percentage for outgoing swaps.\n * @dev Reverts if the new fee percentage is invalid (greater than or equal to BASIS_POINTS_DIVISOR).\n * @param feeOut_ The new fee percentage for outgoing swaps.\n */\n // @custom:event Emits FeeOutChanged event.\n function setFeeOut(uint256 feeOut_) external {\n _checkAccessAllowed(\"setFeeOut(uint256)\");\n // feeOut = 10000 = 100%\n if (feeOut_ >= BASIS_POINTS_DIVISOR) {\n revert InvalidFee();\n }\n uint256 oldFeeOut = feeOut;\n feeOut = feeOut_;\n emit FeeOutChanged(oldFeeOut, feeOut_);\n }\n\n /**\n * @dev Set the maximum amount of VAI that can be minted through this contract.\n * @param vaiMintCap_ The new maximum amount of VAI that can be minted.\n */\n // @custom:event Emits VAIMintCapChanged event.\n function setVAIMintCap(uint256 vaiMintCap_) external {\n _checkAccessAllowed(\"setVAIMintCap(uint256)\");\n uint256 oldVAIMintCap = vaiMintCap;\n vaiMintCap = vaiMintCap_;\n emit VAIMintCapChanged(oldVAIMintCap, vaiMintCap_);\n }\n\n /**\n * @notice Set the address of the Venus Treasury contract.\n * @dev Reverts if the new address is zero.\n * @param venusTreasury_ The new address of the Venus Treasury contract.\n */\n // @custom:event Emits VenusTreasuryChanged event.\n function setVenusTreasury(address venusTreasury_) external {\n _checkAccessAllowed(\"setVenusTreasury(address)\");\n _ensureNonzeroAddress(venusTreasury_);\n address oldTreasuryAddress = venusTreasury;\n venusTreasury = venusTreasury_;\n emit VenusTreasuryChanged(oldTreasuryAddress, venusTreasury_);\n }\n\n /**\n * @notice Set the address of the ResilientOracle contract.\n * @dev Reverts if the new address is zero.\n * @param oracleAddress_ The new address of the ResilientOracle contract.\n */\n // @custom:event Emits OracleChanged event.\n function setOracle(address oracleAddress_) external {\n _checkAccessAllowed(\"setOracle(address)\");\n _ensureNonzeroAddress(oracleAddress_);\n address oldOracleAddress = address(oracle);\n oracle = ResilientOracleInterface(oracleAddress_);\n emit OracleChanged(oldOracleAddress, oracleAddress_);\n }\n\n /**\n * @dev Disabling renounceOwnership function.\n */\n function renounceOwnership() public override {}\n\n /*** Helper Functions ***/\n\n /**\n * @notice Calculates the amount of VAI that would be burnt from the user.\n * @dev This calculation might be off with a bit, if the price of the oracle for this asset is not updated in the block this function is invoked.\n * @param stableTknAmount The amount of stable tokens to be received after the swap.\n * @return The amount of VAI that would be taken from the user.\n */\n function previewSwapVAIForStable(uint256 stableTknAmount) external view returns (uint256) {\n _ensureNonzeroAmount(stableTknAmount);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.OUT);\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.OUT);\n\n if (vaiMinted < stableTknAmountUSD) {\n revert VAIMintedUnderflow();\n }\n\n return stableTknAmountUSD + fee;\n }\n\n /**\n * @notice Calculates the amount of VAI that would be sent to the receiver.\n * @dev This calculation might be off with a bit, if the price of the oracle for this asset is not updated in the block this function is invoked.\n * @param stableTknAmount The amount of stable tokens provided for the swap.\n * @return The amount of VAI that would be sent to the receiver.\n */\n function previewSwapStableForVAI(uint256 stableTknAmount) external view returns (uint256) {\n _ensureNonzeroAmount(stableTknAmount);\n uint256 stableTknAmountUSD = _previewTokenUSDAmount(stableTknAmount, FeeDirection.IN);\n\n //calculate feeIn\n uint256 fee = _calculateFee(stableTknAmountUSD, FeeDirection.IN);\n uint256 vaiToMint = stableTknAmountUSD - fee;\n\n if (vaiMinted + stableTknAmountUSD > vaiMintCap) {\n revert VAIMintCapReached();\n }\n\n return vaiToMint;\n }\n\n /**\n * @dev Calculates the USD value of the given amount of stable tokens depending on the swap direction.\n * @param amount The amount of stable tokens.\n * @param direction The direction of the swap.\n * @return The USD value of the given amount of stable tokens scaled by 1e18 taking into account the direction of the swap\n */\n function _previewTokenUSDAmount(uint256 amount, FeeDirection direction) internal view returns (uint256) {\n return (amount * _getPriceInUSD(direction)) / MANTISSA_ONE;\n }\n\n /**\n * @notice Get the price of stable token in USD.\n * @dev This function returns either min(1$,oraclePrice) or max(1$,oraclePrice) with a decimal scale (36 - asset_decimals). E.g. for 8 decimal token 1$ will be 1e28.\n * @param direction The direction of the swap: FeeDirection.IN or FeeDirection.OUT.\n * @return The price in USD, adjusted based on the selected direction.\n */\n function _getPriceInUSD(FeeDirection direction) internal view returns (uint256) {\n // get price with a scale = (36 - asset_decimals)\n uint256 price = oracle.getPrice(STABLE_TOKEN_ADDRESS);\n\n if (direction == FeeDirection.IN) {\n // MIN(1, price)\n return price < ONE_DOLLAR ? price : ONE_DOLLAR;\n } else {\n // MAX(1, price)\n return price > ONE_DOLLAR ? price : ONE_DOLLAR;\n }\n }\n\n /**\n * @notice Calculate the fee amount based on the input amount and fee percentage.\n * @dev Reverts if the fee percentage calculation results in rounding down to 0.\n * @param amount The input amount to calculate the fee from.\n * @param direction The direction of the fee: FeeDirection.IN or FeeDirection.OUT.\n * @return The fee amount.\n */\n function _calculateFee(uint256 amount, FeeDirection direction) internal view returns (uint256) {\n uint256 feePercent;\n if (direction == FeeDirection.IN) {\n feePercent = feeIn;\n } else {\n feePercent = feeOut;\n }\n if (feePercent == 0) {\n return 0;\n } else {\n // checking if the percent calculation will result in rounding down to 0\n if (amount * feePercent < BASIS_POINTS_DIVISOR) {\n revert AmountTooSmall();\n }\n return (amount * feePercent) / BASIS_POINTS_DIVISOR;\n }\n }\n\n /**\n * @notice Checks that the address is not the zero address.\n * @param someone The address to check.\n */\n function _ensureNonzeroAddress(address someone) private pure {\n if (someone == address(0)) revert ZeroAddress();\n }\n\n /**\n * @notice Checks that the amount passed as stable tokens is bigger than zero\n * @param amount The amount to validate\n */\n function _ensureNonzeroAmount(uint256 amount) private pure {\n if (amount == 0) revert ZeroAmount();\n }\n}\n" + }, + "contracts/Swap/interfaces/CustomErrors.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\n// **************\n// *** ERRORS ***\n// **************\n\n///@notice Error indicating that suplying to a given market failed.\nerror SupplyError(address supplier, address vToken, uint256 errorCode);\n\n///@notice Error indicating that repaying to given market failed.\nerror RepayError(address repayer, address vToken, uint256 errorCode);\n\n///@notice Error indicating wBNB address passed is not the expected one.\nerror WrongAddress(address expectedAdddress, address passedAddress);\n\n///@notice Error thrown when deadline for swap has expired\nerror SwapDeadlineExpire(uint256 deadline, uint256 timestemp);\n\n///@notice Error thrown where the input amount parameter for a token is 0\nerror InsufficientInputAmount();\n\n///@notice Error thrown when the amount out passed is 0\nerror InsufficientOutputAmount();\n\n///@notice Error thrown when the amount received from a trade is below the minimum\nerror OutputAmountBelowMinimum(uint256 amountOut, uint256 amountOutMin);\n\n///@notice Error thrown when the amount In is above the amount in maximum\nerror InputAmountAboveMaximum(uint256 amountIn, uint256 amountIntMax);\n\n///@notice Error thrown when amount is above the msg.value(amountMax)\nerror ExcessiveInputAmount(uint256 amount, uint256 amountMax);\n\n///@notice Error thrown when the given reserves are equal to 0\nerror InsufficientLiquidity();\n\n///@notice Error thrown if a zero address is passed\nerror ZeroAddress();\n\n///@notice Error thrown if two token addresses are identical\nerror IdenticalAddresses();\n\n///@notice Error thrown when the trade path[] parameter consists of only 1 token (i.e. path.length<2)\nerror InvalidPath();\n\n///@notice Error thrown when invalid vToken address is passed to swap router\nerror VTokenNotListed(address vToken);\n\n///@notice Error thrown when invalid underlying is passed as per given vToken\nerror VTokenUnderlyingInvalid(address underlying);\n\n///@notice Error thrown when swapamount is less than the amountOutmin\nerror SwapAmountLessThanAmountOutMin(uint256 swapAmount, uint256 amountOutMin);\n\n///@notice Error thrown when swapRouter's balance is less than sweep amount\nerror InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n///@notice Error thrown when safeApprove failed\nerror SafeApproveFailed();\n\n///@notice Error thrown when safeTransfer failed\nerror SafeTransferFailed();\n\n///@notice Error thrown when transferFrom failed\nerror SafeTransferFromFailed();\n\n///@notice Error thrown when safeTransferBNB failed\nerror SafeTransferBNBFailed();\n\n///@notice Error thrown when reentrant check fails\nerror ReentrantCheck();\n" + }, + "contracts/Swap/interfaces/InterfaceComptroller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface InterfaceComptroller {\n function markets(address) external view returns (bool);\n}\n" + }, + "contracts/Swap/interfaces/IPancakePair.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakePair {\n event Approval(address indexed owner, address indexed spender, uint value);\n event Transfer(address indexed from, address indexed to, uint value);\n\n function name() external pure returns (string memory);\n\n function symbol() external pure returns (string memory);\n\n function decimals() external pure returns (uint8);\n\n function totalSupply() external view returns (uint);\n\n function balanceOf(address owner) external view returns (uint);\n\n function allowance(address owner, address spender) external view returns (uint);\n\n function approve(address spender, uint value) external returns (bool);\n\n function transfer(address to, uint value) external returns (bool);\n\n function transferFrom(address from, address to, uint value) external returns (bool);\n\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n\n function PERMIT_TYPEHASH() external pure returns (bytes32);\n\n function nonces(address owner) external view returns (uint);\n\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\n\n event Mint(address indexed sender, uint amount0, uint amount1);\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\n event Swap(\n address indexed sender,\n uint amount0In,\n uint amount1In,\n uint amount0Out,\n uint amount1Out,\n address indexed to\n );\n event Sync(uint112 reserve0, uint112 reserve1);\n\n function MINIMUM_LIQUIDITY() external pure returns (uint);\n\n function factory() external view returns (address);\n\n function token0() external view returns (address);\n\n function token1() external view returns (address);\n\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\n\n function price0CumulativeLast() external view returns (uint);\n\n function price1CumulativeLast() external view returns (uint);\n\n function kLast() external view returns (uint);\n\n function mint(address to) external returns (uint liquidity);\n\n function burn(address to) external returns (uint amount0, uint amount1);\n\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\n\n function skim(address to) external;\n\n function sync() external;\n\n function initialize(address, address) external;\n}\n" + }, + "contracts/Swap/interfaces/IPancakeSwapV2Factory.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakeSwapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n\n function allPairs(uint) external view returns (address pair);\n\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n\n function setFeeToSetter(address) external;\n}\n" + }, + "contracts/Swap/interfaces/IPancakeSwapV2Router.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IPancakeSwapV2Router {\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForTokensAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256 swapAmount);\n\n function swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapExactBNBForTokensAtSupportingFee(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256 swapAmount);\n\n function swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForBNBAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256 swapAmount);\n\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable returns (uint256[] memory amounts);\n\n function swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external returns (uint256[] memory amounts);\n\n function swapExactTokensForTokensAndSupply(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactBNBForTokensAndSupply(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactBNBForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapTokensForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForBNBAndSupply(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForBNBAndSupplyAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForExactBNBAndSupply(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForFullTokenDebtAndRepay(\n address vTokenAddress,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForTokensAndRepay(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactBNBForTokensAndRepay(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactBNBForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapTokensForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForFullTokenDebtAndRepay(\n address vTokenAddress,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapBNBForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable;\n\n function swapExactTokensForBNBAndRepay(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapExactTokensForBNBAndRepayAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForExactBNBAndRepay(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external;\n\n function swapTokensForFullBNBDebtAndRepay(uint256 amountInMax, address[] calldata path, uint256 deadline) external;\n}\n" + }, + "contracts/Swap/interfaces/IVBNB.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IVBNB {\n function repayBorrowBehalf(address borrower) external payable;\n\n function mint() external payable;\n\n function balanceOf(address owner) external view returns (uint256);\n}\n" + }, + "contracts/Swap/interfaces/IVtoken.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IVToken {\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\n\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\n\n function borrowBalanceCurrent(address account) external returns (uint);\n\n function underlying() external returns (address);\n}\n" + }, + "contracts/Swap/interfaces/IWBNB.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IWBNB {\n function deposit() external payable;\n\n function transfer(address to, uint value) external returns (bool);\n\n function withdraw(uint) external;\n\n function balanceOf(address owner) external view returns (uint256 balance);\n}\n" + }, + "contracts/Swap/IRouterHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface IRouterHelper {\n function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);\n\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountOut);\n\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure returns (uint256 amountIn);\n\n function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);\n\n function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);\n}\n" + }, + "contracts/Swap/lib/PancakeLibrary.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"../interfaces/IPancakePair.sol\";\nimport \"../interfaces/CustomErrors.sol\";\n\nlibrary PancakeLibrary {\n /**\n * @notice Used to handle return values from pairs sorted in this order\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return token0 token1 Sorted token addresses\n **/\n function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {\n if (tokenA == tokenB) {\n revert IdenticalAddresses();\n }\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\n if (token0 == address(0)) {\n revert ZeroAddress();\n }\n }\n\n /**\n * @notice Calculates the CREATE2 address for a pair without making any external calls\n * @param factory Address of the pancake swap factory\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return pair Address for a pair\n **/\n function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {\n (address token0, address token1) = sortTokens(tokenA, tokenB);\n pair = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(\n hex\"ff\",\n factory,\n keccak256(abi.encodePacked(token0, token1)),\n hex\"00fb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5\" // init code hash\n )\n )\n )\n )\n );\n }\n\n /**\n * @notice Fetches and sorts the reserves for a pair\n * @param factory Address of the pancake swap factory\n * @param tokenA The address of token A\n * @param tokenB The address of token B\n * @return reserveA reserveB Reserves for the token A and token B\n **/\n function getReserves(\n address factory,\n address tokenA,\n address tokenB\n ) internal view returns (uint256 reserveA, uint256 reserveB) {\n (address token0, ) = sortTokens(tokenA, tokenB);\n address pairAddress = pairFor(factory, tokenA, tokenB);\n (uint256 reserve0, uint256 reserve1, ) = IPancakePair(pairAddress).getReserves();\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\n }\n\n /**\n * @notice Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n * @param amountA The amount of token A\n * @param reserveA The amount of reserves for token A before swap\n * @param reserveB The amount of reserves for token B before swap\n * @return amountB An equivalent amount of the token B\n **/\n function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) internal pure returns (uint256 amountB) {\n if (amountA == 0) {\n revert InsufficientInputAmount();\n } else if (reserveA == 0 || reserveB == 0) {\n revert InsufficientLiquidity();\n }\n amountB = (amountA * reserveB) / reserveA;\n }\n\n /**\n * @notice Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n * @param amountIn The amount of token A need to swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountOut The maximum output amount of the token B\n **/\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) internal pure returns (uint256 amountOut) {\n if (amountIn == 0) {\n revert InsufficientInputAmount();\n } else if (reserveIn == 0 || reserveOut == 0) {\n revert InsufficientLiquidity();\n }\n uint256 amountInWithFee = amountIn * 9975;\n uint256 numerator = amountInWithFee * reserveOut;\n uint256 denominator = (reserveIn * 10000) + amountInWithFee;\n amountOut = numerator / denominator;\n }\n\n /**\n * @notice Given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n * @param amountOut The amount of token B after swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountIn Required input amount of the token A\n **/\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) internal pure returns (uint256 amountIn) {\n if (amountOut == 0) {\n revert InsufficientOutputAmount();\n } else if (reserveIn == 0 || reserveOut == 0) {\n revert InsufficientLiquidity();\n }\n uint256 numerator = reserveIn * amountOut * 10000;\n uint256 denominator = (reserveOut - amountOut) * 9975;\n amountIn = (numerator / denominator) + 1;\n }\n\n /**\n * @notice Performs chained getAmountOut calculations on any number of pairs\n * @param factory Address of the pancake swap factory\n * @param amountIn The amount of tokens to swap.\n * @param path Array with addresses of the underlying assets to be swapped\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function getAmountsOut(\n address factory,\n uint256 amountIn,\n address[] memory path\n ) internal view returns (uint256[] memory amounts) {\n if (path.length <= 1) {\n revert InvalidPath();\n }\n amounts = new uint256[](path.length);\n amounts[0] = amountIn;\n for (uint256 i; i < path.length - 1; ) {\n (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]);\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\n unchecked {\n i += 1;\n }\n }\n }\n\n /**\n * @notice Performs chained getAmountIn calculations on any number of pairs\n * @param factory Address of the pancake swap factory\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function getAmountsIn(\n address factory,\n uint256 amountOut,\n address[] memory path\n ) internal view returns (uint256[] memory amounts) {\n if (path.length <= 1) {\n revert InvalidPath();\n }\n amounts = new uint256[](path.length);\n amounts[amounts.length - 1] = amountOut;\n for (uint256 i = path.length - 1; i > 0; ) {\n (uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]);\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\n unchecked {\n i -= 1;\n }\n }\n }\n}\n" + }, + "contracts/Swap/lib/TransferHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"../interfaces/CustomErrors.sol\";\n\n// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false\nlibrary TransferHelper {\n /**\n * @dev `value` as the allowance of `spender` over the caller's tokens.\n * @param token Address of the token\n * @param to Address of the spender\n * @param value Amount as allowance\n */\n function safeApprove(address token, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('approve(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeApproveFailed();\n }\n }\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 * @param token Address of the token\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransfer(address token, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('transfer(address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeTransferFailed();\n }\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 * @param token Address of the token\n * @param from Address of the asset'sowner\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransferFrom(address token, address from, address to, uint256 value) internal {\n // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));\n if (!(success && (data.length == 0 || abi.decode(data, (bool))))) {\n revert SafeTransferFromFailed();\n }\n }\n\n /**\n * @dev Transfer `value` amount of `BNB` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n * @param to Address of the receiver\n * @param value Amount need to transfer\n */\n function safeTransferBNB(address to, uint256 value) internal {\n (bool success, ) = to.call{ value: value }(new bytes(0));\n if (!success) {\n revert SafeTransferBNBFailed();\n }\n }\n}\n" + }, + "contracts/Swap/RouterHelper.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport \"./lib/PancakeLibrary.sol\";\nimport \"./interfaces/IWBNB.sol\";\nimport \"./lib/TransferHelper.sol\";\n\nimport \"./interfaces/CustomErrors.sol\";\nimport \"./IRouterHelper.sol\";\n\nabstract contract RouterHelper is IRouterHelper {\n /// @notice Select the type of Token for which either a supporting fee would be deducted or not at the time of transfer.\n enum TypesOfTokens {\n NON_SUPPORTING_FEE,\n SUPPORTING_FEE\n }\n\n /// @notice Address of WBNB contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WBNB;\n\n /// @notice Address of pancake swap factory contract.\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable factory;\n\n // **************\n // *** EVENTS ***\n // **************\n /// @notice This event is emitted whenever a successful swap (tokenA -> tokenB) occurs\n event SwapTokensForTokens(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (tokenA -> tokenB) occurs\n event SwapTokensForTokensAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @notice This event is emitted whenever a successful swap (BNB -> token) occurs\n event SwapBnbForTokens(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (BNB -> token) occurs\n event SwapBnbForTokensAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @notice This event is emitted whenever a successful swap (token -> BNB) occurs\n event SwapTokensForBnb(address indexed swapper, address[] indexed path, uint256[] indexed amounts);\n\n /// @notice This event is emitted whenever a successful swap (token -> BNB) occurs\n event SwapTokensForBnbAtSupportingFee(address indexed swapper, address[] indexed path);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address WBNB_, address factory_) {\n if (WBNB_ == address(0) || factory_ == address(0)) {\n revert ZeroAddress();\n }\n WBNB = WBNB_;\n factory = factory_;\n }\n\n /**\n * @notice Perform swap on the path(pairs)\n * @param amounts Araay of amounts of tokens after performing the swap\n * @param path Array with addresses of the underlying assets to be swapped\n * @param _to Recipient of the output tokens.\n */\n function _swap(uint256[] memory amounts, address[] memory path, address _to) internal virtual {\n for (uint256 i; i < path.length - 1; ) {\n (address input, address output) = (path[i], path[i + 1]);\n (address token0, ) = PancakeLibrary.sortTokens(input, output);\n uint256 amountOut = amounts[i + 1];\n (uint256 amount0Out, uint256 amount1Out) = input == token0\n ? (uint256(0), amountOut)\n : (amountOut, uint256(0));\n address to = i < path.length - 2 ? PancakeLibrary.pairFor(factory, output, path[i + 2]) : _to;\n IPancakePair(PancakeLibrary.pairFor(factory, input, output)).swap(amount0Out, amount1Out, to, new bytes(0));\n unchecked {\n i += 1;\n }\n }\n }\n\n // **** SWAP (supporting fee-on-transfer tokens) ****\n\n /**\n * @notice Perform swap on the path(pairs) for supporting fee\n * @dev requires the initial amount to have already been sent to the first pair\n * @param path Array with addresses of the underlying assets to be swapped\n * @param _to Recipient of the output tokens.\n */\n function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {\n for (uint256 i; i < path.length - 1; ) {\n (address input, address output) = (path[i], path[i + 1]);\n (address token0, ) = PancakeLibrary.sortTokens(input, output);\n IPancakePair pair = IPancakePair(PancakeLibrary.pairFor(factory, input, output));\n uint256 amountInput;\n uint256 amountOutput;\n {\n // scope to avoid stack too deep errors\n (uint256 reserve0, uint256 reserve1, ) = pair.getReserves();\n (uint256 reserveInput, uint256 reserveOutput) = input == token0\n ? (reserve0, reserve1)\n : (reserve1, reserve0);\n\n uint256 balance = IERC20(input).balanceOf(address(pair));\n amountInput = balance - reserveInput;\n amountOutput = PancakeLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);\n }\n (uint256 amount0Out, uint256 amount1Out) = input == token0\n ? (uint256(0), amountOutput)\n : (amountOutput, uint256(0));\n address to = i < path.length - 2 ? PancakeLibrary.pairFor(factory, output, path[i + 2]) : _to;\n pair.swap(amount0Out, amount1Out, to, new bytes(0));\n unchecked {\n i += 1;\n }\n }\n }\n\n /**\n * @notice Swap token A for token B\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n address pairAddress = PancakeLibrary.pairFor(factory, path[0], path[1]);\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, amountIn, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n TransferHelper.safeTransferFrom(path[0], msg.sender, pairAddress, amounts[0]);\n _swap(amounts, path, to);\n emit SwapTokensForTokens(msg.sender, path, amounts);\n } else {\n TransferHelper.safeTransferFrom(path[0], msg.sender, pairAddress, amountIn);\n _swapSupportingFeeOnTransferTokens(path, to);\n emit SwapTokensForTokensAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap exact BNB for token\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n address wBNBAddress = WBNB;\n if (path[0] != wBNBAddress) {\n revert WrongAddress(wBNBAddress, path[0]);\n }\n IWBNB(wBNBAddress).deposit{ value: msg.value }();\n TransferHelper.safeTransfer(wBNBAddress, PancakeLibrary.pairFor(factory, path[0], path[1]), msg.value);\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, msg.value, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n _swap(amounts, path, to);\n emit SwapBnbForTokens(msg.sender, path, amounts);\n } else {\n _swapSupportingFeeOnTransferTokens(path, to);\n emit SwapBnbForTokensAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap token A for BNB\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of BNB to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param swapFor TypesOfTokens, either supporing fee or non supporting fee\n * @return amounts Array of amounts after performing swap for respective pairs in path\n */\n function _swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n TypesOfTokens swapFor\n ) internal returns (uint256[] memory amounts) {\n if (path[path.length - 1] != WBNB) {\n revert WrongAddress(WBNB, path[path.length - 1]);\n }\n uint256 WBNBAmount;\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n amounts = PancakeLibrary.getAmountsOut(factory, amountIn, path);\n if (amounts[amounts.length - 1] < amountOutMin) {\n revert OutputAmountBelowMinimum(amounts[amounts.length - 1], amountOutMin);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, address(this));\n WBNBAmount = amounts[amounts.length - 1];\n } else {\n uint256 balanceBefore = IWBNB(WBNB).balanceOf(address(this));\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amountIn\n );\n _swapSupportingFeeOnTransferTokens(path, address(this));\n uint256 balanceAfter = IWBNB(WBNB).balanceOf(address(this));\n WBNBAmount = balanceAfter - balanceBefore;\n }\n IWBNB(WBNB).withdraw(WBNBAmount);\n if (to != address(this)) {\n TransferHelper.safeTransferBNB(to, WBNBAmount);\n }\n if (swapFor == TypesOfTokens.NON_SUPPORTING_FEE) {\n emit SwapTokensForBnb(msg.sender, path, amounts);\n } else {\n emit SwapTokensForBnbAtSupportingFee(msg.sender, path);\n }\n }\n\n /**\n * @notice Swap token A for exact amount of token B\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > amountInMax) {\n revert InputAmountAboveMaximum(amounts[0], amountInMax);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, to);\n emit SwapTokensForTokens(msg.sender, path, amounts);\n }\n\n /**\n * @notice Swap BNB for exact amount of token B\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n if (path[0] != WBNB) {\n revert WrongAddress(WBNB, path[0]);\n }\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > msg.value) {\n revert ExcessiveInputAmount(amounts[0], msg.value);\n }\n IWBNB(WBNB).deposit{ value: amounts[0] }();\n TransferHelper.safeTransfer(WBNB, PancakeLibrary.pairFor(factory, path[0], path[1]), amounts[0]);\n _swap(amounts, path, to);\n // refund dust BNB, if any\n if (msg.value > amounts[0]) TransferHelper.safeTransferBNB(msg.sender, msg.value - amounts[0]);\n emit SwapBnbForTokens(msg.sender, path, amounts);\n }\n\n /**\n * @notice Swap token A for exact BNB\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @return amounts Array of amounts after performing swap for respective pairs in path\n **/\n function _swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to\n ) internal returns (uint256[] memory amounts) {\n if (path[path.length - 1] != WBNB) {\n revert WrongAddress(WBNB, path[path.length - 1]);\n }\n amounts = PancakeLibrary.getAmountsIn(factory, amountOut, path);\n if (amounts[0] > amountInMax) {\n revert InputAmountAboveMaximum(amounts[amounts.length - 1], amountInMax);\n }\n TransferHelper.safeTransferFrom(\n path[0],\n msg.sender,\n PancakeLibrary.pairFor(factory, path[0], path[1]),\n amounts[0]\n );\n _swap(amounts, path, address(this));\n IWBNB(WBNB).withdraw(amounts[amounts.length - 1]);\n if (to != address(this)) {\n TransferHelper.safeTransferBNB(to, amounts[amounts.length - 1]);\n }\n emit SwapTokensForBnb(msg.sender, path, amounts);\n }\n\n // **** LIBRARY FUNCTIONS ****\n\n /**\n * @notice Given some amount of an asset and pair reserves, returns an equivalent amount of the other asset\n * @param amountA The amount of token A\n * @param reserveA The amount of reserves for token A before swap\n * @param reserveB The amount of reserves for token B before swap\n * @return amountB An equivalent amount of the token B\n **/\n function quote(\n uint256 amountA,\n uint256 reserveA,\n uint256 reserveB\n ) external pure virtual override returns (uint256 amountB) {\n return PancakeLibrary.quote(amountA, reserveA, reserveB);\n }\n\n /**\n * @notice Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\n * @param amountIn The amount of token A need to swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountOut The maximum output amount of the token B\n **/\n function getAmountOut(\n uint256 amountIn,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure virtual override returns (uint256 amountOut) {\n return PancakeLibrary.getAmountOut(amountIn, reserveIn, reserveOut);\n }\n\n /**\n * @notice Given an output amount of an asset and pair reserves, returns a required input amount of the other asset\n * @param amountOut The amount of token B after swap\n * @param reserveIn The amount of reserves for token A before swap\n * @param reserveOut The amount of reserves for token B after swap\n * @return amountIn Required input amount of the token A\n **/\n function getAmountIn(\n uint256 amountOut,\n uint256 reserveIn,\n uint256 reserveOut\n ) external pure virtual override returns (uint256 amountIn) {\n return PancakeLibrary.getAmountIn(amountOut, reserveIn, reserveOut);\n }\n\n /**\n * @notice performs chained getAmountOut calculations on any number of pairs.\n * @param amountIn The amount of tokens to swap.\n * @param path Array with addresses of the underlying assets to be swapped.\n */\n function getAmountsOut(\n uint256 amountIn,\n address[] memory path\n ) external view virtual override returns (uint256[] memory amounts) {\n return PancakeLibrary.getAmountsOut(factory, amountIn, path);\n }\n\n /**\n * @notice performs chained getAmountIn calculations on any number of pairs.\n * @param amountOut amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped.\n */\n function getAmountsIn(\n uint256 amountOut,\n address[] memory path\n ) external view virtual override returns (uint256[] memory amounts) {\n return PancakeLibrary.getAmountsIn(factory, amountOut, path);\n }\n}\n" + }, + "contracts/Swap/SwapRouter.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.25;\n\nimport \"@openzeppelin/contracts/access/Ownable2Step.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\n\nimport \"./interfaces/IPancakeSwapV2Router.sol\";\nimport \"./interfaces/IVtoken.sol\";\nimport \"./RouterHelper.sol\";\nimport \"./interfaces/IVBNB.sol\";\nimport \"./interfaces/IVtoken.sol\";\nimport \"./interfaces/InterfaceComptroller.sol\";\n\n/**\n * @title Venus's Pancake Swap Integration Contract\n * @notice This contracts allows users to swap a token for another one and supply/repay with the latter.\n * @dev For all functions that do not swap native BNB, user must approve this contract with the amount, prior the calling the swap function.\n * @author 0xlucian\n */\n\ncontract SwapRouter is Ownable2Step, RouterHelper, IPancakeSwapV2Router {\n using SafeERC20 for IERC20;\n\n address public immutable comptrollerAddress;\n\n uint256 private constant _NOT_ENTERED = 1;\n\n uint256 private constant _ENTERED = 2;\n\n address public vBNBAddress;\n\n /**\n * @dev Guard variable for re-entrancy checks\n */\n uint256 internal _status;\n\n // ***************\n // ** MODIFIERS **\n // ***************\n modifier ensure(uint256 deadline) {\n if (deadline < block.timestamp) {\n revert SwapDeadlineExpire(deadline, block.timestamp);\n }\n _;\n }\n\n modifier ensurePath(address[] calldata path) {\n if (path.length < 2) {\n revert InvalidPath();\n }\n _;\n }\n\n /**\n * @dev Prevents a contract from calling itself, directly or indirectly.\n */\n modifier nonReentrant() {\n if (_status == _ENTERED) {\n revert ReentrantCheck();\n }\n _status = _ENTERED;\n _;\n _status = _NOT_ENTERED;\n }\n\n /// @notice event emitted on sweep token success\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n\n /// @notice event emitted on vBNBAddress update\n event VBNBAddressUpdated(address indexed oldAddress, address indexed newAddress);\n\n // *********************\n // **** CONSTRUCTOR ****\n // *********************\n\n /// @notice Constructor for the implementation contract. Sets immutable variables.\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address WBNB_,\n address factory_,\n address _comptrollerAddress,\n address _vBNBAddress\n ) RouterHelper(WBNB_, factory_) {\n if (_comptrollerAddress == address(0) || _vBNBAddress == address(0)) {\n revert ZeroAddress();\n }\n comptrollerAddress = _comptrollerAddress;\n _status = _NOT_ENTERED;\n vBNBAddress = _vBNBAddress;\n }\n\n receive() external payable {\n assert(msg.sender == WBNB); // only accept BNB via fallback from the WBNB contract\n }\n\n // ****************************\n // **** EXTERNAL FUNCTIONS ****\n // ****************************\n\n /**\n * @notice Setter for the vBNB address.\n * @param _vBNBAddress Address of the BNB vToken to update.\n */\n function setVBNBAddress(address _vBNBAddress) external onlyOwner {\n if (_vBNBAddress == address(0)) {\n revert ZeroAddress();\n }\n\n _isVTokenListed(_vBNBAddress);\n\n address oldAddress = vBNBAddress;\n vBNBAddress = _vBNBAddress;\n\n emit VBNBAddressUpdated(oldAddress, vBNBAddress);\n }\n\n /**\n * @notice Swap token A for token B and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n */\n function swapExactTokensForTokensAndSupply(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap deflationary (a small amount of fee is deducted at the time of transfer of token) token A for token B and supply to a Venus market.\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n */\n function swapExactTokensForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another token and supply to a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactBNBForTokensAndSupply(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another deflationary token (a small amount of fee is deducted at the time of transfer of token) and supply to a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactBNBForTokensAndSupplyAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact tokens and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and supply to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForExactTokensAndSupply(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _supply(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap Exact tokens for BNB and supply to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndSupply(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap Exact deflationary tokens (a small amount of fee is deducted at the time of transfer of tokens) for BNB and supply to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndSupplyAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and supply to a Venus market\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactBNBAndSupply(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n _mintVBNBandTransfer(swapAmount);\n }\n\n /**\n * @notice Swap token A for token B and repay a borrow from a Venus market\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive (and repay)\n */\n function swapExactTokensForTokensAndRepay(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap deflationary token (a small amount of fee is deducted at the time of transfer of token) token A for token B and repay a borrow from a Venus market\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive (and repay)\n */\n function swapExactTokensForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactTokensForTokens(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another token and repay a borrow from a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered so the swap path tokens are listed first and last asset is the token we receive\n */\n function swapExactBNBForTokensAndRepay(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for another deflationary token (a small amount of fee is deducted at the time of transfer of token) and repay a borrow from a Venus market\n * @dev The amount to be swapped is obtained from the msg.value, since we are swapping BNB\n * @param vTokenAddress The address of the vToken contract to repay.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered so the swap path tokens are listed first and last asset is the token we receive\n */\n function swapExactBNBForTokensAndRepayAtSupportingFee(\n address vTokenAddress,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapExactBNBForTokens(amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, address(this));\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap tokens for full tokens debt and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForFullTokenDebtAndRepay(\n address vTokenAddress,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n uint256 amountOut = IVToken(vTokenAddress).borrowBalanceCurrent(msg.sender);\n _swapTokensForExactTokens(amountOut, amountInMax, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForExactTokensAndRepay(\n address vTokenAddress,\n uint256 amountOut,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap BNB for Exact tokens and repay to a Venus market\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapBNBForFullTokenDebtAndRepay(\n address vTokenAddress,\n address[] calldata path,\n uint256 deadline\n ) external payable override nonReentrant ensure(deadline) ensurePath(path) {\n _ensureVTokenChecks(vTokenAddress, path[path.length - 1]);\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(address(this));\n uint256 amountOut = IVToken(vTokenAddress).borrowBalanceCurrent(msg.sender);\n _swapBNBForExactTokens(amountOut, path, address(this));\n uint256 swapAmount = _getSwapAmount(lastAsset, balanceBefore);\n _repay(lastAsset, vTokenAddress, swapAmount);\n }\n\n /**\n * @notice Swap Exact tokens for BNB and repay to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndRepay(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.NON_SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap Exact deflationary tokens (a small amount of fee is deducted at the time of transfer of tokens) for BNB and repay to a Venus market\n * @param amountIn The amount of tokens to swap.\n * @param amountOutMin Minimum amount of tokens to receive.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapExactTokensForBNBAndRepayAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, address(this), TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and repay to a Venus market\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForExactBNBAndRepay(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swap tokens for Exact BNB and repay to a Venus market\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param deadline Unix timestamp after which the transaction will revert.\n * @dev Addresses of underlying assets should be ordered that first asset is the token we are swapping and second asset is the token we receive\n * @dev In case of swapping native BNB the first asset in path array should be the wBNB address\n */\n function swapTokensForFullBNBDebtAndRepay(\n uint256 amountInMax,\n address[] calldata path,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) {\n uint256 balanceBefore = address(this).balance;\n uint256 amountOut = IVToken(vBNBAddress).borrowBalanceCurrent(msg.sender);\n _swapTokensForExactBNB(amountOut, amountInMax, path, address(this));\n uint256 balanceAfter = address(this).balance;\n uint256 swapAmount = balanceAfter - balanceBefore;\n IVBNB(vBNBAddress).repayBorrowBehalf{ value: swapAmount }(msg.sender);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output tokens as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForTokens(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapExactTokensForTokens(amountIn, amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output tokens as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForTokensAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(to);\n _swapExactTokensForTokens(amountIn, amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, to);\n }\n\n /**\n * @notice Swaps an exact amount of BNB for as many output tokens as possible,\n * along the route determined by the path. The first element of path must be WBNB,\n * the last is the output token, and any intermediate elements represent\n * intermediate pairs to trade through (if, for example, a direct pair does not exist).\n * @dev amountIn is passed through the msg.value of the transaction\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactBNBForTokens(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n )\n external\n payable\n virtual\n override\n nonReentrant\n ensure(deadline)\n ensurePath(path)\n returns (uint256[] memory amounts)\n {\n amounts = _swapExactBNBForTokens(amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of ETH for as many output tokens as possible,\n * along the route determined by the path. The first element of path must be WBNB,\n * the last is the output token, and any intermediate elements represent\n * intermediate pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev amountIn is passed through the msg.value of the transaction\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactBNBForTokensAtSupportingFee(\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external payable virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n address lastAsset = path[path.length - 1];\n uint256 balanceBefore = IERC20(lastAsset).balanceOf(to);\n _swapExactBNBForTokens(amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n swapAmount = _checkForAmountOut(lastAsset, balanceBefore, amountOutMin, to);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output ETH as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForBNB(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapExactTokensForBNB(amountIn, amountOutMin, path, to, TypesOfTokens.NON_SUPPORTING_FEE);\n }\n\n /**\n * @notice Swaps an exact amount of input tokens for as many output ETH as possible,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * This method to swap deflationary tokens which would require supporting fee.\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountIn The address of the vToken contract to repay.\n * @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n */\n function swapExactTokensForBNBAtSupportingFee(\n uint256 amountIn,\n uint256 amountOutMin,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external override nonReentrant ensure(deadline) ensurePath(path) returns (uint256 swapAmount) {\n uint256 balanceBefore = to.balance;\n _swapExactTokensForBNB(amountIn, amountOutMin, path, to, TypesOfTokens.SUPPORTING_FEE);\n uint256 balanceAfter = to.balance;\n swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n }\n\n /**\n * @notice Swaps an as many amount of input tokens for as exact amount of tokens as output,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapTokensForExactTokens(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapTokensForExactTokens(amountOut, amountInMax, path, to);\n }\n\n /**\n * @notice Swaps an as ETH as input tokens for as exact amount of tokens as output,\n * along the route determined by the path. The first element of path is the input WBNB,\n * the last is the output as token, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapBNBForExactTokens(\n uint256 amountOut,\n address[] calldata path,\n address to,\n uint256 deadline\n )\n external\n payable\n virtual\n override\n nonReentrant\n ensure(deadline)\n ensurePath(path)\n returns (uint256[] memory amounts)\n {\n amounts = _swapBNBForExactTokens(amountOut, path, to);\n }\n\n /**\n * @notice Swaps an as many amount of input tokens for as exact amount of ETH as output,\n * along the route determined by the path. The first element of path is the input token,\n * the last is the output as ETH, and any intermediate elements represent intermediate\n * pairs to trade through (if, for example, a direct pair does not exist).\n * @dev msg.sender should have already given the router an allowance of at least amountIn on the input token.\n * @param amountOut The amount of the tokens needs to be as output token.\n * @param amountInMax The maximum amount of input tokens that can be taken for the transaction not to revert.\n * @param path Array with addresses of the underlying assets to be swapped\n * @param to Recipient of the output tokens.\n * @param deadline Unix timestamp after which the transaction will revert.\n **/\n function swapTokensForExactBNB(\n uint256 amountOut,\n uint256 amountInMax,\n address[] calldata path,\n address to,\n uint256 deadline\n ) external virtual override nonReentrant ensure(deadline) ensurePath(path) returns (uint256[] memory amounts) {\n amounts = _swapTokensForExactBNB(amountOut, amountInMax, path, to);\n }\n\n /**\n * @notice A public function to sweep accidental BEP-20 transfers to this contract. Tokens are sent to the address `to`, provided in input\n * @param token The address of the ERC-20 token to sweep\n * @param to Recipient of the output tokens.\n * @param sweepAmount The ampunt of the tokens to sweep\n * @custom:access Only Governance\n */\n function sweepToken(IERC20 token, address to, uint256 sweepAmount) external onlyOwner nonReentrant {\n if (to == address(0)) {\n revert ZeroAddress();\n }\n uint256 balance = token.balanceOf(address(this));\n if (sweepAmount > balance) {\n revert InsufficientBalance(sweepAmount, balance);\n }\n token.safeTransfer(to, sweepAmount);\n\n emit SweepToken(address(token), to, sweepAmount);\n }\n\n /**\n * @notice Supply token to a Venus market\n * @param path The addresses of the underlying token\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param swapAmount The amount of tokens supply to Venus Market.\n */\n function _supply(address path, address vTokenAddress, uint256 swapAmount) internal {\n TransferHelper.safeApprove(path, vTokenAddress, 0);\n TransferHelper.safeApprove(path, vTokenAddress, swapAmount);\n uint256 response = IVToken(vTokenAddress).mintBehalf(msg.sender, swapAmount);\n if (response != 0) {\n revert SupplyError(msg.sender, vTokenAddress, response);\n }\n }\n\n /**\n * @notice Repay a borrow from Venus market\n * @param path The addresses of the underlying token\n * @param vTokenAddress The address of the vToken contract for supplying assets.\n * @param swapAmount The amount of tokens repay to Venus Market.\n */\n function _repay(address path, address vTokenAddress, uint256 swapAmount) internal {\n TransferHelper.safeApprove(path, vTokenAddress, 0);\n TransferHelper.safeApprove(path, vTokenAddress, swapAmount);\n uint256 response = IVToken(vTokenAddress).repayBorrowBehalf(msg.sender, swapAmount);\n if (response != 0) {\n revert RepayError(msg.sender, vTokenAddress, response);\n }\n }\n\n /**\n * @notice Check if the balance of to minus the balanceBefore is greater or equal to the amountOutMin.\n * @param asset The address of the underlying token\n * @param balanceBefore Balance before the swap.\n * @param amountOutMin Min amount out threshold.\n * @param to Recipient of the output tokens.\n */\n function _checkForAmountOut(\n address asset,\n uint256 balanceBefore,\n uint256 amountOutMin,\n address to\n ) internal view returns (uint256 swapAmount) {\n uint256 balanceAfter = IERC20(asset).balanceOf(to);\n swapAmount = balanceAfter - balanceBefore;\n if (swapAmount < amountOutMin) {\n revert SwapAmountLessThanAmountOutMin(swapAmount, amountOutMin);\n }\n }\n\n /**\n * @notice Returns the difference between the balance of this and the balanceBefore\n * @param asset The address of the underlying token\n * @param balanceBefore Balance before the swap.\n */\n function _getSwapAmount(address asset, uint256 balanceBefore) internal view returns (uint256 swapAmount) {\n uint256 balanceAfter = IERC20(asset).balanceOf(address(this));\n swapAmount = balanceAfter - balanceBefore;\n }\n\n /**\n * @notice Check isVTokenListed and last address in the path should be vToken underlying.\n * @param vTokenAddress Address of the vToken.\n * @param underlying Address of the underlying asset.\n */\n function _ensureVTokenChecks(address vTokenAddress, address underlying) internal {\n _isVTokenListed(vTokenAddress);\n if (IVToken(vTokenAddress).underlying() != underlying) {\n revert VTokenUnderlyingInvalid(underlying);\n }\n }\n\n /**\n * @notice Check is vToken listed in the pool.\n * @param vToken Address of the vToken.\n */\n function _isVTokenListed(address vToken) internal view {\n bool isListed = InterfaceComptroller(comptrollerAddress).markets(vToken);\n if (!isListed) {\n revert VTokenNotListed(vToken);\n }\n }\n\n /**\n * @notice Mint vBNB tokens to the market then transfer them to user\n * @param swapAmount Swapped BNB amount\n */\n function _mintVBNBandTransfer(uint256 swapAmount) internal {\n uint256 vBNBBalanceBefore = IVBNB(vBNBAddress).balanceOf(address(this));\n IVBNB(vBNBAddress).mint{ value: swapAmount }();\n uint256 vBNBBalanceAfter = IVBNB(vBNBAddress).balanceOf(address(this));\n IERC20(vBNBAddress).safeTransfer(msg.sender, (vBNBBalanceAfter - vBNBBalanceBefore));\n }\n}\n" + }, + "contracts/test/AccessControlManagerMock.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\ncontract AccessControlManagerMock {\n address public owner;\n\n constructor(address _owner) {\n owner = _owner;\n }\n\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\n if (account == owner) {\n return true;\n }\n\n functionSig;\n\n return false;\n }\n}\n" + }, + "contracts/test/LiquidatorHarness.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Liquidator/Liquidator.sol\";\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\n\ncontract LiquidatorHarness is Liquidator {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address comptroller_, address payable vBnb_, address wBnb_) Liquidator(comptroller_, vBnb_, wBnb_) {}\n\n function initialize(\n uint256 liquidationIncentiveMantissa_,\n address accessControlManager_,\n address protocolShareReserve_\n ) external override initializer {\n __Liquidator_init(liquidationIncentiveMantissa_, accessControlManager_, protocolShareReserve_);\n }\n\n event DistributeLiquidationIncentive(uint256 seizeTokensForTreasury, uint256 seizeTokensForLiquidator);\n\n /// @dev Splits the received vTokens between the liquidator and treasury.\n function distributeLiquidationIncentive(\n IVToken vTokenCollateral,\n uint256 siezedAmount\n ) public returns (uint256 ours, uint256 theirs) {\n (ours, theirs) = super._distributeLiquidationIncentive(vTokenCollateral, siezedAmount);\n emit DistributeLiquidationIncentive(ours, theirs);\n return (ours, theirs);\n }\n\n /// @dev Computes the amounts that would go to treasury and to the liquidator.\n function splitLiquidationIncentive(uint256 seizedAmount) public view returns (uint256 ours, uint256 theirs) {\n return super._splitLiquidationIncentive(seizedAmount);\n }\n}\n" + }, + "contracts/test/MockProtocolShareReserve.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ReentrancyGuardUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\n\ninterface IIncomeDestination {\n function updateAssetsState(address comptroller, address asset) external;\n}\n\ninterface IVToken {\n function underlying() external view returns (address);\n}\n\ninterface IPrime is IIncomeDestination {\n function accrueInterest(address vToken) external;\n\n function vTokenForAsset(address asset) external view returns (address);\n\n function getAllMarkets() external view returns (address[] memory);\n}\n\ninterface IPoolRegistry {\n /// @notice Get VToken in the Pool for an Asset\n function getVTokenForAsset(address comptroller, address asset) external view returns (address);\n\n /// @notice Get the addresss of the Pools supported that include a market for the provided asset\n function getPoolsSupportedByAsset(address asset) external view returns (address[] memory);\n}\n\ninterface IMockProtocolShareReserve {\n /// @notice it represents the type of vToken income\n enum IncomeType {\n SPREAD,\n LIQUIDATION\n }\n\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\n}\n\ninterface IComptroller {\n function isComptroller() external view returns (bool);\n\n function markets(address) external view returns (bool);\n\n function getAllMarkets() external view returns (address[] memory);\n}\n\nerror InvalidAddress();\nerror UnsupportedAsset();\nerror InvalidTotalPercentage();\nerror InvalidMaxLoopsLimit();\n\n/**\n * @title MaxLoopsLimitHelper\n * @author Venus\n * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.\n */\nabstract contract MaxLoopsLimitHelper {\n // Limit for the loops to avoid the DOS\n uint256 public maxLoopsLimit;\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 max loops limit is set\n event MaxLoopsLimitUpdated(uint256 oldMaxLoopsLimit, uint256 newmaxLoopsLimit);\n\n /// @notice Thrown an error on maxLoopsLimit exceeds for any loop\n error MaxLoopsLimitExceeded(uint256 loopsLimit, uint256 requiredLoops);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param limit Limit for the max loops can execute at a time\n */\n function _setMaxLoopsLimit(uint256 limit) internal {\n require(limit > maxLoopsLimit, \"Comptroller: Invalid maxLoopsLimit\");\n\n uint256 oldMaxLoopsLimit = maxLoopsLimit;\n maxLoopsLimit = limit;\n\n emit MaxLoopsLimitUpdated(oldMaxLoopsLimit, limit);\n }\n\n /**\n * @notice Compare the maxLoopsLimit with number of the times loop iterate\n * @param len Length of the loops iterate\n * @custom:error MaxLoopsLimitExceeded error is thrown when loops length exceeds maxLoopsLimit\n */\n function _ensureMaxLoops(uint256 len) internal view {\n if (len > maxLoopsLimit) {\n revert MaxLoopsLimitExceeded(maxLoopsLimit, len);\n }\n }\n}\n\ncontract MockProtocolShareReserve is\n AccessControlledV8,\n ReentrancyGuardUpgradeable,\n MaxLoopsLimitHelper,\n IMockProtocolShareReserve\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice protocol income is categorized into two schemas.\n /// The first schema is the default one\n /// The second schema is for spread income from prime markets in core protocol\n enum Schema {\n DEFAULT,\n SPREAD_PRIME_CORE\n }\n\n struct DistributionConfig {\n Schema schema;\n /// @dev percenatge is represented without any scale\n uint256 percentage;\n address destination;\n }\n\n /// @notice address of core pool comptroller contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable CORE_POOL_COMPTROLLER;\n\n /// @notice address of WBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WBNB;\n\n /// @notice address of vBNB contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable vBNB;\n\n /// @notice address of Prime contract\n address public prime;\n\n /// @notice address of pool registry contract\n address public poolRegistry;\n\n uint256 private constant MAX_PERCENT = 100;\n\n /// @notice comptroller => asset => schema => balance\n mapping(address => mapping(address => mapping(Schema => uint256))) public assetsReserves;\n\n /// @notice asset => balance\n mapping(address => uint256) public totalAssetReserve;\n\n /// @notice configuration for different income distribution targets\n DistributionConfig[] public distributionTargets;\n\n /// @notice Emitted when pool registry address is updated\n event PoolRegistryUpdated(address indexed oldPoolRegistry, address indexed newPoolRegistry);\n\n /// @notice Emitted when prime address is updated\n event PrimeUpdated(address indexed oldPrime, address indexed newPrime);\n\n /// @notice Event emitted after the updation of the assets reserves.\n event AssetsReservesUpdated(\n address indexed comptroller,\n address indexed asset,\n uint256 amount,\n IncomeType incomeType,\n Schema schema\n );\n\n /// @notice Event emitted when an asset is released to a target\n event AssetReleased(\n address indexed destination,\n address indexed asset,\n Schema schema,\n uint256 percent,\n uint256 amount\n );\n\n /// @notice Event emitted when asset reserves state is updated\n event ReservesUpdated(\n address indexed comptroller,\n address indexed asset,\n Schema schema,\n uint256 oldBalance,\n uint256 newBalance\n );\n\n /// @notice Event emitted when distribution configuration is updated\n event DistributionConfigUpdated(\n address indexed destination,\n uint256 oldPercentage,\n uint256 newPercentage,\n Schema schema\n );\n\n /// @notice Event emitted when distribution configuration is added\n event DistributionConfigAdded(address indexed destination, uint256 percentage, Schema schema);\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(address _corePoolComptroller, address _wbnb, address _vbnb) {\n if (_corePoolComptroller == address(0)) revert InvalidAddress();\n if (_wbnb == address(0)) revert InvalidAddress();\n if (_vbnb == address(0)) revert InvalidAddress();\n\n CORE_POOL_COMPTROLLER = _corePoolComptroller;\n WBNB = _wbnb;\n vBNB = _vbnb;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /**\n * @dev Initializes the deployer to owner.\n * @param _accessControlManager The address of ACM contract\n * @param _loopsLimit Limit for the loops in the contract to avoid DOS\n */\n function initialize(address _accessControlManager, uint256 _loopsLimit) external initializer {\n __AccessControlled_init(_accessControlManager);\n __ReentrancyGuard_init();\n _setMaxLoopsLimit(_loopsLimit);\n }\n\n /**\n * @dev Pool registry setter.\n * @param _poolRegistry Address of the pool registry\n * @custom:error ZeroAddressNotAllowed is thrown when pool registry address is zero\n */\n function setPoolRegistry(address _poolRegistry) external onlyOwner {\n if (_poolRegistry == address(0)) revert InvalidAddress();\n emit PoolRegistryUpdated(poolRegistry, _poolRegistry);\n poolRegistry = _poolRegistry;\n }\n\n /**\n * @dev Prime contract address setter.\n * @param _prime Address of the prime contract\n */\n function setPrime(address _prime) external onlyOwner {\n if (_prime == address(0)) revert InvalidAddress();\n emit PrimeUpdated(prime, _prime);\n prime = _prime;\n }\n\n /**\n * @dev Add or update destination targets based on destination address\n * @param configs configurations of the destinations.\n */\n function addOrUpdateDistributionConfigs(DistributionConfig[] memory configs) external nonReentrant {\n _checkAccessAllowed(\"addOrUpdateDistributionConfigs(DistributionConfig[])\");\n\n //we need to accrue and release funds to prime before updating the distribution configuration\n //because prime relies on getUnreleasedFunds and its return value may change after config update\n _accrueAndReleaseFundsToPrime();\n for (uint256 i = 0; i < configs.length; ) {\n DistributionConfig memory _config = configs[i];\n require(_config.destination != address(0), \"ProtocolShareReserve: Destination address invalid\");\n\n bool updated = false;\n for (uint256 j = 0; j < distributionTargets.length; ) {\n DistributionConfig storage config = distributionTargets[j];\n\n if (_config.schema == config.schema && config.destination == _config.destination) {\n emit DistributionConfigUpdated(\n _config.destination,\n config.percentage,\n _config.percentage,\n _config.schema\n );\n config.percentage = _config.percentage;\n updated = true;\n break;\n }\n\n unchecked {\n ++j;\n }\n }\n\n if (!updated) {\n distributionTargets.push(_config);\n emit DistributionConfigAdded(_config.destination, _config.percentage, _config.schema);\n }\n\n unchecked {\n ++i;\n }\n }\n\n _ensurePercentages();\n _ensureMaxLoops(distributionTargets.length);\n }\n\n /**\n * @dev Release funds\n * @param comptroller the comptroller address of the pool\n * @param assets assets to be released to distribution targets\n */\n function releaseFunds(address comptroller, address[] memory assets) external nonReentrant {\n _accruePrimeInterest();\n\n for (uint256 i = 0; i < assets.length; ) {\n _releaseFund(comptroller, assets[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Used to find out the amount of funds that's going to be released when release funds is called.\n * @param comptroller the comptroller address of the pool\n * @param schema the schema of the distribution target\n * @param destination the destination address of the distribution target\n * @param asset the asset address which will be released\n */\n function getUnreleasedFunds(\n address comptroller,\n Schema schema,\n address destination,\n address asset\n ) external view returns (uint256) {\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig storage _config = distributionTargets[i];\n if (_config.schema == schema && _config.destination == destination) {\n uint256 total = assetsReserves[comptroller][asset][schema];\n return (total * _config.percentage) / MAX_PERCENT;\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Returns the total number of distribution targets\n */\n function totalDistributions() external view returns (uint256) {\n return distributionTargets.length;\n }\n\n /**\n * @dev Update the reserve of the asset for the specific pool after transferring to the protocol share reserve.\n * @param comptroller Comptroller address (pool)\n * @param asset Asset address.\n * @param incomeType type of income\n */\n function updateAssetsState(\n address comptroller,\n address asset,\n IncomeType incomeType\n ) public override(IMockProtocolShareReserve) nonReentrant {\n if (!IComptroller(comptroller).isComptroller()) revert InvalidAddress();\n if (asset == address(0)) revert InvalidAddress();\n if (\n comptroller != CORE_POOL_COMPTROLLER &&\n IPoolRegistry(poolRegistry).getVTokenForAsset(comptroller, asset) == address(0)\n ) revert InvalidAddress();\n\n Schema schema = getSchema(comptroller, asset, incomeType);\n uint256 currentBalance = IERC20Upgradeable(asset).balanceOf(address(this));\n uint256 assetReserve = totalAssetReserve[asset];\n\n if (currentBalance > assetReserve) {\n uint256 balanceDifference;\n unchecked {\n balanceDifference = currentBalance - assetReserve;\n }\n\n assetsReserves[comptroller][asset][schema] += balanceDifference;\n totalAssetReserve[asset] += balanceDifference;\n emit AssetsReservesUpdated(comptroller, asset, balanceDifference, incomeType, schema);\n }\n }\n\n /**\n * @dev Fetches the list of prime markets and then accrues interest and\n * releases the funds to prime for each market\n */\n function _accrueAndReleaseFundsToPrime() internal {\n address[] memory markets = IPrime(prime).getAllMarkets();\n for (uint256 i = 0; i < markets.length; ) {\n address market = markets[i];\n IPrime(prime).accrueInterest(market);\n _releaseFund(CORE_POOL_COMPTROLLER, _getUnderlying(market));\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev Fetches the list of prime markets and then accrues interest\n * to prime for each market\n */\n function _accruePrimeInterest() internal {\n // address[] memory markets = IPrime(prime).getAllMarkets();\n address[] memory markets = IPrime(prime).getAllMarkets();\n\n for (uint256 i = 0; i < markets.length; ) {\n address market = markets[i];\n IPrime(prime).accrueInterest(market);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @dev asset from a particular pool to be release to distribution targets\n * @param comptroller Comptroller address(pool)\n * @param asset Asset address.\n */\n function _releaseFund(address comptroller, address asset) internal {\n uint256 totalSchemas = uint256(type(Schema).max) + 1;\n uint256[] memory schemaBalances = new uint256[](totalSchemas);\n uint256 totalBalance;\n for (uint256 schemaValue; schemaValue < totalSchemas; ) {\n schemaBalances[schemaValue] = assetsReserves[comptroller][asset][Schema(schemaValue)];\n totalBalance += schemaBalances[schemaValue];\n\n unchecked {\n ++schemaValue;\n }\n }\n\n if (totalBalance == 0) {\n return;\n }\n\n uint256[] memory totalTransferAmounts = new uint256[](totalSchemas);\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig memory _config = distributionTargets[i];\n\n uint256 transferAmount = (schemaBalances[uint256(_config.schema)] * _config.percentage) / MAX_PERCENT;\n totalTransferAmounts[uint256(_config.schema)] += transferAmount;\n\n IERC20Upgradeable(asset).safeTransfer(_config.destination, transferAmount);\n IIncomeDestination(_config.destination).updateAssetsState(comptroller, asset);\n\n emit AssetReleased(_config.destination, asset, _config.schema, _config.percentage, transferAmount);\n\n unchecked {\n ++i;\n }\n }\n\n uint256[] memory newSchemaBalances = new uint256[](totalSchemas);\n for (uint256 schemaValue = 0; schemaValue < totalSchemas; ) {\n newSchemaBalances[schemaValue] = schemaBalances[schemaValue] - totalTransferAmounts[schemaValue];\n assetsReserves[comptroller][asset][Schema(schemaValue)] = newSchemaBalances[schemaValue];\n totalAssetReserve[asset] = totalAssetReserve[asset] - totalTransferAmounts[schemaValue];\n\n emit ReservesUpdated(\n comptroller,\n asset,\n Schema(schemaValue),\n schemaBalances[schemaValue],\n newSchemaBalances[schemaValue]\n );\n\n unchecked {\n ++schemaValue;\n }\n }\n }\n\n /**\n * @dev Returns the schema based on comptroller, asset and income type\n * @param comptroller Comptroller address(pool)\n * @param asset Asset address.\n * @param incomeType type of income\n * @return schema schema for distribution\n */\n function getSchema(\n address comptroller,\n address asset,\n IncomeType incomeType\n ) internal view returns (Schema schema) {\n schema = Schema.DEFAULT;\n address vToken = IPrime(prime).vTokenForAsset(asset);\n if (vToken != address(0) && comptroller == CORE_POOL_COMPTROLLER && incomeType == IncomeType.SPREAD) {\n schema = Schema.SPREAD_PRIME_CORE;\n }\n }\n\n function _ensurePercentages() internal view {\n uint256 totalSchemas = uint256(type(Schema).max) + 1;\n uint256[] memory totalPercentages = new uint256[](totalSchemas);\n\n for (uint256 i = 0; i < distributionTargets.length; ) {\n DistributionConfig memory config = distributionTargets[i];\n totalPercentages[uint256(config.schema)] += config.percentage;\n\n unchecked {\n ++i;\n }\n }\n for (uint256 schemaValue = 0; schemaValue < totalSchemas; ) {\n if (totalPercentages[schemaValue] != MAX_PERCENT && totalPercentages[schemaValue] != 0)\n revert InvalidTotalPercentage();\n\n unchecked {\n ++schemaValue;\n }\n }\n }\n\n /**\n * @dev Returns the underlying asset address for the vToken\n * @param vToken vToken address\n * @return asset address of asset\n */\n function _getUnderlying(address vToken) internal view returns (address) {\n if (vToken == vBNB) {\n return WBNB;\n } else {\n return IVToken(vToken).underlying();\n }\n }\n}\n" + }, + "contracts/test/MockToken.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport { ERC20 } from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\n\ncontract MockToken is ERC20 {\n uint8 private immutable _decimals;\n\n constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {\n _decimals = decimals_;\n }\n\n function faucet(uint256 amount) external {\n _mint(msg.sender, amount);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}\n" + }, + "contracts/test/PrimeScenario.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport \"../Tokens/Prime/Prime.sol\";\n\ncontract PrimeScenario is Prime {\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address _wbnb,\n address _vbnb,\n uint256 _blocksPerYear,\n uint256 _stakingPeriod,\n uint256 _minimumStakedXVS,\n uint256 _maximumXVSCap,\n bool _timeBased\n ) Prime(_wbnb, _vbnb, _blocksPerYear, _stakingPeriod, _minimumStakedXVS, _maximumXVSCap, _timeBased) {}\n\n function calculateScore(uint256 xvs, uint256 capital) external view returns (uint256) {\n return Scores._calculateScore(xvs, capital, alphaNumerator, alphaDenominator);\n }\n\n function setPLP(address plp) external {\n primeLiquidityProvider = plp;\n }\n\n function mintForUser(address user) external {\n tokens[user] = Token(true, true);\n }\n\n function burnForUser(address user) external {\n tokens[user] = Token(false, false);\n }\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/InterfaceComptroller.sol": { + "content": "// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.8.25;\n\ninterface InterfaceComptroller {\n function markets(address) external view returns (bool);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPoolRegistry.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\n/**\n * @title PoolRegistryInterface\n * @author Venus\n * @notice Interface implemented by `PoolRegistry`.\n */\ninterface PoolRegistryInterface {\n /**\n * @notice Struct for a Venus interest rate pool.\n */\n struct VenusPool {\n string name;\n address creator;\n address comptroller;\n uint256 blockPosted;\n uint256 timestampPosted;\n }\n\n /// @notice Get a pool by comptroller address\n function getPoolByComptroller(address comptroller) external view returns (VenusPool memory);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPrime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { PrimeStorageV1 } from \"../PrimeStorage.sol\";\n\n/**\n * @title IPrime\n * @author Venus\n * @notice Interface for Prime Token\n */\ninterface IPrime {\n struct APRInfo {\n // supply APR of the user in BPS\n uint256 supplyAPR;\n // borrow APR of the user in BPS\n uint256 borrowAPR;\n // total score of the market\n uint256 totalScore;\n // score of the user\n uint256 userScore;\n // capped XVS balance of the user\n uint256 xvsBalanceForScore;\n // capital of the user\n uint256 capital;\n // capped supply of the user\n uint256 cappedSupply;\n // capped borrow of the user\n uint256 cappedBorrow;\n // capped supply of user in USD\n uint256 supplyCapUSD;\n // capped borrow of user in USD\n uint256 borrowCapUSD;\n }\n\n struct Capital {\n // capital of the user\n uint256 capital;\n // capped supply of the user\n uint256 cappedSupply;\n // capped borrow of the user\n uint256 cappedBorrow;\n // capped supply of user in USD\n uint256 supplyCapUSD;\n // capped borrow of user in USD\n uint256 borrowCapUSD;\n }\n\n /**\n * @notice Returns boosted pending interest accrued for a user for all markets\n * @param user the account for which to get the accrued interests\n * @return pendingRewards the number of underlying tokens accrued by the user for all markets\n */\n function getPendingRewards(address user) external returns (PrimeStorageV1.PendingReward[] memory pendingRewards);\n\n /**\n * @notice Update total score of multiple users and market\n * @param users accounts for which we need to update score\n */\n function updateScores(address[] memory users) external;\n\n /**\n * @notice Update value of alpha\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n */\n function updateAlpha(uint128 _alphaNumerator, uint128 _alphaDenominator) external;\n\n /**\n * @notice Update multipliers for a market\n * @param market address of the market vToken\n * @param supplyMultiplier new supply multiplier for the market, scaled by 1e18\n * @param borrowMultiplier new borrow multiplier for the market, scaled by 1e18\n */\n function updateMultipliers(address market, uint256 supplyMultiplier, uint256 borrowMultiplier) external;\n\n /**\n * @notice Add a market to prime program\n * @param comptroller address of the comptroller\n * @param market address of the market vToken\n * @param supplyMultiplier the multiplier for supply cap. It should be converted to 1e18\n * @param borrowMultiplier the multiplier for borrow cap. It should be converted to 1e18\n */\n function addMarket(\n address comptroller,\n address market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n ) external;\n\n /**\n * @notice Set limits for total tokens that can be minted\n * @param _irrevocableLimit total number of irrevocable tokens that can be minted\n * @param _revocableLimit total number of revocable tokens that can be minted\n */\n function setLimit(uint256 _irrevocableLimit, uint256 _revocableLimit) external;\n\n /**\n * @notice Directly issue prime tokens to users\n * @param isIrrevocable are the tokens being issued\n * @param users list of address to issue tokens to\n */\n function issue(bool isIrrevocable, address[] calldata users) external;\n\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external;\n\n /**\n * @notice accrues interest and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external;\n\n /**\n * @notice For claiming prime token when staking period is completed\n */\n function claim() external;\n\n /**\n * @notice For burning any prime token\n * @param user the account address for which the prime token will be burned\n */\n function burn(address user) external;\n\n /**\n * @notice To pause or unpause claiming of interest\n */\n function togglePause() external;\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken) external returns (uint256);\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @param user the user for which to claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken, address user) external returns (uint256);\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n */\n function accrueInterest(address vToken) external;\n\n /**\n * @notice Returns boosted interest accrued for a user\n * @param vToken the market for which to fetch the accrued interest\n * @param user the account for which to get the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function getInterestAccrued(address vToken, address user) external returns (uint256);\n\n /**\n * @notice Retrieves an array of all available markets\n * @return an array of addresses representing all available markets\n */\n function getAllMarkets() external view returns (address[] memory);\n\n /**\n * @notice fetch the numbers of seconds remaining for staking period to complete\n * @param user the account address for which we are checking the remaining time\n * @return timeRemaining the number of seconds the user needs to wait to claim prime token\n */\n function claimTimeRemaining(address user) external view returns (uint256);\n\n /**\n * @notice Returns supply and borrow APR for user for a given market\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function calculateAPR(address market, address user) external view returns (APRInfo memory aprInfo);\n\n /**\n * @notice Returns supply and borrow APR for estimated supply, borrow and XVS staked\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @param borrow hypothetical borrow amount\n * @param supply hypothetical supply amount\n * @param xvsStaked hypothetical staked XVS amount\n * @return aprInfo APR information for the user for the given market\n */\n function estimateAPR(\n address market,\n address user,\n uint256 borrow,\n uint256 supply,\n uint256 xvsStaked\n ) external view returns (APRInfo memory aprInfo);\n\n /**\n * @notice the total income that's going to be distributed in a year to prime token holders\n * @param vToken the market for which to fetch the total income that's going to distributed in a year\n * @return amount the total income\n */\n function incomeDistributionYearly(address vToken) external view returns (uint256 amount);\n\n /**\n * @notice Returns if user is a prime holder\n * @return isPrimeHolder true if user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool);\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Number of loops limit\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external;\n\n /**\n * @notice Update staked at timestamp for multiple users\n * @param users accounts for which we need to update staked at timestamp\n * @param timestamps new staked at timestamp for the users\n */\n function setStakedAt(address[] calldata users, uint256[] calldata timestamps) external;\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IPrimeLiquidityProvider.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\nimport { IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\n\n/**\n * @title IPrimeLiquidityProvider\n * @author Venus\n * @notice Interface for PrimeLiquidityProvider\n */\ninterface IPrimeLiquidityProvider {\n /**\n * @notice Initialize the distribution of the token\n * @param tokens_ Array of addresses of the tokens to be intialized\n */\n function initializeTokens(address[] calldata tokens_) external;\n\n /**\n * @notice Pause fund transfer of tokens to Prime contract\n */\n function pauseFundsTransfer() external;\n\n /**\n * @notice Resume fund transfer of tokens to Prime contract\n */\n function resumeFundsTransfer() external;\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n */\n function setTokensDistributionSpeed(address[] calldata tokens_, uint256[] calldata distributionSpeeds_) external;\n\n /**\n * @notice Set max distribution speed for token (amount of maximum token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param maxDistributionSpeeds_ New distribution speeds for tokens\n */\n function setMaxTokensDistributionSpeed(\n address[] calldata tokens_,\n uint256[] calldata maxDistributionSpeeds_\n ) external;\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n */\n function setPrimeToken(address prime_) external;\n\n /**\n * @notice Claim all the token accrued till last block or second\n * @param token_ The token to release to the Prime contract\n */\n function releaseFunds(address token_) external;\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n */\n function sweepToken(IERC20Upgradeable token_, address to_, uint256 amount_) external;\n\n /**\n * @notice Accrue token by updating the distribution state\n * @param token_ Address of the token\n */\n function accrueTokens(address token_) external;\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Limit for the max loops can execute at a time\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external;\n\n /**\n * @notice Get rewards per block or second for token\n * @param token_ Address of the token\n * @return speed returns the per block or second reward\n */\n function getEffectiveDistributionSpeed(address token_) external view returns (uint256);\n\n /**\n * @notice Get the amount of tokens accrued\n * @param token_ Address of the token\n * @return Amount of tokens that are accrued\n */\n function tokenAmountAccrued(address token_) external view returns (uint256);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IVToken.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IVToken {\n function borrowBalanceStored(address account) external view returns (uint256);\n\n function exchangeRateStored() external view returns (uint256);\n\n function balanceOf(address account) external view returns (uint256);\n\n function underlying() external view returns (address);\n\n function totalBorrows() external view returns (uint256);\n\n function borrowRatePerBlock() external view returns (uint256);\n\n function reserveFactorMantissa() external view returns (uint256);\n\n function decimals() external view returns (uint8);\n}\n" + }, + "contracts/Tokens/Prime/Interfaces/IXVSVault.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity ^0.8.25;\n\ninterface IXVSVault {\n function getUserInfo(\n address _rewardToken,\n uint256 _pid,\n address _user\n ) external view returns (uint256 amount, uint256 rewardDebt, uint256 pendingWithdrawals);\n\n function xvsAddress() external view returns (address);\n}\n" + }, + "contracts/Tokens/Prime/libs/FixedMath.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable var-name-mixedcase\n\npragma solidity 0.8.25;\n\nimport { SafeCastUpgradeable } from \"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\";\nimport { FixedMath0x } from \"./FixedMath0x.sol\";\n\nusing SafeCastUpgradeable for uint256;\n\nerror InvalidFixedPoint();\n\n/**\n * @title FixedMath\n * @author Venus\n * @notice FixedMath library is used for complex mathematical operations\n */\nlibrary FixedMath {\n error InvalidFraction(uint256 n, uint256 d);\n\n /**\n * @notice Convert some uint256 fraction `n` numerator / `d` denominator to a fixed-point number `f`.\n * @param n numerator\n * @param d denominator\n * @return fixed-point number\n */\n function _toFixed(uint256 n, uint256 d) internal pure returns (int256) {\n if (d.toInt256() < n.toInt256()) revert InvalidFraction(n, d);\n\n return (n.toInt256() * FixedMath0x.FIXED_1) / int256(d.toInt256());\n }\n\n /**\n * @notice Divide some unsigned int `u` by a fixed point number `f`\n * @param u unsigned dividend\n * @param f fixed point divisor, in FIXED_1 units\n * @return unsigned int quotient\n */\n function _uintDiv(uint256 u, int256 f) internal pure returns (uint256) {\n if (f < 0) revert InvalidFixedPoint();\n // multiply `u` by FIXED_1 to cancel out the built-in FIXED_1 in f\n return uint256((u.toInt256() * FixedMath0x.FIXED_1) / f);\n }\n\n /**\n * @notice Multiply some unsigned int `u` by a fixed point number `f`\n * @param u unsigned multiplicand\n * @param f fixed point multiplier, in FIXED_1 units\n * @return unsigned int product\n */\n function _uintMul(uint256 u, int256 f) internal pure returns (uint256) {\n if (f < 0) revert InvalidFixedPoint();\n // divide the product by FIXED_1 to cancel out the built-in FIXED_1 in f\n return uint256((u.toInt256() * f) / FixedMath0x.FIXED_1);\n }\n\n /// @notice see FixedMath0x\n function _ln(int256 x) internal pure returns (int256) {\n return FixedMath0x._ln(x);\n }\n\n /// @notice see FixedMath0x\n function _exp(int256 x) internal pure returns (int256) {\n return FixedMath0x._exp(x);\n }\n}\n" + }, + "contracts/Tokens/Prime/libs/FixedMath0x.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable max-line-length\n\npragma solidity 0.8.25;\n\n// Below is code from 0x's LibFixedMath.sol. Changes:\n// - addition of 0.8-style errors\n// - removal of unused functions\n// - added comments for clarity\n// https://github.com/0xProject/exchange-v3/blob/aae46bef841bfd1cc31028f41793db4fe7197084/contracts/staking/contracts/src/libs/LibFixedMath.sol\n\n/*\n\n Copyright 2017 Bprotocol Foundation, 2019 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n/// Thrown when the natural log function is given too large of an argument\nerror LnTooLarge(int256 x);\n/// Thrown when the natural log would have returned a number outside of ℝ\nerror LnNonRealResult(int256 x);\n/// Thrown when exp is given too large of an argument\nerror ExpTooLarge(int256 x);\n/// Thrown when an unsigned value is too large to be converted to a signed value\nerror UnsignedValueTooLarge(uint256 x);\n\n/**\n * @title FixedMath0x\n * @notice Signed, fixed-point, 127-bit precision math library\n */\nlibrary FixedMath0x {\n // Base for the fixed point numbers (this is our 1)\n int256 internal constant FIXED_1 = int256(0x0000000000000000000000000000000080000000000000000000000000000000);\n // Maximum ln argument (1)\n int256 private constant LN_MAX_VAL = FIXED_1;\n // Minimum ln argument. Notice this is related to EXP_MIN_VAL (e ^ -63.875)\n int256 private constant LN_MIN_VAL = int256(0x0000000000000000000000000000000000000000000000000000000733048c5a);\n // Maximum exp argument (0)\n int256 private constant EXP_MAX_VAL = 0;\n // Minimum exp argument. Notice this is related to LN_MIN_VAL (-63.875)\n int256 private constant EXP_MIN_VAL = -int256(0x0000000000000000000000000000001ff0000000000000000000000000000000);\n\n /// @dev Get the natural logarithm of a fixed-point number 0 < `x` <= LN_MAX_VAL\n function _ln(int256 x) internal pure returns (int256 r) {\n if (x > LN_MAX_VAL) {\n revert LnTooLarge(x);\n }\n if (x <= 0) {\n revert LnNonRealResult(x);\n }\n if (x == FIXED_1) {\n return 0;\n }\n if (x <= LN_MIN_VAL) {\n return EXP_MIN_VAL;\n }\n\n int256 y;\n int256 z;\n int256 w;\n\n // Rewrite the input as a quotient of negative natural exponents and a single residual q, such that 1 < q < 2\n // For example: log(0.3) = log(e^-1 * e^-0.25 * 1.0471028872385522)\n // = 1 - 0.25 - log(1 + 0.0471028872385522)\n // e ^ -32\n if (x <= int256(0x00000000000000000000000000000000000000000001c8464f76164760000000)) {\n r -= int256(0x0000000000000000000000000000001000000000000000000000000000000000); // - 32\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000000000001c8464f76164760000000); // / e ^ -32\n }\n // e ^ -16\n if (x <= int256(0x00000000000000000000000000000000000000f1aaddd7742e90000000000000)) {\n r -= int256(0x0000000000000000000000000000000800000000000000000000000000000000); // - 16\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000000f1aaddd7742e90000000000000); // / e ^ -16\n }\n // e ^ -8\n if (x <= int256(0x00000000000000000000000000000000000afe10820813d78000000000000000)) {\n r -= int256(0x0000000000000000000000000000000400000000000000000000000000000000); // - 8\n x = (x * FIXED_1) / int256(0x00000000000000000000000000000000000afe10820813d78000000000000000); // / e ^ -8\n }\n // e ^ -4\n if (x <= int256(0x0000000000000000000000000000000002582ab704279ec00000000000000000)) {\n r -= int256(0x0000000000000000000000000000000200000000000000000000000000000000); // - 4\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000002582ab704279ec00000000000000000); // / e ^ -4\n }\n // e ^ -2\n if (x <= int256(0x000000000000000000000000000000001152aaa3bf81cc000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000100000000000000000000000000000000); // - 2\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000001152aaa3bf81cc000000000000000000); // / e ^ -2\n }\n // e ^ -1\n if (x <= int256(0x000000000000000000000000000000002f16ac6c59de70000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000080000000000000000000000000000000); // - 1\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000002f16ac6c59de70000000000000000000); // / e ^ -1\n }\n // e ^ -0.5\n if (x <= int256(0x000000000000000000000000000000004da2cbf1be5828000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000040000000000000000000000000000000); // - 0.5\n x = (x * FIXED_1) / int256(0x000000000000000000000000000000004da2cbf1be5828000000000000000000); // / e ^ -0.5\n }\n // e ^ -0.25\n if (x <= int256(0x0000000000000000000000000000000063afbe7ab2082c000000000000000000)) {\n r -= int256(0x0000000000000000000000000000000020000000000000000000000000000000); // - 0.25\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000063afbe7ab2082c000000000000000000); // / e ^ -0.25\n }\n // e ^ -0.125\n if (x <= int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d)) {\n r -= int256(0x0000000000000000000000000000000010000000000000000000000000000000); // - 0.125\n x = (x * FIXED_1) / int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d); // / e ^ -0.125\n }\n // `x` is now our residual in the range of 1 <= x <= 2 (or close enough).\n\n // Add the taylor series for log(1 + z), where z = x - 1\n z = y = x - FIXED_1;\n w = (y * y) / FIXED_1;\n r += (z * (0x100000000000000000000000000000000 - y)) / 0x100000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^01 / 01 - y^02 / 02\n r += (z * (0x0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - y)) / 0x200000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^03 / 03 - y^04 / 04\n r += (z * (0x099999999999999999999999999999999 - y)) / 0x300000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^05 / 05 - y^06 / 06\n r += (z * (0x092492492492492492492492492492492 - y)) / 0x400000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^07 / 07 - y^08 / 08\n r += (z * (0x08e38e38e38e38e38e38e38e38e38e38e - y)) / 0x500000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^09 / 09 - y^10 / 10\n r += (z * (0x08ba2e8ba2e8ba2e8ba2e8ba2e8ba2e8b - y)) / 0x600000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^11 / 11 - y^12 / 12\n r += (z * (0x089d89d89d89d89d89d89d89d89d89d89 - y)) / 0x700000000000000000000000000000000;\n z = (z * w) / FIXED_1; // add y^13 / 13 - y^14 / 14\n r += (z * (0x088888888888888888888888888888888 - y)) / 0x800000000000000000000000000000000; // add y^15 / 15 - y^16 / 16\n }\n\n /// @dev Compute the natural exponent for a fixed-point number EXP_MIN_VAL <= `x` <= 1\n function _exp(int256 x) internal pure returns (int256 r) {\n if (x < EXP_MIN_VAL) {\n // Saturate to zero below EXP_MIN_VAL.\n return 0;\n }\n if (x == 0) {\n return FIXED_1;\n }\n if (x > EXP_MAX_VAL) {\n revert ExpTooLarge(x);\n }\n\n // Rewrite the input as a product of natural exponents and a\n // single residual q, where q is a number of small magnitude.\n // For example: e^-34.419 = e^(-32 - 2 - 0.25 - 0.125 - 0.044)\n // = e^-32 * e^-2 * e^-0.25 * e^-0.125 * e^-0.044\n // -> q = -0.044\n\n // Multiply with the taylor series for e^q\n int256 y;\n int256 z;\n // q = x % 0.125 (the residual)\n z = y = x % 0x0000000000000000000000000000000010000000000000000000000000000000;\n z = (z * y) / FIXED_1;\n r += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!)\n z = (z * y) / FIXED_1;\n r += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!)\n z = (z * y) / FIXED_1;\n r += z * 0x0168244fdac78000; // add y^04 * (20! / 04!)\n z = (z * y) / FIXED_1;\n r += z * 0x004807432bc18000; // add y^05 * (20! / 05!)\n z = (z * y) / FIXED_1;\n r += z * 0x000c0135dca04000; // add y^06 * (20! / 06!)\n z = (z * y) / FIXED_1;\n r += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!)\n z = (z * y) / FIXED_1;\n r += z * 0x000036e0f639b800; // add y^08 * (20! / 08!)\n z = (z * y) / FIXED_1;\n r += z * 0x00000618fee9f800; // add y^09 * (20! / 09!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000e30dce400; // add y^11 * (20! / 11!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000012ebd1300; // add y^12 * (20! / 12!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000017499f00; // add y^13 * (20! / 13!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000001a9d480; // add y^14 * (20! / 14!)\n z = (z * y) / FIXED_1;\n r += z * 0x00000000001c6380; // add y^15 * (20! / 15!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000000001c638; // add y^16 * (20! / 16!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000001ab8; // add y^17 * (20! / 17!)\n z = (z * y) / FIXED_1;\n r += z * 0x000000000000017c; // add y^18 * (20! / 18!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000000014; // add y^19 * (20! / 19!)\n z = (z * y) / FIXED_1;\n r += z * 0x0000000000000001; // add y^20 * (20! / 20!)\n r = r / 0x21c3677c82b40000 + y + FIXED_1; // divide by 20! and then add y^1 / 1! + y^0 / 0!\n\n // Multiply with the non-residual terms.\n x = -x;\n // e ^ -32\n if ((x & int256(0x0000000000000000000000000000001000000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000000000f1aaddd7742e56d32fb9f99744)) /\n int256(0x0000000000000000000000000043cbaf42a000812488fc5c220ad7b97bf6e99e); // * e ^ -32\n }\n // e ^ -16\n if ((x & int256(0x0000000000000000000000000000000800000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000000afe10820813d65dfe6a33c07f738f)) /\n int256(0x000000000000000000000000000005d27a9f51c31b7c2f8038212a0574779991); // * e ^ -16\n }\n // e ^ -8\n if ((x & int256(0x0000000000000000000000000000000400000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000002582ab704279e8efd15e0265855c47a)) /\n int256(0x0000000000000000000000000000001b4c902e273a58678d6d3bfdb93db96d02); // * e ^ -8\n }\n // e ^ -4\n if ((x & int256(0x0000000000000000000000000000000200000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000001152aaa3bf81cb9fdb76eae12d029571)) /\n int256(0x00000000000000000000000000000003b1cc971a9bb5b9867477440d6d157750); // * e ^ -4\n }\n // e ^ -2\n if ((x & int256(0x0000000000000000000000000000000100000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000002f16ac6c59de6f8d5d6f63c1482a7c86)) /\n int256(0x000000000000000000000000000000015bf0a8b1457695355fb8ac404e7a79e3); // * e ^ -2\n }\n // e ^ -1\n if ((x & int256(0x0000000000000000000000000000000080000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x000000000000000000000000000000004da2cbf1be5827f9eb3ad1aa9866ebb3)) /\n int256(0x00000000000000000000000000000000d3094c70f034de4b96ff7d5b6f99fcd8); // * e ^ -1\n }\n // e ^ -0.5\n if ((x & int256(0x0000000000000000000000000000000040000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000063afbe7ab2082ba1a0ae5e4eb1b479dc)) /\n int256(0x00000000000000000000000000000000a45af1e1f40c333b3de1db4dd55f29a7); // * e ^ -0.5\n }\n // e ^ -0.25\n if ((x & int256(0x0000000000000000000000000000000020000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x0000000000000000000000000000000070f5a893b608861e1f58934f97aea57d)) /\n int256(0x00000000000000000000000000000000910b022db7ae67ce76b441c27035c6a1); // * e ^ -0.25\n }\n // e ^ -0.125\n if ((x & int256(0x0000000000000000000000000000000010000000000000000000000000000000)) != 0) {\n r =\n (r * int256(0x00000000000000000000000000000000783eafef1c0a8f3978c7f81824d62ebf)) /\n int256(0x0000000000000000000000000000000088415abbe9a76bead8d00cf112e4d4a8); // * e ^ -0.125\n }\n }\n}\n" + }, + "contracts/Tokens/Prime/libs/Scores.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.25;\n\nimport { SafeCastUpgradeable } from \"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\";\nimport { FixedMath } from \"./FixedMath.sol\";\n\nusing SafeCastUpgradeable for uint256;\n\n/**\n * @title Scores\n * @author Venus\n * @notice Scores library is used to calculate score of users\n */\nlibrary Scores {\n /**\n * @notice Calculate a membership score given some amount of `xvs` and `capital`, along\n * with some 𝝰 = `alphaNumerator` / `alphaDenominator`.\n * @param xvs amount of xvs (xvs, 1e18 decimal places)\n * @param capital amount of capital (1e18 decimal places)\n * @param alphaNumerator alpha param numerator\n * @param alphaDenominator alpha param denominator\n * @return membership score with 1e18 decimal places\n *\n * @dev 𝝰 must be in the range [0, 1]\n */\n function _calculateScore(\n uint256 xvs,\n uint256 capital,\n uint256 alphaNumerator,\n uint256 alphaDenominator\n ) internal pure returns (uint256) {\n // Score function is:\n // xvs^𝝰 * capital^(1-𝝰)\n // = capital * capital^(-𝝰) * xvs^𝝰\n // = capital * (xvs / capital)^𝝰\n // = capital * (e ^ (ln(xvs / capital))) ^ 𝝰\n // = capital * e ^ (𝝰 * ln(xvs / capital)) (1)\n // or\n // = capital / ( 1 / e ^ (𝝰 * ln(xvs / capital)))\n // = capital / (e ^ (𝝰 * ln(xvs / capital)) ^ -1)\n // = capital / e ^ (𝝰 * -1 * ln(xvs / capital))\n // = capital / e ^ (𝝰 * ln(capital / xvs)) (2)\n //\n // To avoid overflows, use (1) when xvs < capital and\n // use (2) when capital < xvs\n\n // If any side is 0, exit early\n if (xvs == 0 || capital == 0) return 0;\n\n // If both sides are equal, we have:\n // xvs^𝝰 * capital^(1-𝝰)\n // = xvs^𝝰 * xvs^(1-𝝰)\n // = xvs^(𝝰 + 1 - 𝝰) = xvs\n if (xvs == capital) return xvs;\n\n bool lessxvsThanCapital = xvs < capital;\n\n // (xvs / capital) or (capital / xvs), always in range (0, 1)\n int256 ratio = lessxvsThanCapital ? FixedMath._toFixed(xvs, capital) : FixedMath._toFixed(capital, xvs);\n\n // e ^ ( ln(ratio) * 𝝰 )\n int256 exponentiation = FixedMath._exp(\n (FixedMath._ln(ratio) * alphaNumerator.toInt256()) / alphaDenominator.toInt256()\n );\n\n if (lessxvsThanCapital) {\n // capital * e ^ (𝝰 * ln(xvs / capital))\n return FixedMath._uintMul(capital, exponentiation);\n }\n\n // capital / e ^ (𝝰 * ln(capital / xvs))\n return FixedMath._uintDiv(capital, exponentiation);\n }\n}\n" + }, + "contracts/Tokens/Prime/Prime.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\nimport { PausableUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport { MaxLoopsLimitHelper } from \"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\";\nimport { TimeManagerV8 } from \"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\";\n\nimport { IERC20MetadataUpgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\n\nimport { PrimeStorageV1 } from \"./PrimeStorage.sol\";\nimport { Scores } from \"./libs/Scores.sol\";\n\nimport { IPrimeLiquidityProvider } from \"./Interfaces/IPrimeLiquidityProvider.sol\";\nimport { IPrime } from \"./Interfaces/IPrime.sol\";\nimport { IXVSVault } from \"./Interfaces/IXVSVault.sol\";\nimport { IVToken } from \"./Interfaces/IVToken.sol\";\nimport { InterfaceComptroller } from \"./Interfaces/InterfaceComptroller.sol\";\nimport { PoolRegistryInterface } from \"./Interfaces/IPoolRegistry.sol\";\n\n/**\n * @title Prime\n * @author Venus\n * @notice Prime Token is used to provide extra rewards to the users who have staked a minimum of `MINIMUM_STAKED_XVS` XVS in the XVSVault for `STAKING_PERIOD` days\n * @custom:security-contact https://github.com/VenusProtocol/venus-protocol\n */\ncontract Prime is IPrime, AccessControlledV8, PausableUpgradeable, MaxLoopsLimitHelper, PrimeStorageV1, TimeManagerV8 {\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice address of wrapped native token contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable WRAPPED_NATIVE_TOKEN;\n\n /// @notice address of native market contract\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n address public immutable NATIVE_MARKET;\n\n /// @notice minimum amount of XVS user needs to stake to become a prime member\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable MINIMUM_STAKED_XVS;\n\n /// @notice maximum XVS taken in account when calculating user score\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable MAXIMUM_XVS_CAP;\n\n /// @notice number of days user need to stake to claim prime token\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n uint256 public immutable STAKING_PERIOD;\n\n /// @notice Emitted when prime token is minted\n event Mint(address indexed user, bool isIrrevocable);\n\n /// @notice Emitted when prime token is burned\n event Burn(address indexed user);\n\n /// @notice Emitted when a market is added to prime program\n event MarketAdded(\n address indexed comptroller,\n address indexed market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n );\n\n /// @notice Emitted when mint limits are updated\n event MintLimitsUpdated(\n uint256 indexed oldIrrevocableLimit,\n uint256 indexed oldRevocableLimit,\n uint256 indexed newIrrevocableLimit,\n uint256 newRevocableLimit\n );\n\n /// @notice Emitted when user score is updated\n event UserScoreUpdated(address indexed user);\n\n /// @notice Emitted when alpha is updated\n event AlphaUpdated(\n uint128 indexed oldNumerator,\n uint128 indexed oldDenominator,\n uint128 indexed newNumerator,\n uint128 newDenominator\n );\n\n /// @notice Emitted when multiplier is updated\n event MultiplierUpdated(\n address indexed market,\n uint256 indexed oldSupplyMultiplier,\n uint256 indexed oldBorrowMultiplier,\n uint256 newSupplyMultiplier,\n uint256 newBorrowMultiplier\n );\n\n /// @notice Emitted when interest is claimed\n event InterestClaimed(address indexed user, address indexed market, uint256 amount);\n\n /// @notice Emitted when revocable token is upgraded to irrevocable token\n event TokenUpgraded(address indexed user);\n\n /// @notice Emitted when stakedAt is updated\n event StakedAtUpdated(address indexed user, uint256 timestamp);\n\n /// @notice Error thrown when market is not supported\n error MarketNotSupported();\n\n /// @notice Error thrown when mint limit is reached\n error InvalidLimit();\n\n /// @notice Error thrown when user is not eligible to claim prime token\n error IneligibleToClaim();\n\n /// @notice Error thrown when user needs to wait more time to claim prime token\n error WaitMoreTime();\n\n /// @notice Error thrown when user has no prime token\n error UserHasNoPrimeToken();\n\n /// @notice Error thrown when no score updates are required\n error NoScoreUpdatesRequired();\n\n /// @notice Error thrown when market already exists\n error MarketAlreadyExists();\n\n /// @notice Error thrown when asset already exists\n error AssetAlreadyExists();\n\n /// @notice Error thrown when invalid address is passed\n error InvalidAddress();\n\n /// @notice Error thrown when invalid alpha arguments are passed\n error InvalidAlphaArguments();\n\n /// @notice Error thrown when invalid vToken is passed\n error InvalidVToken();\n\n /// @notice Error thrown when invalid length is passed\n error InvalidLength();\n\n /// @notice Error thrown when timestamp is invalid\n error InvalidTimestamp();\n\n /// @notice Error thrown when invalid comptroller is passed\n error InvalidComptroller();\n\n /**\n * @notice Prime constructor\n * @param _wrappedNativeToken Address of wrapped native token\n * @param _nativeMarket Address of native market\n * @param _blocksPerYear total blocks per year\n * @param _stakingPeriod total number of seconds for which user needs to stake to claim prime token\n * @param _minimumStakedXVS minimum amount of XVS user needs to stake to become a prime member (scaled by 1e18)\n * @param _maximumXVSCap maximum XVS taken in account when calculating user score (scaled by 1e18)\n * @param _timeBased A boolean indicating whether the contract is based on time or block.\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(\n address _wrappedNativeToken,\n address _nativeMarket,\n uint256 _blocksPerYear,\n uint256 _stakingPeriod,\n uint256 _minimumStakedXVS,\n uint256 _maximumXVSCap,\n bool _timeBased\n ) TimeManagerV8(_timeBased, _blocksPerYear) {\n WRAPPED_NATIVE_TOKEN = _wrappedNativeToken;\n NATIVE_MARKET = _nativeMarket;\n STAKING_PERIOD = _stakingPeriod;\n MINIMUM_STAKED_XVS = _minimumStakedXVS;\n MAXIMUM_XVS_CAP = _maximumXVSCap;\n\n // Note that the contract is upgradeable. Use initialize() or reinitializers\n // to set the state variables.\n _disableInitializers();\n }\n\n /**\n * @notice Prime initializer\n * @param xvsVault_ Address of XVSVault\n * @param xvsVaultRewardToken_ Address of XVSVault reward token\n * @param xvsVaultPoolId_ Pool id of XVSVault\n * @param alphaNumerator_ numerator of alpha. If alpha is 0.5 then numerator is 1.\n alphaDenominator_ must be greater than alphaNumerator_, alphaDenominator_ cannot be zero and alphaNumerator_ cannot be zero\n * @param alphaDenominator_ denominator of alpha. If alpha is 0.5 then denominator is 2.\n alpha is alphaNumerator_/alphaDenominator_. So, 0 < alpha < 1\n * @param accessControlManager_ Address of AccessControlManager\n * @param primeLiquidityProvider_ Address of PrimeLiquidityProvider\n * @param comptroller_ Address of core pool comptroller\n * @param oracle_ Address of Oracle\n * @param loopsLimit_ Maximum number of loops allowed in a single transaction\n * @custom:error Throw InvalidAddress if any of the address is invalid\n */\n function initialize(\n address xvsVault_,\n address xvsVaultRewardToken_,\n uint256 xvsVaultPoolId_,\n uint128 alphaNumerator_,\n uint128 alphaDenominator_,\n address accessControlManager_,\n address primeLiquidityProvider_,\n address comptroller_,\n address oracle_,\n uint256 loopsLimit_\n ) external initializer {\n if (xvsVault_ == address(0)) revert InvalidAddress();\n if (xvsVaultRewardToken_ == address(0)) revert InvalidAddress();\n if (oracle_ == address(0)) revert InvalidAddress();\n if (primeLiquidityProvider_ == address(0)) revert InvalidAddress();\n\n _checkAlphaArguments(alphaNumerator_, alphaDenominator_);\n\n alphaNumerator = alphaNumerator_;\n alphaDenominator = alphaDenominator_;\n xvsVaultRewardToken = xvsVaultRewardToken_;\n xvsVaultPoolId = xvsVaultPoolId_;\n xvsVault = xvsVault_;\n nextScoreUpdateRoundId = 0;\n primeLiquidityProvider = primeLiquidityProvider_;\n corePoolComptroller = comptroller_;\n oracle = ResilientOracleInterface(oracle_);\n\n __AccessControlled_init(accessControlManager_);\n __Pausable_init();\n _setMaxLoopsLimit(loopsLimit_);\n\n _pause();\n }\n\n /**\n * @notice Prime initializer V2 for initializing pool registry\n * @param poolRegistry_ Address of IL pool registry\n */\n function initializeV2(address poolRegistry_) external reinitializer(2) {\n poolRegistry = poolRegistry_;\n }\n\n /**\n * @notice Returns boosted pending interest accrued for a user for all markets\n * @param user the account for which to get the accrued interests\n * @return pendingRewards the number of underlying tokens accrued by the user for all markets\n */\n function getPendingRewards(address user) external returns (PendingReward[] memory pendingRewards) {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n pendingRewards = new PendingReward[](marketsLength);\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n uint256 interestAccrued = getInterestAccrued(market, user);\n uint256 accrued = interests[market][user].accrued;\n\n pendingRewards[i] = PendingReward({\n vToken: market,\n rewardToken: _getUnderlying(market),\n amount: interestAccrued + accrued\n });\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Update total score of multiple users and market\n * @param users accounts for which we need to update score\n * @custom:error Throw NoScoreUpdatesRequired if no score updates are required\n * @custom:error Throw UserHasNoPrimeToken if user has no prime token\n * @custom:event Emits UserScoreUpdated event\n */\n function updateScores(address[] calldata users) external {\n if (pendingScoreUpdates == 0) revert NoScoreUpdatesRequired();\n if (nextScoreUpdateRoundId == 0) revert NoScoreUpdatesRequired();\n\n for (uint256 i; i < users.length; ) {\n address user = users[i];\n\n if (!tokens[user].exists) revert UserHasNoPrimeToken();\n if (isScoreUpdated[nextScoreUpdateRoundId][user]) {\n unchecked {\n ++i;\n }\n continue;\n }\n\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 j; j < marketsLength; ) {\n address market = allMarkets[j];\n _executeBoost(user, market);\n _updateScore(user, market);\n\n unchecked {\n ++j;\n }\n }\n\n --pendingScoreUpdates;\n isScoreUpdated[nextScoreUpdateRoundId][user] = true;\n\n unchecked {\n ++i;\n }\n\n emit UserScoreUpdated(user);\n }\n }\n\n /**\n * @notice Update value of alpha\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n * @custom:event Emits AlphaUpdated event\n * @custom:access Controlled by ACM\n */\n function updateAlpha(uint128 _alphaNumerator, uint128 _alphaDenominator) external {\n _checkAccessAllowed(\"updateAlpha(uint128,uint128)\");\n _checkAlphaArguments(_alphaNumerator, _alphaDenominator);\n\n emit AlphaUpdated(alphaNumerator, alphaDenominator, _alphaNumerator, _alphaDenominator);\n\n alphaNumerator = _alphaNumerator;\n alphaDenominator = _alphaDenominator;\n\n uint256 marketslength = _allMarkets.length;\n\n for (uint256 i; i < marketslength; ) {\n accrueInterest(_allMarkets[i]);\n\n unchecked {\n ++i;\n }\n }\n\n _startScoreUpdateRound();\n }\n\n /**\n * @notice Update multipliers for a market\n * @param market address of the market vToken\n * @param supplyMultiplier new supply multiplier for the market, scaled by 1e18\n * @param borrowMultiplier new borrow multiplier for the market, scaled by 1e18\n * @custom:error Throw MarketNotSupported if market is not supported\n * @custom:event Emits MultiplierUpdated event\n * @custom:access Controlled by ACM\n */\n function updateMultipliers(address market, uint256 supplyMultiplier, uint256 borrowMultiplier) external {\n _checkAccessAllowed(\"updateMultipliers(address,uint256,uint256)\");\n\n Market storage _market = markets[market];\n if (!_market.exists) revert MarketNotSupported();\n\n accrueInterest(market);\n\n emit MultiplierUpdated(\n market,\n _market.supplyMultiplier,\n _market.borrowMultiplier,\n supplyMultiplier,\n borrowMultiplier\n );\n _market.supplyMultiplier = supplyMultiplier;\n _market.borrowMultiplier = borrowMultiplier;\n\n _startScoreUpdateRound();\n }\n\n /**\n * @notice Update staked at timestamp for multiple users\n * @param users accounts for which we need to update staked at timestamp\n * @param timestamps new staked at timestamp for the users\n * @custom:error Throw InvalidLength if users and timestamps length are not equal\n * @custom:event Emits StakedAtUpdated event for each user\n * @custom:access Controlled by ACM\n */\n function setStakedAt(address[] calldata users, uint256[] calldata timestamps) external {\n _checkAccessAllowed(\"setStakedAt(address[],uint256[])\");\n if (users.length != timestamps.length) revert InvalidLength();\n\n for (uint256 i; i < users.length; ) {\n if (timestamps[i] > block.timestamp) revert InvalidTimestamp();\n\n stakedAt[users[i]] = timestamps[i];\n emit StakedAtUpdated(users[i], timestamps[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Add a market to prime program\n * @param comptroller address of the comptroller\n * @param market address of the market vToken\n * @param supplyMultiplier the multiplier for supply cap. It should be converted to 1e18\n * @param borrowMultiplier the multiplier for borrow cap. It should be converted to 1e18\n * @custom:error Throw MarketAlreadyExists if market already exists\n * @custom:error Throw InvalidVToken if market is not valid\n * @custom:event Emits MarketAdded event\n * @custom:access Controlled by ACM\n */\n function addMarket(\n address comptroller,\n address market,\n uint256 supplyMultiplier,\n uint256 borrowMultiplier\n ) external {\n _checkAccessAllowed(\"addMarket(address,address,uint256,uint256)\");\n\n if (comptroller == address(0)) revert InvalidComptroller();\n\n if (\n comptroller != corePoolComptroller &&\n PoolRegistryInterface(poolRegistry).getPoolByComptroller(comptroller).comptroller != comptroller\n ) revert InvalidComptroller();\n\n Market storage _market = markets[market];\n if (_market.exists) revert MarketAlreadyExists();\n\n bool isMarketExist = InterfaceComptroller(comptroller).markets(market);\n if (!isMarketExist) revert InvalidVToken();\n\n delete _market.rewardIndex;\n _market.supplyMultiplier = supplyMultiplier;\n _market.borrowMultiplier = borrowMultiplier;\n delete _market.sumOfMembersScore;\n _market.exists = true;\n\n address underlying = _getUnderlying(market);\n\n if (vTokenForAsset[underlying] != address(0)) revert AssetAlreadyExists();\n vTokenForAsset[underlying] = market;\n\n _allMarkets.push(market);\n _startScoreUpdateRound();\n\n _ensureMaxLoops(_allMarkets.length);\n\n emit MarketAdded(comptroller, market, supplyMultiplier, borrowMultiplier);\n }\n\n /**\n * @notice Set limits for total tokens that can be minted\n * @param _irrevocableLimit total number of irrevocable tokens that can be minted\n * @param _revocableLimit total number of revocable tokens that can be minted\n * @custom:error Throw InvalidLimit if any of the limit is less than total tokens minted\n * @custom:event Emits MintLimitsUpdated event\n * @custom:access Controlled by ACM\n */\n function setLimit(uint256 _irrevocableLimit, uint256 _revocableLimit) external {\n _checkAccessAllowed(\"setLimit(uint256,uint256)\");\n if (_irrevocableLimit < totalIrrevocable || _revocableLimit < totalRevocable) revert InvalidLimit();\n\n emit MintLimitsUpdated(irrevocableLimit, revocableLimit, _irrevocableLimit, _revocableLimit);\n\n revocableLimit = _revocableLimit;\n irrevocableLimit = _irrevocableLimit;\n }\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Number of loops limit\n * @custom:event Emits MaxLoopsLimitUpdated event on success\n * @custom:access Controlled by ACM\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external {\n _checkAccessAllowed(\"setMaxLoopsLimit(uint256)\");\n _setMaxLoopsLimit(loopsLimit);\n }\n\n /**\n * @notice Directly issue prime tokens to users\n * @param isIrrevocable are the tokens being issued\n * @param users list of address to issue tokens to\n * @custom:access Controlled by ACM\n */\n function issue(bool isIrrevocable, address[] calldata users) external {\n _checkAccessAllowed(\"issue(bool,address[])\");\n\n if (isIrrevocable) {\n for (uint256 i; i < users.length; ) {\n Token storage userToken = tokens[users[i]];\n if (userToken.exists && !userToken.isIrrevocable) {\n _upgrade(users[i]);\n } else {\n _mint(true, users[i]);\n _initializeMarkets(users[i]);\n }\n\n unchecked {\n ++i;\n }\n }\n } else {\n for (uint256 i; i < users.length; ) {\n _mint(false, users[i]);\n _initializeMarkets(users[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n }\n\n /**\n * @notice Executed by XVSVault whenever user's XVSVault balance changes\n * @param user the account address whose balance was updated\n */\n function xvsUpdated(address user) external {\n uint256 totalStaked = _xvsBalanceOfUser(user);\n bool isAccountEligible = _isEligible(totalStaked);\n\n uint256 userStakedAt = stakedAt[user];\n Token memory token = tokens[user];\n\n if (token.exists && !isAccountEligible) {\n delete stakedAt[user];\n emit StakedAtUpdated(user, 0);\n\n if (token.isIrrevocable) {\n _accrueInterestAndUpdateScore(user);\n } else {\n _burn(user);\n }\n } else if (!isAccountEligible && !token.exists && userStakedAt != 0) {\n delete stakedAt[user];\n emit StakedAtUpdated(user, 0);\n } else if (userStakedAt == 0 && isAccountEligible && !token.exists) {\n stakedAt[user] = block.timestamp;\n emit StakedAtUpdated(user, block.timestamp);\n } else if (token.exists && isAccountEligible) {\n _accrueInterestAndUpdateScore(user);\n\n if (stakedAt[user] == 0) {\n stakedAt[user] = block.timestamp;\n emit StakedAtUpdated(user, block.timestamp);\n }\n }\n }\n\n /**\n * @notice accrues interes and updates score for an user for a specific market\n * @param user the account address for which to accrue interest and update score\n * @param market the market for which to accrue interest and update score\n */\n function accrueInterestAndUpdateScore(address user, address market) external {\n _executeBoost(user, market);\n _updateScore(user, market);\n }\n\n /**\n * @notice For claiming prime token when staking period is completed\n */\n function claim() external {\n uint256 userStakedAt = stakedAt[msg.sender];\n if (userStakedAt == 0) revert IneligibleToClaim();\n if (block.timestamp - userStakedAt < STAKING_PERIOD) revert WaitMoreTime();\n\n _mint(false, msg.sender);\n _initializeMarkets(msg.sender);\n }\n\n /**\n * @notice For burning any prime token\n * @param user the account address for which the prime token will be burned\n * @custom:access Controlled by ACM\n */\n function burn(address user) external {\n _checkAccessAllowed(\"burn(address)\");\n _burn(user);\n }\n\n /**\n * @notice To pause or unpause claiming of interest\n * @custom:access Controlled by ACM\n */\n function togglePause() external {\n _checkAccessAllowed(\"togglePause()\");\n if (paused()) {\n _unpause();\n } else {\n _pause();\n }\n }\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @return amount the amount of tokens transferred to the msg.sender\n */\n function claimInterest(address vToken) external whenNotPaused returns (uint256) {\n return _claimInterest(vToken, msg.sender);\n }\n\n /**\n * @notice For user to claim boosted yield\n * @param vToken the market for which claim the accrued interest\n * @param user the user for which to claim the accrued interest\n * @return amount the amount of tokens transferred to the user\n */\n function claimInterest(address vToken, address user) external whenNotPaused returns (uint256) {\n return _claimInterest(vToken, user);\n }\n\n /**\n * @notice Retrieves an array of all available markets\n * @return an array of addresses representing all available markets\n */\n function getAllMarkets() external view returns (address[] memory) {\n return _allMarkets;\n }\n\n /**\n * @notice Retrieves the core pool comptroller address\n * @return the core pool comptroller address\n */\n function comptroller() external view returns (address) {\n return corePoolComptroller;\n }\n\n /**\n * @notice fetch the numbers of seconds remaining for staking period to complete\n * @param user the account address for which we are checking the remaining time\n * @return timeRemaining the number of seconds the user needs to wait to claim prime token\n */\n function claimTimeRemaining(address user) external view returns (uint256) {\n uint256 userStakedAt = stakedAt[user];\n if (userStakedAt == 0) return STAKING_PERIOD;\n\n uint256 totalTimeStaked;\n unchecked {\n totalTimeStaked = block.timestamp - userStakedAt;\n }\n\n if (totalTimeStaked < STAKING_PERIOD) {\n unchecked {\n return STAKING_PERIOD - totalTimeStaked;\n }\n }\n return 0;\n }\n\n /**\n * @notice Returns if user is a prime holder\n * @return isPrimeHolder true if user is a prime holder\n */\n function isUserPrimeHolder(address user) external view returns (bool) {\n return tokens[user].exists;\n }\n\n /**\n * @notice Returns supply and borrow APR for user for a given market\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function calculateAPR(address market, address user) external view returns (APRInfo memory aprInfo) {\n IVToken vToken = IVToken(market);\n uint256 borrow = vToken.borrowBalanceStored(user);\n uint256 exchangeRate = vToken.exchangeRateStored();\n uint256 balanceOfAccount = vToken.balanceOf(user);\n uint256 supply = (exchangeRate * balanceOfAccount) / EXP_SCALE;\n\n aprInfo.userScore = interests[market][user].score;\n aprInfo.totalScore = markets[market].sumOfMembersScore;\n\n aprInfo.xvsBalanceForScore = _xvsBalanceForScore(_xvsBalanceOfUser(user));\n Capital memory capital = _capitalForScore(aprInfo.xvsBalanceForScore, borrow, supply, address(vToken));\n\n aprInfo.capital = capital.capital;\n aprInfo.cappedSupply = capital.cappedSupply;\n aprInfo.cappedBorrow = capital.cappedBorrow;\n aprInfo.supplyCapUSD = capital.supplyCapUSD;\n aprInfo.borrowCapUSD = capital.borrowCapUSD;\n\n (aprInfo.supplyAPR, aprInfo.borrowAPR) = _calculateUserAPR(\n market,\n supply,\n borrow,\n aprInfo.cappedSupply,\n aprInfo.cappedBorrow,\n aprInfo.userScore,\n aprInfo.totalScore\n );\n }\n\n /**\n * @notice Returns supply and borrow APR for estimated supply, borrow and XVS staked\n * @param market the market for which to fetch the APR\n * @param user the account for which to get the APR\n * @return aprInfo APR information for the user for the given market\n */\n function estimateAPR(\n address market,\n address user,\n uint256 borrow,\n uint256 supply,\n uint256 xvsStaked\n ) external view returns (APRInfo memory aprInfo) {\n aprInfo.totalScore = markets[market].sumOfMembersScore - interests[market][user].score;\n\n aprInfo.xvsBalanceForScore = _xvsBalanceForScore(xvsStaked);\n Capital memory capital = _capitalForScore(aprInfo.xvsBalanceForScore, borrow, supply, market);\n\n aprInfo.capital = capital.capital;\n aprInfo.cappedSupply = capital.cappedSupply;\n aprInfo.cappedBorrow = capital.cappedBorrow;\n aprInfo.supplyCapUSD = capital.supplyCapUSD;\n aprInfo.borrowCapUSD = capital.borrowCapUSD;\n\n uint256 decimals = IERC20MetadataUpgradeable(_getUnderlying(market)).decimals();\n aprInfo.capital = aprInfo.capital * (10 ** (18 - decimals));\n\n aprInfo.userScore = Scores._calculateScore(\n aprInfo.xvsBalanceForScore,\n aprInfo.capital,\n alphaNumerator,\n alphaDenominator\n );\n\n aprInfo.totalScore = aprInfo.totalScore + aprInfo.userScore;\n\n (aprInfo.supplyAPR, aprInfo.borrowAPR) = _calculateUserAPR(\n market,\n supply,\n borrow,\n aprInfo.cappedSupply,\n aprInfo.cappedBorrow,\n aprInfo.userScore,\n aprInfo.totalScore\n );\n }\n\n /**\n * @notice Distributes income from market since last distribution\n * @param vToken the market for which to distribute the income\n * @custom:error Throw MarketNotSupported if market is not supported\n */\n function accrueInterest(address vToken) public {\n Market storage market = markets[vToken];\n\n if (!market.exists) revert MarketNotSupported();\n\n address underlying = _getUnderlying(vToken);\n\n IPrimeLiquidityProvider _primeLiquidityProvider = IPrimeLiquidityProvider(primeLiquidityProvider);\n _primeLiquidityProvider.accrueTokens(underlying);\n uint256 totalAccruedInPLP = _primeLiquidityProvider.tokenAmountAccrued(underlying);\n uint256 unreleasedPLPAccruedInterest = totalAccruedInPLP - unreleasedPLPIncome[underlying];\n uint256 distributionIncome = unreleasedPLPAccruedInterest;\n\n if (distributionIncome == 0) {\n return;\n }\n\n unreleasedPLPIncome[underlying] = totalAccruedInPLP;\n\n uint256 delta;\n if (market.sumOfMembersScore != 0) {\n delta = ((distributionIncome * EXP_SCALE) / market.sumOfMembersScore);\n }\n\n market.rewardIndex += delta;\n }\n\n /**\n * @notice Returns boosted interest accrued for a user\n * @param vToken the market for which to fetch the accrued interest\n * @param user the account for which to get the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function getInterestAccrued(address vToken, address user) public returns (uint256) {\n accrueInterest(vToken);\n\n return _interestAccrued(vToken, user);\n }\n\n /**\n * @notice accrues interest and updates score of all markets for an user\n * @param user the account address for which to accrue interest and update score\n */\n function _accrueInterestAndUpdateScore(address user) internal {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n _executeBoost(user, market);\n _updateScore(user, market);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Initializes all the markets for the user when a prime token is minted\n * @param account the account address for which markets needs to be initialized\n */\n function _initializeMarkets(address account) internal {\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n accrueInterest(market);\n\n interests[market][account].rewardIndex = markets[market].rewardIndex;\n\n uint256 score = _calculateScore(market, account);\n interests[market][account].score = score;\n markets[market].sumOfMembersScore = markets[market].sumOfMembersScore + score;\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice calculate the current score of user\n * @param market the market for which to calculate the score\n * @param user the account for which to calculate the score\n * @return score the score of the user\n */\n function _calculateScore(address market, address user) internal returns (uint256) {\n uint256 xvsBalanceForScore = _xvsBalanceForScore(_xvsBalanceOfUser(user));\n\n IVToken vToken = IVToken(market);\n uint256 borrow = vToken.borrowBalanceStored(user);\n uint256 exchangeRate = vToken.exchangeRateStored();\n uint256 balanceOfAccount = vToken.balanceOf(user);\n uint256 supply = (exchangeRate * balanceOfAccount) / EXP_SCALE;\n\n address xvsToken = IXVSVault(xvsVault).xvsAddress();\n oracle.updateAssetPrice(xvsToken);\n oracle.updatePrice(market);\n\n Capital memory capital = _capitalForScore(xvsBalanceForScore, borrow, supply, market);\n\n uint256 decimals = IERC20MetadataUpgradeable(_getUnderlying(market)).decimals();\n\n capital.capital = capital.capital * (10 ** (18 - decimals));\n\n return Scores._calculateScore(xvsBalanceForScore, capital.capital, alphaNumerator, alphaDenominator);\n }\n\n /**\n * @notice To transfer the accrued interest to user\n * @param vToken the market for which to claim\n * @param user the account for which to get the accrued interest\n * @return amount the amount of tokens transferred to the user\n * @custom:event Emits InterestClaimed event\n */\n function _claimInterest(address vToken, address user) internal returns (uint256) {\n uint256 amount = getInterestAccrued(vToken, user);\n amount += interests[vToken][user].accrued;\n\n interests[vToken][user].rewardIndex = markets[vToken].rewardIndex;\n delete interests[vToken][user].accrued;\n\n address underlying = _getUnderlying(vToken);\n IERC20Upgradeable asset = IERC20Upgradeable(underlying);\n\n if (amount > asset.balanceOf(address(this))) {\n delete unreleasedPLPIncome[underlying];\n IPrimeLiquidityProvider(primeLiquidityProvider).releaseFunds(address(asset));\n }\n\n asset.safeTransfer(user, amount);\n\n emit InterestClaimed(user, vToken, amount);\n\n return amount;\n }\n\n /**\n * @notice Used to mint a new prime token\n * @param isIrrevocable is the tokens being issued is irrevocable\n * @param user token owner\n * @custom:error Throw IneligibleToClaim if user is not eligible to claim prime token\n * @custom:event Emits Mint event\n */\n function _mint(bool isIrrevocable, address user) internal {\n Token storage token = tokens[user];\n if (token.exists) revert IneligibleToClaim();\n\n token.exists = true;\n token.isIrrevocable = isIrrevocable;\n\n if (isIrrevocable) {\n ++totalIrrevocable;\n } else {\n ++totalRevocable;\n }\n\n if (totalIrrevocable > irrevocableLimit || totalRevocable > revocableLimit) revert InvalidLimit();\n _updateRoundAfterTokenMinted(user);\n\n emit Mint(user, isIrrevocable);\n }\n\n /**\n * @notice Used to burn a new prime token\n * @param user owner whose prime token to burn\n * @custom:error Throw UserHasNoPrimeToken if user has no prime token\n * @custom:event Emits Burn event\n */\n function _burn(address user) internal {\n Token memory token = tokens[user];\n if (!token.exists) revert UserHasNoPrimeToken();\n\n address[] storage allMarkets = _allMarkets;\n uint256 marketsLength = allMarkets.length;\n\n for (uint256 i; i < marketsLength; ) {\n address market = allMarkets[i];\n _executeBoost(user, market);\n markets[market].sumOfMembersScore = markets[market].sumOfMembersScore - interests[market][user].score;\n\n delete interests[market][user].score;\n delete interests[market][user].rewardIndex;\n\n unchecked {\n ++i;\n }\n }\n\n if (token.isIrrevocable) {\n --totalIrrevocable;\n } else {\n --totalRevocable;\n }\n\n delete tokens[user].exists;\n delete tokens[user].isIrrevocable;\n\n _updateRoundAfterTokenBurned(user);\n\n emit Burn(user);\n }\n\n /**\n * @notice Used to upgrade an token\n * @param user owner whose prime token to upgrade\n * @custom:error Throw InvalidLimit if total irrevocable tokens exceeds the limit\n * @custom:event Emits TokenUpgraded event\n */\n function _upgrade(address user) internal {\n Token storage userToken = tokens[user];\n\n userToken.isIrrevocable = true;\n ++totalIrrevocable;\n --totalRevocable;\n\n if (totalIrrevocable > irrevocableLimit) revert InvalidLimit();\n\n emit TokenUpgraded(user);\n }\n\n /**\n * @notice Accrue rewards for the user. Must be called before updating score\n * @param user account for which we need to accrue rewards\n * @param vToken the market for which we need to accrue rewards\n */\n function _executeBoost(address user, address vToken) internal {\n if (!markets[vToken].exists || !tokens[user].exists) {\n return;\n }\n\n accrueInterest(vToken);\n interests[vToken][user].accrued += _interestAccrued(vToken, user);\n interests[vToken][user].rewardIndex = markets[vToken].rewardIndex;\n }\n\n /**\n * @notice Update total score of user and market. Must be called after changing account's borrow or supply balance.\n * @param user account for which we need to update score\n * @param market the market for which we need to score\n */\n function _updateScore(address user, address market) internal {\n Market storage _market = markets[market];\n if (!_market.exists || !tokens[user].exists) {\n return;\n }\n\n uint256 score = _calculateScore(market, user);\n _market.sumOfMembersScore = _market.sumOfMembersScore - interests[market][user].score + score;\n\n interests[market][user].score = score;\n }\n\n /**\n * @notice Verify new alpha arguments\n * @param _alphaNumerator numerator of alpha. If alpha is 0.5 then numerator is 1\n * @param _alphaDenominator denominator of alpha. If alpha is 0.5 then denominator is 2\n * @custom:error Throw InvalidAlphaArguments if alpha is invalid\n */\n function _checkAlphaArguments(uint128 _alphaNumerator, uint128 _alphaDenominator) internal pure {\n if (_alphaNumerator >= _alphaDenominator || _alphaNumerator == 0) {\n revert InvalidAlphaArguments();\n }\n }\n\n /**\n * @notice starts round to update scores of a particular or all markets\n */\n function _startScoreUpdateRound() internal {\n nextScoreUpdateRoundId++;\n totalScoreUpdatesRequired = totalIrrevocable + totalRevocable;\n pendingScoreUpdates = totalScoreUpdatesRequired;\n }\n\n /**\n * @notice update the required score updates when token is burned before round is completed\n */\n function _updateRoundAfterTokenBurned(address user) internal {\n if (totalScoreUpdatesRequired != 0) --totalScoreUpdatesRequired;\n\n if (pendingScoreUpdates != 0 && !isScoreUpdated[nextScoreUpdateRoundId][user]) {\n --pendingScoreUpdates;\n }\n }\n\n /**\n * @notice update the required score updates when token is minted before round is completed\n */\n function _updateRoundAfterTokenMinted(address user) internal {\n if (totalScoreUpdatesRequired != 0) isScoreUpdated[nextScoreUpdateRoundId][user] = true;\n }\n\n /**\n * @notice fetch the current XVS balance of user in the XVSVault\n * @param user the account address\n * @return xvsBalance the XVS balance of user\n */\n function _xvsBalanceOfUser(address user) internal view returns (uint256) {\n (uint256 xvs, , uint256 pendingWithdrawals) = IXVSVault(xvsVault).getUserInfo(\n xvsVaultRewardToken,\n xvsVaultPoolId,\n user\n );\n return (xvs - pendingWithdrawals);\n }\n\n /**\n * @notice calculate the current XVS balance that will be used in calculation of score\n * @param xvs the actual XVS balance of user\n * @return xvsBalanceForScore the XVS balance to use in score\n */\n function _xvsBalanceForScore(uint256 xvs) internal view returns (uint256) {\n if (xvs > MAXIMUM_XVS_CAP) {\n return MAXIMUM_XVS_CAP;\n }\n return xvs;\n }\n\n /**\n * @notice calculate the capital for calculation of score\n * @param xvs the actual XVS balance of user\n * @param borrow the borrow balance of user\n * @param supply the supply balance of user\n * @param market the market vToken address\n * @return capital the capital to use in calculation of score\n */\n function _capitalForScore(\n uint256 xvs,\n uint256 borrow,\n uint256 supply,\n address market\n ) internal view returns (Capital memory capital) {\n address xvsToken = IXVSVault(xvsVault).xvsAddress();\n\n uint256 xvsPrice = oracle.getPrice(xvsToken);\n capital.borrowCapUSD = (xvsPrice * ((xvs * markets[market].borrowMultiplier) / EXP_SCALE)) / EXP_SCALE;\n capital.supplyCapUSD = (xvsPrice * ((xvs * markets[market].supplyMultiplier) / EXP_SCALE)) / EXP_SCALE;\n\n uint256 tokenPrice = oracle.getUnderlyingPrice(market);\n uint256 supplyUSD = (tokenPrice * supply) / EXP_SCALE;\n uint256 borrowUSD = (tokenPrice * borrow) / EXP_SCALE;\n\n if (supplyUSD >= capital.supplyCapUSD) {\n supply = supplyUSD != 0 ? (supply * capital.supplyCapUSD) / supplyUSD : 0;\n }\n\n if (borrowUSD >= capital.borrowCapUSD) {\n borrow = borrowUSD != 0 ? (borrow * capital.borrowCapUSD) / borrowUSD : 0;\n }\n\n capital.capital = supply + borrow;\n capital.cappedSupply = supply;\n capital.cappedBorrow = borrow;\n }\n\n /**\n * @notice Used to get if the XVS balance is eligible for prime token\n * @param amount amount of XVS\n * @return isEligible true if the staked XVS amount is enough to consider the associated user eligible for a Prime token, false otherwise\n */\n function _isEligible(uint256 amount) internal view returns (bool) {\n if (amount >= MINIMUM_STAKED_XVS) {\n return true;\n }\n\n return false;\n }\n\n /**\n * @notice Calculate the interests accrued by the user in the market, since the last accrual\n * @param vToken the market for which to calculate the accrued interest\n * @param user the user for which to calculate the accrued interest\n * @return interestAccrued the number of underlying tokens accrued by the user since the last accrual\n */\n function _interestAccrued(address vToken, address user) internal view returns (uint256) {\n Interest memory interest = interests[vToken][user];\n uint256 index = markets[vToken].rewardIndex - interest.rewardIndex;\n\n uint256 score = interest.score;\n\n return (index * score) / EXP_SCALE;\n }\n\n /**\n * @notice Returns the underlying token associated with the VToken, or wrapped native token if the market is native market\n * @param vToken the market whose underlying token will be returned\n * @return underlying The address of the underlying token associated with the VToken, or the address of the WRAPPED_NATIVE_TOKEN token if the market is NATIVE_MARKET\n */\n function _getUnderlying(address vToken) internal view returns (address) {\n if (vToken == NATIVE_MARKET) {\n return WRAPPED_NATIVE_TOKEN;\n }\n return IVToken(vToken).underlying();\n }\n\n //////////////////////////////////////////////////\n //////////////// APR Calculation ////////////////\n ////////////////////////////////////////////////\n\n /**\n * @notice the total income that's going to be distributed in a year to prime token holders\n * @param vToken the market for which to fetch the total income that's going to distributed in a year\n * @return amount the total income\n */\n function incomeDistributionYearly(address vToken) public view returns (uint256 amount) {\n uint256 totalIncomePerBlockOrSecondFromPLP = IPrimeLiquidityProvider(primeLiquidityProvider)\n .getEffectiveDistributionSpeed(_getUnderlying(vToken));\n amount = blocksOrSecondsPerYear * totalIncomePerBlockOrSecondFromPLP;\n }\n\n /**\n * @notice used to calculate the supply and borrow APR of the user\n * @param vToken the market for which to fetch the APR\n * @param totalSupply the total token supply of the user\n * @param totalBorrow the total tokens borrowed by the user\n * @param totalCappedSupply the total token capped supply of the user\n * @param totalCappedBorrow the total capped tokens borrowed by the user\n * @param userScore the score of the user\n * @param totalScore the total market score\n * @return supplyAPR the supply APR of the user\n * @return borrowAPR the borrow APR of the user\n */\n function _calculateUserAPR(\n address vToken,\n uint256 totalSupply,\n uint256 totalBorrow,\n uint256 totalCappedSupply,\n uint256 totalCappedBorrow,\n uint256 userScore,\n uint256 totalScore\n ) internal view returns (uint256 supplyAPR, uint256 borrowAPR) {\n if (totalScore == 0) return (0, 0);\n\n uint256 userYearlyIncome = (userScore * incomeDistributionYearly(vToken)) / totalScore;\n\n uint256 totalCappedValue = totalCappedSupply + totalCappedBorrow;\n\n if (totalCappedValue == 0) return (0, 0);\n\n uint256 maximumBps = MAXIMUM_BPS;\n uint256 userSupplyIncomeYearly;\n uint256 userBorrowIncomeYearly;\n userSupplyIncomeYearly = (userYearlyIncome * totalCappedSupply) / totalCappedValue;\n userBorrowIncomeYearly = (userYearlyIncome * totalCappedBorrow) / totalCappedValue;\n supplyAPR = totalSupply == 0 ? 0 : ((userSupplyIncomeYearly * maximumBps) / totalSupply);\n borrowAPR = totalBorrow == 0 ? 0 : ((userBorrowIncomeYearly * maximumBps) / totalBorrow);\n }\n}\n" + }, + "contracts/Tokens/Prime/PrimeLiquidityProvider.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { PrimeLiquidityProviderStorageV1 } from \"./PrimeLiquidityProviderStorage.sol\";\nimport { SafeERC20Upgradeable, IERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport { AccessControlledV8 } from \"@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol\";\nimport { PausableUpgradeable } from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport { IPrimeLiquidityProvider } from \"./Interfaces/IPrimeLiquidityProvider.sol\";\nimport { MaxLoopsLimitHelper } from \"@venusprotocol/solidity-utilities/contracts/MaxLoopsLimitHelper.sol\";\nimport { TimeManagerV8 } from \"@venusprotocol/solidity-utilities/contracts/TimeManagerV8.sol\";\n\n/**\n * @title PrimeLiquidityProvider\n * @author Venus\n * @notice PrimeLiquidityProvider is used to fund Prime\n */\ncontract PrimeLiquidityProvider is\n IPrimeLiquidityProvider,\n AccessControlledV8,\n PausableUpgradeable,\n MaxLoopsLimitHelper,\n PrimeLiquidityProviderStorageV1,\n TimeManagerV8\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n\n /// @notice The default max token distribution speed\n uint256 public constant DEFAULT_MAX_DISTRIBUTION_SPEED = 1e18;\n\n /// @notice Emitted when a token distribution is initialized\n event TokenDistributionInitialized(address indexed token);\n\n /// @notice Emitted when a new token distribution speed is set\n event TokenDistributionSpeedUpdated(address indexed token, uint256 oldSpeed, uint256 newSpeed);\n\n /// @notice Emitted when a new max distribution speed for token is set\n event MaxTokenDistributionSpeedUpdated(address indexed token, uint256 oldSpeed, uint256 newSpeed);\n\n /// @notice Emitted when prime token contract address is changed\n event PrimeTokenUpdated(address indexed oldPrimeToken, address indexed newPrimeToken);\n\n /// @notice Emitted when distribution state(Index and block or second) is updated\n event TokensAccrued(address indexed token, uint256 amount);\n\n /// @notice Emitted when token is transferred to the prime contract\n event TokenTransferredToPrime(address indexed token, uint256 amount);\n\n /// @notice Emitted on sweep token success\n event SweepToken(address indexed token, address indexed to, uint256 sweepAmount);\n\n /// @notice Thrown when arguments are passed are invalid\n error InvalidArguments();\n\n /// @notice Thrown when distribution speed is greater than maxTokenDistributionSpeeds[tokenAddress]\n error InvalidDistributionSpeed(uint256 speed, uint256 maxSpeed);\n\n /// @notice Thrown when caller is not the desired caller\n error InvalidCaller();\n\n /// @notice Thrown when token is initialized\n error TokenAlreadyInitialized(address token);\n\n ///@notice Error thrown when PrimeLiquidityProvider's balance is less than sweep amount\n error InsufficientBalance(uint256 sweepAmount, uint256 balance);\n\n /// @notice Error thrown when funds transfer is paused\n error FundsTransferIsPaused();\n\n /// @notice Error thrown when accrueTokens is called for an uninitialized token\n error TokenNotInitialized(address token_);\n\n /// @notice Error thrown when argument value in setter is same as previous value\n error AddressesMustDiffer();\n\n /**\n * @notice Compares two addresses to ensure they are different\n * @param oldAddress The original address to compare\n * @param newAddress The new address to compare\n */\n modifier compareAddress(address oldAddress, address newAddress) {\n if (newAddress == oldAddress) {\n revert AddressesMustDiffer();\n }\n _;\n }\n\n /**\n * @notice Prime Liquidity Provider constructor\n * @param _timeBased A boolean indicating whether the contract is based on time or block.\n * @param _blocksPerYear total blocks per year\n */\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor(bool _timeBased, uint256 _blocksPerYear) TimeManagerV8(_timeBased, _blocksPerYear) {\n _disableInitializers();\n }\n\n /**\n * @notice PrimeLiquidityProvider initializer\n * @dev Initializes the deployer to owner\n * @param accessControlManager_ AccessControlManager contract address\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n * @param loopsLimit_ Maximum number of loops allowed in a single transaction\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function initialize(\n address accessControlManager_,\n address[] calldata tokens_,\n uint256[] calldata distributionSpeeds_,\n uint256[] calldata maxDistributionSpeeds_,\n uint256 loopsLimit_\n ) external initializer {\n _ensureZeroAddress(accessControlManager_);\n\n __AccessControlled_init(accessControlManager_);\n __Pausable_init();\n _setMaxLoopsLimit(loopsLimit_);\n\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if ((numTokens != distributionSpeeds_.length) || (numTokens != maxDistributionSpeeds_.length)) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _initializeToken(tokens_[i]);\n _setMaxTokenDistributionSpeed(tokens_[i], maxDistributionSpeeds_[i]);\n _setTokenDistributionSpeed(tokens_[i], distributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Initialize the distribution of the token\n * @param tokens_ Array of addresses of the tokens to be intialized\n * @custom:access Only Governance\n */\n function initializeTokens(address[] calldata tokens_) external onlyOwner {\n uint256 tokensLength = tokens_.length;\n _ensureMaxLoops(tokensLength);\n\n for (uint256 i; i < tokensLength; ) {\n _initializeToken(tokens_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Pause fund transfer of tokens to Prime contract\n * @custom:access Controlled by ACM\n */\n function pauseFundsTransfer() external {\n _checkAccessAllowed(\"pauseFundsTransfer()\");\n _pause();\n }\n\n /**\n * @notice Resume fund transfer of tokens to Prime contract\n * @custom:access Controlled by ACM\n */\n function resumeFundsTransfer() external {\n _checkAccessAllowed(\"resumeFundsTransfer()\");\n _unpause();\n }\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param distributionSpeeds_ New distribution speeds for tokens\n * @custom:access Controlled by ACM\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function setTokensDistributionSpeed(address[] calldata tokens_, uint256[] calldata distributionSpeeds_) external {\n _checkAccessAllowed(\"setTokensDistributionSpeed(address[],uint256[])\");\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if (numTokens != distributionSpeeds_.length) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _ensureTokenInitialized(tokens_[i]);\n _setTokenDistributionSpeed(tokens_[i], distributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Set max distribution speed for token (amount of maximum token distribute per block or second)\n * @param tokens_ Array of addresses of the tokens\n * @param maxDistributionSpeeds_ New distribution speeds for tokens\n * @custom:access Controlled by ACM\n * @custom:error Throw InvalidArguments on different length of tokens and speeds array\n */\n function setMaxTokensDistributionSpeed(\n address[] calldata tokens_,\n uint256[] calldata maxDistributionSpeeds_\n ) external {\n _checkAccessAllowed(\"setMaxTokensDistributionSpeed(address[],uint256[])\");\n uint256 numTokens = tokens_.length;\n _ensureMaxLoops(numTokens);\n\n if (numTokens != maxDistributionSpeeds_.length) {\n revert InvalidArguments();\n }\n\n for (uint256 i; i < numTokens; ) {\n _setMaxTokenDistributionSpeed(tokens_[i], maxDistributionSpeeds_[i]);\n\n unchecked {\n ++i;\n }\n }\n }\n\n /**\n * @notice Set the prime token contract address\n * @param prime_ The new address of the prime token contract\n * @custom:event Emits PrimeTokenUpdated event\n * @custom:access Only owner\n */\n function setPrimeToken(address prime_) external onlyOwner compareAddress(prime, prime_) {\n _ensureZeroAddress(prime_);\n\n emit PrimeTokenUpdated(prime, prime_);\n prime = prime_;\n }\n\n /**\n * @notice Set the limit for the loops can iterate to avoid the DOS\n * @param loopsLimit Limit for the max loops can execute at a time\n * @custom:event Emits MaxLoopsLimitUpdated event on success\n * @custom:access Controlled by ACM\n */\n function setMaxLoopsLimit(uint256 loopsLimit) external {\n _checkAccessAllowed(\"setMaxLoopsLimit(uint256)\");\n _setMaxLoopsLimit(loopsLimit);\n }\n\n /**\n * @notice Claim all the token accrued till last block or second\n * @param token_ The token to release to the Prime contract\n * @custom:event Emits TokenTransferredToPrime event\n * @custom:error Throw InvalidArguments on Zero address(token)\n * @custom:error Throw FundsTransferIsPaused is paused\n * @custom:error Throw InvalidCaller if the sender is not the Prime contract\n */\n function releaseFunds(address token_) external {\n address _prime = prime;\n if (msg.sender != _prime) revert InvalidCaller();\n if (paused()) {\n revert FundsTransferIsPaused();\n }\n\n accrueTokens(token_);\n uint256 accruedAmount = _tokenAmountAccrued[token_];\n delete _tokenAmountAccrued[token_];\n\n emit TokenTransferredToPrime(token_, accruedAmount);\n\n IERC20Upgradeable(token_).safeTransfer(_prime, accruedAmount);\n }\n\n /**\n * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user\n * @param token_ The address of the ERC-20 token to sweep\n * @param to_ The address of the recipient\n * @param amount_ The amount of tokens needs to transfer\n * @custom:event Emits SweepToken event\n * @custom:error Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract\n * @custom:access Only Governance\n */\n function sweepToken(IERC20Upgradeable token_, address to_, uint256 amount_) external onlyOwner {\n uint256 balance = token_.balanceOf(address(this));\n if (amount_ > balance) {\n revert InsufficientBalance(amount_, balance);\n }\n\n emit SweepToken(address(token_), to_, amount_);\n\n token_.safeTransfer(to_, amount_);\n }\n\n /**\n * @notice Get rewards per block or second for token\n * @param token_ Address of the token\n * @return speed returns the per block or second reward\n */\n function getEffectiveDistributionSpeed(address token_) external view returns (uint256) {\n uint256 distributionSpeed = tokenDistributionSpeeds[token_];\n uint256 balance = IERC20Upgradeable(token_).balanceOf(address(this));\n uint256 accrued = _tokenAmountAccrued[token_];\n\n if (balance > accrued) {\n return distributionSpeed;\n }\n\n return 0;\n }\n\n /**\n * @notice Accrue token by updating the distribution state\n * @param token_ Address of the token\n * @custom:event Emits TokensAccrued event\n */\n function accrueTokens(address token_) public {\n _ensureZeroAddress(token_);\n\n _ensureTokenInitialized(token_);\n\n uint256 blockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 deltaBlocksOrSeconds;\n unchecked {\n deltaBlocksOrSeconds = blockNumberOrSecond - lastAccruedBlockOrSecond[token_];\n }\n\n if (deltaBlocksOrSeconds != 0) {\n uint256 distributionSpeed = tokenDistributionSpeeds[token_];\n uint256 balance = IERC20Upgradeable(token_).balanceOf(address(this));\n\n uint256 balanceDiff = balance - _tokenAmountAccrued[token_];\n if (distributionSpeed != 0 && balanceDiff != 0) {\n uint256 accruedSinceUpdate = deltaBlocksOrSeconds * distributionSpeed;\n uint256 tokenAccrued = (balanceDiff <= accruedSinceUpdate ? balanceDiff : accruedSinceUpdate);\n\n _tokenAmountAccrued[token_] += tokenAccrued;\n emit TokensAccrued(token_, tokenAccrued);\n }\n\n lastAccruedBlockOrSecond[token_] = blockNumberOrSecond;\n }\n }\n\n /**\n * @notice Get the last accrued block or second for token\n * @param token_ Address of the token\n * @return blockNumberOrSecond returns the last accrued block or second\n */\n function lastAccruedBlock(address token_) external view returns (uint256) {\n return lastAccruedBlockOrSecond[token_];\n }\n\n /**\n * @notice Get the tokens accrued\n * @param token_ Address of the token\n * @return returns the amount of accrued tokens for the token provided\n */\n function tokenAmountAccrued(address token_) external view returns (uint256) {\n return _tokenAmountAccrued[token_];\n }\n\n /**\n * @notice Initialize the distribution of the token\n * @param token_ Address of the token to be intialized\n * @custom:event Emits TokenDistributionInitialized event\n * @custom:error Throw TokenAlreadyInitialized if token is already initialized\n */\n function _initializeToken(address token_) internal {\n _ensureZeroAddress(token_);\n uint256 blockNumberOrSecond = getBlockNumberOrTimestamp();\n uint256 initializedBlockOrSecond = lastAccruedBlockOrSecond[token_];\n\n if (initializedBlockOrSecond != 0) {\n revert TokenAlreadyInitialized(token_);\n }\n\n /*\n * Update token state block number or second\n */\n lastAccruedBlockOrSecond[token_] = blockNumberOrSecond;\n\n emit TokenDistributionInitialized(token_);\n }\n\n /**\n * @notice Set distribution speed (amount of token distribute per block or second)\n * @param token_ Address of the token\n * @param distributionSpeed_ New distribution speed for token\n * @custom:event Emits TokenDistributionSpeedUpdated event\n * @custom:error Throw InvalidDistributionSpeed if speed is greater than max speed\n */\n function _setTokenDistributionSpeed(address token_, uint256 distributionSpeed_) internal {\n uint256 maxDistributionSpeed = maxTokenDistributionSpeeds[token_];\n if (maxDistributionSpeed == 0) {\n maxTokenDistributionSpeeds[token_] = maxDistributionSpeed = DEFAULT_MAX_DISTRIBUTION_SPEED;\n }\n\n if (distributionSpeed_ > maxDistributionSpeed) {\n revert InvalidDistributionSpeed(distributionSpeed_, maxDistributionSpeed);\n }\n\n uint256 oldDistributionSpeed = tokenDistributionSpeeds[token_];\n if (oldDistributionSpeed != distributionSpeed_) {\n // Distribution speed updated so let's update distribution state to ensure that\n // 1. Token accrued properly for the old speed, and\n // 2. Token accrued at the new speed starts after this block or second.\n accrueTokens(token_);\n\n // Update speed\n tokenDistributionSpeeds[token_] = distributionSpeed_;\n\n emit TokenDistributionSpeedUpdated(token_, oldDistributionSpeed, distributionSpeed_);\n }\n }\n\n /**\n * @notice Set max distribution speed (amount of maximum token distribute per block or second)\n * @param token_ Address of the token\n * @param maxDistributionSpeed_ New max distribution speed for token\n * @custom:event Emits MaxTokenDistributionSpeedUpdated event\n */\n function _setMaxTokenDistributionSpeed(address token_, uint256 maxDistributionSpeed_) internal {\n emit MaxTokenDistributionSpeedUpdated(token_, tokenDistributionSpeeds[token_], maxDistributionSpeed_);\n maxTokenDistributionSpeeds[token_] = maxDistributionSpeed_;\n }\n\n /**\n * @notice Revert on non initialized token\n * @param token_ Token Address to be verified for\n */\n function _ensureTokenInitialized(address token_) internal view {\n uint256 lastBlockOrSecondAccrued = lastAccruedBlockOrSecond[token_];\n\n if (lastBlockOrSecondAccrued == 0) {\n revert TokenNotInitialized(token_);\n }\n }\n\n /**\n * @notice Revert on zero address\n * @param address_ Address to be verified\n */\n function _ensureZeroAddress(address address_) internal pure {\n if (address_ == address(0)) {\n revert InvalidArguments();\n }\n }\n}\n" + }, + "contracts/Tokens/Prime/PrimeLiquidityProviderStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\n/**\n * @title PrimeLiquidityProviderStorageV1\n * @author Venus\n * @notice Storage for Prime Liquidity Provider\n */\ncontract PrimeLiquidityProviderStorageV1 {\n /// @notice Address of the Prime contract\n address public prime;\n\n /// @notice The rate at which token is distributed (per block or second)\n mapping(address => uint256) public tokenDistributionSpeeds;\n\n /// @notice The max token distribution speed for token\n mapping(address => uint256) public maxTokenDistributionSpeeds;\n\n /// @notice The block or second till which rewards are distributed for an asset\n mapping(address => uint256) public lastAccruedBlockOrSecond;\n\n /// @notice The token accrued but not yet transferred to prime contract\n mapping(address => uint256) internal _tokenAmountAccrued;\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 uint256[45] private __gap;\n}\n" + }, + "contracts/Tokens/Prime/PrimeStorage.sol": { + "content": "// SPDX-License-Identifier: BSD-3-Clause\npragma solidity 0.8.25;\n\nimport { ResilientOracleInterface } from \"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\";\n\n/**\n * @title PrimeStorageV1\n * @author Venus\n * @notice Storage for Prime Token\n */\ncontract PrimeStorageV1 {\n struct Token {\n bool exists;\n bool isIrrevocable;\n }\n\n struct Market {\n uint256 supplyMultiplier;\n uint256 borrowMultiplier;\n uint256 rewardIndex;\n uint256 sumOfMembersScore;\n bool exists;\n }\n\n struct Interest {\n uint256 accrued;\n uint256 score;\n uint256 rewardIndex;\n }\n\n struct PendingReward {\n address vToken;\n address rewardToken;\n uint256 amount;\n }\n\n /// @notice Base unit for computations, usually used in scaling (multiplications, divisions)\n uint256 internal constant EXP_SCALE = 1e18;\n\n /// @notice maximum BPS = 100%\n uint256 internal constant MAXIMUM_BPS = 1e4;\n\n /// @notice Mapping to get prime token's metadata\n mapping(address => Token) public tokens;\n\n /// @notice Tracks total irrevocable tokens minted\n uint256 public totalIrrevocable;\n\n /// @notice Tracks total revocable tokens minted\n uint256 public totalRevocable;\n\n /// @notice Indicates maximum revocable tokens that can be minted\n uint256 public revocableLimit;\n\n /// @notice Indicates maximum irrevocable tokens that can be minted\n uint256 public irrevocableLimit;\n\n /// @notice Tracks when prime token eligible users started staking for claiming prime token\n mapping(address => uint256) public stakedAt;\n\n /// @notice vToken to market configuration\n mapping(address => Market) public markets;\n\n /// @notice vToken to user to user index\n mapping(address => mapping(address => Interest)) public interests;\n\n /// @notice A list of boosted markets\n address[] internal _allMarkets;\n\n /// @notice numerator of alpha. Ex: if alpha is 0.5 then this will be 1\n uint128 public alphaNumerator;\n\n /// @notice denominator of alpha. Ex: if alpha is 0.5 then this will be 2\n uint128 public alphaDenominator;\n\n /// @notice address of XVS vault\n address public xvsVault;\n\n /// @notice address of XVS vault reward token\n address public xvsVaultRewardToken;\n\n /// @notice address of XVS vault pool id\n uint256 public xvsVaultPoolId;\n\n /// @notice mapping to check if a account's score was updated in the round\n mapping(uint256 => mapping(address => bool)) public isScoreUpdated;\n\n /// @notice unique id for next round\n uint256 public nextScoreUpdateRoundId;\n\n /// @notice total number of accounts whose score needs to be updated\n uint256 public totalScoreUpdatesRequired;\n\n /// @notice total number of accounts whose score is yet to be updated\n uint256 public pendingScoreUpdates;\n\n /// @notice mapping used to find if an asset is part of prime markets\n mapping(address => address) public vTokenForAsset;\n\n /// @notice Address of core pool comptroller contract\n address internal corePoolComptroller;\n\n /// @notice unreleased income from PLP that's already distributed to prime holders\n /// @dev mapping of asset address => amount\n mapping(address => uint256) public unreleasedPLPIncome;\n\n /// @notice The address of PLP contract\n address public primeLiquidityProvider;\n\n /// @notice The address of ResilientOracle contract\n ResilientOracleInterface public oracle;\n\n /// @notice The address of PoolRegistry contract\n address public poolRegistry;\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 uint256[26] private __gap;\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "mode": "3" + }, + "evmVersion": "paris", + "outputSelection": { + "*": { + "*": ["storageLayout", "abi", "evm.methodIdentifiers", "metadata", "devdoc", "userdoc"], + "": ["ast"] + } + }, + "detectMissingLibraries": false, + "forceEVMLA": false, + "enableEraVMExtensions": false, + "libraries": {} + } +} diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts index ee5b442ca..05deade27 100644 --- a/hardhat.config.zksync.ts +++ b/hardhat.config.zksync.ts @@ -29,6 +29,12 @@ extendConfig((config: HardhatConfig) => { "node_modules/@venusprotocol/oracle/deployments/zksyncsepolia", "node_modules/@venusprotocol/token-bridge/deployments/zksyncsepolia", ], + + zksyncmainnet: [ + "node_modules/@venusprotocol/governance-contracts/deployments/zksyncmainnet", + "node_modules/@venusprotocol/oracle/deployments/zksyncmainnet", + "node_modules/@venusprotocol/token-bridge/deployments/zksyncmainnet", + ], }, }; } @@ -83,6 +89,14 @@ const config: HardhatUserConfig = { zksync: true, live: true, }, + zksyncmainnet: { + url: process.env.ARCHIVE_NODE_zksync || "https://mainnet.era.zksync.io", + ethNetwork: "mainnet", + verifyURL: "https://zksync2-mainnet-explorer.zksync.io/contract_verification", + accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], + zksync: true, + live: true, + }, }, paths: { sources: "./contracts", From f7e1d9ae5efb76ea4e98d7768e6a5b1ec3adf6f7 Mon Sep 17 00:00:00 2001 From: GitGuru7 Date: Thu, 22 Aug 2024 07:06:36 +0000 Subject: [PATCH 82/85] feat: updating deployment files --- deployments/zksyncmainnet.json | 200 +++++++++++++++++++++++ deployments/zksyncmainnet_addresses.json | 7 + 2 files changed, 207 insertions(+) create mode 100644 deployments/zksyncmainnet.json create mode 100644 deployments/zksyncmainnet_addresses.json diff --git a/deployments/zksyncmainnet.json b/deployments/zksyncmainnet.json new file mode 100644 index 000000000..df1923f74 --- /dev/null +++ b/deployments/zksyncmainnet.json @@ -0,0 +1,200 @@ +{ + "name": "zksyncmainnet", + "chainId": "324", + "contracts": { + "VTreasuryV8": { + "address": "0xB2e9174e23382f7744CebF7e0Be54cA001D95599", + "abi": [ + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "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": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryNative", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "WithdrawTreasuryToken", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "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": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "withdrawAmount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "withdrawAddress", + "type": "address" + } + ], + "name": "withdrawTreasuryToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] + } + } +} diff --git a/deployments/zksyncmainnet_addresses.json b/deployments/zksyncmainnet_addresses.json new file mode 100644 index 000000000..8129b54da --- /dev/null +++ b/deployments/zksyncmainnet_addresses.json @@ -0,0 +1,7 @@ +{ + "name": "zksyncmainnet", + "chainId": "324", + "addresses": { + "VTreasuryV8": "0xB2e9174e23382f7744CebF7e0Be54cA001D95599" + } +} From f2d060d726886075b3126fd4c21f7f4244c9bbc0 Mon Sep 17 00:00:00 2001 From: GitGuru7 <128375421+GitGuru7@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:17:59 +0530 Subject: [PATCH 83/85] fix: url --- hardhat.config.zksync.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardhat.config.zksync.ts b/hardhat.config.zksync.ts index 05deade27..d874d6938 100644 --- a/hardhat.config.zksync.ts +++ b/hardhat.config.zksync.ts @@ -90,7 +90,7 @@ const config: HardhatUserConfig = { live: true, }, zksyncmainnet: { - url: process.env.ARCHIVE_NODE_zksync || "https://mainnet.era.zksync.io", + url: process.env.ARCHIVE_NODE_zksyncmainnet || "https://mainnet.era.zksync.io", ethNetwork: "mainnet", verifyURL: "https://zksync2-mainnet-explorer.zksync.io/contract_verification", accounts: DEPLOYER_PRIVATE_KEY ? [`0x${DEPLOYER_PRIVATE_KEY}`] : [], From 6caa77069640603ab560bea6155cab09e4c11ad9 Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Fri, 23 Aug 2024 08:40:46 +0000 Subject: [PATCH 84/85] chore(release): 9.2.0-dev.10 [skip ci] ## [9.2.0-dev.10](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.9...v9.2.0-dev.10) (2024-08-23) ### Features * add interest rate model deployments for Chaos recs ([52127eb](https://github.com/VenusProtocol/venus-protocol/commit/52127eb3d40589d0fb09ed383b5a410fb52ad8b6)) * updating deployment files ([e18f96d](https://github.com/VenusProtocol/venus-protocol/commit/e18f96d0fdab08520e53118609993dcad4fe063b)) --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1914d1fc7..0ae8f4915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [9.2.0-dev.10](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.9...v9.2.0-dev.10) (2024-08-23) + + +### Features + +* add interest rate model deployments for Chaos recs ([52127eb](https://github.com/VenusProtocol/venus-protocol/commit/52127eb3d40589d0fb09ed383b5a410fb52ad8b6)) +* updating deployment files ([e18f96d](https://github.com/VenusProtocol/venus-protocol/commit/e18f96d0fdab08520e53118609993dcad4fe063b)) + ## [9.2.0-dev.9](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.8...v9.2.0-dev.9) (2024-08-21) diff --git a/package.json b/package.json index 9fc2bed70..6789da733 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.9", + "version": "9.2.0-dev.10", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus", From b107420984411c7d4058b19bdca9992d0ee52d3a Mon Sep 17 00:00:00 2001 From: Venus Tools Date: Tue, 27 Aug 2024 05:22:42 +0000 Subject: [PATCH 85/85] chore(release): 9.2.0-dev.11 [skip ci] ## [9.2.0-dev.11](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.10...v9.2.0-dev.11) (2024-08-27) ### Features * add deployments of VTreasury on zksync ([2887b61](https://github.com/VenusProtocol/venus-protocol/commit/2887b61856089003882566e3b89ad1f7547b4708)) * updating deployment files ([f7e1d9a](https://github.com/VenusProtocol/venus-protocol/commit/f7e1d9ae5efb76ea4e98d7768e6a5b1ec3adf6f7)) ### Bug Fixes * url ([f2d060d](https://github.com/VenusProtocol/venus-protocol/commit/f2d060d726886075b3126fd4c21f7f4244c9bbc0)) --- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ae8f4915..360bb6487 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## [9.2.0-dev.11](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.10...v9.2.0-dev.11) (2024-08-27) + + +### Features + +* add deployments of VTreasury on zksync ([2887b61](https://github.com/VenusProtocol/venus-protocol/commit/2887b61856089003882566e3b89ad1f7547b4708)) +* updating deployment files ([f7e1d9a](https://github.com/VenusProtocol/venus-protocol/commit/f7e1d9ae5efb76ea4e98d7768e6a5b1ec3adf6f7)) + + +### Bug Fixes + +* url ([f2d060d](https://github.com/VenusProtocol/venus-protocol/commit/f2d060d726886075b3126fd4c21f7f4244c9bbc0)) + ## [9.2.0-dev.10](https://github.com/VenusProtocol/venus-protocol/compare/v9.2.0-dev.9...v9.2.0-dev.10) (2024-08-23) diff --git a/package.json b/package.json index 6789da733..503db7828 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@venusprotocol/venus-protocol", - "version": "9.2.0-dev.10", + "version": "9.2.0-dev.11", "description": "The Venus Money Market", "repository": "git@github.com:VenusProtocol/venus-protocol.git", "author": "Venus",